diff options
| author | fig02 <fig02srl@gmail.com> | 2022-11-26 15:22:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-26 15:22:01 -0500 |
| commit | eb0a82c513a2681de3aa92db623f60630689a525 (patch) | |
| tree | 7310bf1d05a707d377b74ce1eeca8d80a6ad06eb /src/code/PreRender.c | |
| parent | 274743738b0db3a07612d610059ee2490728667e (diff) | |
Document HREG debugging system (#1351)
* progress
* progress
* change
* named most
* name prerender things
* fix and format
* play prefix
* address most comments (still a few more things to do)
* fix error
* reword input test comments
* some more
* rework env draw flags
* add hilite
* merge and format
* init to proper values
* rename env draw flag names
* 7 to 6
* more small changes
Diffstat (limited to 'src/code/PreRender.c')
| -rw-r--r-- | src/code/PreRender.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/code/PreRender.c b/src/code/PreRender.c index a8aa45958..44af41715 100644 --- a/src/code/PreRender.c +++ b/src/code/PreRender.c @@ -720,10 +720,11 @@ void PreRender_DivotFilter(PreRender* this) { } // This condition is checked before entering this function, it will always pass if it runs. - if ((HREG(80) == 15 ? HREG(81) : 0) != 0) { - if ((HREG(80) == 15 ? HREG(81) : 0) != 0) {} + if ((R_HREG_MODE == HREG_MODE_PRERENDER ? R_PRERENDER_DIVOT_CONTROL : 0) != 0) { + if ((R_HREG_MODE == HREG_MODE_PRERENDER ? R_PRERENDER_DIVOT_CONTROL : 0) != 0) {} - if ((HREG(80) == 15 ? HREG(81) : 0) == 5) { + if ((R_HREG_MODE == HREG_MODE_PRERENDER ? R_PRERENDER_DIVOT_CONTROL : 0) == + PRERENDER_DIVOT_PARTIAL_CVG_RED) { // Fill the pixel with full red, likely for debugging pxR = 31; pxG = 0; @@ -734,7 +735,8 @@ void PreRender_DivotFilter(PreRender* this) { u8* windowG = &buffG[x - 1]; u8* windowB = &buffB[x - 1]; - if ((HREG(80) == 15 ? HREG(81) : 0) == 3) { + if ((R_HREG_MODE == HREG_MODE_PRERENDER ? R_PRERENDER_DIVOT_CONTROL : 0) == + PRERENDER_DIVOT_PRINT_COLOR) { osSyncPrintf("red=%3d %3d %3d %3d grn=%3d %3d %3d %3d blu=%3d %3d %3d %3d \n", windowR[0], windowR[1], windowR[2], MEDIAN3(windowR[0], windowR[1], windowR[2]), windowG[0], windowG[1], windowG[2], MEDIAN3(windowG[0], windowG[1], windowG[2]), windowB[0], @@ -744,7 +746,8 @@ void PreRender_DivotFilter(PreRender* this) { // Sample the median value from the 3 pixel wide window // (Both blocks contain the same code) - if ((HREG(80) == 15 ? HREG(81) : 0) == 1) { + if ((R_HREG_MODE == HREG_MODE_PRERENDER ? R_PRERENDER_DIVOT_CONTROL : 0) == + PRERENDER_DIVOT_ALTERNATE_COLOR) { pxR = MEDIAN3(windowR[0], windowR[1], windowR[2]); pxG = MEDIAN3(windowG[0], windowG[1], windowG[2]); pxB = MEDIAN3(windowB[0], windowB[1], windowB[2]); @@ -754,6 +757,7 @@ void PreRender_DivotFilter(PreRender* this) { pxB = MEDIAN3(windowB[0], windowB[1], windowB[2]); } } + pxOut.r = pxR; pxOut.g = pxG; pxOut.b = pxB; @@ -787,7 +791,7 @@ void PreRender_ApplyFilters(PreRender* this) { } } - if ((HREG(80) == 15 ? HREG(81) : 0) != 0) { + if ((R_HREG_MODE == HREG_MODE_PRERENDER ? R_PRERENDER_DIVOT_CONTROL : 0) != 0) { // Apply divot filter PreRender_DivotFilter(this); } |
