diff options
author | Strangerke | 2014-06-15 11:12:13 +0200 |
---|---|---|
committer | Strangerke | 2014-06-15 11:12:13 +0200 |
commit | 0f923c7e98d183a93f3f9415f34c81acd0615049 (patch) | |
tree | 94992687e1fe771a27ce86a1b5f9beef9791262e /engines | |
parent | c48c585f88a4c037e3fe5f2363a7aaca1946b343 (diff) | |
download | scummvm-rg350-0f923c7e98d183a93f3f9415f34c81acd0615049.tar.gz scummvm-rg350-0f923c7e98d183a93f3f9415f34c81acd0615049.tar.bz2 scummvm-rg350-0f923c7e98d183a93f3f9415f34c81acd0615049.zip |
CGE2: Change the Flags structure to make use of booleans
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge2/vga13h.cpp | 32 | ||||
-rw-r--r-- | engines/cge2/vga13h.h | 32 |
2 files changed, 32 insertions, 32 deletions
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index 5c3b59b084..ba652a6260 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -676,22 +676,22 @@ void Sprite::sync(Common::Serializer &s) { _flags._zmov = flags & 0x4000 ? true : false; _flags._tran = flags & 0x8000 ? true : false; } else { - flags = (flags << 1) | _flags._tran; - flags = (flags << 1) | _flags._zmov; - flags = (flags << 1) | _flags._back; - flags = (flags << 1) | _flags._shad; - flags = (flags << 1) | _flags._near; - flags = (flags << 1) | _flags._east; - flags = (flags << 1) | _flags._frnt; - flags = (flags << 1) | _flags._kept; - flags = (flags << 1) | _flags._port; - flags = (flags << 1) | _flags._xlat; - flags = (flags << 1) | _flags._kill; - flags = (flags << 1) | _flags._slav; - flags = (flags << 1) | _flags._trim; - flags = (flags << 1) | _flags._hold; - flags = (flags << 1) | _flags._drag; - flags = (flags << 1) | _flags._hide; + flags = (flags << 1) | (_flags._tran ? 1 : 0); + flags = (flags << 1) | (_flags._zmov ? 1 : 0); + flags = (flags << 1) | (_flags._back ? 1 : 0); + flags = (flags << 1) | (_flags._shad ? 1 : 0); + flags = (flags << 1) | (_flags._near ? 1 : 0); + flags = (flags << 1) | (_flags._east ? 1 : 0); + flags = (flags << 1) | (_flags._frnt ? 1 : 0); + flags = (flags << 1) | (_flags._kept ? 1 : 0); + flags = (flags << 1) | (_flags._port ? 1 : 0); + flags = (flags << 1) | (_flags._xlat ? 1 : 0); + flags = (flags << 1) | (_flags._kill ? 1 : 0); + flags = (flags << 1) | (_flags._slav ? 1 : 0); + flags = (flags << 1) | (_flags._trim ? 1 : 0); + flags = (flags << 1) | (_flags._hold ? 1 : 0); + flags = (flags << 1) | (_flags._drag ? 1 : 0); + flags = (flags << 1) | (_flags._hide ? 1 : 0); s.syncAsUint16LE(flags); } diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h index 90889718d5..359c20fc9f 100644 --- a/engines/cge2/vga13h.h +++ b/engines/cge2/vga13h.h @@ -193,22 +193,22 @@ public: int _ref; signed char _scene; struct Flags { - uint16 _hide : 1; // general visibility switch - uint16 _drag : 1; // sprite is moveable - uint16 _hold : 1; // sprite is held with mouse - uint16 _trim : 1; // Trim flag - uint16 _slav : 1; // slave object - uint16 _kill : 1; // dispose memory after remove - uint16 _xlat : 1; // 2nd way display: xlat table - uint16 _port : 1; // portable - uint16 _kept : 1; // kept in pocket - uint16 _frnt : 1; // stay in front of sprite - uint16 _east : 1; // talk to east (in opposite to west) - uint16 _near : 1; // Near action lock - uint16 _shad : 1; // shadow - uint16 _back : 1; // 'send to background' request - uint16 _zmov : 1; // sprite needs Z-update in queue - uint16 _tran : 1; // transparent (untouchable) + bool _hide : true; // general visibility switch + bool _drag : true; // sprite is moveable + bool _hold : true; // sprite is held with mouse + bool _trim : true; // Trim flag + bool _slav : true; // slave object + bool _kill : true; // dispose memory after remove + bool _xlat : true; // 2nd way display: xlat table + bool _port : true; // portable + bool _kept : true; // kept in pocket + bool _frnt : true; // stay in front of sprite + bool _east : true; // talk to east (in opposite to west) + bool _near : true; // Near action lock + bool _shad : true; // shadow + bool _back : true; // 'send to background' request + bool _zmov : true; // sprite needs Z-update in queue + bool _tran : true; // transparent (untouchable) } _flags; V2D _pos2D; V3D _pos3D; |