[Scummvm-cvs-logs] scummvm master -> b089f084af7cc2263b3ef18f197249e7ff543fd1
tramboi
bertrand_augereau at yahoo.fr
Wed Aug 31 23:49:04 CEST 2011
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d9c7b9dd39 DREAMWEB: Asserts
6c0b7b6deb DREAMWEB: Fix of the bug when you are in the inventory and drag the gun agains the upper border of the screen
efd8c41d35 DREAMWEB: 'frameoutv' know how to clip on the left and upper borders
b089f084af DREAMWEB: Cleaning in 'doshake'
Commit: d9c7b9dd39ced4c2954aca9f1537d667d576eafb
https://github.com/scummvm/scummvm/commit/d9c7b9dd39ced4c2954aca9f1537d667d576eafb
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-31T16:04:15-07:00
Commit Message:
DREAMWEB: Asserts
Changed paths:
engines/dreamweb/vgagrafx.cpp
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index 5c63b88..beb2d61 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -43,6 +43,8 @@ void DreamGenContext::multiget() {
}
void DreamGenContext::multiget(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h) {
+ assert(x < 320);
+ assert(y < 200);
const uint8 *src = workspace() + x + y * kScreenwidth;
if (y + h > 200)
h = 200 - y;
@@ -64,6 +66,8 @@ void DreamGenContext::multiput() {
}
void DreamGenContext::multiput(const uint8 *src, uint16 x, uint16 y, uint8 w, uint8 h) {
+ assert(x < 320);
+ assert(y < 200);
uint8 *dst = workspace() + x + y * kScreenwidth;
if (y + h > 200)
h = 200 - y;
Commit: 6c0b7b6deb994b0d57d8dc858ee10a71cebfc4cb
https://github.com/scummvm/scummvm/commit/6c0b7b6deb994b0d57d8dc858ee10a71cebfc4cb
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-31T16:27:59-07:00
Commit Message:
DREAMWEB: Fix of the bug when you are in the inventory and drag the gun agains the upper border of the screen
Changed paths:
engines/dreamweb/stubs.cpp
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 3a01872..89df661 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1611,9 +1611,11 @@ void DreamGenContext::showpointer() {
height = 12;
data.byte(kPointerxs) = width;
data.byte(kPointerys) = height;
- data.word(kOldpointerx) -= width / 2;
- data.word(kOldpointery) -= height / 2;
- multiget(segRef(data.word(kBuffers)).ptr(kPointerback, 0), x - width / 2, y - height / 2, width, height);
+ uint16 xMin = (x >= width / 2) ? x - width / 2 : 0;
+ uint16 yMin = (y >= height / 2) ? y - height / 2 : 0;
+ data.word(kOldpointerx) = xMin;
+ data.word(kOldpointery) = yMin;
+ multiget(segRef(data.word(kBuffers)).ptr(kPointerback, 0), xMin, yMin, width, height);
showframe(frames, x, y, 3 * data.byte(kItemframe) + 1, 128);
showframe(icons1, x, y, 3, 128);
} else {
Commit: efd8c41d35a2807ea2026f6966c3efb83de4dc65
https://github.com/scummvm/scummvm/commit/efd8c41d35a2807ea2026f6966c3efb83de4dc65
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-31T16:43:57-07:00
Commit Message:
DREAMWEB: 'frameoutv' know how to clip on the left and upper borders
Changed paths:
engines/dreamweb/stubs.h
engines/dreamweb/vgagrafx.cpp
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f99f0d6..ede6025 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -25,7 +25,7 @@
void clearwork();
void multidump();
void multidump(uint16 x, uint16 y, uint8 width, uint8 height);
- void frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
+ void frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y);
void frameoutnm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void frameoutbh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void frameoutfx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index beb2d61..ecc90f1 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -286,11 +286,23 @@ void DreamGenContext::showpcx() {
pcxFile.close();
}
-void DreamGenContext::frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {
+void DreamGenContext::frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y) {
// NB : These resilience checks were not in the original engine, but did they result in undefined behaviour
// or was something broken during porting to C++?
assert(pitch == 320);
+ if(x < 0) {
+ assert(width >= -x);
+ width -= -x;
+ src += -x;
+ x = 0;
+ }
+ if(y < 0) {
+ assert(height >= -y);
+ height -= -y;
+ src += (-y) * width;
+ y = 0;
+ }
if(x >= 320)
return;
if(y >= 200)
Commit: b089f084af7cc2263b3ef18f197249e7ff543fd1
https://github.com/scummvm/scummvm/commit/b089f084af7cc2263b3ef18f197249e7ff543fd1
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-31T16:43:57-07:00
Commit Message:
DREAMWEB: Cleaning in 'doshake'
Changed paths:
engines/dreamweb/vgagrafx.cpp
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index ecc90f1..ee05ebf 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -154,11 +154,10 @@ void DreamGenContext::frameoutfx(uint8 *dst, const uint8 *src, uint16 pitch, uin
void DreamGenContext::doshake() {
uint8 &counter = data.byte(kShakecounter);
- _cmp(counter, 48);
- if (flags.z())
+ if (counter == 48)
return;
- _add(counter, 1);
+ ++counter;
static const int shakeTable[] = {
0, -2, 3, -2, 0, 2, 4, -1,
1, -3, 3, 2, 0, -2, 3, -2,
More information about the Scummvm-git-logs
mailing list