mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
show game-over details
This commit is contained in:
parent
5a061f5786
commit
d53ab92af3
3 changed files with 14 additions and 1 deletions
|
@ -395,6 +395,18 @@ main_playerScoreHeld( Globals* globals, XP_U16 player )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
main_showGameOver( Globals* globals )
|
||||
{
|
||||
XWStreamCtxt* stream = mem_stream_make_raw( MPPARM(globals->mpool)
|
||||
globals->vtMgr );
|
||||
server_writeFinalScores( globals->game.server, NULL, stream );
|
||||
stream_putU8( stream, 0 );
|
||||
call_alert( (const XP_UCHAR*)stream_getPtr( stream ) );
|
||||
stream_destroy( stream, NULL );
|
||||
}
|
||||
|
||||
static time_t
|
||||
getCurMS()
|
||||
{
|
||||
|
|
|
@ -74,5 +74,6 @@ void main_onGameMessage( Globals* globals, XP_U32 gameID,
|
|||
|
||||
void main_sendOnClose( XWStreamCtxt* stream, XWEnv env, void* closure );
|
||||
void main_playerScoreHeld( Globals* globals, XP_U16 player );
|
||||
void main_showGameOver( Globals* globals );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -350,7 +350,7 @@ wasm_util_notifyGameOver( XW_UtilCtxt* uc, XWEnv xwe, XP_S16 quitter )
|
|||
{
|
||||
WasmUtilCtx* wuctxt = (WasmUtilCtx*)uc;
|
||||
Globals* globals = (Globals*)wuctxt->closure;
|
||||
main_alert( globals, "Game over" );
|
||||
main_showGameOver( globals );
|
||||
}
|
||||
|
||||
static XP_Bool
|
||||
|
|
Loading…
Reference in a new issue