src/core1: improvments and renamings on various files, added some header files

neue Datei:     include/core1/eeprom.h
        neue Datei:     include/core1/pfsmanager.h
        neue Datei:     include/core1/ucode.h
        umbenannt:      src/core1/code_18110.c -> src/core1/eeprom.c
        umbenannt:      src/core1/code_10A00.c -> src/core1/pfsmanager.c
        umbenannt:      src/core1/code_13640.c -> src/core1/stub_13640.c
        umbenannt:      src/core1/code_1D590.c -> src/core1/stub_1D590.c
        umbenannt:      src/core1/code_18210.c -> src/core1/ucode.c
        umbenannt:      src/core1/code_EAF0.c -> src/core1/viewport.c
This commit is contained in:
mariob92
2024-10-08 18:29:28 +02:00
parent 6fb4f2b3f1
commit 737ccf97c3
40 changed files with 278 additions and 201 deletions

View File

@@ -333,7 +333,7 @@ void func_802C4C14(Actor *this){
}
else{//L802C4D24
func_8024E60C(0, sp74);
func_8024E55C(0, sp5C);
pfsManager_getControllerFaceButtonState(0, sp5C);
controller_getJoystick(0, &sp54);
switch(this->state){
case 2:

View File

@@ -376,7 +376,7 @@ void chmole_update(Actor *this){
}
}
}//L802D9F34
func_8024E55C(0, sp50); // get face buttons press counters
pfsManager_getControllerFaceButtonState(0, sp50); // get face buttons press counters
switch(this->state){
case 1://L802D9F70
this->yaw_ideal = func_80329784(this);

View File

@@ -314,7 +314,7 @@ void chMumbo_update(Actor *this) {
&& func_8028F20C()
&& func_8028EFC8()
){
func_8024E55C(0, face_buttons);
pfsManager_getControllerFaceButtonState(0, face_buttons);
if(face_buttons[FACE_BUTTON(BUTTON_B)] == 1){
if (D_8037DDF0 == TRANSFORM_7_WISHWASHY) {
this->unk38_31 = 0;

View File

@@ -1013,7 +1013,7 @@ void func_802D5628(void){
D_8037DE08 -= time_getDelta();
}
else{//L802D5B24
func_8024E55C(0, sp50); //get button inputs
pfsManager_getControllerFaceButtonState(0, sp50); //get button inputs
if(sp50[FACE_BUTTON(BUTTON_B)] == 1){
func_80324C58();
func_802D6114();

View File

@@ -138,7 +138,7 @@ void func_802E35D8(void ) {
}
} else if (D_8037E8C0.unk14 == 3) {
sp38 = 0;
func_8024E55C(0, &sp40);
pfsManager_getControllerFaceButtonState(0, &sp40);
for(i = 0; i < 6; i++){
if (sp40[i] == 1) {
sp38++;

View File

@@ -487,7 +487,7 @@ void func_80319EA4(void) {
if(D_803830E0 == NULL)
return;
func_8024E55C(0, sp58);
pfsManager_getControllerFaceButtonState(0, sp58);
controller_getJoystick(0, sp4C);
for(phi_s0 = 0; phi_s0 < 4; phi_s0++){
gczoombox_update(D_803830E0->unk24[phi_s0]);

View File

@@ -6,6 +6,7 @@
#include "core2/anim/sprite.h"
#include <core2/file.h>
#include "core2/particle.h"
#include "core1/eeprom.h"
/* .data */
extern u8 D_80370250 = 0;
@@ -38,7 +39,7 @@ void func_80334540(Gfx** gdl, Mtx **mptr, Vtx **vptr) {
return;
}
if (func_80320708() == 0) {
write_file_blocks(0, 0, 0x80BC7230, EEPROM_MAXBLOCKS);
eeprom_writeBlocks(0, 0, 0x80BC7230, EEPROM_MAXBLOCKS);
}
spawnQueue_unlock();
sky_draw(gdl, mptr, vptr);

View File

@@ -3,6 +3,7 @@
#include "variables.h"
#include "save.h"
#include "core1/eeprom.h"
typedef struct {
@@ -318,7 +319,7 @@ void __savedata_save_abilities(u8 *savedata){ //savedata_save_abilities
s32 savedata_8033CA2C(s32 filenum, SaveData *save_data){
s32 sp1C;
sp1C = load_file_blocks(filenum, 0, save_data, 0xF);
sp1C = eeprom_readBlocks(filenum, 0, save_data, 0xF);
if( sp1C
|| savedata_verify(0x78, save_data)
|| ((u8*)save_data)[baseOffset] != 0x11
@@ -331,7 +332,7 @@ s32 savedata_8033CA2C(s32 filenum, SaveData *save_data){
s32 savedata_8033CA9C(SaveData *savedata){
s32 sp1C;
sp1C = load_file_blocks(0, 0x3C, savedata, 0x4);
sp1C = eeprom_readBlocks(0, 0x3C, savedata, 0x4);
if( sp1C
|| savedata_verify(0x20, savedata)
){
@@ -384,7 +385,7 @@ void saveData_create(SaveData *savedata){
int savedata_8033CC98(s32 filenum, u8 *buffer){
int out;
out = write_file_blocks(filenum, 0, buffer, 0xF);
out = eeprom_writeBlocks(filenum, 0, buffer, 0xF);
if(out){
out = 1;
}
@@ -393,7 +394,7 @@ int savedata_8033CC98(s32 filenum, u8 *buffer){
int savedata_8033CCD0(s32 filenum){
int out;
out = write_file_blocks(filenum, 0, D_80383D18, 1);
out = eeprom_writeBlocks(filenum, 0, D_80383D18, 1);
if(out){
out = 1;
}
@@ -403,7 +404,7 @@ int savedata_8033CCD0(s32 filenum){
int savedata_8033CE40(u8 *buffer){
int out;
savedata_update_crc(buffer, sizeof(GlobalData));
out = write_file_blocks(0, 0x3C, buffer, 4);
out = eeprom_writeBlocks(0, 0x3C, buffer, 4);
if(out){
out = 1;
}

View File

@@ -1,6 +1,7 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
#include "core1/ucode.h"
f32 time_getDelta(void);
@@ -59,7 +60,7 @@ s32 item_adjustByDiff(enum item_e item, s32 diff, s32 no_hud){
oldVal = D_80385F30[item];
if(func_80255D04())
if(ucode_stub3())
diff = 0;
if(diff < 0){

View File

@@ -27,7 +27,7 @@ void func_80295448(void){
D_8037C310.unk0[0] = controller_getStartButton(0);
func_8024E60C(0, &D_8037C310.unk0[1]);
func_8024E6E0(0, &D_8037C310.unk0[4]);
func_8024E55C(0, &D_8037C310.unk0[8]);
pfsManager_getControllerFaceButtonState(0, &D_8037C310.unk0[8]);
for(i=0; i<0xE; i++){//L802954A8
D_8037C310.unk7E[i] = D_8037C310.unk70[i];
if(D_8037C310.unk70[i]){

View File

@@ -3,6 +3,7 @@
#include "variables.h"
#include "zoombox.h"
#include "core1/pfsmanager.h"
extern void func_803114D0(void );
extern int func_803114B0(void);
@@ -373,10 +374,10 @@ void gcdialog_update(void) {
ret = -1;
if (g_Dialog.u8.unk128_31 & 0x80) {
func_8024E5A8(0, controller_face_buttons);
pfsManager_getFirstControllerFaceButtonState(0, controller_face_buttons);
func_8024E640(0, controller_side_buttons);
} else {
func_8024E55C(0, controller_face_buttons);
pfsManager_getControllerFaceButtonState(0, controller_face_buttons);
func_8024E60C(0, controller_side_buttons);
}

View File

@@ -936,7 +936,7 @@ s32 gcPauseMenu_update(void) {
return 0;
}
func_8024E55C(0, face_button);
pfsManager_getControllerFaceButtonState(0, face_button);
controller_getJoystick(0, joystick);
func_8024E60C(0, sp60);
func_8024E6E0(0, sp50);

View File

@@ -4,13 +4,11 @@
#include "zoombox.h"
#include "ml/mtx.h"
#include <core1/viewport.h>
#include "core1/pfsmanager.h"
void func_80252330(f32, f32, f32);
extern f32 func_8033DDB8(void);
extern void func_8024E60C(s32, void *);
extern void func_8024E640(s32, void *);
extern void func_8024E5A8(s32, void *);
extern void func_80344090(BKSpriteDisplayData *self, s32 frame, Gfx **gfx);
BKSprite *func_8033B6C4(enum asset_e sprite_id, BKSpriteDisplayData **arg1);
@@ -881,11 +879,11 @@ void func_80316764(GcZoombox *this, s32 arg1) {
f32 pad0;
if (!this->unk1A4_10 ) {
func_8024E55C(0, sp38);
pfsManager_getControllerFaceButtonState(0, sp38);
func_8024E60C(0, sp2C);
phi_f0 = time_getDelta();
} else {
func_8024E5A8(0, sp38);
pfsManager_getFirstControllerFaceButtonState(0, sp38);
func_8024E640(0, sp2C);
phi_f0 = func_8033DDB8();
}
@@ -1067,12 +1065,12 @@ void gczoombox_update(GcZoombox *this){
return;
if( !this->unk1A4_10 ){
func_8024E55C(0, sp58);
pfsManager_getControllerFaceButtonState(0, sp58);
func_8024E60C(0, sp4C);
tmp_f0 = time_getDelta();
}
else{
func_8024E5A8(0, sp58);
pfsManager_getFirstControllerFaceButtonState(0, sp58);
func_8024E640(0, sp4C);
tmp_f0 = func_8033DDB8();
}

View File

@@ -4,8 +4,9 @@
#include "actor.h"
#include "prop.h"
#include "functions.h"
#include "ch/snacker.h"
#include "core1/eeprom.h"
#include "core1/ucode.h"
void spawnQueue_unlock(void);
void spawnQueue_lock(void);
@@ -396,7 +397,7 @@ void spawnQueue_reset(void){
break;
}
if(func_80255D04() == 0 || loaded_asm_file == 0 ){
if(ucode_stub3() == 0 || loaded_asm_file == 0 ){
func_8030578C();
}
func_80305990(1);
@@ -417,7 +418,7 @@ void spawnQueue_free(void){
void spawnQueue_func_802C39D4(void){
func_803268B4();
if(!levelSpecificFlags_validateCRC2()){
write_file_blocks(0, 0, 0x80749530, EEPROM_MAXBLOCKS);
eeprom_writeBlocks(0, 0, 0x80749530, EEPROM_MAXBLOCKS);
}
}