mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
Master to main (#970)
* step 1 * gMasterGfxPos -> gMainGfxPos * change label name
This commit is contained in:
parent
cec7e0edb7
commit
2340b15e97
2
.github/workflows/docs.yaml
vendored
2
.github/workflows/docs.yaml
vendored
@ -2,7 +2,7 @@ name: Doxygen
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'src/*'
|
- 'src/*'
|
||||||
- 'include/*'
|
- 'include/*'
|
||||||
|
@ -61,7 +61,7 @@ Recompile the ROM:
|
|||||||
ninja
|
ninja
|
||||||
```
|
```
|
||||||
|
|
||||||
This will probably end up either `FAIL`ing (the resulting ROM does not match the baserom), or the compilation of the C file you just modified did not succeed. mips_to_c loves to use void pointers and weird syntax that won't compile properly. Fixing this will involve typing the function signature correctly, which you may find in [Star Rod's library database](https://github.com/nanaian/star-rod/blob/master/database/common_func_library.lib). For structs, see [common_structs.h](include/common_structs.h).
|
This will probably end up either `FAIL`ing (the resulting ROM does not match the baserom), or the compilation of the C file you just modified did not succeed. mips_to_c loves to use void pointers and weird syntax that won't compile properly. Fixing this will involve typing the function signature correctly, which can involve trial and error. For structs, see [common_structs.h](include/common_structs.h).
|
||||||
|
|
||||||
Once the C file compiles, you can compare the assembly generated by your code versus the original assembly with the following command, replacing `function_name` with the name of the function you're working on:
|
Once the C file compiles, you can compare the assembly generated by your code versus the original assembly with the following command, replacing `function_name` with the name of the function you're working on:
|
||||||
|
|
||||||
|
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -26,7 +26,7 @@ pipeline {
|
|||||||
stage("Comment") {
|
stage("Comment") {
|
||||||
when {
|
when {
|
||||||
not {
|
not {
|
||||||
branch 'master'
|
branch 'main'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
@ -60,7 +60,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Report Progress') {
|
stage('Report Progress') {
|
||||||
when {
|
when {
|
||||||
branch 'master'
|
branch 'main'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'mkdir reports'
|
sh 'mkdir reports'
|
||||||
@ -82,10 +82,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Update Progress') {
|
stage('Update Progress') {
|
||||||
when {
|
when {
|
||||||
branch 'master'
|
branch 'main'
|
||||||
}
|
}
|
||||||
agent {
|
agent {
|
||||||
label 'master'
|
label 'pm_website'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
unstash 'reports'
|
unstash 'reports'
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
[![Progress (iQue)][progress-ique-badge]][progress-ique]
|
[![Progress (iQue)][progress-ique-badge]][progress-ique]
|
||||||
[![Discord Channel][discord-badge]][discord]
|
[![Discord Channel][discord-badge]][discord]
|
||||||
|
|
||||||
[jenkins]: https://jenkins.deco.mp/job/papermario/job/master
|
[jenkins]: https://jenkins.deco.mp/job/papermario/job/main
|
||||||
[jenkins-badge]: https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins.deco.mp%2Fjob%2Fpapermario%2Fjob%2Fmaster
|
[jenkins-badge]: https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins.deco.mp%2Fjob%2Fpapermario%2Fjob%2Fmain
|
||||||
|
|
||||||
[progress-us]: https://papermar.io/progress-us
|
[progress-us]: https://papermar.io/progress-us
|
||||||
[progress-us-badge]: https://img.shields.io/endpoint?url=https://papermar.io/reports/progress_us_shield.json
|
[progress-us-badge]: https://img.shields.io/endpoint?url=https://papermar.io/reports/progress_us_shield.json
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
#define entity_upgrade_block_hide_content dead_entity_upgrade_block_hide_content
|
#define entity_upgrade_block_hide_content dead_entity_upgrade_block_hide_content
|
||||||
#define fx_misc_particles dead_fx_misc_particles
|
#define fx_misc_particles dead_fx_misc_particles
|
||||||
#define transform_point dead_transform_point
|
#define transform_point dead_transform_point
|
||||||
#define gMasterGfxPos dead_gMasterGfxPos
|
#define gMainGfxPos dead_gMainGfxPos
|
||||||
#define osVirtualToPhysical dead_osVirtualToPhysical
|
#define osVirtualToPhysical dead_osVirtualToPhysical
|
||||||
#define nuGfxZBuffer dead_nuGfxZBuffer
|
#define nuGfxZBuffer dead_nuGfxZBuffer
|
||||||
#define nuGfxCfb_ptr dead_nuGfxCfb_ptr
|
#define nuGfxCfb_ptr dead_nuGfxCfb_ptr
|
||||||
|
@ -196,7 +196,7 @@ extern OSDevMgr __osPiDevMgr;
|
|||||||
|
|
||||||
// gfx
|
// gfx
|
||||||
extern DisplayContext* gDisplayContext;
|
extern DisplayContext* gDisplayContext;
|
||||||
extern Gfx* gMasterGfxPos;
|
extern Gfx* gMainGfxPos;
|
||||||
extern u16 gMatrixListPos;
|
extern u16 gMatrixListPos;
|
||||||
extern s32 gCurrentDisplayContextIndex;
|
extern s32 gCurrentDisplayContextIndex;
|
||||||
|
|
||||||
|
96
src/16c8e0.c
96
src/16c8e0.c
@ -754,19 +754,19 @@ void tattle_cam_pre_render(Camera* camera) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE) {
|
if (gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE) {
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_COPY);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_COPY);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGB, G_CC_DECALRGB);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGB, G_CC_DECALRGB);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
if (!fogEnabled) {
|
if (!fogEnabled) {
|
||||||
gDPLoadTLUT_pal256(gMasterGfxPos++, gGameStatusPtr->backgroundPalette);
|
gDPLoadTLUT_pal256(gMainGfxPos++, gGameStatusPtr->backgroundPalette);
|
||||||
} else {
|
} else {
|
||||||
gDPLoadTLUT_pal256(gMasterGfxPos++, gTattleBgPalette);
|
gDPLoadTLUT_pal256(gMainGfxPos++, gTattleBgPalette);
|
||||||
}
|
}
|
||||||
bgWidth = gGameStatusPtr->backgroundMaxX;
|
bgWidth = gGameStatusPtr->backgroundMaxX;
|
||||||
bgHeight = gGameStatusPtr->backgroundMaxY;
|
bgHeight = gGameStatusPtr->backgroundMaxY;
|
||||||
@ -781,15 +781,15 @@ void tattle_cam_pre_render(Camera* camera) {
|
|||||||
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
||||||
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
||||||
}
|
}
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgWidth * texOffsetY,
|
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgWidth * texOffsetY,
|
||||||
G_IM_FMT_CI, G_IM_SIZ_8b, bgWidth, 6,
|
G_IM_FMT_CI, G_IM_SIZ_8b, bgWidth, 6,
|
||||||
0, 0, 295, 5, 0,
|
0, 0, 295, 5, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
|
|
||||||
gSPTextureRectangle(gMasterGfxPos++, posX * 4, (lineHeight * i + posY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, posX * 4, (lineHeight * i + posY) * 4,
|
||||||
(texOffsetX + posX - 1) * 4, (lineHeight * i + lineHeight - 1 + posY) * 4,
|
(texOffsetX + posX - 1) * 4, (lineHeight * i + lineHeight - 1 + posY) * 4,
|
||||||
G_TX_RENDERTILE, bgWidth * 32, 0, 4096, 1024);
|
G_TX_RENDERTILE, bgWidth * 32, 0, 4096, 1024);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, (texOffsetX + posX) * 4, (lineHeight * i + posY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, (texOffsetX + posX) * 4, (lineHeight * i + posY) * 4,
|
||||||
(bgWidth + posX - 1) * 4, (lineHeight * i + lineHeight - 1 + posY) * 4,
|
(bgWidth + posX - 1) * 4, (lineHeight * i + lineHeight - 1 + posY) * 4,
|
||||||
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
||||||
}
|
}
|
||||||
@ -798,55 +798,55 @@ void tattle_cam_pre_render(Camera* camera) {
|
|||||||
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
||||||
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
||||||
}
|
}
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgWidth * texOffsetY,
|
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgWidth * texOffsetY,
|
||||||
G_IM_FMT_CI, G_IM_SIZ_8b, bgWidth, extraHeight,
|
G_IM_FMT_CI, G_IM_SIZ_8b, bgWidth, extraHeight,
|
||||||
0, 0, 295, extraHeight - 1, 0,
|
0, 0, 295, extraHeight - 1, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, posX * 4, (i * lineHeight + posY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, posX * 4, (i * lineHeight + posY) * 4,
|
||||||
(texOffsetX + posX - 1) * 4, (bgHeight + - 1 + posY) * 4,
|
(texOffsetX + posX - 1) * 4, (bgHeight + - 1 + posY) * 4,
|
||||||
G_TX_RENDERTILE, bgWidth * 32, 0, 4096, 1024);
|
G_TX_RENDERTILE, bgWidth * 32, 0, 4096, 1024);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, (texOffsetX + posX) * 4, (i * lineHeight + posY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, (texOffsetX + posX) * 4, (i * lineHeight + posY) * 4,
|
||||||
(bgWidth + posX - 1) * 4, (bgHeight - 1 + posY) * 4,
|
(bgWidth + posX - 1) * 4, (bgHeight - 1 + posY) * 4,
|
||||||
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPViewport(gMasterGfxPos++, &cam->vp);
|
gSPViewport(gMainGfxPos++, &cam->vp);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
|
gSPClearGeometryMode(gMainGfxPos++, G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
|
||||||
gSPTexture(gMasterGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
|
gSPTexture(gMainGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPPipelineMode(gMasterGfxPos++, G_PM_NPRIMITIVE);
|
gDPPipelineMode(gMainGfxPos++, G_PM_NPRIMITIVE);
|
||||||
gDPSetScissorFrac(gMasterGfxPos++, G_SC_NON_INTERLACE, cam->viewportStartX * 4.0f, cam->viewportStartY * 4.0f, (cam->viewportStartX + cam->viewportW) * 4.0f, (cam->viewportStartY + cam->viewportH) * 4.0f);
|
gDPSetScissorFrac(gMainGfxPos++, G_SC_NON_INTERLACE, cam->viewportStartX * 4.0f, cam->viewportStartY * 4.0f, (cam->viewportStartX + cam->viewportW) * 4.0f, (cam->viewportStartY + cam->viewportH) * 4.0f);
|
||||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_BILERP);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP);
|
||||||
gDPSetTextureConvert(gMasterGfxPos++, G_TC_FILT);
|
gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_SHADE, G_CC_SHADE);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_SHADE, G_CC_SHADE);
|
||||||
gDPSetCombineKey(gMasterGfxPos++, G_CK_NONE);
|
gDPSetCombineKey(gMainGfxPos++, G_CK_NONE);
|
||||||
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE);
|
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
|
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
|
||||||
gSPClipRatio(gMasterGfxPos++, FRUSTRATIO_2);
|
gSPClipRatio(gMainGfxPos++, FRUSTRATIO_2);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxZBuffer));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxZBuffer));
|
||||||
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_DEPTH(G_MAXFBZ, 0));
|
gDPSetFillColor(gMainGfxPos++, PACK_FILL_DEPTH(G_MAXFBZ, 0));
|
||||||
gDPFillRectangle(gMasterGfxPos++, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
|
gDPFillRectangle(gMainGfxPos++, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
|
|
||||||
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE)) {
|
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE)) {
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
|
||||||
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(cam->bgColor[0], cam->bgColor[1], cam->bgColor[2], 1));
|
gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(cam->bgColor[0], cam->bgColor[1], cam->bgColor[2], 1));
|
||||||
gDPFillRectangle(gMasterGfxPos++, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
|
gDPFillRectangle(gMainGfxPos++, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPPerspNormalize(gMasterGfxPos++, cam->perspNorm);
|
gSPPerspNormalize(gMainGfxPos++, cam->perspNorm);
|
||||||
guMtxF2L(cam->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]);
|
guMtxF2L(cam->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8023FF84(Camera* camera) {
|
void func_8023FF84(Camera* camera) {
|
||||||
|
@ -2960,7 +2960,7 @@ void func_8024F768(void* data) {
|
|||||||
if (alphaAmt > 10) {
|
if (alphaAmt > 10) {
|
||||||
alphaAmt = 10;
|
alphaAmt = 10;
|
||||||
}
|
}
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, (alphaAmt * 255) / 10);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, (alphaAmt * 255) / 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8024F7C8(void) {
|
void func_8024F7C8(void) {
|
||||||
|
22
src/190B20.c
22
src/190B20.c
@ -2904,23 +2904,23 @@ void btl_update_ko_status(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void btl_appendGfx_prim_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) {
|
void btl_appendGfx_prim_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) {
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_80293970);
|
gSPDisplayList(gMainGfxPos++, D_80293970);
|
||||||
|
|
||||||
if (a == 255) {
|
if (a == 255) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1);
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, r, g, b, a);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, a);
|
||||||
gDPFillRectangle(gMasterGfxPos++, left, top, right, bottom);
|
gDPFillRectangle(gMainGfxPos++, left, top, right, bottom);
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
}
|
}
|
||||||
|
|
||||||
void btl_draw_prim_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 arg6, u16 arg7) {
|
void btl_draw_prim_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 arg6, u16 arg7) {
|
||||||
|
34
src/325AD0.c
34
src/325AD0.c
@ -56,60 +56,60 @@ s32 func_E0200044(s32 max, s32 idx) {
|
|||||||
void func_E02000AC(s32 arg0, s32 arg1) {
|
void func_E02000AC(s32 arg0, s32 arg1) {
|
||||||
s32 i, j;
|
s32 i, j;
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 128, 128, 128, 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 128, 128, 128, 255);
|
||||||
|
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, nuGfxCfb_ptr);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, nuGfxCfb_ptr);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||||
(((((79)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0,
|
(((((79)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0,
|
||||||
G_TX_LOADTILE, 0,
|
G_TX_LOADTILE, 0,
|
||||||
G_TX_WRAP, 6, G_TX_NOLOD,
|
G_TX_WRAP, 6, G_TX_NOLOD,
|
||||||
G_TX_WRAP, 7, G_TX_NOLOD);
|
G_TX_WRAP, 7, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE,
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE,
|
||||||
(0)<<G_TEXTURE_IMAGE_FRAC,
|
(0)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(i * 6)<<G_TEXTURE_IMAGE_FRAC,
|
(i * 6)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(79)<<G_TEXTURE_IMAGE_FRAC,
|
(79)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
|
(i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||||
(((((79)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0,
|
(((((79)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0,
|
||||||
G_TX_RENDERTILE, 0,
|
G_TX_RENDERTILE, 0,
|
||||||
G_TX_WRAP, 6, G_TX_NOLOD,
|
G_TX_WRAP, 6, G_TX_NOLOD,
|
||||||
G_TX_WRAP, 7, G_TX_NOLOD);
|
G_TX_WRAP, 7, G_TX_NOLOD);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_RENDERTILE,
|
gDPLoadTile(gMainGfxPos++, G_TX_RENDERTILE,
|
||||||
(arg0)<<G_TEXTURE_IMAGE_FRAC,
|
(arg0)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(arg1 + i * 6)<<G_TEXTURE_IMAGE_FRAC,
|
(arg1 + i * 6)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(arg0 + 79)<<G_TEXTURE_IMAGE_FRAC,
|
(arg0 + 79)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(arg1 + i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
|
(arg1 + i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_RENDERTILE + 1,
|
gDPLoadTile(gMainGfxPos++, G_TX_RENDERTILE + 1,
|
||||||
(arg0)<<G_TEXTURE_IMAGE_FRAC,
|
(arg0)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(arg1 + i * 6)<<G_TEXTURE_IMAGE_FRAC,
|
(arg1 + i * 6)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(arg0 + 79)<<G_TEXTURE_IMAGE_FRAC,
|
(arg0 + 79)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(arg1 + i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
|
(arg1 + i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
|
||||||
|
|
||||||
for (j = 0; j < 1; j++) {
|
for (j = 0; j < 1; j++) {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, nuGfxCfb_ptr);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, nuGfxCfb_ptr);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||||
(((((320)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0x100,
|
(((((320)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0x100,
|
||||||
G_TX_LOADTILE, 0,
|
G_TX_LOADTILE, 0,
|
||||||
G_TX_WRAP, 6, G_TX_NOLOD,
|
G_TX_WRAP, 6, G_TX_NOLOD,
|
||||||
G_TX_WRAP, 7, G_TX_NOLOD);
|
G_TX_WRAP, 7, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE,
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE,
|
||||||
(arg0)<<G_TEXTURE_IMAGE_FRAC,
|
(arg0)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(arg1 + i * 6)<<G_TEXTURE_IMAGE_FRAC,
|
(arg1 + i * 6)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(arg0 + 80 - 1)<<G_TEXTURE_IMAGE_FRAC,
|
(arg0 + 80 - 1)<<G_TEXTURE_IMAGE_FRAC,
|
||||||
(arg1 + i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
|
(arg1 + i * 6 + 5)<<G_TEXTURE_IMAGE_FRAC);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||||
(((((320)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0,
|
(((((320)-(0)+1) * G_IM_SIZ_16b_TILE_BYTES)+7)>>3), 0,
|
||||||
G_TX_RENDERTILE + 1, 0,
|
G_TX_RENDERTILE + 1, 0,
|
||||||
G_TX_WRAP, 6, G_TX_NOLOD,
|
G_TX_WRAP, 6, G_TX_NOLOD,
|
||||||
G_TX_WRAP, 7, G_TX_NOLOD);
|
G_TX_WRAP, 7, G_TX_NOLOD);
|
||||||
gDPTextureRectangle(gMasterGfxPos++, arg0 * 4, (arg1 + i * 6) * 4, (arg0 + 80) * 4, (arg1 + i * 6 + 6) * 4, 0, arg0 * 32, arg1 * 32, 0x400, 0x400);
|
gDPTextureRectangle(gMainGfxPos++, arg0 * 4, (arg1 + i * 6) * 4, (arg0 + 80) * 4, (arg1 + i * 6 + 6) * 4, 0, arg0 * 32, arg1 * 32, 0x400, 0x400);
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -1460,7 +1460,7 @@ void func_802A3C98(void* data, s32 x, s32 y) {
|
|||||||
yPos = y + 18;
|
yPos = y + 18;
|
||||||
var_t0 = yPos + 1 + (D_802AD10E * 13);
|
var_t0 = yPos + 1 + (D_802AD10E * 13);
|
||||||
gDPSetScissor(
|
gDPSetScissor(
|
||||||
gMasterGfxPos++, G_SC_NON_INTERLACE,
|
gMainGfxPos++, G_SC_NON_INTERLACE,
|
||||||
xPos,
|
xPos,
|
||||||
yPos,
|
yPos,
|
||||||
x + 153,
|
x + 153,
|
||||||
@ -2018,7 +2018,7 @@ void func_802A5290(void* data, s32 x, s32 y) {
|
|||||||
xPos = x + 4;
|
xPos = x + 4;
|
||||||
yPos = y + 18;
|
yPos = y + 18;
|
||||||
var_t0 = yPos + 1 + (D_802AD60A * 13);
|
var_t0 = yPos + 1 + (D_802AD60A * 13);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, xPos, yPos, x + 142, var_t0);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, xPos, yPos, x + 142, var_t0);
|
||||||
|
|
||||||
xPos = x + 33;
|
xPos = x + 33;
|
||||||
yPos = y + 19 + D_802AD60C;
|
yPos = y + 19 + D_802AD60C;
|
||||||
|
22
src/43F0.c
22
src/43F0.c
@ -769,23 +769,23 @@ f32 update_lerp(s32 easing, f32 start, f32 end, s32 elapsed, s32 duration) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void appendGfx_startup_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) {
|
void appendGfx_startup_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) {
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_80074580);
|
gSPDisplayList(gMainGfxPos++, D_80074580);
|
||||||
|
|
||||||
if (a == 255) {
|
if (a == 255) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1);
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, r, g, b, a);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, a);
|
||||||
gDPFillRectangle(gMasterGfxPos++, left, top, right, bottom);
|
gDPFillRectangle(gMainGfxPos++, left, top, right, bottom);
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
}
|
}
|
||||||
|
|
||||||
void startup_draw_prim_rect_COPY(s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b, u16 a) {
|
void startup_draw_prim_rect_COPY(s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b, u16 a) {
|
||||||
|
@ -702,7 +702,7 @@ void update_status_menu(void) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 12, 20, SCREEN_WIDTH - 12, SCREEN_HEIGHT - 20);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 12, 20, SCREEN_WIDTH - 12, SCREEN_HEIGHT - 20);
|
||||||
fp = uiStatus->drawPosX;
|
fp = uiStatus->drawPosX;
|
||||||
s5 = uiStatus->drawPosY;
|
s5 = uiStatus->drawPosY;
|
||||||
draw_box(0, WINDOW_STYLE_5, fp, s5, 0, 174, 35, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
draw_box(0, WINDOW_STYLE_5, fp, s5, 0, 174, 35, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||||
|
52
src/8800.c
52
src/8800.c
@ -115,12 +115,12 @@ void render_frame(s32 flag) {
|
|||||||
s32 lrx;
|
s32 lrx;
|
||||||
s32 lry;
|
s32 lry;
|
||||||
|
|
||||||
gSPViewport(gMasterGfxPos++, &camera->vp);
|
gSPViewport(gMainGfxPos++, &camera->vp);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
|
gSPClearGeometryMode(gMainGfxPos++, G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
|
||||||
G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
|
G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
|
||||||
gSPTexture(gMasterGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
|
gSPTexture(gMainGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPPipelineMode(gMasterGfxPos++, G_PM_NPRIMITIVE);
|
gDPPipelineMode(gMainGfxPos++, G_PM_NPRIMITIVE);
|
||||||
|
|
||||||
ulx = camera->viewportStartX;
|
ulx = camera->viewportStartX;
|
||||||
uly = camera->viewportStartY;
|
uly = camera->viewportStartY;
|
||||||
@ -153,29 +153,29 @@ void render_frame(s32 flag) {
|
|||||||
lry = SCREEN_HEIGHT;
|
lry = SCREEN_HEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry);
|
||||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_BILERP);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP);
|
||||||
gDPSetTextureConvert(gMasterGfxPos++, G_TC_FILT);
|
gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_SHADE, G_CC_SHADE);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_SHADE, G_CC_SHADE);
|
||||||
gDPSetCombineKey(gMasterGfxPos++, G_CK_NONE);
|
gDPSetCombineKey(gMainGfxPos++, G_CK_NONE);
|
||||||
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE);
|
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
|
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
|
||||||
gSPClipRatio(gMasterGfxPos++, FRUSTRATIO_2);
|
gSPClipRatio(gMainGfxPos++, FRUSTRATIO_2);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
|
||||||
osVirtualToPhysical(nuGfxCfb_ptr));
|
osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
if (!(camera->flags & CAMERA_FLAG_ORTHO)) {
|
if (!(camera->flags & CAMERA_FLAG_ORTHO)) {
|
||||||
gSPPerspNormalize(gMasterGfxPos++, camera->perspNorm);
|
gSPPerspNormalize(gMainGfxPos++, camera->perspNorm);
|
||||||
}
|
}
|
||||||
|
|
||||||
guMtxF2L(camera->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]);
|
guMtxF2L(camera->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD |
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD |
|
||||||
G_MTX_PROJECTION);
|
G_MTX_PROJECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ void render_frame(s32 flag) {
|
|||||||
guOrthoF(camera->perspectiveMatrix, 0.0f, SCREEN_WIDTH, -SCREEN_HEIGHT, 0.0f, -1000.0f, 1000.0f,
|
guOrthoF(camera->perspectiveMatrix, 0.0f, SCREEN_WIDTH, -SCREEN_HEIGHT, 0.0f, -1000.0f, 1000.0f,
|
||||||
1.0f);
|
1.0f);
|
||||||
guMtxF2L(camera->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]);
|
guMtxF2L(camera->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH |
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH |
|
||||||
G_MTX_LOAD | G_MTX_PROJECTION);
|
G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
render_hud_elements_world();
|
render_hud_elements_world();
|
||||||
render_item_entities();
|
render_item_entities();
|
||||||
@ -217,10 +217,10 @@ void render_frame(s32 flag) {
|
|||||||
camera->fpDoPostRender(camera);
|
camera->fpDoPostRender(camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
|
||||||
osVirtualToPhysical(nuGfxCfb_ptr));
|
osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,17 +144,17 @@ void func_800F102C(void) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
s32 j;
|
s32 j;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x00, 0x00000000);
|
gSPSegment(gMainGfxPos++, 0x00, 0x00000000);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
gSPViewport(gMasterGfxPos++, &D_801096B0);
|
gSPViewport(gMainGfxPos++, &D_801096B0);
|
||||||
|
|
||||||
guOrthoF(sp20, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, -100.0f, 100.0f, 1.0f);
|
guOrthoF(sp20, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, -100.0f, 100.0f, 1.0f);
|
||||||
guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_80109710);
|
gSPDisplayList(gMainGfxPos++, D_80109710);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 127, 127, 127, 127);
|
gDPSetEnvColor(gMainGfxPos++, 127, 127, 127, 127);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8010D000); i++, outer++) {
|
for (i = 0; i < ARRAY_COUNT(D_8010D000); i++, outer++) {
|
||||||
outer = &D_8010D000[i];
|
outer = &D_8010D000[i];
|
||||||
@ -170,11 +170,11 @@ void func_800F102C(void) {
|
|||||||
it->x, it->y, 0.0f);
|
it->x, it->y, 0.0f);
|
||||||
guMtxF2L(sp60, &gDisplayContext->matrixStack[gMatrixListPos]);
|
guMtxF2L(sp60, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 80 - it->lodVal, it->rgba.r, it->rgba.g, it->rgba.b, it->rgba.a);
|
gDPSetPrimColor(gMainGfxPos++, 0, 80 - it->lodVal, it->rgba.r, it->rgba.g, it->rgba.b, it->rgba.a);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_801097D8);
|
gSPDisplayList(gMainGfxPos++, D_801097D8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1109,14 +1109,14 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt
|
|||||||
case POPUP_MENU_READ_POSTCARD:
|
case POPUP_MENU_READ_POSTCARD:
|
||||||
case POPUP_MENU_USEKEY:
|
case POPUP_MENU_USEKEY:
|
||||||
case POPUP_MENU_POST_OFFICE:
|
case POPUP_MENU_POST_OFFICE:
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1);
|
||||||
break;
|
break;
|
||||||
case POPUP_MENU_SWITCH_PARTNER:
|
case POPUP_MENU_SWITCH_PARTNER:
|
||||||
case POPUP_MENU_UPGRADE_PARTNER:
|
case POPUP_MENU_UPGRADE_PARTNER:
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, y, x + 90, y1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 90, y1);
|
||||||
break;
|
break;
|
||||||
case POPUP_MENU_THROW_AWAY_ITEM:
|
case POPUP_MENU_THROW_AWAY_ITEM:
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, y, x + 160, y1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 160, y1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1137,7 +1137,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt
|
|||||||
y = baseY;
|
y = baseY;
|
||||||
y1++;
|
y1++;
|
||||||
}
|
}
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, y, x + PopupContentScissorWidths[gPopupMenu->popupType], y1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + PopupContentScissorWidths[gPopupMenu->popupType], y1);
|
||||||
offset = 0;
|
offset = 0;
|
||||||
x = baseX + 32;
|
x = baseX + 32;
|
||||||
y = baseY + D_8010D658 + 2;
|
y = baseY + D_8010D658 + 2;
|
||||||
@ -1350,11 +1350,11 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt
|
|||||||
case POPUP_MENU_READ_POSTCARD:
|
case POPUP_MENU_READ_POSTCARD:
|
||||||
case POPUP_MENU_USEKEY:
|
case POPUP_MENU_USEKEY:
|
||||||
case POPUP_MENU_POST_OFFICE:
|
case POPUP_MENU_POST_OFFICE:
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 112, y1);
|
||||||
break;
|
break;
|
||||||
case POPUP_MENU_SWITCH_PARTNER:
|
case POPUP_MENU_SWITCH_PARTNER:
|
||||||
case POPUP_MENU_UPGRADE_PARTNER:
|
case POPUP_MENU_UPGRADE_PARTNER:
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, y, x + 100, y1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x, y, x + 100, y1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
66
src/B4580.c
66
src/B4580.c
@ -747,72 +747,72 @@ void appendGfx_animator(ModelAnimator* animator) {
|
|||||||
Matrix4f sp10;
|
Matrix4f sp10;
|
||||||
|
|
||||||
if (animator->baseAddr != NULL) {
|
if (animator->baseAddr != NULL) {
|
||||||
gSPSegment(gMasterGfxPos++, gAnimVtxSegment, VIRTUAL_TO_PHYSICAL(animator->baseAddr));
|
gSPSegment(gMainGfxPos++, gAnimVtxSegment, VIRTUAL_TO_PHYSICAL(animator->baseAddr));
|
||||||
}
|
}
|
||||||
|
|
||||||
gDisplayContext->matrixStack[gMatrixListPos] = animator->mtx;
|
gDisplayContext->matrixStack[gMatrixListPos] = animator->mtx;
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
//TODO find better match
|
//TODO find better match
|
||||||
switch (gAnimModelFogEnabled != 0) {
|
switch (gAnimModelFogEnabled != 0) {
|
||||||
case FALSE:
|
case FALSE:
|
||||||
switch (animator->renderMode) {
|
switch (animator->renderMode) {
|
||||||
case RENDER_MODE_SURFACE_OPA:
|
case RENDER_MODE_SURFACE_OPA:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014B7F8);
|
gSPDisplayList(gMainGfxPos++, D_8014B7F8);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_DECAL_OPA:
|
case RENDER_MODE_DECAL_OPA:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014B820);
|
gSPDisplayList(gMainGfxPos++, D_8014B820);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_INTERSECTING_OPA:
|
case RENDER_MODE_INTERSECTING_OPA:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014B848);
|
gSPDisplayList(gMainGfxPos++, D_8014B848);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_ALPHATEST:
|
case RENDER_MODE_ALPHATEST:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014B870);
|
gSPDisplayList(gMainGfxPos++, D_8014B870);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_SURFACE_XLU_LAYER1:
|
case RENDER_MODE_SURFACE_XLU_LAYER1:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014B898);
|
gSPDisplayList(gMainGfxPos++, D_8014B898);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_DECAL_XLU:
|
case RENDER_MODE_DECAL_XLU:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014B8C0);
|
gSPDisplayList(gMainGfxPos++, D_8014B8C0);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_INTERSECTING_XLU:
|
case RENDER_MODE_INTERSECTING_XLU:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014B8E8);
|
gSPDisplayList(gMainGfxPos++, D_8014B8E8);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TRUE:
|
case TRUE:
|
||||||
switch (animator->renderMode) {
|
switch (animator->renderMode) {
|
||||||
case RENDER_MODE_SURFACE_OPA:
|
case RENDER_MODE_SURFACE_OPA:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014BE78);
|
gSPDisplayList(gMainGfxPos++, D_8014BE78);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_DECAL_OPA:
|
case RENDER_MODE_DECAL_OPA:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014BEA0);
|
gSPDisplayList(gMainGfxPos++, D_8014BEA0);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_INTERSECTING_OPA:
|
case RENDER_MODE_INTERSECTING_OPA:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014BEC8);
|
gSPDisplayList(gMainGfxPos++, D_8014BEC8);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_ALPHATEST:
|
case RENDER_MODE_ALPHATEST:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014BEF0);
|
gSPDisplayList(gMainGfxPos++, D_8014BEF0);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_SURFACE_XLU_LAYER1:
|
case RENDER_MODE_SURFACE_XLU_LAYER1:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014BF18);
|
gSPDisplayList(gMainGfxPos++, D_8014BF18);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_DECAL_XLU:
|
case RENDER_MODE_DECAL_XLU:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014BF40);
|
gSPDisplayList(gMainGfxPos++, D_8014BF40);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_INTERSECTING_XLU:
|
case RENDER_MODE_INTERSECTING_XLU:
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014BF68);
|
gSPDisplayList(gMainGfxPos++, D_8014BF68);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetFogColor(gMasterGfxPos++, gAnimModelFogR, gAnimModelFogG, gAnimModelFogB, gAnimModelFogA);
|
gDPSetFogColor(gMainGfxPos++, gAnimModelFogR, gAnimModelFogG, gAnimModelFogB, gAnimModelFogA);
|
||||||
gSPFogPosition(gMasterGfxPos++, gAnimModelFogStart, gAnimModelFogEnd);
|
gSPFogPosition(gMainGfxPos++, gAnimModelFogStart, gAnimModelFogEnd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
guMtxL2F(sp10, &animator->mtx);
|
guMtxL2F(sp10, &animator->mtx);
|
||||||
appendGfx_animator_node(animator, animator->rootNode, sp10);
|
appendGfx_animator_node(animator, animator->rootNode, sp10);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NON_EQUIVALENT
|
#ifdef NON_EQUIVALENT
|
||||||
@ -837,31 +837,31 @@ void appendGfx_animator_node(ModelAnimator* animator, AnimatorNode* node, Matrix
|
|||||||
|
|
||||||
guMtxCatF(node->mtx, mtx, node->mtx);
|
guMtxCatF(node->mtx, mtx, node->mtx);
|
||||||
guMtxF2L(node->mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
guMtxF2L(node->mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
gSPTexture(gMasterGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
|
gSPTexture(gMainGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
|
||||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
|
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
|
||||||
if (animator->flags & MODEL_ANIMATOR_FLAG_CULL_BACK) {
|
if (animator->flags & MODEL_ANIMATOR_FLAG_CULL_BACK) {
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_BACK);
|
gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK);
|
||||||
}
|
}
|
||||||
if (!gAnimModelFogEnabled) {
|
if (!gAnimModelFogEnabled) {
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
} else {
|
} else {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
|
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
if (animator->fpRenderCallback != NULL) {
|
if (animator->fpRenderCallback != NULL) {
|
||||||
animator->fpRenderCallback(animator->renderCallbackArg);
|
animator->fpRenderCallback(animator->renderCallbackArg);
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
if (node->displayList != NULL) {
|
if (node->displayList != NULL) {
|
||||||
if (node->vertexStartOffset < 0) {
|
if (node->vertexStartOffset < 0) {
|
||||||
gSPDisplayList(gMasterGfxPos++, node->displayList);
|
gSPDisplayList(gMainGfxPos++, node->displayList);
|
||||||
} else {
|
} else {
|
||||||
dlSize = 0;
|
dlSize = 0;
|
||||||
if (node->displayList[dlSize].words.w0 >> 0x18 != G_ENDDL) {
|
if (node->displayList[dlSize].words.w0 >> 0x18 != G_ENDDL) {
|
||||||
@ -917,10 +917,10 @@ void appendGfx_animator_node(ModelAnimator* animator, AnimatorNode* node, Matrix
|
|||||||
}
|
}
|
||||||
} while (TRUE);
|
} while (TRUE);
|
||||||
gSPEndDisplayList(gfxPos++);
|
gSPEndDisplayList(gfxPos++);
|
||||||
gSPDisplayList(gMasterGfxPos++, bufferHandle->addr);
|
gSPDisplayList(gMainGfxPos++, bufferHandle->addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(node->children); i++) {
|
for (i = 0; i < ARRAY_COUNT(node->children); i++) {
|
||||||
if (node->children[i] != NULL) {
|
if (node->children[i] != NULL) {
|
||||||
|
280
src/C50A0.c
280
src/C50A0.c
@ -122,34 +122,34 @@ s32 draw_ci_image_with_clipping(IMG_PTR raster, s32 width, s32 height, s32 fmt,
|
|||||||
s16 posY, u16 clipULx, u16 clipULy, u16 clipLRx, u16 clipRLy, u8 opacity) {
|
s16 posY, u16 clipULx, u16 clipULy, u16 clipLRx, u16 clipRLy, u8 opacity) {
|
||||||
s32 ret;
|
s32 ret;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
|
|
||||||
if (opacity == 255) {
|
if (opacity == 255) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
} else if (opacity == 0) {
|
} else if (opacity == 0) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, opacity);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, opacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fmt == G_IM_FMT_CI) {
|
if (fmt == G_IM_FMT_CI) {
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
|
||||||
if (bitDepth == G_IM_SIZ_4b) {
|
if (bitDepth == G_IM_SIZ_4b) {
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, palette);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, palette);
|
||||||
} else {
|
} else {
|
||||||
gDPLoadTLUT_pal256(gMasterGfxPos++, palette);
|
gDPLoadTLUT_pal256(gMainGfxPos++, palette);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
}
|
}
|
||||||
ret = draw_image_with_clipping(raster, width, height, fmt, bitDepth, posX, posY, clipULx, clipULy, clipLRx, clipRLy);
|
ret = draw_image_with_clipping(raster, width, height, fmt, bitDepth, posX, posY, clipULx, clipULy, clipLRx, clipRLy);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,20 +252,20 @@ s32 draw_image_with_clipping(u8* img, u32 width, u32 height, s32 fmt, s32 bitDep
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bitDepth == G_IM_SIZ_4b) {
|
if (bitDepth == G_IM_SIZ_4b) {
|
||||||
gDPLoadTextureTile_4b(gMasterGfxPos++, img, fmt, width, height,
|
gDPLoadTextureTile_4b(gMainGfxPos++, img, fmt, width, height,
|
||||||
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
} else if (bitDepth == G_IM_SIZ_16b) {
|
} else if (bitDepth == G_IM_SIZ_16b) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, img, fmt, G_IM_SIZ_16b, width, height,
|
gDPLoadTextureTile(gMainGfxPos++, img, fmt, G_IM_SIZ_16b, width, height,
|
||||||
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
} else if (bitDepth == G_IM_SIZ_8b) {
|
} else if (bitDepth == G_IM_SIZ_8b) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, img, fmt, G_IM_SIZ_8b, width, height,
|
gDPLoadTextureTile(gMainGfxPos++, img, fmt, G_IM_SIZ_8b, width, height,
|
||||||
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPTextureRectangle(gMasterGfxPos++, drawRect.ulx * 4, drawRect.uly * 4, drawRect.lrx * 4, drawRect.lry * 4,
|
gSPTextureRectangle(gMainGfxPos++, drawRect.ulx * 4, drawRect.uly * 4, drawRect.lrx * 4, drawRect.lry * 4,
|
||||||
0, texOffsetX * 32, texOffsetY * 32, 1024, 1024);
|
0, texOffsetX * 32, texOffsetY * 32, 1024, 1024);
|
||||||
|
|
||||||
if (stopDrawingLine) {
|
if (stopDrawingLine) {
|
||||||
@ -388,16 +388,16 @@ s32 draw_tiled_image(IMG_PTR raster, u32 width, u32 height, u8 fmt, u8 bitDepth,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bitDepth == G_IM_SIZ_16b) {
|
if (bitDepth == G_IM_SIZ_16b) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, raster, fmt, G_IM_SIZ_16b, width, height,
|
gDPLoadTextureTile(gMainGfxPos++, raster, fmt, G_IM_SIZ_16b, width, height,
|
||||||
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
} else if (bitDepth == G_IM_SIZ_4b) {
|
} else if (bitDepth == G_IM_SIZ_4b) {
|
||||||
gDPLoadTextureTile_4b(gMasterGfxPos++, raster, fmt, width, height,
|
gDPLoadTextureTile_4b(gMainGfxPos++, raster, fmt, width, height,
|
||||||
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPTextureRectangle(gMasterGfxPos++, drawRect.ulx * 4, drawRect.uly * 4, (drawRect.lrx - stopDrawingLine) * 4, drawRect.lry * 4,
|
gSPTextureRectangle(gMainGfxPos++, drawRect.ulx * 4, drawRect.uly * 4, (drawRect.lrx - stopDrawingLine) * 4, drawRect.lry * 4,
|
||||||
0, texOffsetX, texOffsetY, dsdx, dtdy);
|
0, texOffsetX, texOffsetY, dsdx, dtdy);
|
||||||
|
|
||||||
if (stopDrawingLine) {
|
if (stopDrawingLine) {
|
||||||
@ -575,23 +575,23 @@ s32 draw_adjustable_tiled_image(IMG_PTR raster, u32 width, u32 height, u8 fmt, u
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bitDepth == G_IM_SIZ_4b) {
|
if (bitDepth == G_IM_SIZ_4b) {
|
||||||
gDPLoadTextureTile_4b(gMasterGfxPos++, raster, fmt, width, height,
|
gDPLoadTextureTile_4b(gMainGfxPos++, raster, fmt, width, height,
|
||||||
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
} else if (bitDepth == G_IM_SIZ_8b) {
|
} else if (bitDepth == G_IM_SIZ_8b) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, raster, fmt, G_IM_SIZ_8b, width, height,
|
gDPLoadTextureTile(gMainGfxPos++, raster, fmt, G_IM_SIZ_8b, width, height,
|
||||||
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
} else if (bitDepth == G_IM_SIZ_16b) {
|
} else if (bitDepth == G_IM_SIZ_16b) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, raster, fmt, G_IM_SIZ_16b, width, height,
|
gDPLoadTextureTile(gMainGfxPos++, raster, fmt, G_IM_SIZ_16b, width, height,
|
||||||
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
} else if (bitDepth == G_IM_SIZ_32b) {
|
} else if (bitDepth == G_IM_SIZ_32b) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, raster, fmt, G_IM_SIZ_32b, width, height,
|
gDPLoadTextureTile(gMainGfxPos++, raster, fmt, G_IM_SIZ_32b, width, height,
|
||||||
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
texRect.ulx, texRect.uly, texRect.lrx, texRect.lry, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
}
|
}
|
||||||
gSPTextureRectangle(gMasterGfxPos++, drawRect.ulx * 4, drawRect.uly * 4, drawRect.lrx * 4, drawRect.lry * 4,
|
gSPTextureRectangle(gMainGfxPos++, drawRect.ulx * 4, drawRect.uly * 4, drawRect.lrx * 4, drawRect.lry * 4,
|
||||||
0, texOffsetX, texOffsetY, dsdx, dtdy);
|
0, texOffsetX, texOffsetY, dsdx, dtdy);
|
||||||
|
|
||||||
if (stopDrawing) {
|
if (stopDrawing) {
|
||||||
@ -674,20 +674,20 @@ void draw_coin_sparkles(ItemEntity* itemEntity) {
|
|||||||
guMtxCatF(sp98, sp58, spD8);
|
guMtxCatF(sp98, sp58, spD8);
|
||||||
guMtxF2L(spD8, &gDisplayContext->matrixStack[gMatrixListPos]);
|
guMtxF2L(spD8, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
|
gSPClearGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
|
||||||
gSPSetLights1(gMasterGfxPos++, D_8014C6C8);
|
gSPSetLights1(gMainGfxPos++, D_8014C6C8);
|
||||||
gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_BILERP);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
|
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
|
||||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
|
||||||
gDPSetTextureConvert(gMasterGfxPos++, G_TC_FILT);
|
gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT);
|
||||||
gDPSetCombineKey(gMasterGfxPos++, G_CK_NONE);
|
gDPSetCombineKey(gMainGfxPos++, G_CK_NONE);
|
||||||
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE);
|
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
|
||||||
|
|
||||||
foldImage.raster = itemEntity->sparkleRaster;
|
foldImage.raster = itemEntity->sparkleRaster;
|
||||||
foldImage.palette = itemEntity->sparklePalette;
|
foldImage.palette = itemEntity->sparklePalette;
|
||||||
@ -698,8 +698,8 @@ void draw_coin_sparkles(ItemEntity* itemEntity) {
|
|||||||
foldImage.opacity = 255;
|
foldImage.opacity = 255;
|
||||||
fold_appendGfx_component(0, &foldImage, 0, spD8);
|
fold_appendGfx_component(0, &foldImage, 0, spD8);
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemEntity* get_item_entity(s32 itemEntityIndex) {
|
ItemEntity* get_item_entity(s32 itemEntityIndex) {
|
||||||
@ -1397,50 +1397,50 @@ void appendGfx_item_entity(void* data) {
|
|||||||
|
|
||||||
gDisplayContext->matrixStack[gMatrixListPos] = mtxTransform;
|
gDisplayContext->matrixStack[gMatrixListPos] = mtxTransform;
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (gSpriteShadingProfile->flags != 0) {
|
if (gSpriteShadingProfile->flags != 0) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014BBD8);
|
gSPDisplayList(gMainGfxPos++, D_8014BBD8);
|
||||||
} else {
|
} else {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014B870);
|
gSPDisplayList(gMainGfxPos++, D_8014B870);
|
||||||
}
|
}
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH | G_LIGHTING);
|
gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH | G_LIGHTING);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014C620);
|
gSPDisplayList(gMainGfxPos++, D_8014C620);
|
||||||
|
|
||||||
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
|
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
|
||||||
if (gSpriteShadingProfile->flags != 0) {
|
if (gSpriteShadingProfile->flags != 0) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
|
gDPSetRenderMode(gMainGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
|
||||||
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
|
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
|
||||||
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
|
gDPSetRenderMode(gMainGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
|
||||||
GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA),
|
GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA),
|
||||||
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
|
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL |
|
||||||
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0,
|
gDPSetCombineLERP(gMainGfxPos++, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0,
|
||||||
TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0);
|
TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, alpha);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_40000)) {
|
if (!(itemEntity->flags & ITEM_ENTITY_FLAG_40000)) {
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, gHudElementCacheTablePalette[itemEntity->lookupPaletteIndex].data);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[itemEntity->lookupPaletteIndex].data);
|
||||||
if (gSpriteShadingProfile->flags != 0) {
|
if (gSpriteShadingProfile->flags != 0) {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[itemEntity->lookupRasterIndex].data);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[itemEntity->lookupRasterIndex].data);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR |
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR |
|
||||||
G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8,
|
||||||
G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0x0400, 0x0400, 0x045C, 0x045C);
|
gDPSetTileSize(gMainGfxPos++, 1, 0x0400, 0x0400, 0x045C, 0x045C);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
|
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 0x00FC, 0);
|
||||||
|
|
||||||
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
|
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
|
||||||
func_801491E4(mtxTranslate, 0, 0, 0x18, 0x18, alpha);
|
func_801491E4(mtxTranslate, 0, 0, 0x18, 0x18, alpha);
|
||||||
@ -1448,54 +1448,54 @@ void appendGfx_item_entity(void* data) {
|
|||||||
func_801491E4(mtxTranslate, 0, 0, 0x18, 0x18, 255);
|
func_801491E4(mtxTranslate, 0, 0, 0x18, 0x18, 255);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[itemEntity->lookupRasterIndex].data);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[itemEntity->lookupRasterIndex].data);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x045C, 0x045C);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x045C, 0x045C);
|
||||||
}
|
}
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014C678);
|
gSPDisplayList(gMainGfxPos++, D_8014C678);
|
||||||
} else {
|
} else {
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, gHudElementCacheTablePalette[itemEntity->lookupPaletteIndex].data);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[itemEntity->lookupPaletteIndex].data);
|
||||||
if (gSpriteShadingProfile->flags != 0) {
|
if (gSpriteShadingProfile->flags != 0) {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[itemEntity->lookupRasterIndex].data);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[itemEntity->lookupRasterIndex].data);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP,
|
||||||
8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0x0400, 0x0400, 0x047C, 0x047C);
|
gDPSetTileSize(gMainGfxPos++, 1, 0x0400, 0x0400, 0x047C, 0x047C);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
|
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 0x00FC, 0);
|
||||||
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
|
if (itemEntity->flags & (ITEM_ENTITY_FLAG_8000000 | ITEM_ENTITY_FLAG_TRANSPARENT)) {
|
||||||
func_801491E4(mtxTranslate, 0, 0, 0x20, 0x20, alpha);
|
func_801491E4(mtxTranslate, 0, 0, 0x20, 0x20, alpha);
|
||||||
} else {
|
} else {
|
||||||
func_801491E4(mtxTranslate, 0, 0, 0x20, 0x20, 255);
|
func_801491E4(mtxTranslate, 0, 0, 0x20, 0x20, 255);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[itemEntity->lookupRasterIndex].data);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[itemEntity->lookupRasterIndex].data);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x047C, 0x047C);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x047C, 0x047C);
|
||||||
}
|
}
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014C6A0);
|
gSPDisplayList(gMainGfxPos++, D_8014C6A0);
|
||||||
}
|
}
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
if (itemEntity->itemID == ITEM_COIN) {
|
if (itemEntity->itemID == ITEM_COIN) {
|
||||||
draw_coin_sparkles(itemEntity);
|
draw_coin_sparkles(itemEntity);
|
||||||
@ -1606,15 +1606,15 @@ void render_item_entities(void) {
|
|||||||
guMtxCatF(sp98, sp58, sp58);
|
guMtxCatF(sp98, sp58, sp58);
|
||||||
guMtxF2L(sp58, &sp18);
|
guMtxF2L(sp58, &sp18);
|
||||||
gDisplayContext->matrixStack[gMatrixListPos] = sp18;
|
gDisplayContext->matrixStack[gMatrixListPos] = sp18;
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (gSpriteShadingProfile->flags != 0) {
|
if (gSpriteShadingProfile->flags != 0) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014BBD8);
|
gSPDisplayList(gMainGfxPos++, D_8014BBD8);
|
||||||
} else {
|
} else {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014B870);
|
gSPDisplayList(gMainGfxPos++, D_8014B870);
|
||||||
}
|
}
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
|
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014C620);
|
gSPDisplayList(gMainGfxPos++, D_8014C620);
|
||||||
|
|
||||||
alpha = 255;
|
alpha = 255;
|
||||||
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
|
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
|
||||||
@ -1627,76 +1627,76 @@ void render_item_entities(void) {
|
|||||||
}
|
}
|
||||||
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
|
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
|
||||||
if (gSpriteShadingProfile->flags) {
|
if (gSpriteShadingProfile->flags) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
|
gDPSetRenderMode(gMainGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | G_RM_PASS,
|
||||||
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA),
|
gDPSetRenderMode(gMainGfxPos++, AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA),
|
||||||
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
AA_EN | IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0);
|
gDPSetCombineLERP(gMainGfxPos++, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, alpha);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(item->flags & ITEM_ENTITY_FLAG_40000)) {
|
if (!(item->flags & ITEM_ENTITY_FLAG_40000)) {
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
|
||||||
if (gSpriteShadingProfile->flags) {
|
if (gSpriteShadingProfile->flags) {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0x0400, 0x0400, 0x045C, 0x045C);
|
gDPSetTileSize(gMainGfxPos++, 1, 0x0400, 0x0400, 0x045C, 0x045C);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
|
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 0x00FC, 0);
|
||||||
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
|
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
|
||||||
func_801491E4(sp58, 0, 0, 24, 24, alpha);
|
func_801491E4(sp58, 0, 0, 24, 24, alpha);
|
||||||
} else {
|
} else {
|
||||||
func_801491E4(sp58, 0, 0, 24, 24, 255);
|
func_801491E4(sp58, 0, 0, 24, 24, 255);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 12, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x002E, 0x005C);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x045C, 0x045C);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x045C, 0x045C);
|
||||||
}
|
}
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014C678);
|
gSPDisplayList(gMainGfxPos++, D_8014C678);
|
||||||
} else {
|
} else {
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, gHudElementCacheTablePalette[item->lookupPaletteIndex].data);
|
||||||
if (gSpriteShadingProfile->flags) {
|
if (gSpriteShadingProfile->flags) {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0x0400, 0x0400, 0x047C, 0x047C);
|
gDPSetTileSize(gMainGfxPos++, 1, 0x0400, 0x0400, 0x047C, 0x047C);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 1, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 0x00FC, 0);
|
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 0x00FC, 0);
|
||||||
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
|
if (item->flags & (ITEM_ENTITY_FLAG_TRANSPARENT | ITEM_ENTITY_FLAG_8000000)) {
|
||||||
func_801491E4(sp58, 0, 0, 32, 32, alpha);
|
func_801491E4(sp58, 0, 0, 32, 32, alpha);
|
||||||
} else {
|
} else {
|
||||||
func_801491E4(sp58, 0, 0, 32, 32, 255);
|
func_801491E4(sp58, 0, 0, 32, 32, 255);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 16, gHudElementCacheTableRaster[item->lookupRasterIndex].data);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 2, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 0x003E, 0x007C);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 2, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 8, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x047C, 0x047C);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0x0400, 0x0400, 0x047C, 0x047C);
|
||||||
}
|
}
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014C6A0);
|
gSPDisplayList(gMainGfxPos++, D_8014C6A0);
|
||||||
}
|
}
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
140
src/CEE40.c
140
src/CEE40.c
@ -42,32 +42,32 @@ void func_80138740(s32 x1, s32 y1, s32 x2, s32 y2, f32 arg4) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
|
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_NOISE);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
|
||||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, arg4);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, arg4);
|
||||||
|
|
||||||
for (i = 0; i < t9; i++) {
|
for (i = 0; i < t9; i++) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 6,
|
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 6,
|
||||||
x1, y1 + i * 6, x2 - 1, y1 + i * 6 + 5, 0,
|
x1, y1 + i * 6, x2 - 1, y1 + i * 6 + 5, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + 6) * 4,
|
gSPTextureRectangle(gMainGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + 6) * 4,
|
||||||
G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
|
G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sp10 != 0) {
|
if (sp10 != 0) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, sp10,
|
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, sp10,
|
||||||
x1, y1 + i * 6, x2 - 1, y1 + i * 6 + sp10 - 1, 0,
|
x1, y1 + i * 6, x2 - 1, y1 + i * 6 + sp10 - 1, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + sp10) * 4,
|
gSPTextureRectangle(gMainGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + sp10) * 4,
|
||||||
G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
|
G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -142,20 +142,20 @@ void func_80138E54(s32 arg0, s32 arg1, s32 arg2, f32 arg3, f32 arg4) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
guOrtho(&gDisplayContext->matrixStack[gMatrixListPos], -16.0f, 0.0f, 0.0f, 16.0f, -1000.0f, 1000.0f, 1.0f);
|
guOrtho(&gDisplayContext->matrixStack[gMatrixListPos], -16.0f, 0.0f, 0.0f, 16.0f, -1000.0f, 1000.0f, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, osVirtualToPhysical(nuGfxZBuffer));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, osVirtualToPhysical(nuGfxZBuffer));
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
|
||||||
gSPViewport(gMasterGfxPos++, &D_8014ED98);
|
gSPViewport(gMainGfxPos++, &D_8014ED98);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
|
||||||
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f, 1.0f);
|
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014EDE8);
|
gSPDisplayList(gMainGfxPos++, D_8014EDE8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0);
|
||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
f32 f20;
|
f32 f20;
|
||||||
@ -172,64 +172,64 @@ void func_80138E54(s32 arg0, s32 arg1, s32 arg2, f32 arg3, f32 arg4) {
|
|||||||
s0 = 255;
|
s0 = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, s0);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, s0);
|
||||||
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], i * 70 + f2, 0.0f, 0.0f, 1.0f);
|
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], i * 70 + f2, 0.0f, 0.0f, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
guScale(&gDisplayContext->matrixStack[gMatrixListPos], f20, f20, 1.0f);
|
guScale(&gDisplayContext->matrixStack[gMatrixListPos], f20, f20, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014EDE8);
|
gSPDisplayList(gMainGfxPos++, D_8014EDE8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_I, G_IM_SIZ_8b, 64, osVirtualToPhysical(nuGfxZBuffer));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_I, G_IM_SIZ_8b, 64, osVirtualToPhysical(nuGfxZBuffer));
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, 0, 0, 0, 1, 0, 0, 0, TEXEL0, 0, 0, 0, 1);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, 0, 0, 0, 1, 0, 0, 0, TEXEL0, 0, 0, 0, 1);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[i * 2048]), G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, 16, 0, 0, 63, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[i * 2048]), G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, 16, 0, 0, 63, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, 0, (i * 16) * 4, 64 * 4, (i * 16 + 16) * 4, G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
|
gSPTextureRectangle(gMainGfxPos++, 0, (i * 16) * 4, 64 * 4, (i * 16 + 16) * 4, G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(nuGfxZBuffer), G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, 0, 63, 63,
|
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(nuGfxZBuffer), G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, 0, 63, 63,
|
||||||
0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, 15, 15);
|
0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, 15, 15);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0, 0, 0x01FC, 0x01FC);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, 0, 0x01FC, 0x01FC);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, osVirtualToPhysical(nuGfxZBuffer));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, osVirtualToPhysical(nuGfxZBuffer));
|
||||||
gDPSetFillColor(gMasterGfxPos++, GPACK_ZDZ(G_MAXFBZ, 0)<<16 | GPACK_ZDZ(G_MAXFBZ, 0));
|
gDPSetFillColor(gMainGfxPos++, GPACK_ZDZ(G_MAXFBZ, 0)<<16 | GPACK_ZDZ(G_MAXFBZ, 0));
|
||||||
gDPFillRectangle(gMasterGfxPos++, 0, 0, 63, 63);
|
gDPFillRectangle(gMainGfxPos++, 0, 0, 63, 63);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_MAGICSQ);
|
gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_AVERAGE);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
||||||
|
|
||||||
if (arg3 != 255.0f || arg0 == 1) {
|
if (arg3 != 255.0f || arg0 == 1) {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE, 1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE);
|
gDPSetCombineLERP(gMainGfxPos++, 1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE, 1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE);
|
||||||
} else {
|
} else {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE, 0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE, 0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE);
|
||||||
}
|
}
|
||||||
arg3 *= 0.5f;
|
arg3 *= 0.5f;
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, arg3 * 0.5f * arg4 / 255.0f);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, arg3 * 0.5f * arg4 / 255.0f);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 255, 255, 255, (255.0f - arg3 * 0.5f) * arg4 / 255.0f);
|
gDPSetEnvColor(gMainGfxPos++, 255, 255, 255, (255.0f - arg3 * 0.5f) * arg4 / 255.0f);
|
||||||
|
|
||||||
if (arg0 == 0) {
|
if (arg0 == 0) {
|
||||||
gSPTextureRectangle(gMasterGfxPos++,
|
gSPTextureRectangle(gMainGfxPos++,
|
||||||
camera->viewportStartX * 4, camera->viewportStartY * 4,
|
camera->viewportStartX * 4, camera->viewportStartY * 4,
|
||||||
(camera->viewportStartX + camera->viewportW) * 4, (camera->viewportStartY + camera->viewportH) * 4,
|
(camera->viewportStartX + camera->viewportW) * 4, (camera->viewportStartY + camera->viewportH) * 4,
|
||||||
G_TX_RENDERTILE,
|
G_TX_RENDERTILE,
|
||||||
(12 - arg1) * 32.0f / texScale + 16.0f + 1024.0f, (19 - arg2) * 32.0f / texScale + 16.0f + 1024.0f,
|
(12 - arg1) * 32.0f / texScale + 16.0f + 1024.0f, (19 - arg2) * 32.0f / texScale + 16.0f + 1024.0f,
|
||||||
1024.0f / texScale, 1024.0f / texScale);
|
1024.0f / texScale, 1024.0f / texScale);
|
||||||
} else {
|
} else {
|
||||||
gSPTextureRectangle(gMasterGfxPos++,
|
gSPTextureRectangle(gMainGfxPos++,
|
||||||
camera->viewportStartX * 4, camera->viewportStartY * 4,
|
camera->viewportStartX * 4, camera->viewportStartY * 4,
|
||||||
(camera->viewportStartX + camera->viewportW) * 4, (camera->viewportStartY + camera->viewportH) * 4,
|
(camera->viewportStartX + camera->viewportW) * 4, (camera->viewportStartY + camera->viewportH) * 4,
|
||||||
G_TX_RENDERTILE,
|
G_TX_RENDERTILE,
|
||||||
@ -262,14 +262,14 @@ void func_80139F10(s32 arg0, s32 arg1, f32 alpha, s32 primR, s32 primG, s32 prim
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
|
||||||
if (alpha == 255.0f) {
|
if (alpha == 255.0f) {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1);
|
||||||
}
|
}
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primR, primG, primB, primA);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, primA);
|
||||||
texScale = (255.0f - alpha) * 10.5f / 255.0f + 0.09; // range from
|
texScale = (255.0f - alpha) * 10.5f / 255.0f + 0.09; // range from
|
||||||
gSPTextureRectangle(gMasterGfxPos++, x1 * 4, y1 * 4, x2 * 4, y2 * 4, G_TX_RENDERTILE,
|
gSPTextureRectangle(gMainGfxPos++, x1 * 4, y1 * 4, x2 * 4, y2 * 4, G_TX_RENDERTILE,
|
||||||
(t5 - arg0) * 32.0f / texScale + 16.0f + 1024.0f, (t6 - arg1) * 32.0f / texScale + 16.0f + 1024.0f,
|
(t5 - arg0) * 32.0f / texScale + 16.0f + 1024.0f, (t6 - arg1) * 32.0f / texScale + 16.0f + 1024.0f,
|
||||||
1024.0f / texScale, 1024.0f / texScale);
|
1024.0f / texScale, 1024.0f / texScale);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -1397,11 +1397,11 @@ void exec_entity_commandlist(Entity* entity) {
|
|||||||
|
|
||||||
void func_8010FD98(void* arg0, s32 alpha) {
|
void func_8010FD98(void* arg0, s32 alpha) {
|
||||||
if (alpha >= 255) {
|
if (alpha >= 255) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
} else {
|
} else {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1412,8 +1412,8 @@ void func_8010FE44(void* arg0) {
|
|||||||
void entity_model_set_shadow_color(void* data) {
|
void entity_model_set_shadow_color(void* data) {
|
||||||
s32 alpha = (s32)data;
|
s32 alpha = (s32)data;
|
||||||
|
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, 0, TEXEL0, 0, PRIMITIVE, 0);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, 0, TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
void render_entities(void) {
|
void render_entities(void) {
|
||||||
@ -3048,7 +3048,7 @@ void appendGfx_model(void* data) {
|
|||||||
|
|
||||||
s32 fogMin, fogMax;
|
s32 fogMin, fogMax;
|
||||||
s32 fogR, fogG, fogB, fogA;
|
s32 fogR, fogG, fogB, fogA;
|
||||||
Gfx** gfxPos = &gMasterGfxPos;
|
Gfx** gfxPos = &gMainGfxPos;
|
||||||
|
|
||||||
mtxPushMode = G_MTX_PUSH;
|
mtxPushMode = G_MTX_PUSH;
|
||||||
mtxLoadMode = G_MTX_LOAD;
|
mtxLoadMode = G_MTX_LOAD;
|
||||||
@ -3416,61 +3416,61 @@ void appendGfx_model(void* data) {
|
|||||||
gSPDisplayList((*gfxPos)++, D_8014AFC0[0x10]);
|
gSPDisplayList((*gfxPos)++, D_8014AFC0[0x10]);
|
||||||
switch (renderMode) {
|
switch (renderMode) {
|
||||||
case RENDER_MODE_SURFACE_OPA:
|
case RENDER_MODE_SURFACE_OPA:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_SURF2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_SURFACE_OPA_NO_AA:
|
case RENDER_MODE_SURFACE_OPA_NO_AA:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_SURF2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_DECAL_OPA:
|
case RENDER_MODE_DECAL_OPA:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_DECAL2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_DECAL2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_DECAL_OPA_NO_AA:
|
case RENDER_MODE_DECAL_OPA_NO_AA:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_DECAL2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_DECAL2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_INTERSECTING_OPA:
|
case RENDER_MODE_INTERSECTING_OPA:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_INTER2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_INTER2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_ALPHATEST:
|
case RENDER_MODE_ALPHATEST:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_ALPHATEST_ONESIDED:
|
case RENDER_MODE_ALPHATEST_ONESIDED:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_SURFACE_XLU_LAYER1:
|
case RENDER_MODE_SURFACE_XLU_LAYER1:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_SURFACE_XLU_LAYER2:
|
case RENDER_MODE_SURFACE_XLU_LAYER2:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_SURFACE_XLU_LAYER3:
|
case RENDER_MODE_SURFACE_XLU_LAYER3:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_SURFACE_XLU_NO_AA:
|
case RENDER_MODE_SURFACE_XLU_NO_AA:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_XLU_SURF2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_DECAL_XLU:
|
case RENDER_MODE_DECAL_XLU:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_DECAL_XLU_NOAA:
|
case RENDER_MODE_DECAL_XLU_NOAA:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_INTERSECTING_XLU:
|
case RENDER_MODE_INTERSECTING_XLU:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_INTER2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_INTER2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_SURFACE_OPA_NO_ZB:
|
case RENDER_MODE_SURFACE_OPA_NO_ZB:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_OPA_SURF2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_ALPHATEST_NO_ZB:
|
case RENDER_MODE_ALPHATEST_NO_ZB:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_TEX_EDGE2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_TEX_EDGE2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_SURFACE_XLU_NO_ZB:
|
case RENDER_MODE_SURFACE_XLU_NO_ZB:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_XLU_SURF2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_CLOUD:
|
case RENDER_MODE_CLOUD:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_CLD_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_CLD_SURF2);
|
||||||
break;
|
break;
|
||||||
case RENDER_MODE_CLOUD_NO_ZB:
|
case RENDER_MODE_CLOUD_NO_ZB:
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_CLD_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_CLD_SURF2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->r,
|
gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->r,
|
||||||
@ -3554,7 +3554,7 @@ void appendGfx_model(void* data) {
|
|||||||
fogMin = (gCurrentFogSettings->startDistance * (255 - mdl_bgMultiplyColorA) + 900 * mdl_bgMultiplyColorA) / 255;
|
fogMin = (gCurrentFogSettings->startDistance * (255 - mdl_bgMultiplyColorA) + 900 * mdl_bgMultiplyColorA) / 255;
|
||||||
fogMax = (gCurrentFogSettings->endDistance * (255 - mdl_bgMultiplyColorA) + 1000 * mdl_bgMultiplyColorA) / 255;
|
fogMax = (gCurrentFogSettings->endDistance * (255 - mdl_bgMultiplyColorA) + 1000 * mdl_bgMultiplyColorA) / 255;
|
||||||
|
|
||||||
gDPSetFogColor(gMasterGfxPos++, fogR, fogG, fogB, gCurrentFogSettings->a);
|
gDPSetFogColor(gMainGfxPos++, fogR, fogG, fogB, gCurrentFogSettings->a);
|
||||||
gSPFogPosition((*gfxPos)++, fogMin, fogMax);
|
gSPFogPosition((*gfxPos)++, fogMin, fogMax);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
@ -4592,7 +4592,7 @@ void func_80117D00(Model* model) {
|
|||||||
|
|
||||||
// this looks like a switch, but I can't figure it out
|
// this looks like a switch, but I can't figure it out
|
||||||
void render_transform_group_node(ModelNode* node) {
|
void render_transform_group_node(ModelNode* node) {
|
||||||
Gfx** gfx = &gMasterGfxPos;
|
Gfx** gfx = &gMainGfxPos;
|
||||||
Model* model;
|
Model* model;
|
||||||
|
|
||||||
if (node != NULL) {
|
if (node != NULL) {
|
||||||
@ -4644,7 +4644,7 @@ void render_transform_group_node(ModelNode* node) {
|
|||||||
// gfx temps needed
|
// gfx temps needed
|
||||||
void render_transform_group(void* data) {
|
void render_transform_group(void* data) {
|
||||||
ModelTransformGroup* group = data;
|
ModelTransformGroup* group = data;
|
||||||
Gfx** gfx = &gMasterGfxPos;
|
Gfx** gfx = &gMainGfxPos;
|
||||||
|
|
||||||
if (!(group->flags & MODEL_TRANSFORM_GROUP_FLAG_4)) {
|
if (!(group->flags & MODEL_TRANSFORM_GROUP_FLAG_4)) {
|
||||||
mdl_currentTransformGroupChildIndex = group->minChildModelIndex;
|
mdl_currentTransformGroupChildIndex = group->minChildModelIndex;
|
||||||
@ -5447,31 +5447,31 @@ void set_custom_gfx_builders(s32 customGfxIndex, ModelCustomGfxBuilderFunc pre,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void build_custom_gfx(void) {
|
void build_custom_gfx(void) {
|
||||||
Gfx* gfx = gMasterGfxPos;
|
Gfx* gfx = gMainGfxPos;
|
||||||
ModelCustomGfxBuilderFunc preFunc;
|
ModelCustomGfxBuilderFunc preFunc;
|
||||||
ModelCustomGfxBuilderFunc postFunc;
|
ModelCustomGfxBuilderFunc postFunc;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gSPBranchList(gMasterGfxPos++, 0x00000000);
|
gSPBranchList(gMainGfxPos++, 0x00000000);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(*gCurrentCustomModelGfxPtr) / 2; i++) {
|
for (i = 0; i < ARRAY_COUNT(*gCurrentCustomModelGfxPtr) / 2; i++) {
|
||||||
preFunc = (*gCurrentCustomModelGfxBuildersPtr)[i * 2];
|
preFunc = (*gCurrentCustomModelGfxBuildersPtr)[i * 2];
|
||||||
|
|
||||||
if (preFunc != NULL) {
|
if (preFunc != NULL) {
|
||||||
(*gCurrentCustomModelGfxPtr)[i * 2] = gMasterGfxPos;
|
(*gCurrentCustomModelGfxPtr)[i * 2] = gMainGfxPos;
|
||||||
preFunc(i);
|
preFunc(i);
|
||||||
gSPEndDisplayList(gMasterGfxPos++);
|
gSPEndDisplayList(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
postFunc = (*gCurrentCustomModelGfxBuildersPtr)[i * 2 + 1];
|
postFunc = (*gCurrentCustomModelGfxBuildersPtr)[i * 2 + 1];
|
||||||
if (postFunc != NULL) {
|
if (postFunc != NULL) {
|
||||||
(*gCurrentCustomModelGfxPtr)[i * 2 + 1] = gMasterGfxPos;
|
(*gCurrentCustomModelGfxPtr)[i * 2 + 1] = gMainGfxPos;
|
||||||
postFunc(i);
|
postFunc(i);
|
||||||
gSPEndDisplayList(gMasterGfxPos++);
|
gSPEndDisplayList(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPBranchList(gfx, gMasterGfxPos);
|
gSPBranchList(gfx, gMainGfxPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
// weird temps necessary to match
|
// weird temps necessary to match
|
||||||
@ -5917,39 +5917,39 @@ s32 is_model_center_visible(u16 modelID, s32 depthQueryID, f32* screenX, f32* sc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (outX >= 0.0f && outY >= 0.0f && outX < 320.0f && outY < 240.0f) {
|
if (outX >= 0.0f && outY >= 0.0f && outX < 320.0f && outY < 240.0f) {
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
// Load a 4x1 pixel tile of the depth buffer
|
// Load a 4x1 pixel tile of the depth buffer
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * 320]), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 1,
|
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * 320]), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 1,
|
||||||
(s32) outX, 0, (s32) outX + 3, 0,
|
(s32) outX, 0, (s32) outX + 3, 0,
|
||||||
0,
|
0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
9, G_TX_NOMASK,
|
9, G_TX_NOMASK,
|
||||||
G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
// Set the current color image to the buffer where copied depth values are stored.
|
// Set the current color image to the buffer where copied depth values are stored.
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, depthCopyBuffer);
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, depthCopyBuffer);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
// Set up 1 cycle mode and all other relevant othermode params.
|
// Set up 1 cycle mode and all other relevant othermode params.
|
||||||
// One cycle mode must be used here because only one pixel is copied, and copy mode only supports multiples of 4 pixels.
|
// One cycle mode must be used here because only one pixel is copied, and copy mode only supports multiples of 4 pixels.
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
|
||||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
|
||||||
// Adjust the scissor to only draw to the specified pixel.
|
// Adjust the scissor to only draw to the specified pixel.
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, depthQueryID, 0, depthQueryID + 1, 1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, depthQueryID, 0, depthQueryID + 1, 1);
|
||||||
// Draw a texrect to copy one pixel of the loaded depth tile to the output buffer.
|
// Draw a texrect to copy one pixel of the loaded depth tile to the output buffer.
|
||||||
gSPTextureRectangle(gMasterGfxPos++, depthQueryID << 2, 0 << 2, 4 << 2, 1 << 2, G_TX_RENDERTILE, (s32) outX << 5, 0, 1 << 10, 1 << 10);
|
gSPTextureRectangle(gMainGfxPos++, depthQueryID << 2, 0 << 2, 4 << 2, 1 << 2, G_TX_RENDERTILE, (s32) outX << 5, 0, 1 << 10, 1 << 10);
|
||||||
// Sync and swap the color image back to the current framebuffer.
|
// Sync and swap the color image back to the current framebuffer.
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
// Reconfigure the frame's normal scissor.
|
// Reconfigure the frame's normal scissor.
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);
|
||||||
|
|
||||||
// The following code will use last frame's depth value, since the copy that was just written won't be executed until the current frame is drawn.
|
// The following code will use last frame's depth value, since the copy that was just written won't be executed until the current frame is drawn.
|
||||||
|
|
||||||
@ -6023,39 +6023,39 @@ s32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* s
|
|||||||
return outZ > 0.0f;
|
return outZ > 0.0f;
|
||||||
}
|
}
|
||||||
if (outX >= 0.0f && outY >= 0.0f && outX < 320.0f && outY < 240.0f) {
|
if (outX >= 0.0f && outY >= 0.0f && outX < 320.0f && outY < 240.0f) {
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
// Load a 4x1 pixel tile of the depth buffer
|
// Load a 4x1 pixel tile of the depth buffer
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * 320]), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 1,
|
gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * 320]), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 1,
|
||||||
(s32) outX, 0, (s32) outX + 3, 0,
|
(s32) outX, 0, (s32) outX + 3, 0,
|
||||||
0,
|
0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
9, G_TX_NOMASK,
|
9, G_TX_NOMASK,
|
||||||
G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
// Set the current color image to the buffer where copied depth values are stored.
|
// Set the current color image to the buffer where copied depth values are stored.
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, depthCopyBuffer);
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, depthCopyBuffer);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
// Set up 1 cycle mode and all other relevant othermode params.
|
// Set up 1 cycle mode and all other relevant othermode params.
|
||||||
// One cycle mode must be used here because only one pixel is copied, and copy mode only supports multiples of 4 pixels.
|
// One cycle mode must be used here because only one pixel is copied, and copy mode only supports multiples of 4 pixels.
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
|
||||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
|
||||||
// Adjust the scissor to only draw to the specified pixel.
|
// Adjust the scissor to only draw to the specified pixel.
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, depthQueryID, 0, depthQueryID + 1, 1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, depthQueryID, 0, depthQueryID + 1, 1);
|
||||||
// Draw a texrect to copy one pixel of the loaded depth tile to the output buffer.
|
// Draw a texrect to copy one pixel of the loaded depth tile to the output buffer.
|
||||||
gSPTextureRectangle(gMasterGfxPos++, depthQueryID << 2, 0 << 2, (depthQueryID + 1) << 2, 1 << 2, G_TX_RENDERTILE, (s32) outX << 5, 0, 1 << 10, 1 << 10);
|
gSPTextureRectangle(gMainGfxPos++, depthQueryID << 2, 0 << 2, (depthQueryID + 1) << 2, 1 << 2, G_TX_RENDERTILE, (s32) outX << 5, 0, 1 << 10, 1 << 10);
|
||||||
// Sync and swap the color image back to the current framebuffer.
|
// Sync and swap the color image back to the current framebuffer.
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
// Reconfigure the frame's normal scissor.
|
// Reconfigure the frame's normal scissor.
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);
|
||||||
|
|
||||||
// The following code will use last frame's depth value, since the copy that was just written won't be executed until the current frame is drawn.
|
// The following code will use last frame's depth value, since the copy that was just written won't be executed until the current frame is drawn.
|
||||||
|
|
||||||
@ -6082,20 +6082,20 @@ void mdl_draw_hidden_panel_surface(Gfx** arg0, u16 treeIndex) {
|
|||||||
Gfx* oldGfxPos;
|
Gfx* oldGfxPos;
|
||||||
s32 flag;
|
s32 flag;
|
||||||
|
|
||||||
if (*arg0 == gMasterGfxPos) {
|
if (*arg0 == gMainGfxPos) {
|
||||||
flag = 1;
|
flag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
oldGfxPos = gMasterGfxPos;
|
oldGfxPos = gMainGfxPos;
|
||||||
gMasterGfxPos = *arg0;
|
gMainGfxPos = *arg0;
|
||||||
|
|
||||||
copied.flags = MODEL_FLAG_HAS_LOCAL_VERTEX_COPY | MODEL_FLAG_FLAG_1;
|
copied.flags = MODEL_FLAG_HAS_LOCAL_VERTEX_COPY | MODEL_FLAG_FLAG_1;
|
||||||
appendGfx_model(&copied);
|
appendGfx_model(&copied);
|
||||||
|
|
||||||
*arg0 = gMasterGfxPos;
|
*arg0 = gMainGfxPos;
|
||||||
|
|
||||||
if (flag == 0) {
|
if (flag == 0) {
|
||||||
gMasterGfxPos = oldGfxPos;
|
gMainGfxPos = oldGfxPos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6254,18 +6254,18 @@ void execute_render_tasks(void) {
|
|||||||
appendGfx = task->appendGfx;
|
appendGfx = task->appendGfx;
|
||||||
|
|
||||||
if (task->renderMode & RENDER_TASK_FLAG_REFLECT_FLOOR) {
|
if (task->renderMode & RENDER_TASK_FLAG_REFLECT_FLOOR) {
|
||||||
savedGfxPos = gMasterGfxPos++;
|
savedGfxPos = gMainGfxPos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
appendGfx(task->appendGfxArg);
|
appendGfx(task->appendGfxArg);
|
||||||
|
|
||||||
if (task->renderMode & RENDER_TASK_FLAG_REFLECT_FLOOR) {
|
if (task->renderMode & RENDER_TASK_FLAG_REFLECT_FLOOR) {
|
||||||
gSPEndDisplayList(gMasterGfxPos++);
|
gSPEndDisplayList(gMainGfxPos++);
|
||||||
gSPBranchList(savedGfxPos, gMasterGfxPos);
|
gSPBranchList(savedGfxPos, gMainGfxPos);
|
||||||
gSPDisplayList(gMasterGfxPos++, savedGfxPos + 1);
|
gSPDisplayList(gMainGfxPos++, savedGfxPos + 1);
|
||||||
gSPMatrix(gMasterGfxPos++, dispMtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, dispMtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||||
gSPDisplayList(gMasterGfxPos++, savedGfxPos + 1);
|
gSPDisplayList(gMainGfxPos++, savedGfxPos + 1);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -33,9 +33,9 @@ Gfx D_80074230[] = {
|
|||||||
//extern s32 timeFreezeMode; // TODO bss
|
//extern s32 timeFreezeMode; // TODO bss
|
||||||
|
|
||||||
void gfx_init_state(void) {
|
void gfx_init_state(void) {
|
||||||
gSPSegment(gMasterGfxPos++, 0x00, 0x0);
|
gSPSegment(gMainGfxPos++, 0x00, 0x0);
|
||||||
gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(D_80074230));
|
gSPDisplayList(gMainGfxPos++, OS_K0_TO_PHYSICAL(D_80074230));
|
||||||
gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(D_80074210));
|
gSPDisplayList(gMainGfxPos++, OS_K0_TO_PHYSICAL(D_80074210));
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 gfx_frame_filter_pass_0(const u16* frameBuffer0, const u16* frameBuffer1, s32 y, s32 x, Color_RGBA8* out) {
|
s32 gfx_frame_filter_pass_0(const u16* frameBuffer0, const u16* frameBuffer1, s32 y, s32 x, Color_RGBA8* out) {
|
||||||
@ -279,21 +279,21 @@ void func_80027BAC(s32 arg0, s32 arg1) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
s32 temp = 24; // todo figure out why this is needed and can't be used elsewhere
|
s32 temp = 24; // todo figure out why this is needed and can't be used elsewhere
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, arg1);
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, arg1);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_COPY);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_COPY);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
|
|
||||||
for (i = 0; i < 40; i++) {
|
for (i = 0; i < 40; i++) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, arg0 + (0xF00 * i), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
|
gDPLoadTextureTile(gMainGfxPos++, arg0 + (0xF00 * i), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
|
||||||
SCREEN_HEIGHT, 0, 0, SCREEN_WIDTH - 1, 5, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
SCREEN_HEIGHT, 0, 0, SCREEN_WIDTH - 1, 5, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, 0, i * temp, 0x04FC, (i * 24) + 20, G_TX_RENDERTILE, 0, 0, 0x1000, 0x0400);
|
gSPTextureRectangle(gMainGfxPos++, 0, i * temp, 0x04FC, (i * 24) + 20, G_TX_RENDERTILE, 0, 0, 0x1000, 0x0400);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ void gfx_draw_background(void) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
s32 a = SCREEN_COPY_TILE_HEIGHT << 2;
|
s32 a = SCREEN_COPY_TILE_HEIGHT << 2;
|
||||||
|
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
|
|
||||||
camera = &gCameras[gCurrentCameraID];
|
camera = &gCameras[gCurrentCameraID];
|
||||||
bgFlags = gGameStatusPtr->backgroundFlags & BACKGROUND_RENDER_STATE_MASK;
|
bgFlags = gGameStatusPtr->backgroundFlags & BACKGROUND_RENDER_STATE_MASK;
|
||||||
@ -322,16 +322,16 @@ void gfx_draw_background(void) {
|
|||||||
switch (bgFlags) {
|
switch (bgFlags) {
|
||||||
case BACKGROUND_RENDER_STATE_1:
|
case BACKGROUND_RENDER_STATE_1:
|
||||||
// Save coverage to nunGfxCfb[1] using the VISCVG render mode
|
// Save coverage to nunGfxCfb[1] using the VISCVG render mode
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb[1]);
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb[1]);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPSetBlendColor(gMasterGfxPos++, 0x80, 0x80, 0x80, 0xFF);
|
gDPSetBlendColor(gMainGfxPos++, 0x80, 0x80, 0x80, 0xFF);
|
||||||
gDPSetPrimDepth(gMasterGfxPos++, 0xFFFF, 0xFFFF);
|
gDPSetPrimDepth(gMainGfxPos++, 0xFFFF, 0xFFFF);
|
||||||
gDPSetDepthSource(gMasterGfxPos++, G_ZS_PRIM);
|
gDPSetDepthSource(gMainGfxPos++, G_ZS_PRIM);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_VISCVG, G_RM_VISCVG2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_VISCVG, G_RM_VISCVG2);
|
||||||
gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetDepthSource(gMasterGfxPos++, G_ZS_PIXEL);
|
gDPSetDepthSource(gMainGfxPos++, G_ZS_PIXEL);
|
||||||
gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK;
|
gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK;
|
||||||
gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_2;
|
gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_2;
|
||||||
break;
|
break;
|
||||||
@ -349,57 +349,57 @@ void gfx_draw_background(void) {
|
|||||||
gPauseBackgroundFade = 128;
|
gPauseBackgroundFade = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb_ptr);
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb_ptr);
|
||||||
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(0, 0, 0, 1));
|
gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(0, 0, 0, 1));
|
||||||
gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
// @bug In 1-cycle mode, the two combiner cycles should be identical. Using Texel1 here in the second cycle,
|
// @bug In 1-cycle mode, the two combiner cycles should be identical. Using Texel1 here in the second cycle,
|
||||||
// which is the actual cycle of the combiner used on hardware in 1-cycle mode, actually samples the next
|
// which is the actual cycle of the combiner used on hardware in 1-cycle mode, actually samples the next
|
||||||
// pixel's texel value instead of the current pixel's. This results in a one-pixel offset.
|
// pixel's texel value instead of the current pixel's. This results in a one-pixel offset.
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, PRIMITIVE, TEXEL0, PRIMITIVE_ALPHA, TEXEL0, 0, 0, 0, 1, PRIMITIVE,
|
gDPSetCombineLERP(gMainGfxPos++, PRIMITIVE, TEXEL0, PRIMITIVE_ALPHA, TEXEL0, 0, 0, 0, 1, PRIMITIVE,
|
||||||
TEXEL1, PRIMITIVE_ALPHA, TEXEL1, 0, 0, 0, 1);
|
TEXEL1, PRIMITIVE_ALPHA, TEXEL1, 0, 0, 0, 1);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 40, 40, 40, gPauseBackgroundFade);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 40, 40, 40, gPauseBackgroundFade);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
|
|
||||||
for (i = 0; i < 40; i++) {
|
for (i = 0; i < 40; i++) {
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, nuGfxZBuffer + (i * SCREEN_WIDTH * SCREEN_COPY_TILE_HEIGHT), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
|
gDPLoadTextureTile(gMainGfxPos++, nuGfxZBuffer + (i * SCREEN_WIDTH * SCREEN_COPY_TILE_HEIGHT), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
|
||||||
SCREEN_HEIGHT, 0, 0, SCREEN_WIDTH - 1, SCREEN_COPY_TILE_HEIGHT - 1, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
SCREEN_HEIGHT, 0, 0, SCREEN_WIDTH - 1, SCREEN_COPY_TILE_HEIGHT - 1, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
// @bug Due to the previous issue with the incorrect second cycle combiner, the devs added a 1-pixel offset to texture coordinates
|
// @bug Due to the previous issue with the incorrect second cycle combiner, the devs added a 1-pixel offset to texture coordinates
|
||||||
// in this texrect to compensate for the combiner error.
|
// in this texrect to compensate for the combiner error.
|
||||||
gSPTextureRectangle(gMasterGfxPos++,
|
gSPTextureRectangle(gMainGfxPos++,
|
||||||
// ulx, uly, lrx, lry
|
// ulx, uly, lrx, lry
|
||||||
0 << 2, i * a, SCREEN_WIDTH << 2, a + (i * (SCREEN_COPY_TILE_HEIGHT << 2)),
|
0 << 2, i * a, SCREEN_WIDTH << 2, a + (i * (SCREEN_COPY_TILE_HEIGHT << 2)),
|
||||||
// tile
|
// tile
|
||||||
G_TX_RENDERTILE,
|
G_TX_RENDERTILE,
|
||||||
// s, t, dsdx, dtdy
|
// s, t, dsdx, dtdy
|
||||||
-1 << 5, 0 << 5, 1 << 10, 1 << 10);
|
-1 << 5, 0 << 5, 1 << 10, 1 << 10);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// Draw the scene's background as normal
|
// Draw the scene's background as normal
|
||||||
if (gOverrideFlags & GLOBAL_OVERRIDES_8) {
|
if (gOverrideFlags & GLOBAL_OVERRIDES_8) {
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetDepthImage(gMasterGfxPos++, OS_K0_TO_PHYSICAL(nuGfxZBuffer));
|
gDPSetDepthImage(gMainGfxPos++, OS_K0_TO_PHYSICAL(nuGfxZBuffer));
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, OS_K0_TO_PHYSICAL(nuGfxZBuffer));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, OS_K0_TO_PHYSICAL(nuGfxZBuffer));
|
||||||
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_DEPTH(G_MAXFBZ, 0));
|
gDPSetFillColor(gMainGfxPos++, PACK_FILL_DEPTH(G_MAXFBZ, 0));
|
||||||
gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(camera->bgColor[0], camera->bgColor[1], camera->bgColor[2], 1));
|
gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(camera->bgColor[0], camera->bgColor[1], camera->bgColor[2], 1));
|
||||||
|
|
||||||
backgroundMinX = gGameStatusPtr->backgroundMinX;
|
backgroundMinX = gGameStatusPtr->backgroundMinX;
|
||||||
backgroundMaxX = backgroundMinX + gGameStatusPtr->backgroundMaxX;
|
backgroundMaxX = backgroundMinX + gGameStatusPtr->backgroundMaxX;
|
||||||
@ -456,37 +456,37 @@ void gfx_draw_background(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE)) {
|
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE)) {
|
||||||
gDPFillRectangle(gMasterGfxPos++, backgroundMinX, backgroundMinY, backgroundMaxX - 1, backgroundMaxY - 1);
|
gDPFillRectangle(gMainGfxPos++, backgroundMinX, backgroundMinY, backgroundMaxX - 1, backgroundMaxY - 1);
|
||||||
} else {
|
} else {
|
||||||
appendGfx_background_texture();
|
appendGfx_background_texture();
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||||
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(0, 0, 0, 1));
|
gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(0, 0, 0, 1));
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
if (backgroundMinY > 0) {
|
if (backgroundMinY > 0) {
|
||||||
gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH - 1, backgroundMinY - 1);
|
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH - 1, backgroundMinY - 1);
|
||||||
gDPNoOp(gMasterGfxPos++);
|
gDPNoOp(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (backgroundMinX > 0) {
|
if (backgroundMinX > 0) {
|
||||||
gDPFillRectangle(gMasterGfxPos++, 0, backgroundMinY, backgroundMinX - 1, backgroundMaxY - 1);
|
gDPFillRectangle(gMainGfxPos++, 0, backgroundMinY, backgroundMinX - 1, backgroundMaxY - 1);
|
||||||
gDPNoOp(gMasterGfxPos++);
|
gDPNoOp(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (backgroundMaxX < SCREEN_WIDTH) {
|
if (backgroundMaxX < SCREEN_WIDTH) {
|
||||||
gDPFillRectangle(gMasterGfxPos++, backgroundMaxX, backgroundMinY, SCREEN_WIDTH - 1, backgroundMaxY - 1);
|
gDPFillRectangle(gMainGfxPos++, backgroundMaxX, backgroundMinY, SCREEN_WIDTH - 1, backgroundMaxY - 1);
|
||||||
gDPNoOp(gMasterGfxPos++);
|
gDPNoOp(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (backgroundMaxY < SCREEN_HEIGHT) {
|
if (backgroundMaxY < SCREEN_HEIGHT) {
|
||||||
gDPFillRectangle(gMasterGfxPos++, 0, backgroundMaxY, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
gDPFillRectangle(gMainGfxPos++, 0, backgroundMaxY, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||||
gDPNoOp(gMasterGfxPos++);
|
gDPNoOp(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ void N(build_gfx_yellow_stars)(s32 index) {
|
|||||||
vtx->v.cn[2] = vtx->v.cn[0] * temp3 / 0x10000;
|
vtx->v.cn[2] = vtx->v.cn[0] * temp3 / 0x10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(index));
|
gSPDisplayList(gMainGfxPos++, mdl_get_copied_gfx(index));
|
||||||
N(StarPhaseAngles)[index] += (s32)RAD_TO_BINANG(25.1898);
|
N(StarPhaseAngles)[index] += (s32)RAD_TO_BINANG(25.1898);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ void N(build_gfx_blue_stars)(s32 index) {
|
|||||||
colors[2] = colors[0] * temp3 / 0x10000 + 99.6078431372549;
|
colors[2] = colors[0] * temp3 / 0x10000 + 99.6078431372549;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(index));
|
gSPDisplayList(gMainGfxPos++, mdl_get_copied_gfx(index));
|
||||||
N(StarPhaseAngles)[index] += (s32)RAD_TO_BINANG(25.1898);
|
N(StarPhaseAngles)[index] += (s32)RAD_TO_BINANG(25.1898);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ void N(build_gfx_green_stars)(s32 index) {
|
|||||||
colors[2] = colors[0] * temp3 / 0x10000 + 59.21568627450981;
|
colors[2] = colors[0] * temp3 / 0x10000 + 59.21568627450981;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(index));
|
gSPDisplayList(gMainGfxPos++, mdl_get_copied_gfx(index));
|
||||||
N(StarPhaseAngles)[index] += (s32)RAD_TO_BINANG(25.1898);
|
N(StarPhaseAngles)[index] += (s32)RAD_TO_BINANG(25.1898);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ void N(build_gfx_pink_stars)(s32 index) {
|
|||||||
colors[2] = colors[0] * temp3 / 0x10000 + 96.07843137254902;
|
colors[2] = colors[0] * temp3 / 0x10000 + 96.07843137254902;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(index));
|
gSPDisplayList(gMainGfxPos++, mdl_get_copied_gfx(index));
|
||||||
N(StarPhaseAngles)[index] += (s32)RAD_TO_BINANG(25.1898);
|
N(StarPhaseAngles)[index] += (s32)RAD_TO_BINANG(25.1898);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,8 +438,8 @@ void func_8021835C_59EA3C(void* data) {
|
|||||||
N(VineRenderState) = 1;
|
N(VineRenderState) = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8021CF40_5A3620);
|
gSPDisplayList(gMainGfxPos++, D_8021CF40_5A3620);
|
||||||
|
|
||||||
for (i = 0; i < NUM_VINES; i++) {
|
for (i = 0; i < NUM_VINES; i++) {
|
||||||
LavaPiranhaVine* vine = &N(VineData)[i];
|
LavaPiranhaVine* vine = &N(VineData)[i];
|
||||||
@ -452,10 +452,10 @@ void func_8021835C_59EA3C(void* data) {
|
|||||||
// here and leave space behind for the gSPBranchList command followed by two vertices
|
// here and leave space behind for the gSPBranchList command followed by two vertices
|
||||||
// for each point in numPoints
|
// for each point in numPoints
|
||||||
|
|
||||||
vtxBuffer = (Vtx_t*)(gMasterGfxPos + 1);
|
vtxBuffer = (Vtx_t*)(gMainGfxPos + 1);
|
||||||
gSPBranchList(gMasterGfxPos, &gMasterGfxPos[1 + 2 * (2 * numPoints)]);
|
gSPBranchList(gMainGfxPos, &gMainGfxPos[1 + 2 * (2 * numPoints)]);
|
||||||
vtx = (Vtx_t*) (++gMasterGfxPos);
|
vtx = (Vtx_t*) (++gMainGfxPos);
|
||||||
gMasterGfxPos = &gMasterGfxPos[2 * (2 * numPoints)];
|
gMainGfxPos = &gMainGfxPos[2 * (2 * numPoints)];
|
||||||
|
|
||||||
for (j = 0; j < numPoints; j++) {
|
for (j = 0; j < numPoints; j++) {
|
||||||
posX = vine->points[j].x;
|
posX = vine->points[j].x;
|
||||||
@ -505,12 +505,12 @@ void func_8021835C_59EA3C(void* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < numPoints - 1; j++) {
|
for (j = 0; j < numPoints - 1; j++) {
|
||||||
gSPVertex(gMasterGfxPos++, &vtxBuffer[2*j], 4, 0);
|
gSPVertex(gMainGfxPos++, &vtxBuffer[2*j], 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 1, 0, 2, 0, 1, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 1, 0, 2, 0, 1, 2, 3, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void N(worker_render_piranha_vines)(void) {
|
void N(worker_render_piranha_vines)(void) {
|
||||||
|
@ -24,7 +24,7 @@ void N(build_gfx_star)(s32 index) {
|
|||||||
vtx->v.cn[0] = vtx->v.cn[0] * temp3 / 0x10000;
|
vtx->v.cn[0] = vtx->v.cn[0] * temp3 / 0x10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(index));
|
gSPDisplayList(gMainGfxPos++, mdl_get_copied_gfx(index));
|
||||||
N(StarAnimPhases)[index] += 0x253;
|
N(StarAnimPhases)[index] += 0x253;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ void N(func_802A123C_72C7EC(void)) {
|
|||||||
if (D_802A25E4 < 6) {
|
if (D_802A25E4 < 6) {
|
||||||
if (D_802A25E4 > 0) {
|
if (D_802A25E4 > 0) {
|
||||||
draw_box(0, WINDOW_STYLE_7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
draw_box(0, WINDOW_STYLE_7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_802A25C8); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_802A25C8); i++) {
|
||||||
id = D_802A25C8[i];
|
id = D_802A25C8[i];
|
||||||
|
@ -52,7 +52,7 @@ void N(func_802A123C_73153C(void)) {
|
|||||||
if (D_802A2DEC < 6) {
|
if (D_802A2DEC < 6) {
|
||||||
if (D_802A2DEC > 0) {
|
if (D_802A2DEC > 0) {
|
||||||
draw_box(0, WINDOW_STYLE_7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
draw_box(0, WINDOW_STYLE_7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_802A2DD8); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_802A2DD8); i++) {
|
||||||
id = D_802A2DD8[i];
|
id = D_802A2DD8[i];
|
||||||
|
@ -202,137 +202,137 @@ void _render_transition_stencil(u8 arg0, f32 arg1, ScreenOverlay* overlay) {
|
|||||||
|
|
||||||
switch (arg0) {
|
switch (arg0) {
|
||||||
case 0:
|
case 0:
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_MAGICSQ);
|
gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
if (arg1 == 255.0f) {
|
if (arg1 == 255.0f) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
||||||
}
|
}
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, s3, s4, s5, arg1);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, s3, s4, s5, arg1);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
gDPFillRectangle(gMainGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
|
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
|
||||||
return;
|
return;
|
||||||
case 1:
|
case 1:
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_MAGICSQ);
|
gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
if (arg1 == 255.0f) {
|
if (arg1 == 255.0f) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
||||||
}
|
}
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, s3, s4, s5, arg1);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, s3, s4, s5, arg1);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
gDPFillRectangle(gMasterGfxPos++, camera->viewportStartX, camera->viewportStartY,
|
gDPFillRectangle(gMainGfxPos++, camera->viewportStartX, camera->viewportStartY,
|
||||||
camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);
|
camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
|
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
guOrtho(&matrixStack[gMatrixListPos], 0.0f, 320.0f, 0.0f, 240.0f, -1000.0f, 1000.0f, 1.0f);
|
guOrtho(&matrixStack[gMatrixListPos], 0.0f, 320.0f, 0.0f, 240.0f, -1000.0f, 1000.0f, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
|
|
||||||
switch (arg0) {
|
switch (arg0) {
|
||||||
case 4:
|
case 4:
|
||||||
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_Mario);
|
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_Mario);
|
||||||
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, gCurrentCameraID);
|
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, gCurrentCameraID);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_Mario);
|
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_Mario);
|
||||||
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, -1);
|
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, -1);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_Star);
|
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_Star);
|
||||||
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, gCurrentCameraID);
|
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, gCurrentCameraID);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_Star);
|
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_Star);
|
||||||
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, -1);
|
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, -1);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_SharpCircle);
|
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_SharpCircle);
|
||||||
func_80139F10(s1, s2, arg1, 0, 0, 0, 0, gCurrentCameraID);
|
func_80139F10(s1, s2, arg1, 0, 0, 0, 0, gCurrentCameraID);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_SharpCircle);
|
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_SharpCircle);
|
||||||
func_80139F10(s1, s2, arg1, 0, 0, 0, 0, -1);
|
func_80139F10(s1, s2, arg1, 0, 0, 0, 0, -1);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
s0 = arg1;
|
s0 = arg1;
|
||||||
guTranslate(&matrixStack[gMatrixListPos], 80.0f, 120.0f, 0.0f);
|
guTranslate(&matrixStack[gMatrixListPos], 80.0f, 120.0f, 0.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
guRotate(&matrixStack[gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
|
guRotate(&matrixStack[gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
|
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
guTranslate(&matrixStack[gMatrixListPos], 240.0f, 120.0f, 0.0f);
|
guTranslate(&matrixStack[gMatrixListPos], 240.0f, 120.0f, 0.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
guRotate(&matrixStack[gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
|
guRotate(&matrixStack[gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
|
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
|
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014EA48);
|
gSPDisplayList(gMainGfxPos++, D_8014EA48);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
s0 = arg1;
|
s0 = arg1;
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, 0);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 0);
|
||||||
guTranslate(&matrixStack[gMatrixListPos], s1, SCREEN_HEIGHT - s2, 0.0f);
|
guTranslate(&matrixStack[gMatrixListPos], s1, SCREEN_HEIGHT - s2, 0.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
guRotate(&matrixStack[gMatrixListPos], -s0, 0.0f, 0.0f, 1.0f);
|
guRotate(&matrixStack[gMatrixListPos], -s0, 0.0f, 0.0f, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
|
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
guTranslate(&matrixStack[gMatrixListPos], s6, SCREEN_HEIGHT - s7, 0.0f);
|
guTranslate(&matrixStack[gMatrixListPos], s6, SCREEN_HEIGHT - s7, 0.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
guRotate(&matrixStack[gMatrixListPos], -s0, 0.0f, 0.0f, 1.0f);
|
guRotate(&matrixStack[gMatrixListPos], -s0, 0.0f, 0.0f, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
|
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
|
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, f28);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, f28);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014E9A8);
|
gSPDisplayList(gMainGfxPos++, D_8014E9A8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
s0 = arg1;
|
s0 = arg1;
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, 0);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 0);
|
||||||
guTranslate(&matrixStack[gMatrixListPos], s1, SCREEN_HEIGHT - s2, 0.0f);
|
guTranslate(&matrixStack[gMatrixListPos], s1, SCREEN_HEIGHT - s2, 0.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
guRotate(&matrixStack[gMatrixListPos], (f32)(-s0) * 0.5, 0.0f, 0.0f, 1.0f);
|
guRotate(&matrixStack[gMatrixListPos], (f32)(-s0) * 0.5, 0.0f, 0.0f, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
|
gSPDisplayList(gMainGfxPos++, D_8014E8F0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
|
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, f28);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, f28);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_8014E9A8);
|
gSPDisplayList(gMainGfxPos++, D_8014E9A8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
v0 = arg1 + 40;
|
v0 = arg1 + 40;
|
||||||
if (arg1 > 170) {
|
if (arg1 > 170) {
|
||||||
v0 = 170;
|
v0 = 170;
|
||||||
@ -340,14 +340,14 @@ void _render_transition_stencil(u8 arg0, f32 arg1, ScreenOverlay* overlay) {
|
|||||||
func_80138D88(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, v0);
|
func_80138D88(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, v0);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_BlurryCircle);
|
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_BlurryCircle);
|
||||||
func_80138E54(1, s6, s7, f28, arg1);
|
func_80138E54(1, s6, s7, f28, arg1);
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
func_80138D88(s1, s2, s6, s7, arg1);
|
func_80138D88(s1, s2, s6, s7, arg1);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_BlurryCircle);
|
gSPDisplayList(gMainGfxPos++, Gfx_LoadStencilTex_BlurryCircle);
|
||||||
func_80138E54(0, s1, s2, f28, arg1);
|
func_80138E54(0, s1, s2, f28, arg1);
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
@ -355,7 +355,7 @@ void _render_transition_stencil(u8 arg0, f32 arg1, ScreenOverlay* overlay) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_screen_overlay_params_front(u8 type, f32 zoom) {
|
void set_screen_overlay_params_front(u8 type, f32 zoom) {
|
||||||
|
@ -228,14 +228,14 @@ void render_curtains(void) {
|
|||||||
f32 scale;
|
f32 scale;
|
||||||
s8 rgb;
|
s8 rgb;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
gSPDisplayList(gMasterGfxPos++, &D_800760C0);
|
gSPDisplayList(gMainGfxPos++, &D_800760C0);
|
||||||
|
|
||||||
guFrustumF(m, -80.0f, 80.0f, -60.0f, 60.0f, 160.0f, 640.0f, 1.0f);
|
guFrustumF(m, -80.0f, 80.0f, -60.0f, 60.0f, 160.0f, 640.0f, 1.0f);
|
||||||
guMtxF2L(m, &D_8009BAA8[0]);
|
guMtxF2L(m, &D_8009BAA8[0]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &D_8009BAA8[0], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &D_8009BAA8[0], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
|
|
||||||
scale = gCurtainScale - 0.01;
|
scale = gCurtainScale - 0.01;
|
||||||
if (scale < 1.0f) {
|
if (scale < 1.0f) {
|
||||||
@ -246,12 +246,12 @@ void render_curtains(void) {
|
|||||||
|
|
||||||
guMtxF2L(m, &D_8009BAA8[1]);
|
guMtxF2L(m, &D_8009BAA8[1]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &D_8009BAA8[1], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &D_8009BAA8[1], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
rgb = 255.0f - (gCurtainFade * 255.0f);
|
rgb = 255.0f - (gCurtainFade * 255.0f);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, rgb, rgb, rgb, 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, rgb, rgb, rgb, 255);
|
||||||
gSPDisplayList(gMasterGfxPos++, &D_80076078);
|
gSPDisplayList(gMainGfxPos++, &D_80076078);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gCurtainDrawCallback != NULL) {
|
if (gCurtainDrawCallback != NULL) {
|
||||||
@ -268,10 +268,10 @@ void render_curtains(void) {
|
|||||||
alpha = 255;
|
alpha = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, &D_800760C0);
|
gSPDisplayList(gMainGfxPos++, &D_800760C0);
|
||||||
gSPDisplayList(gMasterGfxPos++, &D_80077140);
|
gSPDisplayList(gMainGfxPos++, &D_80077140);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0xFF, 0x20, 0x10, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0xFF, 0x20, 0x10, alpha);
|
||||||
gSPDisplayList(gMasterGfxPos++, &D_800771E8);
|
gSPDisplayList(gMainGfxPos++, &D_800771E8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -724,18 +724,18 @@ void func_8013B1B0(FoldState* state, Matrix4f mtx) {
|
|||||||
s32 t1;
|
s32 t1;
|
||||||
s32 t2;
|
s32 t2;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
if (!(state->flags & FOLD_STATE_FLAG_10)) {
|
if (!(state->flags & FOLD_STATE_FLAG_10)) {
|
||||||
gSPDisplayList(gMasterGfxPos++, DefaultFoldSetupGfx);
|
gSPDisplayList(gMainGfxPos++, DefaultFoldSetupGfx);
|
||||||
if (state->flags & FOLD_STATE_FLAG_NO_FILTERING) {
|
if (state->flags & FOLD_STATE_FLAG_NO_FILTERING) {
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
}
|
}
|
||||||
if (state->flags & FOLD_STATE_FLAG_G_CULL_BACK) {
|
if (state->flags & FOLD_STATE_FLAG_G_CULL_BACK) {
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_BACK);
|
gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK);
|
||||||
}
|
}
|
||||||
if (state->flags & FOLD_STATE_FLAG_G_CULL_FRONT) {
|
if (state->flags & FOLD_STATE_FLAG_G_CULL_FRONT) {
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_FRONT);
|
gSPSetGeometryMode(gMainGfxPos++, G_CULL_FRONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
fold = &D_8014EE98[state->renderType];
|
fold = &D_8014EE98[state->renderType];
|
||||||
@ -777,9 +777,9 @@ void func_8013B1B0(FoldState* state, Matrix4f mtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (state->flags & FOLD_STATE_FLAG_40) {
|
if (state->flags & FOLD_STATE_FLAG_40) {
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_ZBUFFER);
|
gSPClearGeometryMode(gMainGfxPos++, G_ZBUFFER);
|
||||||
} else {
|
} else {
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_ZBUFFER);
|
gSPSetGeometryMode(gMainGfxPos++, G_ZBUFFER);
|
||||||
if (cond) {
|
if (cond) {
|
||||||
mode1 |= 0x10;
|
mode1 |= 0x10;
|
||||||
mode2 |= 0x10;
|
mode2 |= 0x10;
|
||||||
@ -789,77 +789,77 @@ void func_8013B1B0(FoldState* state, Matrix4f mtx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
state->unk_78 = mode2;
|
state->unk_78 = mode2;
|
||||||
gDPSetRenderMode(gMasterGfxPos++, mode1, mode2);
|
gDPSetRenderMode(gMainGfxPos++, mode1, mode2);
|
||||||
|
|
||||||
switch (renderType) {
|
switch (renderType) {
|
||||||
case FOLD_RENDER_TYPE_1:
|
case FOLD_RENDER_TYPE_1:
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1], state->unk_1C[1][2], 0);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1], state->unk_1C[1][2], 0);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_2:
|
case FOLD_RENDER_TYPE_2:
|
||||||
if (primColor <= 0) {
|
if (primColor <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0,
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0,
|
||||||
TEXEL0, 0, PRIMITIVE, 0);
|
TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, primColor);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, primColor);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_3:
|
case FOLD_RENDER_TYPE_3:
|
||||||
if (primColor <= 0) {
|
if (primColor <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1],
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1],
|
||||||
state->unk_1C[1][2], primColor);
|
state->unk_1C[1][2], primColor);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_4:
|
case FOLD_RENDER_TYPE_4:
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 1, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0, 1, PRIMITIVE,
|
gDPSetCombineLERP(gMainGfxPos++, 1, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0, 1, PRIMITIVE,
|
||||||
TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0);
|
TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1], state->unk_1C[1][2], 0);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1], state->unk_1C[1][2], 0);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_5:
|
case FOLD_RENDER_TYPE_5:
|
||||||
if (primColor <= 0) {
|
if (primColor <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 1, 0, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 1, 0, TEXEL0,
|
gDPSetCombineLERP(gMainGfxPos++, 1, 0, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 1, 0, TEXEL0,
|
||||||
PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
|
PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1],
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1],
|
||||||
state->unk_1C[1][2], primColor);
|
state->unk_1C[1][2], primColor);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_6:
|
case FOLD_RENDER_TYPE_6:
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
|
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_9:
|
case FOLD_RENDER_TYPE_9:
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 1, SHADE, TEXEL0, SHADE, 0, 0, 0, TEXEL0, 1, SHADE, TEXEL0, SHADE,
|
gDPSetCombineLERP(gMainGfxPos++, 1, SHADE, TEXEL0, SHADE, 0, 0, 0, TEXEL0, 1, SHADE, TEXEL0, SHADE,
|
||||||
0, 0, 0, TEXEL0);
|
0, 0, 0, TEXEL0);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
|
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_7:
|
case FOLD_RENDER_TYPE_7:
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0,
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0,
|
||||||
SHADE, 0);
|
SHADE, 0);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
|
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_8:
|
case FOLD_RENDER_TYPE_8:
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
|
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_A:
|
case FOLD_RENDER_TYPE_A:
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 1, SHADE, TEXEL0, SHADE, TEXEL0, 0, SHADE, 0, 1, SHADE, TEXEL0,
|
gDPSetCombineLERP(gMainGfxPos++, 1, SHADE, TEXEL0, SHADE, TEXEL0, 0, SHADE, 0, 1, SHADE, TEXEL0,
|
||||||
SHADE, TEXEL0, 0, SHADE, 0);
|
SHADE, TEXEL0, 0, SHADE, 0);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
|
gSPClearGeometryMode(gMainGfxPos++, G_LIGHTING);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_B:
|
case FOLD_RENDER_TYPE_B:
|
||||||
if (state->flags & (FOLD_STATE_FLAG_2000 | FOLD_STATE_FLAG_8000)) {
|
if (state->flags & (FOLD_STATE_FLAG_2000 | FOLD_STATE_FLAG_8000)) {
|
||||||
Camera* currentCam = &gCameras[gCurrentCameraID];
|
Camera* currentCam = &gCameras[gCurrentCameraID];
|
||||||
|
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gMainGfxPos++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
|
||||||
|
|
||||||
angle1 = cosine(currentCam->currentYaw) * 120.0f;
|
angle1 = cosine(currentCam->currentYaw) * 120.0f;
|
||||||
angle2 = cosine(currentCam->currentYaw + 90.0f) * 120.0f;
|
angle2 = cosine(currentCam->currentYaw + 90.0f) * 120.0f;
|
||||||
@ -869,24 +869,24 @@ void func_8013B1B0(FoldState* state, Matrix4f mtx) {
|
|||||||
D_8014EE18.l[1].l.dir[0] = angle1;
|
D_8014EE18.l[1].l.dir[0] = angle1;
|
||||||
D_8014EE18.l[0].l.dir[2] = angle2;
|
D_8014EE18.l[0].l.dir[2] = angle2;
|
||||||
D_8014EE18.l[1].l.dir[2] = t2;
|
D_8014EE18.l[1].l.dir[2] = t2;
|
||||||
gSPSetLights2(gMasterGfxPos++, D_8014EE18);
|
gSPSetLights2(gMainGfxPos++, D_8014EE18);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_C:
|
case FOLD_RENDER_TYPE_C:
|
||||||
if (state->unk_1C[1][0] == 0) {
|
if (state->unk_1C[1][0] == 0) {
|
||||||
primColor = state->unk_1C[1][3] * alphaComp;
|
primColor = state->unk_1C[1][3] * alphaComp;
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, NOISE, PRIMITIVE, PRIMITIVE, TEXEL0, TEXEL0, 0, PRIMITIVE, 0,
|
gDPSetCombineLERP(gMainGfxPos++, NOISE, PRIMITIVE, PRIMITIVE, TEXEL0, TEXEL0, 0, PRIMITIVE, 0,
|
||||||
NOISE, PRIMITIVE, PRIMITIVE, TEXEL0, TEXEL0, 0, PRIMITIVE, 0);
|
NOISE, PRIMITIVE, PRIMITIVE, TEXEL0, TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, state->unk_1C[1][1], state->unk_1C[1][1],
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->unk_1C[1][1], state->unk_1C[1][1],
|
||||||
state->unk_1C[1][1],primColor);
|
state->unk_1C[1][1],primColor);
|
||||||
} else if (state->unk_1C[1][0] == 1) {
|
} else if (state->unk_1C[1][0] == 1) {
|
||||||
primColor = state->unk_1C[1][3] * alphaComp;
|
primColor = state->unk_1C[1][3] * alphaComp;
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0,
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0,
|
||||||
TEXEL0, 0, PRIMITIVE, 0);
|
TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, primColor);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, primColor);
|
||||||
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_DITHER);
|
gDPSetAlphaCompare(gMainGfxPos++, G_AC_DITHER);
|
||||||
} else if (state->unk_1C[1][0] == 2) {
|
} else if (state->unk_1C[1][0] == 2) {
|
||||||
blendColor = state->unk_1C[1][3] + state->unk_1C[1][1];
|
blendColor = state->unk_1C[1][3] + state->unk_1C[1][1];
|
||||||
if (blendColor > 255) {
|
if (blendColor > 255) {
|
||||||
@ -894,28 +894,28 @@ void func_8013B1B0(FoldState* state, Matrix4f mtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
primColor = state->unk_1C[1][3] * alphaComp;
|
primColor = state->unk_1C[1][3] * alphaComp;
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0,
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0,
|
||||||
TEXEL0, 0, PRIMITIVE, 0);
|
TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_NOISE);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE);
|
||||||
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_THRESHOLD);
|
gDPSetAlphaCompare(gMainGfxPos++, G_AC_THRESHOLD);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, primColor);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, primColor);
|
||||||
gDPSetBlendColor(gMasterGfxPos++, 0, 0, 0, blendColor);
|
gDPSetBlendColor(gMainGfxPos++, 0, 0, 0, blendColor);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_D:
|
case FOLD_RENDER_TYPE_D:
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE, 0, 0, 0,
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE, 0, 0, 0,
|
||||||
TEXEL0);
|
TEXEL0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1], state->unk_1C[1][2], 0);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, state->unk_1C[1][0], state->unk_1C[1][1], state->unk_1C[1][2], 0);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_0:
|
case FOLD_RENDER_TYPE_0:
|
||||||
case FOLD_RENDER_TYPE_E:
|
case FOLD_RENDER_TYPE_E:
|
||||||
case FOLD_RENDER_TYPE_10:
|
case FOLD_RENDER_TYPE_10:
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
break;
|
break;
|
||||||
case FOLD_RENDER_TYPE_F:
|
case FOLD_RENDER_TYPE_F:
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0,
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0,
|
||||||
PRIMITIVE, 0);
|
PRIMITIVE, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, state->unk_1C[1][1]);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, state->unk_1C[1][1]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -933,16 +933,16 @@ void func_8013B1B0(FoldState* state, Matrix4f mtx) {
|
|||||||
break;
|
break;
|
||||||
case FOLD_MESH_TYPE_4:
|
case FOLD_MESH_TYPE_4:
|
||||||
func_8013CFA8(state, mtx);
|
func_8013CFA8(state, mtx);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
func_8013E904(state, mtx);
|
func_8013E904(state, mtx);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
if (state->renderType == FOLD_RENDER_TYPE_C) {
|
if (state->renderType == FOLD_RENDER_TYPE_C) {
|
||||||
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE);
|
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_DISABLE);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1326,8 +1326,8 @@ void func_8013CFA8(FoldState* state, Matrix4f mtx) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
if (!(state->flags & FOLD_STATE_FLAG_20)) {
|
if (!(state->flags & FOLD_STATE_FLAG_20)) {
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, fold_currentImage->palette);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, fold_currentImage->palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = state->firstVtxIdx;
|
i = state->firstVtxIdx;
|
||||||
@ -1351,7 +1351,7 @@ void func_8013CFA8(FoldState* state, Matrix4f mtx) {
|
|||||||
|| state->renderType == FOLD_RENDER_TYPE_F
|
|| state->renderType == FOLD_RENDER_TYPE_F
|
||||||
|| state->renderType == FOLD_RENDER_TYPE_7)
|
|| state->renderType == FOLD_RENDER_TYPE_7)
|
||||||
) {
|
) {
|
||||||
gDPScrollMultiTile2_4b(gMasterGfxPos++,
|
gDPScrollMultiTile2_4b(gMainGfxPos++,
|
||||||
fold_currentImage->raster, G_IM_FMT_CI,
|
fold_currentImage->raster, G_IM_FMT_CI,
|
||||||
fold_currentImage->width, fold_currentImage->height, // img size
|
fold_currentImage->width, fold_currentImage->height, // img size
|
||||||
uls, ult, // top left
|
uls, ult, // top left
|
||||||
@ -1361,10 +1361,10 @@ void func_8013CFA8(FoldState* state, Matrix4f mtx) {
|
|||||||
8, 8, // mask
|
8, 8, // mask
|
||||||
G_TX_NOLOD, G_TX_NOLOD, // shift,
|
G_TX_NOLOD, G_TX_NOLOD, // shift,
|
||||||
0x100, 0x100); // scroll
|
0x100, 0x100); // scroll
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMASK, G_TX_NOLOD);
|
G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 252, 0);
|
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 252, 0);
|
||||||
|
|
||||||
alpha = 255;
|
alpha = 255;
|
||||||
switch (state->renderType) {
|
switch (state->renderType) {
|
||||||
@ -1383,29 +1383,29 @@ void func_8013CFA8(FoldState* state, Matrix4f mtx) {
|
|||||||
cam = &gCameras[gCurrentCamID];
|
cam = &gCameras[gCurrentCamID];
|
||||||
|
|
||||||
if (gGameStatusPtr->isBattle == 2) {
|
if (gGameStatusPtr->isBattle == 2) {
|
||||||
gSPViewport(gMasterGfxPos++, &D_8014EE50);
|
gSPViewport(gMainGfxPos++, &D_8014EE50);
|
||||||
} else {
|
} else {
|
||||||
gSPViewport(gMasterGfxPos++, &cam->vpAlt);
|
gSPViewport(gMainGfxPos++, &cam->vpAlt);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_PASS, state->unk_78);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_PASS, state->unk_78);
|
||||||
|
|
||||||
if (alpha == -1) {
|
if (alpha == -1) {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, SHADE, 0, TEXEL1, 0, 0, 0, 0, 0, 0,
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, SHADE, 0, TEXEL1, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, COMBINED);
|
0, 0, COMBINED);
|
||||||
} else {
|
} else {
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 0, 0, 0, alpha);
|
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, alpha);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, ENVIRONMENT, 0, TEXEL1, 0, 0, 0, 0,
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, ENVIRONMENT, 0, TEXEL1, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, COMBINED);
|
0, 0, 0, 0, COMBINED);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPVertex(gMasterGfxPos++, &fold_vtxBuf[i], 4, 0);
|
gSPVertex(gMainGfxPos++, &fold_vtxBuf[i], 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
create_shading_palette(mtx, uls, ult, lrs, lrt, alpha, state->unk_78);
|
create_shading_palette(mtx, uls, ult, lrs, lrt, alpha, state->unk_78);
|
||||||
} else {
|
} else {
|
||||||
gDPScrollTextureTile_4b(gMasterGfxPos++,
|
gDPScrollTextureTile_4b(gMainGfxPos++,
|
||||||
fold_currentImage->raster, G_IM_FMT_CI,
|
fold_currentImage->raster, G_IM_FMT_CI,
|
||||||
fold_currentImage->width, fold_currentImage->height, // img size
|
fold_currentImage->width, fold_currentImage->height, // img size
|
||||||
uls, ult, // top left
|
uls, ult, // top left
|
||||||
@ -1421,15 +1421,15 @@ void func_8013CFA8(FoldState* state, Matrix4f mtx) {
|
|||||||
cam = &gCameras[gCurrentCamID];
|
cam = &gCameras[gCurrentCamID];
|
||||||
|
|
||||||
if (gGameStatusPtr->isBattle == 2) {
|
if (gGameStatusPtr->isBattle == 2) {
|
||||||
gSPViewport(gMasterGfxPos++, &D_8014EE50);
|
gSPViewport(gMainGfxPos++, &D_8014EE50);
|
||||||
} else {
|
} else {
|
||||||
gSPViewport(gMasterGfxPos++, &cam->vpAlt);
|
gSPViewport(gMainGfxPos++, &cam->vpAlt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alpha2 == 255) {
|
if (alpha2 == 255) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (state->renderType) {
|
switch (state->renderType) {
|
||||||
@ -1446,28 +1446,28 @@ void func_8013CFA8(FoldState* state, Matrix4f mtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (alpha2 == -1) {
|
if (alpha2 == -1) {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, SHADE, 0, TEXEL0, 0, 0, 0, 0, 0, SHADE, 0, TEXEL0, 0);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, SHADE, 0, TEXEL0, 0, 0, 0, 0, 0, SHADE, 0, TEXEL0, 0);
|
||||||
} else {
|
} else {
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 0, 0, 0, alpha2);
|
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, alpha2);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, ENVIRONMENT, 0, TEXEL0, 0, 0, 0, 0, 0,
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 0, ENVIRONMENT, 0, TEXEL0, 0, 0, 0, 0, 0,
|
||||||
ENVIRONMENT, 0, TEXEL0, 0);
|
ENVIRONMENT, 0, TEXEL0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPVertex(gMasterGfxPos++, &fold_vtxBuf[i], 4, 0);
|
gSPVertex(gMainGfxPos++, &fold_vtxBuf[i], 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
if (alpha2 == 255) {
|
if (alpha2 == 255) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_XLU_SURF, G_RM_ZB_XLU_SURF2);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 100, 100, 100, 255);
|
gDPSetEnvColor(gMainGfxPos++, 100, 100, 100, 255);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, alpha2);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha2);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, SHADE, ENVIRONMENT, TEXEL0, TEXEL0, 0, 0, 0, TEXEL0, SHADE,
|
gDPSetCombineLERP(gMainGfxPos++, SHADE, ENVIRONMENT, TEXEL0, TEXEL0, 0, 0, 0, TEXEL0, SHADE,
|
||||||
ENVIRONMENT, TEXEL0, TEXEL0, 0, 0, 0, TEXEL0);
|
ENVIRONMENT, TEXEL0, TEXEL0, 0, 0, 0, TEXEL0);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_MAGICSQ);
|
gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1475,16 +1475,16 @@ void func_8013CFA8(FoldState* state, Matrix4f mtx) {
|
|||||||
if ((gSpriteShadingProfile->flags & 2) && D_80156954[0][0].arrayIdx != 0 && (state->flags & someFlags)) {
|
if ((gSpriteShadingProfile->flags & 2) && D_80156954[0][0].arrayIdx != 0 && (state->flags & someFlags)) {
|
||||||
cam = &gCameras[gCurrentCamID];
|
cam = &gCameras[gCurrentCamID];
|
||||||
if (gGameStatusPtr->isBattle == 2) {
|
if (gGameStatusPtr->isBattle == 2) {
|
||||||
gSPViewport(gMasterGfxPos++, &D_8014EE40);
|
gSPViewport(gMainGfxPos++, &D_8014EE40);
|
||||||
D_8014EE50.vp.vtrans[0] = D_8014EE40.vp.vtrans[0] + gGameStatusPtr->unk_82;
|
D_8014EE50.vp.vtrans[0] = D_8014EE40.vp.vtrans[0] + gGameStatusPtr->unk_82;
|
||||||
D_8014EE50.vp.vtrans[1] = D_8014EE40.vp.vtrans[1] + gGameStatusPtr->unk_83;
|
D_8014EE50.vp.vtrans[1] = D_8014EE40.vp.vtrans[1] + gGameStatusPtr->unk_83;
|
||||||
} else {
|
} else {
|
||||||
gSPViewport(gMasterGfxPos++, &cam->vp);
|
gSPViewport(gMainGfxPos++, &cam->vp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPVertex(gMasterGfxPos++, &fold_vtxBuf[i], 4, 0);
|
gSPVertex(gMainGfxPos++, &fold_vtxBuf[i], 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
||||||
|
|
||||||
if (i + 3 >= state->lastVtxIdx) {
|
if (i + 3 >= state->lastVtxIdx) {
|
||||||
break;
|
break;
|
||||||
@ -1499,8 +1499,8 @@ void func_8013DAB4(FoldState* state, Matrix4f mtx) {
|
|||||||
s32 firstVtxIdx;
|
s32 firstVtxIdx;
|
||||||
|
|
||||||
if (!(state->flags & FOLD_STATE_FLAG_20)) {
|
if (!(state->flags & FOLD_STATE_FLAG_20)) {
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, fold_currentImage->palette);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, fold_currentImage->palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
firstVtxIdx = state->firstVtxIdx;
|
firstVtxIdx = state->firstVtxIdx;
|
||||||
@ -1518,7 +1518,7 @@ void func_8013DAB4(FoldState* state, Matrix4f mtx) {
|
|||||||
|| state->renderType == FOLD_RENDER_TYPE_2
|
|| state->renderType == FOLD_RENDER_TYPE_2
|
||||||
|| state->renderType == FOLD_RENDER_TYPE_7)) {
|
|| state->renderType == FOLD_RENDER_TYPE_7)) {
|
||||||
s32 alpha = 255;
|
s32 alpha = 255;
|
||||||
gDPScrollMultiTile2_4b(gMasterGfxPos++,
|
gDPScrollMultiTile2_4b(gMainGfxPos++,
|
||||||
fold_currentImage->raster, G_IM_FMT_CI,
|
fold_currentImage->raster, G_IM_FMT_CI,
|
||||||
fold_currentImage->width, fold_currentImage->height, // img size
|
fold_currentImage->width, fold_currentImage->height, // img size
|
||||||
(fold_vtxBuf[ulIdx].v.tc[0] >> 5) - 0x100, (fold_vtxBuf[ulIdx].v.tc[1] >> 5) - 0x100, // top left
|
(fold_vtxBuf[ulIdx].v.tc[0] >> 5) - 0x100, (fold_vtxBuf[ulIdx].v.tc[1] >> 5) - 0x100, // top left
|
||||||
@ -1528,8 +1528,8 @@ void func_8013DAB4(FoldState* state, Matrix4f mtx) {
|
|||||||
8, 8, // mask
|
8, 8, // mask
|
||||||
G_TX_NOLOD, G_TX_NOLOD, // shift,
|
G_TX_NOLOD, G_TX_NOLOD, // shift,
|
||||||
0x100, 0x100); // scroll
|
0x100, 0x100); // scroll
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 63 << 2, 0);
|
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 63 << 2, 0);
|
||||||
switch (state->renderType) {
|
switch (state->renderType) {
|
||||||
case FOLD_RENDER_TYPE_0:
|
case FOLD_RENDER_TYPE_0:
|
||||||
alpha = 255;
|
alpha = 255;
|
||||||
@ -1547,7 +1547,7 @@ void func_8013DAB4(FoldState* state, Matrix4f mtx) {
|
|||||||
(fold_vtxBuf[lrIdx].v.tc[0] >> 5) - 0x100, (fold_vtxBuf[lrIdx].v.tc[1] >> 5) - 0x100,
|
(fold_vtxBuf[lrIdx].v.tc[0] >> 5) - 0x100, (fold_vtxBuf[lrIdx].v.tc[1] >> 5) - 0x100,
|
||||||
alpha, state->unk_78);
|
alpha, state->unk_78);
|
||||||
} else {
|
} else {
|
||||||
gDPScrollTextureTile_4b(gMasterGfxPos++,
|
gDPScrollTextureTile_4b(gMainGfxPos++,
|
||||||
fold_currentImage->raster, G_IM_FMT_CI,
|
fold_currentImage->raster, G_IM_FMT_CI,
|
||||||
fold_currentImage->width, fold_currentImage->height, // img size
|
fold_currentImage->width, fold_currentImage->height, // img size
|
||||||
(fold_vtxBuf[ulIdx].v.tc[0] >> 5) - 0x100, (fold_vtxBuf[ulIdx].v.tc[1] >> 5) - 0x100, // top left
|
(fold_vtxBuf[ulIdx].v.tc[0] >> 5) - 0x100, (fold_vtxBuf[ulIdx].v.tc[1] >> 5) - 0x100, // top left
|
||||||
@ -1560,11 +1560,11 @@ void func_8013DAB4(FoldState* state, Matrix4f mtx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPVertex(gMasterGfxPos++, &fold_vtxBuf[ulIdx], 1, 0);
|
gSPVertex(gMainGfxPos++, &fold_vtxBuf[ulIdx], 1, 0);
|
||||||
gSPVertex(gMasterGfxPos++, &fold_vtxBuf[urIdx], 1, 1);
|
gSPVertex(gMainGfxPos++, &fold_vtxBuf[urIdx], 1, 1);
|
||||||
gSPVertex(gMasterGfxPos++, &fold_vtxBuf[llIdx], 1, 2);
|
gSPVertex(gMainGfxPos++, &fold_vtxBuf[llIdx], 1, 2);
|
||||||
gSPVertex(gMasterGfxPos++, &fold_vtxBuf[lrIdx], 1, 3);
|
gSPVertex(gMainGfxPos++, &fold_vtxBuf[lrIdx], 1, 3);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1575,11 +1575,11 @@ void func_8013E2F0(FoldState* state, Matrix4f mtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
guScale(&gDisplayContext->matrixStack[gMatrixListPos], 0.1f, 0.1f, 0.1f);
|
guScale(&gDisplayContext->matrixStack[gMatrixListPos], 0.1f, 0.1f, 0.1f);
|
||||||
gSPMatrix(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (!(state->flags & FOLD_STATE_FLAG_20)) {
|
if (!(state->flags & FOLD_STATE_FLAG_20)) {
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, fold_currentImage->palette);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, fold_currentImage->palette);
|
||||||
if ((gSpriteShadingProfile->flags & 1)
|
if ((gSpriteShadingProfile->flags & 1)
|
||||||
&& (state->flags & (FOLD_STATE_FLAG_100000 | FOLD_STATE_FLAG_80000))
|
&& (state->flags & (FOLD_STATE_FLAG_100000 | FOLD_STATE_FLAG_80000))
|
||||||
&& (state->renderType == FOLD_RENDER_TYPE_0
|
&& (state->renderType == FOLD_RENDER_TYPE_0
|
||||||
@ -1588,14 +1588,14 @@ void func_8013E2F0(FoldState* state, Matrix4f mtx) {
|
|||||||
|| state->renderType == FOLD_RENDER_TYPE_B)
|
|| state->renderType == FOLD_RENDER_TYPE_B)
|
||||||
) {
|
) {
|
||||||
s32 alpha = 255;
|
s32 alpha = 255;
|
||||||
gDPScrollMultiTile2_4b(gMasterGfxPos++, fold_currentImage->raster, G_IM_FMT_CI,
|
gDPScrollMultiTile2_4b(gMainGfxPos++, fold_currentImage->raster, G_IM_FMT_CI,
|
||||||
fold_currentImage->width, fold_currentImage->height,
|
fold_currentImage->width, fold_currentImage->height,
|
||||||
0, 0, fold_currentImage->width - 1, fold_currentImage->height - 1, 0,
|
0, 0, fold_currentImage->width - 1, fold_currentImage->height - 1, 0,
|
||||||
G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD,
|
G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD,
|
||||||
256, 256);
|
256, 256);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0,
|
||||||
G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 2, 0, 0, 252, 0);
|
gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 252, 0);
|
||||||
|
|
||||||
switch (state->renderType) {
|
switch (state->renderType) {
|
||||||
case FOLD_RENDER_TYPE_0:
|
case FOLD_RENDER_TYPE_0:
|
||||||
@ -1612,15 +1612,15 @@ void func_8013E2F0(FoldState* state, Matrix4f mtx) {
|
|||||||
}
|
}
|
||||||
create_shading_palette(mtx, 0, 0, fold_currentImage->width, fold_currentImage->height, alpha, state->unk_78);
|
create_shading_palette(mtx, 0, 0, fold_currentImage->width, fold_currentImage->height, alpha, state->unk_78);
|
||||||
} else {
|
} else {
|
||||||
gDPScrollTextureTile_4b(gMasterGfxPos++, fold_currentImage->raster, G_IM_FMT_CI,
|
gDPScrollTextureTile_4b(gMainGfxPos++, fold_currentImage->raster, G_IM_FMT_CI,
|
||||||
fold_currentImage->width, fold_currentImage->height,
|
fold_currentImage->width, fold_currentImage->height,
|
||||||
0, 0, fold_currentImage->width - 1, fold_currentImage->height - 1, 0,
|
0, 0, fold_currentImage->width - 1, fold_currentImage->height - 1, 0,
|
||||||
G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD,
|
G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD,
|
||||||
256, 256);
|
256, 256);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gSPDisplayList(gMasterGfxPos++, state->gfxBufs[gCurrentDisplayContextIndex]);
|
gSPDisplayList(gMainGfxPos++, state->gfxBufs[gCurrentDisplayContextIndex]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8013E904(FoldState* state, Matrix4f mtx) {
|
void func_8013E904(FoldState* state, Matrix4f mtx) {
|
||||||
@ -1631,19 +1631,19 @@ void func_8013E904(FoldState* state, Matrix4f mtx) {
|
|||||||
s32 lrs, lrt;
|
s32 lrs, lrt;
|
||||||
|
|
||||||
guScale(&gDisplayContext->matrixStack[gMatrixListPos], (f32)fold_currentImage->width / 100.0, (f32)fold_currentImage->height / 100.0, 1.0f);
|
guScale(&gDisplayContext->matrixStack[gMatrixListPos], (f32)fold_currentImage->width / 100.0, (f32)fold_currentImage->height / 100.0, 1.0f);
|
||||||
gSPMatrix(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_ZB_XLU_DECAL, G_RM_ZB_XLU_DECAL2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_XLU_DECAL, G_RM_ZB_XLU_DECAL2);
|
||||||
|
|
||||||
if (state->renderType == FOLD_RENDER_TYPE_F) {
|
if (state->renderType == FOLD_RENDER_TYPE_F) {
|
||||||
s32 temp = state->unk_1C[1][1];
|
s32 temp = state->unk_1C[1][1];
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, temp);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, temp);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0);
|
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0);
|
||||||
} else {
|
} else {
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
}
|
}
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 0, ufs->palette);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, ufs->palette);
|
||||||
gDPScrollTextureTile_4b(gMasterGfxPos++, ufs->raster, G_IM_FMT_CI, ufs->width, ufs->height,
|
gDPScrollTextureTile_4b(gMainGfxPos++, ufs->raster, G_IM_FMT_CI, ufs->width, ufs->height,
|
||||||
0, 0, ufs->width - 1, ufs->height - 1, 0,
|
0, 0, ufs->width - 1, ufs->height - 1, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, shifts, shiftt, G_TX_NOLOD, G_TX_NOLOD,
|
G_TX_WRAP, G_TX_WRAP, shifts, shiftt, G_TX_NOLOD, G_TX_NOLOD,
|
||||||
256, 256);
|
256, 256);
|
||||||
@ -1652,12 +1652,12 @@ void func_8013E904(FoldState* state, Matrix4f mtx) {
|
|||||||
ult = state->unk_3C[1][1];
|
ult = state->unk_3C[1][1];
|
||||||
lrs = ufs->width * 4 + state->unk_3C[1][0];
|
lrs = ufs->width * 4 + state->unk_3C[1][0];
|
||||||
lrt = ufs->height * 4 + state->unk_3C[1][1];
|
lrt = ufs->height * 4 + state->unk_3C[1][1];
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, uls, ult, lrs, lrt);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, lrs, lrt);
|
||||||
|
|
||||||
state->unk_3C[1][0] = (s32)(state->unk_3C[1][0] + ufs->unk_0C) % (ufs->width * 4);
|
state->unk_3C[1][0] = (s32)(state->unk_3C[1][0] + ufs->unk_0C) % (ufs->width * 4);
|
||||||
state->unk_3C[1][1] = (s32)(state->unk_3C[1][1] + ufs->unk_10) % (ufs->height * 4);
|
state->unk_3C[1][1] = (s32)(state->unk_3C[1][1] + ufs->unk_10) % (ufs->height * 4);
|
||||||
gSPDisplayList(gMasterGfxPos++, ufs->unk_14);
|
gSPDisplayList(gMainGfxPos++, ufs->unk_14);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8013EE48(FoldState* state) {
|
void func_8013EE48(FoldState* state) {
|
||||||
|
@ -198,19 +198,19 @@ void appendGfx_background_texture(void) {
|
|||||||
bgMinX = gGameStatusPtr->backgroundMinX;
|
bgMinX = gGameStatusPtr->backgroundMinX;
|
||||||
bgMinY = gGameStatusPtr->backgroundMinY;
|
bgMinY = gGameStatusPtr->backgroundMinY;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_COPY);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_COPY);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGB, G_CC_DECALRGB);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGB, G_CC_DECALRGB);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
|
|
||||||
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_FOG)) {
|
if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_FOG)) {
|
||||||
gDPLoadTLUT_pal256(gMasterGfxPos++, gGameStatusPtr->backgroundPalette);
|
gDPLoadTLUT_pal256(gMainGfxPos++, gGameStatusPtr->backgroundPalette);
|
||||||
} else {
|
} else {
|
||||||
gDPLoadTLUT_pal256(gMasterGfxPos++, gBackgroundPalette);
|
gDPLoadTLUT_pal256(gMainGfxPos++, gBackgroundPalette);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gBackroundWaveEnabled) {
|
if (!gBackroundWaveEnabled) {
|
||||||
@ -222,15 +222,15 @@ void appendGfx_background_texture(void) {
|
|||||||
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
||||||
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
||||||
}
|
}
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
|
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
|
||||||
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, 6,
|
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, 6,
|
||||||
0, 0, 295, 5, 0,
|
0, 0, 295, 5, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
|
|
||||||
gSPTextureRectangle(gMasterGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
||||||
(bgXOffset + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
|
(bgXOffset + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
|
||||||
G_TX_RENDERTILE, (bgMaxX - bgXOffset) * 32, 0, 4096, 1024);
|
G_TX_RENDERTILE, (bgMaxX - bgXOffset) * 32, 0, 4096, 1024);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, (bgXOffset + bgMinX) * 4, (lineHeight * i + bgMinY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, (bgXOffset + bgMinX) * 4, (lineHeight * i + bgMinY) * 4,
|
||||||
(bgMaxX + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
|
(bgMaxX + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
|
||||||
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
||||||
}
|
}
|
||||||
@ -239,14 +239,14 @@ void appendGfx_background_texture(void) {
|
|||||||
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
||||||
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
||||||
}
|
}
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
|
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
|
||||||
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, extraHeight,
|
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, extraHeight,
|
||||||
0, 0, 295, extraHeight - 1, 0,
|
0, 0, 295, extraHeight - 1, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
||||||
(bgXOffset + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4,
|
(bgXOffset + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4,
|
||||||
G_TX_RENDERTILE, (bgMaxX - bgXOffset) * 32, 0, 4096, 1024);
|
G_TX_RENDERTILE, (bgMaxX - bgXOffset) * 32, 0, 4096, 1024);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, (bgXOffset + bgMinX) * 4, (lineHeight * i + bgMinY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, (bgXOffset + bgMinX) * 4, (lineHeight * i + bgMinY) * 4,
|
||||||
(bgMaxX + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4,
|
(bgMaxX + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4,
|
||||||
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
||||||
}
|
}
|
||||||
@ -262,15 +262,15 @@ void appendGfx_background_texture(void) {
|
|||||||
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
||||||
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
||||||
}
|
}
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
|
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
|
||||||
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, 6,
|
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, 6,
|
||||||
0, 0, 295, 5, 0,
|
0, 0, 295, 5, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
|
|
||||||
gSPTextureRectangle(gMasterGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
||||||
(2 * bgXOffset + (bgMinX - 1)) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
|
(2 * bgXOffset + (bgMinX - 1)) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
|
||||||
G_TX_RENDERTILE, bgMaxX * 32 - bgXOffset * 16, 0, 4096, 1024);
|
G_TX_RENDERTILE, bgMaxX * 32 - bgXOffset * 16, 0, 4096, 1024);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, bgXOffset * 2 + bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, bgXOffset * 2 + bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
||||||
(bgMaxX + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
|
(bgMaxX + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4,
|
||||||
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
||||||
}
|
}
|
||||||
@ -281,14 +281,14 @@ void appendGfx_background_texture(void) {
|
|||||||
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
if (texOffsetY > gGameStatusPtr->backgroundMaxY) {
|
||||||
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
texOffsetY -= gGameStatusPtr->backgroundMaxY;
|
||||||
}
|
}
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
|
gDPLoadTextureTile(gMainGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY,
|
||||||
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, extraHeight,
|
G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, extraHeight,
|
||||||
0, 0, 295, extraHeight - 1, 0,
|
0, 0, 295, extraHeight - 1, 0,
|
||||||
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
||||||
(2 * bgXOffset + (bgMinX - 1)) * 4, (bgMaxY - 1 + bgMinY) * 4, // @bug xh = 2 * bgXOffset + (bgMinX - 1) * 4
|
(2 * bgXOffset + (bgMinX - 1)) * 4, (bgMaxY - 1 + bgMinY) * 4, // @bug xh = 2 * bgXOffset + (bgMinX - 1) * 4
|
||||||
G_TX_RENDERTILE, bgMaxX * 32 - bgXOffset * 16, 0, 4096, 1024);
|
G_TX_RENDERTILE, bgMaxX * 32 - bgXOffset * 16, 0, 4096, 1024);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, bgXOffset * 2 + bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
gSPTextureRectangle(gMainGfxPos++, bgXOffset * 2 + bgMinX * 4, (lineHeight * i + bgMinY) * 4,
|
||||||
(bgMaxX + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4, // @bug xh = 2 * bgXOffset + (bgMinX - 1) * 4
|
(bgMaxX + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4, // @bug xh = 2 * bgXOffset + (bgMinX - 1) * 4
|
||||||
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
G_TX_RENDERTILE, 0, 0, 4096, 1024);
|
||||||
}
|
}
|
||||||
|
@ -376,55 +376,55 @@ void appendGfx_shading_palette(
|
|||||||
highlightB = 255;
|
highlightB = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, shadowR, shadowG, shadowB, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, shadowR, shadowG, shadowB, alpha);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL1, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, COMBINED, TEXEL0, COMBINED_ALPHA,
|
gDPSetCombineLERP(gMainGfxPos++, TEXEL1, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, COMBINED, TEXEL0, COMBINED_ALPHA,
|
||||||
TEXEL0, PRIMITIVE, 0, TEXEL0, 0);
|
TEXEL0, PRIMITIVE, 0, TEXEL0, 0);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, D_80159880);
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, D_80159880);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 16, 1);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, 16, 1);
|
||||||
|
|
||||||
gSPSetOtherMode(gMasterGfxPos++, G_SETOTHERMODE_H, 4, 18,
|
gSPSetOtherMode(gMainGfxPos++, G_SETOTHERMODE_H, 4, 18,
|
||||||
G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE |
|
G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE |
|
||||||
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE);
|
G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE);
|
||||||
|
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, shadowR, shadowG, shadowB, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, shadowR, shadowG, shadowB, alpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, highlightR, highlightG, highlightB, 0);
|
gDPSetEnvColor(gMainGfxPos++, highlightR, highlightG, highlightB, 0);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, PRIMITIVE, ENVIRONMENT, TEXEL0_ALPHA, ENVIRONMENT, 0, 0, 0, 1,
|
gDPSetCombineLERP(gMainGfxPos++, PRIMITIVE, ENVIRONMENT, TEXEL0_ALPHA, ENVIRONMENT, 0, 0, 0, 1,
|
||||||
PRIMITIVE, ENVIRONMENT, TEXEL0_ALPHA, ENVIRONMENT, 0, 0, 0, 1);
|
PRIMITIVE, ENVIRONMENT, TEXEL0_ALPHA, ENVIRONMENT, 0, 0, 0, 1);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, 0, 0, 16 << 2, 1 << 2, 2, 0, 0, 4 << 10, 1 << 10);
|
gSPTextureRectangle(gMainGfxPos++, 0, 0, 16 << 2, 1 << 2, 2, 0, 0, 4 << 10, 1 << 10);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
|
||||||
|
|
||||||
gDPSetScissor(
|
gDPSetScissor(
|
||||||
gMasterGfxPos++, 0,
|
gMainGfxPos++, 0,
|
||||||
camera->viewportStartX,
|
camera->viewportStartX,
|
||||||
camera->viewportStartY,
|
camera->viewportStartY,
|
||||||
camera->viewportStartX + camera->viewportW,
|
camera->viewportStartX + camera->viewportW,
|
||||||
camera->viewportStartY + camera->viewportH
|
camera->viewportStartY + camera->viewportH
|
||||||
);
|
);
|
||||||
|
|
||||||
gDPLoadTLUT_pal16(gMasterGfxPos++, 1, D_80159880);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 1, D_80159880);
|
||||||
|
|
||||||
gSPSetOtherMode(gMasterGfxPos++, G_SETOTHERMODE_H, 4, 18,
|
gSPSetOtherMode(gMainGfxPos++, G_SETOTHERMODE_H, 4, 18,
|
||||||
G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_RGBA16 | G_TL_TILE |
|
G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_RGBA16 | G_TL_TILE |
|
||||||
G_TD_CLAMP | G_TP_PERSP | G_CYC_2CYCLE | G_PM_NPRIMITIVE);
|
G_TD_CLAMP | G_TP_PERSP | G_CYC_2CYCLE | G_PM_NPRIMITIVE);
|
||||||
|
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_PASS, renderMode);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_PASS, renderMode);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 100, 100, 100, 255);
|
gDPSetEnvColor(gMainGfxPos++, 100, 100, 100, 255);
|
||||||
|
|
||||||
if (alpha == 255) {
|
if (alpha == 255) {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, TEXEL1, 0, 0, 0, 0, TEXEL1, SHADE, ENVIRONMENT, COMBINED,
|
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, TEXEL1, 0, 0, 0, 0, TEXEL1, SHADE, ENVIRONMENT, COMBINED,
|
||||||
COMBINED, 0, 0, 0, COMBINED);
|
COMBINED, 0, 0, 0, COMBINED);
|
||||||
} else {
|
} else {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, TEXEL1, 0, PRIMITIVE, 0, TEXEL1, 0, SHADE, ENVIRONMENT, COMBINED,
|
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, TEXEL1, 0, PRIMITIVE, 0, TEXEL1, 0, SHADE, ENVIRONMENT, COMBINED,
|
||||||
COMBINED, 0, 0, 0, COMBINED);
|
COMBINED, 0, 0, 0, COMBINED);
|
||||||
}
|
}
|
||||||
|
|
||||||
abc = var_f26;
|
abc = var_f26;
|
||||||
abc *= var_f30;
|
abc *= var_f30;
|
||||||
gDPSetTileSize(
|
gDPSetTileSize(
|
||||||
gMasterGfxPos++,
|
gMainGfxPos++,
|
||||||
0,
|
0,
|
||||||
((uls + 0x100) << 2) + (s32)abc,
|
((uls + 0x100) << 2) + (s32)abc,
|
||||||
((ult + 0x100) << 2) + (s32)temp_f28,
|
((ult + 0x100) << 2) + (s32)temp_f28,
|
||||||
@ -437,11 +437,11 @@ INCLUDE_ASM(s32, "de740_len_23f0", appendGfx_shading_palette);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void func_801491E4(Matrix4f mtx, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 alpha) {
|
void func_801491E4(Matrix4f mtx, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 alpha) {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
|
||||||
|
|
||||||
if (alpha == 255) {
|
if (alpha == 255) {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL1, 0, 0, 0, TEXEL1, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL1, 0, 0, 0, TEXEL1, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);
|
||||||
} else {
|
} else {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
162
src/draw_box.c
162
src/draw_box.c
@ -438,20 +438,20 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_2CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_2CYCLE);
|
||||||
gDPSetBlendColor(gMasterGfxPos++, 0, 0, 0, 0);
|
gDPSetBlendColor(gMainGfxPos++, 0, 0, 0, 0);
|
||||||
gDPSetFogColor(gMasterGfxPos++, 0, 0, 0, darkening);
|
gDPSetFogColor(gMainGfxPos++, 0, 0, 0, darkening);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_XLU_SURF2);
|
||||||
if (!(flags & DRAW_FLAG_NO_CLIP)) {
|
if (!(flags & DRAW_FLAG_NO_CLIP)) {
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defaultStyle != NULL) {
|
if (defaultStyle != NULL) {
|
||||||
Gfx* gfxPos = gMasterGfxPos;
|
Gfx* gfxPos = gMainGfxPos;
|
||||||
*gfxPos = gBoxCombineModes[defaultStyle->combineModeIndex + (primA != 255 ? 2 : 0)];
|
*gfxPos = gBoxCombineModes[defaultStyle->combineModeIndex + (primA != 255 ? 2 : 0)];
|
||||||
} else {
|
} else {
|
||||||
Gfx* gfxPos = gMasterGfxPos;
|
Gfx* gfxPos = gMainGfxPos;
|
||||||
if (primA != 255) {
|
if (primA != 255) {
|
||||||
*gfxPos = customStyle->transparentCombineMode;
|
*gfxPos = customStyle->transparentCombineMode;
|
||||||
} else {
|
} else {
|
||||||
@ -459,15 +459,15 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gMasterGfxPos++;
|
gMainGfxPos++;
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
|
||||||
|
|
||||||
if (quads != NULL) {
|
if (quads != NULL) {
|
||||||
gSPViewport(gMasterGfxPos++, &gBoxViewport);
|
gSPViewport(gMainGfxPos++, &gBoxViewport);
|
||||||
guFrustumF(mtx1, -80.0f, 80.0f, 60.0f, -60.0f, 160.0f, 480.0f, 1.0f);
|
guFrustumF(mtx1, -80.0f, 80.0f, 60.0f, -60.0f, 160.0f, 480.0f, 1.0f);
|
||||||
guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
|
guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
sp154 = &gDisplayContext->matrixStack[gMatrixListPos];
|
sp154 = &gDisplayContext->matrixStack[gMatrixListPos];
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
guPositionF(mtx1, rotX, rotY, rotZ, 1.0f, posX + width / 2, posY + height / 2, posZ);
|
guPositionF(mtx1, rotX, rotY, rotZ, 1.0f, posX + width / 2, posY + height / 2, posZ);
|
||||||
if (scaleX != 1.0f || scaleY != 1.0f) {
|
if (scaleX != 1.0f || scaleY != 1.0f) {
|
||||||
guScaleF(mtx2, scaleX, scaleY, 1.0f);
|
guScaleF(mtx2, scaleX, scaleY, 1.0f);
|
||||||
@ -487,50 +487,50 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
|
|||||||
}
|
}
|
||||||
guTranslateF(mtx2, -160.0f, -120.0f, -320.0f);
|
guTranslateF(mtx2, -160.0f, -120.0f, -320.0f);
|
||||||
guMtxCatF(mtx1, mtx2, mtx1);
|
guMtxCatF(mtx1, mtx2, mtx1);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH | G_LIGHTING);
|
gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH | G_LIGHTING);
|
||||||
if (flags & DRAW_FLAG_CULL_BACK) {
|
if (flags & DRAW_FLAG_CULL_BACK) {
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_BACK);
|
gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK);
|
||||||
}
|
}
|
||||||
guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
|
guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
|
||||||
gSPPerspNormalize(gMasterGfxPos++, 20);
|
gSPPerspNormalize(gMainGfxPos++, 20);
|
||||||
} else {
|
} else {
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
|
gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
|
||||||
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
|
gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primR, primG, primB, primA);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, primA);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, envR, envG, envB, envA);
|
gDPSetEnvColor(gMainGfxPos++, envR, envG, envB, envA);
|
||||||
if (bgImage != NULL) {
|
if (bgImage != NULL) {
|
||||||
switch (background->bitDepth) {
|
switch (background->bitDepth) {
|
||||||
case G_IM_SIZ_4b:
|
case G_IM_SIZ_4b:
|
||||||
gDPLoadTextureTile_4b(gMasterGfxPos++, bgImage, bgFmt, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadTextureTile_4b(gMainGfxPos++, bgImage, bgFmt, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
break;
|
break;
|
||||||
case G_IM_SIZ_8b:
|
case G_IM_SIZ_8b:
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, bgImage, bgFmt, G_IM_SIZ_8b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadTextureTile(gMainGfxPos++, bgImage, bgFmt, G_IM_SIZ_8b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
break;
|
break;
|
||||||
case G_IM_SIZ_16b:
|
case G_IM_SIZ_16b:
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, bgImage, bgFmt, G_IM_SIZ_16b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadTextureTile(gMainGfxPos++, bgImage, bgFmt, G_IM_SIZ_16b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
break;
|
break;
|
||||||
case G_IM_SIZ_32b:
|
case G_IM_SIZ_32b:
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, bgImage, bgFmt, G_IM_SIZ_32b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadTextureTile(gMainGfxPos++, bgImage, bgFmt, G_IM_SIZ_32b, bgWidth, bgHeight, 0, 0, bgWidth - 1, bgHeight - 1, 0, G_TX_WRAP, G_TX_WRAP, bgMasks, bgMaskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & DRAW_FLAG_ANIMATED_BACKGROUND) {
|
if (flags & DRAW_FLAG_ANIMATED_BACKGROUND) {
|
||||||
bgScrollOffsetY = (gGameStatusPtr->frameCounter * 4) & 0x1FF;
|
bgScrollOffsetY = (gGameStatusPtr->frameCounter * 4) & 0x1FF;
|
||||||
bgScrollOffsetX = 511 - bgScrollOffsetY;
|
bgScrollOffsetX = 511 - bgScrollOffsetY;
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE,
|
||||||
width / 2 * 4 + bgScrollOffsetX,
|
width / 2 * 4 + bgScrollOffsetX,
|
||||||
height / 2 * 4 + bgScrollOffsetY,
|
height / 2 * 4 + bgScrollOffsetY,
|
||||||
(width / 2 + bgWidth - 1) * 4 + bgScrollOffsetX,
|
(width / 2 + bgWidth - 1) * 4 + bgScrollOffsetX,
|
||||||
(height / 2 + bgHeight - 1) * 4 + bgScrollOffsetY);
|
(height / 2 + bgHeight - 1) * 4 + bgScrollOffsetY);
|
||||||
} else {
|
} else {
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, width / 2 * 4, height / 2 * 4,
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, width / 2 * 4, height / 2 * 4,
|
||||||
(width / 2 + bgWidth - 1) * 4, (height / 2 + bgHeight - 1)* 4);
|
(width / 2 + bgWidth - 1) * 4, (height / 2 + bgHeight - 1)* 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -545,32 +545,32 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
|
|||||||
|
|
||||||
switch (cornersBitDepth) {
|
switch (cornersBitDepth) {
|
||||||
case G_IM_SIZ_4b:
|
case G_IM_SIZ_4b:
|
||||||
gDPLoadMultiTile_4b(gMasterGfxPos++, cornersImage, tmem, 1, cornersFmt, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadMultiTile_4b(gMainGfxPos++, cornersImage, tmem, 1, cornersFmt, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
cornersImage += cornerWidth * cornerHeight / 2;
|
cornersImage += cornerWidth * cornerHeight / 2;
|
||||||
break;
|
break;
|
||||||
case G_IM_SIZ_8b:
|
case G_IM_SIZ_8b:
|
||||||
gDPLoadMultiTile(gMasterGfxPos++, cornersImage, tmem, 1, cornersFmt, G_IM_SIZ_8b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadMultiTile(gMainGfxPos++, cornersImage, tmem, 1, cornersFmt, G_IM_SIZ_8b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
cornersImage += cornerWidth * cornerHeight;
|
cornersImage += cornerWidth * cornerHeight;
|
||||||
break;
|
break;
|
||||||
case G_IM_SIZ_16b:
|
case G_IM_SIZ_16b:
|
||||||
gDPLoadMultiTile(gMasterGfxPos++, cornersImage, tmem, 1, cornersFmt, G_IM_SIZ_16b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadMultiTile(gMainGfxPos++, cornersImage, tmem, 1, cornersFmt, G_IM_SIZ_16b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
cornersImage += cornerWidth * cornerHeight * 2;
|
cornersImage += cornerWidth * cornerHeight * 2;
|
||||||
break;
|
break;
|
||||||
case G_IM_SIZ_32b:
|
case G_IM_SIZ_32b:
|
||||||
gDPLoadMultiTile(gMasterGfxPos++, cornersImage, tmem, 1, cornersFmt, G_IM_SIZ_32b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadMultiTile(gMainGfxPos++, cornersImage, tmem, 1, cornersFmt, G_IM_SIZ_32b, cornerWidth, cornerHeight, 0, 0, cornerWidth - 1, cornerHeight - 1, 0, G_TX_CLAMP, G_TX_CLAMP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
cornersImage += cornerWidth * cornerHeight * 4;
|
cornersImage += cornerWidth * cornerHeight * 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(idx) {
|
switch(idx) {
|
||||||
case 1:
|
case 1:
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, (width - cornerWidth) * 4, 0, (width - 1) * 4, (cornerHeight - 1) * 4);
|
gDPSetTileSize(gMainGfxPos++, 1, (width - cornerWidth) * 4, 0, (width - 1) * 4, (cornerHeight - 1) * 4);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0, (height - cornerHeight) * 4, (cornerWidth - 1) * 4, (height - 1) * 4);
|
gDPSetTileSize(gMainGfxPos++, 1, 0, (height - cornerHeight) * 4, (cornerWidth - 1) * 4, (height - 1) * 4);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, (width - cornerWidth) * 4, (height - cornerHeight) * 4, (width - 1) * 4, (height - 1) * 4);
|
gDPSetTileSize(gMainGfxPos++, 1, (width - cornerWidth) * 4, (height - cornerHeight) * 4, (width - 1) * 4, (height - 1) * 4);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -699,26 +699,26 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
|
|||||||
quads += 12;
|
quads += 12;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gSPVertex(gMasterGfxPos++, quads, 4, 0);
|
gSPVertex(gMainGfxPos++, quads, 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
||||||
} else {
|
} else {
|
||||||
switch (idx) {
|
switch (idx) {
|
||||||
case 0:
|
case 0:
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++, posX * 4, posY * 4, (posX + width / 2) * 4, (posY + height / 2) * 4, G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
|
gSPScisTextureRectangle(gMainGfxPos++, posX * 4, posY * 4, (posX + width / 2) * 4, (posY + height / 2) * 4, G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++, (posX + width / 2) * 4, posY * 4, (posX + width) * 4, (posY + height / 2) * 4, G_TX_RENDERTILE, (width / 2) * 32, 0, 0x400, 0x400);
|
gSPScisTextureRectangle(gMainGfxPos++, (posX + width / 2) * 4, posY * 4, (posX + width) * 4, (posY + height / 2) * 4, G_TX_RENDERTILE, (width / 2) * 32, 0, 0x400, 0x400);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++, posX * 4, (posY + height / 2) * 4, (posX + width / 2) * 4, (posY + height) * 4, G_TX_RENDERTILE, 0, (height / 2) * 32, 0x400, 0x400);
|
gSPScisTextureRectangle(gMainGfxPos++, posX * 4, (posY + height / 2) * 4, (posX + width / 2) * 4, (posY + height) * 4, G_TX_RENDERTILE, 0, (height / 2) * 32, 0x400, 0x400);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++, (posX + width / 2) * 4, (posY + height / 2) * 4, (posX + width) * 4, (posY + height) * 4, G_TX_RENDERTILE, (width / 2) * 32, (height / 2) * 32, 0x400, 0x400);
|
gSPScisTextureRectangle(gMainGfxPos++, (posX + width / 2) * 4, (posY + height / 2) * 4, (posX + width) * 4, (posY + height) * 4, G_TX_RENDERTILE, (width / 2) * 32, (height / 2) * 32, 0x400, 0x400);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
} else if (bgImage != NULL) {
|
} else if (bgImage != NULL) {
|
||||||
if (quads != NULL) {
|
if (quads != NULL) {
|
||||||
@ -751,49 +751,49 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
|
|||||||
quads[3].v.tc[0] = width * 32;
|
quads[3].v.tc[0] = width * 32;
|
||||||
quads[3].v.tc[1] = height * 32;
|
quads[3].v.tc[1] = height * 32;
|
||||||
|
|
||||||
gSPVertex(gMasterGfxPos++, &quads[0], 4, 0);
|
gSPVertex(gMainGfxPos++, &quads[0], 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
||||||
} else {
|
} else {
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++, posX * 4, posY * 4, (posX + width) * 4, (posY + height) * 4, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
|
gSPScisTextureRectangle(gMainGfxPos++, posX * 4, posY * 4, (posX + width) * 4, (posY + height) * 4, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
if(fpDrawContents != NULL) {
|
if(fpDrawContents != NULL) {
|
||||||
if (quads != NULL) {
|
if (quads != NULL) {
|
||||||
void* mdl_address = mdl_get_next_texture_address(width * height * 2);
|
void* mdl_address = mdl_get_next_texture_address(width * height * 2);
|
||||||
if(mdl_address != 0) {
|
if(mdl_address != 0) {
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, OS_K0_TO_PHYSICAL(mdl_address));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, OS_K0_TO_PHYSICAL(mdl_address));
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, width, height);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, width, height);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
|
||||||
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(primR, primG, primB, 0));
|
gDPSetFillColor(gMainGfxPos++, PACK_FILL_COLOR(primR, primG, primB, 0));
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
|
||||||
gDPFillRectangle(gMasterGfxPos++, 0, 0, width - 1, height - 1);
|
gDPFillRectangle(gMainGfxPos++, 0, 0, width - 1, height - 1);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetScissorFrac(gMasterGfxPos++, G_SC_NON_INTERLACE, 4, 4, (width - 1) * 4.0f, (height - 1) * 4.0f);
|
gDPSetScissorFrac(gMainGfxPos++, G_SC_NON_INTERLACE, 4, 4, (width - 1) * 4.0f, (height - 1) * 4.0f);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
|
|
||||||
fpDrawContents((s32)drawContentsArg0, 0, 0, width, height, opacity, darkening);
|
fpDrawContents((s32)drawContentsArg0, 0, 0, width, height, opacity, darkening);
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, OS_K0_TO_PHYSICAL(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, OS_K0_TO_PHYSICAL(nuGfxCfb_ptr));
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 320, 240);
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, 320, 240);
|
||||||
gSPViewport(gMasterGfxPos++, &gBoxViewport);
|
gSPViewport(gMainGfxPos++, &gBoxViewport);
|
||||||
gSPMatrix(gMasterGfxPos++, sp154, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, sp154, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_NOOP2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_NOOP2);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_BILERP);
|
gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP);
|
||||||
guTranslateF(mtx3, 0.0f, 6.0f, 0.0f);
|
guTranslateF(mtx3, 0.0f, 6.0f, 0.0f);
|
||||||
guMtxF2L(mtx3, &gBoxMatrix);
|
guMtxF2L(mtx3, &gBoxMatrix);
|
||||||
guTranslateF(mtx3, 0.0f, -height / 2, 0.0f);
|
guTranslateF(mtx3, 0.0f, -height / 2, 0.0f);
|
||||||
guMtxF2L(mtx3, &gDisplayContext->matrixStack[gMatrixListPos]);
|
guMtxF2L(mtx3, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
for (idx = 0; idx < height / 6; idx++) {
|
for (idx = 0; idx < height / 6; idx++) {
|
||||||
s32 extraHeight, lineHeight;
|
s32 extraHeight, lineHeight;
|
||||||
if (idx == height / 6 - 1) {
|
if (idx == height / 6 - 1) {
|
||||||
@ -805,14 +805,14 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
|
|||||||
extraHeight = 1;
|
extraHeight = 1;
|
||||||
}
|
}
|
||||||
lineHeight = extraHeight + 5;
|
lineHeight = extraHeight + 5;
|
||||||
gDPLoadTextureTile(gMasterGfxPos++, OS_K0_TO_PHYSICAL(mdl_address), G_IM_FMT_RGBA, G_IM_SIZ_16b, width, 0,
|
gDPLoadTextureTile(gMainGfxPos++, OS_K0_TO_PHYSICAL(mdl_address), G_IM_FMT_RGBA, G_IM_SIZ_16b, width, 0,
|
||||||
0, idx * 6, width - 1, idx * 6 + lineHeight, 0,
|
0, idx * 6, width - 1, idx * 6 + lineHeight, 0,
|
||||||
G_TX_CLAMP, G_TX_CLAMP, 9, 3, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_CLAMP, G_TX_CLAMP, 9, 3, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, (160 - width / 2) * 4, 0, ((160 - width / 2) + width - 1) * 4, lineHeight * 4);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, (160 - width / 2) * 4, 0, ((160 - width / 2) + width - 1) * 4, lineHeight * 4);
|
||||||
gSPVertex(gMasterGfxPos++, &vtx_drawbox1, 4, 0);
|
gSPVertex(gMainGfxPos++, &vtx_drawbox1, 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 0, 3, 1, 0, 0, 2, 3, 0);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPMatrix(gMasterGfxPos++, &gBoxMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gBoxMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -820,9 +820,9 @@ s32 draw_box(s32 flags, WindowStyle windowStyle, s32 posX, s32 posY, s32 posZ, s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quads != NULL) {
|
if (quads != NULL) {
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
|
gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -299,23 +299,23 @@ void render_effects_UI(void) {
|
|||||||
if (cond) {
|
if (cond) {
|
||||||
Camera* camera = &gCameras[gCurrentCameraID];
|
Camera* camera = &gCameras[gCurrentCameraID];
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPViewport(gMasterGfxPos++, &camera->vp);
|
gSPViewport(gMainGfxPos++, &camera->vp);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG |
|
gSPClearGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG |
|
||||||
G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD |
|
G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD |
|
||||||
G_SHADING_SMOOTH | G_CLIPPING | 0x40F9FA);
|
G_SHADING_SMOOTH | G_CLIPPING | 0x40F9FA);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE,
|
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE,
|
||||||
camera->viewportStartX,
|
camera->viewportStartX,
|
||||||
camera->viewportStartY,
|
camera->viewportStartY,
|
||||||
camera->viewportStartX + camera->viewportW,
|
camera->viewportStartX + camera->viewportW,
|
||||||
camera->viewportStartY + camera->viewportH);
|
camera->viewportStartY + camera->viewportH);
|
||||||
gSPClipRatio(gMasterGfxPos++, FRUSTRATIO_2);
|
gSPClipRatio(gMainGfxPos++, FRUSTRATIO_2);
|
||||||
|
|
||||||
cond = FALSE;
|
cond = FALSE;
|
||||||
if (!(camera->flags & CAMERA_FLAG_ORTHO)) {
|
if (!(camera->flags & CAMERA_FLAG_ORTHO)) {
|
||||||
gSPPerspNormalize(gMasterGfxPos++, camera->perspNorm);
|
gSPPerspNormalize(gMainGfxPos++, camera->perspNorm);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID],
|
||||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,14 +182,14 @@ void func_E0090444(EffectInstance* effect) {
|
|||||||
|
|
||||||
if (data->unk_24 != 0) {
|
if (data->unk_24 != 0) {
|
||||||
scale = data->unk_28;
|
scale = data->unk_28;
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
||||||
gDPSetDepthSource(gMasterGfxPos++, G_ZS_PRIM);
|
gDPSetDepthSource(gMainGfxPos++, G_ZS_PRIM);
|
||||||
z = 200 - unk_1C;
|
z = 200 - unk_1C;
|
||||||
if (z < 0) {
|
if (z < 0) {
|
||||||
z = 0;
|
z = 0;
|
||||||
}
|
}
|
||||||
gDPSetPrimDepth(gMasterGfxPos++, z, 0);
|
gDPSetPrimDepth(gMainGfxPos++, z, 0);
|
||||||
|
|
||||||
if (unk_00 < 5) {
|
if (unk_00 < 5) {
|
||||||
shim_guTranslateF(sp18, data->unk_08, data->unk_0C, data->unk_10);
|
shim_guTranslateF(sp18, data->unk_08, data->unk_0C, data->unk_10);
|
||||||
@ -198,29 +198,29 @@ void func_E0090444(EffectInstance* effect) {
|
|||||||
shim_guScaleF(sp58, scale, scale, 1.0f);
|
shim_guScaleF(sp58, scale, scale, 1.0f);
|
||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, data->unk_14);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->unk_14);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090015A8_391978);
|
gSPDisplayList(gMainGfxPos++, D_090015A8_391978);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0090A40[data->unk_04]);
|
gSPDisplayList(gMainGfxPos++, D_E0090A40[data->unk_04]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0090A54[data->unk_04]);
|
gSPDisplayList(gMainGfxPos++, D_E0090A54[data->unk_04]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
} else {
|
} else {
|
||||||
unk_00 -= 5;
|
unk_00 -= 5;
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, D_E0090A78[unk_00][0], D_E0090A78[unk_00][1], D_E0090A78[unk_00][2], data->unk_14);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0090A78[unk_00][0], D_E0090A78[unk_00][1], D_E0090A78[unk_00][2], data->unk_14);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, D_E0090A78[unk_00][3], D_E0090A78[unk_00][4], D_E0090A78[unk_00][5], 0);
|
gDPSetEnvColor(gMainGfxPos++, D_E0090A78[unk_00][3], D_E0090A78[unk_00][4], D_E0090A78[unk_00][5], 0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001500_3918D0);
|
gSPDisplayList(gMainGfxPos++, D_09001500_3918D0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0090A40[data->unk_04]);
|
gSPDisplayList(gMainGfxPos++, D_E0090A40[data->unk_04]);
|
||||||
|
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++,
|
gSPScisTextureRectangle(gMainGfxPos++,
|
||||||
data->unk_08 * 4.0f,
|
data->unk_08 * 4.0f,
|
||||||
data->unk_0C * 4.0f,
|
data->unk_0C * 4.0f,
|
||||||
(data->unk_08 + 128.0f) * 4.0f,
|
(data->unk_08 + 128.0f) * 4.0f,
|
||||||
(data->unk_0C + 64.0f) * 4.0f,
|
(data->unk_0C + 64.0f) * 4.0f,
|
||||||
G_TX_RENDERTILE, 0, 1024, 512, 65024);
|
G_TX_RENDERTILE, 0, 1024, 512, 65024);
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetDepthSource(gMasterGfxPos++, G_ZS_PIXEL);
|
gDPSetDepthSource(gMainGfxPos++, G_ZS_PIXEL);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -271,8 +271,8 @@ void aura_appendGfx(void* argEffect) {
|
|||||||
s32 primA = data->primA;
|
s32 primA = data->primA;
|
||||||
s32 v1, v2;
|
s32 v1, v2;
|
||||||
|
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0076ED0[type]);
|
gSPDisplayList(gMainGfxPos++, D_E0076ED0[type]);
|
||||||
|
|
||||||
shim_guTranslateF(translateMtx, data->posB.x, data->posB.y, data->posB.z);
|
shim_guTranslateF(translateMtx, data->posB.x, data->posB.y, data->posB.z);
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
@ -289,9 +289,9 @@ void aura_appendGfx(void* argEffect) {
|
|||||||
}
|
}
|
||||||
shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0076EC0[type]);
|
gSPDisplayList(gMainGfxPos++, D_E0076EC0[type]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
shim_guTranslateF(translateMtx, data->posA.x, data->posA.y, data->posA.z);
|
shim_guTranslateF(translateMtx, data->posA.x, data->posA.y, data->posA.z);
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
@ -308,23 +308,23 @@ void aura_appendGfx(void* argEffect) {
|
|||||||
}
|
}
|
||||||
shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0076EB0[type]);
|
gSPDisplayList(gMainGfxPos++, D_E0076EB0[type]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primR, data->primG, data->primB, primA);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, primA);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->envR, data->envG, data->engB, data->engA);
|
gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->engB, data->engA);
|
||||||
|
|
||||||
v1 = data->unk_34 * 4.0f;
|
v1 = data->unk_34 * 4.0f;
|
||||||
v2 = data->unk_40 * 4.0f;
|
v2 = data->unk_40 * 4.0f;
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, v1, v2, v1 + 124, v2 + 508);
|
gDPSetTileSize(gMainGfxPos++, 1, v1, v2, v1 + 124, v2 + 508);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0076E90[type]);
|
gSPDisplayList(gMainGfxPos++, D_E0076E90[type]);
|
||||||
|
|
||||||
v1 = data->unk_4C * 4.0f;
|
v1 = data->unk_4C * 4.0f;
|
||||||
v2 = data->unk_58 * 4.0f;
|
v2 = data->unk_58 * 4.0f;
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, v1 + 30, v2 + 30, v1 + 282, v2 + 538);
|
gDPSetTileSize(gMainGfxPos++, 1, v1 + 30, v2 + 30, v1 + 282, v2 + 538);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0076EA0[type]);
|
gSPDisplayList(gMainGfxPos++, D_E0076EA0[type]);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -89,8 +89,8 @@ void balloon_appendGfx(void* effect) {
|
|||||||
BalloonFXData* data = ((EffectInstance*)effect)->data.balloon;
|
BalloonFXData* data = ((EffectInstance*)effect)->data.balloon;
|
||||||
s32 idx = data->unk_00;
|
s32 idx = data->unk_00;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -99,10 +99,10 @@ void balloon_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00963E0[idx]);
|
gSPDisplayList(gMainGfxPos++, D_E00963E0[idx]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001508_395B78);
|
gSPDisplayList(gMainGfxPos++, D_09001508_395B78);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -125,13 +125,13 @@ void big_smoke_puff_appendGfx(void* effect) {
|
|||||||
Matrix4f mtx;
|
Matrix4f mtx;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guPositionF(mtx, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, data->x, data->y, data->z);
|
shim_guPositionF(mtx, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, data->x, data->y, data->z);
|
||||||
shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++,
|
gSPMatrix(gMainGfxPos++,
|
||||||
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, data++) {
|
for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, data++) {
|
||||||
@ -149,7 +149,7 @@ void big_smoke_puff_appendGfx(void* effect) {
|
|||||||
data->partY, 0.0f);
|
data->partY, 0.0f);
|
||||||
shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++,
|
gSPMatrix(gMainGfxPos++,
|
||||||
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
temp_f12 = data->unk_00 - 1;
|
temp_f12 = data->unk_00 - 1;
|
||||||
@ -164,15 +164,15 @@ void big_smoke_puff_appendGfx(void* effect) {
|
|||||||
dlist = sDlists[(s32)temp];
|
dlist = sDlists[(s32)temp];
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, (u32)(primAlpha * 105) / 8);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, (u32)(primAlpha * 105) / 8);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 0, 0, 0, envAlpha);
|
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_E0002738(EffectInstance* effect) {
|
void func_E0002738(EffectInstance* effect) {
|
||||||
|
@ -115,9 +115,9 @@ void big_snowflakes_appendGfx(void* effect) {
|
|||||||
Gfx* dlist = D_E0060738[0];
|
Gfx* dlist = D_E0060738[0];
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 20, 100, 20, data->unk_24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 20, 100, 20, data->unk_24);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -138,8 +138,8 @@ void big_snowflakes_appendGfx(void* effect) {
|
|||||||
}
|
}
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,10 +111,10 @@ void blast_appendGfx(void *effect) {
|
|||||||
unk_20f = unk_20;
|
unk_20f = unk_20;
|
||||||
envAlpha = (unk_20f - unk_20) * two_fifty_six;
|
envAlpha = (unk_20f - unk_20) * two_fifty_six;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001300_37ECD0);
|
gSPDisplayList(gMainGfxPos++, D_09001300_37ECD0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E007C510[unk_20]);
|
gSPDisplayList(gMainGfxPos++, D_E007C510[unk_20]);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -125,19 +125,19 @@ void blast_appendGfx(void *effect) {
|
|||||||
shim_guMtxCatF(sp18, sp98, sp98);
|
shim_guMtxCatF(sp18, sp98, sp98);
|
||||||
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (data->unk_20 > 4.0f) {
|
if (data->unk_20 > 4.0f) {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, 127);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, 127);
|
||||||
} else {
|
} else {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 128, 127);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 128, 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 255, 255, 139, envAlpha);
|
gDPSetEnvColor(gMainGfxPos++, 255, 255, 139, envAlpha);
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
INCLUDE_ASM(s32, "effects/blast", blast_appendGfx);
|
INCLUDE_ASM(s32, "effects/blast", blast_appendGfx);
|
||||||
|
@ -216,39 +216,39 @@ void bombette_breaking_appendGfx(void* effect) {
|
|||||||
|
|
||||||
timeLeft *= 4;
|
timeLeft *= 4;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
shim_guTranslateF(sp20, data->center.x, data->center.y, data->center.z);
|
shim_guTranslateF(sp20, data->center.x, data->center.y, data->center.z);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
shim_mdl_draw_hidden_panel_surface(&gMasterGfxPos, data->treeIndex);
|
shim_mdl_draw_hidden_panel_surface(&gMainGfxPos, data->treeIndex);
|
||||||
|
|
||||||
data++;
|
data++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) {
|
||||||
shim_guPositionF(sp20, timeLeft + (130 * i), timeLeft - (40 * i), timeLeft + (80 * i), unk_40,
|
shim_guPositionF(sp20, timeLeft + (130 * i), timeLeft - (40 * i), timeLeft + (80 * i), unk_40,
|
||||||
data->unk_14.x, data->unk_14.y, data->unk_14.z);
|
data->unk_14.x, data->unk_14.y, data->unk_14.z);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0084E1C[type]);
|
gSPDisplayList(gMainGfxPos++, D_E0084E1C[type]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, sp64);
|
gSPDisplayList(gMainGfxPos++, sp64);
|
||||||
|
|
||||||
data = ((EffectInstance*)effect)->data.bombetteBreaking;
|
data = ((EffectInstance*)effect)->data.bombetteBreaking;
|
||||||
data++;
|
data++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, (data->alpha * mainAlpha) / 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, (data->alpha * mainAlpha) / 255);
|
||||||
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_38,
|
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_38,
|
||||||
data->center.x, data->center.y, data->center.z);
|
data->center.x, data->center.y, data->center.z);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, sp60);
|
gSPDisplayList(gMainGfxPos++, sp60);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -137,21 +137,21 @@ void breaking_junk_appendGfx(void* effect) {
|
|||||||
s32 alpha = data->primA;
|
s32 alpha = data->primA;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E01187C0[0]);
|
gSPDisplayList(gMainGfxPos++, D_E01187C0[0]);
|
||||||
|
|
||||||
for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, data++) {
|
for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, data++) {
|
||||||
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->scale * 0.5, data->pos.x, data->pos.y, data->pos.z);
|
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->scale * 0.5, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guRotateF(sp60, data->rot, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp60, data->rot, 0.0f, 0.0f, 1.0f);
|
||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primR, data->primG, data->primB, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, alpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->envR, data->envG, data->envB, data->envA);
|
gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->envB, data->envA);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E01187B0[(u32)i % ARRAY_COUNT(D_E01187B0)]);
|
gSPDisplayList(gMainGfxPos++, D_E01187B0[(u32)i % ARRAY_COUNT(D_E01187B0)]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -185,8 +185,8 @@ void bulb_glow_appendGfx(void* effect) {
|
|||||||
brightness = 0x7F;
|
brightness = 0x7F;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
temp_s1 = &D_E0078918[temp_s2];
|
temp_s1 = &D_E0078918[temp_s2];
|
||||||
glowExtent = temp_s1->unk_10;
|
glowExtent = temp_s1->unk_10;
|
||||||
@ -203,14 +203,14 @@ void bulb_glow_appendGfx(void* effect) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0078900[temp_s2]);
|
gSPDisplayList(gMainGfxPos++, D_E0078900[temp_s2]);
|
||||||
temp_v0 = &D_E00789AC[data->unk_20];
|
temp_v0 = &D_E00789AC[data->unk_20];
|
||||||
colorScale = (brightness * 2);
|
colorScale = (brightness * 2);
|
||||||
r = temp_v0->r * colorScale / 255;
|
r = temp_v0->r * colorScale / 255;
|
||||||
g = temp_v0->g * colorScale / 255;
|
g = temp_v0->g * colorScale / 255;
|
||||||
b = temp_v0->b * colorScale / 255;
|
b = temp_v0->b * colorScale / 255;
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, r, g, b, 0x7F);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, 0x7F);
|
||||||
|
|
||||||
// temp_s1 = E0078948
|
// temp_s1 = E0078948
|
||||||
// unk_00 = 64
|
// unk_00 = 64
|
||||||
@ -251,7 +251,7 @@ void bulb_glow_appendGfx(void* effect) {
|
|||||||
numRects = (yMax - yMin) / rectHeight;
|
numRects = (yMax - yMin) / rectHeight;
|
||||||
|
|
||||||
for (i = yStart / rectHeight; i < numRects && (i + 1) * rectHeight + yMin < SCREEN_HEIGHT; i++) {
|
for (i = yStart / rectHeight; i < numRects && (i + 1) * rectHeight + yMin < SCREEN_HEIGHT; i++) {
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE,
|
||||||
// uls = 183 << 2
|
// uls = 183 << 2
|
||||||
(s32) (xMin * temp_s1->unk_08) << 2,
|
(s32) (xMin * temp_s1->unk_08) << 2,
|
||||||
// This code is correct due to being masked to 12 bits
|
// This code is correct due to being masked to 12 bits
|
||||||
@ -265,7 +265,7 @@ void bulb_glow_appendGfx(void* effect) {
|
|||||||
(s32) (temp_s1->unk_04 * 21 - i * temp_s1->unk_14 * temp_s1->unk_0C) << 2);
|
(s32) (temp_s1->unk_04 * 21 - i * temp_s1->unk_14 * temp_s1->unk_0C) << 2);
|
||||||
|
|
||||||
for (j = 0; j < 1; j++) {
|
for (j = 0; j < 1; j++) {
|
||||||
gDPLoadMultiTile(gMasterGfxPos++,
|
gDPLoadMultiTile(gMainGfxPos++,
|
||||||
// Offset the image to the rows being loaded
|
// Offset the image to the rows being loaded
|
||||||
VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + (i * rectHeight + yMin) * (SCREEN_WIDTH * sizeof(u16))),
|
VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + (i * rectHeight + yMin) * (SCREEN_WIDTH * sizeof(u16))),
|
||||||
TMEM_ADDR(TMEM_SIZE/2), G_TX_RENDERTILE + 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, 0,
|
TMEM_ADDR(TMEM_SIZE/2), G_TX_RENDERTILE + 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, 0,
|
||||||
@ -274,7 +274,7 @@ void bulb_glow_appendGfx(void* effect) {
|
|||||||
// lrs = 311 - 1, lrt = 8 - 1
|
// lrs = 311 - 1, lrt = 8 - 1
|
||||||
xMax - 1, rectHeight - 1,
|
xMax - 1, rectHeight - 1,
|
||||||
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD);
|
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMasterGfxPos++,
|
gSPTextureRectangle(gMainGfxPos++,
|
||||||
// xl = 183 << 2, yl = (43 << 2, 51 << 2, 59 << 2, ...)
|
// xl = 183 << 2, yl = (43 << 2, 51 << 2, 59 << 2, ...)
|
||||||
(xMin + xStart) << 2, (i * rectHeight + yMin) << 2,
|
(xMin + xStart) << 2, (i * rectHeight + yMin) << 2,
|
||||||
// xr = 311 << 2, yh = (51 << 2, 59 << 2, 67 << 2, ...)
|
// xr = 311 << 2, yh = (51 << 2, 59 << 2, 67 << 2, ...)
|
||||||
@ -283,7 +283,7 @@ void bulb_glow_appendGfx(void* effect) {
|
|||||||
// s = 183 << 5, t = 0
|
// s = 183 << 5, t = 0
|
||||||
((xMin + xStart) & 0x1FF) << 5, 0,
|
((xMin + xStart) & 0x1FF) << 5, 0,
|
||||||
1 << 10, 1 << 10);
|
1 << 10, 1 << 10);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,8 +170,8 @@ void butterflies_appendGfx(void* effect) {
|
|||||||
s32 primColor = data->unk_24;
|
s32 primColor = data->unk_24;
|
||||||
s32 type = data->unk_00;
|
s32 type = data->unk_00;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->unk_0C, data->unk_10 + D_E00AA6EC[data->unk_2C] * 0.3f, data->unk_14);
|
shim_guTranslateF(sp18, data->unk_0C, data->unk_10 + D_E00AA6EC[data->unk_2C] * 0.3f, data->unk_14);
|
||||||
shim_guRotateF(sp58, data->unk_28, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, data->unk_28, 0.0f, 1.0f, 0.0f);
|
||||||
@ -180,12 +180,12 @@ void butterflies_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primColor, primColor, primColor, 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, primColor, primColor, primColor, 255);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09003880_3AE8B0);
|
gSPDisplayList(gMainGfxPos++, D_09003880_3AE8B0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00AA6C0[type]);
|
gSPDisplayList(gMainGfxPos++, D_E00AA6C0[type]);
|
||||||
gSPVertex(gMasterGfxPos++, &D_09002D40_3ADD70[data->unk_2C], 6, 0);
|
gSPVertex(gMainGfxPos++, &D_09002D40_3ADD70[data->unk_2C], 6, 0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09003DC8_3AEDF8);
|
gSPDisplayList(gMainGfxPos++, D_09003DC8_3AEDF8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -108,11 +108,11 @@ void func_E010E000(ChapterChangeFXData* data, s32 arg1, UnkStruct* arg2) {
|
|||||||
|
|
||||||
if (arg2 != NULL) {
|
if (arg2 != NULL) {
|
||||||
for (it = arg2; it->displayList != NULL; it++) {
|
for (it = arg2; it->displayList != NULL; it++) {
|
||||||
gSPDisplayList(gMasterGfxPos++, it->displayList);
|
gSPDisplayList(gMainGfxPos++, it->displayList);
|
||||||
|
|
||||||
temp = it->x - 384;
|
temp = it->x - 384;
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, (unk_1C * 4 - temp) * 4, 0, (unk_1C * 4 - it->x + 511) * 4, 0);
|
gDPSetTileSize(gMainGfxPos++, 1, (unk_1C * 4 - temp) * 4, 0, (unk_1C * 4 - it->x + 511) * 4, 0);
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++,
|
gSPScisTextureRectangle(gMainGfxPos++,
|
||||||
(posX + it->x) * 4,
|
(posX + it->x) * 4,
|
||||||
(posY + it->y) * 4,
|
(posY + it->y) * 4,
|
||||||
(posX + it->x + it->width) * 4,
|
(posX + it->x + it->width) * 4,
|
||||||
@ -120,7 +120,7 @@ void func_E010E000(ChapterChangeFXData* data, s32 arg1, UnkStruct* arg2) {
|
|||||||
G_TX_RENDERTILE, 0, 0, 1024, 1024);
|
G_TX_RENDERTILE, 0, 0, 1024, 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,8 +218,8 @@ void chapter_change_appendGfx(void* effect) {
|
|||||||
UnkStruct* ptr0;
|
UnkStruct* ptr0;
|
||||||
UnkStruct* ptr1;
|
UnkStruct* ptr1;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
switch (unk_00) {
|
switch (unk_00) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -256,8 +256,8 @@ void chapter_change_appendGfx(void* effect) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_20, data->unk_24, data->unk_28, unk_2C);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_20, data->unk_24, data->unk_28, unk_2C);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_30, data->unk_34, data->unk_38, data->unk_3C);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_30, data->unk_34, data->unk_38, data->unk_3C);
|
||||||
|
|
||||||
func_E010E000(data, 0, ptr0);
|
func_E010E000(data, 0, ptr0);
|
||||||
func_E010E000(data, 1, ptr1);
|
func_E010E000(data, 1, ptr1);
|
||||||
@ -266,5 +266,5 @@ void chapter_change_appendGfx(void* effect) {
|
|||||||
shim_draw_msg(data->unk_54, data->unk_40 - data->unk_48, data->unk_44, 255, 21, 0);
|
shim_draw_msg(data->unk_54, data->unk_40 - data->unk_48, data->unk_44, 255, 21, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -143,18 +143,18 @@ void chomp_drop_appendGfx(void* effect) {
|
|||||||
Vtx_t* vtxTemp;
|
Vtx_t* vtxTemp;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effectTemp)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effectTemp)->graphics->data));
|
||||||
|
|
||||||
shim_guScaleF(sp20, 0.01f, 0.01f, 0.01f);
|
shim_guScaleF(sp20, 0.01f, 0.01f, 0.01f);
|
||||||
shim_guPositionF(sp60, 0.0f, 0.0f, 0.0f, data->unk_24, data->unk_04 * 100.0f, data->unk_08 * 100.0f, data->unk_0C * 100.0f);
|
shim_guPositionF(sp60, 0.0f, 0.0f, 0.0f, data->unk_24, data->unk_04 * 100.0f, data->unk_08 * 100.0f, data->unk_0C * 100.0f);
|
||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(
|
gDPSetPrimColor(
|
||||||
gMasterGfxPos++, 0, 0,
|
gMainGfxPos++, 0, 0,
|
||||||
(shim_sin_deg(temp_s6 * 30) * 25.0f) + 225.0f,
|
(shim_sin_deg(temp_s6 * 30) * 25.0f) + 225.0f,
|
||||||
(shim_sin_deg(temp_s6 * 30) * 25.0f) + 225.0f,
|
(shim_sin_deg(temp_s6 * 30) * 25.0f) + 225.0f,
|
||||||
255,
|
255,
|
||||||
@ -162,21 +162,21 @@ void chomp_drop_appendGfx(void* effect) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (data->unk_2C == 1) {
|
if (data->unk_2C == 1) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001040_398080);
|
gSPDisplayList(gMainGfxPos++, D_09001040_398080);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001190_3981D0);
|
gSPDisplayList(gMainGfxPos++, D_09001190_3981D0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, ((30 - data->unk_30) * 255) / 30);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, ((30 - data->unk_30) * 255) / 30);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090010E8_398128);
|
gSPDisplayList(gMainGfxPos++, D_090010E8_398128);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001190_3981D0);
|
gSPDisplayList(gMainGfxPos++, D_09001190_3981D0);
|
||||||
} else {
|
} else {
|
||||||
if (data->unk_2C > 0) {
|
if (data->unk_2C > 0) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090010E8_398128);
|
gSPDisplayList(gMainGfxPos++, D_090010E8_398128);
|
||||||
} else {
|
} else {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001040_398080);
|
gSPDisplayList(gMainGfxPos++, D_09001040_398080);
|
||||||
}
|
}
|
||||||
|
|
||||||
savedGfxPos = gMasterGfxPos + 1;
|
savedGfxPos = gMainGfxPos + 1;
|
||||||
gSPBranchList(gMasterGfxPos, gMasterGfxPos + 0x41);
|
gSPBranchList(gMainGfxPos, gMainGfxPos + 0x41);
|
||||||
gMasterGfxPos = savedGfxPos;
|
gMainGfxPos = savedGfxPos;
|
||||||
vtxTemp = (Vtx_t*) savedGfxPos;
|
vtxTemp = (Vtx_t*) savedGfxPos;
|
||||||
|
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
@ -198,17 +198,17 @@ void chomp_drop_appendGfx(void* effect) {
|
|||||||
vtx->tc[1] = i * 128;
|
vtx->tc[1] = i * 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
gMasterGfxPos += 0x40;
|
gMainGfxPos += 0x40;
|
||||||
gSPVertex(gMasterGfxPos++, vtxTemp, 32, 0);
|
gSPVertex(gMainGfxPos++, vtxTemp, 32, 0);
|
||||||
|
|
||||||
for (i = 0; i < 15; i++) {
|
for (i = 0; i < 15; i++) {
|
||||||
s32 i2 = i * 2;
|
s32 i2 = i * 2;
|
||||||
gSP2Triangles(gMasterGfxPos++,
|
gSP2Triangles(gMainGfxPos++,
|
||||||
i2 , i2 + 2, i2 + 1, i2,
|
i2 , i2 + 2, i2 + 1, i2,
|
||||||
i2 + 1, i2 + 2, i2 + 3, i2);
|
i2 + 1, i2 + 2, i2 + 3, i2);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -119,9 +119,9 @@ void cloud_puff_appendGfx(void* effect) {
|
|||||||
Matrix4f sp60;
|
Matrix4f sp60;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090000E0_32ED30);
|
gSPDisplayList(gMainGfxPos++, D_090000E0_32ED30);
|
||||||
|
|
||||||
for (i = 0; i < effectTemp->numParts; i++, part++) {
|
for (i = 0; i < effectTemp->numParts; i++, part++) {
|
||||||
if (part->alive) {
|
if (part->alive) {
|
||||||
@ -131,12 +131,12 @@ void cloud_puff_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 112, 96, 24, part->alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, part->alpha);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090001B8_32EE08);
|
gSPDisplayList(gMainGfxPos++, D_090001B8_32EE08);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -120,9 +120,9 @@ void cloud_trail_appendGfx(void* effect) {
|
|||||||
Matrix4f sp60;
|
Matrix4f sp60;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090000E0_32ED30);
|
gSPDisplayList(gMainGfxPos++, D_090000E0_32ED30);
|
||||||
|
|
||||||
for (i = 0; i < effectTemp->numParts; i++, part++) {
|
for (i = 0; i < effectTemp->numParts; i++, part++) {
|
||||||
if (part->alive) {
|
if (part->alive) {
|
||||||
@ -134,12 +134,12 @@ void cloud_trail_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 112, 96, 24, part->alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, part->alpha);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090001B8_32EE08);
|
gSPDisplayList(gMainGfxPos++, D_090001B8_32EE08);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -193,19 +193,19 @@ void cold_breath_appendGfx(void* effect) {
|
|||||||
s32 envAlpha;
|
s32 envAlpha;
|
||||||
s32 cond;
|
s32 cond;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp20, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp20, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guScaleF(sp60, data->unk_40, data->unk_40, data->unk_40);
|
shim_guScaleF(sp60, data->unk_40, data->unk_40, data->unk_40);
|
||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, 0.5 * unk24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, 0.5 * unk24);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_NOISE);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00DE84C[unk00]);
|
gSPDisplayList(gMainGfxPos++, D_E00DE84C[unk00]);
|
||||||
|
|
||||||
unkIndex = (unk14 < 30 ? unk14 : 29) + unk00 * 30;
|
unkIndex = (unk14 < 30 ? unk14 : 29) + unk00 * 30;
|
||||||
temp1 = D_E00DE96C[unkIndex];
|
temp1 = D_E00DE96C[unkIndex];
|
||||||
@ -214,7 +214,7 @@ void cold_breath_appendGfx(void* effect) {
|
|||||||
|
|
||||||
shim_guPositionF(sp20, 0.0f, 0.0f, -temp1, temp2 * 0.01f, temp3, 0.0f, 0.0f);
|
shim_guPositionF(sp20, 0.0f, 0.0f, -temp1, temp2 * 0.01f, temp3, 0.0f, 0.0f);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
temp_f32 = D_E00DE910[unkIndex] * 5.0f / 256.0f;
|
temp_f32 = D_E00DE910[unkIndex] * 5.0f / 256.0f;
|
||||||
temp_s32 = temp_f32;
|
temp_s32 = temp_f32;
|
||||||
@ -223,16 +223,16 @@ void cold_breath_appendGfx(void* effect) {
|
|||||||
cond = temp_s32 >= 4;
|
cond = temp_s32 >= 4;
|
||||||
if (temp_s32 < 5) {
|
if (temp_s32 < 5) {
|
||||||
if (cond) {
|
if (cond) {
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0, 0, 0, 0);
|
gDPSetTileSize(gMainGfxPos++, 1, 0, 0, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0, 0, 31 << 2, 127 << 2);
|
gDPSetTileSize(gMainGfxPos++, 1, 0, 0, 31 << 2, 127 << 2);
|
||||||
}
|
}
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_28, data->unk_2C, data->unk_30, envAlpha);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, envAlpha);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00DE810[unk00][temp_s32]);
|
gSPDisplayList(gMainGfxPos++, D_E00DE810[unk00][temp_s32]);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_DISABLE);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -266,17 +266,17 @@ void confetti_appendGfx(void* effect) {
|
|||||||
unk_28 = part->unk_28;
|
unk_28 = part->unk_28;
|
||||||
spA0 = D_E0088CC0[part->unk_00];
|
spA0 = D_E0088CC0[part->unk_00];
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000940_38C4E0);
|
gSPDisplayList(gMainGfxPos++, D_09000940_38C4E0);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
savedGfxPos = gMasterGfxPos++;
|
savedGfxPos = gMainGfxPos++;
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
for (i = 0; i < unk_2C; i++, part++) {
|
for (i = 0; i < unk_2C; i++, part++) {
|
||||||
@ -286,34 +286,34 @@ void confetti_appendGfx(void* effect) {
|
|||||||
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, color->r, color->g, color->b, unk_28);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, color->r, color->g, color->b, unk_28);
|
||||||
|
|
||||||
switch ((unk_24 + i) % 3) {
|
switch ((unk_24 + i) % 3) {
|
||||||
case 0:
|
case 0:
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0);
|
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0);
|
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0);
|
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
uly = ((i + D_E0088D00[unk_24 % 6]) & 0xF) * 16;
|
uly = ((i + D_E0088D00[unk_24 % 6]) & 0xF) * 16;
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, ulx << 2, uly << 2,
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, ulx << 2, uly << 2,
|
||||||
(ulx << 2) + ((width >> 1) << 1), (uly << 2) + height);
|
(ulx << 2) + ((width >> 1) << 1), (uly << 2) + height);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, spA0);
|
gSPDisplayList(gMainGfxPos++, spA0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPEndDisplayList(gMasterGfxPos++);
|
gSPEndDisplayList(gMainGfxPos++);
|
||||||
gSPBranchList(savedGfxPos, gMasterGfxPos);
|
gSPBranchList(savedGfxPos, gMainGfxPos);
|
||||||
savedGfxPos++;
|
savedGfxPos++;
|
||||||
gSPDisplayList(gMasterGfxPos++, savedGfxPos);
|
gSPDisplayList(gMainGfxPos++, savedGfxPos);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,90 +198,90 @@ void func_E003C498(EffectInstance* effect) {
|
|||||||
s32 numParts = part->numParts;
|
s32 numParts = part->numParts;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp20, part->unk_04.x, part->unk_04.y, part->unk_04.z);
|
shim_guTranslateF(sp20, part->unk_04.x, part->unk_04.y, part->unk_04.z);
|
||||||
shim_guRotateF(sp60, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp60, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
spA0 = part->unk_34 - 1;
|
spA0 = part->unk_34 - 1;
|
||||||
lastPartIdx = effect->numParts - 1;
|
lastPartIdx = effect->numParts - 1;
|
||||||
part = &(effect->data.damageIndicator)[effect->numParts - 1];
|
part = &(effect->data.damageIndicator)[effect->numParts - 1];
|
||||||
|
|
||||||
if (part->alpha == 255) {
|
if (part->alpha == 255) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_AA_TEX_EDGE, G_RM_AA_TEX_EDGE2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_AA_TEX_EDGE, G_RM_AA_TEX_EDGE2);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0);
|
gDPSetCombineLERP(gMainGfxPos++, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0);
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0);
|
gDPSetCombineLERP(gMainGfxPos++, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0, 1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 1; i < effect->numParts; i++, part--) {
|
for(i = 1; i < effect->numParts; i++, part--) {
|
||||||
s32 rIdx = ((i + spA0) % 12) * 3;
|
s32 rIdx = ((i + spA0) % 12) * 3;
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, D_E003CCF8[rIdx], D_E003CCF8[rIdx + 1], D_E003CCF8[rIdx + 2], part->alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E003CCF8[rIdx], D_E003CCF8[rIdx + 1], D_E003CCF8[rIdx + 2], part->alpha);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001D40_351F60);
|
gSPDisplayList(gMainGfxPos++, D_09001D40_351F60);
|
||||||
|
|
||||||
if (i == lastPartIdx) {
|
if (i == lastPartIdx) {
|
||||||
shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, part->unk_38, part->unk_10.x, part->unk_10.y, part->unk_10.z);
|
shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, part->unk_38, part->unk_10.x, part->unk_10.y, part->unk_10.z);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002150_352370);
|
gSPDisplayList(gMainGfxPos++, D_09002150_352370);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, part->unk_38, (part->unk_10.x + part->unk_04.x) * 0.5, (part->unk_10.y + part->unk_04.y) * 0.5, (part->unk_10.z + part->unk_04.z) * 0.5);
|
shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, part->unk_38, (part->unk_10.x + part->unk_04.x) * 0.5, (part->unk_10.y + part->unk_04.y) * 0.5, (part->unk_10.z + part->unk_04.z) * 0.5);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002160_352380);
|
gSPDisplayList(gMainGfxPos++, D_09002160_352380);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001D40_351F60);
|
gSPDisplayList(gMainGfxPos++, D_09001D40_351F60);
|
||||||
|
|
||||||
shim_guTranslateF(sp20, part->unk_04.x, part->unk_04.y, part->unk_04.z);
|
shim_guTranslateF(sp20, part->unk_04.x, part->unk_04.y, part->unk_04.z);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
shim_guScaleF(sp20, part->unk_38, part->unk_38, 1.0f);
|
shim_guScaleF(sp20, part->unk_38, part->unk_38, 1.0f);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (i == lastPartIdx) {
|
if (i == lastPartIdx) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002170_352390);
|
gSPDisplayList(gMainGfxPos++, D_09002170_352390);
|
||||||
} else {
|
} else {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002180_3523A0);
|
gSPDisplayList(gMainGfxPos++, D_09002180_3523A0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == lastPartIdx) {
|
if (i == lastPartIdx) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090021A8_3523C8);
|
gSPDisplayList(gMainGfxPos++, D_090021A8_3523C8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001DE0_352000);
|
gSPDisplayList(gMainGfxPos++, D_09001DE0_352000);
|
||||||
if (numParts < 10) {
|
if (numParts < 10) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E003CCA0[i]);
|
gSPDisplayList(gMainGfxPos++, D_E003CCA0[i]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090021C0_3523E0);
|
gSPDisplayList(gMainGfxPos++, D_090021C0_3523E0);
|
||||||
} else {
|
} else {
|
||||||
s32 temp = numParts % 10;
|
s32 temp = numParts % 10;
|
||||||
s32 temp2 = numParts / 10;
|
s32 temp2 = numParts / 10;
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E003CCA0[temp]);
|
gSPDisplayList(gMainGfxPos++, D_E003CCA0[temp]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002200_352420);
|
gSPDisplayList(gMainGfxPos++, D_09002200_352420);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E003CCA0[temp2]);
|
gSPDisplayList(gMainGfxPos++, D_E003CCA0[temp2]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090021E0_352400);
|
gSPDisplayList(gMainGfxPos++, D_090021E0_352400);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002190_3523B0);
|
gSPDisplayList(gMainGfxPos++, D_09002190_3523B0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -246,9 +246,9 @@ void damage_stars_appendGfx(void* effect) {
|
|||||||
s32 baseIdx;
|
s32 baseIdx;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090004C0_343500);
|
gSPDisplayList(gMainGfxPos++, D_090004C0_343500);
|
||||||
|
|
||||||
baseIdx = (part->unk_2C - 1) * 3;
|
baseIdx = (part->unk_2C - 1) * 3;
|
||||||
baseIdx %= 36;
|
baseIdx %= 36;
|
||||||
@ -258,20 +258,20 @@ void damage_stars_appendGfx(void* effect) {
|
|||||||
s32 gIdx = baseIdx + 1 + i * 3;
|
s32 gIdx = baseIdx + 1 + i * 3;
|
||||||
s32 bIdx = baseIdx + 2 + i * 3;
|
s32 bIdx = baseIdx + 2 + i * 3;
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, D_E0030E90[rIdx % 36], D_E0030E90[gIdx % 36], D_E0030E90[bIdx % 36], part->unk_24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0030E90[rIdx % 36], D_E0030E90[gIdx % 36], D_E0030E90[bIdx % 36], part->unk_24);
|
||||||
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
shim_guRotateF(sp18, part->unk_1C, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp18, part->unk_1C, 0.0f, 0.0f, 1.0f);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090005E0_343620);
|
gSPDisplayList(gMainGfxPos++, D_090005E0_343620);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,19 +140,19 @@ void debuff_appendGfx(void* effect) {
|
|||||||
Matrix4f sp98;
|
Matrix4f sp98;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(eff->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(eff->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp58, sp18, sp98);
|
shim_guMtxCatF(sp58, sp18, sp98);
|
||||||
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++,
|
gSPMatrix(gMainGfxPos++,
|
||||||
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_38, data->unk_39, data->unk_3A, data->unk_34);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_38, data->unk_39, data->unk_3A, data->unk_34);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_3B, data->unk_3C, data->unk_3D, 0);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_3B, data->unk_3C, data->unk_3D, 0);
|
||||||
|
|
||||||
data++;
|
data++;
|
||||||
for (i = 1; i < eff->numParts; i++, data++) {
|
for (i = 1; i < eff->numParts; i++, data++) {
|
||||||
@ -163,12 +163,12 @@ void debuff_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++,
|
gSPMatrix(gMainGfxPos++,
|
||||||
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ void func_E0082580(DisableXFXData* data) {
|
|||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,19 +236,19 @@ void func_E00826C4(DisableXFXData* data) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, data->alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, data->alpha);
|
||||||
|
|
||||||
if (data->alpha == 255) {
|
if (data->alpha == 255) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA |
|
gDPSetRenderMode(gMainGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA |
|
||||||
GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM),
|
GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM),
|
||||||
AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA |
|
AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA |
|
||||||
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM));
|
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM));
|
||||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, SHADE, 0,
|
gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, SHADE, 0,
|
||||||
PRIMITIVE, 0, TEXEL0, 0);
|
PRIMITIVE, 0, TEXEL0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -259,8 +259,8 @@ void func_E00828B4(EffectInstance* effect) {
|
|||||||
s32 unk_38;
|
s32 unk_38;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
||||||
func_E0082580(data);
|
func_E0082580(data);
|
||||||
unk_38 = data->unk_38;
|
unk_38 = data->unk_38;
|
||||||
type = data->type;
|
type = data->type;
|
||||||
@ -269,17 +269,17 @@ void func_E00828B4(EffectInstance* effect) {
|
|||||||
for (i = 1; i < effect->numParts; i++, data++) {
|
for (i = 1; i < effect->numParts; i++, data++) {
|
||||||
if (unk_38 > 0 || type == 10) {
|
if (unk_38 > 0 || type == 10) {
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002198_388548);
|
gSPDisplayList(gMainGfxPos++, D_09002198_388548);
|
||||||
} else {
|
} else {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002100_3884B0);
|
gSPDisplayList(gMainGfxPos++, D_09002100_3884B0);
|
||||||
}
|
}
|
||||||
func_E00826C4(data);
|
func_E00826C4(data);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002230_3885E0);
|
gSPDisplayList(gMainGfxPos++, D_09002230_3885E0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_E0082A84(EffectInstance* effect) {
|
void func_E0082A84(EffectInstance* effect) {
|
||||||
@ -287,8 +287,8 @@ void func_E0082A84(EffectInstance* effect) {
|
|||||||
s32 unk_38;
|
s32 unk_38;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
||||||
func_E0082580(data);
|
func_E0082580(data);
|
||||||
unk_38 = data->unk_38;
|
unk_38 = data->unk_38;
|
||||||
|
|
||||||
@ -296,23 +296,23 @@ void func_E0082A84(EffectInstance* effect) {
|
|||||||
for (i = 1; i < effect->numParts; i++, data++) {
|
for (i = 1; i < effect->numParts; i++, data++) {
|
||||||
func_E00826C4(data);
|
func_E00826C4(data);
|
||||||
if (unk_38 > 0) {
|
if (unk_38 > 0) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090022B0_388660);
|
gSPDisplayList(gMainGfxPos++, D_090022B0_388660);
|
||||||
if (unk_38 < 10) {
|
if (unk_38 < 10) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0082D00[unk_38]);
|
gSPDisplayList(gMainGfxPos++, D_E0082D00[unk_38]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002250_388600);
|
gSPDisplayList(gMainGfxPos++, D_09002250_388600);
|
||||||
} else {
|
} else {
|
||||||
s32 ones = unk_38 % 10;
|
s32 ones = unk_38 % 10;
|
||||||
s32 tens = unk_38 / 10;
|
s32 tens = unk_38 / 10;
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0082D00[ones]);
|
gSPDisplayList(gMainGfxPos++, D_E0082D00[ones]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0082D00[tens]);
|
gSPDisplayList(gMainGfxPos++, D_E0082D00[tens]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002290_388640);
|
gSPDisplayList(gMainGfxPos++, D_09002290_388640);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0082D00[tens]);
|
gSPDisplayList(gMainGfxPos++, D_E0082D00[tens]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002270_388620);
|
gSPDisplayList(gMainGfxPos++, D_09002270_388620);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -133,9 +133,9 @@ void drop_leaves_appendGfx(void* effect) {
|
|||||||
Matrix4f sp98;
|
Matrix4f sp98;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001180_33E790);
|
gSPDisplayList(gMainGfxPos++, D_09001180_33E790);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 20, 100, 20, part->unk_24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 20, 100, 20, part->unk_24);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -151,8 +151,8 @@ void drop_leaves_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001230_33E840);
|
gSPDisplayList(gMainGfxPos++, D_09001230_33E840);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,10 +134,10 @@ void dust_appendGfx(void* effect) {
|
|||||||
Mtx* matrix;
|
Mtx* matrix;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, part->unk_00 == 0 ? D_09000CC0_33FCC0 : D_09000D68_33FD68);
|
gSPDisplayList(gMainGfxPos++, part->unk_00 == 0 ? D_09000CC0_33FCC0 : D_09000D68_33FD68);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, part->unk_30, part->unk_34, part->unk_38, part->unk_18);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, part->unk_30, part->unk_34, part->unk_38, part->unk_18);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, part->unk_3C, part->unk_40, part->unk_44, 0);
|
gDPSetEnvColor(gMainGfxPos++, part->unk_3C, part->unk_40, part->unk_44, 0);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -154,15 +154,15 @@ void dust_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp98, sp18);
|
shim_guMtxCatF(sp58, sp98, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, matrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, matrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (unk_00 < 2) {
|
if (unk_00 < 2) {
|
||||||
gSPDisplayList(gMasterGfxPos++, (i % 2) ? D_09000E18_33FE18 : D_09000E38_33FE38);
|
gSPDisplayList(gMainGfxPos++, (i % 2) ? D_09000E18_33FE18 : D_09000E38_33FE38);
|
||||||
} else {
|
} else {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000E58_33FE58);
|
gSPDisplayList(gMainGfxPos++, D_09000E58_33FE58);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,18 +220,18 @@ void fx_3D_appendGfx(void* effect) {
|
|||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000240_37D3C0);
|
gSPDisplayList(gMainGfxPos++, D_09000240_37D3C0);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->pos.x, part->pos.y, part->pos.z);
|
shim_guTranslateF(sp18, part->pos.x, part->pos.y, part->pos.z);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 200, 255, 255, part->unk_58);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 200, 255, 255, part->unk_58);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->pos.x, part->pos.y, part->pos.z);
|
shim_guTranslateF(sp18, part->pos.x, part->pos.y, part->pos.z);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -242,11 +242,11 @@ void fx_3D_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090002E8_37D468);
|
gSPDisplayList(gMainGfxPos++, D_090002E8_37D468);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -209,16 +209,16 @@ void fx_46_appendGfx(void* effect) {
|
|||||||
|
|
||||||
unk_00 = part->unk_00;
|
unk_00 = part->unk_00;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000420_38EDB0);
|
gSPDisplayList(gMainGfxPos++, D_09000420_38EDB0);
|
||||||
|
|
||||||
shim_guTranslateF(sp20, part->unk_08, part->unk_0C, part->unk_10);
|
shim_guTranslateF(sp20, part->unk_08, part->unk_0C, part->unk_10);
|
||||||
shim_guRotateF(sp60, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp60, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
||||||
@ -234,14 +234,14 @@ void fx_46_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, part->unk_44, part->unk_45, part->unk_46, unk_1C);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, part->unk_44, part->unk_45, part->unk_46, unk_1C);
|
||||||
|
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090003A0_38ED30);
|
gSPDisplayList(gMainGfxPos++, D_090003A0_38ED30);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -221,11 +221,11 @@ void fx_63_appendGfx(void* effect) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
if (part->unk_00 != 0) {
|
if (part->unk_00 != 0) {
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, part->unk_28, part->unk_2C, part->unk_30, unk_34);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, part->unk_28, part->unk_2C, part->unk_30, unk_34);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, part->unk_38, part->unk_3C, part->unk_40, part->unk_44);
|
gDPSetEnvColor(gMainGfxPos++, part->unk_38, part->unk_3C, part->unk_40, part->unk_44);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00C6C9C[unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E00C6C9C[unk_00]);
|
||||||
|
|
||||||
for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
||||||
part->unk_4C += part->unk_54;
|
part->unk_4C += part->unk_54;
|
||||||
@ -251,18 +251,18 @@ void fx_63_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
shim_guScaleF(sp18, part->unk_70, part->unk_6C, 1.0f);
|
shim_guScaleF(sp18, part->unk_70, part->unk_6C, 1.0f);
|
||||||
shim_guRotateF(sp58, part->unk_74, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp58, part->unk_74, 0.0f, 0.0f, 1.0f);
|
||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, tempX, tempY, (tempX + 0x3F) * 4, (tempY + 0xF) * 4);
|
gDPSetTileSize(gMainGfxPos++, 1, tempX, tempY, (tempX + 0x3F) * 4, (tempY + 0xF) * 4);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00C6C90[unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E00C6C90[unk_00]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,27 +246,27 @@ void fx_65_appendGfx(void* effect) {
|
|||||||
sp54 = data->unk_00;
|
sp54 = data->unk_00;
|
||||||
sp58 = data->unk_34;
|
sp58 = data->unk_34;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp10, 0.0f, 0.0f, 0.0f);
|
shim_guTranslateF(sp10, 0.0f, 0.0f, 0.0f);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00CACB0[sp54]);
|
gSPDisplayList(gMainGfxPos++, D_E00CACB0[sp54]);
|
||||||
|
|
||||||
if (sp54 >= 2) {
|
if (sp54 >= 2) {
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, SHADE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, COMBINED, COMBINED, 0, PRIMITIVE, 0);
|
gDPSetCombineLERP(gMainGfxPos++, SHADE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, COMBINED, COMBINED, 0, PRIMITIVE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, primAlpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, primAlpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_28, data->unk_2C, data->unk_30, 0);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, 0);
|
||||||
gSPBranchList(gMasterGfxPos, gMasterGfxPos + 0x79);
|
gSPBranchList(gMainGfxPos, gMainGfxPos + 0x79);
|
||||||
|
|
||||||
sp5C = (Vtx_t*) (gMasterGfxPos + 1);
|
sp5C = (Vtx_t*) (gMainGfxPos + 1);
|
||||||
sp60 = -1;
|
sp60 = -1;
|
||||||
sp64 = (sp50 & 0x3F) << 5;
|
sp64 = (sp50 & 0x3F) << 5;
|
||||||
gMasterGfxPos += 0x79;
|
gMainGfxPos += 0x79;
|
||||||
|
|
||||||
// use i in iteration?
|
// use i in iteration?
|
||||||
var_fp = 0;
|
var_fp = 0;
|
||||||
@ -381,12 +381,12 @@ void fx_65_appendGfx(void* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = sp60; i < 29; i++) {
|
for (i = sp60; i < 29; i++) {
|
||||||
gSPVertex(gMasterGfxPos++, &sp5C[i * 2], 4, 0);
|
gSPVertex(gMainGfxPos++, &sp5C[i * 2], 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
INCLUDE_ASM(s32, "effects/effect_65", fx_65_appendGfx);
|
INCLUDE_ASM(s32, "effects/effect_65", fx_65_appendGfx);
|
||||||
|
@ -200,8 +200,8 @@ void fx_75_appendGfx(void* effect) {
|
|||||||
Matrix4f mtxTransfrom;
|
Matrix4f mtxTransfrom;
|
||||||
Matrix4f mtxTemp;
|
Matrix4f mtxTemp;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(mtxTransfrom, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(mtxTransfrom, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guScaleF(mtxTemp, data->scale, data->scale, data->scale);
|
shim_guScaleF(mtxTemp, data->scale, data->scale, data->scale);
|
||||||
@ -212,13 +212,13 @@ void fx_75_appendGfx(void* effect) {
|
|||||||
}
|
}
|
||||||
shim_guMtxF2L(mtxTransfrom, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(mtxTransfrom, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, data->unk_34);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, data->unk_34);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->envCol.r, data->envCol.g, data->envCol.b, data->unk_24 * data->masterAlpha / 255);
|
gDPSetEnvColor(gMainGfxPos++, data->envCol.r, data->envCol.g, data->envCol.b, data->unk_24 * data->masterAlpha / 255);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00EAA58[0]);
|
gSPDisplayList(gMainGfxPos++, D_E00EAA58[0]);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, uls0, ult0, uls0 + 252, ult0 + 252);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls0, ult0, uls0 + 252, ult0 + 252);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, uls1, ult1, uls1 + 252, ult1 + 252);
|
gDPSetTileSize(gMainGfxPos++, 1, uls1, ult1, uls1 + 252, ult1 + 252);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00EAA50[type]);
|
gSPDisplayList(gMainGfxPos++, D_E00EAA50[type]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -115,19 +115,19 @@ void fx_86_appendGfx(void* effect) {
|
|||||||
s32 primAlpha = part->unk_24;
|
s32 primAlpha = part->unk_24;
|
||||||
s32 dlistIdx = part->unk_00;
|
s32 dlistIdx = part->unk_00;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp10, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp10, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guScaleF(sp50, part->unk_34, part->unk_34, part->unk_34);
|
shim_guScaleF(sp50, part->unk_34, part->unk_34, part->unk_34);
|
||||||
shim_guMtxCatF(sp50, sp10, sp10);
|
shim_guMtxCatF(sp50, sp10, sp10);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, part->unk_18, part->unk_1C, part->unk_20, primAlpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, part->unk_18, part->unk_1C, part->unk_20, primAlpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, part->unk_28, part->unk_2C, part->unk_30, 0);
|
gDPSetEnvColor(gMainGfxPos++, part->unk_28, part->unk_2C, part->unk_30, 0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E01284B0[0]);
|
gSPDisplayList(gMainGfxPos++, D_E01284B0[0]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0128480[dlistIdx % ARRAY_COUNT(D_E0128480)]);
|
gSPDisplayList(gMainGfxPos++, D_E0128480[dlistIdx % ARRAY_COUNT(D_E0128480)]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -193,19 +193,19 @@ void embers_appendGfx(void* effect) {
|
|||||||
Matrix4f sp50;
|
Matrix4f sp50;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp10, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp10, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guScaleF(sp50, part->unk_40, part->unk_40, part->unk_40);
|
shim_guScaleF(sp50, part->unk_40, part->unk_40, part->unk_40);
|
||||||
shim_guMtxCatF(sp50, sp10, sp10);
|
shim_guMtxCatF(sp50, sp10, sp10);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, part->unk_20, part->unk_24, part->unk_28, unk_2C);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, part->unk_20, part->unk_24, part->unk_28, unk_2C);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, part->unk_30, part->unk_34, part->unk_38, part->unk_3C);
|
gDPSetEnvColor(gMainGfxPos++, part->unk_30, part->unk_34, part->unk_38, part->unk_3C);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00E0A40[1]);
|
gSPDisplayList(gMainGfxPos++, D_E00E0A40[1]);
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
||||||
@ -213,13 +213,13 @@ void embers_appendGfx(void* effect) {
|
|||||||
shim_guTranslateF(sp10, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp10, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0, (i % 4) * 16 * 4, 15 * 4, ((i % 4) * 16 + 15) * 4);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, (i % 4) * 16 * 4, 15 * 4, ((i % 4) * 16 + 15) * 4);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, (s32) part->unk_5C * 4, (s32) part->unk_60 * 4, ((s32) part->unk_5C + 15) * 4, ((s32) part->unk_60 + 15) * 4);
|
gDPSetTileSize(gMainGfxPos++, 1, (s32) part->unk_5C * 4, (s32) part->unk_60 * 4, ((s32) part->unk_5C + 15) * 4, ((s32) part->unk_60 + 15) * 4);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00E0A40[0]);
|
gSPDisplayList(gMainGfxPos++, D_E00E0A40[0]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -217,8 +217,8 @@ void emote_appendGfx(void* effect) {
|
|||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
if (type != 1) {
|
if (type != 1) {
|
||||||
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
@ -234,9 +234,9 @@ void emote_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002170_336DE0);
|
gSPDisplayList(gMainGfxPos++, D_09002170_336DE0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
} else {
|
} else {
|
||||||
if (part->unk_38 == 0) {
|
if (part->unk_38 == 0) {
|
||||||
for (i = 0; i < 3; i++, part++) {
|
for (i = 0; i < 3; i++, part++) {
|
||||||
@ -249,17 +249,17 @@ void emote_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 235, 28, 0, 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 235, 28, 0, 255);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002578_3371E8);
|
gSPDisplayList(gMainGfxPos++, D_09002578_3371E8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, matrix, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, matrix, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
unk_38 = part->unk_38;
|
unk_38 = part->unk_38;
|
||||||
dlist = D_E0020CA4[type];
|
dlist = D_E0020CA4[type];
|
||||||
@ -271,14 +271,14 @@ void emote_appendGfx(void* effect) {
|
|||||||
h = 16;
|
h = 16;
|
||||||
uls = 128 - unk_38 * 16;
|
uls = 128 - unk_38 * 16;
|
||||||
ult = 0;
|
ult = 0;
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 220, 0, 0, 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 220, 0, 0, 255);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
w = 32;
|
w = 32;
|
||||||
h = 48;
|
h = 48;
|
||||||
uls = 128 - unk_38 * 32;
|
uls = 128 - unk_38 * 32;
|
||||||
ult = 0;
|
ult = 0;
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 220, 0, 0, 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 220, 0, 0, 255);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
w = 32;
|
w = 32;
|
||||||
@ -286,7 +286,7 @@ void emote_appendGfx(void* effect) {
|
|||||||
uls = 128 - unk_38 * 32;
|
uls = 128 - unk_38 * 32;
|
||||||
ult = 0;
|
ult = 0;
|
||||||
idx = (part->unk_2C * 3) % (ARRAY_COUNT(D_E0020D94) / 3);
|
idx = (part->unk_2C * 3) % (ARRAY_COUNT(D_E0020D94) / 3);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, D_E0020D94[idx], D_E0020D94[idx + 1], D_E0020D94[idx + 2], 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0020D94[idx], D_E0020D94[idx + 1], D_E0020D94[idx + 2], 255);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
w = 32;
|
w = 32;
|
||||||
@ -297,14 +297,14 @@ void emote_appendGfx(void* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dlist != NULL) {
|
if (dlist != NULL) {
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, uls * 4, ult * 4, (uls + w) * 4, (ult + h) * 4);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls * 4, ult * 4, (uls + w) * 4, (ult + h) * 4);
|
||||||
|
|
||||||
if (dlist2 != NULL) {
|
if (dlist2 != NULL) {
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -142,13 +142,13 @@ void ending_decals_appendGfx(void* effect) {
|
|||||||
dlist1 = D_E00685F4[data->type];
|
dlist1 = D_E00685F4[data->type];
|
||||||
dlist2 = D_E00685B0[data->type];
|
dlist2 = D_E00685B0[data->type];
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->scale, data->pos.x, data->pos.y, data->pos.z);
|
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->scale, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
temp_f64 = data->haloAlpha;
|
temp_f64 = data->haloAlpha;
|
||||||
if (unk_20 % 2 == 0) {
|
if (unk_20 % 2 == 0) {
|
||||||
@ -157,21 +157,21 @@ void ending_decals_appendGfx(void* effect) {
|
|||||||
alpha = temp_f64;
|
alpha = temp_f64;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 26, 121, 29, 158);
|
gDPSetEnvColor(gMainGfxPos++, 26, 121, 29, 158);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_BAYER);
|
gDPSetColorDither(gMainGfxPos++, G_CD_BAYER);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist1);
|
gSPDisplayList(gMainGfxPos++, dlist1);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_24, data->unk_25, data->unk_26, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_24, data->unk_25, data->unk_26, alpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_27, data->unk_28, data->unk_29, 0);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_27, data->unk_28, data->unk_29, 0);
|
||||||
|
|
||||||
if (dlist2 == D_09001E40_36CD20) {
|
if (dlist2 == D_09001E40_36CD20) {
|
||||||
dlist2 = D_E00685BC[unk_20 % 14];
|
dlist2 = D_E00685BC[unk_20 % 14];
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
|
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_DISABLE);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -252,22 +252,22 @@ void energy_in_out_appendGfx(void* effect) {
|
|||||||
Matrix4f sp60;
|
Matrix4f sp60;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, scale, part->pos.x, part->pos.y, part->pos.z);
|
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, scale, part->pos.x, part->pos.y, part->pos.z);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, part->unk_18, part->unk_1C, part->unk_20, unk_24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, part->unk_18, part->unk_1C, part->unk_20, unk_24);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, part->unk_28, part->unk_2C, part->unk_30, 0);
|
gDPSetEnvColor(gMainGfxPos++, part->unk_28, part->unk_2C, part->unk_30, 0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000200_3D6130);
|
gSPDisplayList(gMainGfxPos++, D_09000200_3D6130);
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
||||||
f32 scale = part->scale;
|
f32 scale = part->scale;
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, unk_18, unk_1C, unk_20, (unk_24 * part->unk_24) / 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_18, unk_1C, unk_20, (unk_24 * part->unk_24) / 255);
|
||||||
|
|
||||||
shim_guRotateF(sp20, part->unk_3C, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp20, part->unk_3C, 0.0f, 0.0f, 1.0f);
|
||||||
shim_guTranslateF(sp60, part->pos.x + unk_38, 0.0f, 0.0f);
|
shim_guTranslateF(sp60, part->pos.x + unk_38, 0.0f, 0.0f);
|
||||||
@ -280,10 +280,10 @@ void energy_in_out_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00D6E40[unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E00D6E40[unk_00]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -233,43 +233,43 @@ void energy_orb_wave_appendGfx(void* effect) {
|
|||||||
Matrix4f sp18;
|
Matrix4f sp18;
|
||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guScaleF(sp58, data->scale, data->scale, data->scale);
|
shim_guScaleF(sp58, data->scale, data->scale, data->scale);
|
||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_20, data->unk_24, data->unk_28, unk_2C);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_20, data->unk_24, data->unk_28, unk_2C);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_BAYER);
|
gDPSetColorDither(gMainGfxPos++, G_CD_BAYER);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_PATTERN);
|
||||||
|
|
||||||
if (unk_00 < 3) {
|
if (unk_00 < 3) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001000_3A5320);
|
gSPDisplayList(gMainGfxPos++, D_09001000_3A5320);
|
||||||
|
|
||||||
shim_guRotateF(sp18, unk_14, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp18, unk_14, 0.0f, 0.0f, 1.0f);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090011D0_3A54F0);
|
gSPDisplayList(gMainGfxPos++, D_090011D0_3A54F0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_MAGICSQ);
|
gDPSetColorDither(gMainGfxPos++, G_CD_MAGICSQ);
|
||||||
|
|
||||||
shim_guRotateF(sp18, -unk_14 * 8, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp18, -unk_14 * 8, 0.0f, 0.0f, 1.0f);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090011F0_3A5510);
|
gSPDisplayList(gMainGfxPos++, D_090011F0_3A5510);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
} else {
|
} else {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090010A8_3A53C8);
|
gSPDisplayList(gMainGfxPos++, D_090010A8_3A53C8);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001210_3A5530);
|
gSPDisplayList(gMainGfxPos++, D_09001210_3A5530);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
|
gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
|
||||||
gDPSetAlphaDither(gMasterGfxPos++, G_AD_DISABLE);
|
gDPSetAlphaDither(gMainGfxPos++, G_AD_DISABLE);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -144,27 +144,27 @@ void energy_shockwave_appendGfx(void* effect) {
|
|||||||
s32 uls2;
|
s32 uls2;
|
||||||
s32 ult2;
|
s32 ult2;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000E60_376370);
|
gSPDisplayList(gMainGfxPos++, D_09000E60_376370);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 179, 30, data->unk_24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 179, 30, data->unk_24);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_50, data->unk_51, data->unk_52, 128);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_50, data->unk_51, data->unk_52, 128);
|
||||||
|
|
||||||
uls = data->unk_30 * 4;
|
uls = data->unk_30 * 4;
|
||||||
ult = data->unk_34 * 4;
|
ult = data->unk_34 * 4;
|
||||||
uls2 = data->unk_38 * 4;
|
uls2 = data->unk_38 * 4;
|
||||||
ult2 = data->unk_3C * 4;
|
ult2 = data->unk_3C * 4;
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 252, ult + 252);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 252, ult + 252);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, uls2, ult2, uls2 + 124, ult2 + 124);
|
gDPSetTileSize(gMainGfxPos++, 1, uls2, ult2, uls2 + 124, ult2 + 124);
|
||||||
|
|
||||||
shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guScaleF(sp50, data->unk_1C, data->unk_1C, data->unk_1C);
|
shim_guScaleF(sp50, data->unk_1C, data->unk_1C, data->unk_1C);
|
||||||
shim_guMtxCatF(sp50, sp10, sp10);
|
shim_guMtxCatF(sp50, sp10, sp10);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000DC0_3762D0);
|
gSPDisplayList(gMainGfxPos++, D_09000DC0_3762D0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -168,8 +168,8 @@ void explosion_appendGfx(void* effect) {
|
|||||||
s32 primB;
|
s32 primB;
|
||||||
s32 cond;
|
s32 cond;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->pos.x, part->pos.y, part->pos.z);
|
shim_guTranslateF(sp18, part->pos.x, part->pos.y, part->pos.z);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -178,23 +178,23 @@ void explosion_appendGfx(void* effect) {
|
|||||||
|
|
||||||
part++;
|
part++;
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (part->unk_00 != -1) {
|
if (part->unk_00 != -1) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000840_3447B0);
|
gSPDisplayList(gMainGfxPos++, D_09000840_3447B0);
|
||||||
|
|
||||||
shim_guScaleF(sp18, part->unk_20, part->unk_20, 1.0f);
|
shim_guScaleF(sp18, part->unk_20, part->unk_20, 1.0f);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 240, part->unk_38);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 240, part->unk_38);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090008F0_344860);
|
gSPDisplayList(gMainGfxPos++, D_090008F0_344860);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000910_344880);
|
gSPDisplayList(gMainGfxPos++, D_09000910_344880);
|
||||||
|
|
||||||
shim_guScaleF(sp18, part->unk_20, part->unk_20, part->unk_20);
|
shim_guScaleF(sp18, part->unk_20, part->unk_20, part->unk_20);
|
||||||
shim_guRotateF(sp58, part->unk_28, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp58, part->unk_28, 0.0f, 0.0f, 1.0f);
|
||||||
@ -220,9 +220,9 @@ void explosion_appendGfx(void* effect) {
|
|||||||
primB = 255;
|
primB = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, primB, primAlpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, primB, primAlpha);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00328B0[unk_34 % 3]);
|
gSPDisplayList(gMainGfxPos++, D_E00328B0[unk_34 % 3]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -128,9 +128,9 @@ void falling_leaves_appendGfx(void* effect) {
|
|||||||
Matrix4f sp98;
|
Matrix4f sp98;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001100_3601E0);
|
gSPDisplayList(gMainGfxPos++, D_09001100_3601E0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 20, 100, 20, part->unk_24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 20, 100, 20, part->unk_24);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -146,8 +146,8 @@ void falling_leaves_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090011B0_360290);
|
gSPDisplayList(gMainGfxPos++, D_090011B0_360290);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,8 +188,8 @@ void fire_breath_appendGfx(void* effect) {
|
|||||||
Gfx* dlist2 = D_E006EC0C[type];
|
Gfx* dlist2 = D_E006EC0C[type];
|
||||||
s32 unk_5C = data->unk_5C;
|
s32 unk_5C = data->unk_5C;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
if (type == FIRE_BREATH_SMALL) {
|
if (type == FIRE_BREATH_SMALL) {
|
||||||
shim_guTranslateF(sp18, data->initPos.x, data->initPos.y, data->initPos.z);
|
shim_guTranslateF(sp18, data->initPos.x, data->initPos.y, data->initPos.z);
|
||||||
@ -197,18 +197,18 @@ void fire_breath_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000C20_374000);
|
gSPDisplayList(gMainGfxPos++, D_09000C20_374000);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000C00_373FE0);
|
gSPDisplayList(gMainGfxPos++, D_09000C00_373FE0);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primR, data->primG, data->primB, data->alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, data->alpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->envR, data->envG, data->envB, envAlpha);
|
gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->envB, envAlpha);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, ((unk_5C * 32) + 0) * 4, 0, ((unk_5C * 32) + 32) * 4, 128);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, ((unk_5C * 32) + 0) * 4, 0, ((unk_5C * 32) + 32) * 4, 128);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, ((unk_5C * 32) + 32) * 4, 0, ((unk_5C * 32) + 64) * 4, 128);
|
gDPSetTileSize(gMainGfxPos++, 1, ((unk_5C * 32) + 32) * 4, 0, ((unk_5C * 32) + 64) * 4, 128);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -217,8 +217,8 @@ void fire_breath_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -209,24 +209,24 @@ void fire_flower_appendGfx(void* effect) {
|
|||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->pos.x, part->pos.y, part->pos.z);
|
shim_guTranslateF(sp18, part->pos.x, part->pos.y, part->pos.z);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 0, 0, part->unk_3C);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 0, 0, part->unk_3C);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 255, 0, 0, part->unk_38);
|
gDPSetEnvColor(gMainGfxPos++, 255, 0, 0, part->unk_38);
|
||||||
|
|
||||||
if ((u32) (unk_04 - 4) < 3U) {
|
if ((u32) (unk_04 - 4) < 3U) {
|
||||||
shim_guTranslateF(sp18, 0.0f, 16.0f, 0.0f);
|
shim_guTranslateF(sp18, 0.0f, 16.0f, 0.0f);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000DE0_381180);
|
gSPDisplayList(gMainGfxPos++, D_09000DE0_381180);
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
||||||
@ -236,23 +236,23 @@ void fire_flower_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, part->unk_00 != 0 ? D_09000ED8_381278 : D_09000EB8_381258);
|
gSPDisplayList(gMainGfxPos++, part->unk_00 != 0 ? D_09000ED8_381278 : D_09000EB8_381258);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000D40_3810E0);
|
gSPDisplayList(gMainGfxPos++, D_09000D40_3810E0);
|
||||||
gDPLoadTextureTile_4b(
|
gDPLoadTextureTile_4b(
|
||||||
gMasterGfxPos++, D_09000000_3803A0[3 - unk_34],
|
gMainGfxPos++, D_09000000_3803A0[3 - unk_34],
|
||||||
G_IM_FMT_CI, 32, 0, 0, 0, 31, 31, 0,
|
G_IM_FMT_CI, 32, 0, 0, 0, 31, 31, 0,
|
||||||
G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP,
|
G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP,
|
||||||
5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gDPLoadMultiTile_4b(
|
gDPLoadMultiTile_4b(
|
||||||
gMasterGfxPos++, D_09000000_3803A0[2 - unk_34],
|
gMainGfxPos++, D_09000000_3803A0[2 - unk_34],
|
||||||
0x0080, 1, G_IM_FMT_CI, 32, 0, 0, 0, 31, 31, 0,
|
0x0080, 1, G_IM_FMT_CI, 32, 0, 0, 0, 31, 31, 0,
|
||||||
G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP,
|
G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP,
|
||||||
5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
@ -264,8 +264,8 @@ void fire_flower_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000EF8_381298);
|
gSPDisplayList(gMainGfxPos++, D_09000EF8_381298);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -193,15 +193,15 @@ void func_E00863B4(EffectInstance* effect) {
|
|||||||
s32 cond;
|
s32 cond;
|
||||||
f32 unk_28;
|
f32 unk_28;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
||||||
|
|
||||||
unk_28 = part->unk_28;
|
unk_28 = part->unk_28;
|
||||||
|
|
||||||
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_28, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_28, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
envA = (temp_f32 - temp_s32) * 256.0f;
|
envA = (temp_f32 - temp_s32) * 256.0f;
|
||||||
primA = part->unk_2C;
|
primA = part->unk_2C;
|
||||||
@ -249,17 +249,17 @@ void func_E00863B4(EffectInstance* effect) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
savedGfxPos = gMasterGfxPos++;
|
savedGfxPos = gMainGfxPos++;
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0086AB4[unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E0086AB4[unk_00]);
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
|
|
||||||
if (cond) {
|
if (cond) {
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0, 0, 0, 0);
|
gDPSetTileSize(gMainGfxPos++, 1, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < effect->numParts; i++, part++) {
|
for (i = 1; i < effect->numParts; i++, part++) {
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0086AB4[part->unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E0086AB4[part->unk_00]);
|
||||||
|
|
||||||
shim_guRotateF(sp20, part->unk_1C, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp20, part->unk_1C, 0.0f, 0.0f, 1.0f);
|
||||||
shim_guRotateF(sp60, part->unk_24, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp60, part->unk_24, 0.0f, 1.0f, 0.0f);
|
||||||
@ -268,26 +268,26 @@ void func_E00863B4(EffectInstance* effect) {
|
|||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0086AA0[temp_s32]);
|
gSPDisplayList(gMainGfxPos++, D_E0086AA0[temp_s32]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPEndDisplayList(gMasterGfxPos++);
|
gSPEndDisplayList(gMainGfxPos++);
|
||||||
gSPBranchList(savedGfxPos, gMasterGfxPos);
|
gSPBranchList(savedGfxPos, gMainGfxPos);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primR, primG, primB, primA);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, primA);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, envR, envG, engB, envA);
|
gDPSetEnvColor(gMainGfxPos++, envR, envG, engB, envA);
|
||||||
gSPDisplayList(gMasterGfxPos++, savedGfxPos + 1);
|
gSPDisplayList(gMainGfxPos++, savedGfxPos + 1);
|
||||||
|
|
||||||
shim_guRotateF(sp20, 120.0f, 1.0f, 1.0f, 1.0f);
|
shim_guRotateF(sp20, 120.0f, 1.0f, 1.0f, 1.0f);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, savedGfxPos + 1);
|
gSPDisplayList(gMainGfxPos++, savedGfxPos + 1);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, savedGfxPos + 1);
|
gSPDisplayList(gMainGfxPos++, savedGfxPos + 1);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -254,8 +254,8 @@ void firework_rocket_appendGfx(void* effect) {
|
|||||||
firework_rocket_blur_alpha = minBlurAlpha;
|
firework_rocket_blur_alpha = minBlurAlpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
mtx_0_0 = camera->perspectiveMatrix[0][0];
|
mtx_0_0 = camera->perspectiveMatrix[0][0];
|
||||||
mtx_0_1 = camera->perspectiveMatrix[0][1];
|
mtx_0_1 = camera->perspectiveMatrix[0][1];
|
||||||
@ -274,13 +274,13 @@ void firework_rocket_appendGfx(void* effect) {
|
|||||||
mtx_3_2 = camera->perspectiveMatrix[3][2];
|
mtx_3_2 = camera->perspectiveMatrix[3][2];
|
||||||
mtx_3_3 = camera->perspectiveMatrix[3][3];
|
mtx_3_3 = camera->perspectiveMatrix[3][3];
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E010ACCC[variation]);
|
gSPDisplayList(gMainGfxPos++, D_E010ACCC[variation]);
|
||||||
centerX = data->pos.x;
|
centerX = data->pos.x;
|
||||||
centerY = data->pos.y;
|
centerY = data->pos.y;
|
||||||
centerZ = data->pos.z;
|
centerZ = data->pos.z;
|
||||||
radius = data->radius;
|
radius = data->radius;
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->r, data->g, data->b, minBlurAlpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->r, data->g, data->b, minBlurAlpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->r, data->g, data->b, 0);
|
gDPSetEnvColor(gMainGfxPos++, data->r, data->g, data->b, 0);
|
||||||
|
|
||||||
if (isExploded == TRUE) {
|
if (isExploded == TRUE) {
|
||||||
sparkDir = D_E010AF68[variation].sparks;
|
sparkDir = D_E010AF68[variation].sparks;
|
||||||
@ -330,7 +330,7 @@ void firework_rocket_appendGfx(void* effect) {
|
|||||||
y += camera->viewportStartY;
|
y += camera->viewportStartY;
|
||||||
y *= 4.0f;
|
y *= 4.0f;
|
||||||
|
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++,
|
gSPScisTextureRectangle(gMainGfxPos++,
|
||||||
x, y, x + 8.0f, y + 8.0f,
|
x, y, x + 8.0f, y + 8.0f,
|
||||||
G_TX_RENDERTILE, 4 << 5, 4 << 5, 16 << 10, 16 << 10);
|
G_TX_RENDERTILE, 4 << 5, 4 << 5, 16 << 10, 16 << 10);
|
||||||
}
|
}
|
||||||
|
@ -153,16 +153,16 @@ void flame_appendGfx(void* effect) {
|
|||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
Matrix4f sp98;
|
Matrix4f sp98;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
if (D_E0040880 != gGameStatusPtr->frameCounter) {
|
if (D_E0040880 != gGameStatusPtr->frameCounter) {
|
||||||
D_E0040880 = gGameStatusPtr->frameCounter;
|
D_E0040880 = gGameStatusPtr->frameCounter;
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000918_3544C8);
|
gSPDisplayList(gMainGfxPos++, D_09000918_3544C8);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, uls, ult, uls + 128, ult + 256);
|
gDPSetTileSize(gMainGfxPos++, 1, uls, ult, uls + 128, ult + 256);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090009E0_354590);
|
gSPDisplayList(gMainGfxPos++, D_090009E0_354590);
|
||||||
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr));
|
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr));
|
||||||
gDPSetScissorFrac(gMasterGfxPos++, G_SC_NON_INTERLACE,
|
gDPSetScissorFrac(gMainGfxPos++, G_SC_NON_INTERLACE,
|
||||||
camera->viewportStartX * 4.0f,
|
camera->viewportStartX * 4.0f,
|
||||||
camera->viewportStartY * 4.0f,
|
camera->viewportStartY * 4.0f,
|
||||||
(camera->viewportStartX + camera->viewportW) * 4.0f,
|
(camera->viewportStartX + camera->viewportW) * 4.0f,
|
||||||
@ -171,11 +171,11 @@ void flame_appendGfx(void* effect) {
|
|||||||
|
|
||||||
unkStruct = &D_E0040840[unk_00];
|
unkStruct = &D_E0040840[unk_00];
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, unkStruct->unk_0C);
|
gSPDisplayList(gMainGfxPos++, unkStruct->unk_0C);
|
||||||
gDPSetKeyR(gMasterGfxPos++, unkStruct->unk_03, unkStruct->unk_00, 0);
|
gDPSetKeyR(gMainGfxPos++, unkStruct->unk_03, unkStruct->unk_00, 0);
|
||||||
gDPSetKeyGB(gMasterGfxPos++, unkStruct->unk_03, unkStruct->unk_01, 0, unkStruct->unk_03, unkStruct->unk_02, 0);
|
gDPSetKeyGB(gMainGfxPos++, unkStruct->unk_03, unkStruct->unk_01, 0, unkStruct->unk_03, unkStruct->unk_02, 0);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, unkStruct->unk_07, unkStruct->unk_07, unkStruct->unk_07, 0);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, unkStruct->unk_07, unkStruct->unk_07, unkStruct->unk_07, 0);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, unkStruct->unk_04, unkStruct->unk_05, unkStruct->unk_06, 0);
|
gDPSetEnvColor(gMainGfxPos++, unkStruct->unk_04, unkStruct->unk_05, unkStruct->unk_06, 0);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -184,9 +184,9 @@ void flame_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp98, sp98);
|
shim_guMtxCatF(sp58, sp98, sp98);
|
||||||
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090008F8_3544A8);
|
gSPDisplayList(gMainGfxPos++, D_090008F8_3544A8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -144,31 +144,31 @@ void flashing_box_shockwave_appendGfx(void* effect) {
|
|||||||
|
|
||||||
shim_guRotateF(sp98, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp98, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guMtxCatF(sp98, sp18, sp18);
|
shim_guMtxCatF(sp98, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_30, data->unk_34, data->unk_38, data->unk_18);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_30, data->unk_34, data->unk_38, data->unk_18);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_3C, data->unk_40, data->unk_44, 0);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_3C, data->unk_40, data->unk_44, 0);
|
||||||
|
|
||||||
if ((unk_00 == 0 || unk_00 == 1) && unk_20 % 2) {
|
if ((unk_00 == 0 || unk_00 == 1) && unk_20 % 2) {
|
||||||
shim_guScaleF(sp18, data->unk_28, data->unk_2C, 15.0f / 14);
|
shim_guScaleF(sp18, data->unk_28, data->unk_2C, 15.0f / 14);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000600_3936A0);
|
gSPDisplayList(gMainGfxPos++, D_09000600_3936A0);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, unk_20 * 8, unk_20 * 8, unk_20 * 8 + 128, unk_20 * 8 + 128);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, unk_20 * 8, unk_20 * 8, unk_20 * 8 + 128, unk_20 * 8 + 128);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090008E8_393988);
|
gSPDisplayList(gMainGfxPos++, D_090008E8_393988);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unk_00 >= 1 && unk_00 <= 3) {
|
if (unk_00 >= 1 && unk_00 <= 3) {
|
||||||
if (unk_00 == 1) {
|
if (unk_00 == 1) {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 0, data->unk_14);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 0, data->unk_14);
|
||||||
}
|
}
|
||||||
|
|
||||||
shim_guTranslateF(sp18, 0.0f, data->unk_2C, 0.0f);
|
shim_guTranslateF(sp18, 0.0f, data->unk_2C, 0.0f);
|
||||||
@ -176,11 +176,11 @@ void flashing_box_shockwave_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000950_3939F0);
|
gSPDisplayList(gMainGfxPos++, D_09000950_3939F0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000FF8_394098);
|
gSPDisplayList(gMainGfxPos++, D_09000FF8_394098);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -121,19 +121,19 @@ void floating_cloud_puff_appendGfx(void* effect) {
|
|||||||
Matrix4f sp10;
|
Matrix4f sp10;
|
||||||
Matrix4f sp50;
|
Matrix4f sp50;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guScaleF(sp50, scale, scale, scale);
|
shim_guScaleF(sp50, scale, scale, scale);
|
||||||
shim_guMtxCatF(sp50, sp10, sp10);
|
shim_guMtxCatF(sp50, sp10, sp10);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_28, data->unk_2C, data->unk_30, 0);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, 0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000080_3D4F10);
|
gSPDisplayList(gMainGfxPos++, D_09000080_3D4F10);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000168_3D4FF8);
|
gSPDisplayList(gMainGfxPos++, D_09000168_3D4FF8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -147,15 +147,15 @@ void floating_flower_appendGfx(void* effect) {
|
|||||||
u32 alpha;
|
u32 alpha;
|
||||||
u8 rgb, a;
|
u8 rgb, a;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
||||||
|
|
||||||
shim_guPositionF(mtxTransform, part->rot.x, part->rot.y, 0.0f, 1.0f, part->pos.x, part->pos.y, part->pos.z);
|
shim_guPositionF(mtxTransform, part->rot.x, part->rot.y, 0.0f, 1.0f, part->pos.x, part->pos.y, part->pos.z);
|
||||||
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
a = alpha = 255;
|
a = alpha = 255;
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (*gBackgroundFogModePtr == FOG_MODE_1) {
|
if (*gBackgroundFogModePtr == FOG_MODE_1) {
|
||||||
shim_get_background_color_blend(&rgb, &rgb, &rgb, &a);
|
shim_get_background_color_blend(&rgb, &rgb, &rgb, &a);
|
||||||
@ -163,8 +163,8 @@ void floating_flower_appendGfx(void* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (alpha != 0) {
|
if (alpha != 0) {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_090002F0_330750);
|
gSPDisplayList(gMainGfxPos++, D_090002F0_330750);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,23 +111,23 @@ void floating_rock_appendGfx(void* effect) {
|
|||||||
s32 unk_44 = data->unk_44;
|
s32 unk_44 = data->unk_44;
|
||||||
Matrix4f sp20;
|
Matrix4f sp20;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guPositionF(sp20, data->unk_24, data->unk_2C, data->unk_28, data->unk_3C, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guPositionF(sp20, data->unk_24, data->unk_2C, data->unk_28, data->unk_3C, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 215, 215, 110, unk_44);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 215, 215, 110, unk_44);
|
||||||
|
|
||||||
if (unk_44 != 255) {
|
if (unk_44 != 255) {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_AA_ZB_XLU_SURF, G_RM_AA_ZB_XLU_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_XLU_SURF, G_RM_AA_ZB_XLU_SURF2);
|
||||||
} else {
|
} else {
|
||||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000450_396540);
|
gSPDisplayList(gMainGfxPos++, D_09000450_396540);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0098510[data->unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E0098510[data->unk_00]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -147,8 +147,8 @@ void flower_splash_appendGfx(void* effect) {
|
|||||||
FlowerFXData* data = effectTemp->data.flowerSplash;
|
FlowerFXData* data = effectTemp->data.flowerSplash;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
||||||
|
|
||||||
for (i = 0; i < effectTemp->numParts; i++, data++) {
|
for (i = 0; i < effectTemp->numParts; i++, data++) {
|
||||||
if (data->alive) {
|
if (data->alive) {
|
||||||
@ -156,12 +156,12 @@ void flower_splash_appendGfx(void* effect) {
|
|||||||
|
|
||||||
gDisplayContext->matrixStack[gMatrixListPos] = data->transformMtx;
|
gDisplayContext->matrixStack[gMatrixListPos] = data->transformMtx;
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 112, 96, 24, data->primAlpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, data->primAlpha);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -164,8 +164,8 @@ void flower_trail_appendGfx(void* argEffect) {
|
|||||||
Gfx* dlist;
|
Gfx* dlist;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
||||||
|
|
||||||
for (i = 0; i < effect->numParts; i++, part++) {
|
for (i = 0; i < effect->numParts; i++, part++) {
|
||||||
if (part->alive) {
|
if (part->alive) {
|
||||||
@ -177,13 +177,13 @@ void flower_trail_appendGfx(void* argEffect) {
|
|||||||
|
|
||||||
gDisplayContext->matrixStack[gMatrixListPos] = part->transformMtx;
|
gDisplayContext->matrixStack[gMatrixListPos] = part->transformMtx;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 112, 96, 24, part->primAlpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, part->primAlpha);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -119,8 +119,8 @@ void footprint_appendGfx(void* effect) {
|
|||||||
FootprintFXData* part = effectTemp->data.footprint;
|
FootprintFXData* part = effectTemp->data.footprint;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
||||||
|
|
||||||
for (i = 0; i < effectTemp->numParts; i++, part++) {
|
for (i = 0; i < effectTemp->numParts; i++, part++) {
|
||||||
if (part->alive) {
|
if (part->alive) {
|
||||||
@ -128,12 +128,12 @@ void footprint_appendGfx(void* effect) {
|
|||||||
|
|
||||||
gDisplayContext->matrixStack[gMatrixListPos] = part->mtx;
|
gDisplayContext->matrixStack[gMatrixListPos] = part->mtx;
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 112, 96, 24, part->alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, part->alpha);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -123,27 +123,27 @@ void fright_jar_appendGfx(void* effect) {
|
|||||||
Matrix4f sp50;
|
Matrix4f sp50;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guScaleF(sp50, -data->unk_28, data->unk_28, data->unk_28);
|
shim_guScaleF(sp50, -data->unk_28, data->unk_28, data->unk_28);
|
||||||
shim_guMtxCatF(sp50, sp10, sp10);
|
shim_guMtxCatF(sp50, sp10, sp10);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09008BE0_3CA780);
|
gSPDisplayList(gMainGfxPos++, D_09008BE0_3CA780);
|
||||||
|
|
||||||
idx = 54 - unk_14;
|
idx = 54 - unk_14;
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
idx = 0;
|
idx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPVertex(gMasterGfxPos++, &D_09004040_3C5BE0[idx], 22, 0);
|
gSPVertex(gMainGfxPos++, &D_09004040_3C5BE0[idx], 22, 0);
|
||||||
|
|
||||||
alpha = D_E00C2990[unk_14 % 16];
|
alpha = D_E00C2990[unk_14 % 16];
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 0, 0, 0, alpha);
|
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, alpha);
|
||||||
|
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
s32 temp1;
|
s32 temp1;
|
||||||
@ -163,59 +163,59 @@ void fright_jar_appendGfx(void* effect) {
|
|||||||
temp3 = 255.0f;
|
temp3 = 255.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, temp3);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, temp3);
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 64, &D_09002020_3C3BC0);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 64, &D_09002020_3C3BC0);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 8, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 8, 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, temp1 * 4, 254, (temp1 + 15) * 4);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, temp1 * 4, 254, (temp1 + 15) * 4);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 8, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 8, 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0, temp1 * 4, 508, (temp1 + 15) * 4);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, temp1 * 4, 508, (temp1 + 15) * 4);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0, temp2 * 128.0f * 4.0f, 2000, 2000);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, temp2 * 128.0f * 4.0f, 2000, 2000);
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 64, &D_09000000_3C1BA0);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 64, &D_09000000_3C1BA0);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 8, 0x80, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_8b, 8, 0x80, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, temp1 * 4, 254, (temp1 + 15) * 4);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, temp1 * 4, 254, (temp1 + 15) * 4);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 8, 0x80, 1, 1, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14);
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_CI, G_IM_SIZ_4b, 8, 0x80, 1, 1, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14, G_TX_NOMIRROR | G_TX_CLAMP, 7, 14);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0, temp1 * 4, 508, (temp1 + 15) * 4);
|
gDPSetTileSize(gMainGfxPos++, 1, 0, temp1 * 4, 508, (temp1 + 15) * 4);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0, temp2 * 128.0f * 4.0f, 2000, 2000);
|
gDPSetTileSize(gMainGfxPos++, 1, 0, temp2 * 128.0f * 4.0f, 2000, 2000);
|
||||||
|
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 1, 2, 0, 0, 2, 3, 0);
|
gSP2Triangles(gMainGfxPos++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
gSP2Triangles(gMasterGfxPos++, 1, 4, 5, 0, 1, 5, 2, 0);
|
gSP2Triangles(gMainGfxPos++, 1, 4, 5, 0, 1, 5, 2, 0);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
gSP2Triangles(gMasterGfxPos++, 4, 6, 7, 0, 4, 7, 5, 0);
|
gSP2Triangles(gMainGfxPos++, 4, 6, 7, 0, 4, 7, 5, 0);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
gSP2Triangles(gMasterGfxPos++, 6, 8, 9, 0, 6, 9, 7, 0);
|
gSP2Triangles(gMainGfxPos++, 6, 8, 9, 0, 6, 9, 7, 0);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
gSP2Triangles(gMasterGfxPos++, 8, 10, 11, 0, 8, 11, 9, 0);
|
gSP2Triangles(gMainGfxPos++, 8, 10, 11, 0, 8, 11, 9, 0);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
gSP2Triangles(gMasterGfxPos++, 10, 12, 13, 0, 10, 13, 11, 0);
|
gSP2Triangles(gMainGfxPos++, 10, 12, 13, 0, 10, 13, 11, 0);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
gSP2Triangles(gMasterGfxPos++, 12, 14, 15, 0, 12, 15, 13, 0);
|
gSP2Triangles(gMainGfxPos++, 12, 14, 15, 0, 12, 15, 13, 0);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
gSP2Triangles(gMasterGfxPos++, 14, 16, 17, 0, 14, 17, 15, 0);
|
gSP2Triangles(gMainGfxPos++, 14, 16, 17, 0, 14, 17, 15, 0);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
gSP2Triangles(gMasterGfxPos++, 16, 18, 19, 0, 16, 19, 17, 0);
|
gSP2Triangles(gMainGfxPos++, 16, 18, 19, 0, 16, 19, 17, 0);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
gSP2Triangles(gMasterGfxPos++, 18, 20, 21, 0, 18, 21, 19, 0);
|
gSP2Triangles(gMainGfxPos++, 18, 20, 21, 0, 18, 21, 19, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -171,9 +171,9 @@ void gather_energy_pink_appendGfx(void* effect) {
|
|||||||
s32 idx;
|
s32 idx;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
|
|
||||||
shim_guTranslateF(sp20, part->posB.x, part->posB.y, part->posB.z);
|
shim_guTranslateF(sp20, part->posB.x, part->posB.y, part->posB.z);
|
||||||
shim_guScaleF(sp60, part->unk_1C, part->unk_1C, 1.0f);
|
shim_guScaleF(sp60, part->unk_1C, part->unk_1C, 1.0f);
|
||||||
@ -182,7 +182,7 @@ void gather_energy_pink_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
|
|
||||||
switch (unk_00) {
|
switch (unk_00) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -195,7 +195,7 @@ void gather_energy_pink_appendGfx(void* effect) {
|
|||||||
|
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
idx = part->unk_2C * 3;
|
idx = part->unk_2C * 3;
|
||||||
alpha = part->unk_24;
|
alpha = part->unk_24;
|
||||||
@ -209,20 +209,20 @@ void gather_energy_pink_appendGfx(void* effect) {
|
|||||||
idx += 30;
|
idx += 30;
|
||||||
idx %= 24;
|
idx %= 24;
|
||||||
|
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 0, 0, 0, alpha / 2);
|
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, alpha / 2);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, D_E0026A00[idx], 0, D_E0026A00[idx + 2], alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0026A00[idx], 0, D_E0026A00[idx + 2], alpha);
|
||||||
|
|
||||||
tempX = part->unk_30;
|
tempX = part->unk_30;
|
||||||
tempY = part->unk_40;
|
tempY = part->unk_40;
|
||||||
tempX2 = part->unk_38;
|
tempX2 = part->unk_38;
|
||||||
tempY2 = part->unk_48;
|
tempY2 = part->unk_48;
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, tempX, tempY, tempX + 256, tempY + 256);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, tempX, tempY, tempX + 256, tempY + 256);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, tempX2, tempY2, tempX2 + 256, tempY2 + 256);
|
gDPSetTileSize(gMainGfxPos++, 1, tempX2, tempY2, tempX2 + 256, tempY2 + 256);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -161,35 +161,35 @@ void gather_magic_appendGfx(void* effect) {
|
|||||||
Matrix4f sp98;
|
Matrix4f sp98;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10);
|
shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10);
|
||||||
shim_guRotateF(sp98, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp98, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp98, sp18, sp18);
|
shim_guMtxCatF(sp98, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09000080_38F790);
|
gSPDisplayList(gMainGfxPos++, D_09000080_38F790);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, part->unk_3C, part->unk_40, part->unk_44, 0);
|
gDPSetEnvColor(gMainGfxPos++, part->unk_3C, part->unk_40, part->unk_44, 0);
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
||||||
f32 scale = part->unk_28;
|
f32 scale = part->unk_28;
|
||||||
|
|
||||||
if (scale != 0.0f) {
|
if (scale != 0.0f) {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, unk_30, unk_34, unk_38, part->unk_14);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_30, unk_34, unk_38, part->unk_14);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10);
|
shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10);
|
||||||
shim_guScaleF(sp58, scale, scale, scale);
|
shim_guScaleF(sp58, scale, scale, scale);
|
||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E008E890[i & 1]);
|
gSPDisplayList(gMainGfxPos++, D_E008E890[i & 1]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -116,16 +116,16 @@ void got_item_outline_appendGfx(void* effect) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
if (unk_18 != 0.0f) {
|
if (unk_18 != 0.0f) {
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09008100_34DC40);
|
gSPDisplayList(gMainGfxPos++, D_09008100_34DC40);
|
||||||
|
|
||||||
if (unk_00 == 0) {
|
if (unk_00 == 0) {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, data->unk_1C);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->unk_1C);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 0, 0, 0, 255);
|
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, 255);
|
||||||
} else {
|
} else {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, data->unk_1C);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->unk_1C);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 255, 255, 0, 255);
|
gDPSetEnvColor(gMainGfxPos++, 255, 255, 0, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
@ -140,7 +140,7 @@ void got_item_outline_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
char* temp;
|
char* temp;
|
||||||
@ -151,21 +151,21 @@ void got_item_outline_appendGfx(void* effect) {
|
|||||||
temp = D_09004000_349B40[i];
|
temp = D_09004000_349B40[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 128, temp);
|
gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 128, temp);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0, G_TX_LOADTILE, 0,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0, G_TX_LOADTILE, 0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMainGfxPos++);
|
||||||
gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 508, 124);
|
gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 508, 124);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0, G_TX_RENDERTILE, 0,
|
gDPSetTile(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0, G_TX_RENDERTILE, 0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0, 0, 508, 124);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, 0, 508, 124);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0036630[i]);
|
gSPDisplayList(gMainGfxPos++, D_E0036630[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,14 +159,14 @@ void green_impact_appendGfx(void* effect) {
|
|||||||
envG = part->unk_53.g;
|
envG = part->unk_53.g;
|
||||||
envB = part->unk_53.b;
|
envB = part->unk_53.b;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
|
|
||||||
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, part->unk_04, part->unk_08, part->unk_0C);
|
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, part->unk_04, part->unk_08, part->unk_0C);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
alpha = part->unk_38;
|
alpha = part->unk_38;
|
||||||
primR2 = primR;
|
primR2 = primR;
|
||||||
@ -176,9 +176,9 @@ void green_impact_appendGfx(void* effect) {
|
|||||||
envG2 = envG;
|
envG2 = envG;
|
||||||
envB2 = envB;
|
envB2 = envB;
|
||||||
|
|
||||||
savedGfxPos = gMasterGfxPos;
|
savedGfxPos = gMainGfxPos;
|
||||||
gMasterGfxPos++;
|
gMainGfxPos++;
|
||||||
savedGfxPos2 = gMasterGfxPos;
|
savedGfxPos2 = gMainGfxPos;
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
||||||
@ -194,28 +194,28 @@ void green_impact_appendGfx(void* effect) {
|
|||||||
|
|
||||||
dlist2 = D_09000540_365EF0;
|
dlist2 = D_09000540_365EF0;
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0, (s32) part->unk_3C, 252, (s32) part->unk_3C + 124);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, (s32) part->unk_3C, 252, (s32) part->unk_3C + 124);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, 0, (s32) part->unk_44, 124, (s32) part->unk_44 + 124);
|
gDPSetTileSize(gMainGfxPos++, 1, 0, (s32) part->unk_44, 124, (s32) part->unk_44 + 124);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPEndDisplayList(gMasterGfxPos++);
|
gSPEndDisplayList(gMainGfxPos++);
|
||||||
gSPBranchList(savedGfxPos, gMasterGfxPos);
|
gSPBranchList(savedGfxPos, gMainGfxPos);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primR2, primG2, primB2, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, primR2, primG2, primB2, alpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, envR2, envG2, envB2, 0);
|
gDPSetEnvColor(gMainGfxPos++, envR2, envG2, envB2, 0);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH);
|
gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_FRONT);
|
gSPSetGeometryMode(gMainGfxPos++, G_CULL_FRONT);
|
||||||
gSPDisplayList(gMasterGfxPos++, savedGfxPos2);
|
gSPDisplayList(gMainGfxPos++, savedGfxPos2);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primR, primG, primB, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, alpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, envR, envG, envB, 0);
|
gDPSetEnvColor(gMainGfxPos++, envR, envG, envB, 0);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_CULL_BOTH);
|
gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH);
|
||||||
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_BACK);
|
gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK);
|
||||||
gSPDisplayList(gMasterGfxPos++, savedGfxPos2);
|
gSPDisplayList(gMainGfxPos++, savedGfxPos2);
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -122,34 +122,34 @@ void hieroglyphs_appendGfx(void* effect) {
|
|||||||
Matrix4f sp60;
|
Matrix4f sp60;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp20, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(sp20, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guScaleF(sp60, data->unk_38, data->unk_38, data->unk_38);
|
shim_guScaleF(sp60, data->unk_38, data->unk_38, data->unk_38);
|
||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_28, data->unk_2C, data->unk_30, data->unk_34);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, data->unk_34);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00E29F0[0]);
|
gSPDisplayList(gMainGfxPos++, D_E00E29F0[0]);
|
||||||
gSPBranchList(gMasterGfxPos, gMasterGfxPos + 52);
|
gSPBranchList(gMainGfxPos, gMainGfxPos + 52);
|
||||||
|
|
||||||
savedGfxPos = gMasterGfxPos + 1;
|
savedGfxPos = gMainGfxPos + 1;
|
||||||
|
|
||||||
gDPSetTileSize(savedGfxPos, G_TX_RENDERTILE,
|
gDPSetTileSize(savedGfxPos, G_TX_RENDERTILE,
|
||||||
(lifeTime * 2 ) * 4, 0,
|
(lifeTime * 2 ) * 4, 0,
|
||||||
(lifeTime * 2 + 127) * 4, 31 * 4);
|
(lifeTime * 2 + 127) * 4, 31 * 4);
|
||||||
gMasterGfxPos += 2;
|
gMainGfxPos += 2;
|
||||||
|
|
||||||
shim_guRotateF(sp20, 20.0f, 1.0f, 0.0f, 0.0f);
|
shim_guRotateF(sp20, 20.0f, 1.0f, 0.0f, 0.0f);
|
||||||
shim_guPositionF(sp60, 0.0f, shim_sin_deg(lifeTime * 8 + 78.75) * -30.0f, 0.0f, 1.0f, 6.0f, 0.0f, 0.0f);
|
shim_guPositionF(sp60, 0.0f, shim_sin_deg(lifeTime * 8 + 78.75) * -30.0f, 0.0f, 1.0f, 6.0f, 0.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
f32 angle = i * 48 + lifeTime * 8;
|
f32 angle = i * 48 + lifeTime * 8;
|
||||||
@ -157,19 +157,19 @@ void hieroglyphs_appendGfx(void* effect) {
|
|||||||
shim_guPositionF(sp20, 0.0f, shim_sin_deg(angle) * 30.0f, 6.0f, (f32) i * 0.01 + 1.0, 8.0f, 0.0f, 0.0f);
|
shim_guPositionF(sp20, 0.0f, shim_sin_deg(angle) * 30.0f, 6.0f, (f32) i * 0.01 + 1.0, 8.0f, 0.0f, 0.0f);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPVertex(gMasterGfxPos++, &D_090010A8_3DDDF8[i * 2], 2, i * 2);
|
gSPVertex(gMainGfxPos++, &D_090010A8_3DDDF8[i * 2], 2, i * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 15; i++) {
|
for (i = 0; i < 15; i++) {
|
||||||
s32 i2 = i * 2;
|
s32 i2 = i * 2;
|
||||||
gSP2Triangles(gMasterGfxPos++,
|
gSP2Triangles(gMainGfxPos++,
|
||||||
i2 , i2 + 2, i2 + 1, i2,
|
i2 , i2 + 2, i2 + 1, i2,
|
||||||
i2 + 1, i2 + 2, i2 + 3, i2);
|
i2 + 1, i2 + 2, i2 + 3, i2);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gSPEndDisplayList(gMasterGfxPos++);
|
gSPEndDisplayList(gMainGfxPos++);
|
||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
s32 idx = (lifeTime + i * 4) % 17;
|
s32 idx = (lifeTime + i * 4) % 17;
|
||||||
@ -177,12 +177,12 @@ void hieroglyphs_appendGfx(void* effect) {
|
|||||||
shim_guPositionF(sp20, 0.0f, 0.0f, -0x11A + i * 0x24, 1.0f, 0.0f, 0.0f, 0.0f);
|
shim_guPositionF(sp20, 0.0f, 0.0f, -0x11A + i * 0x24, 1.0f, 0.0f, 0.0f, 0.0f);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, D_E00E29F4[idx], D_E00E2A08[idx], D_E00E2A1C[idx], data->unk_24);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E00E29F4[idx], D_E00E2A08[idx], D_E00E2A1C[idx], data->unk_24);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 255, 255, 255, 0);
|
gDPSetEnvColor(gMainGfxPos++, 255, 255, 255, 0);
|
||||||
gSPDisplayList(gMasterGfxPos++, savedGfxPos);
|
gSPDisplayList(gMainGfxPos++, savedGfxPos);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -134,8 +134,8 @@ void huff_puff_breath_appendGfx(void* effect) {
|
|||||||
Matrix4f sp18;
|
Matrix4f sp18;
|
||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guRotateF(sp58, data->angle, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp58, data->angle, 0.0f, 0.0f, 1.0f);
|
||||||
@ -144,12 +144,12 @@ void huff_puff_breath_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primR, data->primG, data->primB, primA);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, primA);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->envR, data->envG, data->envB, data->envA);
|
gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->envB, data->envA);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00DC648[unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E00DC648[unk_00]);
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 31 * 4, ult + 15 * 4);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 31 * 4, ult + 15 * 4);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00DC640[unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E00DC640[unk_00]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -153,8 +153,8 @@ void ice_pillar_appendGfx(void* effect) {
|
|||||||
Matrix4f sp10, sp50;
|
Matrix4f sp10, sp50;
|
||||||
Camera* camera;
|
Camera* camera;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
camera = &gCameras[gCurrentCameraID];
|
camera = &gCameras[gCurrentCameraID];
|
||||||
shim_guTranslateF(sp10, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(sp10, data->pos.x, data->pos.y, data->pos.z);
|
||||||
@ -162,12 +162,12 @@ void ice_pillar_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp50, sp10, sp10);
|
shim_guMtxCatF(sp50, sp10, sp10);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->prim.r, data->prim.g, data->prim.b, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->prim.r, data->prim.g, data->prim.b, alpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->env.r, data->env.g, data->env.b, data->env.a);
|
gDPSetEnvColor(gMainGfxPos++, data->env.r, data->env.g, data->env.b, data->env.a);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E011E800[0]);
|
gSPDisplayList(gMainGfxPos++, D_E011E800[0]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E011E7F0[data->unk_24]);
|
gSPDisplayList(gMainGfxPos++, D_E011E7F0[data->unk_24]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -140,41 +140,41 @@ void ice_shard_appendGfx(void* effect) {
|
|||||||
Matrix4f sp20;
|
Matrix4f sp20;
|
||||||
Matrix4f unused;
|
Matrix4f unused;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->scale, data->pos.x, data->pos.y, data->pos.z);
|
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->scale, data->pos.x, data->pos.y, data->pos.z);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
shim_guRotateF(sp20, data->rotation, 0.0f, 0.0f, 1.0f);
|
shim_guRotateF(sp20, data->rotation, 0.0f, 0.0f, 1.0f);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E01108B4[0]);
|
gSPDisplayList(gMainGfxPos++, D_E01108B4[0]);
|
||||||
|
|
||||||
texCoordS = (type % 2) * 32;
|
texCoordS = (type % 2) * 32;
|
||||||
texCoordT = (s32) (data->animFrame * 4.0f) * 32;
|
texCoordT = (s32) (data->animFrame * 4.0f) * 32;
|
||||||
envAlpha = (data->animFrame * 4.0f - (s32) data->animFrame * 4) * 256.0f;
|
envAlpha = (data->animFrame * 4.0f - (s32) data->animFrame * 4) * 256.0f;
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE,
|
||||||
(texCoordS ) * 4, (texCoordT ) * 4,
|
(texCoordS ) * 4, (texCoordT ) * 4,
|
||||||
(texCoordS + 31) * 4, (texCoordT + 31) * 4);
|
(texCoordS + 31) * 4, (texCoordT + 31) * 4);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1,
|
gDPSetTileSize(gMainGfxPos++, 1,
|
||||||
(texCoordS ) * 4, (texCoordT + 32) * 4,
|
(texCoordS ) * 4, (texCoordT + 32) * 4,
|
||||||
(texCoordS + 31) * 4, (texCoordT + 63) * 4);
|
(texCoordS + 31) * 4, (texCoordT + 63) * 4);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, alpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->envCol.r, data->envCol.g, data->envCol.b, envAlpha);
|
gDPSetEnvColor(gMainGfxPos++, data->envCol.r, data->envCol.g, data->envCol.b, envAlpha);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E01108B0[0]);
|
gSPDisplayList(gMainGfxPos++, D_E01108B0[0]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (type % 2 == 1 && (s32) (data->animFrame * 4.0f) == 3) {
|
if (type % 2 == 1 && (s32) (data->animFrame * 4.0f) == 3) {
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, alpha * envAlpha / 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primCol.r, data->primCol.g, data->primCol.b, alpha * envAlpha / 255);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001168_3F9E28);
|
gSPDisplayList(gMainGfxPos++, D_09001168_3F9E28);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -279,9 +279,9 @@ void landing_dust_appendGfx(void* effect) {
|
|||||||
dlist1 = sDlists[type];
|
dlist1 = sDlists[type];
|
||||||
dlist2 = sDlists2[type];
|
dlist2 = sDlists2[type];
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
|
|
||||||
spD8 = temp_t0 & 7;
|
spD8 = temp_t0 & 7;
|
||||||
spDC = temp_t0 & 0x40;
|
spDC = temp_t0 & 0x40;
|
||||||
@ -291,20 +291,20 @@ void landing_dust_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(mtx2, mtx1, mtx3);
|
shim_guMtxCatF(mtx2, mtx1, mtx3);
|
||||||
shim_guMtxF2L(mtx3, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(mtx3, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++,
|
gSPMatrix(gMainGfxPos++,
|
||||||
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
&gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 230, 222, 222, 110);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 222, 222, 110);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 0, 0, 0, envAlpha);
|
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 230, 222, 222, 130);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 222, 222, 130);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 0, 0, 0, envAlpha);
|
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,16 +317,16 @@ void landing_dust_appendGfx(void* effect) {
|
|||||||
temp_lo = spD8 * phi_a0;
|
temp_lo = spD8 * phi_a0;
|
||||||
temp = temp_lo + phi_a0;
|
temp = temp_lo + phi_a0;
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, temp_lo * 4, 0, temp * 4, phi_a0 * 4);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, temp_lo * 4, 0, temp * 4, phi_a0 * 4);
|
||||||
|
|
||||||
if (spDC) {
|
if (spDC) {
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, temp * 4, phi_a0 * 4, (temp_lo + (phi_a0 * 2)) * 4, phi_a0 * 8);
|
gDPSetTileSize(gMainGfxPos++, 1, temp * 4, phi_a0 * 4, (temp_lo + (phi_a0 * 2)) * 4, phi_a0 * 8);
|
||||||
} else {
|
} else {
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, temp * 4, 0, (temp_lo + (phi_a0 * 2)) * 4, phi_a0 * 4);
|
gDPSetTileSize(gMainGfxPos++, 1, temp * 4, 0, (temp_lo + (phi_a0 * 2)) * 4, phi_a0 * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist1);
|
gSPDisplayList(gMainGfxPos++, dlist1);
|
||||||
}
|
}
|
||||||
|
|
||||||
part++;
|
part++;
|
||||||
@ -334,12 +334,12 @@ void landing_dust_appendGfx(void* effect) {
|
|||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
|
||||||
shim_guTranslateF(mtx1, part->x, part->y, part->z);
|
shim_guTranslateF(mtx1, part->x, part->y, part->z);
|
||||||
shim_guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist1);
|
gSPDisplayList(gMainGfxPos++, dlist1);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -113,9 +113,9 @@ void lens_flare_appendGfx(void* effect) {
|
|||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
Matrix4f sp98;
|
Matrix4f sp98;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0034788[unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E0034788[unk_00]);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
@ -131,10 +131,10 @@ void lens_flare_appendGfx(void* effect) {
|
|||||||
|
|
||||||
idx %= ARRAY_COUNT(D_E0034790);
|
idx %= ARRAY_COUNT(D_E0034790);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], primA);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], primA);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0034780[0]);
|
gSPDisplayList(gMainGfxPos++, D_E0034780[0]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
primA = data->unk_24;
|
primA = data->unk_24;
|
||||||
@ -149,12 +149,12 @@ void lens_flare_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp58, sp18, sp18);
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], primA);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0034790[idx], D_E0034790[idx + 1], D_E0034790[idx + 2], primA);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, primA);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, primA);
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0034780[unk_00]);
|
gSPDisplayList(gMainGfxPos++, D_E0034780[unk_00]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -273,8 +273,8 @@ void func_E006A85C(LightRaysFXData* part) {
|
|||||||
s32 uls2 = part->unk_3C * 4.0f;
|
s32 uls2 = part->unk_3C * 4.0f;
|
||||||
s32 ult2 = part->unk_40 * 4.0f;
|
s32 ult2 = part->unk_40 * 4.0f;
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 512, ult + 256);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 512, ult + 256);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, uls2, ult2, uls2 + 512, ult2 + 256);
|
gDPSetTileSize(gMainGfxPos++, 1, uls2, ult2, uls2 + 512, ult2 + 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
void light_rays_appendGfx(void* effect) {
|
void light_rays_appendGfx(void* effect) {
|
||||||
@ -287,9 +287,9 @@ void light_rays_appendGfx(void* effect) {
|
|||||||
Matrix4f mtxTranslate;
|
Matrix4f mtxTranslate;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
|
|
||||||
shim_guTranslateF(mtxTranslate, part->pos.x, part->pos.y, part->pos.z);
|
shim_guTranslateF(mtxTranslate, part->pos.x, part->pos.y, part->pos.z);
|
||||||
|
|
||||||
@ -344,7 +344,7 @@ void light_rays_appendGfx(void* effect) {
|
|||||||
shim_guScaleF(mtxTemp, scaleX, scaleY, scaleZ);
|
shim_guScaleF(mtxTemp, scaleX, scaleY, scaleZ);
|
||||||
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
|
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 240, part->alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 240, part->alpha);
|
||||||
} else {
|
} else {
|
||||||
shim_guRotateF(mtxTemp, part->rotation.y, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(mtxTemp, part->rotation.y, 0.0f, 1.0f, 0.0f);
|
||||||
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
|
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
|
||||||
@ -353,15 +353,15 @@ void light_rays_appendGfx(void* effect) {
|
|||||||
shim_guTranslateF(mtxTemp, part->unk_58, 0.0f, 0.0f);
|
shim_guTranslateF(mtxTemp, part->unk_58, 0.0f, 0.0f);
|
||||||
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
|
shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 181, part->alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 181, part->alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -223,8 +223,8 @@ void lightning_appendGfx(void* effect) {
|
|||||||
Matrix4f sp60;
|
Matrix4f sp60;
|
||||||
u16 perspNorm;
|
u16 perspNorm;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
if (unk_00 != 1 || unk_18 >= 18) {
|
if (unk_00 != 1 || unk_18 >= 18) {
|
||||||
s32 ult2;
|
s32 ult2;
|
||||||
@ -233,7 +233,7 @@ void lightning_appendGfx(void* effect) {
|
|||||||
s32 ult;
|
s32 ult;
|
||||||
f32* unk_28; // TODO required to match
|
f32* unk_28; // TODO required to match
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist2);
|
gSPDisplayList(gMainGfxPos++, dlist2);
|
||||||
|
|
||||||
uls = data->unk_1C * 4.0f;
|
uls = data->unk_1C * 4.0f;
|
||||||
ult = data->unk_20 * 4.0f;
|
ult = data->unk_20 * 4.0f;
|
||||||
@ -248,13 +248,13 @@ void lightning_appendGfx(void* effect) {
|
|||||||
shim_guPerspectiveF(sp20, &perspNorm, 30.0f, (f32) camera->viewportW / (f32) camera->viewportH, 4.0f, 16384.0f, 1.0f);
|
shim_guPerspectiveF(sp20, &perspNorm, 30.0f, (f32) camera->viewportW / (f32) camera->viewportH, 4.0f, 16384.0f, 1.0f);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
|
|
||||||
shim_guTranslateF(sp20, data->unk_04, data->unk_08, -500.0f);
|
shim_guTranslateF(sp20, data->unk_04, data->unk_08, -500.0f);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 47, 198, 255);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 47, 198, 255);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
shim_guTranslateF(sp20, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp20, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
@ -264,21 +264,21 @@ void lightning_appendGfx(void* effect) {
|
|||||||
shim_guMtxCatF(sp60, sp20, sp20);
|
shim_guMtxCatF(sp60, sp20, sp20);
|
||||||
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 0, data->unk_10);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 0, data->unk_10);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 1020, ult + 124);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 1020, ult + 124);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, uls2, ult2, uls2 + 1020, ult2 + 124);
|
gDPSetTileSize(gMainGfxPos++, 1, uls2, ult2, uls2 + 1020, ult2 + 124);
|
||||||
gSPDisplayList(gMasterGfxPos++, dlist);
|
gSPDisplayList(gMainGfxPos++, dlist);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
if (unk_00 < 3) {
|
if (unk_00 < 3) {
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,16 +205,16 @@ void lightning_bolt_appendGfx(void* effect) {
|
|||||||
type = data->type;
|
type = data->type;
|
||||||
widthScale = data->widthScale;
|
widthScale = data->widthScale;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guScaleF(sp10, 0.1f, 0.1f, 0.1f);
|
shim_guScaleF(sp10, 0.1f, 0.1f, 0.1f);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->outerColor.r, data->outerColor.g, data->outerColor.b, alpha);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->outerColor.r, data->outerColor.g, data->outerColor.b, alpha);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->innerColor.r, data->innerColor.g, data->innerColor.b, 128);
|
gDPSetEnvColor(gMainGfxPos++, data->innerColor.r, data->innerColor.g, data->innerColor.b, 128);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001000_3BBEA0);
|
gSPDisplayList(gMainGfxPos++, D_09001000_3BBEA0);
|
||||||
|
|
||||||
temp_a0 = lifetime - 1;
|
temp_a0 = lifetime - 1;
|
||||||
if (type != 2) {
|
if (type != 2) {
|
||||||
@ -250,10 +250,10 @@ void lightning_bolt_appendGfx(void* effect) {
|
|||||||
data->edgeLength[i] = (f32) preset->width[i] * 0.1;
|
data->edgeLength[i] = (f32) preset->width[i] * 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtxBuffer = (Vtx_t*) (gMasterGfxPos + 1);
|
vtxBuffer = (Vtx_t*) (gMainGfxPos + 1);
|
||||||
vtx = (Vtx_t*) (gMasterGfxPos + 1);
|
vtx = (Vtx_t*) (gMainGfxPos + 1);
|
||||||
gSPBranchList(gMasterGfxPos, gMasterGfxPos + 0x31);
|
gSPBranchList(gMainGfxPos, gMainGfxPos + 0x31);
|
||||||
gMasterGfxPos += 0x31;
|
gMainGfxPos += 0x31;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(data->boltVertexPosX); i++) {
|
for (i = 0; i < ARRAY_COUNT(data->boltVertexPosX); i++) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@ -310,13 +310,13 @@ void lightning_bolt_appendGfx(void* effect) {
|
|||||||
|
|
||||||
quadCount = i;
|
quadCount = i;
|
||||||
|
|
||||||
gSPVertex(gMasterGfxPos++, vtxBuffer, i * 2, 0);
|
gSPVertex(gMainGfxPos++, vtxBuffer, i * 2, 0);
|
||||||
gSPClearGeometryMode(gMasterGfxPos++, G_SHADING_SMOOTH);
|
gSPClearGeometryMode(gMainGfxPos++, G_SHADING_SMOOTH);
|
||||||
|
|
||||||
for (i = 0; i < quadCount - 1; i++) {
|
for (i = 0; i < quadCount - 1; i++) {
|
||||||
gSP2Triangles(gMasterGfxPos++, i * 2 + 1, i * 2 + 0, i * 2 + 2, 0,
|
gSP2Triangles(gMainGfxPos++, i * 2 + 1, i * 2 + 0, i * 2 + 2, 0,
|
||||||
i * 2 + 1, i * 2 + 2, i * 2 + 3, 0);
|
i * 2 + 1, i * 2 + 2, i * 2 + 3, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
@ -175,11 +175,11 @@ void lil_oink_appendGfx(void* effect) {
|
|||||||
s32 angle = data->lifetime * 30;
|
s32 angle = data->lifetime * 30;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x9, VIRTUAL_TO_PHYSICAL(eff->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x9, VIRTUAL_TO_PHYSICAL(eff->graphics->data));
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09002D70_401FC0);
|
gSPDisplayList(gMainGfxPos++, D_09002D70_401FC0);
|
||||||
gSPLookAt(gMasterGfxPos++, &gDisplayContext->lookAt);
|
gSPLookAt(gMainGfxPos++, &gDisplayContext->lookAt);
|
||||||
|
|
||||||
for (i = 0; i < MAX_LIL_OINKS; i++) {
|
for (i = 0; i < MAX_LIL_OINKS; i++) {
|
||||||
if (data->flags[i] & LIL_OINK_FLAG_VISIBLE) {
|
if (data->flags[i] & LIL_OINK_FLAG_VISIBLE) {
|
||||||
@ -187,17 +187,17 @@ void lil_oink_appendGfx(void* effect) {
|
|||||||
data->x[i], data->y[i] + data->jumpOffset[i], data->z[i]);
|
data->x[i], data->y[i] + data->jumpOffset[i], data->z[i]);
|
||||||
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
|
||||||
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0114718[data->type[i]]);
|
gSPDisplayList(gMainGfxPos++, D_E0114718[data->type[i]]);
|
||||||
if (data->type[i] == LIL_OINK_TYPE_SILVER || data->type[i] == LIL_OINK_TYPE_GOLD) {
|
if (data->type[i] == LIL_OINK_TYPE_SILVER || data->type[i] == LIL_OINK_TYPE_GOLD) {
|
||||||
f32 shineVariation = shim_sin_deg(angle) * 63.0f;
|
f32 shineVariation = shim_sin_deg(angle) * 63.0f;
|
||||||
s8 primColor = shineVariation + 63.0f;
|
s8 primColor = shineVariation + 63.0f;
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primColor, primColor, primColor, 0);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, primColor, primColor, primColor, 0);
|
||||||
}
|
}
|
||||||
gSPDisplayList(gMasterGfxPos++, lil_oink_FramesGfx[data->type[i]][data->gfxFrame[i]]);
|
gSPDisplayList(gMainGfxPos++, lil_oink_FramesGfx[data->type[i]][data->gfxFrame[i]]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
angle += 20;
|
angle += 20;
|
||||||
}
|
}
|
||||||
|
@ -134,29 +134,29 @@ void merlin_house_stars_appendGfx(void* effect) {
|
|||||||
s32 uls;
|
s32 uls;
|
||||||
s32 ult;
|
s32 ult;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp10, data->unk_0C, data->unk_10, data->unk_14);
|
shim_guTranslateF(sp10, data->unk_0C, data->unk_10, data->unk_14);
|
||||||
shim_guScaleF(sp50, 0.96f, 0.96f, 0.96f);
|
shim_guScaleF(sp50, 0.96f, 0.96f, 0.96f);
|
||||||
shim_guMtxCatF(sp50, sp10, sp10);
|
shim_guMtxCatF(sp50, sp10, sp10);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, 127);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 127);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, 0, 0, 0, unk_18);
|
gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, unk_18);
|
||||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 1, TEXEL1, 0, PRIMITIVE, TEXEL0, 0, 0, 0, COMBINED, COMBINED, 0, ENVIRONMENT, 0);
|
gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 1, TEXEL1, 0, PRIMITIVE, TEXEL0, 0, 0, 0, COMBINED, COMBINED, 0, ENVIRONMENT, 0);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001000_3A6BE0);
|
gSPDisplayList(gMainGfxPos++, D_09001000_3A6BE0);
|
||||||
|
|
||||||
uls = data->unk_1C * 4.0f;
|
uls = data->unk_1C * 4.0f;
|
||||||
ult = data->unk_20 * 4.0f;
|
ult = data->unk_20 * 4.0f;
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 252, ult + 252);
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 252, ult + 252);
|
||||||
|
|
||||||
uls = data->unk_24 * 4.0f;
|
uls = data->unk_24 * 4.0f;
|
||||||
ult = data->unk_28 * 4.0f;
|
ult = data->unk_28 * 4.0f;
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1, uls, ult, uls + 252, ult + 252);
|
gDPSetTileSize(gMainGfxPos++, 1, uls, ult, uls + 252, ult + 252);
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_09001418_3A6FF8);
|
gSPDisplayList(gMainGfxPos++, D_09001418_3A6FF8);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
|
@ -306,10 +306,10 @@ void misc_particles_appendGfx(void* effect) {
|
|||||||
Matrix4f unused;
|
Matrix4f unused;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gDPSetEnvColor(gMasterGfxPos++, particle->glowColor.r, particle->glowColor.g, particle->glowColor.b, particle->glowColor.a);
|
gDPSetEnvColor(gMainGfxPos++, particle->glowColor.r, particle->glowColor.g, particle->glowColor.b, particle->glowColor.a);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00E4DA8[variation]);
|
gSPDisplayList(gMainGfxPos++, D_E00E4DA8[variation]);
|
||||||
|
|
||||||
particle++;
|
particle++;
|
||||||
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, particle++) {
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, particle++) {
|
||||||
@ -317,22 +317,22 @@ void misc_particles_appendGfx(void* effect) {
|
|||||||
shim_guPositionF(mtxTransform, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, particle->scale * alphaScale, particle->pos.x, particle->pos.y, particle->pos.z);
|
shim_guPositionF(mtxTransform, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, particle->scale * alphaScale, particle->pos.x, particle->pos.y, particle->pos.z);
|
||||||
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 80 - particle->animTime, particle->innerColor.r, particle->innerColor.g, particle->innerColor.b, alphaScale * particle->innerColor.a);
|
gDPSetPrimColor(gMainGfxPos++, 0, 80 - particle->animTime, particle->innerColor.r, particle->innerColor.g, particle->innerColor.b, alphaScale * particle->innerColor.a);
|
||||||
gDPSetTileSize(gMasterGfxPos++, 1,
|
gDPSetTileSize(gMainGfxPos++, 1,
|
||||||
(s32) particle->unk_5C * 4,
|
(s32) particle->unk_5C * 4,
|
||||||
(s32) particle->unk_60 * 4,
|
(s32) particle->unk_60 * 4,
|
||||||
((s32) particle->unk_5C + 15) * 4,
|
((s32) particle->unk_5C + 15) * 4,
|
||||||
((s32) particle->unk_60 + 15) * 4);
|
((s32) particle->unk_60 + 15) * 4);
|
||||||
|
|
||||||
if (variation == 2) {
|
if (variation == 2) {
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE,
|
||||||
((i & 0x1F) * 32 ) * 4, 31 * 4,
|
((i & 0x1F) * 32 ) * 4, 31 * 4,
|
||||||
((i & 0x1F) * 32 + 31) * 4, 31 * 4);
|
((i & 0x1F) * 32 + 31) * 4, 31 * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00E4D90[variation]);
|
gSPDisplayList(gMainGfxPos++, D_E00E4D90[variation]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,9 +149,9 @@ void motion_blur_flame_appendGfx(void* effect) {
|
|||||||
s32 t6;
|
s32 t6;
|
||||||
s32 var_v1;
|
s32 var_v1;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00A29D0[temp_a2]);
|
gSPDisplayList(gMainGfxPos++, D_E00A29D0[temp_a2]);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
f32 temp_f12 = data->unk_1C[i];
|
f32 temp_f12 = data->unk_1C[i];
|
||||||
@ -178,7 +178,7 @@ void motion_blur_flame_appendGfx(void* effect) {
|
|||||||
temp_v0_2 = (data->unk_60 * temp_a0) >> 9;
|
temp_v0_2 = (data->unk_60 * temp_a0) >> 9;
|
||||||
temp_v0_3 = (data->unk_64 * temp_a0) >> 9;
|
temp_v0_3 = (data->unk_64 * temp_a0) >> 9;
|
||||||
|
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0,
|
gDPSetPrimColor(gMainGfxPos++, 0, 0,
|
||||||
(temp_v1 * temp_a0) >> 8,
|
(temp_v1 * temp_a0) >> 8,
|
||||||
(temp_v0_2 * temp_a0) >> 8,
|
(temp_v0_2 * temp_a0) >> 8,
|
||||||
(temp_v0_3 * temp_a0) >> 8,
|
(temp_v0_3 * temp_a0) >> 8,
|
||||||
@ -198,7 +198,7 @@ void motion_blur_flame_appendGfx(void* effect) {
|
|||||||
envB = 127;
|
envB = 127;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetEnvColor(gMasterGfxPos++, envR, envG, envB, 0);
|
gDPSetEnvColor(gMainGfxPos++, envR, envG, envB, 0);
|
||||||
|
|
||||||
s3 = sp48 - temp_s5;
|
s3 = sp48 - temp_s5;
|
||||||
t6 = s3 + temp_s5 * 2;
|
t6 = s3 + temp_s5 * 2;
|
||||||
@ -234,14 +234,14 @@ void motion_blur_flame_appendGfx(void* effect) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,
|
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE,
|
||||||
(s32) (s3 * temp_s1->unk_08) * 4,
|
(s32) (s3 * temp_s1->unk_08) * 4,
|
||||||
(s32) (temp_s1->unk_04 * 20 - var_t2_2 * temp_s1->unk_14 * temp_s1->unk_0C) * 4,
|
(s32) (temp_s1->unk_04 * 20 - var_t2_2 * temp_s1->unk_14 * temp_s1->unk_0C) * 4,
|
||||||
(s32) (s3 * temp_s1->unk_08 + temp_s1->unk_00) * 4,
|
(s32) (s3 * temp_s1->unk_08 + temp_s1->unk_00) * 4,
|
||||||
(s32) (temp_s1->unk_04 * 21 - var_t2_2 * temp_s1->unk_14 * temp_s1->unk_0C) * 4);
|
(s32) (temp_s1->unk_04 * 21 - var_t2_2 * temp_s1->unk_14 * temp_s1->unk_0C) * 4);
|
||||||
|
|
||||||
for (var_t4 = 0; var_t4 < 2; var_t4++) {
|
for (var_t4 = 0; var_t4 < 2; var_t4++) {
|
||||||
gDPLoadMultiTile(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + uly * SCREEN_WIDTH),
|
gDPLoadMultiTile(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + uly * SCREEN_WIDTH),
|
||||||
0x0100, 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, SCREEN_HEIGHT,
|
0x0100, 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, SCREEN_HEIGHT,
|
||||||
s3 + var_a1,
|
s3 + var_a1,
|
||||||
0,
|
0,
|
||||||
@ -250,7 +250,7 @@ void motion_blur_flame_appendGfx(void* effect) {
|
|||||||
0,
|
0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD
|
||||||
);
|
);
|
||||||
gSPTextureRectangle(gMasterGfxPos++,
|
gSPTextureRectangle(gMainGfxPos++,
|
||||||
(s3 + var_a1) * 4,
|
(s3 + var_a1) * 4,
|
||||||
uly * 4,
|
uly * 4,
|
||||||
t6 * 4,
|
t6 * 4,
|
||||||
@ -261,7 +261,7 @@ void motion_blur_flame_appendGfx(void* effect) {
|
|||||||
0x0400,
|
0x0400,
|
||||||
0x0400
|
0x0400
|
||||||
);
|
);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
}
|
}
|
||||||
var_t2_2++;
|
var_t2_2++;
|
||||||
}
|
}
|
||||||
|
@ -183,19 +183,19 @@ void moving_cloud_appendGfx(void* effect) {
|
|||||||
Matrix4f sp10;
|
Matrix4f sp10;
|
||||||
Matrix4f sp50;
|
Matrix4f sp50;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
|
||||||
shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C);
|
shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
shim_guScaleF(sp50, data->unk_44, data->unk_44, data->unk_44);
|
shim_guScaleF(sp50, data->unk_44, data->unk_44, data->unk_44);
|
||||||
shim_guMtxCatF(sp50, sp10, sp10);
|
shim_guMtxCatF(sp50, sp10, sp10);
|
||||||
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_24, data->unk_28, data->unk_2C, unk_30);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_24, data->unk_28, data->unk_2C, unk_30);
|
||||||
gDPSetEnvColor(gMasterGfxPos++, data->unk_34, data->unk_38, data->unk_3C, data->unk_40);
|
gDPSetEnvColor(gMainGfxPos++, data->unk_34, data->unk_38, data->unk_3C, data->unk_40);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00E8634[0]);
|
gSPDisplayList(gMainGfxPos++, D_E00E8634[0]);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E00E8630[0]);
|
gSPDisplayList(gMainGfxPos++, D_E00E8630[0]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user