changeset 861:fea81e031484

more AI function renames
author zipi
date Sun, 31 Mar 2013 12:49:45 +0100
parents 8fc2f035abc0
children f4394e320312
files Actor.cpp Actor.h mm7_3.cpp mm7_5.cpp
diffstat 4 files changed, 32 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/Actor.cpp	Sun Mar 31 12:39:29 2013 +0100
+++ b/Actor.cpp	Sun Mar 31 12:49:45 2013 +0100
@@ -2034,7 +2034,7 @@
 }
 
 //----- (00403C6C) --------------------------------------------------------
-void Actor::_403C6C(unsigned int uActorID, signed int sTargetPid, struct AIDirection *arg0)
+void Actor::MeleeAttack(unsigned int uActorID, signed int sTargetPid, struct AIDirection *arg0)
 {
   Actor *v3; // ebx@1
   char v4; // zf@1
@@ -2436,7 +2436,7 @@
 }
 
 //----- (00403A60) --------------------------------------------------------
-void Actor::_403A60(unsigned int uActorID, signed int edx0, AIDirection *pDir)
+void Actor::SpellAttack2(unsigned int uActorID, signed int edx0, AIDirection *pDir)
 {
   Actor *v3; // ebx@1
   AIDirection *v4; // esi@3
@@ -2542,7 +2542,7 @@
 }
 
 //----- (00403854) --------------------------------------------------------
-void Actor::_403854(unsigned int uActorID, signed int sTargetPid, AIDirection *pDir)
+void Actor::SpellAttack1(unsigned int uActorID, signed int sTargetPid, AIDirection *pDir)
 {
   Actor *v3; // ebx@1
   AIDirection *v4; // esi@3
@@ -2648,7 +2648,7 @@
 }
 
 //----- (0040368B) --------------------------------------------------------
-void Actor::_40368B(unsigned int uActorID, signed int sTargetPid, AIDirection *pDir)
+void Actor::MissileAttack2(unsigned int uActorID, signed int sTargetPid, AIDirection *pDir)
 {
   Actor *v3; // ebx@1
   AIDirection *v4; // esi@3
@@ -2739,7 +2739,7 @@
 }
 
 //----- (00403476) --------------------------------------------------------
-void Actor::_403476(unsigned int uActorID, signed int sTargetPid, AIDirection *pDir)
+void Actor::MissileAttack1(unsigned int uActorID, signed int sTargetPid, AIDirection *pDir)
 {
   Actor *v3; // ebx@1
   int v4; // esi@3
@@ -2979,7 +2979,7 @@
 }
 
 //----- (004030AD) --------------------------------------------------------
-void Actor::_4030AD(unsigned int uActorID, signed int edx0, int arg0)
+void Actor::Stun(unsigned int uActorID, signed int edx0, int arg0)
 {
   unsigned int v3; // edi@1
   Actor *v4; // ebx@1
--- a/Actor.h	Sun Mar 31 12:39:29 2013 +0100
+++ b/Actor.h	Sun Mar 31 12:49:45 2013 +0100
@@ -201,14 +201,14 @@
   static void Die(unsigned int uActorID);
   static void Resurrect(unsigned int uActorID);
   static void AI_Bored(unsigned int uActorID, unsigned int uObjID, struct AIDirection *a4);
-  static void _4030AD(unsigned int uActorID, signed int edx0, int arg0);
+  static void Stun(unsigned int uActorID, signed int edx0, int arg0);
   static char __fastcall _4031C1_update_job(unsigned int uActorID, signed int a2, int a3);
   static void _4032B2(unsigned int a1, unsigned int a2, int a3, int uActionLength);
-  static void _403476(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
-  static void _40368B(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
-  static void _403854(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
-  static void _403A60(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
-  static void _403C6C(unsigned int uActorID, signed int sTargetPid, struct AIDirection *arg0);
+  static void MissileAttack1(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
+  static void MissileAttack2(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
+  static void SpellAttack1(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
+  static void SpellAttack2(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir);
+  static void MeleeAttack(unsigned int uActorID, signed int sTargetPid, struct AIDirection *arg0);
   static void __fastcall StandAwhile(unsigned int uActorID);
   static void AI_Stand(unsigned int uActorID, unsigned int object_to_face_pid, unsigned int uActionLength, struct AIDirection *a4);
   static void AI_StandOrBored(unsigned int uActorID, signed int uObjID, int uActionLength, struct AIDirection *a4);
--- a/mm7_3.cpp	Sun Mar 31 12:39:29 2013 +0100
+++ b/mm7_3.cpp	Sun Mar 31 12:49:45 2013 +0100
@@ -15197,7 +15197,7 @@
 							{
 								if ( v7 >= 0 )
 								{
-									Actor::_4030AD(v84, 4, 0);
+									Actor::Stun(v84, 4, 0);
 								}
 								else
 								{
@@ -15547,7 +15547,7 @@
 						{
 							if ( (signed int)v21->pMonsterInfo.uRecoveryTime <= 0 )
 							{
-								Actor::_403476(actor_id, target_pid, &pDir);
+								Actor::MissileAttack1(actor_id, target_pid, &pDir);
 							}
 							else if ( v21->pMonsterInfo.uMovementType == 5 )
 							{
@@ -15610,7 +15610,7 @@
 							else
 							{
 								//monsters
-								Actor::_403C6C(actor_id, target_pid, &pDir);
+								Actor::MeleeAttack(actor_id, target_pid, &pDir);
 							}
 						}
 						continue;
@@ -15626,9 +15626,9 @@
 							if ( (signed int)v21->pMonsterInfo.uRecoveryTime <= 0 )
 							{
 								if ( v45 == 2 )
-									Actor::_403854(actor_id, target_pid, &pDir);
+									Actor::SpellAttack1(actor_id, target_pid, &pDir);
 								else
-									Actor::_403A60(actor_id, target_pid, &pDir);
+									Actor::SpellAttack2(actor_id, target_pid, &pDir);
 							}
 							else if ( v80 * 307.2 > (double)v81 || v21->pMonsterInfo.uMovementType == 5 )
 							{
@@ -15680,7 +15680,7 @@
 							}
 							else
 							{
-								Actor::_403C6C(actor_id, target_pid, &pDir);
+								Actor::MeleeAttack(actor_id, target_pid, &pDir);
 							}
 						}
 						continue;
@@ -15754,7 +15754,7 @@
 				}
 				else
 				{
-					Actor::_403C6C(actor_id, target_pid, &pDir);
+					Actor::MeleeAttack(actor_id, target_pid, &pDir);
 				}
 			}
 			else if ( (signed int)v21->pMonsterInfo.uRecoveryTime > 0 )
@@ -15772,7 +15772,7 @@
 			}
 			else
 			{
-				Actor::_40368B(actor_id, target_pid, &pDir);
+				Actor::MissileAttack2(actor_id, target_pid, &pDir);
 			}
 		}
 	}
--- a/mm7_5.cpp	Sun Mar 31 12:39:29 2013 +0100
+++ b/mm7_5.cpp	Sun Mar 31 12:49:45 2013 +0100
@@ -5046,7 +5046,7 @@
   }
   if ( pMonster->sCurrentHP > 0 )
   {
-    Actor::_4030AD(uActorID_Monster_, a1, 0);
+    Actor::Stun(uActorID_Monster_, a1, 0);
     Actor::AggroSurroundingPeasants(uActorID_Monster_, 1);
     if ( bShowDamage )
     {
@@ -5381,7 +5381,7 @@
             {
               if ( v7->sCurrentHP >= 1 )
               {
-                Actor::_4030AD(uActorID, PID(a4,OBJECT_Player), 0);
+                Actor::Stun(uActorID, PID(a4,OBJECT_Player), 0);
                 Actor::AggroSurroundingPeasants(uActorID, 1);
               }
               else
@@ -5567,7 +5567,7 @@
                   {
                     if ( v44->sCurrentHP >= 1 )
                     {
-                      Actor::_4030AD(uActorID, PID(a4,OBJECT_Player), 0);
+                      Actor::Stun(uActorID, PID(a4,OBJECT_Player), 0);
                       Actor::AggroSurroundingPeasants(uActorID, 1);
                     }
                     else
@@ -5859,7 +5859,7 @@
         if ( v7 )
         {
           if ( pActor->sCurrentHP > 0 )
-            Actor::_4030AD(uActorIDa, a2, 0);
+            Actor::Stun(uActorIDa, a2, 0);
           else
             Actor::Die(uActorIDa);
           a2a = 20 * v7 / (signed int)pActor->pMonsterInfo.uHP;
@@ -5878,7 +5878,7 @@
         }
         else
         {
-          Actor::_4030AD(uActorIDa, a2, 0);
+          Actor::Stun(uActorIDa, a2, 0);
         }
       }
     }
@@ -5967,7 +5967,7 @@
               if ( v14 )
               {
                 if ( v7->sCurrentHP > 0 )
-                  Actor::_4030AD(uActorID, v17, 0);
+                  Actor::Stun(uActorID, v17, 0);
                 else
                   Actor::Die(uActorID);
                 Actor::AggroSurroundingPeasants(uActorID, 0);
@@ -5987,7 +5987,7 @@
               }
               else
               {
-                Actor::_4030AD(uActorID, v17, 0);
+                Actor::Stun(uActorID, v17, 0);
               }
               return;
             }
@@ -7470,7 +7470,7 @@
         {
           if ( v5->pMonsterInfo.uMissleAttack2Type )
           {
-            Actor::_40368B(v13, v22, &v18);
+            Actor::MissileAttack2(v13, v22, &v18);
             goto LABEL_43;
           }
         }
@@ -7485,16 +7485,16 @@
             if ( v15 )
             {
               if ( v14 == 2 )
-                Actor::_403854(v13, v22, &v18);
+                Actor::SpellAttack1(v13, v22, &v18);
               else
-                Actor::_403A60(v13, v22, &v18);
+                Actor::SpellAttack2(v13, v22, &v18);
               goto LABEL_43;
             }
             goto LABEL_44;
           }
           if ( v5->pMonsterInfo.uMissleAttack1Type )
           {
-            Actor::_403476(v13, v22, &v18);
+            Actor::MissileAttack1(v13, v22, &v18);
 LABEL_43:
             //v3 = v21;
             v21->field_C = 1;
@@ -7507,7 +7507,7 @@
 LABEL_44:
         if ( (double)(signed int)v20 < 307.2 )
         {
-          Actor::_403C6C(v13, v22, &v18);
+          Actor::MeleeAttack(v13, v22, &v18);
           //v3 = v21;
           v21->field_C = 3;
           goto LABEL_48;