Mercurial > mm7
comparison mm7_6.cpp @ 163:a0e7ad5425d4
14.02.13
author | Ritor1 |
---|---|
date | Thu, 14 Feb 2013 09:27:09 +0600 |
parents | 9abdd40a107b |
children | d1dde383af89 |
comparison
equal
deleted
inserted
replaced
162:3a8e7802f241 | 163:a0e7ad5425d4 |
---|---|
8941 { | 8941 { |
8942 case INPUT_MoveForward: | 8942 case INPUT_MoveForward: |
8943 if ( pCurrentScreen ) | 8943 if ( pCurrentScreen ) |
8944 break; | 8944 break; |
8945 if (!pParty->bTurnBasedModeOn) | 8945 if (!pParty->bTurnBasedModeOn) |
8946 goto _do_move_forward; | 8946 //goto _do_move_forward; |
8947 if (pTurnEngine->field_4 != 1 && pTurnEngine->field_4 != 2 && pTurnEngine->uActionPointsLeft > 0 ) | |
8948 { | 8947 { |
8949 pTurnEngine->uActionPointsLeft -= 26; | |
8950 _do_move_forward: | |
8951 v5 = pActionQueue; | 8948 v5 = pActionQueue; |
8952 if ( pParty->uFlags2 & PARTY_FLAGS_2_RUNNING) | 8949 if ( pParty->uFlags2 & PARTY_FLAGS_2_RUNNING) |
8953 partyAction = PARTY_RunForward; | 8950 partyAction = PARTY_RunForward; |
8954 else | 8951 else |
8955 partyAction = PARTY_WalkForward; | 8952 partyAction = PARTY_WalkForward; |
8956 goto _add_action_and_continue; | 8953 //goto _add_action_and_continue; |
8954 v5->Add(partyAction); | |
8955 break; | |
8956 } | |
8957 if (pTurnEngine->field_4 != 1 && pTurnEngine->field_4 != 2 && pTurnEngine->uActionPointsLeft > 0 ) | |
8958 { | |
8959 pTurnEngine->uActionPointsLeft -= 26; | |
8960 //_do_move_forward: | |
8961 v5 = pActionQueue; | |
8962 if ( pParty->uFlags2 & PARTY_FLAGS_2_RUNNING) | |
8963 partyAction = PARTY_RunForward; | |
8964 else | |
8965 partyAction = PARTY_WalkForward; | |
8966 //goto _add_action_and_continue; | |
8967 v5->Add(partyAction); | |
8968 break; | |
8957 } | 8969 } |
8958 break; | 8970 break; |
8959 case INPUT_MoveBackwards: | 8971 case INPUT_MoveBackwards: |
8960 //__debugbreak(); | 8972 //__debugbreak(); |
8961 if ( pCurrentScreen ) | 8973 if ( pCurrentScreen ) |
8966 v5 = pActionQueue; | 8978 v5 = pActionQueue; |
8967 if ( pParty->uFlags2 & 2 ) | 8979 if ( pParty->uFlags2 & 2 ) |
8968 partyAction = PARTY_RunBackward; | 8980 partyAction = PARTY_RunBackward; |
8969 else | 8981 else |
8970 partyAction = PARTY_WalkBackward; | 8982 partyAction = PARTY_WalkBackward; |
8971 goto _add_action_and_continue; | 8983 //goto _add_action_and_continue; |
8984 v5->Add(partyAction); | |
8985 break; | |
8972 } | 8986 } |
8973 if ( pTurnEngine->field_4 != 1 && pTurnEngine->field_4 != 2 && pTurnEngine->uActionPointsLeft > 0 ) | 8987 if ( pTurnEngine->field_4 != 1 && pTurnEngine->field_4 != 2 && pTurnEngine->uActionPointsLeft > 0 ) |
8974 { | 8988 { |
8975 pTurnEngine->uActionPointsLeft -= 26; | 8989 pTurnEngine->uActionPointsLeft -= 26; |
8976 //_do_move_backwards: | 8990 //_do_move_backwards: |
8977 v5 = pActionQueue; | 8991 v5 = pActionQueue; |
8978 if ( pParty->uFlags2 & 2 ) | 8992 if ( pParty->uFlags2 & 2 ) |
8979 partyAction = PARTY_RunBackward; | 8993 partyAction = PARTY_RunBackward; |
8980 else | 8994 else |
8981 partyAction = PARTY_WalkBackward; | 8995 partyAction = PARTY_WalkBackward; |
8982 goto _add_action_and_continue; | 8996 //goto _add_action_and_continue; |
8997 v5->Add(partyAction); | |
8998 break; | |
8983 } | 8999 } |
8984 break; | 9000 break; |
8985 case INPUT_StrafeLeft: | 9001 case INPUT_StrafeLeft: |
8986 //__debugbreak(); | 9002 //__debugbreak(); |
8987 if ( pCurrentScreen ) | 9003 if ( pCurrentScreen ) |
8988 break; | 9004 break; |
8989 if (!pParty->bTurnBasedModeOn) | 9005 if (!pParty->bTurnBasedModeOn) |
8990 //goto _do_strafe_left; | 9006 //goto _do_strafe_left; |
8991 { | 9007 { |
8992 partyAction = PARTY_StrafeLeft; | 9008 partyAction = PARTY_StrafeLeft; |
8993 goto _add_action_and_continue_; | 9009 //goto _add_action_and_continue_; |
9010 v5 = pActionQueue; | |
9011 v5->Add(partyAction); | |
9012 break; | |
8994 } | 9013 } |
8995 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 2 || pTurnEngine->uActionPointsLeft <= 0 ) | 9014 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 2 || pTurnEngine->uActionPointsLeft <= 0 ) |
8996 break; | 9015 break; |
8997 pTurnEngine->uActionPointsLeft -= 26; | 9016 pTurnEngine->uActionPointsLeft -= 26; |
8998 //_do_strafe_left: | 9017 //_do_strafe_left: |
8999 partyAction = PARTY_StrafeLeft; | 9018 partyAction = PARTY_StrafeLeft; |
9000 goto _add_action_and_continue_; | 9019 //goto _add_action_and_continue_; |
9020 v5 = pActionQueue; | |
9021 v5->Add(partyAction); | |
9022 break; | |
9001 case INPUT_StrafeRight: | 9023 case INPUT_StrafeRight: |
9002 //__debugbreak(); | 9024 //__debugbreak(); |
9003 if ( pCurrentScreen ) | 9025 if ( pCurrentScreen ) |
9004 break; | 9026 break; |
9005 if (!pParty->bTurnBasedModeOn) | 9027 if (!pParty->bTurnBasedModeOn) |
9006 //goto _do_strafe_right; | 9028 //goto _do_strafe_right; |
9007 { | 9029 { |
9008 partyAction = PARTY_StrafeRight; | 9030 partyAction = PARTY_StrafeRight; |
9009 goto _add_action_and_continue_; | 9031 //goto _add_action_and_continue_; |
9032 v5 = pActionQueue; | |
9033 v5->Add(partyAction); | |
9034 break; | |
9010 } | 9035 } |
9011 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 2 || pTurnEngine->uActionPointsLeft <= 0 ) | 9036 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 2 || pTurnEngine->uActionPointsLeft <= 0 ) |
9012 break; | 9037 break; |
9013 pTurnEngine->uActionPointsLeft -= 26; | 9038 pTurnEngine->uActionPointsLeft -= 26; |
9014 //_do_strafe_right: | 9039 //_do_strafe_right: |
9015 partyAction = PARTY_StrafeRight; | 9040 partyAction = PARTY_StrafeRight; |
9016 goto _add_action_and_continue_; | 9041 //goto _add_action_and_continue_; |
9042 v5 = pActionQueue; | |
9043 v5->Add(partyAction); | |
9044 break; | |
9017 case INPUT_TurnLeft: | 9045 case INPUT_TurnLeft: |
9018 if ( pCurrentScreen ) | 9046 if ( pCurrentScreen ) |
9019 break; | 9047 break; |
9020 if ( GetAsyncKeyState(VK_CONTROL) ) // strafing | 9048 if ( GetAsyncKeyState(VK_CONTROL) ) // strafing |
9021 { | 9049 { |
9036 } | 9064 } |
9037 pActionQueue->Add(partyAction_); | 9065 pActionQueue->Add(partyAction_); |
9038 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor && pWeather->bRenderSnow) | 9066 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor && pWeather->bRenderSnow) |
9039 { | 9067 { |
9040 v20 = 10; | 9068 v20 = 10; |
9041 goto LABEL_75; | 9069 //goto LABEL_75; |
9070 pWeather->_4C2F0B(v20); | |
9071 break; | |
9042 } | 9072 } |
9043 break; | 9073 break; |
9044 case INPUT_TurnRight: | 9074 case INPUT_TurnRight: |
9045 if ( pCurrentScreen ) | 9075 if ( pCurrentScreen ) |
9046 break; | 9076 break; |
9063 } | 9093 } |
9064 pActionQueue->Add((PartyAction)v21); | 9094 pActionQueue->Add((PartyAction)v21); |
9065 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor && pWeather->bRenderSnow) | 9095 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor && pWeather->bRenderSnow) |
9066 { | 9096 { |
9067 v20 = -10; | 9097 v20 = -10; |
9068 LABEL_75: | 9098 //LABEL_75: |
9069 pWeather->_4C2F0B(v20); | 9099 pWeather->_4C2F0B(v20); |
9070 } | 9100 } |
9071 break; | 9101 break; |
9072 case INPUT_Jump: | 9102 case INPUT_Jump: |
9073 //__debugbreak(); | 9103 //__debugbreak(); |
9074 if ( pCurrentScreen | 9104 if ( pCurrentScreen |
9075 || pParty->bTurnBasedModeOn) | 9105 || pParty->bTurnBasedModeOn) |
9076 break; | 9106 break; |
9077 partyAction = (PartyAction)12; | 9107 partyAction = (PartyAction)12; |
9078 goto _add_action_and_continue_; | 9108 //goto _add_action_and_continue_; |
9109 v5 = pActionQueue; | |
9110 v5->Add(partyAction); | |
9111 break; | |
9079 case INPUT_Yell: | 9112 case INPUT_Yell: |
9080 //__debugbreak(); | 9113 //__debugbreak(); |
9081 if ( !pCurrentScreen | 9114 if ( !pCurrentScreen |
9082 && uActiveCharacter ) | 9115 && uActiveCharacter ) |
9083 { | 9116 { |
9150 pActionQueue = pPartyActionQueue; | 9183 pActionQueue = pPartyActionQueue; |
9151 LABEL_120: | 9184 LABEL_120: |
9152 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 9185 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) |
9153 { | 9186 { |
9154 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)23; | 9187 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)23; |
9155 goto _send_message; | 9188 //goto _send_message; |
9189 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | |
9190 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
9191 ++pMessageQueue_50CBD0->uNumMessages; | |
9192 break; | |
9156 } | 9193 } |
9157 } | 9194 } |
9158 else | 9195 else |
9159 { | 9196 { |
9160 pActionQueue = pPartyActionQueue; | 9197 pActionQueue = pPartyActionQueue; |
9180 if ( !pCurrentScreen ) | 9217 if ( !pCurrentScreen ) |
9181 { | 9218 { |
9182 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | 9219 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) |
9183 break; | 9220 break; |
9184 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)404; | 9221 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)404; |
9185 goto _send_message; | 9222 //goto _send_message; |
9223 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | |
9224 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
9225 ++pMessageQueue_50CBD0->uNumMessages; | |
9226 break; | |
9186 } | 9227 } |
9187 if ( pCurrentScreen == SCREEN_NPC_DIALOGUE ) | 9228 if ( pCurrentScreen == SCREEN_NPC_DIALOGUE ) |
9188 { | 9229 { |
9189 v11 = pMessageQueue_50CBD0->uNumMessages; | 9230 v11 = pMessageQueue_50CBD0->uNumMessages; |
9190 if ( pMessageQueue_50CBD0->uNumMessages ) | 9231 if ( pMessageQueue_50CBD0->uNumMessages ) |
9191 { | 9232 { |
9192 if ( pMessageQueue_50CBD0->pMessages[0].field_8 ) | 9233 if ( pMessageQueue_50CBD0->pMessages[0].field_8 ) |
9193 { | 9234 { |
9194 v11 = 1; | 9235 v11 = 1; |
9195 pMessageQueue_50CBD0->uNumMessages = 1; | 9236 pMessageQueue_50CBD0->uNumMessages = 1; |
9196 LABEL_132: | 9237 //LABEL_132: |
9197 pMessageQueue_50CBD0->pMessages[v11].eType = (UIMessageType)113; | 9238 pMessageQueue_50CBD0->pMessages[v11].eType = (UIMessageType)113; |
9198 _send_message: | 9239 //_send_message: |
9199 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | 9240 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; |
9200 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | 9241 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; |
9201 ++pMessageQueue_50CBD0->uNumMessages; | 9242 ++pMessageQueue_50CBD0->uNumMessages; |
9202 break; | 9243 break; |
9203 } | 9244 } |
9204 v11 = 0; | 9245 v11 = 0; |
9205 pMessageQueue_50CBD0->uNumMessages = 0; | 9246 pMessageQueue_50CBD0->uNumMessages = 0; |
9206 } | 9247 } |
9207 if ( (signed int)v11 < 40 ) | 9248 if ( (signed int)v11 < 40 ) |
9208 goto LABEL_132; | 9249 //goto LABEL_132; |
9250 { | |
9251 pMessageQueue_50CBD0->pMessages[v11].eType = (UIMessageType)113; | |
9252 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | |
9253 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
9254 ++pMessageQueue_50CBD0->uNumMessages; | |
9255 break; | |
9256 } | |
9209 } | 9257 } |
9210 break; | 9258 break; |
9211 case INPUT_CharCycle: | 9259 case INPUT_CharCycle: |
9212 //__debugbreak(); | 9260 //__debugbreak(); |
9213 if ( pCurrentScreen == SCREEN_SPELL_BOOK | 9261 if ( pCurrentScreen == SCREEN_SPELL_BOOK |
9214 || dword_50C9E8 >= 40 ) | 9262 || dword_50C9E8 >= 40 ) |
9215 break; | 9263 break; |
9216 dword_50C9EC[3 * dword_50C9E8] = 176; | 9264 dword_50C9EC[3 * dword_50C9E8] = 176; |
9217 goto LABEL_155; | 9265 //goto LABEL_155; |
9266 dword_50C9F0[3 * dword_50C9E8] = 0; | |
9267 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0; | |
9268 ++dword_50C9E8; | |
9269 break; | |
9218 case INPUT_LookUp: | 9270 case INPUT_LookUp: |
9219 //__debugbreak(); | 9271 //__debugbreak(); |
9220 if ( pEventTimer->bPaused ) | 9272 if ( pEventTimer->bPaused ) |
9221 break; | 9273 break; |
9222 partyAction = (PartyAction)7; | 9274 partyAction = (PartyAction)7; |
9223 goto _add_action_and_continue_; | 9275 //goto _add_action_and_continue_; |
9276 v5 = pActionQueue; | |
9277 v5->Add(partyAction); | |
9278 break; | |
9224 case INPUT_CenterView: | 9279 case INPUT_CenterView: |
9225 //__debugbreak(); | 9280 //__debugbreak(); |
9226 if ( pEventTimer->bPaused ) | 9281 if ( pEventTimer->bPaused ) |
9227 break; | 9282 break; |
9228 partyAction = (PartyAction)9; | 9283 partyAction = (PartyAction)9; |
9229 goto _add_action_and_continue_; | 9284 //goto _add_action_and_continue_; |
9285 v5 = pActionQueue; | |
9286 v5->Add(partyAction); | |
9287 break; | |
9230 case INPUT_LookDown: | 9288 case INPUT_LookDown: |
9231 //__debugbreak(); | 9289 //__debugbreak(); |
9232 if ( pEventTimer->bPaused ) | 9290 if ( pEventTimer->bPaused ) |
9233 break; | 9291 break; |
9234 partyAction = (PartyAction)8; | 9292 partyAction = (PartyAction)8; |
9235 goto _add_action_and_continue_; | 9293 //goto _add_action_and_continue_; |
9294 v5 = pActionQueue; | |
9295 v5->Add(partyAction); | |
9296 break; | |
9236 case INPUT_FlyUp: | 9297 case INPUT_FlyUp: |
9237 //__debugbreak(); | 9298 //__debugbreak(); |
9238 if ( pCurrentScreen | 9299 if ( pCurrentScreen |
9239 || pEventTimer->bPaused ) | 9300 || pEventTimer->bPaused ) |
9240 break; | 9301 break; |
9241 partyAction = (PartyAction)13; | 9302 partyAction = (PartyAction)13; |
9242 goto _add_action_and_continue_; | 9303 //goto _add_action_and_continue_; |
9304 v5 = pActionQueue; | |
9305 v5->Add(partyAction); | |
9306 break; | |
9243 case INPUT_Land: | 9307 case INPUT_Land: |
9244 //__debugbreak(); | 9308 //__debugbreak(); |
9245 if ( pCurrentScreen | 9309 if ( pCurrentScreen |
9246 || pEventTimer->bPaused ) | 9310 || pEventTimer->bPaused ) |
9247 break; | 9311 break; |
9248 partyAction = (PartyAction)15; | 9312 partyAction = (PartyAction)15; |
9249 goto _add_action_and_continue_; | 9313 //goto _add_action_and_continue_; |
9314 v5 = pActionQueue; | |
9315 v5->Add(partyAction); | |
9316 break; | |
9250 case INPUT_FlyDown: | 9317 case INPUT_FlyDown: |
9251 //__debugbreak(); | 9318 //__debugbreak(); |
9252 if ( !pCurrentScreen | 9319 if ( !pCurrentScreen |
9253 && !pEventTimer->bPaused ) | 9320 && !pEventTimer->bPaused ) |
9254 { | 9321 { |
9255 partyAction = (PartyAction)14; | 9322 partyAction = (PartyAction)14; |
9256 _add_action_and_continue_: | 9323 //_add_action_and_continue_: |
9257 v5 = pActionQueue; | 9324 v5 = pActionQueue; |
9258 _add_action_and_continue: | 9325 //_add_action_and_continue: |
9259 v5->Add(partyAction); | 9326 v5->Add(partyAction); |
9260 } | 9327 } |
9261 break; | 9328 break; |
9262 case INPUT_ZoomIn: | 9329 case INPUT_ZoomIn: |
9263 //__debugbreak(); | 9330 //__debugbreak(); |
9264 if ( dword_50C9E8 >= 40 ) | 9331 if ( dword_50C9E8 >= 40 ) |
9265 break; | 9332 break; |
9266 dword_50C9EC[3 * dword_50C9E8] = 367; | 9333 dword_50C9EC[3 * dword_50C9E8] = 367; |
9267 goto LABEL_155; | 9334 //goto LABEL_155; |
9335 dword_50C9F0[3 * dword_50C9E8] = 0; | |
9336 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0; | |
9337 ++dword_50C9E8; | |
9338 break; | |
9268 case INPUT_ZoomOut: | 9339 case INPUT_ZoomOut: |
9269 //__debugbreak(); | 9340 //__debugbreak(); |
9270 if ( dword_50C9E8 < 40 ) | 9341 if ( dword_50C9E8 < 40 ) |
9271 { | 9342 { |
9272 dword_50C9EC[3 * dword_50C9E8] = 368; | 9343 dword_50C9EC[3 * dword_50C9E8] = 368; |
9273 LABEL_155: | 9344 //LABEL_155: |
9274 dword_50C9F0[3 * dword_50C9E8] = 0; | 9345 dword_50C9F0[3 * dword_50C9E8] = 0; |
9275 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0; | 9346 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0; |
9276 ++dword_50C9E8; | 9347 ++dword_50C9E8; |
9277 } | 9348 } |
9278 break; | 9349 break; |