comparison mm7_1.cpp @ 305:cc8e4dc397ec

MonsterPopup_Draw crash fix
author Nomad
date Tue, 19 Feb 2013 21:50:33 +0200
parents 3dcc9d945eeb
children e33f5a1cdc46
comparison
equal deleted inserted replaced
304:f16ac5e65438 305:cc8e4dc397ec
2922 v9 = pMonsterInfoUI_Doll.uCurrentActionLength; 2922 v9 = pMonsterInfoUI_Doll.uCurrentActionLength;
2923 } 2923 }
2924 else 2924 else
2925 { 2925 {
2926 memcpy(&pMonsterInfoUI_Doll, v3, sizeof(pMonsterInfoUI_Doll)); 2926 memcpy(&pMonsterInfoUI_Doll, v3, sizeof(pMonsterInfoUI_Doll));
2927 pMonsterInfoUI_Doll.uCurrentActionAnimation = 7; 2927 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored;
2928 pMonsterInfoUI_Doll.uCurrentActionTime = 0; 2928 pMonsterInfoUI_Doll.uCurrentActionTime = 0;
2929 v8 = rand(); 2929 v8 = rand();
2930 v3 = v121; 2930 v3 = v121;
2931 v9 = v8 % 256 + 128; 2931 v9 = v8 % 256 + 128;
2932 pMonsterInfoUI_Doll.uCurrentActionLength = v8 % 256 + 128; 2932 pMonsterInfoUI_Doll.uCurrentActionLength = v8 % 256 + 128;
2933 } 2933 }
2934 if ( (signed int)pMonsterInfoUI_Doll.uCurrentActionTime > (signed __int16)v9 ) 2934 if ( (signed int)pMonsterInfoUI_Doll.uCurrentActionTime > (signed __int16)v9 )
2935 { 2935 {
2936 pMonsterInfoUI_Doll.uCurrentActionTime = 0; 2936 pMonsterInfoUI_Doll.uCurrentActionTime = 0;
2937 if ( pMonsterInfoUI_Doll.uCurrentActionAnimation == 7 || pMonsterInfoUI_Doll.uCurrentActionAnimation == 2 ) 2937 if ( pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_Bored || pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_AtkMelee)
2938 { 2938 {
2939 pMonsterInfoUI_Doll.uCurrentActionAnimation = 0; 2939 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Standing;
2940 pMonsterInfoUI_Doll.uCurrentActionLength = rand() % 128 + 128; 2940 pMonsterInfoUI_Doll.uCurrentActionLength = rand() % 128 + 128;
2941 } 2941 }
2942 else 2942 else
2943 { 2943 {
2944 rand(); 2944 rand();
2945 pMonsterInfoUI_Doll.uCurrentActionAnimation = 7; 2945 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored;
2946 if ( (pMonsterInfoUI_Doll.pMonsterInfo.uID < 115 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 186) 2946 if ( (pMonsterInfoUI_Doll.pMonsterInfo.uID < 115 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 186)
2947 && (pMonsterInfoUI_Doll.pMonsterInfo.uID < 232 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 249) 2947 && (pMonsterInfoUI_Doll.pMonsterInfo.uID < 232 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 249)
2948 && rand() % 30 < 100 ) 2948 && rand() % 30 < 100 )
2949 pMonsterInfoUI_Doll.uCurrentActionAnimation = 2; 2949 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_AtkMelee;
2950 pMonsterInfoUI_Doll.uCurrentActionLength = 8 2950 pMonsterInfoUI_Doll.uCurrentActionLength = 8 * pSpriteFrameTable->pSpriteSFrames[v3->pSpriteIDs[(signed __int16)pMonsterInfoUI_Doll.uCurrentActionAnimation]].uAnimLength;
2951 * pSpriteFrameTable->pSpriteSFrames[v3->pSpriteIDs[(signed __int16)pMonsterInfoUI_Doll.uCurrentActionAnimation]].uAnimLength; 2951 }
2952 } 2952 }
2953 } 2953 v10 = pSpriteFrameTable->GetFrame( v3->pSpriteIDs[(signed __int16)pMonsterInfoUI_Doll.uCurrentActionAnimation], pMonsterInfoUI_Doll.uCurrentActionTime);
2954 v10 = pSpriteFrameTable->GetFrame( 2954 v11 = &pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]];//40 * v10->pHwSpriteIDs[0] + 7218180;
2955 v3->pSpriteIDs[(signed __int16)pMonsterInfoUI_Doll.uCurrentActionAnimation],
2956 pMonsterInfoUI_Doll.uCurrentActionTime);
2957 v11 = pSprites_LOD[v10->pHwSpriteIDs[0]].pSpriteHeaders;//40 * v10->pHwSpriteIDs[0] + 7218180;
2958 v106.pTarget = pRenderer->pTargetSurface; 2955 v106.pTarget = pRenderer->pTargetSurface;
2959 v106.pTargetZ = pRenderer->pActiveZBuffer; 2956 v106.pTargetZ = pRenderer->pActiveZBuffer;
2960 v106.uTargetPitch = pRenderer->uTargetSurfacePitch; 2957 v106.uTargetPitch = pRenderer->uTargetSurfacePitch;
2961 v12 = a1->uFrameY + 52; 2958 v12 = a1->uFrameY + 52;
2962 v106.uViewportX = a1->uFrameX + 13; 2959 v106.uViewportX = a1->uFrameX + 13;