mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 15:04:31 +00:00
Generic actor params getters (#1359)
* Initial PARAMS_GET macros * NOSHIFT macro * Use number of bits rather than raw mask values * Add descriptions for each generic macro * Reformat * Adjust comment * format * edit en_door macro names * edit redead macro name * edit bdan switch macro name, and remove unneeded comments in go2 * mizushutter macro names * remove PARAMS_GET_S, rework ishi switch flag handling * actually remove PARAMS_GET_S * remove PARAMS_GET2_S * PARAMS_GET_U and PARAMS_GET_S * format * fix merge * format --------- Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
137e0d2a10
commit
eaf955ad22
200 changed files with 1113 additions and 1045 deletions
|
@ -80,7 +80,7 @@ void EnAObj_Init(Actor* thisx, PlayState* play) {
|
|||
EnAObj* this = (EnAObj*)thisx;
|
||||
f32 shadowScale = 6.0f;
|
||||
|
||||
this->textId = (thisx->params >> 8) & 0xFF;
|
||||
this->textId = PARAMS_GET_U(thisx->params, 8, 8);
|
||||
thisx->params &= 0xFF;
|
||||
|
||||
switch (thisx->params) {
|
||||
|
|
|
@ -142,10 +142,10 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
f32 yOffset = 980.0f;
|
||||
f32 shadowScale = 6.0f;
|
||||
s32 getItemId = GI_NONE;
|
||||
s16 spawnParam8000 = this->actor.params & 0x8000;
|
||||
s16 spawnParam8000 = PARAMS_GET_NOSHIFT(this->actor.params, 15, 1);
|
||||
s32 pad1;
|
||||
|
||||
this->collectibleFlag = (this->actor.params & 0x3F00) >> 8;
|
||||
this->collectibleFlag = PARAMS_GET_S(this->actor.params, 8, 6);
|
||||
|
||||
this->actor.params &= 0xFF;
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ void Play_Init(GameState* thisx) {
|
|||
Camera_InitDataUsingPlayer(&this->mainCamera, player);
|
||||
Camera_RequestMode(&this->mainCamera, CAM_MODE_NORMAL);
|
||||
|
||||
playerStartBgCamIndex = player->actor.params & 0xFF;
|
||||
playerStartBgCamIndex = PARAMS_GET_U(player->actor.params, 0, 8);
|
||||
if (playerStartBgCamIndex != 0xFF) {
|
||||
PRINTF("player has start camera ID (" VT_FGCOL(BLUE) "%d" VT_RST ")\n", playerStartBgCamIndex);
|
||||
Camera_RequestBgCam(&this->mainCamera, playerStartBgCamIndex);
|
||||
|
|
|
@ -429,7 +429,7 @@ RoomShapeImageMultiBgEntry* Room_GetImageMultiBgEntry(RoomShapeImageMulti* roomS
|
|||
}
|
||||
|
||||
player = GET_PLAYER(play);
|
||||
player->actor.params = (player->actor.params & 0xFF00) | bgCamIndex;
|
||||
player->actor.params = PARAMS_GET_NOSHIFT(player->actor.params, 8, 8) | bgCamIndex;
|
||||
|
||||
bgEntry = SEGMENTED_TO_VIRTUAL(roomShapeImageMulti->backgrounds);
|
||||
for (i = 0; i < roomShapeImageMulti->numBackgrounds; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue