1
0
mirror of synced 2024-11-27 17:00:53 +01:00

Fix build script

This commit is contained in:
BroGamer 2022-06-22 13:36:55 +12:00
parent 0c3df94c65
commit 15658043aa
4 changed files with 20 additions and 16 deletions

View File

@ -26,6 +26,7 @@ options:
${TARGET}/%.o: %.c
@echo BUILD $@
@${CC} -c ${CFLAGS} $< -o $@
@clang-tidy -header-filter=.* -system-headers $< -- ${CFLAGS}
.PHONY: SDL
SDL:
@ -54,6 +55,7 @@ patches:
dist-no-7z: options ${OUT} patches
mkdir -p out/plugins
cp ${TARGET}/${OUT}.dll out/
mv out/${OUT}.dll out/bnusio.dll
cp ${TARGET}/patches.*.dll out/plugins
cp dist/* out/

View File

@ -24,21 +24,21 @@ u16 drumMin = 0xFFFF;
#define ON_HIT(bind) IsButtonTapped (bind) ? drumMax == drumMin ? drumMax : (u16)(rand () % drumMax + drumMin) : 0
struct Keybindings EXIT = { .keycodes = { VK_ESCAPE } };
struct Keybindings COIN_ADD = { .keycodes = { VK_RETURN }, .buttons = { SDL_CONTROLLER_BUTTON_START } };
struct Keybindings TEST = { .keycodes = { VK_F1 } };
struct Keybindings SERVICE = { .keycodes = { VK_F2 } };
struct Keybindings DEBUG_UP = { .keycodes = { VK_UP } };
struct Keybindings DEBUG_DOWN = { .keycodes = { VK_DOWN } };
struct Keybindings DEBUG_ENTER = { .keycodes = { VK_RETURN } };
struct Keybindings P1_LEFT_BLUE = { .keycodes = { 'D' } };
struct Keybindings P1_LEFT_RED = { .keycodes = { 'F' } };
struct Keybindings P1_RIGHT_RED = { .keycodes = { 'J' } };
struct Keybindings P1_RIGHT_BLUE = { .keycodes = { 'K' } };
struct Keybindings P2_LEFT_BLUE = {};
struct Keybindings P2_LEFT_RED = {};
struct Keybindings P2_RIGHT_RED = {};
struct Keybindings P2_RIGHT_BLUE = {};
Keybindings EXIT = { .keycodes = { VK_ESCAPE } };
Keybindings COIN_ADD = { .keycodes = { VK_RETURN }, .buttons = { SDL_CONTROLLER_BUTTON_START } };
Keybindings TEST = { .keycodes = { VK_F1 } };
Keybindings SERVICE = { .keycodes = { VK_F2 } };
Keybindings DEBUG_UP = { .keycodes = { VK_UP } };
Keybindings DEBUG_DOWN = { .keycodes = { VK_DOWN } };
Keybindings DEBUG_ENTER = { .keycodes = { VK_RETURN } };
Keybindings P1_LEFT_BLUE = { .keycodes = { 'D' } };
Keybindings P1_LEFT_RED = { .keycodes = { 'F' } };
Keybindings P1_RIGHT_RED = { .keycodes = { 'J' } };
Keybindings P1_RIGHT_BLUE = { .keycodes = { 'K' } };
Keybindings P2_LEFT_BLUE = {};
Keybindings P2_LEFT_RED = {};
Keybindings P2_RIGHT_RED = {};
Keybindings P2_RIGHT_BLUE = {};
u16 __fastcall bnusio_GetAnalogIn (u8 which) {
switch (which) {

View File

@ -8,7 +8,7 @@ configPath (char *name) {
static char buffer[MAX_PATH];
GetModuleFileNameA (NULL, buffer, MAX_PATH);
*(strrchr (buffer, '\\') + 1) = 0;
strcat (buffer, name);
strcat_s (buffer, MAX_PATH, name);
return buffer;
}

View File

@ -41,6 +41,8 @@ struct Keybindings {
enum Scroll scroll[2];
};
typedef struct Keybindings Keybindings;
enum EnumType { none, keycode, button, axis, scroll };
struct ConfigValue {