Skip to content

Commit

Permalink
Every header is now a hpp header.
Browse files Browse the repository at this point in the history
  • Loading branch information
bustatu committed Aug 25, 2021
1 parent e6cb012 commit fc20d0a
Show file tree
Hide file tree
Showing 53 changed files with 80 additions and 80 deletions.
2 changes: 1 addition & 1 deletion audio.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "audio.h"
#include "audio.hpp"

Audio::Audio()
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion emulators/bytepusher/bytepusher.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "bytepusher.h"
#include "bytepusher.hpp"

namespace Bytepusher
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef BYTEPUSHER_H
#define BYTEPUSHER_H

#include "../../state.h"
#include "components/vm.h"
#include "../../state.hpp"
#include "components/vm.hpp"
#include <fstream>

namespace Bytepusher
Expand Down
2 changes: 1 addition & 1 deletion emulators/bytepusher/components/vm.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "vm.h"
#include "vm.hpp"

namespace Bytepusher
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef BYTEPUSHER_VM_H
#define BYTEPUSHER_VM_H

#include "../../../window.h"
#include "../../../window.hpp"
#include <SDL2/SDL.h>
#include <iostream>
#include <cstring>
Expand Down
2 changes: 1 addition & 1 deletion emulators/chip8/chip8.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "chip8.h"
#include "chip8.hpp"

#ifndef M_PI
// PI is not standardly defined everywhere
Expand Down
8 changes: 4 additions & 4 deletions emulators/chip8/chip8.h → emulators/chip8/chip8.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#include <fstream>
#include <cmath>
#include "../../state.h"
#include "../../gui/gui.h"
#include "components/vm.h"
#include "components/input.h"
#include "../../state.hpp"
#include "../../gui/gui.hpp"
#include "components/vm.hpp"
#include "components/input.hpp"
#include "../../external/json/single_include/nlohmann/json.hpp"

namespace CHIP8
Expand Down
2 changes: 1 addition & 1 deletion emulators/chip8/components/graphics.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "graphics.h"
#include "graphics.hpp"

namespace CHIP8
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion emulators/chip8/components/input.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "input.h"
#include "input.hpp"

namespace CHIP8
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define CHIP8_INPUT_H

#include <iostream>
#include "SDL2/SDL.h"
#include <SDL2/SDL.h>

