Add proto_scenery_subdata_init
This commit is contained in:
parent
6a75ec07e9
commit
01a68af4a4
31
src/proto.cc
31
src/proto.cc
|
@ -828,6 +828,37 @@ int _proto_dude_init(const char* path)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// 0x49FC74
|
||||
int proto_scenery_subdata_init(Proto* proto, int type)
|
||||
{
|
||||
switch (type) {
|
||||
case SCENERY_TYPE_DOOR:
|
||||
proto->scenery.data.door.openFlags = 0;
|
||||
proto->scenery.extendedFlags |= 0x800;
|
||||
break;
|
||||
case SCENERY_TYPE_STAIRS:
|
||||
proto->scenery.data.stairs.field_0 = -1;
|
||||
proto->scenery.data.stairs.field_4 = -1;
|
||||
proto->scenery.extendedFlags |= 0x800;
|
||||
break;
|
||||
case SCENERY_TYPE_ELEVATOR:
|
||||
proto->scenery.data.elevator.type = -1;
|
||||
proto->scenery.data.elevator.level = -1;
|
||||
proto->scenery.extendedFlags |= 0x800;
|
||||
break;
|
||||
case SCENERY_TYPE_LADDER_UP:
|
||||
proto->scenery.data.ladder.field_0 = -1;
|
||||
proto->scenery.extendedFlags |= 0x800;
|
||||
break;
|
||||
case SCENERY_TYPE_LADDER_DOWN:
|
||||
proto->scenery.data.ladder.field_0 = -1;
|
||||
proto->scenery.extendedFlags |= 0x800;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 0x49FCFC
|
||||
int proto_wall_init(Proto* proto, int a2)
|
||||
{
|
||||
|
|
|
@ -118,6 +118,7 @@ int objectDataWrite(Object* obj, File* stream);
|
|||
int _proto_update_init(Object* obj);
|
||||
int _proto_dude_update_gender();
|
||||
int _proto_dude_init(const char* path);
|
||||
int proto_scenery_subdata_init(Proto* proto, int type);
|
||||
int proto_wall_init(Proto* proto, int a2);
|
||||
int proto_tile_init(Proto* proto, int a2);
|
||||
int proto_misc_init(Proto* proto, int a2);
|
||||
|
|
Loading…
Reference in New Issue