mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 08:12:41 +02:00
added debugging to pin point seg fault
This commit is contained in:
1 parent
0d6c557982
commit
400865ec25
4 files changed
+32
-2
No files matched your search
@@ -57,6 +57,7 @@
|
||||
#include "game/stagetable.h"
|
||||
#include "video.h"
|
||||
#include "platform.h"
|
||||
#include <stdio.h> // remove after debugging
|
||||
#endif
|
||||
|
||||
#define GUNLOADSTATE_FLUX 0
|
||||
@@ -10938,6 +10939,8 @@ glabel var7f1aca90
|
||||
// Mismatch: Goal uses different codegen for accessing vertices
|
||||
void bgunRender(Gfx **gdlptr)
|
||||
{
|
||||
printf("\nsrc/game/bondgun.c:bgunRender()");
|
||||
fflush(stdout);
|
||||
Gfx *gdl = *gdlptr;
|
||||
struct modelrenderdata renderdata = {NULL, true, 3}; // 10c
|
||||
struct player *player;
|
||||
@@ -11190,6 +11193,8 @@ void bgunRender(Gfx **gdlptr)
|
||||
viGetViewLeft() + viGetViewWidth(), viGetViewTop() + viGetViewHeight());
|
||||
|
||||
*gdlptr = gdl;
|
||||
printf("\n done!");
|
||||
fflush(stdout);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "lib/lib_17ce0.h"
|
||||
#include "game/player.h"
|
||||
#include "game/prop.h"
|
||||
#include <stdio.h> // remove after debugging
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -214,6 +215,9 @@ bool artifactTestLos(struct coord *spec, struct coord *roompos, s32 xi, s32 yi)
|
||||
|
||||
void artifactsCalculateGlaresForRoom(s32 roomnum)
|
||||
{
|
||||
printf("\nsrc/game/game_13c510.c:artifactsCalculateGlaresForRoom(%d)", roomnum);
|
||||
fflush(stdout);
|
||||
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 k;
|
||||
@@ -455,6 +459,8 @@ void artifactsCalculateGlaresForRoom(s32 roomnum)
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("\n done!");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
u8 artifactsClamp(u8 arg0, u8 arg1)
|
||||
@@ -472,6 +478,9 @@ u8 artifactsClamp(u8 arg0, u8 arg1)
|
||||
|
||||
Gfx *artifactsConfigureForGlares(Gfx *gdl)
|
||||
{
|
||||
printf("\nsrc/game/game_13c510.c:artifactsConfigureForGlares()");
|
||||
fflush(stdout);
|
||||
|
||||
struct stagetableentry *stage = stageGetCurrent();
|
||||
|
||||
texSelect(&gdl, &g_TexLightGlareConfigs[stage->light_type], 4, 0, 2, 1, NULL);
|
||||
@@ -486,6 +495,8 @@ Gfx *artifactsConfigureForGlares(Gfx *gdl)
|
||||
gDPSetAlphaDither(gdl++, G_AD_PATTERN);
|
||||
gDPSetTexturePersp(gdl++, G_TP_NONE);
|
||||
|
||||
printf("\n done!");
|
||||
fflush(stdout);
|
||||
return gdl;
|
||||
}
|
||||
|
||||
@@ -498,6 +509,9 @@ Gfx *artifactsUnconfigureForGlares(Gfx *gdl)
|
||||
|
||||
Gfx *artifactsRenderGlaresForRoom(Gfx *gdl, s32 roomnum)
|
||||
{
|
||||
printf("\nsrc/game/game_13c510.c:artifactsRenderGlaresForRoom(%d)", roomnum);
|
||||
fflush(stdout);
|
||||
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 lightindex;
|
||||
@@ -740,5 +754,7 @@ Gfx *artifactsRenderGlaresForRoom(Gfx *gdl, s32 roomnum)
|
||||
}
|
||||
}
|
||||
|
||||
printf("\n done!");
|
||||
fflush(stdout);
|
||||
return gdl;
|
||||
}
|
||||
+6
-2
@@ -10,6 +10,7 @@
|
||||
#include "lib/memp.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
#include <stdio.h> // remove after debugging
|
||||
|
||||
u32 g_ZbufWidth;
|
||||
u32 g_ZbufHeight;
|
||||
@@ -125,7 +126,6 @@ Gfx *zbufConfigureRdp(Gfx *gdl)
|
||||
*/
|
||||
Gfx *zbufClear(Gfx *gdl)
|
||||
{
|
||||
#ifdef PLATFORM_N64
|
||||
s32 left;
|
||||
s32 right;
|
||||
|
||||
@@ -149,7 +149,7 @@ Gfx *zbufClear(Gfx *gdl)
|
||||
|
||||
gDPFillRectangle(gdl++, left, 0, right, playerGetFbHeight() - 1);
|
||||
gDPPipeSync(gdl++);
|
||||
#else
|
||||
#ifndef PLATFORM_N64
|
||||
gDPClearDepthEXT(gdl++);
|
||||
#endif
|
||||
|
||||
@@ -188,6 +188,8 @@ Gfx *zbufSaveArtifactDepths(Gfx *gdl)
|
||||
u16 *zbufrow;
|
||||
s32 i;
|
||||
|
||||
printf("\nsrc/game/zbuf.c:zbufSaveArtifactDepths()");
|
||||
fflush(stdout);
|
||||
viGetBackBuffer();
|
||||
samples = zbufGetArtifactsCfb(g_SchedWriteArtifactsIndex);
|
||||
g_SchedSpecialArtifactIndexes[g_SchedWriteArtifactsIndex] = 1;
|
||||
@@ -253,5 +255,7 @@ Gfx *zbufSaveArtifactDepths(Gfx *gdl)
|
||||
|
||||
if (samples);
|
||||
|
||||
printf("\n done!");
|
||||
fflush(stdout);
|
||||
return gdl;
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "lib/joy.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
#include <stdio.h> // remove after debugging
|
||||
|
||||
/*
|
||||
* private typedefs and defines
|
||||
@@ -533,6 +534,8 @@ void schedResetArtifacts(void)
|
||||
|
||||
void schedUpdatePendingArtifacts(void)
|
||||
{
|
||||
printf("\nsrc/lib/sched.c:schedUpdatePendingArtifacts()");
|
||||
fflush(stdout);
|
||||
struct artifact *artifacts = schedGetPendingArtifacts();
|
||||
s32 i;
|
||||
|
||||
@@ -561,6 +564,8 @@ void schedUpdatePendingArtifacts(void)
|
||||
g_SchedSpecialArtifactIndexes[g_SchedPendingArtifactsIndex] = 0;
|
||||
|
||||
schedIncrementPendingArtifacts();
|
||||
printf("\n done!");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user