namespace CHIP8
{
Expand Down
2 changes: 1 addition & 1 deletion emulators/chip8/components/vm.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "vm.h"
#include "vm.hpp"

#define N000(opcode) ((opcode & 0xF000) >> 12)
#define NNN(opcode) (opcode & 0xFFF)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef CHIP8_VM_H
#define CHIP8_VM_H

#include "../../../window.h"
#include "input.h"
#include "graphics.h"
#include "../../../window.hpp"
#include "input.hpp"
#include "graphics.hpp"
#include <SDL2/SDL.h>
#include <cstring>
#include <sstream>
Expand Down
9 changes: 0 additions & 9 deletions emulators/emulators.h

This file was deleted.

9 changes: 9 additions & 0 deletions emulators/emulators.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef EMULATORS_H
#define EMULATORS_H

#include "nes/nes.hpp"
#include "chip8/chip8.hpp"
#include "gameboy/gameboy.hpp"
#include "bytepusher/bytepusher.hpp"

#endif
2 changes: 1 addition & 1 deletion emulators/gameboy/components/bios/bios.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "bios.h"
#include "bios.hpp"

namespace Gameboy
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion emulators/gameboy/components/bus/bus.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "bus.h"
#include "bus.hpp"

namespace Gameboy
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef GAMEBOY_BUS_H
#define GAMEBOY_BUS_H

#include "../bios/bios.h"
#include "../ram/ram.h"
#include "../rom/rom.h"
#include "../bios/bios.hpp"
#include "../ram/ram.hpp"
#include "../rom/rom.hpp"

namespace Gameboy
{
Expand Down
11 changes: 0 additions & 11 deletions emulators/gameboy/components/components.h

This file was deleted.

11 changes: 11 additions & 0 deletions emulators/gameboy/components/components.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef GAMEBOY_COMPONENTS_H
#define GAMEBOY_COMPONENTS_H

#include "bios/bios.hpp"
#include "bus/bus.hpp"
#include "cpu/cpu.hpp"
#include "gpu/gpu.hpp"
#include "ram/ram.hpp"
#include "rom/rom.hpp"

#endif
2 changes: 1 addition & 1 deletion emulators/gameboy/components/cpu/cpu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "cpu.h"
#include "cpu.hpp"

/// Macros for better usability
#define op_push(val) \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef GAMEBOY_CPU_H
#define GAMEBOY_CPU_H

#include "../bus/bus.h"
#include "../bus/bus.hpp"
#include <sstream>

namespace Gameboy
Expand Down
2 changes: 1 addition & 1 deletion emulators/gameboy/components/gpu/gpu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "gpu.h"
#include "gpu.hpp"

namespace Gameboy
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define GAMEBOY_GPU_H

#include <SDL2/SDL.h>
#include "../bus/bus.h"
#include "../bus/bus.hpp"

/* Thanks to this for letting me understand what is going on:
https://github.com/paramsingh/gameboi */
Expand Down
2 changes: 1 addition & 1 deletion emulators/gameboy/components/ram/ram.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "ram.h"
#include "ram.hpp"

namespace Gameboy
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion emulators/gameboy/components/rom/rom.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "rom.h"
#include "rom.hpp"

namespace Gameboy
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion emulators/gameboy/gameboy.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "gameboy.h"
#include "gameboy.hpp"

namespace Gameboy
{
Expand Down
4 changes: 2 additions & 2 deletions emulators/gameboy/gameboy.h → emulators/gameboy/gameboy.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef GAMEBOY_H
#define GAMEBOY_H

#include "../../state.h"
#include "components/components.h"
#include "../../state.hpp"
#include "components/components.hpp"

namespace Gameboy
{
Expand Down
2 changes: 1 addition & 1 deletion emulators/nes/components/bus/bus.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "bus.h"
#include "bus.hpp"

namespace NES
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion emulators/nes/components/cpu/cpu.cpp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#include "cpu.h"
#include "cpu.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define NES_CPU_H

#include <fstream>
#include "../bus/bus.h"
#include "../bus/bus.hpp"

namespace NES
{
Expand Down
2 changes: 1 addition & 1 deletion emulators/nes/components/rom/rom.cpp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#include "rom.h"
#include "rom.hpp"
File renamed without changes.
2 changes: 1 addition & 1 deletion emulators/nes/nes.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "nes.h"
#include "nes.hpp"

namespace NES
{
Expand Down
4 changes: 2 additions & 2 deletions emulators/nes/nes.h → emulators/nes/nes.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef NES_H
#define NES_H

#include "../../state.h"
#include "../../gui/gui.h"
#include "../../state.hpp"
#include "../../gui/gui.hpp"
#include <fstream>

namespace NES
Expand Down
7 changes: 0 additions & 7 deletions gui/gui.h

This file was deleted.

7 changes: 7 additions & 0 deletions gui/gui.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef GUI_H
#define GUI_H

#include "text/font.hpp"
#include "text/text.hpp"

#endif
2 changes: 1 addition & 1 deletion gui/text/font.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "font.h"
#include "font.hpp"

void Font::load()
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion gui/text/text.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "text.h"
#include "text.hpp"

void Text::render()
{
Expand Down
2 changes: 1 addition & 1 deletion gui/text/text.h → gui/text/text.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef TEXT_H
#define TEXT_H

#include "font.h"
#include "font.hpp"

class Text
{
Expand Down
6 changes: 3 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define SDL_MAIN_HANDLED
#include "window.h"
#include "state.h"
#include "menus/main_menu.h"
#include "window.hpp"
#include "state.hpp"
#include "menus/main_menu.hpp"

// State manager
StateManager stateManager;
Expand Down
2 changes: 1 addition & 1 deletion menus/main_menu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "main_menu.h"
#include "main_menu.hpp"

void MenuState::init()
{
Expand Down
6 changes: 3 additions & 3 deletions menus/main_menu.h → menus/main_menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define MAIN_MENU_H

#include <SDL2/SDL_ttf.h>
#include "../state.h"
#include "../gui/gui.h"
#include "../emulators/emulators.h"
#include "../state.hpp"
#include "../gui/gui.hpp"
#include "../emulators/emulators.hpp"

class MenuState : public State
{
Expand Down
2 changes: 1 addition & 1 deletion state.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "state.h"
#include "state.hpp"

bool State::isRunning()
{
Expand Down
2 changes: 1 addition & 1 deletion state.h → state.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef STATE_H
#define STATE_H

#include "window.h"
#include "window.hpp"
#include <iostream>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion window.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "window.h"
#include "window.hpp"

Window::Window()
{
Expand Down
2 changes: 1 addition & 1 deletion window.h → window.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef WINDOW_H
#define WINDOW_H

#include "audio.h"
#include "audio.hpp"
#include <map>
#include <iostream>
#include <SDL2/SDL.h>
Expand Down

0 comments on commit fc20d0a

Please sign in to comment.