mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2024-11-19 14:11:15 +00:00
Add proto_scenery_init
This commit is contained in:
parent
01a68af4a4
commit
3d5cb4c3f4
24
src/proto.cc
24
src/proto.cc
@ -828,6 +828,30 @@ int _proto_dude_init(const char* path)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 0x49FBBC
|
||||
int proto_scenery_init(Proto* proto, int a2)
|
||||
{
|
||||
int v1 = a2 & 0xFFFFFF;
|
||||
|
||||
proto->scenery.pid = -1;
|
||||
proto->scenery.messageId = 100 * v1;
|
||||
proto->scenery.fid = buildFid(OBJ_TYPE_SCENERY, v1 - 1, 0, 0, 0);
|
||||
if (!artExists(proto->scenery.fid)) {
|
||||
proto->scenery.fid = buildFid(OBJ_TYPE_SCENERY, 0, 0, 0, 0);
|
||||
}
|
||||
proto->scenery.lightDistance = 0;
|
||||
proto->scenery.lightIntensity = 0;
|
||||
proto->scenery.flags = 0;
|
||||
proto->scenery.extendedFlags = 0x2000;
|
||||
proto->scenery.sid = -1;
|
||||
proto->scenery.type = SCENERY_TYPE_GENERIC;
|
||||
proto_scenery_subdata_init(proto, proto->scenery.type);
|
||||
proto->scenery.field_2C = -1;
|
||||
proto->scenery.field_34 = '0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 0x49FC74
|
||||
int proto_scenery_subdata_init(Proto* proto, int type)
|
||||
{
|
||||
|
@ -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_init(Proto* proto, int a2);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user