launch asap

This commit is contained in:
Eric House 2021-02-06 17:36:53 -08:00
parent 40468d8a1b
commit 551765b120
3 changed files with 6 additions and 12 deletions

View file

@ -45,8 +45,8 @@
#define WINDOW_WIDTH 400 #define WINDOW_WIDTH 400
#define WINDOW_HEIGHT 600 #define WINDOW_HEIGHT 600
#define BDWIDTH 400 #define BDWIDTH WINDOW_WIDTH
#define BDHEIGHT 400 #define BDHEIGHT WINDOW_HEIGHT
#define KEY_GAME "the_game" #define KEY_GAME "the_game"
@ -140,7 +140,8 @@ makeAndDraw( Globals* globals, bool forceNew, bool p0robot, bool p1robot )
BoardDims dims; BoardDims dims;
board_figureLayout( globals->game.board, NULL, &globals->gi, board_figureLayout( globals->game.board, NULL, &globals->gi,
WASM_BOARD_LEFT, WASM_HOR_SCORE_TOP, BDWIDTH, BDHEIGHT, WASM_BOARD_LEFT, WASM_HOR_SCORE_TOP, BDWIDTH, BDHEIGHT,
110, 150, 200, BDWIDTH-25, 16, 16, XP_FALSE, &dims ); 110, 150, 200, BDWIDTH-25, BDWIDTH/15, BDHEIGHT/15,
XP_FALSE, &dims );
board_applyLayout( globals->game.board, NULL, &dims ); board_applyLayout( globals->game.board, NULL, &dims );
model_setDictionary( globals->game.model, NULL, globals->dict ); model_setDictionary( globals->game.model, NULL, globals->dict );

View file

@ -37,9 +37,6 @@
<body> <body>
<div id="loadingDiv">CrossWords is loading...</div> <div id="loadingDiv">CrossWords is loading...</div>
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas> <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<div style="width:200px; margin-left:auto; margin-right:auto">
<p class="startButton" onclick="start_function(this)">Click to start</p>
</div>
<div class="buttons"> <div class="buttons">
<button onclick="Module.ccall('button', null, ['string'], ['hintdown']);">Prev Hint</button> <button onclick="Module.ccall('button', null, ['string'], ['hintdown']);">Prev Hint</button>
<button onclick="Module.ccall('button', null, ['string'], ['hintup']);">Next Hint</button> <button onclick="Module.ccall('button', null, ['string'], ['hintup']);">Next Hint</button>
@ -65,17 +62,13 @@
onRuntimeInitialized: function() { onRuntimeInitialized: function() {
var e = document.getElementById('loadingDiv'); var e = document.getElementById('loadingDiv');
e.style.visibility = 'hidden'; e.style.visibility = 'hidden';
Module.ccall('mainf', null, null);
}, },
canvas: (function() { canvas: (function() {
var canvas = document.getElementById('canvas'); var canvas = document.getElementById('canvas');
return canvas; return canvas;
})() })()
}; };
var start_function = function(o) {
o.style.visibility = "hidden";
Module.ccall('mainf', null, null);
};
</script> </script>
<script> <script>

View file

@ -495,7 +495,7 @@ wasm_draw_drawTrayDivider( DrawCtx* dctx, XWEnv xwe, const XP_Rect* rect,
CellFlags flags ) CellFlags flags )
{ {
WasmDrawCtx* wdctx = (WasmDrawCtx*)dctx; WasmDrawCtx* wdctx = (WasmDrawCtx*)dctx;
fillRect( wdctx, rect, &sOtherColors[BLACK] ); fillRect( wdctx, rect, &sPlayerColors[wdctx->trayOwner] );
} }
static void static void