Change back string.c/h, fix m434Dll, work on m433Dll/player.c (#530)

* Change back string.h as the change breaks things

* Fix m434Dll

* Work on m433Dll/player.c
This commit is contained in:
dbalatoni13 2025-01-14 22:36:09 +01:00 committed by GitHub
parent 58925bcf5d
commit c621824464
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 4113 additions and 31 deletions

View file

@ -242,7 +242,7 @@ lbl_1_rodata_34C = .rodata:0x0000034C; // type:object size:0x4 scope:local data:
lbl_1_rodata_350 = .rodata:0x00000350; // type:object size:0x8 scope:local data:double lbl_1_rodata_350 = .rodata:0x00000350; // type:object size:0x8 scope:local data:double
lbl_1_rodata_358 = .rodata:0x00000358; // type:object size:0x4 scope:local data:float lbl_1_rodata_358 = .rodata:0x00000358; // type:object size:0x4 scope:local data:float
lbl_1_rodata_360 = .rodata:0x00000360; // type:object size:0x8 scope:local data:double lbl_1_rodata_360 = .rodata:0x00000360; // type:object size:0x8 scope:local data:double
lbl_1_rodata_368 = .rodata:0x00000368; // type:object size:0x10 scope:local data:4byte lbl_1_rodata_368 = .rodata:0x00000368; // type:object size:0x10 scope:local data:float
lbl_1_rodata_378 = .rodata:0x00000378; // type:object size:0x4 scope:local data:float lbl_1_rodata_378 = .rodata:0x00000378; // type:object size:0x4 scope:local data:float
lbl_1_rodata_37C = .rodata:0x0000037C; // type:object size:0x4 scope:local data:float lbl_1_rodata_37C = .rodata:0x0000037C; // type:object size:0x4 scope:local data:float
lbl_1_rodata_380 = .rodata:0x00000380; // type:object size:0x4 scope:local data:float lbl_1_rodata_380 = .rodata:0x00000380; // type:object size:0x4 scope:local data:float
@ -264,8 +264,8 @@ lbl_1_rodata_3D0 = .rodata:0x000003D0; // type:object size:0x8 scope:local data:
lbl_1_rodata_3D8 = .rodata:0x000003D8; // type:object size:0x8 scope:local data:double lbl_1_rodata_3D8 = .rodata:0x000003D8; // type:object size:0x8 scope:local data:double
lbl_1_rodata_3E0 = .rodata:0x000003E0; // type:object size:0x4 scope:local data:float lbl_1_rodata_3E0 = .rodata:0x000003E0; // type:object size:0x4 scope:local data:float
lbl_1_rodata_3E8 = .rodata:0x000003E8; // type:object size:0x8 scope:local data:double lbl_1_rodata_3E8 = .rodata:0x000003E8; // type:object size:0x8 scope:local data:double
lbl_1_rodata_3F0 = .rodata:0x000003F0; // type:object size:0x18 scope:local data:4byte lbl_1_rodata_3F0 = .rodata:0x000003F0; // type:object size:0x18 scope:local data:float
lbl_1_rodata_408 = .rodata:0x00000408; // type:object size:0x18 scope:local data:4byte lbl_1_rodata_408 = .rodata:0x00000408; // type:object size:0x18 scope:local data:float
lbl_1_rodata_420 = .rodata:0x00000420; // type:object size:0x4 scope:local data:float lbl_1_rodata_420 = .rodata:0x00000420; // type:object size:0x4 scope:local data:float
lbl_1_rodata_424 = .rodata:0x00000424; // type:object size:0x4 scope:local data:float lbl_1_rodata_424 = .rodata:0x00000424; // type:object size:0x4 scope:local data:float
lbl_1_rodata_428 = .rodata:0x00000428; // type:object size:0x4 scope:local data:float lbl_1_rodata_428 = .rodata:0x00000428; // type:object size:0x4 scope:local data:float
@ -311,7 +311,7 @@ lbl_1_rodata_4D0 = .rodata:0x000004D0; // type:object size:0x4 scope:local data:
lbl_1_rodata_4D4 = .rodata:0x000004D4; // type:object size:0x4 scope:local data:float lbl_1_rodata_4D4 = .rodata:0x000004D4; // type:object size:0x4 scope:local data:float
lbl_1_rodata_4D8 = .rodata:0x000004D8; // type:object size:0x8 scope:local data:double lbl_1_rodata_4D8 = .rodata:0x000004D8; // type:object size:0x8 scope:local data:double
lbl_1_rodata_4E0 = .rodata:0x000004E0; // type:object size:0x8 scope:local data:double lbl_1_rodata_4E0 = .rodata:0x000004E0; // type:object size:0x8 scope:local data:double
lbl_1_rodata_4E8 = .rodata:0x000004E8; // type:object size:0x4 scope:local data:4byte lbl_1_rodata_4E8 = .rodata:0x000004E8; // type:object size:0x8 scope:local data:4byte
lbl_1_rodata_4F0 = .rodata:0x000004F0; // type:object size:0x8 scope:local data:double lbl_1_rodata_4F0 = .rodata:0x000004F0; // type:object size:0x8 scope:local data:double
lbl_1_rodata_4F8 = .rodata:0x000004F8; // type:object size:0x8 scope:local data:double lbl_1_rodata_4F8 = .rodata:0x000004F8; // type:object size:0x8 scope:local data:double
lbl_1_rodata_500 = .rodata:0x00000500; // type:object size:0x4 scope:local data:float lbl_1_rodata_500 = .rodata:0x00000500; // type:object size:0x4 scope:local data:float
@ -441,7 +441,7 @@ lbl_1_data_5EA = .data:0x000005EA; // type:object size:0x15 scope:local data:str
lbl_1_data_5FF = .data:0x000005FF; // type:object size:0x15 scope:local data:string lbl_1_data_5FF = .data:0x000005FF; // type:object size:0x15 scope:local data:string
lbl_1_data_614 = .data:0x00000614; // type:object size:0x15 scope:local data:string lbl_1_data_614 = .data:0x00000614; // type:object size:0x15 scope:local data:string
lbl_1_data_629 = .data:0x00000629; // type:object size:0x15 scope:local data:string lbl_1_data_629 = .data:0x00000629; // type:object size:0x15 scope:local data:string
lbl_1_data_63E = .data:0x0000063E; // type:object size:0x16 lbl_1_data_63E = .data:0x0000063E; // type:object size:0x16 data:string
jumptable_1_data_654 = .data:0x00000654; // type:object size:0x20 scope:local jumptable_1_data_654 = .data:0x00000654; // type:object size:0x20 scope:local
lbl_1_data_674 = .data:0x00000674; // type:object size:0xC lbl_1_data_674 = .data:0x00000674; // type:object size:0xC
lbl_1_data_680 = .data:0x00000680; // type:object size:0x8 lbl_1_data_680 = .data:0x00000680; // type:object size:0x8

View file

@ -303,9 +303,9 @@ lbl_1_data_1DC = .data:0x000001DC; // type:object size:0x8
lbl_1_data_1E4 = .data:0x000001E4; // type:object size:0x18 lbl_1_data_1E4 = .data:0x000001E4; // type:object size:0x18
lbl_1_data_1FC = .data:0x000001FC; // type:object size:0x28 lbl_1_data_1FC = .data:0x000001FC; // type:object size:0x28
lbl_1_data_224 = .data:0x00000224; // type:object size:0x90 lbl_1_data_224 = .data:0x00000224; // type:object size:0x90
lbl_1_data_2B4 = .data:0x000002B4; // type:object size:0x3 data:string lbl_1_data_2B4 = .data:0x000002B4; // type:object size:0x3 scope:local data:string
lbl_1_data_2B7 = .data:0x000002B7; // type:object size:0x3 data:string lbl_1_data_2B7 = .data:0x000002B7; // type:object size:0x3 scope:local data:string
lbl_1_data_2BA = .data:0x000002BA; // type:object size:0x3 data:string lbl_1_data_2BA = .data:0x000002BA; // type:object size:0x3 scope:local data:string
lbl_1_data_2C0 = .data:0x000002C0; // type:object size:0x8 lbl_1_data_2C0 = .data:0x000002C0; // type:object size:0x8
lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:float lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:float
lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x4 data:4byte lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x4 data:4byte

View file

@ -187,7 +187,7 @@ lbl_1_rodata_238 = .rodata:0x00000238; // type:object size:0x8 scope:local data:
lbl_1_rodata_240 = .rodata:0x00000240; // type:object size:0x8 scope:local data:double lbl_1_rodata_240 = .rodata:0x00000240; // type:object size:0x8 scope:local data:double
lbl_1_rodata_248 = .rodata:0x00000248; // type:object size:0x4 scope:local data:float lbl_1_rodata_248 = .rodata:0x00000248; // type:object size:0x4 scope:local data:float
lbl_1_rodata_24C = .rodata:0x0000024C; // type:object size:0x4 scope:local data:float lbl_1_rodata_24C = .rodata:0x0000024C; // type:object size:0x4 scope:local data:float
lbl_1_rodata_250 = .rodata:0x00000250; // type:object size:0x4 data:float lbl_1_rodata_250 = .rodata:0x00000250; // type:object size:0x4 scope:local data:float
lbl_1_rodata_254 = .rodata:0x00000254; // type:object size:0x4 scope:local data:float lbl_1_rodata_254 = .rodata:0x00000254; // type:object size:0x4 scope:local data:float
lbl_1_rodata_258 = .rodata:0x00000258; // type:object size:0x4 scope:local data:float lbl_1_rodata_258 = .rodata:0x00000258; // type:object size:0x4 scope:local data:float
lbl_1_rodata_25C = .rodata:0x0000025C; // type:object size:0x4 scope:local data:float lbl_1_rodata_25C = .rodata:0x0000025C; // type:object size:0x4 scope:local data:float
@ -300,9 +300,9 @@ lbl_1_data_1DC = .data:0x000001DC; // type:object size:0x8
lbl_1_data_1E4 = .data:0x000001E4; // type:object size:0x18 lbl_1_data_1E4 = .data:0x000001E4; // type:object size:0x18
lbl_1_data_1FC = .data:0x000001FC; // type:object size:0x28 lbl_1_data_1FC = .data:0x000001FC; // type:object size:0x28
lbl_1_data_224 = .data:0x00000224; // type:object size:0x90 lbl_1_data_224 = .data:0x00000224; // type:object size:0x90
lbl_1_data_2B4 = .data:0x000002B4; // type:object size:0x3 data:string lbl_1_data_2B4 = .data:0x000002B4; // type:object size:0x3 scope:local data:string
lbl_1_data_2B7 = .data:0x000002B7; // type:object size:0x3 data:string lbl_1_data_2B7 = .data:0x000002B7; // type:object size:0x3 scope:local data:string
lbl_1_data_2BA = .data:0x000002BA; // type:object size:0x3 data:string lbl_1_data_2BA = .data:0x000002BA; // type:object size:0x3 scope:local data:string
lbl_1_data_2C0 = .data:0x000002C0; // type:object size:0x8 lbl_1_data_2C0 = .data:0x000002C0; // type:object size:0x8
lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:float lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:float
lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x4 data:4byte lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x4 data:4byte

View file

@ -1131,7 +1131,7 @@ config.libs = [
objects={ objects={
Object(Matching, "REL/m434Dll/main.c"), Object(Matching, "REL/m434Dll/main.c"),
Object(Matching, "REL/m434Dll/map.c"), Object(Matching, "REL/m434Dll/map.c"),
Object(NonMatching, "REL/m434Dll/player.c"), Object(Matching, "REL/m434Dll/player.c"),
Object(Matching, "REL/m434Dll/fish.c"), Object(Matching, "REL/m434Dll/fish.c"),
}, },
), ),

