Skip to content
Snippets Groups Projects
Commit e61fb3f9 authored by MJ's avatar MJ
Browse files

show splash screen and await response before restoring system status....

show splash screen and await response before restoring system status. explicitly disconnect from json client when exiting.
parent 8e2066a6
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -21,10 +21,11 @@ function open() { ...@@ -21,10 +21,11 @@ function open() {
splash("dicewarz2.bin"); splash("dicewarz2.bin");
} }
function close() { function close() {
client.disconnect();
splash("exit.bin");
console.ctrlkey_passthru=oldpass; console.ctrlkey_passthru=oldpass;
bbs.sys_status&=~SS_MOFF; bbs.sys_status&=~SS_MOFF;
bbs.sys_status&=~SS_PAUSEOFF; bbs.sys_status&=~SS_PAUSEOFF;
splash("exit.bin");
} }
function loadGraphic(filename) { function loadGraphic(filename) {
var f=new Frame(1,1,80,24,undefined,frame); var f=new Frame(1,1,80,24,undefined,frame);
...@@ -101,7 +102,7 @@ function lobby() { ...@@ -101,7 +102,7 @@ function lobby() {
} }
function main() { function main() {
var hotkeys=true; var hotkeys=true;
while(1) { while(!js.terminated) {
cycle(); cycle();
var cmd=input.getkey(hotkeys); var cmd=input.getkey(hotkeys);
if(typeof cmd == "object") { if(typeof cmd == "object") {
...@@ -698,7 +699,7 @@ function playGame(gameNumber) { ...@@ -698,7 +699,7 @@ function playGame(gameNumber) {
} }
function main() { function main() {
while(1) { while(!js.terminated) {
cycle(); cycle();
var cmd=input.getkey(hotkeys); var cmd=input.getkey(hotkeys);
if(cmd === undefined) if(cmd === undefined)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment