summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-08-18 19:17:11 +0800
committerIru Cai <mytbk920423@gmail.com>2018-08-19 19:52:22 +0800
commit5064b5c62b9d062a8da95c7a4f4876027761a0ed (patch)
treef047ca997971aed44ab40c58f5c290a8dee8cab6
parent3024e3a4eaead9f4ca127b0604b02b91ba7b3c50 (diff)
downloadrich4-5064b5c62b9d062a8da95c7a4f4876027761a0ed.tar.xz
update docs
-rw-r--r--docs/characters.txt17
-rw-r--r--docs/global_vars.txt42
-rw-r--r--docs/special_place.txt23
3 files changed, 61 insertions, 21 deletions
diff --git a/docs/characters.txt b/docs/characters.txt
new file mode 100644
index 0000000..603e12c
--- /dev/null
+++ b/docs/characters.txt
@@ -0,0 +1,17 @@
+游戏人物
+========
+
+00: 约翰乔
+01: 沙隆巴斯
+02: 忍太郎
+03: 钱夫人
+04: 阿土伯
+05: 莎拉公主
+06: 宫本宝藏
+07: 糖糖
+08: 乌咪
+09: 孙小美
+0a: 小丹尼
+0b: 金贝贝
+
+如果只改存档中玩家信息的 0x13 字节,角色发生变化,再存档后角色名称的指针也发生变化,但是读档后(只测试过第一次读档,没测试过再次存档后读档),角色的性别没变(从魔法屋事件可以看出来)。
diff --git a/docs/global_vars.txt b/docs/global_vars.txt
index 49527e4..e6a9a38 100644
--- a/docs/global_vars.txt
+++ b/docs/global_vars.txt
@@ -7,16 +7,16 @@
0x496b60, 8
0x496b68, 0x68*4=0x1a0: player info for 4 players
the first player:
- 0x496b68, 4: pointer to player name
+ 0x496b68, 4: pointer to player name /* 0x00 */
0x496b6c, 4
0x496b70, 2
0x496b72, 2
0x496b74, 2
0x496b76, 2
- 0x496b78, 1
- 0x496b79, 1
- 0x496b7a, 1
- 0x496b7b, 1
+ 0x496b78, 1 /* 0x10 */
+ 0x496b79, 1: 0: on foot, 1: moto, 2: car
+ 0x496b7a, 1: number of dices
+ 0x496b7b, 1: character (see characters.txt)
0x496b7c, 1
0x496b7d, 1 (bank related)
0x496b7e, 1
@@ -25,27 +25,27 @@
0x496b81, 1
0x496b82, 1
0x496b83, 1
- 0x496b84, 4 (money, in bank or cash?)
- 0x496b88, 4 (money, in bank or cash?)
- 0x496b8c, 4 (bank related)
- 0x496b90, 4
+ 0x496b84, 4: cash
+ 0x496b88, 4: money, in bank (+ special financing) /* 0x20 */
+ 0x496b8c, 4: loan
+ 0x496b90, 4: special financing
0x496b94, 4
- 0x496b98, 2
- 0x496b9a, 1
- 0x496b9b, 1
+ 0x496b98, 2: points (uint16_t) /* 0x30 */
+ 0x496b9a, 1: days in hotel (lowest 7 bits, same as the next fields)
+ 0x496b9b, 1: days disappearing (MSB: about to appear again)
0x496b9c, 1: days in prison (what does the MSB mean?)
0x496b9d, 1: days in hospital (what does the MSB mean?)
- 0x496b9e, 1
- 0x496b9f, 1
- 0x496ba0, 1
- 0x496ba1, 1
+ 0x496b9e, 1: days in winter sleep
+ 0x496b9f, 1: days dream walking
+ 0x496ba0, 1: days stopping /* 0x38 */
+ 0x496ba1, 1: days tortoise walking
0x496ba2, 1: (not used?)
- 0x496ba3, 1
+ 0x496ba3, 1: number of days rejected by bank
0x496ba4, 1: number of days bank stop making loans
0x496ba5, 1
- 0x496ba6, 1
- 0x496ba7, 1
- 0x496ba8, 1
+ 0x496ba6, 1: days of assurance (uint8_t)
+ 0x496ba7, 1: god information (cannot find what the bits mean yet)
+ 0x496ba8, 1 /* 0x40 */
0x496ba9, 1
0x496baa, 1
0x496bab, 1: not used
@@ -85,7 +85,7 @@
0x499108, 4
0x49910c, 4
0x499110, 4
-0x499114, 4: number of players?
+0x499114, 4: number of players, including bankrupt players
0x499118, 4
0x49911c, 4
diff --git a/docs/special_place.txt b/docs/special_place.txt
new file mode 100644
index 0000000..668b652
--- /dev/null
+++ b/docs/special_place.txt
@@ -0,0 +1,23 @@
+特殊地点
+========
+
+新闻
+----
+
+- events_calls_table (0x475e24): 保存所有新闻的回调函数
+- 函数 news_events (0x44b6df)
+
+命运
+----
+
+- fortune_call_table (0x475ef0): 保存所有命运的回调函数
+- fortune_events (0x44db81)
+
+魔法屋
+------
+
+魔法屋共有12个功能。相关数据结构和函数:
+
+- magic_house_functions (0x475724): 每项16字节,开头4字节为该功能的 BIG5 字符串
+- 函数 magic_house (0x43380a): 魔法屋入口
+- 函数 magic_house_actions (0x431caa)