Compare commits

...

17 Commits

Author SHA1 Message Date
Fazana
4fd19a0e08 Update puppyprint.c 2022-02-27 19:20:48 +00:00
Fazana
dded44b418 type changes 2022-02-27 16:07:59 +00:00
Fazana
a355d4ef70 Variable length fix + command ignoring strlen 2022-02-26 20:12:17 +00:00
Fazana
56ccf244a6 Merge pull request #337 from gheskett/fazana/develop2.1.0/puppyprint
Puppyprint color reversion to currEnv + some bugfixes
2022-02-26 19:55:56 +00:00
gheskett
39d7890459 Additional strLen check 2022-02-26 14:47:39 -05:00
gheskett
c563fbc977 Missed one last puppyprint edge case 2022-02-26 14:30:29 -05:00
gheskett
aef4cd3315 Fix some puppyprint formatting edge cases 2022-02-26 14:16:24 -05:00
gheskett
202b420b3d i can type yes definitely 2022-02-23 02:03:38 -05:00
gheskett
1f97716ca4 Add forgotten comment 2022-02-23 02:02:17 -05:00
gheskett
2d6538605c Remove a pointless color array 2022-02-23 01:43:11 -05:00
gheskett
9a1ecd2463 Puppyprint color reversion to currEnv + some bugfixes 2022-02-23 01:27:59 -05:00
gheskett
aa8bdf890d Update puppyprint debug colors to work with new hexadecimal system 2022-02-22 23:18:20 -05:00
Fazana
2cc56a9f73 Merge branch 'fazana/develop2.1.0/puppyprint' of https://github.com/Reonu/HackerSM64 into fazana/develop2.1.0/puppyprint 2022-02-15 12:01:08 +00:00
Fazana
fc58e7b9ba revert multi image tweak
parallel momento
2022-02-15 12:01:00 +00:00
gheskett
b1d1c485c7 Revert broken render_multi_image changes 2022-02-14 22:30:40 -05:00
Fazana
ba737367c7 Update puppyprint.c 2022-02-14 18:57:44 +00:00
Fazana
e6867a7e33 Puppyprint text size 2022-02-06 16:54:27 +00:00
5 changed files with 311 additions and 234 deletions

View File

@@ -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
}

View File

@@ -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

View File

@@ -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);

View File

@@ -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
}
}
}