aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpingflood2019-05-22 09:24:54 -0300
committerpingflood2019-05-22 09:24:54 -0300
commit29bd94d6fca0b084e8f3a6b9ed19d747a21a5eb8 (patch)
tree5cd6690b87bb27102c3059d78cb95274e7ffdf72
parent2c1cfd934caa37aaa566dc6ea8197ee92cc5ab6d (diff)
downloadhydracastlelabyrinth-29bd94d6fca0b084e8f3a6b9ed19d747a21a5eb8.tar.gz
hydracastlelabyrinth-29bd94d6fca0b084e8f3a6b9ed19d747a21a5eb8.tar.bz2
hydracastlelabyrinth-29bd94d6fca0b084e8f3a6b9ed19d747a21a5eb8.zip
Fix button mapping and sound
-rw-r--r--hcl/data/midi/allclear.mid.oggbin0 -> 106894 bytes
-rw-r--r--hcl/data/midi/boss.mid.oggbin0 -> 1743448 bytes
-rw-r--r--hcl/data/midi/clear.mid.oggbin0 -> 56760 bytes
-rw-r--r--hcl/data/midi/ending.mid.oggbin0 -> 468616 bytes
-rw-r--r--hcl/data/midi/gameover.mid.oggbin0 -> 101272 bytes
-rw-r--r--hcl/data/midi/init.mid.oggbin0 -> 7711 bytes
-rw-r--r--hcl/data/midi/lastboss.mid.oggbin0 -> 1946650 bytes
-rw-r--r--hcl/data/midi/main01.mid.oggbin0 -> 3157303 bytes
-rw-r--r--hcl/data/midi/main02.mid.oggbin0 -> 2933863 bytes
-rw-r--r--hcl/data/midi/main03.mid.oggbin0 -> 3239523 bytes
-rw-r--r--hcl/data/midi/main04.mid.oggbin0 -> 2298544 bytes
-rw-r--r--hcl/data/midi/main05.mid.oggbin0 -> 1690990 bytes
-rw-r--r--hcl/data/midi/main06.mid.oggbin0 -> 3386710 bytes
-rw-r--r--hcl/data/midi/nazo.mid.oggbin0 -> 38778 bytes
-rw-r--r--hcl/data/midi/start.mid.oggbin0 -> 40773 bytes
-rw-r--r--src/sdl/input.c27
16 files changed, 18 insertions, 9 deletions
diff --git a/hcl/data/midi/allclear.mid.ogg b/hcl/data/midi/allclear.mid.ogg
new file mode 100644
index 0000000..5965bed
--- /dev/null
+++ b/hcl/data/midi/allclear.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/boss.mid.ogg b/hcl/data/midi/boss.mid.ogg
new file mode 100644
index 0000000..1ae66a5
--- /dev/null
+++ b/hcl/data/midi/boss.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/clear.mid.ogg b/hcl/data/midi/clear.mid.ogg
new file mode 100644
index 0000000..3654893
--- /dev/null
+++ b/hcl/data/midi/clear.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/ending.mid.ogg b/hcl/data/midi/ending.mid.ogg
new file mode 100644
index 0000000..dbde529
--- /dev/null
+++ b/hcl/data/midi/ending.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/gameover.mid.ogg b/hcl/data/midi/gameover.mid.ogg
new file mode 100644
index 0000000..bd66e46
--- /dev/null
+++ b/hcl/data/midi/gameover.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/init.mid.ogg b/hcl/data/midi/init.mid.ogg
new file mode 100644
index 0000000..6b94f26
--- /dev/null
+++ b/hcl/data/midi/init.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/lastboss.mid.ogg b/hcl/data/midi/lastboss.mid.ogg
new file mode 100644
index 0000000..d2d72a8
--- /dev/null
+++ b/hcl/data/midi/lastboss.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/main01.mid.ogg b/hcl/data/midi/main01.mid.ogg
new file mode 100644
index 0000000..32f8ce8
--- /dev/null
+++ b/hcl/data/midi/main01.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/main02.mid.ogg b/hcl/data/midi/main02.mid.ogg
new file mode 100644
index 0000000..f8cf58a
--- /dev/null
+++ b/hcl/data/midi/main02.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/main03.mid.ogg b/hcl/data/midi/main03.mid.ogg
new file mode 100644
index 0000000..e0001d0
--- /dev/null
+++ b/hcl/data/midi/main03.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/main04.mid.ogg b/hcl/data/midi/main04.mid.ogg
new file mode 100644
index 0000000..44cd8c7
--- /dev/null
+++ b/hcl/data/midi/main04.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/main05.mid.ogg b/hcl/data/midi/main05.mid.ogg
new file mode 100644
index 0000000..d650fbe
--- /dev/null
+++ b/hcl/data/midi/main05.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/main06.mid.ogg b/hcl/data/midi/main06.mid.ogg
new file mode 100644
index 0000000..84acdab
--- /dev/null
+++ b/hcl/data/midi/main06.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/nazo.mid.ogg b/hcl/data/midi/nazo.mid.ogg
new file mode 100644
index 0000000..7c8a913
--- /dev/null
+++ b/hcl/data/midi/nazo.mid.ogg
Binary files differ
diff --git a/hcl/data/midi/start.mid.ogg b/hcl/data/midi/start.mid.ogg
new file mode 100644
index 0000000..38b5d72
--- /dev/null
+++ b/hcl/data/midi/start.mid.ogg
Binary files differ
diff --git a/src/sdl/input.c b/src/sdl/input.c
index 662b85b..3036987 100644
--- a/src/sdl/input.c
+++ b/src/sdl/input.c
@@ -42,6 +42,15 @@ void Input_CloseJoystick()
joy1 = NULL;
}
+#define BTN_X SDLK_SPACE
+#define BTN_A SDLK_LCTRL
+#define BTN_B SDLK_LALT
+#define BTN_Y SDLK_LSHIFT
+#define BTN_L SDLK_TAB
+#define BTN_R SDLK_BACKSPACE
+#define BTN_START SDLK_RETURN
+#define BTN_SELECT SDLK_ESCAPE
+
void Input_KeyEvent(SDL_Event* evt)
{
int w = (evt->type==SDL_KEYDOWN)?1:0;
@@ -70,14 +79,14 @@ void Input_KeyEvent(SDL_Event* evt)
case SDLK_SPACE: bSelect = w; break;
case SDLK_RETURN: bStart = w; break;
#elif defined(DINGUX)
- case SDLK_LSHIFT: bFaceUp = w; break;
- case SDLK_LALT: bFaceDown = w; break;
- case SDLK_LCTRL: bFaceLeft = w; break;
- case SDLK_SPACE: bFaceRight = w; break;
- case SDLK_BACKSPACE: bR = w; break;
- case SDLK_TAB: bL = w; break;
- case SDLK_ESCAPE: bSelect = w; break;
- case SDLK_RETURN: bStart = w; break;
+ case BTN_X: bFaceUp = w; break;
+ case BTN_B: bFaceDown = w; break;
+ case BTN_Y: bFaceLeft = w; break;
+ case BTN_A: bFaceRight = w; break;
+ case BTN_R: bR = w; break;
+ case BTN_L: bL = w; break;
+ case BTN_START: bSelect = w; break;
+ case BTN_SELECT: bStart = w; break;
#else
case SDLK_e: bFaceUp = w; break;
case SDLK_x: bFaceDown = w; break;
@@ -203,6 +212,6 @@ void PHL_ScanInput()
updateKey(&btnFaceDown, bFaceDown|jFaceDown);
updateKey(&btnFaceRight, bFaceRight|jFaceRight);
- updateKey(&btnAccept, bFaceLeft|jFaceLeft);
+ updateKey(&btnAccept, bFaceLeft|jFaceLeft|bFaceRight|bFaceRight);
updateKey(&btnDecline, bFaceDown|jFaceDown);
}