ソースを参照

Refactor structure

Isolate input items into their own directory.
feature/data-structs
コミット
ca36ea018d
7個のファイルの変更8行の追加9行の削除
  1. +1
    -3
      CMakeLists.txt
  2. +1
    -1
      src/packages/game/IZ_app.h
  3. +0
    -1
      src/packages/game/IZ_common.h
  4. +3
    -1
      src/packages/game/input/IZ_action.h
  5. +1
    -1
      src/packages/game/input/IZ_joystick.h
  6. +1
    -1
      src/packages/game/input/IZ_keyboard.h
  7. +1
    -1
      src/packages/game/main.c

+ 1
- 3
CMakeLists.txt ファイルの表示

@@ -33,7 +33,7 @@ add_executable(
src/packages/game/output/IZ_video.h
src/packages/game/output/IZ_video.c
src/packages/game/IZ_common.h
src/packages/game/IZ_action.h
src/packages/game/input/IZ_action.h
src/packages/game/IZ_app.h
src/packages/game/IZ_app.c
src/packages/game/main.c
@@ -77,7 +77,6 @@ add_executable(
__mocks__/SDL_joystick.mock.h

src/packages/game/IZ_config.h
src/packages/game/__mocks__/IZ_config.mock.h

src/packages/game/input/IZ_keyboard.h
src/packages/game/input/IZ_keyboard.c
@@ -98,7 +97,6 @@ add_executable(
__mocks__/minIni.mock.h

src/packages/game/IZ_config.h
src/packages/game/__mocks__/IZ_config.mock.h

src/packages/game/output/IZ_video.h
src/packages/game/output/IZ_video.c


+ 1
- 1
src/packages/game/IZ_app.h ファイルの表示

@@ -6,7 +6,7 @@
#include "input/IZ_joystick.h"
#include "output/IZ_video.h"
#include "memory/IZ_pool.h"
#include "IZ_action.h"
#include "input/IZ_action.h"

typedef struct {
IZ_Action actions[PLAYERS];


+ 0
- 1
src/packages/game/IZ_common.h ファイルの表示

@@ -3,7 +3,6 @@

#include <stdint.h>

#define CONTROLS 16
#define PLAYERS 1

static const char* APP_NAME = "SDL2";


src/packages/game/IZ_action.h → src/packages/game/input/IZ_action.h ファイルの表示

@@ -1,7 +1,9 @@
#ifndef IZ_ACTION_H
#define IZ_ACTION_H

#include "IZ_common.h"
#include "../IZ_common.h"

#define CONTROLS 16

typedef uint16_t IZ_Action;


+ 1
- 1
src/packages/game/input/IZ_joystick.h ファイルの表示

@@ -4,7 +4,7 @@
#include <SDL_joystick.h>
#include <SDL_events.h>
#include <minIni.h>
#include "../IZ_action.h"
#include "IZ_action.h"

typedef uint8_t IZ_PadButton;



+ 1
- 1
src/packages/game/input/IZ_keyboard.h ファイルの表示

@@ -4,7 +4,7 @@
#include <SDL_keyboard.h>
#include <SDL_events.h>
#include <minIni.h>
#include "../IZ_action.h"
#include "IZ_action.h"

typedef struct {
SDL_KeyCode control_mapping[CONTROLS];


+ 1
- 1
src/packages/game/main.c ファイルの表示

@@ -1,7 +1,7 @@
#include <SDL.h>
#include <stdbool.h>

#include "IZ_action.h"
#include "input/IZ_action.h"
#include "IZ_app.h"

int main(int argc, char* args[]) {


読み込み中…
キャンセル
保存