]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
Darkplaces now works
authorLock l00p <hakzstudios@gmail.com>
Sun, 8 Oct 2023 04:09:39 +0000 (04:09 +0000)
committerLock l00p <hakzstudios@gmail.com>
Sun, 8 Oct 2023 04:09:39 +0000 (04:09 +0000)
misc/buildfiles/emscripten/prejs.js
misc/tools/all/xonotic.subr

index 8eff4c518dd5e7bd3002057c0c0594a7deb54020..444ea11a6e293c53e45bcb60fc6e1b9ffb2d5d76 100644 (file)
@@ -8,15 +8,15 @@ cmd = function(input){
         currentcmd[i] = input.charCodeAt(i)
 
     }
+    currentcmd[input.length] = 10;
     return 0
 }
-Module['preInit'] = function(){FS.mount("IDBFS",{},"/")}
 Module['arguments'] = ["-xonotic"]
-//pipes output to console
-Module['print'] = function(text){console.log(text); FS.syncfs()}
+Module['print'] = function(text){console.log(text);}
 Module['preRun'] = function(){
+    
     function stdin(){
-    //if current command is default, it just returns 0, code for null
+    /*//if current command is default, it just returns 0, code for null
     if(currentcmd == [0,0,0]){
         return 0
     }
@@ -25,8 +25,10 @@ Module['preRun'] = function(){
     if(cmditerate - 1 > currentcmd.length - 1) {currentcmd = [0,0,0]; return 10}
     return currentcmd[cmditerate - 1]
 
-    }; 
+    */ return 10};
     var stdout = null;
     var stderr = null; 
     FS.init(stdin,stdout,stderr);
+    FS.mkdir('/basedir')
+    FS.mount(IDBFS,{},"/basedir");
 }
\ No newline at end of file
index 72eaf4af2ae95a1bbcc94da73b27bb2556dd307a..2de0469dcd727e189cd666f4fc693dd1978471d7 100755 (executable)
@@ -312,7 +312,7 @@ case "$cmd" in
                        verbose emmake make $MAKEFLAGS clean
                fi
                for T in $TARGETS; do
-                       verbose emmake make $MAKEFLAGS LDFLAGS_EXTRA='--pre-js ../../../../misc/buildfiles/emscripten/prejs.js -sSINGLE_FILE -sFULL_ES2 -sUSE_ZLIB -sALLOW_MEMORY_GROWTH -sINITIAL_MEMORY=700MB' EXE_UNIXSDL="darkplaces-emscripten.html" DP_SSE=0 CFLAGS_EXTRA="-I../../../../misc/builddeps/emscripten/d0_blind_id/include -L../../../../misc/builddeps/emscripten/d0_blind_id/lib -Wl,-rpath,../../../../misc/builddeps/emscripten/d0_blind_id/lib -I../../../../misc/builddeps/emscripten/gmp/include -L../../../../misc/builddeps/emscripten/gmp/lib -Wl,-rpath,../../../../misc/builddeps/emscripten/gmp/lib -L../../../../misc/builddeps/emscripten/jpeg/lib/ -Wl,-rpath,../../../../misc/builddeps/emscripten/jpeg/lib/ -I../../../../misc/builddeps/emscripten/jpeg/include/ -sUSE_SDL=2 -sUSE_ZLIB=1 -DUSE_GLES2 " LIBM="" LIBZ="" LIBJPEG="" STRIP=: "$@" "$T"
+                       verbose emmake make $MAKEFLAGS LDFLAGS_EXTRA=' --pre-js ../../../../misc/buildfiles/emscripten/prejs.js -lidbfs.js -sSINGLE_FILE -sUSE_ZLIB -sALLOW_MEMORY_GROWTH -sINITIAL_MEMORY=700MB' EXE_UNIXSDL="darkplaces-emscripten.html" DP_SSE=0 CFLAGS_EXTRA="-I../../../../misc/builddeps/emscripten/d0_blind_id/include -L../../../../misc/builddeps/emscripten/d0_blind_id/lib -Wl,-rpath,../../../../misc/builddeps/emscripten/d0_blind_id/lib -I../../../../misc/builddeps/emscripten/gmp/include -L../../../../misc/builddeps/emscripten/gmp/lib -Wl,-rpath,../../../../misc/builddeps/emscripten/gmp/lib -L../../../../misc/builddeps/emscripten/jpeg/lib/ -Wl,-rpath,../../../../misc/builddeps/emscripten/jpeg/lib/ -I../../../../misc/builddeps/emscripten/jpeg/include/ -sUSE_SDL=2 -sUSE_ZLIB=1 -DUSE_GLES2" LIBM="" LIBZ="" LIBJPEG="" STRIP=: "$@" "$T"
                done
                for T in $BAD_TARGETS; do
                        $ECHO "Warning: discarded invalid client $T."