Create main and player headers
This commit is contained in:
parent
2a1c4b808d
commit
b2186e5d09
6 changed files with 266 additions and 197 deletions
43
include/game/board/player.h
Normal file
43
include/game/board/player.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef _BOARD_PLAYER_H
|
||||
#define _BOARD_PLAYER_H
|
||||
|
||||
#include "game/gamework_data.h"
|
||||
|
||||
extern s16 boardPlayerMdl[4];
|
||||
|
||||
static inline s16 BoardPlayerHandicapGet(s32 player)
|
||||
{
|
||||
return GWPlayer[player].handicap;
|
||||
}
|
||||
|
||||
static inline s32 BoardPlayerGetCurrIdx()
|
||||
{
|
||||
return GWSystem.player_curr;
|
||||
}
|
||||
|
||||
static inline PlayerState *BoardPlayerGet(s32 player)
|
||||
{
|
||||
return &GWPlayer[player];
|
||||
}
|
||||
|
||||
static inline PlayerState *BoardPlayerGetCurr()
|
||||
{
|
||||
return &GWPlayer[BoardPlayerGetCurrIdx()];
|
||||
}
|
||||
|
||||
static inline s16 BoardPlayerModelGet(s32 player)
|
||||
{
|
||||
PlayerState *player_ptr = BoardPlayerGet(player);
|
||||
return boardPlayerMdl[player_ptr->player_idx];
|
||||
}
|
||||
|
||||
static inline s16 BoardPlayerModelGetCurr()
|
||||
{
|
||||
PlayerState *player = BoardPlayerGetCurr();
|
||||
return boardPlayerMdl[player->player_idx];
|
||||
}
|
||||
|
||||
void BoardPlayerCoinsSet(s32 player, s32 value);
|
||||
void BoardPlayerAutoSizeSet(s32 player, s32 value);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue