Skip to content

Commit

Permalink
Simplify include of SGDK header files and remove custom types.h
Browse files Browse the repository at this point in the history
  • Loading branch information
rhargreaves committed Sep 7, 2024
1 parent 82f0953 commit 927ebe3
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 394 deletions.
3 changes: 1 addition & 2 deletions src/memcmp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#pragma once
#include "types.h"
#include <stddef.h>
#include "genesis.h"

s16 memcmp(const void* data1, const void* data2, size_t count);
1 change: 0 additions & 1 deletion src/midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "comm/comm.h"
#include "log.h"
#include "memcmp.h"
#include "memory.h"
#include "midi_fm.h"
#include "midi_psg.h"
#include "midi_fm_sm.h"
Expand Down
2 changes: 1 addition & 1 deletion src/midi.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "genesis.h"
#include "midi_fm.h"
#include "midi_psg.h"

Expand Down
2 changes: 0 additions & 2 deletions src/midi_dac.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "midi_dac.h"
#include "pcm_sample.h"
#include "snd/sound.h"
#include "snd/pcm/snd_pcm.h"

void midi_dac_note_on(u8 chan, u8 pitch, s8 cents, u8 velocity)
{
Expand Down
2 changes: 1 addition & 1 deletion src/midi_dac.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "genesis.h"

void midi_dac_note_on(u8 chan, u8 pitch, s8 cents, u8 velocity);
void midi_dac_reset(void);
Expand Down
2 changes: 1 addition & 1 deletion src/midi_fm.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "genesis.h"
#include "synth.h"
#include "types.h"

#define MAX_FM_CHAN 5
#define MIN_MIDI_PITCH 11
Expand Down
3 changes: 1 addition & 2 deletions src/midi_fm_sm.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once
#include "synth.h"
#include "types.h"
#include "genesis.h"

void midi_fm_sm_note_on(u8 chan, u8 pitch, s8 cents, u8 velocity);
void midi_fm_sm_reset(void);
Expand Down
4 changes: 0 additions & 4 deletions src/midi_psg.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
#include "midi.h"
#include "psg.h"
#include "scheduler.h"
#include "memory.h"
#include "psg.h"
#include "types.h"
#include "sys.h"
#include "pitchcents.h"

#define MIN_PSG_CHAN 6
Expand Down
2 changes: 1 addition & 1 deletion src/midi_psg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "genesis.h"

#define MIN_PSG_CHAN 6
#define MAX_PSG_CHAN 9
Expand Down
1 change: 0 additions & 1 deletion src/midi_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "midi.h"
#include "scheduler.h"
#include "synth.h"
#include "string.h"
#include "ui.h"
#include "comm/applemidi.h"
#include "log.h"
Expand Down
2 changes: 1 addition & 1 deletion src/midi_receiver.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "genesis.h"

void midi_receiver_read_if_comm_ready(void);
void midi_receiver_read(void);
Expand Down
2 changes: 1 addition & 1 deletion src/midi_sender.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "midi.h"
#include "midi_sender.h"
#include "midi.h"
#include "comm/comm.h"

void midi_sender_send_sysex(const u8* data, u16 length)
Expand Down
2 changes: 1 addition & 1 deletion src/midi_sender.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#include "types.h"
#include "genesis.h"

void midi_sender_send_sysex(const u8* data, u16 length);
1 change: 0 additions & 1 deletion src/note_priority.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "note_priority.h"
#include "memory.h"

void note_priority_init(NotePriorityStack* notePriority)
{
Expand Down
2 changes: 1 addition & 1 deletion src/note_priority.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "genesis.h"

#define NOTE_PRIORITY_LENGTH 10

Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions tests/cmocka_inc.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "genesis.h"
#include <setjmp.h>
#include "types.h"
#include "string.h"
#include <stddef.h>
#include <cmocka.h>
#include "asserts.h"
#include "unused.h"
Expand Down
Loading

0 comments on commit 927ebe3

Please sign in to comment.