mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-04 01:07:56 -04:00
Recreate the aiming reticle as GX calls for Wii compatibility
This commit is contained in:
+27
-25
@@ -367,31 +367,7 @@ JKRHeap* daPy_anmHeap_c::setAnimeHeap() {
|
||||
}
|
||||
|
||||
#if !PLATFORM_WII
|
||||
#if TARGET_PC
|
||||
#include "dusk/dvd_asset.hpp"
|
||||
using GameVersion = dusk::version::GameVersion;
|
||||
static const u8* l_sightDL_get() {
|
||||
static u8 buf[0x89];
|
||||
static bool _ = (
|
||||
dusk::LoadDolAsset(
|
||||
buf,
|
||||
{
|
||||
{GameVersion::GcnUsa, 0x803BA0C0},
|
||||
{GameVersion::GcnPal, 0x803BBDA0},
|
||||
{GameVersion::GcnJpn, 0x803B4220},
|
||||
{GameVersion::WiiUsaRev0, 0x803F63C0},
|
||||
{GameVersion::WiiUsa, 0x803E1640},
|
||||
{GameVersion::WiiPal, 0x803E23A0},
|
||||
{GameVersion::WiiJpn, 0x803DF600}
|
||||
},
|
||||
0x89
|
||||
),
|
||||
true
|
||||
);
|
||||
return buf;
|
||||
}
|
||||
#define l_sightDL (l_sightDL_get())
|
||||
#else
|
||||
#if !TARGET_PC
|
||||
#include "assets/l_sightDL__d_a_player.h"
|
||||
#endif
|
||||
|
||||
@@ -435,7 +411,33 @@ void daPy_sightPacket_c::draw() {
|
||||
GXLoadPosMtxImm(mProjMtx, GX_PNMTX0);
|
||||
GXSetCurrentMtx(0);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL);
|
||||
#if TARGET_PC
|
||||
GXSetNumTexGens(1);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
|
||||
GXSetCullMode(GX_CULL_NONE);
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_C1, GX_CC_C0, GX_CC_TEXC, GX_CC_ZERO);
|
||||
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_A0, GX_CA_TEXA, GX_CA_ZERO);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_CLEAR);
|
||||
GXSetZMode(GX_FALSE, GX_LEQUAL, GX_FALSE);
|
||||
GXSetColorUpdate(GX_TRUE);
|
||||
GXSetAlphaUpdate(GX_FALSE);
|
||||
GXSetDither(GX_TRUE);
|
||||
GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, 4);
|
||||
GXPosition3u8(1, 1, 0);
|
||||
GXTexCoord2u8(1, 1);
|
||||
GXPosition3u8(255, 1, 0);
|
||||
GXTexCoord2u8(0, 1);
|
||||
GXPosition3u8(1, 255, 0);
|
||||
GXTexCoord2u8(1, 0);
|
||||
GXPosition3u8(255, 255, 0);
|
||||
GXTexCoord2u8(0, 0);
|
||||
GXEnd();
|
||||
#else
|
||||
GXCallDisplayList(l_sightDL, 0x80);
|
||||
#endif
|
||||
J3DShape::resetVcdVatCache();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user