Include cleanup (#73)

This commit is contained in:
Lior Halphon 2018-05-27 19:30:23 +03:00
parent 6532aef089
commit 80c92daacd
14 changed files with 30 additions and 6 deletions

View File

@ -2,6 +2,7 @@
#define apu_h
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "gb_struct_def.h"

View File

@ -2,6 +2,9 @@
#define display_h
#include "gb.h"
#include <stdbool.h>
#include <stdint.h>
#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);

View File

@ -1,6 +1,7 @@
#ifndef joypad_h
#define joypad_h
#include "gb_struct_def.h"
#include <stdbool.h>
typedef enum {
GB_KEY_RIGHT,

View File

@ -1,6 +1,7 @@
#ifndef MBC_h
#define MBC_h
#include "gb_struct_def.h"
#include <stdbool.h>
typedef struct {
enum {

View File

@ -1,6 +1,7 @@
#ifndef memory_h
#define memory_h
#include "gb.h"
#include "gb_struct_def.h"
#include <stdint.h>
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);

View File

@ -1,4 +1,7 @@
#include "rewind.h"
#include "gb.h"
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <math.h>
static uint8_t *state_compress(const uint8_t *prev, const uint8_t *data, size_t uncompressed_size)

View File

@ -1,7 +1,8 @@
#ifndef rewind_h
#define rewind_h
#include "gb.h"
#include <stdbool.h>
#include "gb_struct_def.h"
#ifdef GB_INTERNAL
void GB_rewind_push(GB_gameboy_t *gb);

View File

@ -1,4 +1,8 @@
#include "gb.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
static size_t GB_map_find_symbol_index(GB_symbol_map_t *map, uint16_t addr)
{

View File

@ -3,6 +3,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
typedef struct {
char *name;

View File

@ -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);

View File

@ -1,6 +1,7 @@
#ifndef z80_cpu_h
#define z80_cpu_h
#include "gb.h"
#include "gb_struct_def.h"
#include <stdint.h>
void GB_cpu_disassemble(GB_gameboy_t *gb, uint16_t pc, uint16_t count);
#ifdef GB_INTERNAL

View File

@ -1,6 +1,9 @@
#include <SDL2/SDL.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#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,

View File

@ -3,8 +3,10 @@
#include <SDL2/SDL.h>
#include <Core/gb.h>
#include <stdbool.h>
#include "shader.h"
extern SDL_Window *window;
extern SDL_Renderer *renderer;
extern SDL_Texture *texture;

View File

@ -1,5 +1,6 @@
#ifndef utils_h
#define utils_h
#include <stddef.h>
const char *executable_folder(void);
char *executable_relative_path(const char *filename);