mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-03 16:31:56 -04:00
bd670ab091
daBaseNpc_c::setBckAnm and J3DAnmTransform* daBaseNpc_c daBaseNpc_c::setBtpAnm daBaseNpc_c::attnSttsOn daBaseNpc_c::orderEvent daBaseNpc_c::setEnvTevColor daBaseNpc_c::setRoomNo daBaseNpc_c::checkEndAnm attempt CheckCreateHeap daNpcF_addIdx daNpcF_subIdx daNpcF_incIdx daNpcF_decIdx daNpcF_ActorMngr_c::initialize() daNpcF_ActorMngr_c::entry cleanup daNpcF_ActorMngr_c::entry daNpcF_ActorMngr_c::remove daNpcF_ActorMngr_c::getActorP daNpcF_MatAnm_c::calc attempt daNpcF_SPCurve_c::initialize minor fixes daNpcF_Path_c::initialize daNpcF_Path_c::setPathInfo daNpcF_Path_c::chkPassed daNpcF_Path_c::reverse daNpcF_Path_c::setNextIdx daNpcF_Path_c::getNextIdx daNpcF_Path_c::getBeforeIdx daNpcF_Path_c::getBeforePos daNpcF_Path_c::getNextPos daNpcT_MatAnm_c::initialize daNpcT_MatAnm_c::calc daNpcT_addIdx daNpcT_subIdx daNpcT_decIdx daNpcT_Path_c::hermite daNpcT_Path_c::initialize daNpcT_Path_c::setPathInfo attempt daNpcT_Path_c::setNextPathInfo daNpcT_Path_c::reverse daNpcT_Path_c::setNextIdx daNpcT_Path_c::getDstPos attempt daNpcT_DmgStagger_c::setParam Add FLOAT_LABEL where possible fopEn_enemy / fix e_wb move jasper's jsystem work over d_attention / d_demo / d_lib work remove asm clean up dolphin files / work on some rels (#212) * d_a_alldie / d_a_tboxSw / d_a_tag_gstart / d_a_tag_hstop * dolphin OS work / cleanup * dolphin GX work / cleanup * finish changing dolphin files to C * more files into C * match rest of MSL_C math functions * more dolphin files converted to C * remove asm * d_bg_w work * remove asm * d_a_alink work / kytag14 initial changes to d_a_e_yc checkpoint until virtual destructor issue is solved daNpcF_Lookat_c::adjustMoveDisAngle daBaseNpc_c::setMtx daBaseNpc_moveBgActor_c::daBaseNpc_moveBgActor_c() daNpcT_c::ctrlFaceMotion daNpcT_c::ctrlMsgAnm attempt daNpcT_c::initTalk daNpcF_clearMessageTmpBit daNpcF_getDistTableIdx daNpcF_offTmpBit daNpcF_onTmpBit daNpcF_chkTmpBit daNpcF_onEvtBit daNpcF_chkEvtBit daNpcF_c::getDistTableIdx daNpcF_chkPointInArea daNpcF_chkDoBtnEqSpeak daNpcF_getPlayerInfoFromPlayerList attempt daNpcF_pntVsLineSegmentLengthSquare2D daNpcF_c::chkPointInArea daNpcF_c::chkPointInArea daNpcF_c::getAttentionPos daNpcT_chkTmpBit daNpcT_offTmpBit daNpcT_onTmpBit daNpcT_chkEvtBit daNpcT_offEvtBit daNpcT_onEvtBit daNpcT_chkDoBtnIsSpeak daNpcT_getDistTableIdx daBaseNpc_acMngr_c::entry daNpcF_c::initTalk undo override
105 lines
1.9 KiB
C
105 lines
1.9 KiB
C
#ifndef GX_H_
|
|
#define GX_H_
|
|
|
|
#include "dolphin/gx/GXInit.h"
|
|
#include "dolphin/gx/GXAttr.h"
|
|
#include "dolphin/gx/GXBump.h"
|
|
#include "dolphin/gx/GXDisplayList.h"
|
|
#include "dolphin/gx/GXFifo.h"
|
|
#include "dolphin/gx/GXFrameBuf.h"
|
|
#include "dolphin/gx/GXGeometry.h"
|
|
#include "dolphin/gx/GXLight.h"
|
|
#include "dolphin/gx/GXMisc.h"
|
|
#include "dolphin/gx/GXPerf.h"
|
|
#include "dolphin/gx/GXPixel.h"
|
|
#include "dolphin/gx/GXTev.h"
|
|
#include "dolphin/gx/GXTexture.h"
|
|
#include "dolphin/gx/GXTransform.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// Pack value into bitfield
|
|
// Pack value into bitfield
|
|
#define GX_BITFIELD_SET(field, pos, size, value) (field) = __rlwimi((field), (value), 31 - (pos) - (size) + 1, (pos), (pos) + (size)-1)
|
|
|
|
#define GX_LOAD_BP_REG 0x61
|
|
#define GX_NOP 0
|
|
|
|
typedef union {
|
|
u8 u8;
|
|
u16 u16;
|
|
u32 u32;
|
|
u64 u64;
|
|
s8 s8;
|
|
s16 s16;
|
|
s32 s32;
|
|
s64 s64;
|
|
f32 f32;
|
|
f64 f64;
|
|
} PPCWGPipe;
|
|
|
|
volatile PPCWGPipe GXFIFO : 0xCC008000;
|
|
|
|
#define GFX_FIFO(T) (*(volatile T*)0xCC008000)
|
|
|
|
inline void GXPosition3f32(f32 x, f32 y, f32 z) {
|
|
GFX_FIFO(f32) = x;
|
|
GFX_FIFO(f32) = y;
|
|
GFX_FIFO(f32) = z;
|
|
}
|
|
|
|
inline void GXColor1u32(u32 c) {
|
|
GFX_FIFO(u32) = c;
|
|
}
|
|
|
|
inline void GXTexCoord2f32(f32 s, f32 t) {
|
|
GFX_FIFO(f32) = s;
|
|
GFX_FIFO(f32) = t;
|
|
}
|
|
|
|
inline void GXTexCoord2u8(u8 s, u8 t) {
|
|
GFX_FIFO(u8) = s;
|
|
GFX_FIFO(u8) = t;
|
|
}
|
|
|
|
inline void GXPosition2u16(u16 x, u16 y) {
|
|
GFX_FIFO(u16) = x;
|
|
GFX_FIFO(u16) = y;
|
|
}
|
|
|
|
inline void GXPosition1x16(u16 x) {
|
|
GFX_FIFO(u16) = x;
|
|
}
|
|
|
|
inline void GXPosition3s8(s8 x, s8 y, s8 z) {
|
|
GFX_FIFO(s8) = x;
|
|
GFX_FIFO(s8) = y;
|
|
GFX_FIFO(s8) = z;
|
|
}
|
|
|
|
inline void GXPosition2s8(s8 x, s8 y) {
|
|
GFX_FIFO(s8) = x;
|
|
GFX_FIFO(s8) = y;
|
|
}
|
|
|
|
inline void i_GXPosition3s16(s16 x, s16 y, s16 z) {
|
|
GFX_FIFO(s16) = x;
|
|
GFX_FIFO(s16) = y;
|
|
GFX_FIFO(s16) = z;
|
|
}
|
|
|
|
inline void GXTexCoord2s8(s8 x, s8 y) {
|
|
GFX_FIFO(s8) = x;
|
|
GFX_FIFO(s8) = y;
|
|
}
|
|
|
|
inline void i_GXEnd() {}
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif
|
|
|
|
#endif
|