mirror of
https://github.com/open-goal/jak-project
synced 2026-07-07 14:13:45 -04:00
[game] rewrite memcard and game-save code (#1222)
* rewrite memcard and game-save code * fix memcard status and bank check * more robustness * fix bank pick on card update * fix load file bugs * bug fixes and final touches * add timers and turn off prints * optimization? * update pics * make money starburst slightly easier to see * fix first time save bug * reduce filesystem load a bit * too bright * Optimize `file_is_present`
This commit is contained in:
@@ -64,7 +64,7 @@ So far, we've decompiled around 400,000 lines of GOAL code, out of an estimated
|
||||
|
||||
Here are some screenshots of the renderer:
|
||||

|
||||

|
||||

|
||||
|
||||
YouTube playlist:
|
||||
https://www.youtube.com/playlist?list=PLWx9T30aAT50cLnCTY1SAbt2TtWQzKfXX
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 718 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 898 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 797 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 738 KiB |
+1149
-779
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@
|
||||
|
||||
void kmemcard_init_globals();
|
||||
|
||||
constexpr s32 SAVE_SIZE = 0x2b3; // likely different by versions!
|
||||
constexpr s32 SAVE_SIZE = 691; // likely different by versions! 692 on PAL/JPN
|
||||
constexpr s32 BANK_SIZE = 0x10000;
|
||||
|
||||
// each card can be in one of these states:
|
||||
@@ -144,4 +144,4 @@ u64 MC_save(s32 card_idx, s32 file_idx, Ptr<u8> save_data, Ptr<u8> save_summary_
|
||||
u64 MC_load(s32 card_idx, s32 file_idx, Ptr<u8> data);
|
||||
void MC_makefile(s32 port, s32 size);
|
||||
void MC_get_status(s32 slot, Ptr<mc_slot_info> info);
|
||||
u32 MC_check_result();
|
||||
u32 MC_check_result();
|
||||
|
||||
@@ -133,7 +133,7 @@ s32 sceMcOpen(s32 port, s32 slot, const char* name, s32 mode) {
|
||||
g_mc_state.handles[fd] = handle;
|
||||
|
||||
g_mc_state.current_function_result = fd;
|
||||
return 0;
|
||||
return sceMcResSucceed;
|
||||
}
|
||||
|
||||
s32 sceMcWrite(s32 fd, const void* buff, s32 size) {
|
||||
@@ -303,4 +303,4 @@ void read_memory_card_from_file() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ee
|
||||
} // namespace ee
|
||||
|
||||
@@ -2179,7 +2179,7 @@
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.2))
|
||||
(sp-flt spt-scale-x (meters 1.22))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 128.0)
|
||||
(sp-flt spt-g 128.0)
|
||||
@@ -2191,7 +2191,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; customized
|
||||
(defpartgroup group-money-starburst :id 64 :bounds (static-bspherem 0 0.5 0 1.5) :parts ((sp-item 238)))
|
||||
|
||||
(defpartgroup group-buzzer-effect
|
||||
|
||||
+626
-776
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user