summaryrefslogtreecommitdiff
path: root/csrc
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-10-16 20:42:37 +0800
committerIru Cai <mytbk920423@gmail.com>2018-10-16 20:45:59 +0800
commit813a06a775edf9133ca2cc5295169fa7c18b51d7 (patch)
treea89a9c85d89a2b336ca0c39f6273f71c89d2286e /csrc
parentcfbbcd24cd3cc339e38caabc69b1239d0300aba9 (diff)
downloadrich4-813a06a775edf9133ca2cc5295169fa7c18b51d7.tar.xz
player_stocks
Diffstat (limited to 'csrc')
-rw-r--r--csrc/game_init.c2
-rw-r--r--csrc/loadsave.c2
-rw-r--r--csrc/stock.h8
-rw-r--r--csrc/stocks.c2
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];