[Scummvm-cvs-logs] scummvm master -> d23ced0aed643b2d6e3b6a70518f9412652dd817
urukgit
urukgit at users.noreply.github.com
Fri Feb 21 16:27:08 CET 2014
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5580c0b95e AVALANCHE: Repair define() and defineCameo() in ShootEmUp.
d23ced0aed AVALANCHE: Repair ShootEmUp::plotThem().
Commit: 5580c0b95e11d4035626ddd6efef600385044f76
https://github.com/scummvm/scummvm/commit/5580c0b95e11d4035626ddd6efef600385044f76
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-21T06:50:37-08:00
Commit Message:
AVALANCHE: Repair define() and defineCameo() in ShootEmUp.
Changed paths:
engines/avalanche/shootemup.cpp
engines/avalanche/shootemup.h
diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index a2d5289..783c1f9 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -206,12 +206,12 @@ void ShootEmUp::plotThem() {
}
}
-void ShootEmUp::define(int16 x, int16 y, byte p, int8 ix, int8 iy, int16 time, bool isAMissile, bool doWeWipe) {
+void ShootEmUp::define(int16 x, int16 y, int8 p, int8 ix, int8 iy, int16 time, bool isAMissile, bool doWeWipe) {
for (int i = 0; i < 99; i++) {
if (_sprites[i]._x == kFlag) {
_sprites[i]._x = x;
_sprites[i]._y = y;
- _sprites[i]._p = p;
+ _sprites[i]._p = p - 1;
_sprites[i]._ix = ix;
_sprites[i]._iy = iy;
_sprites[i]._timeout = time;
@@ -223,7 +223,7 @@ void ShootEmUp::define(int16 x, int16 y, byte p, int8 ix, int8 iy, int16 time, b
}
}
-void ShootEmUp::defineCameo(int16 x, int16 y, byte p, int16 time) {
+void ShootEmUp::defineCameo(int16 x, int16 y, int8 p, int16 time) {
for (int i = 0; i < 99; i++) {
if (_sprites[i]._x == kFlag) {
_sprites[i]._x = x;
diff --git a/engines/avalanche/shootemup.h b/engines/avalanche/shootemup.h
index d0df763..ada3906 100644
--- a/engines/avalanche/shootemup.h
+++ b/engines/avalanche/shootemup.h
@@ -41,7 +41,7 @@ private:
struct Sprite {
int8 _ix, _iy;
int16 _x, _y;
- byte _p;
+ int8 _p;
int16 _timeout;
bool _cameo;
byte _cameoFrame;
@@ -102,8 +102,8 @@ private:
void moveThem();
void blank(Common::Rect rect);
void plotThem();
- void define(int16 x, int16 y, byte p, int8 ix, int8 iy, int16 time, bool isAMissile, bool doWeWipe);
- void defineCameo(int16 x, int16 y, byte p, int16 time);
+ void define(int16 x, int16 y, int8 p, int8 ix, int8 iy, int16 time, bool isAMissile, bool doWeWipe);
+ void defineCameo(int16 x, int16 y, int8 p, int16 time);
void showStock(byte index);
void drawNumber(int number, int size, int x);
void showScore();
Commit: d23ced0aed643b2d6e3b6a70518f9412652dd817
https://github.com/scummvm/scummvm/commit/d23ced0aed643b2d6e3b6a70518f9412652dd817
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-21T07:22:37-08:00
Commit Message:
AVALANCHE: Repair ShootEmUp::plotThem().
Changed paths:
engines/avalanche/graphics.cpp
engines/avalanche/graphics.h
engines/avalanche/shootemup.cpp
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index 3b4413a..603e294 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -779,6 +779,14 @@ void GraphicManager::seuDrawCameo(int destX, int destY, byte w1, byte w2) {
drawPicture(_surface, _seuPictures[w1], destX, destY);
}
+uint16 GraphicManager::seuGetPicWidth(int which) {
+ return _seuPictures[which].w;
+}
+
+uint16 GraphicManager::seuGetPicHeight(int which) {
+ return _seuPictures[which].h;
+}
+
/**
* This function is for skipping the difference between a stored 'size' value associated with a picture
* and the actual size of the pictures when reading them from files for Ghostroom and Shoot em' up.
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index 553f993..86244e9 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -116,6 +116,8 @@ public:
void seuFree();
void seuDrawPicture(int x, int y, byte which);
void seuDrawCameo(int destX, int destY, byte w1, byte w2);
+ uint16 seuGetPicWidth(int which);
+ uint16 seuGetPicHeight(int which);
void clearAlso();
void clearTextBar();
diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index 783c1f9..1b48aa9 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -195,7 +195,7 @@ void ShootEmUp::plotThem() {
_vm->_graphics->seuDrawPicture(_sprites[i]._x, _sprites[i]._y, _sprites[i]._p);
if (_sprites[i]._wipe)
- blank(Common::Rect(_sprites[i]._x, _sprites[i]._y, _sprites[i]._x + _rectangles[i].width(), _sprites[i]._y + _rectangles[i].height()));
+ blank(Common::Rect(_sprites[i]._x, _sprites[i]._y, _sprites[i]._x + _vm->_graphics->seuGetPicWidth(_sprites[i]._p), _sprites[i]._y + _vm->_graphics->seuGetPicHeight(_sprites[i]._p)));
if (_sprites[i]._timeout > 0) {
_sprites[i]._timeout--;
More information about the Scummvm-git-logs
mailing list