You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Compare commits
17 Commits
v2.3.0
...
fazana/dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fd19a0e08 | ||
|
|
dded44b418 | ||
|
|
a355d4ef70 | ||
|
|
56ccf244a6 | ||
|
|
39d7890459 | ||
|
|
c563fbc977 | ||
|
|
aef4cd3315 | ||
|
|
202b420b3d | ||
|
|
1f97716ca4 | ||
|
|
2d6538605c | ||
|
|
9a1ecd2463 | ||
|
|
aa8bdf890d | ||
|
|
2cc56a9f73 | ||
|
|
fc58e7b9ba | ||
|
|
b1d1c485c7 | ||
|
|
ba737367c7 | ||
|
|
e6867a7e33 |
@@ -438,7 +438,6 @@ void render_game(void) {
|
||||
#if PUPPYPRINT_DEBUG
|
||||
profiler_update(graphTime, first);
|
||||
graphTime[perfIteration] -= (collisionTime[perfIteration] - colTime);
|
||||
// graphTime[perfIteration] -= profilerTime[perfIteration]; //! Graph time is inaccurate and wrongly reaches 0 sometimes
|
||||
puppyprint_render_profiler();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -726,6 +726,7 @@ void setup_game_memory(void) {
|
||||
void thread5_game_loop(UNUSED void *arg) {
|
||||
#if PUPPYPRINT_DEBUG
|
||||
OSTime lastTime = 0;
|
||||
OSTime first = 0;
|
||||
#endif
|
||||
|
||||
setup_game_memory();
|
||||
@@ -763,12 +764,10 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
continue;
|
||||
}
|
||||
#if PUPPYPRINT_DEBUG
|
||||
while (TRUE) {
|
||||
lastTime = osGetTime();
|
||||
collisionTime[perfIteration] = 0;
|
||||
// graphTime[perfIteration] = 0;
|
||||
behaviourTime[perfIteration] = 0;
|
||||
dmaTime[perfIteration] = 0;
|
||||
lastTime = osGetTime();
|
||||
collisionTime[perfIteration] = 0;
|
||||
behaviourTime[perfIteration] = 0;
|
||||
dmaTime[perfIteration] = 0;
|
||||
#endif
|
||||
|
||||
// If any controllers are plugged in, start read the data for when
|
||||
@@ -780,9 +779,16 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
osContStartReadData(&gSIEventMesgQueue);
|
||||
}
|
||||
|
||||
|
||||
audio_game_loop_tick();
|
||||
select_gfx_pool();
|
||||
#if PUPPYPRINT_DEBUG
|
||||
first = osGetTime();
|
||||
read_controller_inputs(THREAD_5_GAME_LOOP);
|
||||
profiler_update(controllerTime, first);
|
||||
#else
|
||||
read_controller_inputs(THREAD_5_GAME_LOOP);
|
||||
#endif
|
||||
addr = level_script_execute(addr);
|
||||
#if !PUPPYPRINT_DEBUG && defined(VISUAL_DEBUG)
|
||||
debug_box_input();
|
||||
@@ -791,17 +797,6 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
profiler_update(scriptTime, lastTime);
|
||||
scriptTime[perfIteration] -= profilerTime[perfIteration];
|
||||
scriptTime[perfIteration] -= profilerTime2[perfIteration];
|
||||
if (benchmarkLoop > 0 && benchOption == 0) {
|
||||
benchmarkLoop--;
|
||||
benchMark[benchmarkLoop] = (osGetTime() - lastTime);
|
||||
if (benchmarkLoop == 0) {
|
||||
puppyprint_profiler_finished();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
puppyprint_profiler_process();
|
||||
#endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -56,6 +56,7 @@ extern s32 ramsizeSegment[33];
|
||||
extern s8 nameTable;
|
||||
extern s32 mempool;
|
||||
extern u8 benchOption;
|
||||
extern f32 textSize;
|
||||
|
||||
// General
|
||||
extern u32 cpuTime;
|
||||
@@ -79,6 +80,7 @@ extern u32 taskTime[NUM_PERF_ITERATIONS + 1];
|
||||
extern u32 cameraTime[NUM_PERF_ITERATIONS + 1];
|
||||
extern u32 profilerTime[NUM_PERF_ITERATIONS + 1];
|
||||
extern u32 profilerTime2[NUM_PERF_ITERATIONS + 1];
|
||||
extern u32 controllerTime[NUM_PERF_ITERATIONS + 1];
|
||||
// RSP
|
||||
extern u32 rspGenTime[NUM_PERF_ITERATIONS + 1];
|
||||
// RDP
|
||||
@@ -90,15 +92,17 @@ extern void profiler_update(u32 *time, OSTime time2);
|
||||
extern void puppyprint_profiler_process(void);
|
||||
extern void puppyprint_render_profiler(void);
|
||||
extern void puppyprint_profiler_finished(void);
|
||||
extern void print_set_envcolour(s32 r, s32 g, s32 b, s32 a);
|
||||
extern void print_set_envcolour(u8 r, u8 g, u8 b, u8 a);
|
||||
extern void prepare_blank_box(void);
|
||||
extern void finish_blank_box(void);
|
||||
extern void print_small_text(s32 x, s32 y, const char *str, s32 align, s32 amount, s32 font);
|
||||
extern void print_small_text(s32 x, s32 y, const char *str, s32 align, s32 amount, u8 font);
|
||||
extern void render_multi_image(Texture *image, s32 x, s32 y, s32 width, s32 height, s32 scaleX, s32 scaleY, s32 mode);
|
||||
extern s32 get_text_height(const char *str);
|
||||
extern s32 get_text_width(const char *str, s32 font);
|
||||
extern void prepare_blank_box(void);
|
||||
extern void finish_blank_box(void);
|
||||
extern void render_blank_box(s32 x1, s32 y1, s32 x2, s32 y2, s32 r, s32 g, s32 b, s32 a);
|
||||
extern void render_blank_box(s32 x1, s32 y1, s32 x2, s32 y2, u8 r, u8 g, u8 b, u8 a);
|
||||
extern void render_blank_box_rounded(s32 x1, s32 y1, s32 x2, s32 y2, u8 r, u8 g, u8 b, u8 a);
|
||||
extern void append_puppyprint_log(const char *str, ...);
|
||||
extern char consoleLogTable[LOG_BUFFER_SIZE][255];
|
||||
extern s32 puppyprint_strlen(const char *str);
|
||||
|
||||
@@ -353,33 +353,19 @@ void thread4_sound(UNUSED void *arg) {
|
||||
|
||||
osRecvMesg(&sSoundMesgQueue, &msg, OS_MESG_BLOCK);
|
||||
#if PUPPYPRINT_DEBUG
|
||||
while (TRUE) {
|
||||
lastTime = osGetTime();
|
||||
dmaAudioTime[perfIteration] = 0;
|
||||
#endif
|
||||
if (gResetTimer < 25) {
|
||||
struct SPTask *spTask;
|
||||
spTask = create_next_audio_frame_task();
|
||||
if (spTask != NULL) {
|
||||
dispatch_audio_sptask(spTask);
|
||||
}
|
||||
#if PUPPYPRINT_DEBUG
|
||||
profiler_update(audioTime, lastTime);
|
||||
audioTime[perfIteration] -= dmaAudioTime[perfIteration];
|
||||
if (benchmarkLoop > 0 && benchOption == 1) {
|
||||
benchmarkLoop--;
|
||||
benchMark[benchmarkLoop] = osGetTime() - lastTime;
|
||||
if (benchmarkLoop == 0) {
|
||||
puppyprint_profiler_finished();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
lastTime = osGetTime();
|
||||
dmaAudioTime[perfIteration] = 0;
|
||||
#endif
|
||||
if (gResetTimer < 25) {
|
||||
struct SPTask *spTask;
|
||||
spTask = create_next_audio_frame_task();
|
||||
if (spTask != NULL) {
|
||||
dispatch_audio_sptask(spTask);
|
||||
}
|
||||
#if PUPPYPRINT_DEBUG
|
||||
}
|
||||
profiler_update(audioTime, lastTime);
|
||||
audioTime[perfIteration] -= dmaAudioTime[perfIteration];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user