summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-06-10 19:19:42 +0200
committerBad Diode <bd@badd10de.dev>2021-06-10 19:19:42 +0200
commit662058f10989f4a0cee6bfdbcf61786f2bb6a687 (patch)
treed4d302348809d44e575fd64fdb5865d36d369a2c
parent958d175aededa1f2c8cc8fc946fd6b36b5c1e8e9 (diff)
downloadgba-sequencer-662058f10989f4a0cee6bfdbcf61786f2bb6a687.tar.gz
gba-sequencer-662058f10989f4a0cee6bfdbcf61786f2bb6a687.zip
Fix compiler warnings
-rw-r--r--src/gba/gba.h4
-rw-r--r--src/sequencer.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gba/gba.h b/src/gba/gba.h
index e475ea9..797c71e 100644
--- a/src/gba/gba.h
+++ b/src/gba/gba.h
@@ -342,8 +342,8 @@ unpack_1bb(u8 hex) {
342// Unpack N tiles packed at 1bpp. 342// Unpack N tiles packed at 1bpp.
343static inline 343static inline
344void 344void
345unpack_tiles(u32 *src, u32 *dst, size_t n_tiles) { 345unpack_tiles(const u32 *src, u32 *dst, size_t n_tiles) {
346 u32 *target_src = src + n_tiles * 2; 346 const u32 *target_src = src + n_tiles * 2;
347 while (src != target_src) { 347 while (src != target_src) {
348 *dst++ = unpack_1bb((*src >> 24) & 0xFF); 348 *dst++ = unpack_1bb((*src >> 24) & 0xFF);
349 *dst++ = unpack_1bb((*src >> 16) & 0xFF); 349 *dst++ = unpack_1bb((*src >> 16) & 0xFF);
diff --git a/src/sequencer.c b/src/sequencer.c
index 56d8089..d31475e 100644
--- a/src/sequencer.c
+++ b/src/sequencer.c
@@ -159,8 +159,8 @@ typedef struct ChannelSquareParams {
159typedef struct ChannelWaveParams { 159typedef struct ChannelWaveParams {
160 u8 wave_volume; 160 u8 wave_volume;
161 u8 wave_mode; 161 u8 wave_mode;
162 u8 wave_a[16]; 162 u32 wave_a[4];
163 u8 wave_b[16]; 163 u32 wave_b[4];
164} ChannelWaveParams; 164} ChannelWaveParams;
165 165
166typedef struct ChannelSquare { 166typedef struct ChannelSquare {
@@ -429,10 +429,10 @@ draw_note(u8 note, u8 clr) {
429 size_t octave = note / 12; 429 size_t octave = note / 12;
430 size_t value = note % 12; 430 size_t value = note % 12;
431 431
432 size_t x0; 432 size_t x0 = 0;
433 size_t y0; 433 size_t y0 = 0;
434 size_t x1; 434 size_t x1 = 0;
435 size_t y1; 435 size_t y1 = 0;
436 switch (value) { 436 switch (value) {
437 // White notes. 437 // White notes.
438 case 0:{ 438 case 0:{