diff --git a/src/proto.cc b/src/proto.cc index b6d544f..cf4af89 100644 --- a/src/proto.cc +++ b/src/proto.cc @@ -828,6 +828,27 @@ int _proto_dude_init(const char* path) return 0; } +// 0x49FCFC +int proto_wall_init(Proto* proto, int a2) +{ + int v1 = a2 & 0xFFFFFF; + + proto->wall.pid = -1; + proto->wall.messageId = 100 * v1; + proto->wall.fid = buildFid(OBJ_TYPE_WALL, v1 - 1, 0, 0, 0); + if (!artExists(proto->wall.fid)) { + proto->wall.fid = buildFid(OBJ_TYPE_WALL, 0, 0, 0, 0); + } + proto->wall.lightDistance = 0; + proto->wall.lightIntensity = 0; + proto->wall.flags = 0; + proto->wall.extendedFlags = 0x2000; + proto->wall.sid = -1; + proto->wall.material = 1; + + return 0; +} + // 0x49FD84 int proto_tile_init(Proto* proto, int a2) { diff --git a/src/proto.h b/src/proto.h index e771b8d..ba4626b 100644 --- a/src/proto.h +++ b/src/proto.h @@ -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_wall_init(Proto* proto, int a2); int proto_tile_init(Proto* proto, int a2); int proto_misc_init(Proto* proto, int a2); int proto_copy_proto(int srcPid, int dstPid);