mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 10:22:48 +01:00
- fix emscripten build not compiling essential files
- fix runtime errors - fix sound shutting down issue
This commit is contained in:
parent
2642670bd6
commit
42d2344557
@ -5,7 +5,6 @@ html, body {overflow-x: hidden; padding: 0!important}
|
||||
html, section {
|
||||
background-color: #600000;
|
||||
color: white;
|
||||
background-image: url(tanner.png);
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
-webkit-background-size: auto 100%;
|
||||
|
@ -1911,6 +1911,10 @@ int redriver2_main(int argc, char** argv)
|
||||
// TODO: divide game by the states, place main loop here.
|
||||
|
||||
if (argc <= 1)
|
||||
#elif !defined(PSX)
|
||||
|
||||
InitStringMng();
|
||||
|
||||
#endif
|
||||
{
|
||||
//PlayFMV(99); // [A] don't show publisher logo
|
||||
|
@ -264,9 +264,8 @@ void PsyX_SPU_ShutdownSound()
|
||||
{
|
||||
alDeleteEffects(1, &g_nAlReverbEffect);
|
||||
g_ALEffectsSupported = AL_NONE;
|
||||
}
|
||||
|
||||
alDeleteAuxiliaryEffectSlots(1, g_ALEffectSlots);
|
||||
}
|
||||
|
||||
alcDestroyContext(g_ALCcontext);
|
||||
alcCloseDevice(g_ALCdevice);
|
||||
@ -500,7 +499,9 @@ void SpuInit(void)
|
||||
void SpuQuit(void)
|
||||
{
|
||||
g_spuInit = 0;
|
||||
#ifndef __EMSCRIPTEN__
|
||||
PsyX_SPU_ShutdownSound();
|
||||
#endif // SpuQuit
|
||||
}
|
||||
|
||||
void UpdateVoiceSample(SPUVoice* voice)
|
||||
|
@ -1371,15 +1371,9 @@ void GR_Clear(int x, int y, int w, int h, unsigned char r, unsigned char g, unsi
|
||||
#endif
|
||||
}
|
||||
|
||||
#define NOFILE 0
|
||||
|
||||
#if !defined(__EMSCRIPTEN__) && !defined(__ANDROID__)
|
||||
|
||||
void GR_SaveVRAM(const char* outputFileName, int x, int y, int width, int height, int bReadFromFrameBuffer)
|
||||
{
|
||||
#if NOFILE
|
||||
return;
|
||||
#endif
|
||||
#if !defined(__EMSCRIPTEN__) && !defined(__ANDROID__)
|
||||
|
||||
#if defined(USE_OPENGL)
|
||||
|
||||
@ -1411,8 +1405,8 @@ void GR_SaveVRAM(const char* outputFileName, int x, int y, int width, int height
|
||||
fclose(fp);
|
||||
|
||||
#undef FLIP_Y
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void GR_CopyRGBAFramebufferToVRAM(u_int* src, int x, int y, int w, int h, int update_vram, int flip_y)
|
||||
{
|
||||
|
@ -41,11 +41,11 @@ workspace "REDRIVER2"
|
||||
|
||||
buildoptions {
|
||||
--"-s USE_PTHREADS=1",
|
||||
"-s PTHREAD_POOL_SIZE=8",
|
||||
"-s ABORTING_MALLOC=0",
|
||||
"-s FETCH=1",
|
||||
--"-s PTHREAD_POOL_SIZE=8",
|
||||
--"-s ABORTING_MALLOC=0",
|
||||
--"-s FETCH=1",
|
||||
--"-s PROXY_TO_PTHREAD=1",
|
||||
"-s WASM=1",
|
||||
--"-s WASM=1",
|
||||
"-s TOTAL_MEMORY=1073741824",
|
||||
"-s USE_SDL=2",
|
||||
"-s FULL_ES2=1",
|
||||
@ -64,11 +64,11 @@ workspace "REDRIVER2"
|
||||
}
|
||||
linkoptions {
|
||||
--"-s USE_PTHREADS=1",
|
||||
"-s PTHREAD_POOL_SIZE=8",
|
||||
"-s ABORTING_MALLOC=0",
|
||||
"-s FETCH=1",
|
||||
--"-s PTHREAD_POOL_SIZE=8",
|
||||
--"-s ABORTING_MALLOC=0",
|
||||
--"-s FETCH=1",
|
||||
--"-s PROXY_TO_PTHREAD=1",
|
||||
"-s WASM=1",
|
||||
--"-s WASM=1",
|
||||
"-s TOTAL_MEMORY=1073741824",
|
||||
"-s USE_SDL=2",
|
||||
"-s FULL_ES2=1",
|
||||
@ -80,6 +80,8 @@ workspace "REDRIVER2"
|
||||
("--preload-file " .. WEBDEMO_DIR)
|
||||
}
|
||||
|
||||
targetextension ".bc"
|
||||
|
||||
filter { "kind:*App" }
|
||||
targetextension ".html"
|
||||
|
||||
@ -137,7 +139,7 @@ workspace "REDRIVER2"
|
||||
"NDEBUG",
|
||||
}
|
||||
|
||||
if os.target() == "windows" then
|
||||
if os.target() == "windows" or os.target() == "emscripten" then
|
||||
include "premake_libjpeg.lua"
|
||||
end
|
||||
|
||||
@ -170,7 +172,7 @@ project "REDRIVER2"
|
||||
"Game/**.c"
|
||||
}
|
||||
|
||||
filter "system:Windows or linux"
|
||||
filter {"system:Windows or linux or platforms:emscripten"}
|
||||
--dependson { "PsyX" }
|
||||
links { "jpeg" }
|
||||
|
||||
@ -182,6 +184,12 @@ project "REDRIVER2"
|
||||
"DebugOverlay.cpp",
|
||||
}
|
||||
|
||||
filter "platforms:emscripten"
|
||||
includedirs {
|
||||
OPENAL_DIR.."/include",
|
||||
JPEG_DIR.."/",
|
||||
}
|
||||
|
||||
filter "system:Windows"
|
||||
entrypoint "mainCRTStartup"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user