Browse Source

tweak webpage and extend game music

Thomas B 3 weeks ago
parent
commit
626eb589c0
2 changed files with 34 additions and 5 deletions
  1. 9
    3
      docs/index.html
  2. 25
    2
      src/sound_game.c

+ 9
- 3
docs/index.html View File

@@ -2,6 +2,7 @@
2 2
     <head>
3 3
         <title>Duality</title>
4 4
         <link rel="icon" type="image/png" href="favicon.png" />
5
+        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.3/gh-fork-ribbon.min.css" />
5 6
         <style>
6 7
             body {
7 8
                 background: linear-gradient(
@@ -39,12 +40,12 @@
39 40
             ul {
40 41
                 list-style-type: none;
41 42
             }
42
-            body, #wrap, .text {
43
+            body, #wrap, .text, .github-fork-ribbon:before, .github-fork-ribbon:after {
43 44
                 background-color: #DDDDDD;
44 45
                 color: #000000;
45 46
             }
46 47
             @media (prefers-color-scheme: dark) {
47
-                body, #wrap, .text {
48
+                body, #wrap, .text, .github-fork-ribbon:before, .github-fork-ribbon:after {
48 49
                     background-color: #111111;
49 50
                     color: #FFFFFF;
50 51
                 }
@@ -55,6 +56,10 @@
55 56
         <div class="text">
56 57
             <h1>Duality</h1>
57 58
             <p>A GameBoy (Color) port of the GTA San Andreas arcade game Duality.</p>
59
+            <p>
60
+                <img src="https://github.com/xythobuz/Duality/actions/workflows/build.yml/badge.svg" alt="ROM" style="max-width: 100%; height: auto;">
61
+                <img src="https://github.com/xythobuz/Duality/actions/workflows/docs.yml/badge.svg" alt="Web" style="max-width: 100%; height: auto;">
62
+            </p>
58 63
         </div>
59 64
         <div id="wrap">
60 65
             <div id="game"></div>
@@ -91,7 +96,7 @@
91 96
         <div class="text">
92 97
             <h2>Downloads</h2>
93 98
             <p>Download the <a href="https://xythobuz.github.io/Duality/duality.gb">ROM</a>!</p>
94
-            <p>Get the source code on <a href="https://github.com/xythobuz/Duality">GitHub</a>.</p>
99
+            <p>Get the source code on <a href="https://codeberg.org/xythobuz/Duality">CodeBerg</a> or <a href="https://github.com/xythobuz/Duality">GitHub</a>.</p>
95 100
         </div>
96 101
         <div class="text">
97 102
             <h2>Artwork</h2>
@@ -100,6 +105,7 @@
100 105
         <div class="text">
101 106
             <p>Emulation supported by <a href="https://emulatorjs.org">EmulatorJS</a>.</p>
102 107
         </div>
108
+        <a class="github-fork-ribbon fixed right-bottom" href="https://codeberg.org/xythobuz/Duality" data-ribbon="Fork this with Git" title="Fork this with Git">Fork this with Git</a>
103 109
         <script>
104 110
             EJS_player = "#game";
105 111
             EJS_core = "gb";

+ 25
- 2
src/sound_game.c View File

@@ -32,9 +32,21 @@ BANKREF(sound_game)
32 32
     F1,  F1,  F1,  G1, Gd2, Gd1, Cd1,  D1, \
33 33
     D2,  D2,  D2, Fd1, Fd1,  D2,  D2,  D2
34 34
 
35
+// TODO
36
+#define DIFF_LOOP \
37
+    F1,  F1,  F1,  G1, Gd2, Gd1, Cd1,  D1, \
38
+    D2,  D2,  D2, Fd1, Fd1,  D2,  D2,  D2
35 39
 
36 40
 static const enum notes game_music[] = {
37
-    NOTE_LOOP,
41
+    NOTE_LOOP, NOTE_LOOP, NOTE_LOOP, NOTE_LOOP,
42
+    NOTE_LOOP, NOTE_LOOP, NOTE_LOOP, NOTE_LOOP,
43
+
44
+    NOTE_LOOP, NOTE_LOOP, NOTE_LOOP, NOTE_LOOP,
45
+
46
+    DIFF_LOOP, DIFF_LOOP, DIFF_LOOP, DIFF_LOOP,
47
+
48
+    NOTE_LOOP, NOTE_LOOP, NOTE_LOOP, NOTE_LOOP,
49
+
38 50
     END
39 51
 };
40 52
 
@@ -42,8 +54,19 @@ static const enum notes game_music[] = {
42 54
 dSn, dSI, dSn, dSI, dKi, dSI, dSI, dSI, \
43 55
 dSn, dSI, dSn, dSI, dKi, dSI, dSI, dSI  \
44 56
 
57
+#define SILE_LOOP \
58
+dSI, dSI, dSI, dSI, dSI, dSI, dSI, dSI, \
59
+dSI, dSI, dSI, dSI, dSI, dSI, dSI, dSI  \
60
+
45 61
 static const enum drums game_drums[] = {
46
-    DRUM_LOOP,
62
+    DRUM_LOOP, DRUM_LOOP, DRUM_LOOP, DRUM_LOOP,
63
+    DRUM_LOOP, DRUM_LOOP, DRUM_LOOP, DRUM_LOOP,
64
+
65
+    SILE_LOOP, SILE_LOOP, SILE_LOOP, SILE_LOOP,
66
+
67
+    DRUM_LOOP, DRUM_LOOP, DRUM_LOOP, DRUM_LOOP,
68
+    DRUM_LOOP, DRUM_LOOP, DRUM_LOOP, DRUM_LOOP,
69
+
47 70
     dEND
48 71
 };
49 72
 

Loading…
Cancel
Save