mirror of
https://github.com/pret/pokediamond.git
synced 2024-10-07 11:13:24 +00:00
cleanup + scrcmd
This commit is contained in:
parent
e4c1bde3e7
commit
be8ff53ceb
2
Makefile
2
Makefile
@ -104,7 +104,7 @@ OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -ipa file -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/MSL_C/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -ipa file -fp soft -lang c99 -Cpp_exceptions off -inline on,noauto -i include -ir include-mw -ir arm9/lib/MSL_C/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -map -nodead -w off -proc v5te -interworking -map -symtab -m _start -msgstyle gcc
|
||||
|
||||
####################### Other Tools #########################
|
||||
|
@ -97,7 +97,7 @@ OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm7_thumb.s -o arm7.o
|
||||
MWASFLAGS = -proc arm4t -i ..
|
||||
MWCFLAGS = -O4,s -proc arm7tdmi -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,s -proc arm7tdmi -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -inline on,noauto -i ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -map -nodead -w off -proc v4t -interworking -map -symtab -m _start -msgstyle gcc
|
||||
|
||||
####################### Other Tools #########################
|
||||
|
@ -117,8 +117,8 @@ ASM_PROCESSOR := $(ASM_PROCESSOR_DIR)/compile.sh
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te -i ../include -i .. -D$(GAME_VERSION) -D$(GAME_LANGUAGE)
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -ipa file -fp soft -lang c99 -Cpp_exceptions off $(foreach dir,$(INCLUDE_DIRS),-i $(dir)) $(foreach dir,$(INCLUDE_RECURSIVE_DIRS),-ir $(dir)) -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCXXFLAGS = -O4,p -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off $(foreach dir,$(INCLUDE_DIRS),-i $(dir)) $(foreach dir,$(INCLUDE_RECURSIVE_DIRS),-ir $(dir)) -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -ipa file -fp soft -lang c99 -Cpp_exceptions off -inline on,noauto $(foreach dir,$(INCLUDE_DIRS),-i $(dir)) $(foreach dir,$(INCLUDE_RECURSIVE_DIRS),-ir $(dir)) -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCXXFLAGS = -O4,p -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -inline on,noauto $(foreach dir,$(INCLUDE_DIRS),-i $(dir)) $(foreach dir,$(INCLUDE_RECURSIVE_DIRS),-ir $(dir)) -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -w off -proc v5te -interworking -map closure,unused -symtab sort -m _start -msgstyle gcc
|
||||
LIBS := -Llib -lsyscall
|
||||
ARFLAGS = rcS
|
||||
@ -204,7 +204,7 @@ ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS) $(LIB
|
||||
|
||||
# TODO: Move out to lib/Makefile
|
||||
$(BUILD_DIR)/lib/%.o: MWCCVERSION = 1.2/sp2p3
|
||||
$(BUILD_DIR)/lib/%.o: MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
$(BUILD_DIR)/lib/%.o: MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -inline on,noauto -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
|
||||
$(BUILD_DIR)/lib/libnns/%.o: MWCCVERSION = 1.2/sp3
|
||||
$(BUILD_DIR)/lib/MSL_C/%.o: MWCCVERSION = 2.0/sp1
|
||||
|
@ -551,7 +551,7 @@ Static arm9
|
||||
Object MSL_ARM_critical_regions_NITRO.o
|
||||
Object MSL_ARM_math.o
|
||||
Object MSL_Common_ansi_files.o
|
||||
Object MSL_Common_arith.o
|
||||
Object arith.o
|
||||
Object MSL_Common_assert.o
|
||||
Object MSL_Common_buffer_io.o
|
||||
Object MSL_Common_ctype.o
|
||||
@ -565,7 +565,7 @@ Static arm9
|
||||
Object MSL_Common_mem_funcs.o
|
||||
Object MSL_Common_printf.o
|
||||
Object MSL_Common_qsort.o
|
||||
Object MSL_Common_rand.o
|
||||
Object rand.o
|
||||
Object MSL_Common_scanf.o
|
||||
Object MSL_Common_signal.o
|
||||
Object MSL_Common_string.o
|
||||
|
@ -9,194 +9,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start ScrCmd_Unk0265
|
||||
ScrCmd_Unk0265: ; 0x0203F00C
|
||||
push {r3, lr}
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
ldr r0, [r0, #0xc]
|
||||
bl Save_VarsFlags_Get
|
||||
bl sub_0205F1C4
|
||||
mov r0, #0x0
|
||||
pop {r3, pc}
|
||||
|
||||
thumb_func_start ScrCmd_Unk0266
|
||||
ScrCmd_Unk0266: ; 0x0203F020
|
||||
push {r3, lr}
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
ldr r0, [r0, #0xc]
|
||||
bl Save_VarsFlags_Get
|
||||
bl sub_0205F1D4
|
||||
mov r0, #0x0
|
||||
pop {r3, pc}
|
||||
|
||||
thumb_func_start ScrCmd_Unk0267
|
||||
ScrCmd_Unk0267: ; 0x0203F034
|
||||
push {r4, lr}
|
||||
add r4, r0, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r4, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl VarGet
|
||||
add r4, #0x80
|
||||
add r1, r0, #0x0
|
||||
ldr r0, [r4, #0x0]
|
||||
ldr r0, [r0, #0x10]
|
||||
bl sub_020389CC
|
||||
mov r0, #0x1
|
||||
pop {r4, pc}
|
||||
|
||||
thumb_func_start ScrCmd_Unk0268
|
||||
ScrCmd_Unk0268: ; 0x0203F058
|
||||
push {r3-r5, lr}
|
||||
add r4, r0, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r4, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl GetVarPointer
|
||||
add r4, #0x80
|
||||
add r5, r0, #0x0
|
||||
ldr r0, [r4, #0x0]
|
||||
bl Script_GetHour
|
||||
strh r0, [r5, #0x0]
|
||||
mov r0, #0x0
|
||||
pop {r3-r5, pc}
|
||||
|
||||
thumb_func_start ScrCmd_Unk0269
|
||||
ScrCmd_Unk0269: ; 0x0203F07C
|
||||
push {r3-r7, lr}
|
||||
sub sp, #0x10
|
||||
add r5, r0, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl VarGet
|
||||
add r7, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl VarGet
|
||||
str r0, [sp, #0xc]
|
||||
add r0, r5, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl VarGet
|
||||
str r0, [sp, #0x8]
|
||||
add r0, r5, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl VarGet
|
||||
add r6, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl VarGet
|
||||
add r4, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
add r1, r7, #0x0
|
||||
ldr r0, [r0, #0x34]
|
||||
bl GetMapObjectByID
|
||||
add r7, r0, #0x0
|
||||
bne _0203F0FA
|
||||
bl GF_AssertFail
|
||||
_0203F0FA:
|
||||
str r6, [sp, #0x0]
|
||||
str r4, [sp, #0x4]
|
||||
ldr r0, [r5, #0x74]
|
||||
ldr r2, [sp, #0xc]
|
||||
ldr r3, [sp, #0x8]
|
||||
add r1, r7, #0x0
|
||||
bl sub_02054F50
|
||||
mov r0, #0x1
|
||||
add sp, #0x10
|
||||
pop {r3-r7, pc}
|
||||
|
||||
thumb_func_start ScrCmd_Unk026A
|
||||
ScrCmd_Unk026A: ; 0x0203F110
|
||||
push {r3-r7, lr}
|
||||
add r4, r0, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r4, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl VarGet
|
||||
add r5, r0, #0x0
|
||||
add r0, r4, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r4, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl VarGet
|
||||
add r7, r0, #0x0
|
||||
add r0, r4, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r4, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl VarGet
|
||||
add r6, r0, #0x0
|
||||
add r0, r4, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
add r1, r5, #0x0
|
||||
ldr r0, [r0, #0x34]
|
||||
bl GetMapObjectByID
|
||||
add r5, r0, #0x0
|
||||
bne _0203F164
|
||||
bl GF_AssertFail
|
||||
_0203F164:
|
||||
ldr r0, [r4, #0x74]
|
||||
add r1, r5, #0x0
|
||||
add r2, r7, #0x0
|
||||
add r3, r6, #0x0
|
||||
bl sub_0205502C
|
||||
mov r0, #0x1
|
||||
pop {r3-r7, pc}
|
||||
|
||||
thumb_func_start ScrCmd_Unk026B
|
||||
ScrCmd_Unk026B: ; 0x0203F174
|
||||
push {r3-r5, lr}
|
||||
add r5, r0, #0x0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0, #0x0]
|
||||
bl GetVarPointer
|
||||
add r5, #0x80
|
||||
add r4, r0, #0x0
|
||||
ldr r0, [r5, #0x0]
|
||||
ldr r0, [r0, #0xc]
|
||||
bl sub_02054E30
|
||||
strh r0, [r4, #0x0]
|
||||
mov r0, #0x0
|
||||
pop {r3-r5, pc}
|
||||
.balign 4
|
||||
|
||||
thumb_func_start ScrCmd_Unk026C
|
||||
ScrCmd_Unk026C: ; 0x0203F19C
|
||||
push {r4-r7, lr}
|
||||
|
@ -764,11 +764,11 @@ gScriptCmdTable: ; 0x020F355C
|
||||
.word ScrCmd_CheckBurmyForms
|
||||
.word ScrCmd_Unk0265
|
||||
.word ScrCmd_Unk0266
|
||||
.word ScrCmd_Unk0267
|
||||
.word ScrCmd_Unk0268
|
||||
.word ScrCmd_Unk0269
|
||||
.word ScrCmd_Unk026A
|
||||
.word ScrCmd_Unk026B
|
||||
.word ScrCmd_SlotMachine
|
||||
.word ScrCmd_GetHour
|
||||
.word ScrCmd_ShakeEvent
|
||||
.word ScrCmd_BlinkEvent
|
||||
.word ScrCmd_CheckRegis
|
||||
.word ScrCmd_Unk026C
|
||||
.word ScrCmd_MessageUnown
|
||||
.word ScrCmd_Unk026E
|
||||
|
@ -319,8 +319,8 @@ _02054E28:
|
||||
.balign 4
|
||||
_02054E2C: .word 0x00000000
|
||||
|
||||
thumb_func_start sub_02054E30
|
||||
sub_02054E30: ; 0x02054E30
|
||||
thumb_func_start Save_PlayerHasAllRegisInParty
|
||||
Save_PlayerHasAllRegisInParty: ; 0x02054E30
|
||||
push {r3-r7, lr}
|
||||
sub sp, #0x10
|
||||
mov r7, #0x0
|
||||
|
@ -3067,11 +3067,11 @@
|
||||
.extern ScrCmd_CheckBurmyForms
|
||||
.extern ScrCmd_Unk0265
|
||||
.extern ScrCmd_Unk0266
|
||||
.extern ScrCmd_Unk0267
|
||||
.extern ScrCmd_Unk0268
|
||||
.extern ScrCmd_Unk0269
|
||||
.extern ScrCmd_Unk026A
|
||||
.extern ScrCmd_Unk026B
|
||||
.extern ScrCmd_SlotMachine
|
||||
.extern ScrCmd_GetHour
|
||||
.extern ScrCmd_ShakeEvent
|
||||
.extern ScrCmd_BlinkEvent
|
||||
.extern ScrCmd_CheckRegis
|
||||
.extern ScrCmd_Unk026C
|
||||
.extern ScrCmd_Unk026E
|
||||
.extern ScrCmd_Unk026F
|
||||
@ -3889,7 +3889,7 @@
|
||||
.extern sub_02054CC8
|
||||
.extern sub_02054D1C
|
||||
.extern sub_02054DEC
|
||||
.extern sub_02054E30
|
||||
.extern Save_PlayerHasAllRegisInParty
|
||||
.extern sub_02054F50
|
||||
.extern sub_0205502C
|
||||
.extern sub_02055068
|
||||
|
@ -54,7 +54,7 @@ OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te -ir ../../..
|
||||
MWCFLAGS = O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error -ipa file
|
||||
MWCFLAGS = O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -inline on,noauto -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error -ipa file
|
||||
MWLDFLAGS = -library -nodead -w off -proc v5te -interworking -pic
|
||||
ARFLAGS = rcS
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
//include all msl files here
|
||||
|
||||
#include "string.h"
|
||||
#include "MSL_Common_arith.h"
|
||||
#include "MSL_Common_rand.h"
|
||||
#include "arith.h"
|
||||
#include "rand.h"
|
||||
|
||||
#endif //MSL_H
|
||||
|
@ -1,8 +0,0 @@
|
||||
#ifndef MSL_COMMON_ARITH_H
|
||||
#define MSL_COMMON_ARITH_H
|
||||
|
||||
#include "nitro/types.h"
|
||||
|
||||
s32 abs(s32 val);
|
||||
|
||||
#endif //MSL_COMMON_ARITH_H
|
@ -1,9 +0,0 @@
|
||||
#ifndef MSL_COMMON_RAND_H
|
||||
#define MSL_COMMON_RAND_H
|
||||
|
||||
#include "nitro/types.h"
|
||||
|
||||
s32 rand(void);
|
||||
void srand(u32 seed);
|
||||
|
||||
#endif // MSL_COMMON_RAND_H
|
@ -1,5 +1,5 @@
|
||||
#ifndef _MSL_MSLEXTERN_H
|
||||
#define _MSL_MSLEXTERN_H
|
||||
#ifndef POKEDIAMOND_MSL_C_ANSI_PARAMS_H
|
||||
#define POKEDIAMOND_MSL_C_ANSI_PARAMS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define _MSL_BEGIN_NAMESPACE_STD namespace std {
|
||||
@ -13,4 +13,4 @@
|
||||
#define _MSL_END_NAMESPACE_STD
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //_MSL_MSLEXTERN_H
|
||||
#endif //POKEDIAMOND_MSL_C_ANSI_PARAMS_H
|
||||
|
6
arm9/lib/MSL_C/include/arith.h
Normal file
6
arm9/lib/MSL_C/include/arith.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef POKEDIAMOND_MSL_C_ARITH_H
|
||||
#define POKEDIAMOND_MSL_C_ARITH_H
|
||||
|
||||
int abs(int val);
|
||||
|
||||
#endif //POKEDIAMOND_MSL_C_ARITH_H
|
7
arm9/lib/MSL_C/include/rand.h
Normal file
7
arm9/lib/MSL_C/include/rand.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef POKEDIAMOND_MSL_RAND_H
|
||||
#define POKEDIAMOND_MSL_RAND_H
|
||||
|
||||
int rand(void);
|
||||
void srand(unsigned int seed);
|
||||
|
||||
#endif // POKEDIAMOND_MSL_RAND_H
|
@ -1,5 +1,5 @@
|
||||
#ifndef _MSL_SIZE_T_H
|
||||
#define _MSL_SIZE_T_H
|
||||
#ifndef POKEDIAMOND_MSL_C_SIZE_T_H
|
||||
#define POKEDIAMOND_MSL_C_SIZE_T_H
|
||||
|
||||
#include "ansi_params.h"
|
||||
|
||||
@ -11,4 +11,4 @@ typedef __typeof__(sizeof(0)) size_t;
|
||||
_MSL_END_EXTERN_C
|
||||
_MSL_END_NAMESPACE_STD
|
||||
|
||||
#endif //_MSL_SIZE_T_H
|
||||
#endif //POKEDIAMOND_MSL_C_SIZE_T_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef GUARD_MSL_STRING_H
|
||||
#define GUARD_MSL_STRING_H
|
||||
#ifndef POKEDIAMOND_MSL_C_STRING_H
|
||||
#define POKEDIAMOND_MSL_C_STRING_H
|
||||
|
||||
#include "ansi_params.h"
|
||||
#include "size_t.h"
|
||||
@ -12,17 +12,17 @@ void *memmove(void *dest, const void *src, size_t size);
|
||||
void *memcpy(void *dest, const void *src, size_t size);
|
||||
void *memchr(const void *arr, int value, size_t size);
|
||||
int memcmp(const void *a, const void *b, size_t size);
|
||||
signed char *strcpy(signed char *dest, const signed char *src);
|
||||
unsigned strlen(const signed char *str);
|
||||
signed char *strncpy(signed char *dest, const signed char *src, size_t n);
|
||||
int strcmp(const signed char *a, const signed char *b);
|
||||
signed char *strcat(signed char *dest, const signed char *src);
|
||||
signed char *strncat(signed char *dest, const signed char *src, size_t n);
|
||||
unsigned strspn(const signed char *a, const signed char *b);
|
||||
signed char *strtok(signed char *str, const signed char *sep);
|
||||
signed char *strstr(const signed char *haystack, const signed char *needle);
|
||||
char *strcpy(char *dest, const char *src);
|
||||
unsigned strlen(const char *str);
|
||||
char *strncpy(char *dest, const char *src, size_t n);
|
||||
int strcmp(const char *a, const char *b);
|
||||
char *strcat(char *dest, const char *src);
|
||||
char *strncat(char *dest, const char *src, size_t n);
|
||||
unsigned strspn(const char *a, const char *b);
|
||||
char *strtok(char *str, const char *sep);
|
||||
char *strstr(const char *haystack, const char *needle);
|
||||
|
||||
_MSL_END_EXTERN_C
|
||||
_MSL_END_NAMESPACE_STD
|
||||
|
||||
#endif //GUARD_MSL_STRING_H
|
||||
#endif //POKEDIAMOND_MSL_C_STRING_H
|
||||
|
@ -1,8 +0,0 @@
|
||||
#include "MSL_Common_arith.h"
|
||||
#include "nitro/types.h"
|
||||
#include "code32.h"
|
||||
|
||||
s32 abs(s32 val)
|
||||
{
|
||||
return val < 0 ? -val : val;
|
||||
}
|
6
arm9/lib/MSL_C/src/arith.c
Normal file
6
arm9/lib/MSL_C/src/arith.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "arith.h"
|
||||
#include "code32.h"
|
||||
|
||||
int abs(int val) {
|
||||
return val < 0 ? -val : val;
|
||||
}
|
@ -1,15 +1,13 @@
|
||||
#include "MSL_Common_rand.h"
|
||||
#include "rand.h"
|
||||
#include "code32.h"
|
||||
|
||||
static u32 random_next = 1;
|
||||
static unsigned long int random_next = 1;
|
||||
|
||||
s32 rand(void)
|
||||
{
|
||||
int rand(void) {
|
||||
random_next = random_next * 1103515245 + 12345;
|
||||
return ((random_next >> 16) & 0x7fff);
|
||||
}
|
||||
|
||||
void srand(u32 seed)
|
||||
{
|
||||
void srand(unsigned int seed) {
|
||||
random_next = seed;
|
||||
}
|
@ -54,7 +54,7 @@ OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te -ir ../..
|
||||
MWCFLAGS = -O4,p -char signed -inline on,noauto -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/MSL_C/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,p -inline on,noauto -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/MSL_C/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -library -nodead -w off -proc v5te -interworking -pic -msgstyle gcc
|
||||
ARFLAGS = rcS
|
||||
|
||||
|
@ -54,7 +54,7 @@ OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te -ir ../../..
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -inline on,noauto -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -library -nodead -w off -proc v5te -interworking -pic -msgstyle gcc
|
||||
ARFLAGS = rcS
|
||||
|
||||
|
@ -55,7 +55,7 @@ OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te -ir ../../..
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -inline on,noauto -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -library -nodead -w off -proc v5te -interworking -pic -msgstyle gcc
|
||||
ARFLAGS = rcS
|
||||
|
||||
|
@ -349,6 +349,10 @@ extern void sub_020649D4(FieldSystem *fieldSystem);
|
||||
extern BOOL sub_020649B0(FieldSystem *fieldSystem);
|
||||
extern void ov06_0224E764(FieldSystem *fieldSystem);
|
||||
extern void ov06_0224E7C4(FieldSystem *fieldSystem);
|
||||
extern void sub_020389CC(TaskManager *taskManager, u16 param1);
|
||||
extern void sub_02054F50(TaskManager *taskManager, LocalMapObject *mapObject, u16 count, u16 frames, u16 x, u16 y);
|
||||
extern void sub_0205502C(TaskManager *taskManager, LocalMapObject *mapObject, u16 count, u16 frames);
|
||||
extern u16 Save_PlayerHasAllRegisInParty(SaveData *saveData);
|
||||
|
||||
u8 UNK_021C5A0C[4];
|
||||
|
||||
@ -4272,4 +4276,54 @@ _0203EFFC:
|
||||
add sp, #0x30
|
||||
pop {r3-r7, pc}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
BOOL ScrCmd_Unk0265(ScriptContext *ctx) { //0265
|
||||
sub_0205F1C4(Save_VarsFlags_Get(ctx->fieldSystem->saveData));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_Unk0266(ScriptContext *ctx) { //0266
|
||||
sub_0205F1D4(Save_VarsFlags_Get(ctx->fieldSystem->saveData));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_SlotMachine(ScriptContext *ctx) { //0267
|
||||
u16 unk0 = ScriptGetVar(ctx);
|
||||
sub_020389CC(ctx->fieldSystem->taskManager, unk0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetHour(ScriptContext *ctx) { //0268
|
||||
u16 *var = ScriptGetVarPointer(ctx);
|
||||
*var = Script_GetHour(ctx->fieldSystem);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_ShakeEvent(ScriptContext *ctx) { //0269
|
||||
u16 eventId = ScriptGetVar(ctx);
|
||||
u16 count = ScriptGetVar(ctx);
|
||||
u16 frames = ScriptGetVar(ctx);
|
||||
u16 x = ScriptGetVar(ctx);
|
||||
u16 y = ScriptGetVar(ctx);
|
||||
LocalMapObject *mapObject = GetMapObjectByID(ctx->fieldSystem->mapObjectManager, eventId);
|
||||
GF_ASSERT(mapObject != NULL);
|
||||
sub_02054F50(ctx->taskManager, mapObject, count, frames, x, y);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_BlinkEvent(ScriptContext *ctx) { //026A
|
||||
u16 eventId = ScriptGetVar(ctx);
|
||||
u16 count = ScriptGetVar(ctx);
|
||||
u16 frames = ScriptGetVar(ctx);
|
||||
LocalMapObject *mapObject = GetMapObjectByID(ctx->fieldSystem->mapObjectManager, eventId);
|
||||
GF_ASSERT(mapObject != NULL);
|
||||
sub_0205502C(ctx->taskManager, mapObject, count, frames);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_CheckRegis(ScriptContext *ctx) { //026B
|
||||
u16 *var = ScriptGetVarPointer(ctx);
|
||||
*var = Save_PlayerHasAllRegisInParty(ctx->fieldSystem->saveData);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -401,6 +401,13 @@ BOOL ScrCmd_AddSpecialGameStat(ScriptContext *ctx);
|
||||
BOOL ScrCmd_CheckPokemonInParty(ScriptContext *ctx);
|
||||
BOOL ScrCmd_SetDeoxysForm(ScriptContext *ctx);
|
||||
BOOL ScrCmd_CheckBurmyForms(ScriptContext *ctx);
|
||||
BOOL ScrCmd_Unk0265(ScriptContext *ctx);
|
||||
BOOL ScrCmd_Unk0266(ScriptContext *ctx);
|
||||
BOOL ScrCmd_SlotMachine(ScriptContext *ctx);
|
||||
BOOL ScrCmd_GetHour(ScriptContext *ctx);
|
||||
BOOL ScrCmd_ShakeEvent(ScriptContext *ctx);
|
||||
BOOL ScrCmd_BlinkEvent(ScriptContext *ctx);
|
||||
BOOL ScrCmd_CheckRegis(ScriptContext *ctx);
|
||||
|
||||
// scrcmd_mart.c
|
||||
BOOL ScrCmd_NormalMart(ScriptContext *ctx);
|
||||
|
@ -127,13 +127,13 @@ case "$mode" in
|
||||
$MYDIR/ntruncompbw $basefile $vma $((vma+compsize)) || { rm -f $basefile; exit 1; }
|
||||
}
|
||||
}
|
||||
buildfile=$builddir/MODULE_${overlay}.sbin
|
||||
buildfile=$builddir/OVERLAY_${overlay}.sbin
|
||||
;;
|
||||
static)
|
||||
case $proc in
|
||||
armv4t)
|
||||
romtab=48
|
||||
compname=ichneumon_sub
|
||||
compname=arm7
|
||||
;;
|
||||
armv5te)
|
||||
romtab=32
|
||||
|
Loading…
Reference in New Issue
Block a user