diff options
author | Bad Diode <bd@badd10de.dev> | 2023-04-19 15:22:13 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-04-19 15:28:08 +0200 |
commit | 2e8ab813a9e4c2d908d5450e346a81d2a91a75e8 (patch) | |
tree | cbbb9c68851293b9166db57160c1409474e57fce | |
parent | 2d99fe361bd795dd120f51e6bc0c37105cad491a (diff) | |
download | uxngba-2e8ab813a9e4c2d908d5450e346a81d2a91a75e8.tar.gz uxngba-2e8ab813a9e4c2d908d5450e346a81d2a91a75e8.zip |
Fix compiler warnings
-rw-r--r-- | src/main.c | 21 | ||||
-rw-r--r-- | src/ppu.c | 1 |
2 files changed, 9 insertions, 13 deletions
@@ -37,8 +37,6 @@ | |||
37 | #define CONTROL_METHODS CONTROL_CONTROLLER,CONTROL_MOUSE,CONTROL_KEYBOARD | 37 | #define CONTROL_METHODS CONTROL_CONTROLLER,CONTROL_MOUSE,CONTROL_KEYBOARD |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #define PROF_ENABLE 1 | ||
41 | |||
42 | #ifdef PROF_ENABLE | 40 | #ifdef PROF_ENABLE |
43 | #if PROF_ENABLE == 0 | 41 | #if PROF_ENABLE == 0 |
44 | #define TEXT_ENABLE 1 | 42 | #define TEXT_ENABLE 1 |
@@ -53,6 +51,7 @@ | |||
53 | #ifndef PROF_SHOW_Y | 51 | #ifndef PROF_SHOW_Y |
54 | #define PROF_SHOW_Y 0 | 52 | #define PROF_SHOW_Y 0 |
55 | #endif | 53 | #endif |
54 | /* | ||
56 | // #define PROF_SHOW() \ | 55 | // #define PROF_SHOW() \ |
57 | // do { \ | 56 | // do { \ |
58 | // txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ | 57 | // txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ |
@@ -75,21 +74,19 @@ | |||
75 | // txt_position((PROF_SHOW_X), (PROF_SHOW_Y)+3);\ | 74 | // txt_position((PROF_SHOW_X), (PROF_SHOW_Y)+3);\ |
76 | // txt_printf("FLIP: %lu ", flip_cycles);\ | 75 | // txt_printf("FLIP: %lu ", flip_cycles);\ |
77 | // } while (0) | 76 | // } while (0) |
77 | // */ | ||
78 | #define PROF_SHOW() \ | 78 | #define PROF_SHOW() \ |
79 | do { \ | 79 | do { \ |
80 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ | 80 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ |
81 | txt_printf("1BPP: %lu 2BPP: %lu", ppu_icn_cycles, ppu_chr_cycles);\ | 81 | txt_printf("1BPP: %lu 2BPP: %lu", ppu_icn_cycles, ppu_chr_cycles);\ |
82 | } while (0) | 82 | } while (0) |
83 | #define PROF_INIT() \ | 83 | static u32 ppu_pixel_cycles = 0; |
84 | static u32 ppu_pixel_cycles = 0;\ | 84 | static u32 ppu_chr_cycles = 0; |
85 | static u32 ppu_chr_cycles = 0;\ | 85 | static u32 ppu_icn_cycles = 0; |
86 | static u32 ppu_icn_cycles = 0;\ | 86 | static u32 flip_cycles = 0; |
87 | static u32 flip_cycles = 0;\ | 87 | static u32 eval_cycles = 0; |
88 | static u32 eval_cycles = 0;\ | 88 | static u32 input_cycles = 0; |
89 | static u32 input_cycles = 0;\ | 89 | static u32 mix_cycles = 0; |
90 | static u32 mix_cycles = 0; | ||
91 | |||
92 | PROF_INIT(); | ||
93 | #else | 90 | #else |
94 | #define PROF(F,VAR) (F) | 91 | #define PROF(F,VAR) (F) |
95 | #define PROF_SHOW() | 92 | #define PROF_SHOW() |
@@ -600,7 +600,6 @@ ppu_2bpp(u32 *layer, u16 x, u16 y, u8 *sprite, u8 clr, u8 flip_x, u8 flip_y) { | |||
600 | } | 600 | } |
601 | } | 601 | } |
602 | } else { | 602 | } else { |
603 | u8 clr0 = blending[0][clr]; | ||
604 | u8 clr1 = blending[1][clr]; | 603 | u8 clr1 = blending[1][clr]; |
605 | u8 clr2 = blending[2][clr]; | 604 | u8 clr2 = blending[2][clr]; |
606 | u8 clr3 = blending[3][clr]; | 605 | u8 clr3 = blending[3][clr]; |