Use Macro for __FILE__ & __LINE__ when possible (#559)
* First batch some overlay
* Almost all overlay
* effect & gamestate
* kaleido stuffs
* more overlay
* more left over from code folder
* remaining hardcoded line and file
* Open & Close _DISP __FILE__ & __LINE__ clean up
* Some if (1) {} remove
* LOG_xxxx __FILE__ , __LINE__ cleaned
* ASSERT macro __FILE__ __LINE__
* mtx without line/file in functions
* " if (1) {} " & "if (0) {}" and tab/white place
* LogUtils as macro
* GameState_, GameAlloc_, SystemArena_ & ZeldaArena_
* Revert "GameState_, GameAlloc_, SystemArena_ & ZeldaArena_"
This reverts commit 0d85caaf7e342648c01a15fe21e93637352dc596.
* Like last commit but as macro
* Fix matrix not using macros
* use function not macro
* DebugArena_* functions
GameAlloc_MallocDebug
BgCheck_PosErrorCheck as macros
removed issues with ; in macro file
This commit is contained in:
@@ -22,7 +22,7 @@ MtxF* sMatrixStack; // "Matrix_stack"
|
||||
MtxF* sCurrentMatrix; // "Matrix_now"
|
||||
|
||||
void Matrix_Init(GameState* gameState) {
|
||||
sCurrentMatrix = GameState_Alloc(gameState, 20 * sizeof(MtxF), "../sys_matrix.c", 153);
|
||||
sCurrentMatrix = GAMESTATE_ALLOC_MC(gameState, 20 * sizeof(MtxF));
|
||||
sMatrixStack = sCurrentMatrix;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ void Matrix_Push(void) {
|
||||
void Matrix_Pop(void) {
|
||||
FrameInterpolation_RecordMatrixPop();
|
||||
sCurrentMatrix--;
|
||||
ASSERT(sCurrentMatrix >= sMatrixStack, "Matrix_now >= Matrix_stack", "../sys_matrix.c", 176);
|
||||
ASSERT(sCurrentMatrix >= sMatrixStack);
|
||||
}
|
||||
|
||||
void Matrix_Get(MtxF* dest) {
|
||||
@@ -556,7 +556,7 @@ Mtx* Matrix_ToMtx(Mtx* dest, char* file, s32 line) {
|
||||
FrameInterpolation_RecordMatrixToMtx(dest, file, line);
|
||||
guMtxF2L(Matrix_CheckFloats(sCurrentMatrix, file, line), dest);
|
||||
return dest;
|
||||
//return Matrix_MtxFToMtx(Matrix_CheckFloats(sCurrentMatrix, file, line), dest);
|
||||
//return Matrix_MtxFToMtx(MATRIX_CHECKFLOATS(sCurrentMatrix), dest);
|
||||
}
|
||||
|
||||
Mtx* Matrix_NewMtx(GraphicsContext* gfxCtx, char* file, s32 line) {
|
||||
@@ -851,8 +851,6 @@ void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode) {
|
||||
cmf->yy = axis->y * axis->y * rCos + cos;
|
||||
cmf->zz = axis->z * axis->z * rCos + cos;
|
||||
|
||||
if (0) {}
|
||||
|
||||
temp2 = axis->x * rCos * axis->y;
|
||||
temp3 = axis->z * sin;
|
||||
cmf->yx = temp2 + temp3;
|
||||
|
||||
Reference in New Issue
Block a user