-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Decompilation] [th01] REIIDEN.CFG loading and saving
That's where the backwards `goto` for .CFG file error handling originated! Part of P0090, funded by Yanga.
- Loading branch information
Showing
5 changed files
with
148 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#define CFG_FN "reiiden.cfg" | ||
#define CFG_ID "REIIDEN" | ||
|
||
struct cfg_options_t { | ||
int8_t rank; | ||
int8_t bgm_mode; | ||
int8_t bombs; | ||
int8_t lives_extra; // Add 2 for the actual number of lives | ||
}; | ||
|
||
#define CFG_RANK_DEFAULT (RANK_NORMAL) | ||
#define CFG_BGM_MODE_DEFAULT (true) | ||
#define CFG_BOMBS_DEFAULT (1) | ||
#define CFG_LIVES_EXTRA_DEFAULT (2) | ||
|
||
#define CFG_LIVES_EXTRA_MAX (4) | ||
|
||
struct cfg_t { | ||
char id[sizeof(CFG_ID) - 1]; | ||
cfg_options_t opts; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cfg_options_t struc | ||
O_rank db ? | ||
O_bgm_mode db ? | ||
O_bombs db ? | ||
O_lives_extra db ? | ||
cfg_options_t ends | ||
|
||
CFG_RANK_DEFAULT = RANK_NORMAL | ||
CFG_BGM_MODE_DEFAULT = 1 | ||
CFG_BOMBS_DEFAULT = 1 | ||
CFG_LIVES_EXTRA_DEFAULT = 2 | ||
|
||
CFG_LIVES_EXTRA_MAX = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
public _CFG_FN, _CFG_ID, _FOPEN_RB, _FOPEN_WB | ||
_CFG_FN db 'reiiden.cfg',0 | ||
_FOPEN_RB db 'rb',0 | ||
_REIIDEN label byte | ||
_CFG_ID db 'REIIDEN',0 | ||
_FOPEN_WB db 'wb',0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.