mirror of
https://github.com/zeldaret/mm.git
synced 2025-02-21 05:52:47 +00:00
General Cleanup 3 (#1543)
* voicestopread -> voicestopreaddata * PadMgr_ThreadEntry * PointLight_t * OS_VI_UNK28 * print stuff * Remove OS_PRIORITY_THREADTAIL * sBoeDlists -> sBoeModelInfo * Prerender_DrawBackground2D * segments * Revert "print stuff" This reverts commit 1d833e2f0d2e013d73ab9c4826fac8efefdc830b. * format * Update src/overlays/actors/ovl_En_Mkk/z_en_mkk.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
parent
0729b150a3
commit
6fb4a07325
@ -1279,12 +1279,12 @@ typedef struct {
|
||||
|
||||
// Added in MM
|
||||
typedef struct {
|
||||
unsigned char col[3];
|
||||
unsigned char unk3;
|
||||
unsigned char colc[3];
|
||||
unsigned char unk7;
|
||||
short pos[3];
|
||||
unsigned char unkE;
|
||||
unsigned char col[3];
|
||||
unsigned char kc;
|
||||
unsigned char colc[3];
|
||||
unsigned char kl;
|
||||
short pos[3];
|
||||
unsigned char kq;
|
||||
} PointLight_t;
|
||||
|
||||
typedef struct {
|
||||
|
@ -70,9 +70,6 @@ typedef struct OSThread {
|
||||
#define OS_PRIORITY_VIMGR 254
|
||||
#define OS_PRIORITY_MAX 255
|
||||
|
||||
#define OS_PRIORITY_THREADTAIL -1
|
||||
|
||||
|
||||
void osCreateThread(OSThread* thread, OSId id, void* entry, void* arg, void* sp, OSPri p);
|
||||
void osDestroyThread(OSThread* t);
|
||||
void osYieldThread(void);
|
||||
|
@ -103,8 +103,6 @@ typedef struct {
|
||||
#define OS_VI_FPAL_HPN2 54
|
||||
#define OS_VI_FPAL_HPF2 55
|
||||
|
||||
#define OS_VI_UNK28 28
|
||||
|
||||
extern OSViMode osViModeNtscHpf1;
|
||||
extern OSViMode osViModePalLan1;
|
||||
extern OSViMode osViModeNtscHpn1;
|
||||
|
@ -1,10 +1,12 @@
|
||||
#ifndef GFXPRINT_H
|
||||
#define GFXPRINT_H
|
||||
|
||||
#include "color.h"
|
||||
#include "PR/gbi.h"
|
||||
#include "PR/ultratypes.h"
|
||||
#include "ultra64.h"
|
||||
|
||||
#include "libc64/aprintf.h"
|
||||
#include "PR/xstdio.h"
|
||||
|
||||
#include "color.h"
|
||||
#include "unk.h"
|
||||
|
||||
#define GFXP_UNUSED "\x8E"
|
||||
|
2
spec
2
spec
@ -184,7 +184,7 @@ beginseg
|
||||
include "build/src/libultra/io/visetspecial.o"
|
||||
include "build/src/libultra/gu/coss.o"
|
||||
include "build/src/libultra/os/settime.o"
|
||||
include "build/src/libultra/voice/voicestopread.o"
|
||||
include "build/src/libultra/voice/voicestopreaddata.o"
|
||||
include "build/src/libultra/io/visetevent.o"
|
||||
include "build/src/libultra/io/pfsisplug.o"
|
||||
include "build/src/libultra/voice/voicegetstatus.o"
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "libc64/aprintf.h"
|
||||
#include "gfxprint.h"
|
||||
|
||||
#define GFXP_FLAG_HIRAGANA (1 << 0)
|
||||
#define GFXP_FLAG_RAINBOW (1 << 1)
|
||||
@ -127,30 +126,37 @@ void GfxPrint_PrintChar(GfxPrint* this, u8 c) {
|
||||
switch (c) {
|
||||
case '\0':
|
||||
break;
|
||||
|
||||
case '\n':
|
||||
this->posY += 32;
|
||||
case '\r':
|
||||
this->posX = this->baseX;
|
||||
break;
|
||||
|
||||
case '\t':
|
||||
do {
|
||||
GfxPrint_PrintCharImpl(this, ' ');
|
||||
} while ((this->posX - this->baseX) % 256);
|
||||
break;
|
||||
|
||||
case GFXP_HIRAGANA_CHAR:
|
||||
this->flags |= GFXP_FLAG_HIRAGANA;
|
||||
break;
|
||||
|
||||
case GFXP_KATAKANA_CHAR:
|
||||
this->flags &= ~GFXP_FLAG_HIRAGANA;
|
||||
break;
|
||||
|
||||
case GFXP_RAINBOW_ON_CHAR:
|
||||
this->flags |= GFXP_FLAG_RAINBOW;
|
||||
this->flags |= GFXP_FLAG_UPDATE;
|
||||
break;
|
||||
|
||||
case GFXP_RAINBOW_OFF_CHAR:
|
||||
this->flags &= ~GFXP_FLAG_RAINBOW;
|
||||
this->flags |= GFXP_FLAG_UPDATE;
|
||||
break;
|
||||
|
||||
case GFXP_UNUSED_CHAR:
|
||||
default:
|
||||
break;
|
||||
|
@ -530,7 +530,8 @@ void osSyncPrintfThreadContext(OSThread* thread) {
|
||||
OSThread* Fault_FindFaultedThread(void) {
|
||||
OSThread* iter = __osGetActiveQueue();
|
||||
|
||||
while (iter->priority != OS_PRIORITY_THREADTAIL) {
|
||||
// -1 indicates the end of the thread queue
|
||||
while (iter->priority != -1) {
|
||||
if ((iter->priority > OS_PRIORITY_IDLE) && (iter->priority < OS_PRIORITY_APPMAX) &&
|
||||
(iter->flags & (OS_FLAG_CPU_BREAK | OS_FLAG_FAULT))) {
|
||||
return iter;
|
||||
|
@ -734,7 +734,7 @@ void PadMgr_GetInput2(Input* inputs, s32 gameRequest) {
|
||||
PadMgr_UnlockPadData();
|
||||
}
|
||||
|
||||
void PadMgr_ThreadEntry() {
|
||||
void PadMgr_ThreadEntry(void) {
|
||||
s16* interruptMsg = NULL;
|
||||
s32 actionBits;
|
||||
s32 exit;
|
||||
@ -798,6 +798,6 @@ void PadMgr_Init(OSMesgQueue* siEvtQ, IrqMgr* irqMgr, OSId threadId, OSPri pri,
|
||||
osContSetCh(sPadMgrInstance->nControllers);
|
||||
PadMgr_ReleaseSerialEventQueue(siEvtQ);
|
||||
|
||||
osCreateThread(&sPadMgrInstance->thread, threadId, PadMgr_ThreadEntry, sPadMgrInstance, stack, pri);
|
||||
osCreateThread(&sPadMgrInstance->thread, threadId, (void*)PadMgr_ThreadEntry, sPadMgrInstance, stack, pri);
|
||||
osStartThread(&sPadMgrInstance->thread);
|
||||
}
|
||||
|
@ -3394,10 +3394,10 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
||||
Actor_AddToCategory(actorCtx, actor, actorInit->type);
|
||||
|
||||
{
|
||||
u32 sp20 = gSegments[6];
|
||||
uintptr_t prevSeg = gSegments[0x06];
|
||||
|
||||
Actor_Init(actor, play);
|
||||
gSegments[6] = sp20;
|
||||
gSegments[0x06] = prevSeg;
|
||||
}
|
||||
|
||||
return actor;
|
||||
|
@ -133,7 +133,7 @@ EnDoor* EnHy_FindNearestDoor(Actor* actor, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnHy_ChangeObjectAndAnim(EnHy* enHy, PlayState* play, s16 animIndex) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[enHy->animObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[enHy->animObjectSlot].segment);
|
||||
EnHy_ChangeAnim(&enHy->skelAnime, animIndex);
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ s32 EnHy_UpdateSkelAnime(EnHy* enHy, PlayState* play) {
|
||||
s32 isUpdated = false;
|
||||
|
||||
if (enHy->actor.draw != NULL) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[enHy->animObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[enHy->animObjectSlot].segment);
|
||||
SkelAnime_Update(&enHy->skelAnime);
|
||||
isUpdated = true;
|
||||
}
|
||||
@ -168,7 +168,7 @@ s32 EnHy_Init(EnHy* enHy, PlayState* play, FlexSkeletonHeader* skeletonHeaderSeg
|
||||
enHy->actor.objectSlot = enHy->skelLowerObjectSlot;
|
||||
isInitialized = true;
|
||||
ActorShape_Init(&enHy->actor.shape, 0.0f, NULL, 0.0f);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[enHy->actor.objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[enHy->actor.objectSlot].segment);
|
||||
SkelAnime_InitFlex(play, &enHy->skelAnime, skeletonHeaderSeg, NULL, enHy->jointTable, enHy->morphTable,
|
||||
ENHY_LIMB_MAX);
|
||||
EnHy_ChangeObjectAndAnim(enHy, play, animIndex);
|
||||
|
@ -187,8 +187,8 @@ void TransitionTile_Draw(TransitionTile* this, Gfx** gfxP) {
|
||||
TransitionTile_SetVtx(this);
|
||||
gSPMatrix(gfx++, &this->projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gfx++, &this->modelView, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(gfx++, 0xA, this->frame == 0 ? this->vtxFrame1 : this->vtxFrame2);
|
||||
gSPSegment(gfx++, 0xB, this->zBuffer);
|
||||
gSPSegment(gfx++, 0x0A, this->frame == 0 ? this->vtxFrame1 : this->vtxFrame2);
|
||||
gSPSegment(gfx++, 0x0B, this->zBuffer);
|
||||
gSPDisplayList(gfx++, sTransTileSetupDL);
|
||||
gSPDisplayList(gfx++, this->gfx);
|
||||
gDPPipeSync(gfx++);
|
||||
|
@ -132,39 +132,43 @@ void Lights_BindPointWithReference(Lights* lights, LightParams* params, Vec3f* p
|
||||
|
||||
void Lights_BindPoint(Lights* lights, LightParams* params, PlayState* play) {
|
||||
Light* light;
|
||||
f32 radiusF = params->point.radius;
|
||||
Vec3f posF;
|
||||
f32 kq = params->point.radius;
|
||||
Vec3f pos;
|
||||
Vec3f adjustedPos;
|
||||
s32 pad;
|
||||
|
||||
if (radiusF > 0) {
|
||||
posF.x = params->point.x;
|
||||
posF.y = params->point.y;
|
||||
posF.z = params->point.z;
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &posF, &adjustedPos);
|
||||
if ((adjustedPos.z > -radiusF) && (600 + radiusF > adjustedPos.z) && (400 > fabsf(adjustedPos.x) - radiusF) &&
|
||||
(400 > fabsf(adjustedPos.y) - radiusF)) {
|
||||
if (kq > 0.0f) {
|
||||
pos.x = params->point.x;
|
||||
pos.y = params->point.y;
|
||||
pos.z = params->point.z;
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &pos, &adjustedPos);
|
||||
if ((-kq < adjustedPos.z) && ((600.0f + kq) > adjustedPos.z) && ((fabsf(adjustedPos.x) - kq) < 400.0f) &&
|
||||
((fabsf(adjustedPos.y) - kq) < 400.0f)) {
|
||||
light = Lights_FindSlot(lights);
|
||||
if (light != NULL) {
|
||||
radiusF = 4500000.0f / (radiusF * radiusF);
|
||||
if (radiusF > 255) {
|
||||
radiusF = 255;
|
||||
} else if (20 > radiusF) {
|
||||
radiusF = 20;
|
||||
kq = 4500000.0f / SQ(kq);
|
||||
if (kq > 255.0f) {
|
||||
kq = 255.0f;
|
||||
} else if (20.0f > kq) {
|
||||
kq = 20.0f;
|
||||
}
|
||||
|
||||
light->p.col[0] = params->point.color[0];
|
||||
light->p.colc[0] = light->p.col[0];
|
||||
|
||||
light->p.col[1] = params->point.color[1];
|
||||
light->p.colc[1] = light->p.col[1];
|
||||
|
||||
light->p.col[2] = params->point.color[2];
|
||||
light->p.colc[2] = light->p.col[2];
|
||||
|
||||
light->p.pos[0] = params->point.x;
|
||||
light->p.pos[1] = params->point.y;
|
||||
light->p.pos[2] = params->point.z;
|
||||
light->p.unk3 = 0x8;
|
||||
light->p.unk7 = 0xFF;
|
||||
light->p.unkE = (s32)radiusF;
|
||||
|
||||
light->p.kc = 8;
|
||||
light->p.kl = -1;
|
||||
light->p.kq = (s32)kq;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6231,8 +6231,8 @@ void Interface_Draw(PlayState* play) {
|
||||
gSPLoadUcodeL(OVERLAY_DISP++, gspS2DEX2_fifo);
|
||||
gfx = OVERLAY_DISP;
|
||||
Prerender_DrawBackground2D(&gfx, sStoryTextures[interfaceCtx->storyType],
|
||||
sStoryTLUTs[interfaceCtx->storyType], SCREEN_WIDTH, SCREEN_HEIGHT, 2, 1, 0x8000,
|
||||
0x100, 0.0f, 0.0f, 1.0f, 1.0f, 0);
|
||||
sStoryTLUTs[interfaceCtx->storyType], SCREEN_WIDTH, SCREEN_HEIGHT, G_IM_FMT_CI,
|
||||
G_IM_SIZ_8b, G_TT_RGBA16, 256, 0.0f, 0.0f, 1.0f, 1.0f, 0);
|
||||
OVERLAY_DISP = gfx;
|
||||
gSPLoadUcode(OVERLAY_DISP++, SysUcode_GetUCode(), SysUcode_GetUCodeData());
|
||||
|
||||
|
@ -922,9 +922,9 @@ void Play_UpdateMain(PlayState* this) {
|
||||
s32 sp5C = false;
|
||||
u8 freezeFlashTimer;
|
||||
|
||||
gSegments[4] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
|
||||
gSegments[5] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
|
||||
gSegments[2] = OS_K0_TO_PHYSICAL(this->sceneSegment);
|
||||
gSegments[0x04] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
|
||||
gSegments[0x05] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
|
||||
gSegments[0x02] = OS_K0_TO_PHYSICAL(this->sceneSegment);
|
||||
|
||||
if (R_PICTO_PHOTO_STATE == PICTO_PHOTO_STATE_PROCESS) {
|
||||
R_PICTO_PHOTO_STATE = PICTO_PHOTO_STATE_READY;
|
||||
@ -1153,9 +1153,9 @@ void Play_DrawMain(PlayState* this) {
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
gSegments[4] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
|
||||
gSegments[5] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
|
||||
gSegments[2] = OS_K0_TO_PHYSICAL(this->sceneSegment);
|
||||
gSegments[0x04] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
|
||||
gSegments[0x05] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
|
||||
gSegments[0x02] = OS_K0_TO_PHYSICAL(this->sceneSegment);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x04, this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x04, this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
|
||||
@ -1595,7 +1595,7 @@ void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn) {
|
||||
this->sceneConfig = scene->drawConfig;
|
||||
this->sceneSegment = Play_LoadFile(this, &scene->segment);
|
||||
scene->unk_D = 0;
|
||||
gSegments[2] = OS_K0_TO_PHYSICAL(this->sceneSegment);
|
||||
gSegments[0x02] = OS_K0_TO_PHYSICAL(this->sceneSegment);
|
||||
Play_InitScene(this, spawn);
|
||||
Room_AllocateAndLoad(this, &this->roomCtx);
|
||||
}
|
||||
|
@ -2589,7 +2589,7 @@ void Player_DrawGetItemImpl(PlayState* play, Player* player, Vec3f* refPos, s32
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(player->giObjectSegment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(player->giObjectSegment);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, player->giObjectSegment);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x06, player->giObjectSegment);
|
||||
@ -2851,7 +2851,7 @@ void func_80127488(PlayState* play, Player* player, u8 alpha) {
|
||||
}
|
||||
|
||||
void Player_DrawCouplesMask(PlayState* play, Player* player) {
|
||||
gSegments[0xA] = OS_K0_TO_PHYSICAL(player->maskObjectSegment);
|
||||
gSegments[0x0A] = OS_K0_TO_PHYSICAL(player->maskObjectSegment);
|
||||
AnimatedMat_DrawOpa(play, Lib_SegmentedToVirtual(&object_mask_meoto_Matanimheader_001CD8));
|
||||
}
|
||||
|
||||
@ -2939,7 +2939,7 @@ void Player_DrawBlastMask(PlayState* play, Player* player) {
|
||||
if (player->blastMaskTimer != 0) {
|
||||
s32 alpha;
|
||||
|
||||
gSegments[0xA] = OS_K0_TO_PHYSICAL(player->maskObjectSegment);
|
||||
gSegments[0x0A] = OS_K0_TO_PHYSICAL(player->maskObjectSegment);
|
||||
|
||||
AnimatedMat_DrawOpa(play, Lib_SegmentedToVirtual(&object_mask_bakuretu_Matanimheader_0011F8));
|
||||
|
||||
|
@ -1522,7 +1522,7 @@ void func_8012CF0C(GraphicsContext* gfxCtx, s32 clearFb, s32 clearZb, u8 r, u8 g
|
||||
|
||||
masterGfx = gGfxMasterDL->syncSegments;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSegments); i++) {
|
||||
for (i = 0; i < NUM_SEGMENTS; i++) {
|
||||
if (i == 0x0E) {
|
||||
gSPNoOp(&masterGfx[i]);
|
||||
} else {
|
||||
|
@ -575,7 +575,7 @@ s32 Room_HandleLoadCallbacks(PlayState* play, RoomContext* roomCtx) {
|
||||
if (osRecvMesg(&roomCtx->loadQueue, NULL, OS_MESG_NOBLOCK) == 0) {
|
||||
roomCtx->status = 0;
|
||||
roomCtx->curRoom.segment = roomCtx->activeRoomVram;
|
||||
gSegments[3] = OS_K0_TO_PHYSICAL(roomCtx->activeRoomVram);
|
||||
gSegments[0x03] = OS_K0_TO_PHYSICAL(roomCtx->activeRoomVram);
|
||||
|
||||
Scene_ExecuteCommands(play, roomCtx->curRoom.segment);
|
||||
func_80123140(play, GET_PLAYER(play));
|
||||
@ -606,7 +606,7 @@ RoomDrawHandler sRoomDrawHandlers[] = {
|
||||
|
||||
void Room_Draw(PlayState* play, Room* room, u32 flags) {
|
||||
if (room->segment != NULL) {
|
||||
gSegments[3] = OS_K0_TO_PHYSICAL(room->segment);
|
||||
gSegments[0x03] = OS_K0_TO_PHYSICAL(room->segment);
|
||||
sRoomDrawHandlers[room->roomShape->base.type](play, room, flags);
|
||||
}
|
||||
return;
|
||||
|
@ -66,7 +66,7 @@ void Object_InitContext(GameState* gameState, ObjectContext* objectCtx) {
|
||||
objectCtx->spaceEnd = (void*)((u32)objectCtx->spaceStart + spaceSize);
|
||||
objectCtx->mainKeepSlot = Object_SpawnPersistent(objectCtx, GAMEPLAY_KEEP);
|
||||
|
||||
gSegments[4] = OS_K0_TO_PHYSICAL(objectCtx->slots[objectCtx->mainKeepSlot].segment);
|
||||
gSegments[0x04] = OS_K0_TO_PHYSICAL(objectCtx->slots[objectCtx->mainKeepSlot].segment);
|
||||
}
|
||||
|
||||
void Object_UpdateEntries(ObjectContext* objectCtx) {
|
||||
|
@ -362,7 +362,7 @@ void ViMode_Update(ViMode* viMode, Input* input) {
|
||||
}
|
||||
}
|
||||
|
||||
ViMode_Configure(&viMode->customViMode, OS_VI_UNK28, osTvType, viMode->loRes, viMode->antialiasOff,
|
||||
ViMode_Configure(&viMode->customViMode, OS_VI_MPAL_LPN1, osTvType, viMode->loRes, viMode->antialiasOff,
|
||||
viMode->modeN, viMode->fb16Bit, viMode->viWidth, viMode->viHeight, viMode->leftAdjust,
|
||||
viMode->rightAdjust, viMode->upperAdjust, viMode->lowerAdjust);
|
||||
ViMode_ConfigureFeatures(viMode, viMode->viFeatures);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ultra64.h"
|
||||
|
||||
__OSThreadTail __osThreadTail = { NULL, OS_PRIORITY_THREADTAIL };
|
||||
__OSThreadTail __osThreadTail = { NULL, -1 };
|
||||
OSThread* __osRunQueue = (OSThread*)&__osThreadTail;
|
||||
OSThread* __osActiveQueue = (OSThread*)&__osThreadTail;
|
||||
OSThread* __osRunningThread = NULL;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* File: voicestopread.c
|
||||
* File: voicestopreaddata.c
|
||||
*
|
||||
* Forcibly stops voice recognition processing by the Voice Recognition System
|
||||
*/
|
@ -2158,7 +2158,7 @@ void Boss03_SetObject(PlayState* play, s16 objectId) {
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[objectSlot].segment);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x06, play->objectCtx.slots[objectSlot].segment);
|
||||
|
@ -92,9 +92,9 @@ s32 DmAn_UpdateSkelAnime(DmAn* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (objectSlot2 > OBJECT_SLOT_NONE) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot2].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot2].segment);
|
||||
isAnimFinished = SkelAnime_Update(&this->skelAnime);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
}
|
||||
|
||||
return isAnimFinished;
|
||||
@ -112,10 +112,10 @@ s32 DmAn_ChangeAnim(DmAn* this, PlayState* play, DmAnAnimation animIndex) {
|
||||
}
|
||||
|
||||
if ((objectSlot2 > OBJECT_SLOT_NONE) && (this->animIndex != animIndex)) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot2].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot2].segment);
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
}
|
||||
|
||||
return didAnimChange;
|
||||
|
@ -92,9 +92,9 @@ s32 DmGm_UpdateSkelAnime(DmGm* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (objectIndex2 > OBJECT_SLOT_NONE) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectIndex2].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectIndex2].segment);
|
||||
isAnimFinished = SkelAnime_Update(&this->skelAnime);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
}
|
||||
|
||||
return isAnimFinished;
|
||||
@ -112,10 +112,10 @@ s32 DmGm_ChangeAnim(DmGm* this, PlayState* play, DmGmAnimation animIndex) {
|
||||
}
|
||||
|
||||
if ((objectIndex2 > OBJECT_SLOT_NONE) && (this->animIndex != animIndex)) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectIndex2].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectIndex2].segment);
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
}
|
||||
|
||||
return didAnimChange;
|
||||
|
@ -320,7 +320,7 @@ void DmStk_LoadObjectForAnimation(DmStk* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (objectSlot > OBJECT_SLOT_NONE) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1967,13 +1967,13 @@ void DmStk_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
(this->objectStk2ObjectSlot > OBJECT_SLOT_NONE)) {
|
||||
Matrix_Push();
|
||||
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectStk2ObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectStk2ObjectSlot].segment);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->objectStk2ObjectSlot].segment);
|
||||
|
||||
AnimatedMat_Draw(play, Lib_SegmentedToVirtual(gSkullKidMajorasMaskCurseOverlayTexAnim));
|
||||
Gfx_DrawDListOpa(play, gSkullKidMajorasMaskCurseOverlayDL);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectStkObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectStkObjectSlot].segment);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->objectStkObjectSlot].segment);
|
||||
|
||||
@ -2094,7 +2094,7 @@ void DmStk_Draw(Actor* thisx, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectStkObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectStkObjectSlot].segment);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
@ -1037,10 +1037,10 @@ s32 EnAn_UpdateSkelAnime(EnAn* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (otherObjectSlot > OBJECT_SLOT_NONE) {
|
||||
gSegments[0x6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[otherObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[otherObjectSlot].segment);
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
ret = SkelAnime_Update(&this->skelAnime);
|
||||
gSegments[0x6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[originalObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[originalObjectSlot].segment);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -1096,11 +1096,11 @@ s32 EnAn_ChangeAnim(EnAn* this, PlayState* play, EnAnAnimation animIndex) {
|
||||
}
|
||||
|
||||
if (changeAnim && (otherObjectSlot > OBJECT_SLOT_NONE)) {
|
||||
gSegments[0x6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[otherObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[otherObjectSlot].segment);
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
gSegments[0x6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[originalObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[originalObjectSlot].segment);
|
||||
}
|
||||
|
||||
return didAnimChange;
|
||||
|
@ -266,8 +266,8 @@ s32 EnBba01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->enHy.headObjectSlot].segment);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->enHy.headObjectSlot].segment);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->enHy.skelLowerObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->enHy.headObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->enHy.skelLowerObjectSlot].segment);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
@ -1293,30 +1293,30 @@ void EnBigpo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro
|
||||
|
||||
void EnBigpo_DrawMainBigpo(Actor* thisx, PlayState* play) {
|
||||
EnBigpo* this = THIS;
|
||||
Gfx* dispHead;
|
||||
Gfx* gfx;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if ((this->mainColor.a == 255) || (this->mainColor.a == 0)) {
|
||||
// fully visible OR fully transparent
|
||||
dispHead = POLY_OPA_DISP;
|
||||
gSPDisplayList(dispHead, gSetupDLs[SETUPDL_25]);
|
||||
gSPSegment(&dispHead[1], 0x0C, &D_801AEFA0); // empty display list for no transparency
|
||||
gSPSegment(&dispHead[2], 0x08,
|
||||
gfx = POLY_OPA_DISP;
|
||||
gSPDisplayList(gfx, gSetupDLs[SETUPDL_25]);
|
||||
gSPSegment(&gfx[1], 0x0C, D_801AEFA0); // empty display list for no transparency
|
||||
gSPSegment(&gfx[2], 0x08,
|
||||
Gfx_EnvColor(play->state.gfxCtx, this->mainColor.r, this->mainColor.g, this->mainColor.b,
|
||||
this->mainColor.a));
|
||||
POLY_OPA_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
EnBigpo_OverrideLimbDraw, EnBigpo_PostLimbDraw, &this->actor, &dispHead[3]);
|
||||
EnBigpo_OverrideLimbDraw, EnBigpo_PostLimbDraw, &this->actor, &gfx[3]);
|
||||
|
||||
} else {
|
||||
dispHead = POLY_XLU_DISP;
|
||||
gSPDisplayList(dispHead, gSetupDLs[SETUPDL_25]);
|
||||
gSPSegment(&dispHead[1], 0x0C, &D_801AEF88); // transparency display list
|
||||
gSPSegment(&dispHead[2], 0x08,
|
||||
gfx = POLY_XLU_DISP;
|
||||
gSPDisplayList(gfx, gSetupDLs[SETUPDL_25]);
|
||||
gSPSegment(&gfx[1], 0x0C, D_801AEF88); // transparency display list
|
||||
gSPSegment(&gfx[2], 0x08,
|
||||
Gfx_EnvColor(play->state.gfxCtx, this->mainColor.r, this->mainColor.g, this->mainColor.b,
|
||||
this->mainColor.a));
|
||||
POLY_XLU_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
EnBigpo_OverrideLimbDraw, EnBigpo_PostLimbDraw, &this->actor, &dispHead[3]);
|
||||
EnBigpo_OverrideLimbDraw, EnBigpo_PostLimbDraw, &this->actor, &gfx[3]);
|
||||
}
|
||||
|
||||
// 71.428566f might be 500/7 context unknown
|
||||
@ -1366,7 +1366,7 @@ void EnBigpo_DrawLantern(Actor* thisx, PlayState* play) {
|
||||
EnBigpo* this = THIS;
|
||||
f32 magnitude;
|
||||
f32 magnitude2;
|
||||
Gfx* dispHead;
|
||||
Gfx* gfx;
|
||||
Vec3f vec1;
|
||||
Vec3f vec2;
|
||||
Camera* cam = GET_ACTIVE_CAM(play);
|
||||
@ -1385,33 +1385,33 @@ void EnBigpo_DrawLantern(Actor* thisx, PlayState* play) {
|
||||
// fully visible OR fully transparent
|
||||
if ((this->mainColor.a == 255) || (this->mainColor.a == 0)) {
|
||||
Scene_SetRenderModeXlu(play, 0, 1);
|
||||
dispHead = POLY_OPA_DISP;
|
||||
gfx = POLY_OPA_DISP;
|
||||
} else {
|
||||
Scene_SetRenderModeXlu(play, 1, 2);
|
||||
dispHead = POLY_XLU_DISP;
|
||||
gfx = POLY_XLU_DISP;
|
||||
}
|
||||
|
||||
gSPDisplayList(&dispHead[0], gSetupDLs[SETUPDL_25]);
|
||||
gSPDisplayList(&gfx[0], gSetupDLs[SETUPDL_25]);
|
||||
|
||||
gSPSegment(&dispHead[1], 0x0A, Gfx_EnvColor(play->state.gfxCtx, 160, 0, 255, this->mainColor.a));
|
||||
gSPSegment(&gfx[1], 0x0A, Gfx_EnvColor(play->state.gfxCtx, 160, 0, 255, this->mainColor.a));
|
||||
|
||||
Matrix_MultVecY(1400.0f, &vec2);
|
||||
Lights_PointGlowSetInfo(&this->fires[0].info, vec2.x + vec1.x, vec2.y + vec1.y, vec2.z + vec1.z,
|
||||
this->lanternColor.r, this->lanternColor.g, this->lanternColor.b, this->lanternColor.a);
|
||||
|
||||
gDPSetEnvColor(&dispHead[2], this->lanternColor.r, this->lanternColor.g, this->lanternColor.b, this->mainColor.a);
|
||||
gDPSetEnvColor(&gfx[2], this->lanternColor.r, this->lanternColor.g, this->lanternColor.b, this->mainColor.a);
|
||||
|
||||
gSPMatrix(&dispHead[3], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(&gfx[3], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(&dispHead[4], &gBigPoeLanternMainDL);
|
||||
gSPDisplayList(&gfx[4], &gBigPoeLanternMainDL);
|
||||
|
||||
gSPDisplayList(&dispHead[5], &gBigPoeLanternPurpleTopDL);
|
||||
gSPDisplayList(&gfx[5], &gBigPoeLanternPurpleTopDL);
|
||||
|
||||
// fully transparent OR fully invisible
|
||||
if ((this->mainColor.a == 255) || (this->mainColor.a == 0)) {
|
||||
POLY_OPA_DISP = &dispHead[6];
|
||||
POLY_OPA_DISP = &gfx[6];
|
||||
} else {
|
||||
POLY_XLU_DISP = &dispHead[6];
|
||||
POLY_XLU_DISP = &gfx[6];
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
@ -256,9 +256,9 @@ s32 EnCne01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->enHy.headObjectSlot].segment);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->enHy.headObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->enHy.headObjectSlot].segment);
|
||||
*dList = gCneHeadBrownHairDL;
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->enHy.skelLowerObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->enHy.skelLowerObjectSlot].segment);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
@ -413,12 +413,12 @@ s32 func_80BB1D64(EnGeg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnGeg_UpdateSkelAnime(EnGeg* this, PlayState* play) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
void EnGeg_ChangeAnim(EnGeg* this, PlayState* play) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
}
|
||||
|
||||
|
@ -991,10 +991,10 @@ s32 EnGo_UpdateSkelAnime(EnGo* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (extraObjIndex >= 0) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[extraObjIndex].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[extraObjIndex].segment);
|
||||
this->skelAnime.playSpeed = this->animPlaySpeed;
|
||||
isAnimFinished = SkelAnime_Update(&this->skelAnime);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
}
|
||||
|
||||
return isAnimFinished;
|
||||
@ -1051,11 +1051,11 @@ s32 EnGo_ChangeAnim(EnGo* this, PlayState* play, EnGoAnimation animIndex) {
|
||||
}
|
||||
|
||||
if (extraObjIndex >= 0) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[extraObjIndex].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[extraObjIndex].segment);
|
||||
this->animIndex = animIndex;
|
||||
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
|
||||
this->animPlaySpeed = this->skelAnime.playSpeed;
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
}
|
||||
|
||||
return didAnimChange;
|
||||
|
@ -67,13 +67,6 @@ static ColliderSphereInit sSphereInit = {
|
||||
{ 1, { { 0, 0, 0 }, 15 }, 100 },
|
||||
};
|
||||
|
||||
typedef struct EnMkkDlists {
|
||||
/* 0x00 */ Gfx* unk0;
|
||||
/* 0x04 */ Gfx* unk4;
|
||||
/* 0x08 */ Gfx* unk8;
|
||||
/* 0x0C */ Gfx* unkC;
|
||||
} EnMkkDlists; // size = 0x10
|
||||
|
||||
static CollisionCheckInfoInit sColChkInfoInit = { 1, 15, 30, 10 };
|
||||
|
||||
static DamageTable sDamageTable = {
|
||||
@ -127,7 +120,14 @@ static Color_RGBA8 sEffPrimColors[] = { { 50, 50, 50, 255 }, { 255, 255, 255, 25
|
||||
|
||||
static Color_RGBA8 sEffEnvColors[] = { { 200, 200, 200, 255 }, { 255, 255, 255, 255 } };
|
||||
|
||||
static EnMkkDlists sBoeDLists[] = {
|
||||
typedef struct EnMkkModelInfo {
|
||||
/* 0x0 */ Gfx* materialDL;
|
||||
/* 0x4 */ Gfx* modelDL;
|
||||
/* 0x8 */ Gfx* endDL;
|
||||
/* 0xC */ Gfx* eyesDL;
|
||||
} EnMkkModelInfo; // size = 0x10
|
||||
|
||||
static EnMkkModelInfo sBoeModelInfo[] = {
|
||||
{ gBlackBoeBodyMaterialDL, gBlackBoeBodyModelDL, gBlackBoeEndDL, gBlackBoeEyesDL },
|
||||
{ gWhiteBoeBodyMaterialDL, gWhiteBoeBodyModelDL, gWhiteBoeEndDL, gWhiteBoeEyesDL },
|
||||
};
|
||||
@ -511,7 +511,7 @@ void func_80A4F16C(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnMkk_Draw(Actor* thisx, PlayState* play) {
|
||||
EnMkkDlists* dLists = &sBoeDLists[thisx->params];
|
||||
EnMkkModelInfo* modelInfo = &sBoeModelInfo[thisx->params];
|
||||
Gfx* gfx;
|
||||
Color_RGBA8* primColors;
|
||||
EnMkk* this = THIS;
|
||||
@ -528,16 +528,16 @@ void EnMkk_Draw(Actor* thisx, PlayState* play) {
|
||||
gDPSetPrimColor(&gfx[1], 0, 0xFF, primColors->r, primColors->g, primColors->b, primColors->a);
|
||||
gSPSegment(&gfx[2], 0x08, D_801AEFA0);
|
||||
gSPMatrix(&gfx[3], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&gfx[4], dLists->unkC);
|
||||
gSPDisplayList(&gfx[4], modelInfo->eyesDL);
|
||||
POLY_OPA_DISP = &gfx[5];
|
||||
}
|
||||
gfx = POLY_XLU_DISP;
|
||||
gSPDisplayList(&gfx[0], gSetupDLs[SETUPDL_25]);
|
||||
gDPSetEnvColor(&gfx[1], 255, 255, 255, this->alpha);
|
||||
gSPDisplayList(&gfx[2], dLists->unk0);
|
||||
gSPDisplayList(&gfx[2], modelInfo->materialDL);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
gSPMatrix(&gfx[3], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&gfx[4], dLists->unk4);
|
||||
gSPDisplayList(&gfx[4], modelInfo->modelDL);
|
||||
if (thisx->params == 0) {
|
||||
matrix = Matrix_GetCurrent();
|
||||
matrix->mf[3][0] = this->unk_154.x;
|
||||
@ -546,7 +546,7 @@ void EnMkk_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Matrix_Scale(0.85f, 0.85f, 0.85f, MTXMODE_APPLY);
|
||||
gSPMatrix(&gfx[5], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&gfx[6], dLists->unk4);
|
||||
gSPDisplayList(&gfx[6], modelInfo->modelDL);
|
||||
|
||||
matrix->mf[3][0] = this->unk_160.x;
|
||||
matrix->mf[3][1] = this->unk_160.y + 7.2250004f;
|
||||
@ -554,12 +554,12 @@ void EnMkk_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
Matrix_Scale(0.85f, 0.85f, 0.85f, MTXMODE_APPLY);
|
||||
gSPMatrix(&gfx[7], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&gfx[8], dLists->unk4);
|
||||
gSPDisplayList(&gfx[9], dLists->unk8);
|
||||
gSPDisplayList(&gfx[8], modelInfo->modelDL);
|
||||
gSPDisplayList(&gfx[9], modelInfo->endDL);
|
||||
|
||||
POLY_XLU_DISP = &gfx[10];
|
||||
} else {
|
||||
gSPDisplayList(&gfx[5], dLists->unk8);
|
||||
gSPDisplayList(&gfx[5], modelInfo->endDL);
|
||||
POLY_XLU_DISP = &gfx[6];
|
||||
}
|
||||
}
|
||||
@ -570,7 +570,7 @@ void func_80A4F4C8(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
Gfx* gfx;
|
||||
MtxF* matrix;
|
||||
EnMkkDlists* dLists = &sBoeDLists[thisx->params];
|
||||
EnMkkModelInfo* modelInfo = &sBoeModelInfo[thisx->params];
|
||||
EnMkk* this = THIS;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
@ -578,10 +578,10 @@ void func_80A4F4C8(Actor* thisx, PlayState* play) {
|
||||
gfx = POLY_XLU_DISP;
|
||||
gSPDisplayList(&gfx[0], gSetupDLs[SETUPDL_25]);
|
||||
gDPSetEnvColor(&gfx[1], 255, 255, 255, this->alpha);
|
||||
gSPDisplayList(&gfx[2], dLists->unk0);
|
||||
gSPDisplayList(&gfx[2], modelInfo->materialDL);
|
||||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
gSPMatrix(&gfx[3], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&gfx[4], dLists->unk4);
|
||||
gSPDisplayList(&gfx[4], modelInfo->modelDL);
|
||||
|
||||
matrix = Matrix_GetCurrent();
|
||||
matrix->mf[3][0] = this->unk_154.x;
|
||||
@ -589,22 +589,22 @@ void func_80A4F4C8(Actor* thisx, PlayState* play) {
|
||||
matrix->mf[3][2] = this->unk_154.z;
|
||||
|
||||
gSPMatrix(&gfx[5], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&gfx[6], dLists->unk4);
|
||||
gSPDisplayList(&gfx[6], modelInfo->modelDL);
|
||||
|
||||
matrix->mf[3][0] = this->unk_160.x;
|
||||
matrix->mf[3][1] = this->unk_160.y + 5.0f;
|
||||
matrix->mf[3][2] = this->unk_160.z;
|
||||
|
||||
gSPMatrix(&gfx[7], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&gfx[8], dLists->unk4);
|
||||
gSPDisplayList(&gfx[8], modelInfo->modelDL);
|
||||
|
||||
matrix->mf[3][0] = this->unk_16C.x;
|
||||
matrix->mf[3][1] = this->unk_16C.y + 5.0f;
|
||||
matrix->mf[3][2] = this->unk_16C.z;
|
||||
|
||||
gSPMatrix(&gfx[9], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&gfx[10], dLists->unk4);
|
||||
gSPDisplayList(&gfx[11], dLists->unk8);
|
||||
gSPDisplayList(&gfx[10], modelInfo->modelDL);
|
||||
gSPDisplayList(&gfx[11], modelInfo->endDL);
|
||||
POLY_XLU_DISP = &gfx[12];
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
@ -245,14 +245,14 @@ void EnNwc_CheckFound(EnNwc* this, PlayState* play) {
|
||||
|
||||
void EnNwc_LoadNiwSkeleton(EnNwc* this, PlayState* play) {
|
||||
if (Object_IsLoaded(&play->objectCtx, this->niwObjectSlot)) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->niwObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->niwObjectSlot].segment);
|
||||
|
||||
SkelAnime_InitFlex(play, &this->niwSkeleton, &gNiwSkel, &gNiwIdleAnim, this->jointTable, this->morphTable,
|
||||
NIW_LIMB_MAX);
|
||||
Animation_Change(&this->niwSkeleton, &gNiwIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gNiwIdleAnim),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->nwcObjectIndex].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->nwcObjectIndex].segment);
|
||||
this->state = NWC_STATE_NIW_LOADED;
|
||||
EnNwc_ToggleState(this);
|
||||
}
|
||||
|
@ -768,7 +768,7 @@ s32 EnSGoro_UpdateCheerAnimation(EnSGoro* this, PlayState* play) {
|
||||
if (((EnJg*)this->otherGoron)->flags & 1) {
|
||||
this->objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_TAISOU);
|
||||
if (this->objectSlot > OBJECT_SLOT_NONE) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
this->animIndex = EN_S_GORO_ANIM_TAISOU_CHEER;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
return true;
|
||||
@ -777,7 +777,7 @@ s32 EnSGoro_UpdateCheerAnimation(EnSGoro* this, PlayState* play) {
|
||||
} else if ((this->animIndex == EN_S_GORO_ANIM_TAISOU_CHEER) && !(((EnJg*)this->otherGoron)->flags & 1)) {
|
||||
this->objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_OF1D_MAP);
|
||||
if (this->objectSlot > OBJECT_SLOT_NONE) {
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
this->animIndex = EN_S_GORO_ANIM_IDLE_STAND;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex);
|
||||
this->skelAnime.curFrame = this->skelAnime.endFrame;
|
||||
@ -1309,7 +1309,7 @@ void EnSGoro_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 12.0f, 0.0f, UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->animIndex != EN_S_GORO_ANIM_SLEEPY) {
|
||||
EnSGoro_UpdateAttentionTarget(this, play);
|
||||
|
@ -1178,7 +1178,7 @@ void EnSlime_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
func_800B8118(&this->actor, play, 0);
|
||||
if (this->iceBlockTimer != ICE_BLOCK_UNUSED) {
|
||||
gSPSegment(POLY_XLU_DISP++, 10, D_801AEFA0);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0A, D_801AEFA0);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 170, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 150, 255, 255, this->iceBlockTimer);
|
||||
} else {
|
||||
|
@ -1366,7 +1366,7 @@ s32 EnSob1_AreObjectsLoaded(EnSob1* this, PlayState* play) {
|
||||
|
||||
void EnSob1_ZoraShopkeeper_Init(EnSob1* this, PlayState* play) {
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, NULL, this->jointTable, this->morphTable, ZORA_LIMB_MAX);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->shopkeeperAnimObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->shopkeeperAnimObjectSlot].segment);
|
||||
Animation_Change(&this->skelAnime, &gZoraShopkeeperAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gZoraShopkeeperAnim),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
this->actor.draw = EnSob1_ZoraShopkeeper_Draw;
|
||||
@ -1375,7 +1375,7 @@ void EnSob1_ZoraShopkeeper_Init(EnSob1* this, PlayState* play) {
|
||||
|
||||
void EnSob1_GoronShopkeeper_Init(EnSob1* this, PlayState* play) {
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, GORON_LIMB_MAX);
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->shopkeeperAnimObjectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->shopkeeperAnimObjectSlot].segment);
|
||||
Animation_Change(&this->skelAnime, &gGoronShopkeeperAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGoronShopkeeperAnim),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
this->actor.draw = EnSob1_GoronShopkeeper_Draw;
|
||||
|
@ -257,7 +257,7 @@ void func_808A54B0(EnSt* this, PlayState* play) {
|
||||
if ((this->unk_18C & 1) && (this->actor.colChkInfo.health != 0)) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot].segment);
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x06, play->objectCtx.slots[this->objectSlot].segment);
|
||||
|
||||
|
@ -62,8 +62,8 @@ void EffectEnIceBlock_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x06,
|
||||
play->objectCtx.slots[this->rObjectSlot].segment); // object: OBJECT_ICE_BLOCK
|
||||
// object: OBJECT_ICE_BLOCK
|
||||
gSPSegment(POLY_XLU_DISP++, 0x06, play->objectCtx.slots[this->rObjectSlot].segment);
|
||||
|
||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
|
||||
|
@ -73,7 +73,7 @@ void EffectSsDFire_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(objectPtr);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
|
||||
|
||||
scale = this->rScale / 100.0f;
|
||||
|
@ -35,9 +35,9 @@ u32 EffectSsExtra_Init(PlayState* play, u32 index, EffectSs* this, void* initPar
|
||||
|
||||
objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_YABUSAME_POINT);
|
||||
if ((objectSlot > OBJECT_SLOT_NONE) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
|
||||
uintptr_t segBackup = gSegments[6];
|
||||
uintptr_t segBackup = gSegments[0x06];
|
||||
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
|
||||
this->pos = params->pos;
|
||||
this->velocity = params->velocity;
|
||||
@ -50,7 +50,7 @@ u32 EffectSsExtra_Init(PlayState* play, u32 index, EffectSs* this, void* initPar
|
||||
this->rTimer = 5;
|
||||
this->rObjectSlot = objectSlot;
|
||||
|
||||
gSegments[6] = segBackup;
|
||||
gSegments[0x06] = segBackup;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@ -66,7 +66,7 @@ void EffectSsExtra_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
|
||||
gSegments[0x06] = OS_K0_TO_PHYSICAL(objectPtr);
|
||||
|
||||
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
|
||||
|
||||
|
@ -90,7 +90,7 @@ void TransitionWipe1_Draw(void* thisx, Gfx** gfxP) {
|
||||
guTranslate(&modelView[2], 0.0f, 0.0f, 0.0f);
|
||||
gDPPipeSync(gfx++);
|
||||
texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0, 0);
|
||||
gSPSegment(gfx++, 8, texScroll);
|
||||
gSPSegment(gfx++, 0x08, texScroll);
|
||||
gDPSetPrimColor(gfx++, 0, 0x80, this->primColor.r, this->primColor.g, this->primColor.b, 255);
|
||||
gSPMatrix(gfx++, &this->projection, G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPPerspNormalize(gfx++, this->normal);
|
||||
|
Loading…
x
Reference in New Issue
Block a user