mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-27 19:44:40 +00:00
Document actor.params
bits allocation
This commit is contained in:
parent
911550550f
commit
57951edb82
1 changed files with 13 additions and 5 deletions
|
@ -150,7 +150,19 @@ static AnimationInfo sAnimationInfo[] = {
|
||||||
{ &gGoronShakingLoopAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
{ &gGoronShakingLoopAnim, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* `actor.params bits` allocation:
|
||||||
|
* type 01234...........
|
||||||
|
* path .....56789......
|
||||||
|
* cage ..........ABCDEF
|
||||||
|
*/
|
||||||
#define ENGO2_GET_TYPE(this) PARAMS_GET_S((this)->actor.params, 0, 5)
|
#define ENGO2_GET_TYPE(this) PARAMS_GET_S((this)->actor.params, 0, 5)
|
||||||
|
#define ENGO2_GET_PATH_INDEX(this) PARAMS_GET_S((this)->actor.params, 5, 5)
|
||||||
|
#define ENGO2_CAGED_SWITCH_FLAG(this) PARAMS_GET_S((this)->actor.params, 10, 6)
|
||||||
|
|
||||||
|
#define ENGO2_PATH_INDEX_MAX NBITS_TO_MASK(5)
|
||||||
|
#define ENGO2_IS_CAGE_OPEN(play, this) Flags_GetSwitch(play, ENGO2_CAGED_SWITCH_FLAG(this))
|
||||||
|
|
||||||
typedef enum GoronType {
|
typedef enum GoronType {
|
||||||
/* 0x0 */ GORON_CITY_HOT_RODDER,
|
/* 0x0 */ GORON_CITY_HOT_RODDER,
|
||||||
/* 0x1 */ GORON_CITY_LINK,
|
/* 0x1 */ GORON_CITY_LINK,
|
||||||
|
@ -168,10 +180,6 @@ typedef enum GoronType {
|
||||||
/* 0xD */ GORON_MARKET_BAZAAR
|
/* 0xD */ GORON_MARKET_BAZAAR
|
||||||
} GoronType;
|
} GoronType;
|
||||||
|
|
||||||
#define ENGO2_GET_PATH_INDEX(this) PARAMS_GET_S((this)->actor.params, 5, 5)
|
|
||||||
#define ENGO2_CAGED_SWITCH_FLAG(this) PARAMS_GET_S((this)->actor.params, 10, 6)
|
|
||||||
#define ENGO2_IS_CAGE_OPEN(play, this) Flags_GetSwitch(play, ENGO2_CAGED_SWITCH_FLAG(this))
|
|
||||||
|
|
||||||
static EnGo2DustEffectData sDustEffectData[2][4] = {
|
static EnGo2DustEffectData sDustEffectData[2][4] = {
|
||||||
{
|
{
|
||||||
// default
|
// default
|
||||||
|
@ -1587,7 +1595,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
||||||
this->waypoint = 0;
|
this->waypoint = 0;
|
||||||
this->reverseWaypoint = this->actor.shape.rot.z;
|
this->reverseWaypoint = this->actor.shape.rot.z;
|
||||||
this->trackingMode = NPC_TRACKING_NONE;
|
this->trackingMode = NPC_TRACKING_NONE;
|
||||||
this->path = Path_GetByIndex(play, ENGO2_GET_PATH_INDEX(this), 0x1F);
|
this->path = Path_GetByIndex(play, ENGO2_GET_PATH_INDEX(this), ENGO2_PATH_INDEX_MAX);
|
||||||
switch (ENGO2_GET_TYPE(this)) {
|
switch (ENGO2_GET_TYPE(this)) {
|
||||||
case GORON_CITY_ENTRANCE:
|
case GORON_CITY_ENTRANCE:
|
||||||
case GORON_CITY_ISLAND:
|
case GORON_CITY_ISLAND:
|
||||||
|
|
Loading…
Add table
Reference in a new issue