diff options
-rw-r--r-- | csrc/game_init.c | 2 | ||||
-rw-r--r-- | csrc/loadsave.c | 2 | ||||
-rw-r--r-- | csrc/stock.h | 8 | ||||
-rw-r--r-- | csrc/stocks.c | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/csrc/game_init.c b/csrc/game_init.c index 1c06347..3969189 100644 --- a/csrc/game_init.c +++ b/csrc/game_init.c @@ -210,7 +210,7 @@ int init_new_game(int a0) dw_49907c = trunc(sum * 10.0); memset(0x4967e0, 0, 336); - memset(0x4971a0, 0, 384); + memset(player_stocks, 0, 384); memset(0x4990b8, 0, 36); dw_499080 = ebp = 0; fcn.00448b81(); diff --git a/csrc/loadsave.c b/csrc/loadsave.c index 8f10bd3..1581890 100644 --- a/csrc/loadsave.c +++ b/csrc/loadsave.c @@ -298,7 +298,7 @@ int load_checkpoint(int n) fread(0x497320, 1, 8, fp); fread(0x499100, 4, 1, fp); fread(0x497328, 4, 0x6c0, fp); - fread(0x4971a0, 8, 0x30, fp); + fread(player_stocks, sizeof(player_stock_info), 48, fp); /* 12 stocks */ fread(stocks, sizeof(stock_info), 12, fp); diff --git a/csrc/stock.h b/csrc/stock.h index 3ea1a29..3e4626c 100644 --- a/csrc/stock.h +++ b/csrc/stock.h @@ -18,3 +18,11 @@ typedef struct extern stock_info stocks[]; /* 0x496980 */ extern stock_info game_stocks[]; /* 0x47f072 */ + +typedef struct +{ + int amount; + int _; +} player_stock_info; + +extern player_stock_info player_stocks[]; // 0x4971a0 diff --git a/csrc/stocks.c b/csrc/stocks.c index dfeaf7b..c158a18 100644 --- a/csrc/stocks.c +++ b/csrc/stocks.c @@ -98,3 +98,5 @@ stock_info game_stocks[96] = { { "\xb3\xc1\xb7\xed\xb3\xd2", 0, 0, 0, 10000, 0, 44.0, 44.0, 44.0, 1.000000, 0.0, 0 }, /* 麦当劳 */ { "\xb7\x52\xad\x7d\xb9\x46", 0, 0, 0, 10000, 0, 30.0, 30.0, 30.0, 1.200000, 0.0, 0 }, /* 爱迪达 */ }; + +player_stock_info player_stocks[48]; |