DRAGONS: Avoid global constuctors

This commit is contained in:
Eugene Sandulenko 2020-05-04 12:16:51 +02:00
parent 131e54b3bb
commit c4b42a2800

View File

@ -33,11 +33,13 @@
namespace Dragons {
static const Common::Point positionTable[4] = {
Common::Point(2, 0),
Common::Point(0xce, 0),
Common::Point(2, 0x9e),
Common::Point(0xce, 0x9e)
static const struct {
int x, y;
} positionTable[4] = {
{ 2, 0 },
{ 206, 0 },
{ 2, 158 },
{ 206, 158 }
};
static const int16 bagBounceTable[4] = {
@ -118,7 +120,7 @@ void Inventory::updateVisibility() {
}
Common::Point Inventory::getPosition() {
return positionTable[_screenPositionIndex];
return Common::Point(positionTable[_screenPositionIndex].x, positionTable[_screenPositionIndex].y);
}
void Inventory::setActorFlag400() {