View file

@ -23,8 +23,8 @@ typedef struct M433DllWork {
void fn_1_584(omObjData *object); void fn_1_584(omObjData *object);
void fn_1_618(omObjData *object); void fn_1_618(omObjData *object);
s32 fn_1_216C(void); u32 fn_1_216C(void);
s32 fn_1_2184(void); u32 fn_1_2184(void);
void fn_1_219C(s32 arg0, s32 arg1, s32 arg2); void fn_1_219C(s32 arg0, s32 arg1, s32 arg2);
void fn_1_21E4(s32 arg0); void fn_1_21E4(s32 arg0);
void fn_1_2214(s32 arg0); void fn_1_2214(s32 arg0);

View file

@ -1,22 +1,11 @@
#ifndef _STRING_H_ #ifndef _STRING_H_
#define _STRING_H_ #define _STRING_H_
#include "stddef.h" typedef unsigned long size_t;
#ifdef __MWERKS__ void* memcpy(void* dst, const void* src, size_t n);
__declspec(section ".init") void* memcpy(void* dest, const void* src, size_t n); void* memset(void* dst, int val, size_t n);
__declspec(section ".init") void __fill_mem(void* dest, int val, size_t count);
__declspec(section ".init") void* memset(void* dest, int val, size_t count);
#else
void* memcpy(void* dest, const void* src, size_t n);
void __fill_mem(void* dest, int val, size_t count);
void* memset(void* dest, int val, size_t count);
#endif
int memcmp(const void* lhs, const void* rhs, size_t count);
void* __memrchr(const void* ptr, int ch, size_t count);
void* memchr(const void* ptr, int ch, size_t count);
void* memmove(void* dst, const void* src, size_t n);
char* strrchr(const char* str, int c); char* strrchr(const char* str, int c);
char* strchr(const char* str, int c); char* strchr(const char* str, int c);
int strncmp(const char* str1, const char* str2, size_t n); int strncmp(const char* str1, const char* str2, size_t n);

View file

@ -1,4 +1,5 @@
#include "string.h" #include "string.h"
#include "stddef.h"
static int K1 = 0x80808080; static int K1 = 0x80808080;
static int K2 = 0xFEFEFEFF; static int K2 = 0xFEFEFEFF;

View file

@ -353,12 +353,12 @@ s32 fn_1_2154(void)
return OM_GET_DATA_PTR(lbl_1_bss_24, M433DllWork)->unk_0C; return OM_GET_DATA_PTR(lbl_1_bss_24, M433DllWork)->unk_0C;
} }
s32 fn_1_216C(void) u32 fn_1_216C(void)
{ {
return OM_GET_DATA_PTR(lbl_1_bss_24, M433DllWork)->unk_14; return OM_GET_DATA_PTR(lbl_1_bss_24, M433DllWork)->unk_14;
} }
s32 fn_1_2184(void) u32 fn_1_2184(void)
{ {
return OM_GET_DATA_PTR(lbl_1_bss_24, M433DllWork)->unk_24; return OM_GET_DATA_PTR(lbl_1_bss_24, M433DllWork)->unk_24;
} }

4091
src/REL/m433Dll/player.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,7 @@
#include "game/audio.h" #include "game/audio.h"
#include "game/chrman.h" #include "game/chrman.h"
#include "game/hsfman.h" #include "game/hsfman.h"
#include "game/hsfdraw.h"
#include "game/hsfmotion.h" #include "game/hsfmotion.h"
#include "game/object.h" #include "game/object.h"
#include "game/objsub.h" #include "game/objsub.h"