当前位置:   article > 正文

植物大战僵尸源代码_c语言植物大战僵尸代码

c语言植物大战僵尸代码

最近下了植物大战僵尸的代码,却发现我什么也看不懂,呜呼哀哉。

分析数据:

游戏基址:6a9ec0 768
阳光: 5560 768 6a9ec0
最多几个植物:6a9ec0 768 144 24
准备了几个植物:d24 774 6a9ec0
僵尸行走:52AFCA
486C55

获取怪物:413108

ebx:6a9ec0 768

怪物属性偏移:
+2C X坐标
+30 Y坐标
+C8 当前血量
+CC 最大血量
+1c 第几行
+18 是否可见
+11C 怪物的大小

获取植物栏:4131F0

植物属性:
+24 当前恢复使用的值 == +28可以使用
+28 要多少恢复值才可以使用 (种植植物后,恢复+28的地址为488f7d 3个字节)
+34 物品的类型

植物栏列表:dd [[[6a9ec0]+768]+144]+28+i*50

种植植物的属性:4130F4
+58 多久产生阳光
+24 产生什么东西
+28 会不会产生东西 (表示会吐阳光)
+18 可以看得见吗 1表示可见
植物减血:52FCF0 4个字节

地下物品:413184
+58 物品的类型

004130D0 /$ 83EC 08       SUB ESP,8
004130D3 |. 55            PUSH EBP
004130D4 |. 56            PUSH ESI
004130D5 |. 33ED          XOR EBP,EBP
004130D7 |. 57            PUSH EDI
004130D8 |. 8D7424 10     LEA ESI,DWORD PTR SS:[ESP+10]
004130DC |. 8BD3          MOV EDX,EBX
004130DE |. 896C24 10     MOV DWORD PTR SS:[ESP+10],EBP
004130E2 |. E8 69980000   CALL PlantsVs.0041C950
004130E7 |. 84C0          TEST AL,AL
004130E9 |. 74 1D         JE SHORT PlantsVs.00413108
004130EB |. EB 03         JMP SHORT PlantsVs.004130F0
004130ED |   8D49 00       LEA ECX,DWORD PTR DS:[ECX]
004130F0 |> 8B4424 10     /MOV EAX,DWORD PTR SS:[ESP+10]
004130F4 |. E8 470D0500   |CALL PlantsVs.00463E40                  ; 种植的植物
004130F9 |. 8D7424 10     |LEA ESI,DWORD PTR SS:[ESP+10]
004130FD |. 8BD3          |MOV EDX,EBX
004130FF |. E8 4C980000   |CALL PlantsVs.0041C950
00413104 |. 84C0          |TEST AL,AL
00413106 |.^ 75 E8         /JNZ SHORT PlantsVs.004130F0
00413108 |> 8D7424 10     LEA ESI,DWORD PTR SS:[ESP+10]            ; 取v的地址
0041310C |. 8BD3          MOV EDX,EBX                              ; 取角色对象
0041310E |. 896C24 10     MOV DWORD PTR SS:[ESP+10],EBP            ; v = 0
00413112 |. E8 D9970000   CALL PlantsVs.0041C8F0
00413117 |. 84C0          TEST AL,AL                               ; al != 0的

时候,表示有怪物要行动
00413119 |. 74 1D         JE SHORT PlantsVs.00413138
0041311B |. EB 03         JMP SHORT PlantsVs.00413120
0041311D |   8D49 00       LEA ECX,DWORD PTR DS:[ECX]
00413120 |> 8B4424 10     /MOV EAX,DWORD PTR SS:[ESP+10]
00413124 |. E8 377D1100   |CALL PlantsVs.0052AE60
00413129 |. 8D7424 10     |LEA ESI,DWORD PTR SS:[ESP+10]
0041312D |. 8BD3          |MOV EDX,EBX
0041312F |. E8 BC970000   |CALL PlantsVs.0041C8F0
00413134 |. 84C0          |TEST AL,AL
00413136 |.^ 75 E8         /JNZ SHORT PlantsVs.00413120
00413138 |> 8D7424 10     LEA ESI,DWORD PTR SS:[ESP+10]
0041313C |. 8BD3          MOV EDX,EBX
0041313E |. 896C24 10     MOV DWORD PTR SS:[ESP+10],EBP
00413142 |. E8 69980000   CALL PlantsVs.0041C9B0
00413147 |. 84C0          TEST AL,AL
00413149 |. 74 1D         JE SHORT PlantsVs.00413168
0041314B |. EB 03         JMP SHORT PlantsVs.00413150
0041314D |   8D49 00       LEA ECX,DWORD PTR DS:[ECX]
00413150 |> 8B4424 10     /MOV EAX,DWORD PTR SS:[ESP+10]
00413154 |. E8 07B30500   |CALL PlantsVs.0046E460
00413159 |. 8D7424 10     |LEA ESI,DWORD PTR SS:[ESP+10]
0041315D |. 8BD3          |MOV EDX,EBX
0041315F |. E8 4C980000   |CALL PlantsVs.0041C9B0
00413164 |. 84C0          |TEST AL,AL
00413166 |.^ 75 E8         /JNZ SHORT PlantsVs.00413150
00413168 |> 8D7424 10     LEA ESI,DWORD PTR SS:[ESP+10]
0041316C |. 8BD3          MOV EDX,EBX
0041316E |. 896C24 10     MOV DWORD PTR SS:[ESP+10],EBP
00413172 |. E8 99980000   CALL PlantsVs.0041CA10
00413177 |. 84C0          TEST AL,AL
00413179 |. 74 1D         JE SHORT PlantsVs.00413198
0041317B |. EB 03         JMP SHORT PlantsVs.00413180
0041317D |   8D49 00       LEA ECX,DWORD PTR DS:[ECX]
00413180 |> 8B4424 10     /MOV EAX,DWORD PTR SS:[ESP+10]
00413184 |. E8 77E30100   |CALL PlantsVs.00431500                  ; 地上的物品
00413189 |. 8D7424 10     |LEA ESI,DWORD PTR SS:[ESP+10]
0041318D |. 8BD3          |MOV EDX,EBX
0041318F |. E8 7C980000   |CALL PlantsVs.0041CA10
00413194 |. 84C0          |TEST AL,AL
00413196 |.^ 75 E8         /JNZ SHORT PlantsVs.00413180
00413198 |> 8D7424 10     LEA ESI,DWORD PTR SS:[ESP+10]
0041319C |. 8BD3          MOV EDX,EBX
0041319E |. 896C24 10     MOV DWORD PTR SS:[ESP+10],EBP
004131A2 |. E8 C9980000   CALL PlantsVs.0041CA70
004131A7 |. 84C0          TEST AL,AL
004131A9 |. 74 1E         JE SHORT PlantsVs.004131C9
004131AB |. EB 03         JMP SHORT PlantsVs.004131B0
004131AD |   8D49 00       LEA ECX,DWORD PTR DS:[ECX]
004131B0 |> 8B4424 10     /MOV EAX,DWORD PTR SS:[ESP+10]
004131B4 |. 50            |PUSH EAX
004131B5 |. E8 26550400   |CALL PlantsVs.004586E0
004131BA |. 8D7424 10     |LEA ESI,DWORD PTR SS:[ESP+10]
004131BE |. 8BD3          |MOV EDX,EBX
004131C0 |. E8 AB980000   |CALL PlantsVs.0041CA70
004131C5 |. 84C0          |TEST AL,AL
004131C7 |.^ 7

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/668420
推荐阅读
相关标签
  

闽ICP备14008679号