mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 12:22:51 +00:00
TWINE: converted enum to enum class
This commit is contained in:
parent
faaa0927ce
commit
1c9377ed93
@ -33,7 +33,7 @@ bool EntityData::loadBody(Common::SeekableReadStream &stream) {
|
||||
body.bodyIndex = stream.readUint16LE();
|
||||
body.actorBoundingBox.hasBoundingBox = stream.readByte();
|
||||
if (body.actorBoundingBox.hasBoundingBox) {
|
||||
if (stream.readByte() == ActionType::ACTION_ZV) {
|
||||
if ((ActionType)stream.readByte() == ActionType::ACTION_ZV) {
|
||||
body.actorBoundingBox.bbox.mins.x = stream.readSint16LE();
|
||||
body.actorBoundingBox.bbox.mins.y = stream.readSint16LE();
|
||||
body.actorBoundingBox.bbox.mins.z = stream.readSint16LE();
|
||||
@ -56,7 +56,7 @@ bool EntityData::loadAnim(Common::SeekableReadStream &stream) {
|
||||
const uint8 numActions = stream.readByte();
|
||||
for (uint8 i = 0U; i < numActions; ++i) {
|
||||
EntityAnim::Action action;
|
||||
action.type = stream.readByte();
|
||||
action.type = (ActionType)stream.readByte();
|
||||
switch (action.type) {
|
||||
case ActionType::ACTION_HITTING:
|
||||
action.animFrame = stream.readByte();
|
||||
|
@ -42,7 +42,7 @@ struct EntityAnim {
|
||||
int animIndex;
|
||||
|
||||
struct Action {
|
||||
uint8 type = 0;
|
||||
ActionType type = ActionType::ACTION_NOP;
|
||||
uint8 animFrame = 0;
|
||||
int16 sampleIndex = 0;
|
||||
int16 frequency = 0;
|
||||
|
@ -133,7 +133,7 @@ struct ActorBoundingBox {
|
||||
bool hasBoundingBox = false;
|
||||
};
|
||||
|
||||
enum ActionType {
|
||||
enum class ActionType : uint8 {
|
||||
ACTION_NOP = 0,
|
||||
ACTION_BODY = 1,
|
||||
ACTION_BODP = 2,
|
||||
|
Loading…
x
Reference in New Issue
Block a user