mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-30 06:12:17 -05:00
Decomp LoadScriptVariableValueString
This commit is contained in:
@@ -439,7 +439,7 @@
|
||||
.public sub_0200D310
|
||||
.public sub_02025480
|
||||
.public sub_020257FC
|
||||
.public sub_0204BBB0
|
||||
.public LoadScriptVariableValueString
|
||||
.public sub_0204E530
|
||||
.public sub_0204F6F8
|
||||
.public sub_0204F77C
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
.public LoadScriptVariableRaw
|
||||
.public LoadScriptVariableValue
|
||||
.public LoadScriptVariableValueAtIndex
|
||||
.public LoadScriptVariableValueBytes
|
||||
.public MemcpySimple
|
||||
.public RandInt
|
||||
.public SCRIPT_VARS_VALUES
|
||||
@@ -19157,7 +19157,7 @@ _02023E18:
|
||||
add r1, sp, #2
|
||||
mov r0, #0x3f
|
||||
mov r2, #0xa
|
||||
bl sub_0204BBB0
|
||||
bl LoadScriptVariableValueString
|
||||
add r0, sp, #0x42
|
||||
add r1, sp, #2
|
||||
mov r2, #0xa
|
||||
@@ -19169,7 +19169,7 @@ _02023E44:
|
||||
add r1, sp, #2
|
||||
mov r0, #0x41
|
||||
mov r2, #0xa
|
||||
bl sub_0204BBB0
|
||||
bl LoadScriptVariableValueString
|
||||
add r0, sp, #0x42
|
||||
add r1, sp, #2
|
||||
mov r2, #0xa
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "main_0204BBB0.inc"
|
||||
.include "main_0204BBCC.inc"
|
||||
|
||||
.text
|
||||
|
||||
arm_func_start sub_0204BBB0
|
||||
sub_0204BBB0: ; 0x0204BBB0
|
||||
stmdb sp!, {r3, r4, r5, lr}
|
||||
mov r5, r1
|
||||
mov r4, r2
|
||||
bl LoadScriptVariableValueBytes
|
||||
mov r0, #0
|
||||
strb r0, [r5, r4]
|
||||
ldmia sp!, {r3, r4, r5, pc}
|
||||
arm_func_end sub_0204BBB0
|
||||
|
||||
arm_func_start SaveScriptVariableValueBytes
|
||||
SaveScriptVariableValueBytes: ; 0x0204BBCC
|
||||
stmdb sp!, {r3, r4, r5, lr}
|
||||
@@ -38,5 +38,6 @@ void SaveScriptVariableValue(union script_var_value sv_locals[], const enum scri
|
||||
void SaveScriptVariableValueAtIndex(union script_var_value sv_locals[], const enum script_var_id script_var_id, int idx, s32 new_val);
|
||||
s32 LoadScriptVariableValueSum(union script_var_value sv_local[], const enum script_var_id sv_id);
|
||||
void LoadScriptVariableValueBytes(const enum script_var_id sv_id, u8* result, s32 num_bytes);
|
||||
void LoadScriptVariableValueString(const enum script_var_id sv_id, u8* result, u8 num_bytes);
|
||||
|
||||
#endif //PMDSKY_SCRIPTING_H
|
||||
|
||||
2
main.lsf
2
main.lsf
@@ -81,7 +81,7 @@ Static main
|
||||
Object src/main_0204AFF8.o
|
||||
Object asm/main_0204B018.o
|
||||
Object src/scripting.o
|
||||
Object asm/main_0204BBB0.o
|
||||
Object asm/main_0204BBCC.o
|
||||
Object src/main_0204C938.o
|
||||
Object asm/main_0204C94C.o
|
||||
Object src/dungeon_recruitment_3.o
|
||||
|
||||
@@ -317,3 +317,9 @@ void LoadScriptVariableValueBytes(const enum script_var_id sv_id, u8* result, s3
|
||||
result += 1;
|
||||
}
|
||||
}
|
||||
|
||||
void LoadScriptVariableValueString(const enum script_var_id sv_id, u8* result, u8 num_bytes)
|
||||
{
|
||||
LoadScriptVariableValueBytes(sv_id, result, num_bytes);
|
||||
result[num_bytes] = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user