Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Find replacement-part data in swep1rcr.exe #13

Open
JayFoxRox opened this issue May 5, 2018 · 1 comment
Open

Find replacement-part data in swep1rcr.exe #13

JayFoxRox opened this issue May 5, 2018 · 1 comment

Comments

@JayFoxRox
Copy link
Member

JayFoxRox commented May 5, 2018

There seems to be data starting at 0x4C1CB8 (VMA) in the patched US version.

typedef struct {
  union {
    int32_t unk0; //FIXME: Remove this
    struct {
      uint8_t index; // absolute index to identify part?
      uint8_t level; // level / quality?
      uint8_t unk1; // ?
      uint8_t category; // what kind of part it is?
    };
  }
  int32_t price;
  int32_t model; // model index
  char* title;
} PartData;
PartData* data_4C1CB8[] = {
  { ??????????, 250, 204, "/SCREENTEXT_280/~~R-20 Repulsorgrip" }, //FIXME: Stupid IDA hides the data from me..
  { 0x00000102, 0x190, 0xCD, &unk_4C2538 },
  { 0x00020203, 0x258, 0xCE, &unk_4C2514 },
  { 0x00060304, 0x4B0, 0xE6, &unk_4C24EC },
  { 0x000A0405, 0xA28, 0xF1, &unk_4C24C4 }, 
  { 0x000E0506, 0x1770, 0xF2, &unk_4C249C }, 
  { 0x01000007, 0xC8, 0x32, &unk_4C2478 }, 
  { 0x01000108, 0x190, 0x33, &unk_4C2450 }, 
  { 0x01020209, 0x2BC, 0x34, &unk_4C2428 }, 
  { 0x0106030A, 0x640, 0x35, &unk_4C2404 }, 
  { 0x010C040B, 0xED8, 0x36, &unk_4C23E0 }, 
  { 0x0110050C, 0x1D4C, 0xF0, &unk_4C23B8 }, 
  { 0x0200000D, 0x320, 0xC6, &unk_4C2390 }, 
  { 0x0200010E, 0x898, 0xC7, &unk_4C236C }, 
  { 0x0204020F, 0x15E0, 0xC8, &unk_4C2344 }, 
  { 0x02080310, 0x1B58, 0xC9, &unk_4C231C }, 
  { 0x020A0411, 0x28A0, 0xCA, &unk_4C22F8 }, 
  { 0x020C0512, 0x36B0, 0xCB, &unk_4C22D4 }, 
  { 0x03000013, 0x3E8, 0xA9, &unk_4C22B0 }, 
  { 0x03000114, 0x960, 0xAA, &unk_4C228C }, 
  { 0x03020215, 0x1770, 0xAB, &unk_4C2268 }, 
  { 0x03080316, 0x36B0, 0xAC, &unk_4C2244 }, 
  { 0x030C0417, 0x445C, 0xAD, &unk_4C221C }, 
  { 0x03100518, 0x4E20, 0xAE, &unk_4C21F4 }, 
  { 0x04000019, 0x2BC, 0x9D, &unk_4C21D0 }, 
  { 0x0400011A, 0x578, 0x9E, &unk_4C21A8 }, 
  { 0x0404021B, 0xE10, 0x9F, &unk_4C2184 }, 
  { 0x0406031C, 0x1B58, 0xA0, &unk_4C2160 }, 
  { 0x040A041D, 0x28A0, 0xA1, &unk_4C213C }, 
  { 0x040E051E, 0x36B0, 0xA2, &unk_4C2114 }, 
  { 0x0500001F, 0x32, 0xA3, &unk_4C20F0 }, 
  { 0x05000120, 0x64, 0xA4, &unk_4C20CC }, 
  { 0x05060221, 0x12C, 0xA5, &unk_4C20A8 }, 
  { 0x05080322, 0x384, 0xA6, &unk_4C2084 }, 
  { 0x050A0423, 0xA8C, 0xA7, &unk_4C2060 }, 
  { 0x050E0524, 0x1518, 0xA8, &unk_4C2038 }, 
  { 0x06000025, 0x96, 0xEA, &unk_4C2014 }, 
  { 0x06000126, 0x12C, 0xEB, &unk_4C1FF0 }, 
  { 0x06020227, 0x320, 0xED, &unk_4C1FCC }, 
  { 0x06040328, 0x578, 0xEE, &unk_4C1FA4 }, 
  { 0x06080429, 0xFA0, 0xEF, &unk_4C1F80 }, 
  { 0x060C052A, 0x1B58, 0xF3, &unk_4C1F58 },
};
@JayFoxRox JayFoxRox changed the title Document data for replacement part storage Find replacement-part data in swep1rcr.exe May 7, 2018
@JayFoxRox
Copy link
Member Author

void __cdecl sub_4493F0(int a1, int a2, int a3, float a4) appears to contain all upgrade part information.
There is a big switch/case for the part categories a2, and then it selects each level a3. The output is in a1.
a4 is probably the part health in range [0.0, 1.0]

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant