diff --git a/Core/apu.h b/Core/apu.h index fd947f7..f75d25e 100644 --- a/Core/apu.h +++ b/Core/apu.h @@ -2,6 +2,7 @@ #define apu_h #include #include +#include #include "gb_struct_def.h" diff --git a/Core/display.h b/Core/display.h index 0546fda..9d1d1b4 100644 --- a/Core/display.h +++ b/Core/display.h @@ -2,6 +2,9 @@ #define display_h #include "gb.h" +#include +#include + #ifdef GB_INTERNAL void GB_display_run(GB_gameboy_t *gb, uint8_t cycles); void GB_palette_changed(GB_gameboy_t *gb, bool background_palette, uint8_t index); diff --git a/Core/joypad.h b/Core/joypad.h index def4b9a..83d3734 100644 --- a/Core/joypad.h +++ b/Core/joypad.h @@ -1,6 +1,7 @@ #ifndef joypad_h #define joypad_h #include "gb_struct_def.h" +#include typedef enum { GB_KEY_RIGHT, diff --git a/Core/mbc.h b/Core/mbc.h index e7260f5..7e9b47f 100644 --- a/Core/mbc.h +++ b/Core/mbc.h @@ -1,6 +1,7 @@ #ifndef MBC_h #define MBC_h #include "gb_struct_def.h" +#include typedef struct { enum { diff --git a/Core/memory.h b/Core/memory.h index c000b7a..03d636d 100644 --- a/Core/memory.h +++ b/Core/memory.h @@ -1,6 +1,7 @@ #ifndef memory_h #define memory_h -#include "gb.h" +#include "gb_struct_def.h" +#include uint8_t GB_read_memory(GB_gameboy_t *gb, uint16_t addr); void GB_write_memory(GB_gameboy_t *gb, uint16_t addr, uint8_t value); diff --git a/Core/rewind.c b/Core/rewind.c index ae711a2..c3900d6 100644 --- a/Core/rewind.c +++ b/Core/rewind.c @@ -1,4 +1,7 @@ -#include "rewind.h" +#include "gb.h" +#include +#include +#include #include static uint8_t *state_compress(const uint8_t *prev, const uint8_t *data, size_t uncompressed_size) diff --git a/Core/rewind.h b/Core/rewind.h index 30d795c..ad54841 100644 --- a/Core/rewind.h +++ b/Core/rewind.h @@ -1,7 +1,8 @@ #ifndef rewind_h #define rewind_h -#include "gb.h" +#include +#include "gb_struct_def.h" #ifdef GB_INTERNAL void GB_rewind_push(GB_gameboy_t *gb); diff --git a/Core/symbol_hash.c b/Core/symbol_hash.c index 709421c..208e72d 100644 --- a/Core/symbol_hash.c +++ b/Core/symbol_hash.c @@ -1,4 +1,8 @@ #include "gb.h" +#include +#include +#include +#include static size_t GB_map_find_symbol_index(GB_symbol_map_t *map, uint16_t addr) { diff --git a/Core/symbol_hash.h b/Core/symbol_hash.h index 239b0e3..2a03c96 100644 --- a/Core/symbol_hash.h +++ b/Core/symbol_hash.h @@ -3,6 +3,7 @@ #include #include +#include typedef struct { char *name; diff --git a/Core/timing.h b/Core/timing.h index 1ea4b8a..02ca54c 100644 --- a/Core/timing.h +++ b/Core/timing.h @@ -1,6 +1,6 @@ #ifndef timing_h #define timing_h -#include "gb.h" +#include "gb_struct_def.h" #ifdef GB_INTERNAL void GB_advance_cycles(GB_gameboy_t *gb, uint8_t cycles); diff --git a/Core/z80_cpu.h b/Core/z80_cpu.h index 1434ed7..3541fa8 100644 --- a/Core/z80_cpu.h +++ b/Core/z80_cpu.h @@ -1,6 +1,7 @@ #ifndef z80_cpu_h #define z80_cpu_h -#include "gb.h" +#include "gb_struct_def.h" +#include void GB_cpu_disassemble(GB_gameboy_t *gb, uint16_t pc, uint16_t count); #ifdef GB_INTERNAL diff --git a/SDL/gui.c b/SDL/gui.c index e3b7206..8651764 100644 --- a/SDL/gui.c +++ b/SDL/gui.c @@ -1,6 +1,9 @@ #include #include #include +#include +#include +#include #include "utils.h" #include "gui.h" #include "font.h" @@ -48,7 +51,8 @@ void render_texture(void *pixels, void *previous) configuration_t configuration = { - .keys = { SDL_SCANCODE_RIGHT, + .keys = { + SDL_SCANCODE_RIGHT, SDL_SCANCODE_LEFT, SDL_SCANCODE_UP, SDL_SCANCODE_DOWN, diff --git a/SDL/gui.h b/SDL/gui.h index 2c99b9f..692c766 100644 --- a/SDL/gui.h +++ b/SDL/gui.h @@ -3,8 +3,10 @@ #include #include +#include #include "shader.h" + extern SDL_Window *window; extern SDL_Renderer *renderer; extern SDL_Texture *texture; diff --git a/SDL/utils.h b/SDL/utils.h index 21e900a..7995da9 100644 --- a/SDL/utils.h +++ b/SDL/utils.h @@ -1,5 +1,6 @@ #ifndef utils_h #define utils_h +#include const char *executable_folder(void); char *executable_relative_path(const char *filename);