Skip to content

Commit

Permalink
Merge pull request #4 from valiantlynx/c++
Browse files Browse the repository at this point in the history
C++
  • Loading branch information
valiantlynx authored Oct 19, 2024
2 parents adc28b5 + e22a042 commit f1d4f76
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 4 deletions.
Binary file modified src/build/linux/marshmallow_ghost_stack
Binary file not shown.
Binary file modified src/build/linux/marshmallow_ghost_stack.o
Binary file not shown.
2 changes: 1 addition & 1 deletion src/build/web/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctypehtml><html lang=EN-us><head><meta charset=utf-8><meta content="text/html; charset=utf-8"http-equiv=Content-Type><title>Marshmallow Ghost Stack by valiantlynx</title><meta content="Marshmallow Ghost Stack by valiantlynx"name=title><meta content="Web game developed using raylib, brought to you by valiantlynx"name=description><meta content="raylib, programming, games, webgame, C++, tailwind, valiantlynx, marshmallow ghost stack"name=keywords><meta content="width=device-width,initial-scale=1"name=viewport><meta content=website property=og:type><meta content="Marshmallow Ghost Stack by valiantlynx"property=og:title><meta content=image/png property=og:image:type><meta content="Web game developed by valiantlynx using raylib"property=og:image:alt><meta content=./resources/logo.png property=og:image><meta content="Marshmallow Ghost Stack by valiantlynx"property=og:site_name><meta content=https://www.valiantlynx.com property=og:url><meta content="Web game developed by valiantlynx using raylib"property=og:description><meta content=summary_large_image name=twitter:card><meta content=@valiantlynxz name=twitter:site><meta content="Marshmallow Ghost Stack by valiantlynx"name=twitter:title><meta content=./resources/screenshots/game.png name=twitter:image><meta content="Web game developed by valiantlynx using raylib"name=twitter:image:alt><meta content=https://www.valiantlynx.com name=twitter:url><meta content="Web game developed by valiantlynx using raylib"name=twitter:description><style>body{font-family:Arial,sans-serif;background-color:#1a202c;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;margin:0}#logo{width:64px;height:64px;background-image:url("https://www.raylib.com/common/raylib_logo.png");background-size:cover;border-radius:50%;margin-bottom:10px}#header{width:100%;background-color:#2d3748;text-align:center;padding:20px}#status{margin-top:20px;font-weight:700;color:#cbd5e0}#spinner{height:30px;width:30px;border-top:4px solid #f56565;border-right:4px solid transparent;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}input[type=button]{background-color:#4299e1;color:#fff;padding:10px 20px;border-radius:4px;font-weight:700;margin:5px;transition:background-color .2s}input[type=button]:hover{background-color:#2b6cb0}textarea{width:100%;height:140px;background-color:#2d3748;color:#68d391;padding:10px;border-radius:5px;font-family:"Lucida Console",monospace}#canvas{display:block;max-width:100%;height:auto;margin:0 auto}</style></head><body><header id=header><div id=logo class=mx-auto></div><h1 class="font-bold mt-2 text-2xl">Marshmallow Ghost Stack by valiantlynx</h1></header><div id=status>Downloading...</div><div id=spinner class=mx-auto></div><div id=controls><input onclick='location.href="https://github.com/raysan5/raylib"'type=button value="📜 Source Code"> <input onclick=Module.requestFullscreen(!1,!1) type=button value="🖵 Fullscreen"> <input onclick=toggleAudio() type=button value="🔇 Mute"id=btn-audio></div><canvas class=emscripten id=canvas></canvas><textarea id=output rows=8></textarea><script src=https://cdn.jsdelivr.net/gh/eligrey/FileSaver.js/dist/FileSaver.min.js></script><script>function saveFileFromMEMFSToDisk(e,t){var n=FS.readFile(e),o=new Blob([n.buffer],{type:"application/octet-binary"});saveAs(o,t)}var statusElement=document.querySelector("#status"),spinnerElement=document.querySelector("#spinner"),Module={preRun:[],postRun:[],print:function(e){var t=document.querySelector("#output");t&&(t.value+=e+"\n",t.scrollTop=t.scrollHeight)},canvas:document.querySelector("#canvas"),setStatus:function(e){e&&(statusElement.textContent=e)}};Module.setStatus("Downloading..."),window.onerror=function(){Module.setStatus("Exception thrown, see JavaScript console"),spinnerElement.style.display="none"}</script><script>var audioBtn=document.getElementById("btn-audio");const audioContexList=[];function toggleAudio(){let e=!1;audioContexList.forEach((t=>{"suspended"===t.state?(t.resume(),e=!0):"running"===t.state&&t.suspend()})),audioBtn.value=e?"🔇 Mute":"🔈 Resume"}self.AudioContext=new Proxy(self.AudioContext,{construct(e,t){const n=new e(...t);return audioContexList.push(n),"suspended"===n.state&&(audioBtn.value="🔈 Resume"),n}})</script><script src=marshmallow_ghost_stack.js async></script></body></html>
<!doctypehtml><html lang=EN-us><head><meta charset=utf-8><meta content="text/html; charset=utf-8"http-equiv=Content-Type><title>Marshmallow Ghost Stack by valiantlynx</title><meta content="Marshmallow Ghost Stack by valiantlynx"name=title><meta content="Web game developed using raylib, brought to you by valiantlynx"name=description><meta content="raylib, programming, games, webgame, C++, tailwind, valiantlynx, marshmallow ghost stack"name=keywords><meta content="width=device-width,initial-scale=1"name=viewport><meta content=website property=og:type><meta content="Marshmallow Ghost Stack by valiantlynx"property=og:title><meta content=image/png property=og:image:type><meta content="Web game developed by valiantlynx using raylib"property=og:image:alt><meta content=./resources/logo.png property=og:image><meta content="Marshmallow Ghost Stack by valiantlynx"property=og:site_name><meta content=https://www.valiantlynx.com property=og:url><meta content="Web game developed by valiantlynx using raylib"property=og:description><meta content=summary_large_image name=twitter:card><meta content=@valiantlynxz name=twitter:site><meta content="Marshmallow Ghost Stack by valiantlynx"name=twitter:title><meta content=./resources/screenshots/game.png name=twitter:image><meta content="Web game developed by valiantlynx using raylib"name=twitter:image:alt><meta content=https://www.valiantlynx.com name=twitter:url><meta content="Web game developed by valiantlynx using raylib"name=twitter:description><style>body{font-family:Arial,sans-serif;background-color:#1a202c;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;margin:0}#logo{width:64px;height:64px;background-image:url("./resources/logo.png");background-size:cover;border-radius:50%;margin-bottom:10px}#header{width:100%;background-color:#2d3748;text-align:center;padding:20px}#status{margin-top:20px;font-weight:700;color:#cbd5e0}#spinner{height:30px;width:30px;border-top:4px solid #f56565;border-right:4px solid transparent;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}input[type=button]{background-color:#4299e1;color:#fff;padding:10px 20px;border-radius:4px;font-weight:700;margin:5px;transition:background-color .2s}input[type=button]:hover{background-color:#2b6cb0}textarea{width:100%;height:140px;background-color:#2d3748;color:#68d391;padding:10px;border-radius:5px;font-family:"Lucida Console",monospace}#canvas{display:block;max-width:100%;height:auto;margin:0 auto}</style></head><body><header id=header><div id=logo class=mx-auto></div><h1 class="font-bold mt-2 text-2xl">Marshmallow Ghost Stack by valiantlynx</h1></header><div id=status>Downloading...</div><div id=spinner class=mx-auto></div><div id=controls><input onclick='location.href="https://github.com/valiantlynx/marshmallow-ghost-stack.git"'type=button value="📜 Source Code"> <input onclick=Module.requestFullscreen(!1,!1) type=button value="🖵 Fullscreen"> <input onclick=toggleAudio() type=button value="🔇 Mute"id=btn-audio></div><canvas class=emscripten id=canvas></canvas><textarea id=output rows=8></textarea><script src=https://cdn.jsdelivr.net/gh/eligrey/FileSaver.js/dist/FileSaver.min.js></script><script>function saveFileFromMEMFSToDisk(e,t){var n=FS.readFile(e),o=new Blob([n.buffer],{type:"application/octet-binary"});saveAs(o,t)}var statusElement=document.querySelector("#status"),spinnerElement=document.querySelector("#spinner"),Module={preRun:[],postRun:[],print:function(e){var t=document.querySelector("#output");t&&(t.value+=e+"\n",t.scrollTop=t.scrollHeight)},canvas:document.querySelector("#canvas"),setStatus:function(e){e&&(statusElement.textContent=e)}};Module.setStatus("Downloading..."),window.onerror=function(){Module.setStatus("Exception thrown, see JavaScript console"),spinnerElement.style.display="none"}</script><script>var audioBtn=document.getElementById("btn-audio");const audioContexList=[];function toggleAudio(){let e=!1;audioContexList.forEach((t=>{"suspended"===t.state?(t.resume(),e=!0):"running"===t.state&&t.suspend()})),audioBtn.value=e?"🔇 Mute":"🔈 Resume"}self.AudioContext=new Proxy(self.AudioContext,{construct(e,t){const n=new e(...t);return audioContexList.push(n),"suspended"===n.state&&(audioBtn.value="🔈 Resume"),n}})</script><script src=marshmallow_ghost_stack.js async></script></body></html>
Binary file modified src/build/web/marshmallow_ghost_stack.data
Binary file not shown.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/marshmallow_ghost_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const char* GetGameModeString(GameMode mode) {

// Initialize the database
void InitDatabase() {
if (sqlite3_open("leaderboard.db", &db)) {
if (sqlite3_open((BASE_PATH + "leaderboard.db").c_str(), &db)) {
TraceLog(LOG_ERROR, "Can't open database: %s", sqlite3_errmsg(db));
} else {
const char *sql = "CREATE TABLE IF NOT EXISTS leaderboard (id INTEGER PRIMARY KEY, name TEXT, score INT, time FLOAT, mode TEXT);";
Expand Down
4 changes: 2 additions & 2 deletions src/shell.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
#logo {
width: 64px;
height: 64px;
background-image: url("https://www.raylib.com/common/raylib_logo.png");
background-image: url("./resources/logo.png");
background-size: cover;
border-radius: 50%;
margin-bottom: 10px;
Expand Down Expand Up @@ -148,7 +148,7 @@ <h1 class="text-2xl font-bold mt-2">
<input
type="button"
value="📜 Source Code"
onclick="location.href='https://github.com/raysan5/raylib';"
onclick="location.href='https://github.com/valiantlynx/marshmallow-ghost-stack.git';"
/>
<input
type="button"
Expand Down

0 comments on commit f1d4f76

Please sign in to comment.