mirror of
https://github.com/open-goal/jak-project
synced 2026-09-02 18:12:50 -04:00
jak1: put the auto-splitting marker in C++ so it can be quickly found (#1791)
This commit is contained in:
@@ -292,6 +292,8 @@ void InitIOP() {
|
||||
}
|
||||
}
|
||||
|
||||
AutoSplitterBlock gAutoSplitterBlock;
|
||||
|
||||
/*!
|
||||
* Initialize GOAL Runtime. This is the main initialization which is called before entering
|
||||
* the GOAL kernel dispatch loop (KernelCheckAndDispatch).
|
||||
@@ -354,6 +356,10 @@ int InitMachine() {
|
||||
return goal_status;
|
||||
}
|
||||
|
||||
// TODO - better place to put this?
|
||||
gAutoSplitterBlock.pointer_to_symbol =
|
||||
(u64)g_ee_main_mem + intern_from_c("*autosplit-info-jak1*")->value;
|
||||
|
||||
lg::info("InitListenerConnect");
|
||||
InitListenerConnect();
|
||||
lg::info("InitCheckListener");
|
||||
|
||||
@@ -39,4 +39,13 @@ struct DiscordInfo {
|
||||
u32 flutflut; // are we riding on flut flut?
|
||||
u32 time_of_day;
|
||||
};
|
||||
|
||||
// To speedup finding the auto-splitter block in GOAL memory
|
||||
// all this has is a marker for LiveSplit to find, and then the pointer
|
||||
// to the symbol
|
||||
struct AutoSplitterBlock {
|
||||
const char marker[20] = "UnLiStEdStRaTs_JaK1";
|
||||
u64 pointer_to_symbol = 0;
|
||||
};
|
||||
extern AutoSplitterBlock gAutoSplitterBlock;
|
||||
} // namespace jak1
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
;;
|
||||
;; DO NOT change the order, appending to the end is safe!
|
||||
(deftype autosplit-info-jak1 (structure)
|
||||
((marker uint8 20) ;; UnLiStEdStRaTs_JaK1 - DONT EVER CHANGE THIS
|
||||
;; General stats
|
||||
(;; General stats
|
||||
(num-power-cells uint32)
|
||||
(num-orbs uint32)
|
||||
(num-scout-flies uint32)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
(define *autosplit-info-jak1* (new 'static 'autosplit-info-jak1))
|
||||
;; Setup markers
|
||||
(charp<-string (-> *autosplit-info-jak1* marker) "UnLiStEdStRaTs_JaK1")
|
||||
(charp<-string (-> *autosplit-info-jak1* end-marker) "end")
|
||||
;; Setup Padding
|
||||
(charp<-string (-> *autosplit-info-jak1* padding-stats) "padding-stats!")
|
||||
|
||||
Reference in New Issue
Block a user