Move device to a separate build target
This commit is contained in:
@ -2,5 +2,6 @@ cc_library(
|
||||
name = "game",
|
||||
srcs = glob(["*.c"]),
|
||||
hdrs = glob(["*.h"]),
|
||||
visibility = ["//sdl_host:__pkg__"]
|
||||
)
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//device:device"]
|
||||
)
|
@ -1,5 +0,0 @@
|
||||
#include <stdbool.h>
|
||||
#include "device.h"
|
||||
|
||||
uint32_t device_pixels[DEVICE_H][DEVICE_W];
|
||||
bool device_buttons[DEVICE_BUTTON_N];
|
@ -1,28 +0,0 @@
|
||||
#ifndef CROCPARTY_DEVICE_H
|
||||
#define CROCPARTY_DEVICE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
// 240 x 135 is also cool
|
||||
#define DEVICE_W 128
|
||||
#define DEVICE_H 128
|
||||
|
||||
typedef enum {
|
||||
DEVICE_BUTTON_L=0,
|
||||
DEVICE_BUTTON_R=1,
|
||||
DEVICE_BUTTON_U=2,
|
||||
DEVICE_BUTTON_D=3,
|
||||
|
||||
DEVICE_BUTTON_0=4,
|
||||
DEVICE_BUTTON_1=5,
|
||||
DEVICE_BUTTON_2=6,
|
||||
DEVICE_BUTTON_3=7,
|
||||
|
||||
DEVICE_BUTTON_N=8,
|
||||
} DeviceButton;
|
||||
|
||||
extern uint32_t device_pixels[DEVICE_H][DEVICE_W];
|
||||
extern bool device_buttons[DEVICE_BUTTON_N];
|
||||
|
||||
#endif //CROCPARTY_DEVICE_H
|
@ -1,4 +1,4 @@
|
||||
#include "device.h"
|
||||
#include "device/device.h"
|
||||
#include "game.h"
|
||||
|
||||
uint32_t game_frame;
|
||||
|
Reference in New Issue
Block a user