mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-11 13:08:34 -04:00
Implement & link player_select.c
This commit is contained in:
@@ -137,6 +137,7 @@ extern u8 mFI_GetBlockZMax();
|
||||
extern u8 mFI_BkNum2BlockType();
|
||||
extern mFI_sound_source_info_c* mFI_GetSoundSourcePBlockNum(int block_x,int block_z);
|
||||
extern int mFI_Wpos2UtNum(int* ut_x, int* ut_z, xyz_t wpos);
|
||||
extern void mFI_ClearFieldData();
|
||||
|
||||
extern void mFI_PrintNowBGNum(gfxprint_t* gfxprint);
|
||||
extern void mFI_PrintFgAttr(gfxprint_t* gfxprint);
|
||||
|
||||
@@ -182,6 +182,7 @@ typedef struct private_s {
|
||||
extern s16 mPr_GetGoodsPower();
|
||||
extern s16 mPr_GetMoneyPower();
|
||||
|
||||
extern int mPr_CheckPrivate(Private_c* private_p);
|
||||
extern void mPr_PrintMapInfo_debug(gfxprint_t* gfxprint);
|
||||
extern int mPr_NullCheckPersonalID(PersonalID_c* pid);
|
||||
extern int mPr_CheckCmpPersonalID(PersonalID_c* pid_a, PersonalID_c* pid_b);
|
||||
@@ -191,6 +192,7 @@ extern void mPr_ClearPrivateInfo(Private_c* private_data);
|
||||
extern int mPr_CheckCmpPlayerName(u8* str0, u8* str1);
|
||||
extern void mPr_RandomSetPlayerData_title_demo();
|
||||
extern int mPr_GetPossessionItemSumWithCond(Private_c* priv, mActor_name_t item_no, u32 cond);
|
||||
extern void mPr_CopyPlayerName(u8* dst, Private_c* private_p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef M_START_DATA_INIT_H
|
||||
#define M_START_DATA_INIT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "game_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
mSDI_INIT_MODE_NEW,
|
||||
mSDI_INIT_MODE_NEW_PLAYER,
|
||||
mSDI_INIT_MODE_FROM,
|
||||
mSDI_INIT_MODE_PAK,
|
||||
mSDI_INIT_MODE_ERR,
|
||||
|
||||
mSDI_INIT_MODE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mSDI_MALLOC_FLAG_GAME,
|
||||
mSDI_MALLOC_FLAG_ZELDA,
|
||||
|
||||
mSDI_MALLOC_FLAG_NUM
|
||||
};
|
||||
|
||||
extern void mSDI_StartInitAfter(GAME* game, int renewal_reserve_flag, int malloc_flag);
|
||||
extern int mSDI_StartInitBefore(GAME* game, int player_no, int init_mode, int malloc_flag);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+49
-6
@@ -4,21 +4,64 @@
|
||||
#include "types.h"
|
||||
#include "game.h"
|
||||
#include "m_view.h"
|
||||
#include "m_private.h"
|
||||
#include "m_land.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct game_player_select_s GAME_PLAYER_SELECT;
|
||||
typedef void (*PLAYER_SELECT_INIT_PROC)(GAME_PLAYER_SELECT*);
|
||||
|
||||
#define SELECT_PLAYER_NUM TOTAL_PLAYER_NUM
|
||||
#define SELECT_PLAYER_NAME_EXTRA 10
|
||||
#define SELECT_NAME_LEN PLAYER_NAME_LEN + SELECT_PLAYER_NAME_EXTRA
|
||||
|
||||
/* sizeof(struct game_player_select_s) == 0x0288 */
|
||||
typedef struct game_player_select_s {
|
||||
struct game_player_select_s {
|
||||
/* 0x0000 */ GAME game;
|
||||
/* 0x00E0 */ View view;
|
||||
// TODO: finish this
|
||||
/* 0x0200 */ u8 _temp[0x88];
|
||||
} GAME_PLAYER_SELECT;
|
||||
/* 0x0200 */ PLAYER_SELECT_INIT_PROC init_procs[SELECT_PLAYER_NUM];
|
||||
/* 0x0214 */ int player_no;
|
||||
/* 0x0218 */ int err_no;
|
||||
/* 0x021C */ int mode;
|
||||
/* 0x0220 */ u8 player_names[SELECT_PLAYER_NUM][SELECT_NAME_LEN];
|
||||
/* 0x027A */ u8 player_types[SELECT_PLAYER_NUM];
|
||||
/* 0x027F */ u8 land_name[LAND_NAME_SIZE];
|
||||
/* 0x0287 */ u8 land_exist;
|
||||
};
|
||||
|
||||
extern void player_select_init(GAME_PLAYER_SELECT* player_select);
|
||||
extern void player_select_cleanup(GAME_PLAYER_SELECT* player_select);
|
||||
enum {
|
||||
PLAYER_SELECT_MODE_SELECTION,
|
||||
PLAYER_SELECT_MODE_PLAY,
|
||||
|
||||
PLAYER_SELECT_MODE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
PLAYER_SELECT_PLAYER_MODE_NO_SAVE,
|
||||
PLAYER_SELECT_PLAYER_MODE_UNREGISTERED,
|
||||
PLAYER_SELECT_PLAYER_MODE_HOME,
|
||||
PLAYER_SELECT_PLAYER_MODE_OUT,
|
||||
|
||||
PLAYER_SELECT_PLAYER_MODE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
PLAYER_SELECT_INIT_ERR_NONE,
|
||||
PLAYER_SELECT_INIT_ERR_SUCCESS,
|
||||
PLAYER_SELECT_INIT_ERR_2,
|
||||
PLAYER_SELECT_INIT_ERR_3,
|
||||
PLAYER_SELECT_INIT_ERR_SAVE,
|
||||
PLAYER_SELECT_INIT_ERR_5,
|
||||
PLAYER_SELECT_INIT_ERR_PAK,
|
||||
|
||||
PLAYER_SELECT_INIT_ERR_NUM
|
||||
};
|
||||
|
||||
extern void player_select_init(GAME* game);
|
||||
extern void player_select_cleanup(GAME* game);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user