mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-07 13:23:27 -04:00
m_do_graphic work
This commit is contained in:
@@ -11,6 +11,7 @@ class JKRHeap;
|
||||
|
||||
class JPADrawInfo {
|
||||
public:
|
||||
JPADrawInfo(MtxP cameraMtxPtr, f32 fovy, f32 aspect) : mCameraMtxPtr(cameraMtxPtr), mFovy(fovy), mAspect(aspect) {}
|
||||
MtxP getCameraMtxPtr() { return mCameraMtxPtr; }
|
||||
f32 getFovy() { return mFovy; }
|
||||
f32 getAspect() { return mAspect; }
|
||||
|
||||
+65
-30
@@ -311,6 +311,7 @@ public:
|
||||
dDetect_c& getDetect() { return mDetect; }
|
||||
dDemo_manager_c* getDemo() { return mDemo; }
|
||||
camera_class* getCamera(int idx) { return mCameraInfo[idx].mpCamera; }
|
||||
f32 getCamZoomForcus(int idx) { return mCameraInfo[idx].mCameraZoomForcus; }
|
||||
|
||||
dMagma_packet_c* getMagma() { return mpMagmaPacket; }
|
||||
dGrass_packet_c* getGrass() { return mpGrassPacket; }
|
||||
@@ -419,6 +420,9 @@ public:
|
||||
void setCurrentWindow(dDlst_window_c* i_window) { mCurrentWindow = i_window; }
|
||||
void setCurrentView(view_class* i_view) { mCurrentView = i_view; }
|
||||
void setCurrentViewport(view_port_class* i_viewport) { mCurrentViewport = i_viewport; }
|
||||
s32 getWindowNum() { return mDlstWindowNum; }
|
||||
void setWindowNum(u8 num) { mDlstWindowNum = num; }
|
||||
dDlst_window_c * getWindow(int idx) { return &mDlstWindow[idx]; }
|
||||
|
||||
J2DOrthoGraph* getCurrentGrafPort() { return mCurrentGrafPort; }
|
||||
|
||||
@@ -525,7 +529,7 @@ public:
|
||||
/* 0x4838 */ dWood::Packet_c* mpWoodPacket;
|
||||
/* 0x483C */ dFlower_packet_c* mpFlowerPacket;
|
||||
/* 0x4840 */ s8 mLkDArcIdx;
|
||||
/* 0x4841 */ u8 field_0x4841;
|
||||
/* 0x4841 */ u8 mDlstWindowNum;
|
||||
/* 0x4842 */ u16 mStatus;
|
||||
/* 0x4844 */ dDlst_window_c mDlstWindow[1];
|
||||
/* 0x4870 */ dComIfG_camera_info_class mCameraInfo[1];
|
||||
@@ -1357,9 +1361,8 @@ void dComIfGp_setNextStage(const char* i_stageName, s16 i_point, s8 i_roomNo, s8
|
||||
dStage_Ship_data* dComIfGp_getShip(int i_roomNo, int param_1);
|
||||
bool dComIfGp_getMapTrans(int i_roomNo, f32* o_transX, f32* o_transY, s16* o_angle);
|
||||
|
||||
inline camera_class* dComIfGp_getCamera(int idx) {
|
||||
return g_dComIfG_gameInfo.play.getCamera(idx);
|
||||
}
|
||||
inline camera_class* dComIfGp_getCamera(int idx) { return g_dComIfG_gameInfo.play.getCamera(idx); }
|
||||
inline f32 dComIfGp_getCamZoomForcus(int idx) { return g_dComIfG_gameInfo.play.getCamZoomForcus(idx); }
|
||||
|
||||
inline const char* dComIfGp_getStartStageName() {
|
||||
return g_dComIfG_gameInfo.play.getStartStageName();
|
||||
@@ -1940,16 +1943,18 @@ inline void dComIfGp_setRStatusForce(u8 status) {
|
||||
g_dComIfG_gameInfo.play.setRStatusForce(status);
|
||||
}
|
||||
|
||||
inline dDlst_window_c * dComIfGp_getWindow(int idx) { return &g_dComIfG_gameInfo.play.mDlstWindow[idx]; }
|
||||
inline s32 dComIfGp_getWindowNum() { return g_dComIfG_gameInfo.play.getWindowNum(); }
|
||||
inline void dComIfGp_setWindowNum(u8 num) { g_dComIfG_gameInfo.play.setWindowNum(num); }
|
||||
inline dDlst_window_c * dComIfGp_getWindow(int idx) { return g_dComIfG_gameInfo.play.getWindow(idx); }
|
||||
inline J2DOrthoGraph* dComIfGp_getCurrentGrafPort() { return g_dComIfG_gameInfo.play.getCurrentGrafPort(); }
|
||||
inline void dComIfGp_setCurrentWindow(dDlst_window_c* window) { return g_dComIfG_gameInfo.play.setCurrentWindow(window); }
|
||||
inline void dComIfGp_setCurrentView(view_class* view) { return g_dComIfG_gameInfo.play.setCurrentView(view); }
|
||||
inline void dComIfGp_setCurrentViewport(view_port_class* viewport) { return g_dComIfG_gameInfo.play.setCurrentViewport(viewport); }
|
||||
|
||||
inline dADM_CharTbl* dComIfGp_CharTbl() {
|
||||
return &g_dComIfG_gameInfo.play.mADM.mCharTbl;
|
||||
}
|
||||
|
||||
inline J2DOrthoGraph* dComIfGp_getCurrentGrafPort() {
|
||||
return g_dComIfG_gameInfo.play.getCurrentGrafPort();
|
||||
}
|
||||
|
||||
inline JKRExpHeap * dComIfGp_getExpHeap2D() {
|
||||
return g_dComIfG_gameInfo.play.getExpHeap2D();
|
||||
}
|
||||
@@ -2208,31 +2213,26 @@ inline int dComIfGd_setRealShadow2(u32 id, s8 param_2, J3DModel* pModel, cXyz* p
|
||||
pTevStr);
|
||||
}
|
||||
|
||||
inline void dComIfGd_imageDrawShadow(Mtx mtx) {
|
||||
g_dComIfG_gameInfo.drawlist.imageDrawShadow(mtx);
|
||||
}
|
||||
|
||||
int dComIfGd_setSimpleShadow2(cXyz* i_pos, f32 param_1, f32 param_2, cBgS_PolyInfo& i_floorPoly, s16 i_angle, f32 param_5, GXTexObj* i_tex);
|
||||
|
||||
inline void dComIfGd_setAlphaModel(u8 type, Mtx mtx, u8 alpha) {
|
||||
g_dComIfG_gameInfo.drawlist.setAlphaModel(type, mtx, alpha);
|
||||
}
|
||||
inline void dComIfGd_setAlphaModel(u8 type, Mtx mtx, u8 alpha) { g_dComIfG_gameInfo.drawlist.setAlphaModel(type, mtx, alpha); }
|
||||
inline void dComIfGd_setSpotModel(u8 type, Mtx mtx, u8 alpha) { g_dComIfG_gameInfo.drawlist.setSpotModel(type, mtx, alpha); }
|
||||
inline void dComIfGd_setLightModel(u8 type, Mtx mtx, u8 alpha) { g_dComIfG_gameInfo.drawlist.setLightModel(type, mtx, alpha); }
|
||||
|
||||
inline void dComIfGd_setSpotModel(u8 type, Mtx mtx, u8 alpha) {
|
||||
g_dComIfG_gameInfo.drawlist.setSpotModel(type, mtx, alpha);
|
||||
}
|
||||
inline void dComIfGd_drawAlphaModel(Mtx mtx) { g_dComIfG_gameInfo.drawlist.drawAlphaModel(mtx); }
|
||||
inline void dComIfGd_drawSpotModel(Mtx mtx) { g_dComIfG_gameInfo.drawlist.drawSpotModel(mtx); }
|
||||
inline void dComIfGd_drawLightModel(Mtx mtx) { g_dComIfG_gameInfo.drawlist.drawLightModel(mtx); }
|
||||
|
||||
inline void dComIfGd_setLightModel(u8 type, Mtx mtx, u8 alpha) {
|
||||
g_dComIfG_gameInfo.drawlist.setLightModel(type, mtx, alpha);
|
||||
}
|
||||
|
||||
inline s32 dComIfGd_getSpotModelNum() {
|
||||
return g_dComIfG_gameInfo.drawlist.getSpotModelNum();
|
||||
}
|
||||
|
||||
inline s32 dComIfGd_getLightModelNum() {
|
||||
return g_dComIfG_gameInfo.drawlist.getLightModelNum();
|
||||
}
|
||||
|
||||
inline void dComIfGd_setSpotModelColor(GXColor& color) {
|
||||
g_dComIfG_gameInfo.drawlist.setSpotModelColor(color);
|
||||
}
|
||||
inline s32 dComIfGd_getSpotModelNum() { return g_dComIfG_gameInfo.drawlist.getSpotModelNum(); }
|
||||
inline s32 dComIfGd_getLightModelNum() { return g_dComIfG_gameInfo.drawlist.getLightModelNum(); }
|
||||
inline void dComIfGd_setSpotModelColor(GXColor& color) { g_dComIfG_gameInfo.drawlist.setSpotModelColor(color); }
|
||||
inline GXColor & dComIfGd_getAlphaModelColor() { return g_dComIfG_gameInfo.drawlist.getAlphaModelColor(); }
|
||||
inline GXColor & dComIfGd_getLightModelColor() { return g_dComIfG_gameInfo.drawlist.getLightModelColor(); }
|
||||
inline GXColor & dComIfGd_getSpotModelColor() { return g_dComIfG_gameInfo.drawlist.getSpotModelColor(); }
|
||||
|
||||
inline J3DDrawBuffer* dComIfGd_getOpaListP1() {
|
||||
return g_dComIfG_gameInfo.drawlist.getOpaListP1();
|
||||
@@ -2306,6 +2306,29 @@ inline void dComIfGd_entryZSortXluListMaskOff(J3DPacket* i_packet, cXyz& param_1
|
||||
inline void dComIfGd_set2DOpa(dDlst_base_c* pBase) { g_dComIfG_gameInfo.drawlist.set2DOpa(pBase); }
|
||||
inline void dComIfGd_set2DXlu(dDlst_base_c* pBase) { g_dComIfG_gameInfo.drawlist.set2DXlu(pBase); }
|
||||
|
||||
inline void dComIfGd_drawCopy2D() { g_dComIfG_gameInfo.drawlist.drawCopy2D(); }
|
||||
inline void dComIfGd_draw2DOpa() { g_dComIfG_gameInfo.drawlist.draw2DOpa(); }
|
||||
inline void dComIfGd_draw2DOpaTop() { g_dComIfG_gameInfo.drawlist.draw2DOpaTop(); }
|
||||
inline void dComIfGd_draw2DXlu() { g_dComIfG_gameInfo.drawlist.draw2DXlu(); }
|
||||
|
||||
inline void dComIfGd_drawOpaListSky() { g_dComIfG_gameInfo.drawlist.drawOpaListSky(); }
|
||||
inline void dComIfGd_drawXluListSky() { g_dComIfG_gameInfo.drawlist.drawXluListSky(); }
|
||||
inline void dComIfGd_drawOpaListP0() { g_dComIfG_gameInfo.drawlist.drawOpaListP0(); }
|
||||
inline void dComIfGd_drawOpaListP1() { g_dComIfG_gameInfo.drawlist.drawOpaListP1(); }
|
||||
inline void dComIfGd_drawXluListP1() { g_dComIfG_gameInfo.drawlist.drawXluListP1(); }
|
||||
inline void dComIfGd_drawOpaListBG() { g_dComIfG_gameInfo.drawlist.drawOpaListBG(); }
|
||||
inline void dComIfGd_drawXluListBG() { g_dComIfG_gameInfo.drawlist.drawXluListBG(); }
|
||||
inline void dComIfGd_drawOpaList() { g_dComIfG_gameInfo.drawlist.drawOpaList(); }
|
||||
inline void dComIfGd_drawXluList() { g_dComIfG_gameInfo.drawlist.drawXluList(); }
|
||||
inline void dComIfGd_drawOpaListFilter() { g_dComIfG_gameInfo.drawlist.drawOpaListFilter(); }
|
||||
inline void dComIfGd_drawOpaListMaskOff() { g_dComIfG_gameInfo.drawlist.drawOpaListMaskOff(); }
|
||||
inline void dComIfGd_drawXluListMaskOff() { g_dComIfG_gameInfo.drawlist.drawXluListMaskOff(); }
|
||||
inline void dComIfGd_drawOpaListInvisible() { g_dComIfG_gameInfo.drawlist.drawOpaListInvisible(); }
|
||||
inline void dComIfGd_drawXluListInvisible() { g_dComIfG_gameInfo.drawlist.drawXluListInvisible(); }
|
||||
inline void dComIfGd_drawOpaList2D() { g_dComIfG_gameInfo.drawlist.drawOpaList2D(); }
|
||||
|
||||
inline void dComIfGd_drawShadow(Mtx mtx) { g_dComIfG_gameInfo.drawlist.drawShadow(mtx); }
|
||||
|
||||
inline void dComIfGd_peekZ(s16 x, s16 y, u32 * data) { g_dComIfG_gameInfo.drawlist.newPeekZdata(x, y, data); }
|
||||
inline void dComIfGd_peekZdata() { g_dComIfG_gameInfo.drawlist.peekZdata(); }
|
||||
|
||||
@@ -2588,6 +2611,18 @@ inline void dComIfGp_particle_swapFrameBufferTexture() {
|
||||
g_dComIfG_gameInfo.play.getParticle()->swapFrameBufferTexture();
|
||||
}
|
||||
|
||||
inline void dComIfGp_particle_draw(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->draw(inf); }
|
||||
inline void dComIfGp_particle_drawP1(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->drawP1(inf); }
|
||||
inline void dComIfGp_particle_drawToon(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->drawToon(inf); }
|
||||
inline void dComIfGp_particle_drawToonP1(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->drawToonP1(inf); }
|
||||
inline void dComIfGp_particle_drawProjection(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->drawProjection(inf); }
|
||||
inline void dComIfGp_particle_drawShipTail(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->drawShipTail(inf); }
|
||||
inline void dComIfGp_particle_drawWind(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->drawWind(inf); }
|
||||
inline void dComIfGp_particle_draw2Dfore(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->draw2Dfore(inf); }
|
||||
inline void dComIfGp_particle_draw2Dback(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->draw2Dback(inf); }
|
||||
inline void dComIfGp_particle_draw2DmenuFore(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->draw2DmenuFore(inf); }
|
||||
inline void dComIfGp_particle_draw2DmenuBack(JPADrawInfo* inf) { if (g_dComIfG_gameInfo.play.getParticle() != NULL) g_dComIfG_gameInfo.play.getParticle()->draw2DmenuBack(inf); }
|
||||
|
||||
/**
|
||||
* === ATTENTION ===
|
||||
*/
|
||||
|
||||
+40
-4
@@ -131,6 +131,7 @@ public:
|
||||
void setScissor(f32, f32, f32, f32);
|
||||
|
||||
view_port_class* getViewPort() { return &mViewport; }
|
||||
s8 getCameraID() { return mCameraID; }
|
||||
|
||||
private:
|
||||
/* 0x00 */ view_port_class mViewport;
|
||||
@@ -325,6 +326,7 @@ public:
|
||||
BOOL draw(Mtx);
|
||||
s32 getNum() { return mNum; }
|
||||
void setColor(GXColor& color) { mColor = color; }
|
||||
GXColor & getColor() { return mColor; }
|
||||
|
||||
public:
|
||||
/* 0x00 */ GXColor mColor;
|
||||
@@ -373,7 +375,7 @@ public:
|
||||
void draw(dDlst_base_c**, dDlst_base_c**);
|
||||
static void wipeIn(f32, GXColor&);
|
||||
static void wipeIn(f32);
|
||||
void calcWipe();
|
||||
static void calcWipe();
|
||||
|
||||
J3DDrawBuffer* getOpaListP1() { return mpOpaListP1; }
|
||||
J3DDrawBuffer* getOpaListFilter() { return mpOpaListFilter; }
|
||||
@@ -412,6 +414,29 @@ public:
|
||||
void set2DOpa(dDlst_base_c* pItem) { set(mp2DOpa, mp2DOpaEnd, pItem); }
|
||||
void set2DXlu(dDlst_base_c* pItem) { set(mp2DXlu, mp2DXluEnd, pItem); }
|
||||
|
||||
void drawCopy2D() { draw(mpCopy2DArr, mpCopy2D); }
|
||||
void draw2DOpaTop() { draw(mp2DOpaTopArr, mp2DOpaTop); }
|
||||
void draw2DOpa() { draw(mp2DOpaArr, mp2DOpa); }
|
||||
void draw2DXlu() { draw(mp2DXluArr, mp2DXlu); }
|
||||
|
||||
void drawOpaDrawList(J3DDrawBuffer * drawBuffer) { j3dSys.setDrawModeOpaTexEdge(); drawBuffer->draw(); }
|
||||
void drawXluDrawList(J3DDrawBuffer * drawBuffer) { j3dSys.setDrawModeXlu(); drawBuffer->draw(); }
|
||||
void drawOpaListSky() { drawOpaDrawList(mpOpaListSky); }
|
||||
void drawXluListSky() { drawXluDrawList(mpXluListSky); }
|
||||
void drawOpaListP0() { drawOpaDrawList(mpOpaListP0); }
|
||||
void drawOpaListP1() { drawOpaDrawList(mpOpaListP1); }
|
||||
void drawXluListP1() { drawOpaDrawList(mpXluListP1); }
|
||||
void drawOpaListBG() { drawOpaDrawList(mpOpaListBG); }
|
||||
void drawXluListBG() { drawXluDrawList(mpXluListBG); }
|
||||
void drawOpaList() { drawOpaDrawList(mpOpaList); }
|
||||
void drawXluList() { drawXluDrawList(mpXluList); }
|
||||
void drawOpaListFilter() { drawOpaDrawList(mpOpaListFilter); }
|
||||
void drawOpaListMaskOff() { drawOpaDrawList(mpOpaListMaskOff); }
|
||||
void drawXluListMaskOff() { drawXluDrawList(mpXluListMaskOff); }
|
||||
void drawOpaListInvisible() { drawOpaDrawList(mpOpaListInvisible); }
|
||||
void drawXluListInvisible() { drawXluDrawList(mpXluListInvisible); }
|
||||
void drawOpaList2D() { drawOpaDrawList(mpOpaList2D); }
|
||||
|
||||
int setSimpleShadow(cXyz* param_0, f32 param_1, f32 param_2, cXyz* param_3, s16 param_4,
|
||||
f32 param_5, _GXTexObj* param_6) {
|
||||
return mShadowControl.setSimple(param_0, param_1, param_2, param_3, param_4, param_5,
|
||||
@@ -422,12 +447,23 @@ public:
|
||||
return mShadowControl.setReal2(id, param_2, pModel, pPos, param_5, param_6, pTevStr);
|
||||
}
|
||||
|
||||
void drawShadow(Mtx mtx) { mShadowControl.draw(mtx); }
|
||||
void imageDrawShadow(Mtx mtx) { mShadowControl.imageDraw(mtx); }
|
||||
|
||||
void setAlphaModel(u8 type, Mtx mtx, u8 alpha) { mpAlphaModel->set(type, mtx, alpha); }
|
||||
void setSpotModel(u8 type, Mtx mtx, u8 alpha) { mpSpotModel->set(type, mtx, alpha); }
|
||||
void setLightModel(u8 type, Mtx mtx, u8 alpha) { mpLightModel->set(type, mtx, alpha); }
|
||||
|
||||
void drawAlphaModel(Mtx mtx) { mpAlphaModel->draw(mtx); }
|
||||
void drawSpotModel(Mtx mtx) { mpSpotModel->draw(mtx); }
|
||||
void drawLightModel(Mtx mtx) { mpLightModel->draw(mtx); }
|
||||
|
||||
s32 getSpotModelNum() { return mpSpotModel->getNum(); }
|
||||
s32 getLightModelNum() { return mpLightModel->getNum(); }
|
||||
void setSpotModelColor(GXColor& color) { mpSpotModel->setColor(color); }
|
||||
GXColor& getAlphaModelColor() { return mpAlphaModel->getColor(); }
|
||||
GXColor& getSpotModelColor() { return mpSpotModel->getColor(); }
|
||||
GXColor& getLightModelColor() { return mpLightModel->getColor(); }
|
||||
|
||||
void setWindow(dDlst_window_c* pWindow) { mpWindow = pWindow; }
|
||||
void setViewPort(view_port_class* pViewPort) { mpViewPort = pViewPort; }
|
||||
@@ -462,9 +498,9 @@ public:
|
||||
/* 0x00030 */ J3DDrawBuffer* mpOpaListInvisible;
|
||||
/* 0x00034 */ J3DDrawBuffer* mpXluListInvisible;
|
||||
/* 0x00038 */ J3DDrawBuffer* mpOpaList2D;
|
||||
/* 0x0003C */ dDlst_base_c* field_0x3c[4];
|
||||
/* 0x0004C */ dDlst_base_c** field_0x4c;
|
||||
/* 0x00050 */ dDlst_base_c** field_0x50;
|
||||
/* 0x0003C */ dDlst_base_c* mpCopy2DArr[4];
|
||||
/* 0x0004C */ dDlst_base_c** mpCopy2D;
|
||||
/* 0x00050 */ dDlst_base_c** mpCopy2DEnd;
|
||||
/* 0x00054 */ dDlst_base_c* mp2DOpaTopArr[16];
|
||||
/* 0x00094 */ dDlst_base_c** mp2DOpaTop;
|
||||
/* 0x00098 */ dDlst_base_c** mp2DOpaTopEnd;
|
||||
|
||||
@@ -421,6 +421,7 @@ void dKy_Itemgetcol_chg_move();
|
||||
void dKy_arrowcol_chg_on(cXyz*, int);
|
||||
void dKy_arrowcol_chg_move();
|
||||
void dKy_setLight_init();
|
||||
void dKy_setLight();
|
||||
void dKy_GxFog_set();
|
||||
void GxXFog_set();
|
||||
void dKy_set_actcol_ratio(f32 ratio);
|
||||
|
||||
@@ -410,6 +410,17 @@ public:
|
||||
return set(5, particleID, pos, angle, scale, alpha, &mSingleRippleEcallBack, -1, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
void draw(JPADrawInfo* inf) { draw(inf, 0); }
|
||||
void drawP1(JPADrawInfo* inf) { draw(inf, 1); }
|
||||
void drawToon(JPADrawInfo* inf) { draw(inf, 2); }
|
||||
void drawToonP1(JPADrawInfo* inf) { draw(inf, 3); }
|
||||
void drawProjection(JPADrawInfo* inf) { draw(inf, 4); }
|
||||
void drawShipTail(JPADrawInfo* inf) { draw(inf, 5); }
|
||||
void drawWind(JPADrawInfo* inf) { draw(inf, 6); }
|
||||
void draw2Dfore(JPADrawInfo* inf) { draw(inf, 7); }
|
||||
void draw2Dback(JPADrawInfo* inf) { draw(inf, 8); }
|
||||
void draw2DmenuFore(JPADrawInfo* inf) { draw(inf, 9); }
|
||||
void draw2DmenuBack(JPADrawInfo* inf) { draw(inf, 10); }
|
||||
|
||||
void drawModelParticle() { mModelCtrl->draw(); }
|
||||
JKRHeap * getHeap() { return mHeap; }
|
||||
@@ -421,6 +432,12 @@ public:
|
||||
|
||||
static JPAEmitterManager * mEmitterMng;
|
||||
|
||||
static bool isStatus(u8 b) { return !!(mStatus & b); }
|
||||
static u8 mStatus;
|
||||
|
||||
static Mtx mWindViewMatrix;
|
||||
static MtxP getWindViewMatrix() { return mWindViewMatrix; }
|
||||
|
||||
/* 0x0000 */ JKRHeap* mHeap;
|
||||
/* 0x0004 */ JPAResourceManager* mpCommonResMgr;
|
||||
/* 0x0008 */ dPa_modelControl_c* mModelCtrl;
|
||||
|
||||
@@ -138,5 +138,6 @@ public:
|
||||
};
|
||||
|
||||
extern dScnPly_reg_HIO_c g_regHIO;
|
||||
extern dScnPly_env_HIO_c g_envHIO;
|
||||
|
||||
#endif /* D_S_PLAY */
|
||||
|
||||
+4
-4
@@ -1016,16 +1016,16 @@ inline int dStage_FileList_dt_ChkPathWindEffect(dStage_FileList_dt_c* i_fili) {
|
||||
}
|
||||
|
||||
inline int dStage_FileList_dt_GlobalWindLevel(dStage_FileList_dt_c* i_fili) {
|
||||
return (i_fili->mParam >> 0x12) & 3;
|
||||
return (i_fili->mParam >> 18) & 3;
|
||||
}
|
||||
|
||||
inline f32 dStage_FileList_dt_SeaLevel(dStage_FileList_dt_c* i_fili) {
|
||||
return i_fili->mSeaLevel;
|
||||
}
|
||||
|
||||
// inline u8 dStage_FileList_dt_PhotoDepth(dStage_FileList_dt_c* i_fili) {
|
||||
// maybe 0x00007F80?
|
||||
// }
|
||||
inline u8 dStage_FileList_dt_PhotoDepth(dStage_FileList_dt_c* i_fili) {
|
||||
return (i_fili->mParam >> 7) & 0xFF;
|
||||
}
|
||||
|
||||
inline s32 dStage_FileList_dt_CheckDarkOn(dStage_FileList_dt_c* i_fili) {
|
||||
return i_fili->mParam & 1;
|
||||
|
||||
@@ -394,20 +394,6 @@ typedef enum _GXTlut {
|
||||
/* 0x13 */ GX_BIGTLUT3,
|
||||
} GXTlut;
|
||||
|
||||
/* 8-bit version of GXTexFmt for use in structures */
|
||||
typedef enum _GXTexFmt8 {
|
||||
/* 0x20 */ GX_CTF_R4 = (0x0 | _GX_TF_CTF),
|
||||
/* 0x22 */ GX_CTF_RA4 = (0x2 | _GX_TF_CTF),
|
||||
/* 0x23 */ GX_CTF_RA8 = (0x3 | _GX_TF_CTF),
|
||||
/* 0x26 */ GX_CTF_YUVA8 = (0x6 | _GX_TF_CTF),
|
||||
/* 0x27 */ GX_CTF_A8 = (0x7 | _GX_TF_CTF),
|
||||
/* 0x28 */ GX_CTF_R8 = (0x8 | _GX_TF_CTF),
|
||||
/* 0x29 */ GX_CTF_G8 = (0x9 | _GX_TF_CTF),
|
||||
/* 0x2A */ GX_CTF_B8 = (0xA | _GX_TF_CTF),
|
||||
/* 0x2B */ GX_CTF_RG8 = (0xB | _GX_TF_CTF),
|
||||
/* 0x2C */ GX_CTF_GB8 = (0xC | _GX_TF_CTF),
|
||||
} GXTexFmt8;
|
||||
|
||||
typedef enum _GXTexWrapMode {
|
||||
/* 0x0 */ GX_CLAMP,
|
||||
/* 0x1 */ GX_REPEAT,
|
||||
|
||||
@@ -25,7 +25,8 @@ void GXPokeZMode(GXBool enable_compare, GXCompare comp);
|
||||
void GXPeekZ(u16 x, u16 y, u32* z);
|
||||
|
||||
typedef void (*GXDrawSyncCallback)(u16 token);
|
||||
void * GXSetDrawSyncCallback(GXDrawSyncCallback callback);
|
||||
GXDrawSyncCallback GXSetDrawSyncCallback(GXDrawSyncCallback callback);
|
||||
void GXSetDrawSync(GXBool enable);
|
||||
|
||||
typedef void (*GXDrawDoneCallback)(void);
|
||||
void GXSetDrawDoneCallback(GXDrawDoneCallback callback);
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void GXProject(f32 model_x, f32 model_y, f32 model_z, Mtx model_mtx, f32* proj_mtx, f32* viewpoint,
|
||||
f32* screen_x, f32* screen_y, f32* screen_z);
|
||||
void GXProject(f32 model_x, f32 model_y, f32 model_z, Mtx model_mtx, f32* proj, f32* viewpoint, f32* screen_x, f32* screen_y, f32* screen_z);
|
||||
void GXSetProjection(Mtx44 mtx, GXProjectionType type);
|
||||
void GXSetProjectionv(f32* p);
|
||||
void GXGetProjectionv(f32* p);
|
||||
|
||||
@@ -98,6 +98,7 @@ BOOL OSCreateThread(OSThread* thread, void* func, void* param, void* stackBase,
|
||||
void OSExitThread(void* exitValue);
|
||||
void OSCancelThread(OSThread* thread);
|
||||
void OSDetachThread(OSThread* thread);
|
||||
BOOL OSJoinThread(OSThread* thread, void**);
|
||||
s32 OSResumeThread(OSThread* thread);
|
||||
s32 OSSuspendThread(OSThread* thread);
|
||||
void OSSleepThread(OSThreadQueue* queue);
|
||||
|
||||
@@ -34,7 +34,7 @@ dComIfG_inf_c g_dComIfG_gameInfo;
|
||||
|
||||
/* 80052134-800521A4 .text ct__14dComIfG_play_cFv */
|
||||
void dComIfG_play_c::ct() {
|
||||
field_0x4841 = 0;
|
||||
mDlstWindowNum = 0;
|
||||
mParticle = NULL;
|
||||
mDemo = NULL;
|
||||
mpMagmaPacket = NULL;
|
||||
|
||||
@@ -1041,7 +1041,7 @@ void dDlst_peekZ_c::peekData() {
|
||||
|
||||
/* 80085C6C-80085D74 .text __ct__12dDlst_list_cFv */
|
||||
dDlst_list_c::dDlst_list_c() {
|
||||
field_0x50 = &field_0x3c[ARRAY_SIZE(field_0x3c)];
|
||||
mpCopy2DEnd = &mpCopy2DArr[ARRAY_SIZE(mpCopy2DArr)];
|
||||
mp2DOpaTopEnd = &mp2DOpaTopArr[ARRAY_SIZE(mp2DOpaTopArr)];
|
||||
mp2DOpaEnd = &mp2DOpaArr[ARRAY_SIZE(mp2DOpaArr)];
|
||||
mp2DXluEnd = &mp2DXluArr[ARRAY_SIZE(mp2DXluArr)];
|
||||
@@ -1108,7 +1108,7 @@ bool dDlst_list_c::init() {
|
||||
mpOpaList2D->setNonSort();
|
||||
setOpaList();
|
||||
setXluList();
|
||||
field_0x4c = &field_0x3c[0];
|
||||
mpCopy2D = &mpCopy2DArr[0];
|
||||
mp2DOpaTop = &mp2DOpaTopArr[0];
|
||||
mp2DOpa = &mp2DOpaArr[0];
|
||||
mp2DXlu = &mp2DXluArr[0];
|
||||
@@ -1165,7 +1165,7 @@ void dDlst_list_c::reset() {
|
||||
mpOpaList2D->frameInit();
|
||||
setOpaList();
|
||||
setXluList();
|
||||
field_0x4c = &field_0x3c[0];
|
||||
mpCopy2D = &mpCopy2DArr[0];
|
||||
mp2DOpaTop = &mp2DOpaTopArr[0];
|
||||
mp2DOpa = &mp2DOpaArr[0];
|
||||
mp2DXlu = &mp2DXluArr[0];
|
||||
|
||||
+1
-1
@@ -627,7 +627,7 @@ BOOL dScnLogo_Delete(dScnLogo_c* i_this) {
|
||||
ResTIMG * timg = (ResTIMG *)dComIfG_getObjectRes("Always", ALWAYS_I4_BALL128B);
|
||||
g_dComIfG_gameInfo.drawlist.mShadowControl.setSimpleTex(timg);
|
||||
dComIfG_deleteObjectRes("Logo");
|
||||
g_dComIfG_gameInfo.play.field_0x4841 = 0;
|
||||
dComIfGp_setWindowNum(0);
|
||||
|
||||
for (s32 i = 0; i < 3; i++) {
|
||||
g_dComIfG_gameInfo.play.mAramHeap0[i] = JKRAram::getAramHeap()->alloc(0x2000, JKRAramHeap::HEAD);
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ dScnOpen_c::~dScnOpen_c() {
|
||||
if (solid_heap != NULL)
|
||||
mDoExt_destroySolidHeap(solid_heap);
|
||||
dComIfG_resDelete(&mPhs, "Opening");
|
||||
g_dComIfG_gameInfo.play.field_0x4841 = 0;
|
||||
dComIfGp_setWindowNum(0);
|
||||
}
|
||||
|
||||
/* 80232DD8-80232E6C .text changeGameScene__10dScnOpen_cFv */
|
||||
|
||||
+391
-8
@@ -6,16 +6,21 @@
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_drawlist.h"
|
||||
#include "d/d_meter.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "f_ap/f_ap_game.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "m_Do/m_Do_machine.h"
|
||||
#include "m_Do/m_Do_main.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
#include "m_Do/m_Do_printf.h"
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#include "JSystem/JFramework/JFWDisplay.h"
|
||||
#include "JSystem/JFramework/JFWSystem.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "JSystem/JParticle/JPAEmitterManager.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JUtility/JUTDbPrint.h"
|
||||
@@ -23,6 +28,7 @@
|
||||
#include "JSystem/JUtility/JUTProcBar.h"
|
||||
#include "JSystem/JUtility/JUTVideo.h"
|
||||
#include "JSystem/JUtility/JUTXfb.h"
|
||||
#include "dolphin/base/PPCArch.h"
|
||||
|
||||
namespace J2DPrint {
|
||||
void setBuffer(u32);
|
||||
@@ -53,20 +59,20 @@ OSAlarm mCaptureTimeOutAlarm;
|
||||
s16 mCaptureStep;
|
||||
bool mCaptureCansel;
|
||||
bool mCaptureEnableGXSetCopyFilter;
|
||||
void* mCaptureThreadStackHead;
|
||||
u8* mCaptureThreadStackHead;
|
||||
u8* mCaptureCaptureBuffer;
|
||||
u8* mCaptureTextureBuffer;
|
||||
u32 mCaptureTextureSize;
|
||||
u32 mCaptureCaptureSize;
|
||||
GXDrawSyncCallback mCaptureOldCB;
|
||||
OSThreadQueue mCaptureThreadQueue;
|
||||
OSTick mCaptureTimeOutTicks;
|
||||
u64 mCaptureTimeOutTicks;
|
||||
|
||||
JKRHeap * mDoGph_gInf_c::mHeap[2] = {};
|
||||
GXColor mDoGph_gInf_c::mBackColor = {};
|
||||
GXColor mDoGph_gInf_c::mFadeColor = {};
|
||||
static GXColorS10 l_tevColor = {};
|
||||
bool mCaptureDraw = true;
|
||||
u8 mCaptureDraw = 1;
|
||||
u8 mCaptureTextureFormat = GX_TF_CMPR;
|
||||
u8 mCaptureCaptureFormat = GX_TF_RGB565;
|
||||
u8 mCaptureSizeWidth = 152;
|
||||
@@ -445,8 +451,48 @@ void drawSpot(view_class* view) {
|
||||
}
|
||||
|
||||
/* 80008F34-8000990C .text drawDepth__FP10view_classP15view_port_classi */
|
||||
void drawDepth(view_class* view, view_port_class* viewport, int) {
|
||||
void drawDepth(view_class* view, view_port_class* viewport, int depth) {
|
||||
/* Nonmatching */
|
||||
if (mDoGph_gInf_c::isAutoForcus()) {
|
||||
f32 projv[7];
|
||||
f32 viewv[4];
|
||||
f32 x, y, z;
|
||||
|
||||
GXGetProjectionv(projv);
|
||||
GXGetViewportv(viewv);
|
||||
GXProject(view->mLookat.mCenter.x, view->mLookat.mCenter.y, view->mLookat.mCenter.z, view->mViewMtx, projv, viewv, &x, &y, &z);
|
||||
}
|
||||
|
||||
static GXColorS10 l_tevColor0 = { 0, 0, 0, 0 };
|
||||
if (mDoGph_gInf_c::isMonotone()) {
|
||||
mDoGph_gInf_c::calcMonotone();
|
||||
l_tevColor0.a = mDoGph_gInf_c::mMonotoneRate;
|
||||
} else {
|
||||
dStage_FileList_dt_c * fili_p = NULL;
|
||||
s32 roomNo = dComIfGp_roomControl_getStayNo();
|
||||
if (roomNo >= 0)
|
||||
fili_p = dComIfGp_roomControl_getStatusRoomDt(roomNo)->getFileListInfo();
|
||||
|
||||
if (fili_p != NULL) {
|
||||
if (mDoGph_gInf_c::isAutoForcus()) {
|
||||
l_tevColor0.a = depth - dStage_FileList_dt_PhotoDepth(fili_p);
|
||||
} else {
|
||||
s16 photoDepth = -dStage_FileList_dt_PhotoDepth(fili_p);
|
||||
if (depth < -dStage_FileList_dt_PhotoDepth(fili_p))
|
||||
depth = photoDepth;
|
||||
l_tevColor0.a = photoDepth;
|
||||
}
|
||||
} else {
|
||||
if (mDoGph_gInf_c::isAutoForcus()) {
|
||||
s16 photoDepth = -g_envHIO.mOther.field_0x40;
|
||||
if (depth < -g_envHIO.mOther.field_0x40)
|
||||
depth = photoDepth;
|
||||
l_tevColor0.a = photoDepth;
|
||||
} else {
|
||||
l_tevColor0.a = depth - g_envHIO.mOther.field_0x40;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 80009914-80009BBC .text motionBlure__FP10view_class */
|
||||
@@ -598,7 +644,7 @@ void drawRectangle(int x0, int y0, int x1, int y1) {
|
||||
}
|
||||
|
||||
/* 8000A7F0-8000A8B8 .text mDoGph_allocFromAny__FUli */
|
||||
void* mDoGph_allocFromAny(u32 size, int align) {
|
||||
u8* mDoGph_allocFromAny(u32 size, int align) {
|
||||
void* mem = JKRAllocFromHeap(mDoExt_getZeldaHeap(), size, align);
|
||||
if (mem == NULL)
|
||||
mem = JKRAllocFromHeap(mDoExt_getGameHeap(), size, align);
|
||||
@@ -609,7 +655,7 @@ void* mDoGph_allocFromAny(u32 size, int align) {
|
||||
if (mem == NULL)
|
||||
mem = mDoGph_gInf_c::getZbufferTex();
|
||||
memset(mem, 0, size);
|
||||
return mem;
|
||||
return (u8*)mem;
|
||||
}
|
||||
|
||||
/* 8000A8B8-8000AAC4 .text mDoGph_screenCaptureDraw__Fv */
|
||||
@@ -697,8 +743,66 @@ void mCaptureGXDrawSyncTimeOut(OSAlarm*, OSContext*) {
|
||||
}
|
||||
|
||||
/* 8000AC3C-8000AEA4 .text mDoGph_screenCapture__Fv */
|
||||
void mDoGph_screenCapture() {
|
||||
bool mDoGph_screenCapture() {
|
||||
/* Nonmatching */
|
||||
s32 sizeW = mCaptureSizeWidth;
|
||||
s32 sizeH = mCaptureSizeHeight;
|
||||
s32 sizeW2 = sizeW << 1;
|
||||
s32 sizeH2 = sizeH << 1;
|
||||
s32 centerX = mCaptureCenterX;
|
||||
s32 centerY = mCaptureCenterY;
|
||||
|
||||
f32 projv[7];
|
||||
f32 viewv[4];
|
||||
u32 left, top, width, height;
|
||||
|
||||
mCaptureTextureSize = GXGetTexBufferSize(sizeW, sizeH, mCaptureTextureFormat, GX_FALSE, 0);
|
||||
mCaptureTextureBuffer = mDoGph_allocFromAny(mCaptureTextureSize, 0x20);
|
||||
if (mCaptureTextureBuffer == NULL) {
|
||||
mCaptureStep = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mCaptureTextureFormat == GX_TF_CMPR) {
|
||||
mCaptureCaptureSize = GXGetTexBufferSize(sizeW, sizeH, mCaptureCaptureFormat, GX_FALSE, 0);
|
||||
mCaptureCaptureBuffer = mDoGph_allocFromAny(mCaptureCaptureSize, 0x20);
|
||||
if (mCaptureCaptureBuffer == NULL) {
|
||||
JKRFreeToHeap(NULL, mCaptureTextureBuffer);
|
||||
mCaptureTextureBuffer = NULL;
|
||||
mCaptureStep = -1;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
mCaptureCaptureFormat = mCaptureTextureFormat;
|
||||
mCaptureCaptureBuffer = mCaptureTextureBuffer;
|
||||
}
|
||||
|
||||
GXGetProjectionv(projv);
|
||||
GXGetViewportv(viewv);
|
||||
GXGetScissor(&left, &top, &width, &height);
|
||||
GXSetViewport(0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 1.0f);
|
||||
|
||||
if (mCaptureEnableGXSetCopyFilter)
|
||||
GXSetCopyFilter(GX_FALSE, NULL, GX_FALSE, NULL);
|
||||
|
||||
setUpRectangle();
|
||||
GXSetTexCopySrc(centerX - sizeW, centerY - sizeH, sizeW2, sizeH2);
|
||||
GXSetTexCopyDst(sizeW, sizeH, mCaptureCaptureFormat, GX_TRUE);
|
||||
DCInvalidateRange(mCaptureCaptureBuffer, mCaptureCaptureSize);
|
||||
GXCopyTex(mCaptureCaptureBuffer, GX_FALSE);
|
||||
GXPixModeSync();
|
||||
|
||||
JUT_ASSERT(0xac1, mCaptureOldCB == 0);
|
||||
mCaptureOldCB = GXSetDrawSyncCallback(mCaptureGXDrawSyncCallback);
|
||||
OSCreateAlarm(&mCaptureTimeOutAlarm);
|
||||
OSSetAlarm(&mCaptureTimeOutAlarm, mCaptureTimeOutTicks, mCaptureGXDrawSyncTimeOut);
|
||||
mCaptureStep++;
|
||||
GXSetDrawSync(GX_FALSE);
|
||||
GXSetProjectionv(projv);
|
||||
GXSetViewport(viewv[0], viewv[1], viewv[2], viewv[3], viewv[4], viewv[5]);
|
||||
GXSetScissor(left, top, width, height);
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 8000AEA4-8000AF2C .text setLight__Fv */
|
||||
@@ -713,8 +817,287 @@ void setLight() {
|
||||
}
|
||||
|
||||
/* 8000AF2C-8000BC38 .text mDoGph_Painter__Fv */
|
||||
void mDoGph_Painter() {
|
||||
bool mDoGph_Painter() {
|
||||
/* Nonmatching */
|
||||
JFWDisplay::getManager()->setFader(mDoGph_gInf_c::mFader);
|
||||
JFWDisplay::getManager()->setClearColor(mDoGph_gInf_c::getBackColor());
|
||||
JFWDisplay::getManager()->beginRender();
|
||||
|
||||
GXSetAlphaUpdate(GX_FALSE);
|
||||
mDoGph_gInf_c::setBackColor(g_clearColor);
|
||||
mDoGph_gInf_c::free();
|
||||
|
||||
if (mCaptureEnableGXSetCopyFilter)
|
||||
GXSetCopyFilter(GX_FALSE, NULL, GX_FALSE, NULL);
|
||||
|
||||
j3dSys.drawInit();
|
||||
GXSetDither(GX_TRUE);
|
||||
|
||||
J2DOrthoGraph graf(0.0f, 0.0f, 640.0f, 480.0f, -1.0f, 1.0f);
|
||||
JGeometry::TBox2<f32> viewport;
|
||||
viewport.i.x = -9.0f;
|
||||
viewport.i.y = -21.0f;
|
||||
viewport.f.x = 650.0f;
|
||||
viewport.f.y = 503.0f;
|
||||
graf.setOrtho(viewport, -1.0f, 1.0f);
|
||||
graf.setPort();
|
||||
|
||||
dComIfGp_setCurrentGrafPort(&graf);
|
||||
dComIfGd_drawCopy2D();
|
||||
if (dComIfGp_getWindowNum() != 0) {
|
||||
dDlst_window_c* window = dComIfGp_getWindow(0);
|
||||
camera_class* camera = dComIfGp_getCamera(window->getCameraID());
|
||||
|
||||
if (camera != NULL) {
|
||||
dComIfGd_imageDrawShadow(camera->mViewMtx);
|
||||
|
||||
view_port_class viewport_crop;
|
||||
view_port_class* viewport_p = window->getViewPort();
|
||||
if (viewport_p->mXOrig != 0.0f || viewport_p->mYOrig != 0.0f) {
|
||||
viewport_crop.mXOrig = viewport_p->mXOrig * 2.0f + viewport_p->mWidth / 2.0f - 320.0f;
|
||||
viewport_crop.mYOrig = viewport_p->mYOrig * 2.0f + viewport_p->mHeight / 2.0f - 240.0f;
|
||||
viewport_crop.mWidth = 640.0f;
|
||||
viewport_crop.mHeight = 480.0f;
|
||||
viewport_crop.mNearZ = viewport_p->mNearZ;
|
||||
viewport_crop.mFarZ = viewport_p->mFarZ;
|
||||
viewport_crop.mScissor = viewport_p->mScissor;
|
||||
viewport_p = &viewport_crop;
|
||||
}
|
||||
|
||||
GXSetViewport(viewport_p->mXOrig, viewport_p->mYOrig, viewport_p->mWidth, viewport_p->mHeight, viewport_p->mNearZ, viewport_p->mFarZ);
|
||||
GXSetScissor(viewport_p->mScissor.mXOrig, viewport_p->mScissor.mYOrig, viewport_p->mScissor.mWidth, viewport_p->mScissor.mHeight);
|
||||
|
||||
JPADrawInfo jpaDrawInfo(camera->mViewMtx, camera->mFovy, camera->mAspect);
|
||||
|
||||
bool isTower9 = strcmp(dComIfGp_getStartStageName(), "GTower") == 0 && dComIfGp_getStartStageLayer() == 9;
|
||||
dComIfGp_setCurrentWindow(window);
|
||||
dComIfGp_setCurrentView(camera);
|
||||
dComIfGp_setCurrentViewport(viewport_p);
|
||||
GXSetProjection(camera->mProjMtx, GX_PERSPECTIVE);
|
||||
PPCSync();
|
||||
j3dSys.setViewMtx(camera->mViewMtx);
|
||||
dKy_setLight();
|
||||
dComIfGd_drawOpaListSky();
|
||||
dComIfGd_drawXluListSky();
|
||||
|
||||
if (!dMenu_flag() && dPa_control_c::isStatus(0x01))
|
||||
dComIfGp_particle_drawShipTail(&jpaDrawInfo);
|
||||
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
dComIfGd_drawOpaListBG();
|
||||
dComIfGd_drawShadow(camera->mViewMtx);
|
||||
dComIfGd_drawAlphaModel(camera->mViewMtx);
|
||||
drawAlphaBuffer(camera, dComIfGd_getAlphaModelColor());
|
||||
if (dComIfGd_getLightModelNum() != 0) {
|
||||
clearAlphaBuffer(camera, 0);
|
||||
dComIfGd_drawLightModel(camera->mViewMtx);
|
||||
drawAlphaBuffer(camera, dComIfGd_getLightModelColor());
|
||||
}
|
||||
|
||||
if (!mDoGph_gInf_c::isMonotone()) {
|
||||
dComIfGd_drawOpaListP0();
|
||||
dComIfGd_drawOpaListP1();
|
||||
}
|
||||
|
||||
dComIfGd_drawOpaListInvisible();
|
||||
dComIfGd_drawXluListBG();
|
||||
|
||||
if (dComIfGd_getSpotModelNum() != 0)
|
||||
clearAlphaBuffer(camera, dComIfGd_getSpotModelColor().a);
|
||||
|
||||
if (!dMenu_flag() && !dPa_control_c::isStatus(0x01))
|
||||
dComIfGp_particle_drawShipTail(&jpaDrawInfo);
|
||||
|
||||
if (!mDoGph_gInf_c::isMonotone())
|
||||
dComIfGd_drawXluListP1();
|
||||
|
||||
dComIfGd_drawXluListInvisible();
|
||||
|
||||
if (!dMenu_flag()) {
|
||||
dComIfGp_particle_draw(&jpaDrawInfo);
|
||||
|
||||
if (!mDoGph_gInf_c::isMonotone())
|
||||
dComIfGp_particle_drawP1(&jpaDrawInfo);
|
||||
|
||||
JPADrawInfo windDrawInfo(dPa_control_c::getWindViewMatrix(), camera->mFovy, camera->mAspect);
|
||||
dComIfGp_particle_drawWind(&windDrawInfo);
|
||||
|
||||
dComIfGp_particle_drawToon(&jpaDrawInfo);
|
||||
|
||||
if (!mDoGph_gInf_c::isMonotone())
|
||||
dComIfGp_particle_drawToonP1(&jpaDrawInfo);
|
||||
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
}
|
||||
|
||||
dComIfGd_drawOpaListFilter();
|
||||
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
|
||||
if (dComIfGd_getSpotModelNum() != 0) {
|
||||
dComIfGd_drawAlphaModel(camera->mViewMtx);
|
||||
dComIfGd_drawSpotModel(camera->mViewMtx);
|
||||
drawSpot(camera);
|
||||
}
|
||||
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
dComIfGd_drawOpaListMaskOff();
|
||||
dComIfGd_drawXluListMaskOff();
|
||||
|
||||
if (!dMenu_flag()) {
|
||||
motionBlure(camera);
|
||||
drawDepth(camera, viewport_p, dComIfGp_getCamZoomForcus(window->getCameraID()));
|
||||
dComIfGp_particle_drawProjection(&jpaDrawInfo);
|
||||
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
dComIfGd_drawOpaListInvisible();
|
||||
dComIfGd_drawXluListInvisible();
|
||||
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
|
||||
if (isTower9)
|
||||
dComIfGp_particle_draw(&jpaDrawInfo);
|
||||
}
|
||||
|
||||
if (mDoGph_gInf_c::isMonotone()) {
|
||||
clearAlphaBuffer(camera, 0);
|
||||
dComIfGd_drawOpaListP0();
|
||||
dComIfGd_drawOpaListP1();
|
||||
dComIfGd_drawXluListP1();
|
||||
dComIfGp_particle_drawP1(&jpaDrawInfo);
|
||||
dComIfGp_particle_drawToonP1(&jpaDrawInfo);
|
||||
}
|
||||
|
||||
mDoGph_gInf_c::calcFade();
|
||||
if (mCaptureStep == 1) {
|
||||
if (!mCaptureCansel)
|
||||
mDoGph_screenCapture();
|
||||
else
|
||||
mCaptureStep = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mCaptureStep == 3) {
|
||||
if (mCaptureCansel) {
|
||||
if (mCaptureCaptureBuffer != NULL) {
|
||||
JKRFreeToHeap(NULL, mCaptureCaptureBuffer);
|
||||
mCaptureCaptureBuffer = NULL;
|
||||
}
|
||||
if (mCaptureTextureBuffer != NULL) {
|
||||
JKRFreeToHeap(NULL, mCaptureTextureBuffer);
|
||||
mCaptureTextureBuffer = NULL;
|
||||
}
|
||||
mCaptureStep = 0;
|
||||
} else {
|
||||
if (mCaptureTextureFormat == GX_TF_CMPR) {
|
||||
mCaptureThreadStackHead = mDoGph_allocFromAny(mCaptureThreadStackSize, 0x20);
|
||||
if (mCaptureThreadStackHead == NULL) {
|
||||
mCaptureProc(0);
|
||||
if (mCaptureCaptureBuffer != NULL) {
|
||||
JKRFreeToHeap(NULL, mCaptureCaptureBuffer);
|
||||
mCaptureCaptureBuffer = NULL;
|
||||
}
|
||||
mCaptureStep = 5;
|
||||
} else {
|
||||
OSCreateThread(&mCaptureThread, mCaptureProc, NULL, mCaptureThreadStackHead + mCaptureThreadStackSize, mCaptureThreadStackSize, mCaptureThreadPriority, 0);
|
||||
OSResumeThread(&mCaptureThread);
|
||||
mCaptureStep++;
|
||||
}
|
||||
} else {
|
||||
mCaptureCaptureBuffer = NULL;
|
||||
mCaptureStep = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mCaptureStep == 4) {
|
||||
if (mCaptureCansel) {
|
||||
OSCancelThread(&mCaptureThread);
|
||||
}
|
||||
|
||||
if (OSIsThreadTerminated(&mCaptureThread)) {
|
||||
if (mCaptureCaptureBuffer != NULL) {
|
||||
JKRFreeToHeap(NULL, mCaptureCaptureBuffer);
|
||||
mCaptureCaptureBuffer = NULL;
|
||||
}
|
||||
|
||||
if (mCaptureThreadStackHead != NULL) {
|
||||
JKRFreeToHeap(NULL, mCaptureThreadStackHead);
|
||||
mCaptureThreadStackHead = NULL;
|
||||
}
|
||||
|
||||
OSJoinThread(&mCaptureThread, NULL);
|
||||
mCaptureStep++;
|
||||
} else {
|
||||
OSAlarm alarm;
|
||||
OSCreateAlarm(&alarm);
|
||||
OSInitThreadQueue(&mCaptureThreadQueue);
|
||||
OSSetAlarm(&alarm, (12345 / 1000) * 10, mCaptureAlarmHandler);
|
||||
OSSleepThread(&mCaptureThreadQueue);
|
||||
OSCancelAlarm(&alarm);
|
||||
}
|
||||
}
|
||||
|
||||
if ((mCaptureStep == 3 || mCaptureStep == 4 || mCaptureStep == 5) && mCaptureDraw != 0 && !mCaptureCansel) {
|
||||
mDoGph_screenCaptureDraw();
|
||||
}
|
||||
|
||||
if (mCaptureStep == 5 && mCaptureCansel) {
|
||||
mCaptureStep = 6;
|
||||
}
|
||||
|
||||
if (mCaptureStep == 6) {
|
||||
if (mCaptureTextureBuffer != NULL) {
|
||||
JKRFreeToHeap(NULL, mCaptureTextureBuffer);
|
||||
mCaptureTextureBuffer = NULL;
|
||||
}
|
||||
|
||||
mCaptureStep = 0;
|
||||
mCaptureCansel = false;
|
||||
}
|
||||
|
||||
dDlst_list_c::calcWipe();
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
|
||||
viewport.i.x = -9.0f;
|
||||
viewport.i.y = -21.0f;
|
||||
viewport.f.x = 650.0f;
|
||||
viewport.f.y = 503.0f;
|
||||
graf.setOrtho(viewport, 100000.0f, -100000.0f);
|
||||
graf.setPort();
|
||||
Mtx viewMtx;
|
||||
mDoMtx_trans(viewMtx, 320.0f, 240.0f, 0.0f);
|
||||
JPADrawInfo jpaDrawInfo2D(viewMtx, 0.0f, 1.333333f);
|
||||
if (!dMenu_flag())
|
||||
dComIfGp_particle_draw2Dback(&jpaDrawInfo2D);
|
||||
dComIfGp_particle_draw2DmenuBack(&jpaDrawInfo2D);
|
||||
|
||||
if (dComIfGd_getList2D()->mpBuf[0] != NULL) {
|
||||
mDoMtx_copy(j3dSys.getViewMtx(), viewMtx);
|
||||
setLight();
|
||||
mDoMtx_stack_c::transS(320.0f, 240.0f, 1000.0f);
|
||||
mDoMtx_stack_c::ZrotM(-0x8000);
|
||||
j3dSys.setViewMtx(mDoMtx_stack_c::get());
|
||||
dComIfGd_drawOpaList2D();
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
j3dSys.setViewMtx(viewMtx);
|
||||
}
|
||||
|
||||
dComIfGd_draw2DOpa();
|
||||
dComIfGd_draw2DOpaTop();
|
||||
dComIfGd_draw2DXlu();
|
||||
|
||||
if (!dMenu_flag())
|
||||
dComIfGp_particle_draw2Dfore(&jpaDrawInfo2D);
|
||||
dComIfGp_particle_draw2DmenuFore(&jpaDrawInfo2D);
|
||||
JFWDisplay::getManager()->endFrame();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 8000BC94-8000BD08 .text mDoGph_Create__Fv */
|
||||
|
||||
Reference in New Issue
Block a user