-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: added EmulatorJS support for Mega Drive, NES, and N64 (see: #15) * doc: updated attribution in README.MD to include EmulatorJS * ci: updated action to include submodules
- Loading branch information
1 parent
b010f97
commit 7a8e445
Showing
17 changed files
with
140 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "gaseous-server/wwwroot/EmulatorJS"] | ||
path = gaseous-server/wwwroot/EmulatorJS | ||
url = https://github.com/EmulatorJS/EmulatorJS.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Submodule EmulatorJS
added at
f7fa5d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<div style='width:640px;height:480px;max-width:100%'> | ||
<div id='game'></div> | ||
</div> | ||
|
||
<script type='text/javascript'> | ||
EJS_player = '#game'; | ||
|
||
// Can also be fceumm or nestopia | ||
EJS_core = urlParams.get('core'); | ||
|
||
// Lightgun | ||
EJS_lightgun = false; // can be true or false | ||
|
||
// URL to BIOS file | ||
EJS_biosUrl = ''; // example: https://dl.dropboxusercontent.com/s/[random-code]/bios.bin | ||
|
||
// URL to Game rom | ||
EJS_gameUrl = decodeURIComponent(urlParams.get('rompath')); | ||
|
||
// Path to the data directory | ||
EJS_pathtodata = '/EmulatorJS/data/'; | ||
|
||
EJS_DEBUG_XX = false; | ||
</script> | ||
<script src='/EmulatorJS/data/loader.js'></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<div id="bgImage"> | ||
<div id="bgImage_Opacity"></div> | ||
</div> | ||
|
||
<div id="emulator"></div> | ||
|
||
<script type="text/javascript"> | ||
const urlParams = new URLSearchParams(window.location.search); | ||
|
||
var gameId = urlParams.get('gameid'); | ||
var gameData; | ||
var artworks = null; | ||
var artworksPosition = 0; | ||
|
||
ajaxCall('/api/v1/Games/' + gameId, 'GET', function (result) { | ||
gameData = result; | ||
|
||
// load artwork | ||
if (result.artworks) { | ||
artworks = result.artworks.ids; | ||
var startPos = randomIntFromInterval(0, result.artworks.ids.length); | ||
artworksPosition = startPos; | ||
rotateBackground(); | ||
} else { | ||
if (result.cover) { | ||
var bg = document.getElementById('bgImage'); | ||
bg.setAttribute('style', 'background-image: url("/api/v1/Games/' + gameId + '/cover/image"); background-position: center; background-repeat: no-repeat; background-size: cover; filter: blur(10px); -webkit-filter: blur(10px);'); | ||
} | ||
} | ||
}); | ||
|
||
function rotateBackground() { | ||
if (artworks) { | ||
artworksPosition += 1; | ||
if (artworks[artworksPosition] == null) { | ||
artworksPosition = 0; | ||
} | ||
var bg = document.getElementById('bgImage'); | ||
bg.setAttribute('style', 'background-image: url("/api/v1/Games/' + gameId + '/artwork/' + artworks[artworksPosition] + '/image"); background-position: center; background-repeat: no-repeat; background-size: cover; filter: blur(10px); -webkit-filter: blur(10px);'); | ||
} | ||
} | ||
|
||
switch (urlParams.get('engine')) { | ||
case 'EmulatorJS': | ||
$('#emulator').load('/pages/EmulatorJS.html'); | ||
break; | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters