mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-16 04:23:53 -04:00
Ongoing gameplay dev (#49)
* launch.json cwd * bodge to load gci for testing * stub card stat * gameplay bodges * viewport, ub fixes * add release with debug info cmake variant * be fixes, sound stub * viewport h * d_msg_flow BE * be fopAcM_createItemFromEnemyID * update launch configuration to use iso * more audio stubs * Attempt to set viewport and get messages for brightness check * skip opening scene again, fixed JMessage::TResourceContainer::TCResource::Do_destroy * add guards for viewport changes * moar endian swapping to get Link sitting in PROC_OPENING_SCENE and for dialogues * BE d_msg_class i_data * stub bgm start * fix div by 0 error (for now) * TEMP_BROKEN in d_menu_ring * REQUIRES_GX_LINES * properly stub renderingAmap::draw with REQUIRES_GX_LINES * better stubbing outside of stubs * fix event data getting swapped multiple times * evil draw vp fix * Stub log imgui This redirects all spammy logs to an imgui window that is cleared per frame. This fixes the serious performance dip of the logging, and makes the regular log readable. * Oops move those optimization changes I accidentally committed behind a flag DUSK_SELECTED_OPT * gx_line macro in map * fix audio stubbing * switch to CARD API aurora impl * remove kabufuda from link libs * refactor imgui stuff and add input viewer * merge stub log with refactor * accidentally committed a metaforce header shh * basic map loader * ImGuiConsole: Add missing <thread> include * you may now play as luigi (you may now load stages with bridges) * bloom fix * bloom leak fix * cloud shadow fix * add soft reset button to imgui menu * if it broke dont not fix it * i swear i committed this * BE swap indMtx in JPAResource::setPTev * wnark ct fix * frsqrte implementation from kinoko * Fix Clang compile error in JAISeq::prepare_getSeqData_ * Add endian conversions to dMsgFlow_c::getInitNodeIndex This fixes a freeze when Fado tries to stop you from leaving the starting area. * Add RAII GXTexObj wrapper; fix almost all leaks * Update aurora for indirect texturing * Update aurora for CARD fix * Fix Clang build * More d_msg_flow endian fixes Fixes softlock when trying to talk to Fado and possibly other NPCs. * no frame limiter * get pause menu working * proper frame limiting * particle pointer size fix * improve map loader a bit --------- Co-authored-by: Jasper St. Pierre <jstpierre@mecheye.net> Co-authored-by: TakaRikka <takarikka@outlook.com> Co-authored-by: CraftyBoss <talibabdulmaalik@gmail.com> Co-authored-by: Luke Street <luke@street.dev> Co-authored-by: Lurs <2795933+Lurs@users.noreply.github.com> Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com> Co-authored-by: tgsm <doodrabbit@hotmail.com> Co-authored-by: Max Roncace <me@caseif.net> Co-authored-by: Phillip Stephens <antidote.crk@gmail.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_k_wmark.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
|
||||
const EffParamProc daAlink_c::m_fEffParamProc[] = {
|
||||
&daAlink_c::setEffectFrontRollParam,
|
||||
@@ -2025,7 +2026,11 @@ void daAlink_blur_c::traceBlur(cXyz const* param_0, cXyz const* param_1, s16 par
|
||||
void daAlink_blur_c::draw() {
|
||||
j3dSys.reinitGX();
|
||||
|
||||
static GXTexObj texObj;
|
||||
#ifdef TARGET_PC
|
||||
TGXTexObj texObj;
|
||||
#else
|
||||
static TGXTexObj texObj;
|
||||
#endif
|
||||
static GXColor nColor0 = {0xFF, 0xFF, 0xFF, 0x14};
|
||||
|
||||
GXSetNumIndStages(0);
|
||||
|
||||
@@ -134,7 +134,7 @@ int daE_BG_c::draw() {
|
||||
cXyz offsetPos;
|
||||
offsetPos.set(current.pos.x, current.pos.y + 100.0f, current.pos.z);
|
||||
|
||||
GXTexObj* texObj = dDlst_shadowControl_c::getSimpleTex();
|
||||
TGXTexObj* texObj = dDlst_shadowControl_c::getSimpleTex();
|
||||
|
||||
mShadowKey = dComIfGd_setShadow(mShadowKey, 0x01, model, &offsetPos, 200.0f, 0.0f, current.pos.y,
|
||||
mObjAcch.GetGroundH(), mObjAcch.m_gnd, &tevStr, 0, 1.0f, texObj);
|
||||
|
||||
@@ -6581,6 +6581,12 @@ static int daE_RD_Execute(e_rd_class* i_this) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
MtxPush();
|
||||
s16 x, y;
|
||||
|
||||
#if AVOID_UB
|
||||
x = 0;
|
||||
y = 0;
|
||||
#endif
|
||||
|
||||
if (i == 0) {
|
||||
mae.set(38.0f, 0.0f, 0.0f);
|
||||
MtxPosition(&mae, &ato);
|
||||
|
||||
@@ -1048,7 +1048,7 @@ int daE_SB_c::Draw() {
|
||||
mpMorf->entryDL();
|
||||
cXyz my_vec;
|
||||
my_vec.set(current.pos.x, 100.0f + current.pos.y, current.pos.z);
|
||||
GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
TGXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
mShadowKey = dComIfGd_setShadow(mShadowKey, 1, model, &my_vec, 1000.0f, 300.0f,
|
||||
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd,
|
||||
&tevStr, 0, 1.0f, tex_obj);
|
||||
|
||||
@@ -93,7 +93,7 @@ static int daE_SG_Draw(e_sg_class* i_this) {
|
||||
cXyz shadow_pos(i_this->current.pos.x, i_this->current.pos.y + 100.0f,
|
||||
i_this->current.pos.z);
|
||||
|
||||
GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
TGXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
|
||||
i_this->mShadowKey =
|
||||
dComIfGd_setShadow(i_this->mShadowKey, 1, i_this->mpModel, &shadow_pos, 400.0f, 0.0f,
|
||||
|
||||
@@ -320,8 +320,8 @@ void daFmtMng_c::executeFight() {
|
||||
}
|
||||
}
|
||||
|
||||
static bool daFmtMng_Draw(daFmtMng_c* param_0) {
|
||||
return true;
|
||||
static BOOL daFmtMng_Draw(daFmtMng_c* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int daFmtMng_Execute(daFmtMng_c* param_0) {
|
||||
|
||||
@@ -82,6 +82,10 @@ static int daKytag12_Execute_standard(kytag12_class* i_this) {
|
||||
f32 var_f29;
|
||||
f32 var_f28;
|
||||
|
||||
#if AVOID_UB
|
||||
var_f30 = 0;
|
||||
#endif
|
||||
|
||||
int var_r24 = 0;
|
||||
int var_r23 = 0;
|
||||
int var_r22 = 0;
|
||||
|
||||
@@ -298,7 +298,7 @@ void daMant_packet_c::draw() {
|
||||
GXTlutObj GStack_80;
|
||||
GXInitTlutObj(&GStack_80, lut, GX_TL_RGB5A3, 0x100);
|
||||
|
||||
GXTexObj GStack_74;
|
||||
TGXTexObj GStack_74;
|
||||
GXInitTexObjCI(&GStack_74, image, 0x80, 0x80, GX_TF_C8, GX_CLAMP, GX_CLAMP, 0, 0);
|
||||
GXInitTexObjLOD(&GStack_74, GX_LINEAR, GX_LINEAR, 0.0, 0.0, 0.0, 0, 0, GX_ANISO_1);
|
||||
|
||||
@@ -314,6 +314,9 @@ void daMant_packet_c::draw() {
|
||||
GXLoadNrmMtxImm(MStack_54, GX_PNMTX0);
|
||||
GXCallDisplayList(l_Egnd_mantDL, 0x3e0);
|
||||
|
||||
#ifdef TARGET_PC
|
||||
GStack_74.reset();
|
||||
#endif
|
||||
GXInitTexObjCI(&GStack_74, l_Egnd_mantTEX_U, 0x80, 0x80, GX_TF_C8, GX_CLAMP, GX_CLAMP, 0, 0);
|
||||
GXInitTexObjLOD(&GStack_74, GX_LINEAR, GX_LINEAR, 0.0, 0.0, 0.0, 0, 0, GX_ANISO_1);
|
||||
GXLoadTexObj(&GStack_74, GX_TEXMAP0);
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/gx_helper.h"
|
||||
|
||||
inline s32 daMP_NEXT_READ_SIZE(daMP_THPReadBuffer* readBuf) {
|
||||
return *(s32*)readBuf->ptr;
|
||||
}
|
||||
@@ -3155,9 +3157,9 @@ static void daMP_THPGXYuv2RgbSetup(const GXRenderModeObj* rmode) {
|
||||
static void daMP_THPGXYuv2RgbDraw(u8* y_data, u8* u_data, u8* v_data, s16 x,
|
||||
s16 y, s16 textureWidth, s16 textureHeight, s16 polygonWidth,
|
||||
s16 polygonHeight) {
|
||||
GXTexObj tobj0;
|
||||
GXTexObj tobj1;
|
||||
GXTexObj tobj2;
|
||||
TGXTexObj tobj0;
|
||||
TGXTexObj tobj1;
|
||||
TGXTexObj tobj2;
|
||||
|
||||
GXInitTexObj(&tobj0, y_data, textureWidth, textureHeight, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&tobj0, GX_NEAR, GX_NEAR, 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
|
||||
#include "d/actor/d_a_npc_mk.h"
|
||||
|
||||
static bool daNpc_Mk_Create(void* param_0) {
|
||||
return true;
|
||||
static BOOL daNpc_Mk_Create(void* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool daNpc_Mk_Delete(void* param_0) {
|
||||
return true;
|
||||
static BOOL daNpc_Mk_Delete(void* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool daNpc_Mk_Execute(void* param_0) {
|
||||
return true;
|
||||
static BOOL daNpc_Mk_Execute(void* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool daNpc_Mk_Draw(void* param_0) {
|
||||
return true;
|
||||
static BOOL daNpc_Mk_Draw(void* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL daNpc_Mk_IsDelete(void* param_0) {
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
|
||||
#include "d/actor/d_a_npc_p2.h"
|
||||
|
||||
static bool daNpc_P2Create(void* param_0) {
|
||||
return true;
|
||||
static BOOL daNpc_P2Create(void* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool daNpc_P2Delete(void* param_0) {
|
||||
return true;
|
||||
static BOOL daNpc_P2Delete(void* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool daNpc_P2Execute(void* param_0) {
|
||||
return true;
|
||||
static BOOL daNpc_P2Execute(void* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool daNpc_P2Draw(void* param_0) {
|
||||
return true;
|
||||
static BOOL daNpc_P2Draw(void* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL daNpc_P2IsDelete(void* param_0) {
|
||||
|
||||
@@ -16,12 +16,12 @@ static int daNpc_shopMaro_Delete(void* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static bool daNpc_shopMaro_Execute(void* i_this) {
|
||||
return false;
|
||||
static BOOL daNpc_shopMaro_Execute(void* i_this) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool daNpc_shopMaro_Draw(void* i_this) {
|
||||
return false;
|
||||
static BOOL daNpc_shopMaro_Draw(void* i_this) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL daNpc_shopMaro_IsDelete(void* i_this) {
|
||||
|
||||
@@ -485,8 +485,8 @@ static void daNpc_solA_Draw(void* param_0) {
|
||||
return static_cast<daNpc_solA_c*>(param_0)->Draw();
|
||||
}
|
||||
|
||||
static bool daNpc_solA_IsDelete(void* param_0) {
|
||||
return true;
|
||||
static BOOL daNpc_solA_IsDelete(void* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static actor_method_class daNpc_solA_MethodTable = {
|
||||
|
||||
@@ -1338,7 +1338,7 @@ static int daObj_Brg_Execute(obj_brg_class* i_this) {
|
||||
|
||||
i_this->mpBgW->CopyBackVtx();
|
||||
|
||||
Vec* vtx_tbl = (Vec*)i_this->mpBgW->GetVtxTbl();
|
||||
BE(Vec)* vtx_tbl = (BE(Vec)*)i_this->mpBgW->GetVtxTbl();
|
||||
|
||||
int dbg_0x30;
|
||||
int temp;
|
||||
@@ -1622,7 +1622,7 @@ static int CallbackCreateHeap(fopAc_ac_c* i_this) {
|
||||
a_this->mpBgW->SetRideCallback(ride_call_back);
|
||||
a_this->mpBgW->CopyBackVtx();
|
||||
|
||||
Vec* vtx_tbl = (Vec*)a_this->mpBgW->GetVtxTbl();
|
||||
BE(Vec)* vtx_tbl = (BE(Vec)*)a_this->mpBgW->GetVtxTbl();
|
||||
for (int i = 0; i < a_this->mpBgW->GetVtxNum(); i++) {
|
||||
vtx_tbl[i] = i_this->current.pos;
|
||||
}
|
||||
|
||||
@@ -259,8 +259,8 @@ static int daObjFlag_Execute(daObjFlag_c* param_0) {
|
||||
return param_0->execute();
|
||||
}
|
||||
|
||||
static bool daObjFlag_IsDelete(daObjFlag_c* param_0) {
|
||||
return true;
|
||||
static BOOL daObjFlag_IsDelete(daObjFlag_c* param_0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int daObjFlag_Delete(daObjFlag_c* param_0) {
|
||||
|
||||
@@ -530,7 +530,7 @@ int daObj_KBacket_c::Draw() {
|
||||
} else {
|
||||
cM3dGPla plane;
|
||||
if (dComIfG_Bgsp().GetTriPla(mGndChk, &plane) != 0) {
|
||||
GXTexObj* p_Var4 = dDlst_shadowControl_c::getSimpleTex();
|
||||
TGXTexObj* p_Var4 = dDlst_shadowControl_c::getSimpleTex();
|
||||
dComIfGd_setSimpleShadow(¤t.pos, field_0xa00, 50.0f,
|
||||
&plane.mNormal, 0, 1.0f, p_Var4);
|
||||
}
|
||||
|
||||
@@ -980,7 +980,7 @@ int daObjStone_c::draw() {
|
||||
|
||||
if (!model) {
|
||||
f32 shadow_size = l_shadow_size[mStoneType];
|
||||
GXTexObj* pTex = dDlst_shadowControl_c::getSimpleTex();
|
||||
TGXTexObj* pTex = dDlst_shadowControl_c::getSimpleTex();
|
||||
cXyz pos = current.pos;
|
||||
|
||||
dComIfGd_setSimpleShadow(&pos, mChkObj.GetGroundH(), shadow_size, mChkObj.m_gnd, 0,
|
||||
|
||||
@@ -366,7 +366,7 @@ JKRHeap* daPy_anmHeap_c::setAnimeHeap() {
|
||||
#include "assets/l_sightDL__d_a_player.h"
|
||||
|
||||
void daPy_sightPacket_c::draw() {
|
||||
GXTexObj texObj;
|
||||
TGXTexObj texObj;
|
||||
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
|
||||
@@ -1017,6 +1017,10 @@ void dCamera_c::debugDrawInit() {
|
||||
}
|
||||
|
||||
bool dCamera_c::Run() {
|
||||
#if TARGET_PC
|
||||
ResetView();
|
||||
#endif
|
||||
|
||||
daAlink_c* link = daAlink_getAlinkActorClass();
|
||||
daMidna_c* midna = daPy_py_c::getMidnaActor();
|
||||
mMidnaRidingAndVisible = link->checkMidnaRide() && !midna->checkNoDraw();
|
||||
|
||||
@@ -1366,7 +1366,7 @@ s8 dComIfGp_getReverb(int i_roomNo) {
|
||||
}
|
||||
|
||||
int dComIfGd_setSimpleShadow(cXyz* i_pos, f32 param_1, f32 param_2, cBgS_PolyInfo& param_3,
|
||||
s16 i_angle, f32 param_5, GXTexObj* i_tex) {
|
||||
s16 i_angle, f32 param_5, TGXTexObj* i_tex) {
|
||||
if (param_3.ChkSetInfo() && -G_CM3D_F_INF != param_1) {
|
||||
cM3dGPla plane;
|
||||
dComIfG_Bgsp().GetTriPla(param_3, &plane);
|
||||
@@ -2256,7 +2256,7 @@ void dComIfGp_addSelectItemNum(int i_selItemIdx, s16 i_num) {
|
||||
|
||||
int dComIfGd_setShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3, f32 param_4,
|
||||
f32 param_5, f32 param_6, f32 param_7, cBgS_PolyInfo& param_8,
|
||||
dKy_tevstr_c* param_9, s16 param_10, f32 param_11, GXTexObj* param_12) {
|
||||
dKy_tevstr_c* param_9, s16 param_10, f32 param_11, TGXTexObj* param_12) {
|
||||
if (param_7 <= -G_CM3D_F_INF) {
|
||||
return 0;
|
||||
} else {
|
||||
|
||||
+1
-2
@@ -22,7 +22,7 @@ void jstudio_tAdaptor_message::adaptor_do_MESSAGE(JStudio::data::TEOperationData
|
||||
case JStudio::data::UNK_0x19: {
|
||||
JUT_ASSERT(107, pContent!=NULL);
|
||||
JUT_ASSERT(108, uSize==4);
|
||||
u32 content = *(u32*)pContent;
|
||||
u32 content = *(BE(u32)*)pContent;
|
||||
dMsgObject_setDemoMessage(content);
|
||||
break;
|
||||
}
|
||||
@@ -215,7 +215,6 @@ int dDemo_actor_c::getDemoIDData(int* o_arg0, int* o_arg1, int* o_arg2, u16* o_r
|
||||
}
|
||||
|
||||
u32 var_r31 = *it;
|
||||
be_swap(var_r31);
|
||||
*o_arg0 = var_r31 >> 0x1E;
|
||||
*o_arg1 = (var_r31 >> 0x18) & 0xF;
|
||||
*o_arg2 = (var_r31 >> 0x10) & 0xF;
|
||||
|
||||
+18
-19
@@ -11,10 +11,11 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_drawlist.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "dusk/logging.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
#include "dusk/logging.h"
|
||||
|
||||
class dDlst_2Dm_c {
|
||||
public:
|
||||
@@ -28,12 +29,12 @@ public:
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ GXColor field_0x14;
|
||||
/* 0x18 */ GXColor field_0x18;
|
||||
/* 0x1C */ GXTexObj field_0x1c;
|
||||
/* 0x1C */ TGXTexObj field_0x1c;
|
||||
/* 0x3C */ GXTlutObj field_0x3c;
|
||||
/* 0x48 */ s16 field_0x48;
|
||||
/* 0x4A */ s16 field_0x4a;
|
||||
/* 0x4C */ u8 field_0x4c;
|
||||
/* 0x50 */ GXTexObj field_0x50;
|
||||
/* 0x50 */ TGXTexObj field_0x50;
|
||||
/* 0x70 */ GXTlutObj field_0x70;
|
||||
/* 0x7C */ s16 field_0x7c;
|
||||
/* 0x7E */ s16 field_0x7e;
|
||||
@@ -87,7 +88,7 @@ class dDlst_2DMt_tex_c {
|
||||
public:
|
||||
u8 check() { return field_0x0; }
|
||||
int getCI() { return mCI; }
|
||||
GXTexObj* getTexObj() { return &mTexObj; }
|
||||
TGXTexObj* getTexObj() { return &mTexObj; }
|
||||
GXTlutObj* getTlutObj() { return &mTlutObj; }
|
||||
GXColor* getColor() { return &mColor; }
|
||||
f32 getS() { return mS; }
|
||||
@@ -97,7 +98,7 @@ public:
|
||||
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
/* 0x01 */ u8 mCI;
|
||||
/* 0x04 */ GXTexObj mTexObj;
|
||||
/* 0x04 */ TGXTexObj mTexObj;
|
||||
/* 0x24 */ GXTlutObj mTlutObj;
|
||||
/* 0x30 */ GXColor mColor;
|
||||
/* 0x34 */ f32 mS;
|
||||
@@ -266,7 +267,7 @@ void dDlst_2DT_c::draw() {
|
||||
u16 var3 = (field_0x1c + var11) / var5 * 32768.0f;
|
||||
u16 var4 = (field_0x20 + var12) / var6 * 32768.0f;
|
||||
|
||||
GXTexObj tex;
|
||||
TGXTexObj tex;
|
||||
GXInitTexObj(&tex, field_0x4, field_0xe, field_0x10, (GXTexFmt)field_0xc, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&tex, GX_LINEAR, GX_LINEAR, 0.0, 0.0, 0.0, 0, 0, GX_ANISO_1);
|
||||
GXLoadTexObj(&tex, GX_TEXMAP0);
|
||||
@@ -311,9 +312,6 @@ void dDlst_2DT_c::draw() {
|
||||
GXEnd();
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
dComIfGp_getCurrentGrafPort()->setup2D();
|
||||
#if TARGET_PC
|
||||
GXDestroyTexObj(&tex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void dDlst_2DT2_c::draw() {
|
||||
@@ -666,7 +664,7 @@ void dDlst_2DM_c::draw() {
|
||||
int r26 = field_0x34 * f3;
|
||||
s16 r25 = r27 + s16(field_0x1e * f4);
|
||||
s16 r24 = r26 + s16(field_0x20 * f3);
|
||||
GXTexObj tex[2];
|
||||
TGXTexObj tex[2];
|
||||
void** stack_1c = &field_0x18;
|
||||
GXInitTexObj(&tex[0], field_0x18, field_0x1e, field_0x20, GXTexFmt(field_0x1c), GX_CLAMP, GX_CLAMP, 0);
|
||||
GXInitTexObjLOD(&tex[0], GX_LINEAR, GX_LINEAR, 0.0, 0.0, 0.0, 0, 0, GX_ANISO_1);
|
||||
@@ -715,10 +713,6 @@ void dDlst_2DM_c::draw() {
|
||||
GXTexCoord2s16(r27, r24);
|
||||
GXEnd();
|
||||
dComIfGp_getCurrentGrafPort()->setup2D();
|
||||
#if TARGET_PC
|
||||
GXDestroyTexObj(&tex[0]);
|
||||
GXDestroyTexObj(&tex[1]);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -733,7 +727,7 @@ void dDlst_2Dm_c::draw() {
|
||||
int r26 = field_0x7e * f30;
|
||||
s16 r25 = r27 + s16(f31 * GXGetTexObjWidth(&field_0x1c));
|
||||
s16 r24 = r26 + s16(f30 * GXGetTexObjHeight(&field_0x1c));
|
||||
GXTexObj* stack_18 = &field_0x1c;
|
||||
TGXTexObj* stack_18 = &field_0x1c;
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBA4, 8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX1, GX_CLR_RGBA, GX_RGBA4, 8);
|
||||
@@ -1347,7 +1341,7 @@ void dDlst_shadowSimple_c::draw() {
|
||||
}
|
||||
|
||||
void dDlst_shadowSimple_c::set(cXyz* param_0, f32 param_1, f32 param_2, cXyz* param_3,
|
||||
s16 param_4, f32 param_5, GXTexObj* param_6) {
|
||||
s16 param_4, f32 param_5, TGXTexObj* param_6) {
|
||||
if (param_5 < 0.0f) {
|
||||
mAlpha = param_5 * -255.0f;
|
||||
param_5 = 1.0f;
|
||||
@@ -1424,6 +1418,11 @@ void dDlst_shadowControl_c::reset() {
|
||||
mSimpleNum = 0;
|
||||
mRealNum = 0;
|
||||
field_0x4 = NULL;
|
||||
|
||||
#ifdef TARGET_PC
|
||||
field_0x15eb0[0].reset();
|
||||
field_0x15eb0[1].reset();
|
||||
#endif
|
||||
}
|
||||
|
||||
void dDlst_shadowControl_c::imageDraw(Mtx param_0) {
|
||||
@@ -1529,7 +1528,7 @@ void dDlst_shadowControl_c::draw(Mtx param_0) {
|
||||
for (int i2 = 0, i3 = 0; real != NULL; real = real->getZsortNext()) {
|
||||
if (real->isUse()) {
|
||||
if (i2 == 0) {
|
||||
GXTexObj* obj = &field_0x15eb0[i3];
|
||||
TGXTexObj* obj = &field_0x15eb0[i3];
|
||||
i3++;
|
||||
|
||||
GXLoadTexObj(obj, GX_TEXMAP0);
|
||||
@@ -1671,7 +1670,7 @@ bool dDlst_shadowControl_c::addReal(u32 i_key, J3DModel* param_1) {
|
||||
}
|
||||
|
||||
int dDlst_shadowControl_c::setSimple(cXyz* param_0, f32 param_1, f32 param_2, cXyz* param_3,
|
||||
s16 param_4, f32 param_5, GXTexObj* param_6) {
|
||||
s16 param_4, f32 param_5, TGXTexObj* param_6) {
|
||||
if (param_3 == NULL || mSimpleNum >= 128) {
|
||||
return 0;
|
||||
}
|
||||
@@ -1681,7 +1680,7 @@ int dDlst_shadowControl_c::setSimple(cXyz* param_0, f32 param_1, f32 param_2, cX
|
||||
return 1;
|
||||
}
|
||||
|
||||
GXTexObj dDlst_shadowControl_c::mSimpleTexObj;
|
||||
TGXTexObj dDlst_shadowControl_c::mSimpleTexObj;
|
||||
|
||||
void dDlst_shadowControl_c::setSimpleTex(ResTIMG const* i_timg) {
|
||||
mDoLib_setResTimgObj(i_timg, &mSimpleTexObj, 0, NULL);
|
||||
|
||||
@@ -251,6 +251,9 @@ static void drawCapture(u8 alpha) {
|
||||
GXSetAlphaUpdate(GX_FALSE);
|
||||
j3dSys.drawInit();
|
||||
|
||||
#ifdef TARGET_PC
|
||||
mDoGph_gInf_c::getFrameBufferTexObj()->reset();
|
||||
#endif
|
||||
GXInitTexObj(mDoGph_gInf_c::getFrameBufferTexObj(), mDoGph_gInf_c::getFrameBufferTex(), FB_WIDTH / 2, FB_HEIGHT / 2, (GXTexFmt)mDoGph_gInf_c::getFrameBufferTimg()->format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(mDoGph_gInf_c::getFrameBufferTexObj(), GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
GXLoadTexObj(mDoGph_gInf_c::getFrameBufferTexObj(), GX_TEXMAP0);
|
||||
|
||||
+16
-6
@@ -1537,6 +1537,12 @@ int dEvDtBase_c::init(char* i_data, int i_roomNo) {
|
||||
|
||||
setHeaderP((event_binary_data_header*)i_data);
|
||||
|
||||
#if TARGET_PC
|
||||
bool needSwap = mHeaderP->unk[0] == 0;
|
||||
JUT_ASSERT(1234, mHeaderP->unk[0] == 0 || mHeaderP->unk[0] == 1);
|
||||
mHeaderP->unk[0] = 1;
|
||||
#endif
|
||||
|
||||
if (getEventNum() > 0) {
|
||||
setEventP((dEvDtEvent_c*)(i_data + getEventTop()));
|
||||
}
|
||||
@@ -1556,9 +1562,11 @@ int dEvDtBase_c::init(char* i_data, int i_roomNo) {
|
||||
if (getFDataNum() > 0) {
|
||||
#if TARGET_PC
|
||||
auto data = (f32*)(i_data + getFDataTop());
|
||||
int num = getFDataNum();
|
||||
for (int i = 0; i < num; i++)
|
||||
be_swap(data[i]);
|
||||
if (needSwap) {
|
||||
int num = getFDataNum();
|
||||
for (int i = 0; i < num; i++)
|
||||
be_swap(data[i]);
|
||||
}
|
||||
setFDataP(data);
|
||||
#else
|
||||
setFDataP((f32*)(i_data + getFDataTop()));
|
||||
@@ -1569,9 +1577,11 @@ int dEvDtBase_c::init(char* i_data, int i_roomNo) {
|
||||
#if TARGET_PC
|
||||
// endian swap here
|
||||
auto data = (int*)(i_data + getIDataTop());
|
||||
int num = getIDataNum();
|
||||
for (int i = 0; i < num; i++)
|
||||
be_swap(data[i]);
|
||||
if (needSwap) {
|
||||
int num = getIDataNum();
|
||||
for (int i = 0; i < num; i++)
|
||||
be_swap(data[i]);
|
||||
}
|
||||
setIDataP(data);
|
||||
#else
|
||||
setIDataP((int*)(i_data + getIDataTop()));
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/gx_helper.h"
|
||||
|
||||
class dGov_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
dGov_HIO_c();
|
||||
@@ -32,7 +34,7 @@ public:
|
||||
static dGov_HIO_c l_HIO;
|
||||
|
||||
void dDlst_Gameover_CAPTURE_c::draw() {
|
||||
GXTexObj tex_obj;
|
||||
TGXTexObj tex_obj;
|
||||
Mtx44 m;
|
||||
|
||||
GXSetTexCopySrc(0, 0, FB_WIDTH, FB_HEIGHT);
|
||||
|
||||
@@ -198,6 +198,9 @@ void dHomeButton_c::drawCapture(u8 param_0, void (*param_1)(J2DOrthoGraph&, void
|
||||
sp30.setPort();
|
||||
|
||||
dComIfGp_setCurrentGrafPort(&sp30);
|
||||
#ifdef TARGET_PC
|
||||
mDoGph_gInf_c::m_fullFrameBufferTexObj.reset();
|
||||
#endif
|
||||
mDoLib_setResTimgObj(mDoGph_gInf_c::m_fullFrameBufferTimg,
|
||||
&mDoGph_gInf_c::m_fullFrameBufferTexObj, 0, NULL);
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ int dkWmark_c::m_nowID;
|
||||
int dkWmark_c::create() {
|
||||
static cXyz wolfFootScale(1.1f, 1.0f, 0.6f);
|
||||
|
||||
JKR_NEW_ARGS (this) dkWmark_c();
|
||||
new (this) dkWmark_c;
|
||||
|
||||
field_0x48a = this->parameters >> 0x10;
|
||||
this->parameters &= 0xFFFF;
|
||||
|
||||
+34
-15
@@ -71,7 +71,10 @@ void dKy_set_eyevect_calc2(camera_class* i_camera, Vec* o_out, f32 param_2, f32
|
||||
}
|
||||
}
|
||||
|
||||
static void dKyr_set_btitex_common(GXTexObj* i_obj, ResTIMG* i_img, GXTexMapID i_mapID) {
|
||||
static void dKyr_set_btitex_common(TGXTexObj* i_obj, ResTIMG* i_img, GXTexMapID i_mapID) {
|
||||
#ifdef TARGET_PC
|
||||
i_obj->reset();
|
||||
#endif
|
||||
GXInitTexObj(i_obj, (&i_img->format + i_img->imageOffset), i_img->width, i_img->height,
|
||||
(GXTexFmt)i_img->format, (GXTexWrapMode)i_img->wrapS, (GXTexWrapMode)i_img->wrapT,
|
||||
(GXBool)(i_img->mipmapCount > 1));
|
||||
@@ -84,7 +87,7 @@ static void dKyr_set_btitex_common(GXTexObj* i_obj, ResTIMG* i_img, GXTexMapID i
|
||||
GXLoadTexObj(i_obj, i_mapID);
|
||||
}
|
||||
|
||||
static void dKyr_set_btitex(GXTexObj* i_obj, ResTIMG* i_img) {
|
||||
static void dKyr_set_btitex(TGXTexObj* i_obj, ResTIMG* i_img) {
|
||||
dKyr_set_btitex_common(i_obj, i_img, GX_TEXMAP0);
|
||||
}
|
||||
|
||||
@@ -2116,7 +2119,7 @@ static void dKyr_draw_rev_moon(Mtx drawMtx, u8** tex) {
|
||||
return;
|
||||
}
|
||||
|
||||
GXTexObj texobj;
|
||||
TGXTexObj texobj;
|
||||
dKyr_set_btitex_common(&texobj, (ResTIMG*)tex[0], GX_TEXMAP0);
|
||||
dKyr_set_btitex_common(&texobj, (ResTIMG*)tex[1], GX_TEXMAP1);
|
||||
dKyr_set_btitex_common(&texobj, (ResTIMG*)tex[texidx + 2], GX_TEXMAP2);
|
||||
@@ -2464,7 +2467,7 @@ void dKyr_drawSun(Mtx drawMtx, cXyz* ppos, GXColor& unused, u8** tex) {
|
||||
return;
|
||||
}
|
||||
|
||||
GXTexObj texobj;
|
||||
TGXTexObj texobj;
|
||||
dKyr_set_btitex_common(&texobj, (ResTIMG*)tex[0], GX_TEXMAP0);
|
||||
dKyr_set_btitex_common(&texobj, (ResTIMG*)tex[1], GX_TEXMAP1);
|
||||
dKyr_set_btitex_common(&texobj, (ResTIMG*)tex[texidx + 2], GX_TEXMAP2);
|
||||
@@ -2724,7 +2727,7 @@ void dKyr_drawLenzflare(Mtx drawMtx, cXyz* ppos, GXColor& param_2, u8** tex) {
|
||||
|
||||
j3dSys.reinitGX();
|
||||
|
||||
GXTexObj texobj;
|
||||
TGXTexObj texobj;
|
||||
dKyr_set_btitex(&texobj, (ResTIMG*)tex[0]);
|
||||
GXSetNumChans(0);
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
@@ -3125,7 +3128,7 @@ void dKyr_drawRain(Mtx drawMtx, u8** tex) {
|
||||
return;
|
||||
}
|
||||
|
||||
GXTexObj texobj;
|
||||
TGXTexObj texobj;
|
||||
dKyr_set_btitex(&texobj, (ResTIMG*)tex[0]);
|
||||
GXSetNumChans(0);
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
@@ -3290,7 +3293,7 @@ void dKyr_drawSibuki(Mtx drawMtx, u8** tex) {
|
||||
color.b = 0xC8;
|
||||
color.a = rain_packet->mSibukiAlpha * alphaFade;
|
||||
|
||||
GXTexObj texobj;
|
||||
TGXTexObj texobj;
|
||||
dKyr_set_btitex(&texobj, (ResTIMG*)tex[1]);
|
||||
GXSetNumChans(0);
|
||||
GXSetTevColor(GX_TEVREG0, color);
|
||||
@@ -3378,7 +3381,7 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
Mtx camMtx;
|
||||
Mtx rotMtx;
|
||||
cXyz pos[4];
|
||||
GXTexObj spDC;
|
||||
TGXTexObj spDC;
|
||||
cXyz spD0;
|
||||
Vec spC4;
|
||||
Vec spB8;
|
||||
@@ -3795,7 +3798,7 @@ void dKyr_drawSnow(Mtx drawMtx, u8** tex) {
|
||||
}
|
||||
|
||||
if (tex[0] != NULL) {
|
||||
GXTexObj spA0;
|
||||
TGXTexObj spA0;
|
||||
dKyr_set_btitex(&spA0, (ResTIMG*)tex[0]);
|
||||
GXSetNumChans(0);
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
@@ -4334,7 +4337,7 @@ void drawCloudShadow(Mtx drawMtx, u8** tex) {
|
||||
|
||||
GXSetClipMode(GX_CLIP_DISABLE);
|
||||
|
||||
GXTexObj texobj, fb_texobj;
|
||||
TGXTexObj texobj, fb_texobj;
|
||||
if (g_env_light.mMoyaMode < 50) {
|
||||
dKy_ParticleColor_get_bg(&camera->view.lookat.eye, NULL, &sp48, &sp44, &sp40, &sp3C, 0.0f);
|
||||
f32 temp_f30 = 0.4f;
|
||||
@@ -4539,7 +4542,7 @@ void drawVrkumo(Mtx drawMtx, GXColor& color, u8** tex) {
|
||||
Mtx camMtx;
|
||||
Mtx rotMtx;
|
||||
|
||||
GXTexObj texobj;
|
||||
TGXTexObj texobj;
|
||||
cXyz proj;
|
||||
|
||||
f32 rot;
|
||||
@@ -5370,7 +5373,7 @@ void dKyr_odour_draw(Mtx drawMtx, u8** tex) {
|
||||
break;
|
||||
}
|
||||
|
||||
GXTexObj texobj, fb_texobj;
|
||||
TGXTexObj texobj, fb_texobj;
|
||||
dKyr_set_btitex_common(&texobj, (ResTIMG*)tex[0], GX_TEXMAP1);
|
||||
|
||||
ResTIMG* fb_timg = mDoGph_gInf_c::getFrameBufferTimg();
|
||||
@@ -5764,7 +5767,7 @@ void dKyr_mud_draw(Mtx drawMtx, u8** tex) {
|
||||
|
||||
if (g_env_light.camera_water_in_status == 0) {
|
||||
for (int i = 0; i < 1; i++) {
|
||||
GXTexObj texobj;
|
||||
TGXTexObj texobj;
|
||||
dKyr_set_btitex(&texobj, (ResTIMG*)tex[0]);
|
||||
|
||||
GXSetNumChans(0);
|
||||
@@ -5924,7 +5927,7 @@ static void dKyr_evil_draw2(Mtx drawMtx, u8** tex) {
|
||||
color_reg0.b = 0x87;
|
||||
color_reg0.a = 0xFF;
|
||||
|
||||
GXTexObj texobj;
|
||||
TGXTexObj texobj;
|
||||
dKyr_set_btitex(&texobj, (ResTIMG*)tex[1]);
|
||||
|
||||
rot += 0.7f;
|
||||
@@ -5980,11 +5983,19 @@ static void dKyr_evil_draw2(Mtx drawMtx, u8** tex) {
|
||||
|
||||
mDoLib_project(&sp7C, &proj);
|
||||
|
||||
#if TARGET_PC
|
||||
if (!(proj.x > -sp34.x) || !(proj.x < (dComIfGd_getViewport()->width + sp34.x)) ||
|
||||
!(proj.y > -sp34.y) || !(proj.y < (dComIfGd_getViewport()->height + sp34.z)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
if (!(proj.x > -sp34.x) || !(proj.x < (FB_WIDTH + sp34.x)) ||
|
||||
!(proj.y > -sp34.y) || !(proj.y < (458.0f + sp34.z)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
f32 sp40;
|
||||
@@ -6147,7 +6158,7 @@ void dKyr_evil_draw(Mtx drawMtx, u8** tex) {
|
||||
color_reg1.b = 10;
|
||||
color_reg1.a = 255;
|
||||
|
||||
GXTexObj texobj;
|
||||
TGXTexObj texobj;
|
||||
dKyr_set_btitex(&texobj, (ResTIMG*)tex[0]);
|
||||
|
||||
rot += 1.0f;
|
||||
@@ -6205,11 +6216,19 @@ void dKyr_evil_draw(Mtx drawMtx, u8** tex) {
|
||||
|
||||
mDoLib_project(&spA4, &proj);
|
||||
|
||||
#if TARGET_PC
|
||||
if (!(proj.x > -sp44.x) || !(proj.x < (dComIfGd_getViewport()->width + sp44.x)) ||
|
||||
!(proj.y > -sp44.y) || !(proj.y < (dComIfGd_getViewport()->height + sp44.z)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
if (!(proj.x > -sp44.x) || !(proj.x < (FB_WIDTH + sp44.x)) ||
|
||||
!(proj.y > -sp44.y) || !(proj.y < (458.0f + sp44.z)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
f32 sp5C;
|
||||
|
||||
@@ -341,6 +341,7 @@ inline u8 twoValueLineInterpolation(u8 param_0, u8 param_1, f32 param_2) {
|
||||
}
|
||||
|
||||
void renderingAmap_c::draw() {
|
||||
#if REQUIRES_GX_LINES
|
||||
f32 tmp = ((f32)(g_Counter.mCounter0 % dMap_HIO_prm_res_dst_s::m_res->field_0x1aa) /
|
||||
(f32)dMap_HIO_prm_res_dst_s::m_res->field_0x1aa);
|
||||
tmp = tmp;
|
||||
@@ -376,6 +377,7 @@ void renderingAmap_c::draw() {
|
||||
setAmapPaletteColor(0x2E, temp_r31, temp_r30, temp_r29, temp_r28);
|
||||
|
||||
renderingDAmap_c::draw();
|
||||
#endif
|
||||
}
|
||||
|
||||
int renderingAmap_c::getDispType() const {
|
||||
|
||||
@@ -20,7 +20,7 @@ void dMpath_n::dTexObjAggregate_c::create() {
|
||||
};
|
||||
|
||||
for (int lp1 = 0; lp1 < 7; lp1++) {
|
||||
mp_texObj[lp1] = JKR_NEW GXTexObj();
|
||||
mp_texObj[lp1] = JKR_NEW TGXTexObj();
|
||||
JUT_ASSERT(70, mp_texObj[lp1] != NULL);
|
||||
ResTIMG* image = (ResTIMG*)dComIfG_getObjectRes("Always", data[lp1]);
|
||||
JUT_ASSERT(72, image != NULL);
|
||||
@@ -346,11 +346,13 @@ void dRenderingMap_c::makeResTIMG(ResTIMG* p_image, u16 width, u16 height, u8* p
|
||||
void dRenderingMap_c::renderingMap() {
|
||||
preRenderingMap();
|
||||
if (isDrawPath()) {
|
||||
#if REQUIRES_GX_LINES
|
||||
preDrawPath();
|
||||
beforeDrawPath();
|
||||
drawPath();
|
||||
afterDrawPath();
|
||||
postDrawPath();
|
||||
#endif
|
||||
}
|
||||
postRenderingMap();
|
||||
}
|
||||
@@ -471,6 +473,7 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li
|
||||
GXSetTevColor(GX_TEVREG1, lineColor);
|
||||
|
||||
for (int i = 0; i < data_num; i++) {
|
||||
#if REQUIRES_GX_LINES
|
||||
#ifndef HYRULE_FIELD_SPEEDHACK
|
||||
if (i < data_num - 1) {
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_C0);
|
||||
@@ -490,6 +493,7 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_TEXA);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
#endif
|
||||
#endif
|
||||
GXBegin(GX_POINTS, GX_VTXFMT0, 1);
|
||||
GXPosition1x16(data_p[0]);
|
||||
|
||||
@@ -2553,7 +2553,12 @@ u8 dMenu_Collect3D_c::getMaskMdlVisible() {
|
||||
f32 dMenu_Collect3D_c::mViewOffsetY = -100.0f;
|
||||
|
||||
void dMenu_Collect3D_c::setupItem3D(Mtx param_0) {
|
||||
#if TARGET_PC
|
||||
f32 scaleFactor = mDoGph_gInf_c::getWidth() / FB_WIDTH; // TODO: get display pixel density from aurora
|
||||
GXSetViewport(0.0f, mViewOffsetY * scaleFactor, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight(), 0.0f, 1.0f);
|
||||
#else
|
||||
GXSetViewport(0.0f, mViewOffsetY, FB_WIDTH, FB_HEIGHT, 0.0f, 1.0f);
|
||||
#endif
|
||||
mViewOffsetY = -100.0f;
|
||||
Mtx44 projection;
|
||||
C_MTXPerspective(projection, 45.0f, mDoGph_gInf_c::getAspect(), 1.0f, 100000.0f);
|
||||
|
||||
@@ -1262,8 +1262,10 @@ void dMenu_Ring_c::drawItem() {
|
||||
(g_ringHIO.mItemAlphaMin + fVar16 * (g_ringHIO.mItemAlphaMax - g_ringHIO.mItemAlphaMin));
|
||||
for (int i = 0; i < mItemsTotal; i++) {
|
||||
if (i != mCurrentSlot || (mStatus != STATUS_WAIT && mStatus != STATUS_EXPLAIN && mStatus != STATUS_EXPLAIN_FORCE)) {
|
||||
#if REQUIRES_GX_LINES
|
||||
J2DDrawFrame(mItemSlotPosX[i] - 24.0f + mCenterPosX, mItemSlotPosY[i] - 24.0f + mCenterPosY,
|
||||
48.0f, 48.0f, g_ringHIO.mItemFrame[g_ringHIO.UNSELECT_FRAME], 6);
|
||||
#endif
|
||||
f32 fVar17 = 1.0f;
|
||||
if (i != mCurrentSlot) {
|
||||
fVar17 = ringAlpha / 255.0f;
|
||||
@@ -1306,8 +1308,10 @@ void dMenu_Ring_c::drawItem() {
|
||||
void dMenu_Ring_c::drawItem2() {
|
||||
s32 idx = mCurrentSlot;
|
||||
if (mStatus == STATUS_WAIT || mStatus == STATUS_EXPLAIN || mStatus == STATUS_EXPLAIN_FORCE) {
|
||||
#if REQUIRES_GX_LINES
|
||||
J2DDrawFrame(mItemSlotPosX[idx] - 24.0f + mCenterPosX, mItemSlotPosY[idx] - 24.0f + mCenterPosY,
|
||||
48.0f, 48.0f, g_ringHIO.mItemFrame[g_ringHIO.SELECT_FRAME], 6);
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (mpItemTex[idx][i] != NULL) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
GXCopyTex(mDoGph_gInf_c::getFrameBufferTex(), GX_FALSE);
|
||||
GXPixModeSync();
|
||||
} else {
|
||||
GXTexObj tex;
|
||||
TGXTexObj tex;
|
||||
GXInitTexObj(&tex, mDoGph_gInf_c::getFrameBufferTex(), FB_WIDTH / 2, FB_HEIGHT / 2,
|
||||
(GXTexFmt)mDoGph_gInf_c::getFrameBufferTimg()->format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&tex, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
|
||||
+3
-1
@@ -26,12 +26,14 @@
|
||||
|
||||
#include "dusk/memory.h"
|
||||
|
||||
#include "dusk/memory.h"
|
||||
|
||||
int dMeter2_c::_create() {
|
||||
stage_stag_info_class* stag_info = dComIfGp_getStageStagInfo();
|
||||
if (dStage_stagInfo_GetUpButton(stag_info) == 1) {
|
||||
mpHeap = fopMsgM_createExpHeap(HEAP_SIZE(0x5A400, 0xA0000), NULL);
|
||||
} else {
|
||||
mpHeap = fopMsgM_createExpHeap(HEAP_SIZE(0x60800, 0xA0000), NULL);
|
||||
mpHeap = fopMsgM_createExpHeap(HEAP_SIZE(0x60800, 0xC1000), NULL);
|
||||
}
|
||||
JKRHEAP_NAME(mpHeap, "dMeter2_c");
|
||||
|
||||
|
||||
+21
-21
@@ -1051,7 +1051,7 @@ bool jmessage_tMeasureProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_siz
|
||||
case MSGTAG_COLOR:
|
||||
return true;
|
||||
case MSGTAG_SCALE: {
|
||||
u16 scale = *(u16*)i_data;
|
||||
u16 scale = *(BE(u16)*)i_data;
|
||||
pReference->setLineScale(mTotalLineCnt, scale);
|
||||
do_scale(scale / 100.0f);
|
||||
return true;
|
||||
@@ -1102,13 +1102,13 @@ bool jmessage_tMeasureProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_siz
|
||||
}
|
||||
case MSGTAG_UNK_3:
|
||||
case MSGTAG_AUTOBOX:
|
||||
if (*(u16*)i_data != 0) {
|
||||
if (*(BE(u16)*)i_data != 0) {
|
||||
dMsgObject_c* objectPtr = pReference->mpObjectPtr; // fakematch, should be getObjectPtr
|
||||
objectPtr->onAutoMessageFlag();
|
||||
}
|
||||
return true;
|
||||
case MSGTAG_DEMOBOX:
|
||||
pReference->setDemoFrame(*(u32*)i_data);
|
||||
pReference->setDemoFrame(*(BE(u32)*)i_data);
|
||||
return true;
|
||||
case MSGTAG_PLAYER_NAME: {
|
||||
if (field_0x49 != 0) {
|
||||
@@ -1414,7 +1414,7 @@ bool jmessage_tMeasureProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_siz
|
||||
dMsgUnit_setTag(1, (s32)dComIfGp_getMessageCountNumber(), buffer);
|
||||
break;
|
||||
case MSGTAG_FUNDRAISE_REMAIN: {
|
||||
s16 fund_raise_val = *(u32*)i_data;
|
||||
s16 fund_raise_val = *(BE(u32)*)i_data;
|
||||
dMsgObject_c* objectPtr = pReference->getObjectPtr();
|
||||
objectPtr->setFundRaisingValue(fund_raise_val);
|
||||
|
||||
@@ -1555,7 +1555,7 @@ bool jmessage_tMeasureProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_siz
|
||||
do_space(i_tag);
|
||||
return true;
|
||||
case MSGTAG_WII_MSGID_OVERRIDE:
|
||||
pReference->setRevoMessageID(*(u32*)i_data);
|
||||
pReference->setRevoMessageID(*(BE(u32)*)i_data);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -2169,7 +2169,7 @@ bool jmessage_tSequenceProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_si
|
||||
pReference->setNowColorType(*(u8*)i_data & 0xFF);
|
||||
return true;
|
||||
case MSGTAG_SCALE:
|
||||
pReference->setNowTagScale(*(u16*)i_data & 0xFFFF);
|
||||
pReference->setNowTagScale(*(BE(u16)*)i_data & 0xFFFF);
|
||||
return true;
|
||||
case MSGTAG_RUBY:
|
||||
case 0xFFFF02:
|
||||
@@ -2220,7 +2220,7 @@ bool jmessage_tSequenceProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_si
|
||||
return true;
|
||||
case MSGTAG_UNK_3:
|
||||
case MSGTAG_AUTOBOX:
|
||||
pReference->setSendTimer(*(u16*)i_data);
|
||||
pReference->setSendTimer(*(BE(u16)*)i_data);
|
||||
if (pReference->getSendTimer() == 0) {
|
||||
pReference->setSendFlag(3);
|
||||
} else {
|
||||
@@ -2228,24 +2228,24 @@ bool jmessage_tSequenceProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_si
|
||||
}
|
||||
return true;
|
||||
case MSGTAG_BOXATMOST:
|
||||
pReference->setSendTimer(*(u16*)i_data);
|
||||
pReference->setSendTimer(*(BE(u16)*)i_data);
|
||||
pReference->setSendFlag(2);
|
||||
return true;
|
||||
case MSGTAG_BOXATLEAST:
|
||||
dMeter2Info_setMsgKeyWaitTimer(*(u16*)i_data);
|
||||
pReference->setSendTimer(*(u16*)i_data);
|
||||
dMeter2Info_setMsgKeyWaitTimer(*(BE(u16)*)i_data);
|
||||
pReference->setSendTimer(*(BE(u16)*)i_data);
|
||||
pReference->setSendFlag(6);
|
||||
return true;
|
||||
case MSGTAG_DEMOBOX:
|
||||
pReference->setDemoFrame(*(u32*)i_data);
|
||||
pReference->setDemoFrame(*(BE(u32)*)i_data);
|
||||
pReference->setSendFlag(4);
|
||||
return true;
|
||||
case MSGTAG_UNK_6:
|
||||
field_0xa8 = *(u16*)i_data;
|
||||
field_0xa8 = *(BE(u16)*)i_data;
|
||||
field_0xa4 = field_0xa8;
|
||||
return true;
|
||||
case MSGTAG_PAUSE:
|
||||
field_0xa4 = *(u16*)i_data;
|
||||
field_0xa4 = *(BE(u16)*)i_data;
|
||||
mMouthCheck = 0;
|
||||
return true;
|
||||
case MSGTAG_SELECT_2WAY:
|
||||
@@ -2361,7 +2361,7 @@ bool jmessage_tSequenceProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_si
|
||||
pReference->resetInputFigure();
|
||||
pReference->setSendFlag(5);
|
||||
|
||||
if (*(u32*)i_data == 1) {
|
||||
if (*(BE(u32)*)i_data == 1) {
|
||||
dComIfGs_onTmpBit(dSv_event_tmp_flag_c::tempBitLabels[80]);
|
||||
}
|
||||
return true;
|
||||
@@ -2903,7 +2903,7 @@ bool jmessage_tRenderingProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_s
|
||||
do_color(*(u8*)i_data & 0xFF);
|
||||
return 1;
|
||||
case MSGTAG_SCALE:
|
||||
field_0x13c = *(u16*)i_data & 0xFFFF;
|
||||
field_0x13c = *(BE(u16)*)i_data & 0xFFFF;
|
||||
do_scale(field_0x13c / 100.0f);
|
||||
return 1;
|
||||
case MSGTAG_RUBY:
|
||||
@@ -2937,7 +2937,7 @@ bool jmessage_tRenderingProcessor::do_tag(u32 i_tag, void const* i_data, u32 i_s
|
||||
stack_pushCurrent(pReference->getObjectPtr()->getLetterName());
|
||||
return 1;
|
||||
case MSGTAG_LINE_DOWN:
|
||||
do_linedown(*(u16*)i_data);
|
||||
do_linedown(*(BE(u16)*)i_data);
|
||||
return 1;
|
||||
case MSGTAG_CURRENT_LETTER_PAGE:
|
||||
case MSGTAG_MAX_LETTER_PAGE:
|
||||
@@ -4178,7 +4178,7 @@ bool jmessage_string_tMeasureProcessor::do_tag(u32 i_tag, void const* i_data, u3
|
||||
dMsgUnit_setTag(1, (s32)dComIfGp_getMessageCountNumber(), buffer);
|
||||
break;
|
||||
case MSGTAG_FUNDRAISE_REMAIN: {
|
||||
s16 uVar9 = *(int*)i_data;
|
||||
s16 uVar9 = *(BE(int)*)i_data;
|
||||
dMsgObject_getMsgObjectClass()->setFundRaisingValue(uVar9);
|
||||
dMsgUnit_setTag(10, uVar9 - dMsgObject_getFundRaising(), buffer);
|
||||
break;
|
||||
@@ -4384,7 +4384,7 @@ bool jmessage_string_tSequenceProcessor::do_tag(u32 i_tag, void const* i_data, u
|
||||
case MSGTAG_GROUP(0):
|
||||
switch(i_tag) {
|
||||
case MSGTAG_BOXATLEAST:
|
||||
dMeter2Info_setMsgKeyWaitTimer(*(u16*)i_data);
|
||||
dMeter2Info_setMsgKeyWaitTimer(*(BE(u16)*)i_data);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -4537,7 +4537,7 @@ bool jmessage_string_tRenderingProcessor::do_tag(u32 i_tag, void const* i_data,
|
||||
do_color(*(u8*)i_data & 0xFF);
|
||||
break;
|
||||
case MSGTAG_SCALE:
|
||||
do_scale(*(u16*)i_data / 100.0f);
|
||||
do_scale(*(BE(u16)*)i_data / 100.0f);
|
||||
break;
|
||||
case MSGTAG_RUBY:
|
||||
case 0xFFFF02:
|
||||
@@ -4572,7 +4572,7 @@ bool jmessage_string_tRenderingProcessor::do_tag(u32 i_tag, void const* i_data,
|
||||
push_word(dMsgObject_getMsgObjectClass()->getLetterName());
|
||||
break;
|
||||
case MSGTAG_LINE_DOWN:
|
||||
do_linedown(*(u16*)i_data);
|
||||
do_linedown(*(BE(u16)*)i_data);
|
||||
break;
|
||||
case MSGTAG_CURRENT_LETTER_PAGE: {
|
||||
char buffer[4];
|
||||
@@ -4788,7 +4788,7 @@ bool jmessage_string_tRenderingProcessor::do_tag(u32 i_tag, void const* i_data,
|
||||
dMsgUnit_setTag(1, (s32)dComIfGp_getMessageCountNumber(), buffer);
|
||||
break;
|
||||
case MSGTAG_FUNDRAISE_REMAIN: {
|
||||
s16 uVar9 = *(int*)i_data;
|
||||
s16 uVar9 = *(BE(int)*)i_data;
|
||||
dMsgObject_getMsgObjectClass()->setFundRaisingValue(uVar9);
|
||||
dMsgUnit_setTag(10, uVar9 - dMsgObject_getFundRaising(), buffer);
|
||||
break;
|
||||
|
||||
+16
-16
@@ -49,8 +49,8 @@ void dMsgFlow_c::init(fopAc_ac_c* i_partner, int i_flowID, int param_2, fopAc_ac
|
||||
|
||||
labelInfoTBL = mLabelInfo_p + 0x10;
|
||||
mFlowNodeTBL = (mesg_flow*)(mFlow_p + 0x10);
|
||||
mFlowIdxTBL = (u16*)(mFlowNodeTBL + (*(u16*)(mFlow_p + 8)));
|
||||
field_0x18 = mFlowIdxTBL + *(u16*)(mFlow_p + 8);
|
||||
mFlowIdxTBL = (BE(u16)*)(mFlowNodeTBL + (*(BE(u16)*)(mFlow_p + 8)));
|
||||
field_0x18 = mFlowIdxTBL + *(BE(u16)*)(mFlow_p + 8);
|
||||
|
||||
mFlow = prevFlowID;
|
||||
|
||||
@@ -322,8 +322,8 @@ void dMsgFlow_c::setInitValueGroupChange(int i_msgNo, fopAc_ac_c** i_talkPartner
|
||||
labelInfoTBL = mLabelInfo_p + 0x10;
|
||||
|
||||
mFlowNodeTBL = (mesg_flow*)(mFlow_p + 0x10);
|
||||
mFlowIdxTBL = (u16*)(mFlowNodeTBL + *(u16*)(mFlow_p + 8));
|
||||
field_0x18 = mFlowIdxTBL + *(u16*)(mFlow_p + 8);
|
||||
mFlowIdxTBL = (BE(u16)*)(mFlowNodeTBL + *(BE(u16)*)(mFlow_p + 8));
|
||||
field_0x18 = mFlowIdxTBL + *(BE(u16)*)(mFlow_p + 8);
|
||||
mFlow = var_r28;
|
||||
setNodeIndex(getInitNodeIndex(mFlow), i_talkPartners);
|
||||
}
|
||||
@@ -337,7 +337,7 @@ u8* dMsgFlow_c::getMsgDataBlock(char const* block_tag) {
|
||||
aMsgRes_p = dMsgObject_getMsgDtPtr();
|
||||
JUT_ASSERT(742, NULL != aMsgRes_p);
|
||||
|
||||
u32 num = *(u32*)(aMsgRes_p + 0xC);
|
||||
u32 num = *(BE(u32)*)(aMsgRes_p + 0xC);
|
||||
aMsgRes_p += 0x20;
|
||||
|
||||
for (u32 i = 0; i < num; i++) {
|
||||
@@ -348,7 +348,7 @@ u8* dMsgFlow_c::getMsgDataBlock(char const* block_tag) {
|
||||
return aMsgRes_p;
|
||||
}
|
||||
|
||||
aMsgRes_p += *(int*)(block_p + 4);
|
||||
aMsgRes_p += *(BE(int)*)(block_p + 4);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -361,9 +361,9 @@ u16 dMsgFlow_c::getInitNodeIndex(u16 param_1) {
|
||||
JUT_ASSERT(777, NULL != mLabelInfo_p);
|
||||
var_r30 = mLabelInfo_p + 0x10;
|
||||
|
||||
for (int i = 0; i < *(u16*)(mLabelInfo_p + 8); i++) {
|
||||
if (*(u32*)var_r30 >> 16 == param_1) {
|
||||
var_r27 = *(u16*)(var_r30 + 4);
|
||||
for (int i = 0; i < *(BE(u16)*)(mLabelInfo_p + 8); i++) {
|
||||
if (*(BE(u32)*)var_r30 >> 16 == param_1) {
|
||||
var_r27 = *(BE(u16)*)(var_r30 + 4);
|
||||
}
|
||||
|
||||
var_r30 += 0x8;
|
||||
@@ -441,13 +441,13 @@ void dMsgFlow_c::setNodeIndex(u16 i_nodeIdx, fopAc_ac_c** i_talkPartners) {
|
||||
|
||||
int dMsgFlow_c::setSelectMsg(mesg_flow_node* i_flowNode_p, mesg_flow_node* param_2,
|
||||
fopAc_ac_c* i_speaker_p) {
|
||||
u16* inf_p = NULL;
|
||||
BE(u16)* inf_p = NULL;
|
||||
u16 temp_r25;
|
||||
u16 msg_no;
|
||||
|
||||
mesg_flow_node* var_r29 = NULL;
|
||||
|
||||
inf_p = (u16*)getMsgDataBlock("INF1");
|
||||
inf_p = (BE(u16)*)getMsgDataBlock("INF1");
|
||||
|
||||
var_r29 = param_2;
|
||||
temp_r25 = ((inf_p + (var_r29->msg_index) * 10))[10];
|
||||
@@ -491,13 +491,13 @@ int dMsgFlow_c::setSelectMsg(mesg_flow_node* i_flowNode_p, mesg_flow_node* param
|
||||
}
|
||||
|
||||
int dMsgFlow_c::setNormalMsg(mesg_flow_node* i_flowNode_p, fopAc_ac_c* i_speaker_p) {
|
||||
u16* inf_p = NULL;
|
||||
BE(u16)* inf_p = NULL;
|
||||
mesg_flow_node* var_r29 = NULL;
|
||||
u16 msg_no;
|
||||
|
||||
var_r29 = i_flowNode_p;
|
||||
inf_p = (u16*)getMsgDataBlock("INF1");
|
||||
msg_no = ((inf_p + (var_r29->msg_index) * 10))[10];
|
||||
inf_p = (BE(u16)*)getMsgDataBlock("INF1");
|
||||
msg_no = (inf_p + (var_r29->msg_index) * 10)[10];
|
||||
|
||||
// "Message Set"
|
||||
OS_REPORT("\x1B[44;37mメッセ−ジセット \x1B[m|:");
|
||||
@@ -727,8 +727,8 @@ int dMsgFlow_c::nodeProc(fopAc_ac_c* i_speaker_p, fopAc_ac_c** i_talkPartners) {
|
||||
}
|
||||
|
||||
int dMsgFlow_c::getParam(u16* prm0, u16* prm1, u8* params) {
|
||||
*prm0 = *(u16*)params;
|
||||
*prm1 = *(u16*)(params + 2);
|
||||
*prm0 = *(BE(u16)*)params;
|
||||
*prm1 = *(BE(u16)*)(params + 2);
|
||||
|
||||
return *(int*)params;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,13 @@
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
|
||||
void dOvlpFd2_dlst_c::draw() {
|
||||
#if TARGET_PC
|
||||
GXSetViewport(0.0f, 0.0f, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight(), 0.0f, 1.0f);
|
||||
GXSetScissor(0, 0, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight());
|
||||
#else
|
||||
GXSetViewport(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0.0f, 1.0f);
|
||||
GXSetScissor(0, 0, FB_WIDTH, FB_HEIGHT);
|
||||
#endif
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGB, GX_RGBA4, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
@@ -49,6 +54,9 @@ void dOvlpFd2_dlst_c::draw() {
|
||||
C_MTXPerspective(m, 60.0f, mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getHeightF(), 100.0f,
|
||||
100000.0f);
|
||||
GXSetProjection(m, GX_PERSPECTIVE);
|
||||
#ifdef TARGET_PC
|
||||
mDoGph_gInf_c::getFrameBufferTexObj()->reset();
|
||||
#endif
|
||||
GXInitTexObj(mDoGph_gInf_c::getFrameBufferTexObj(), mDoGph_gInf_c::getFrameBufferTex(), FB_WIDTH / 2,
|
||||
FB_HEIGHT / 2, GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(mDoGph_gInf_c::getFrameBufferTexObj(), GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f,
|
||||
|
||||
@@ -20,8 +20,13 @@ void dDlst_snapShot_c::draw() {
|
||||
}
|
||||
|
||||
void dOvlpFd3_dlst_c::draw() {
|
||||
#if TARGET_PC
|
||||
GXSetViewport(0.0f, 0.0f, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight(), 0.0f, 1.0f);
|
||||
GXSetScissor(0, 0, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight());
|
||||
#else
|
||||
GXSetViewport(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0.0f, 1.0f);
|
||||
GXSetScissor(0, 0, FB_WIDTH, FB_HEIGHT);
|
||||
#endif
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGB, GX_RGBA4, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
@@ -57,6 +62,9 @@ void dOvlpFd3_dlst_c::draw() {
|
||||
C_MTXPerspective(m, 60.0f, mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getHeightF(), 100.0f,
|
||||
100000.0f);
|
||||
GXSetProjection(m, GX_PERSPECTIVE);
|
||||
#ifdef TARGET_PC
|
||||
mDoGph_gInf_c::getFrameBufferTexObj()->reset();
|
||||
#endif
|
||||
GXInitTexObj(mDoGph_gInf_c::getFrameBufferTexObj(), mDoGph_gInf_c::getFrameBufferTex(), FB_WIDTH / 2,
|
||||
FB_HEIGHT / 2, GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(mDoGph_gInf_c::getFrameBufferTexObj(), GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f,
|
||||
|
||||
@@ -357,7 +357,11 @@ Vec CPaneMgr::getGlobalVtx(J2DPane* p_pane, Mtx* param_1, u8 param_2, bool param
|
||||
MtxP mp = (MtxP)param_1;
|
||||
J2DPane* parent = p_pane->getParentPane();
|
||||
|
||||
#if TARGET_PC
|
||||
J2DOrthoGraph ortho(0.0f, 0.0f, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight(), -1.0f, 1.0f);
|
||||
#else
|
||||
J2DOrthoGraph ortho(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, -1.0f, 1.0f);
|
||||
#endif
|
||||
ortho.setOrtho(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(), mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), -1.0f, 1.0f);
|
||||
|
||||
if (parent != NULL) {
|
||||
|
||||
+1
-1
@@ -352,7 +352,7 @@ int dRes_info_c::loadResource() {
|
||||
JUT_ASSERT(769, resNameLen <= NAME_MAX);
|
||||
#endif
|
||||
|
||||
char arcName[9];
|
||||
char arcName[10];
|
||||
strncpy(arcName, name_p, resNameLen);
|
||||
arcName[resNameLen] = '\0';
|
||||
|
||||
|
||||
+17
-2
@@ -24,6 +24,7 @@
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include "m_Do/m_Do_Reset.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "m_Do/m_Do_machine.h"
|
||||
#include "d/actor/d_a_suspend.h"
|
||||
#include "d/actor/d_a_ykgr.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
@@ -38,6 +39,8 @@
|
||||
#include "JSystem/JKernel/JKRAram.h"
|
||||
#include "JSystem/JKernel/JKRAramArchive.h"
|
||||
|
||||
#include "dusk/memory.h"
|
||||
|
||||
#if DEBUG
|
||||
#include "d/d_s_menu.h"
|
||||
#include "d/d_debug_pad.h"
|
||||
@@ -1412,17 +1415,29 @@ static int phase_4(dScnPly_c* i_this) {
|
||||
dComIfGp_setPlayerPtr(i, NULL);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
dComIfGp_setWindow(0, 0.0f, 0.0f, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight(), 0.0f,
|
||||
1.0f, 0, 2);
|
||||
#else
|
||||
dComIfGp_setWindow(0, 0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0.0f, 1.0f, 0, 2);
|
||||
#endif
|
||||
dComIfGp_setCameraInfo(0, NULL, 0, 0, -1);
|
||||
dComIfGd_setWindow(NULL);
|
||||
dComIfGd_setViewport(NULL);
|
||||
dComIfGd_setView(NULL);
|
||||
|
||||
JKRExpHeap* heap = fopMsgM_createExpHeap(0xBB800, NULL);
|
||||
JKRExpHeap* heap = fopMsgM_createExpHeap(HEAP_SIZE(0xBB800, 0xF0000), NULL);
|
||||
#if TARGET_PC
|
||||
heap->setName("Scene2DHeap");
|
||||
#endif
|
||||
|
||||
JUT_ASSERT(2704, heap != NULL);
|
||||
dComIfGp_setExpHeap2D(heap);
|
||||
|
||||
JKRExpHeap* heap2 = fopMsgM_createExpHeap(0xA800, NULL);
|
||||
JKRExpHeap* heap2 = fopMsgM_createExpHeap(HEAP_SIZE(0xA800, 0x15000), NULL);
|
||||
#if TARGET_PC
|
||||
heap2->setName("SceneMsgHeap");
|
||||
#endif
|
||||
JUT_ASSERT(2709, heap2 != NULL);
|
||||
dComIfGp_setMsgExpHeap(heap2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user