0x800BC728: big global struct, 0x5D8 bytes, named this as SH_SYS / GameWork, seems to handle hardware stuff like audio/graphics/controller, and the main game loop state idx, not totally sure if this is all a single struct or maybe just separate global vars though, but most accesses to the fields inside it do use BC728 as a base addr. (also seems to hold game settings like button binds / blood color / etc)
0x800B9FC0: even bigger global struct, 0x2768 bytes - named as SYS_W / SysWork - this definitely seems to be it's own structure, func at 0x800340E0 handles zeroing it out, has its own state index that I've called InGameState
Haven't really mapped out that many fields for those structs yet besides some loop-state-index stuff, but did find that SYS_W holds data related to characters, SysWork+0x4C / 0x800BA00C is where character data begins, data seems to be laid out like:
I'm not really sure what's up with that player_extra field, my first thought was maybe player chara was a different struct that inherits from CharacterData with some extra fields at the end, but seems there's a lot of code that fetches pointer to player_extra_174 specifically, so guess it must be its own struct instead.
(oddly the field types inside that PlayerCharExtra seem to match very closely to the first few fields inside CharacterData, maybe it's just some kind of backup data for some reason? not really sure though)
other_char seems to be used for both NPCs and enemies too afaik, one of the fields at the start of CharacterData likely says the type of the chara.
Very rough CharacterData struct:
struct CharacterData
{
u_char field_0;
char field_1;
char field_2;
char field_3;
u_char field_4;
char field_5;
__int16 flags_6;
int field_8;
u_short field_C;
__int16 field_E;
int field_10[2];
int pos_x_18;
int pos_y_1C;
int pos_z_20;
__int16 rot_pitch_24;
__int16 rot_yaw_26;
__int16 rot_roll_28;
u_char unk_2A[0x6];
u_char unk_30[0xF8];
};
SH_SYS
/GameWork
, seems to handle hardware stuff like audio/graphics/controller, and the main game loop state idx, not totally sure if this is all a single struct or maybe just separate global vars though, but most accesses to the fields inside it do use BC728 as a base addr. (also seems to hold game settings like button binds / blood color / etc)SYS_W
/SysWork
- this definitely seems to be it's own structure, func at0x800340E0
handles zeroing it out, has its own state index that I've calledInGameState
Haven't really mapped out that many fields for those structs yet besides some loop-state-index stuff, but did find that
SYS_W
holds data related to characters,SysWork+0x4C / 0x800BA00C
is where character data begins, data seems to be laid out like:I'm not really sure what's up with that player_extra field, my first thought was maybe player chara was a different struct that inherits from CharacterData with some extra fields at the end, but seems there's a lot of code that fetches pointer to player_extra_174 specifically, so guess it must be its own struct instead.
(oddly the field types inside that PlayerCharExtra seem to match very closely to the first few fields inside CharacterData, maybe it's just some kind of backup data for some reason? not really sure though)
other_char
seems to be used for both NPCs and enemies too afaik, one of the fields at the start of CharacterData likely says the type of the chara.Very rough CharacterData struct:
Interestingly that's starting to look similar to SH2's SubCharacter struct: https://github.com/Sparagas/Silent-Hill/blob/7734098689a67e2f041f9bbfb2f2a5a64cce4aaf/dwarf2cpp/Silent%20Hill%202%20(USA)%20(En%2CJa)%20(Beta)/SLUS_202_28/work/sh2(CVS%E5%85%A8%E5%8F%96%E5%BE%97)/src/MC/savedata.c#L88