Implement ac_my_room_msg_ctrl.c_inc

This commit is contained in:
Cuyler36
2024-04-04 04:34:22 -04:00
parent 5083c7f2ba
commit 97c4e85ada
17 changed files with 2427 additions and 340 deletions
+2 -4
View File
@@ -334,15 +334,13 @@ static void aAp_CommonHandle(ACTOR* actor, AIRPLANE_ACTOR* airplane, GAME* game)
}
static void aAp_ZbuttonChangeStatus(AIRPLANE_ACTOR* actor, GAME* game) {
GAME_PLAY* play = (GAME_PLAY*)game;
if (chkButton(BUTTON_Z)) {
if (actor->status == aAp_STATUS_PLAYER_CATCH) {
mPlib_request_main_refuse_type1(play);
mPlib_request_main_refuse_type1(game);
actor->status = aAp_STATUS_START_FLY_MOVE;
}
} else if (actor->status == aAp_STATUS_START_FLY_MOVE) {
mPlib_request_main_wait_type3((GAME*)play);
mPlib_request_main_wait_type3(game);
actor->status = aAp_STATUS_PLAYER_CATCH;
}
}
+8
View File
@@ -10,6 +10,10 @@
#include "m_cockroach.h"
#include "m_msg.h"
#include "dolphin/card.h"
#include "m_string.h"
#include "m_house.h"
#include "m_player_lib.h"
#include "GBA2/gba2.h"
enum {
aMR_ICON_LEAF,
@@ -123,6 +127,10 @@ static int aMR_UnitNum2FtrItemNoFtrID(mActor_name_t* item_no, int* ftr_id, int u
static void aMR_ReserveDefaultBgm(ACTOR* actorx, FTR_ACTOR* ftr_actor);
static void aMR_ChangeMDBgm(ACTOR* actorx, FTR_ACTOR* ftr_actor);
static void aMR_SetFurniture2FG(FTR_ACTOR* ftr_actor, xyz_t pos, int on_flag);
static int aMR_FtrIdx2ChangeFtrSwitch(ACTOR* actorx, int ftr_id);
static aFTR_PROFILE* aMR_GetFurnitureProfile(u16 ftr_no);
#include "../src/ac_my_room_msg_ctrl.c_inc"
static aFTR_PROFILE* aMR_GetFurnitureProfile(u16 ftr_no) {
if (ftr_no < FTR_NUM) {
File diff suppressed because it is too large Load Diff
+4 -6
View File
@@ -174,7 +174,7 @@ extern void famicom_emu_cleanup(GAME* game) {
sAdo_SubGameEnd();
}
extern int famicom_gba_getImage(u32 rom_id, int* ptr) {
extern void* famicom_gba_getImage(u32 rom_id, size_t* size) {
static char* names[] = {
"cluclu", "usa_balloon", "donkey", "usa_jr_math", "pinball", "tennis", "usa_golf",
NULL, "usa_baseball", NULL, "usa_donkey3", "donkeyjr", "soccer", "exbike",
@@ -182,8 +182,7 @@ extern int famicom_gba_getImage(u32 rom_id, int* ptr) {
};
char buf[256];
u32 resource;
int block;
void* resource;
char* rom;
if (rom_id > 19) {
@@ -197,9 +196,8 @@ extern int famicom_gba_getImage(u32 rom_id, int* ptr) {
} else {
sprintf(buf, "/FAMICOM/GBA/jb_%s.bin.szs", rom);
resource = JC__JKRGetResource(buf);
if ((resource != 0) && (ptr != NULL)) {
block = JC__JKRGetMemBlockSize(0, resource);
*ptr = block;
if ((resource != NULL) && (size != NULL)) {
*size = JC__JKRGetMemBlockSize(0, resource);
}
}
return resource;
+2 -1
View File
@@ -529,7 +529,8 @@ extern int goto_next_scene(GAME_PLAY* play, int next_idx, int update_player_mode
return res;
}
extern int goto_emu_game(GAME_PLAY* play, u8 famicom_rom_id) {
extern int goto_emu_game(GAME* game, s16 famicom_rom_id) {
GAME_PLAY* play = (GAME_PLAY*)game;
PLAYER_ACTOR* player = get_player_actor_withoutCheck(play);
int res = FALSE;