void IGame_Persistent::Start (LPCSTR op) { string256 prev_type; strcpy_s (prev_type,m_game_params.m_game_type); m_game_params.parse_cmd_line (op); // change game type if ((0!=xr_strcmp(prev_type,m_game_params.m_game_type))) { if (*m_game_params.m_game_type) OnGameStart (); #ifndef _EDITOR if(g_hud) DEL_INSTANCE (g_hud); #endif } else UpdateGameType(); VERIFY (ps_destroy.empty()); }
bool SmallNineAndroid::OnGameMessage(WORD wSubCmdID, const void * pBuffer, WORD wDataSize) { switch (wSubCmdID) { //游戏开始 case SUB_S_GAME_START: { OnGameStart(pBuffer, wDataSize); } break; //用户加注 case SUB_S_PLACE_JETTON: { OnSubPlaceJetton(pBuffer, wDataSize); } break; //申请做庄 case SUB_S_APPLY_BANKER: { OnApplyBanker(pBuffer, wDataSize); } break; //切换庄家 case SUB_S_CHANGE_BANKER: { OnChangeBanker(pBuffer, wDataSize); } break; //更新积分 case SUB_S_CHANGE_USER_SCORE: { } break; //押注开始 case SUB_S_StartJetton: { OnStartJetton(pBuffer, wDataSize); } break; //游戏结束 case SUB_S_GAME_END: { OnGameEnd(pBuffer, wDataSize); } break; //游戏记录 case SUB_S_SEND_RECORD: { } break; //游戏积分 case SUB_S_GAME_SCORE: { OnGameScore(pBuffer, wDataSize); } break; } return true; }