植物大战僵尸源代码.docx

上传人:b****6 文档编号:11941755 上传时间:2023-06-03 格式:DOCX 页数:34 大小:19.79KB
下载 相关 举报
植物大战僵尸源代码.docx_第1页
第1页 / 共34页
植物大战僵尸源代码.docx_第2页
第2页 / 共34页
植物大战僵尸源代码.docx_第3页
第3页 / 共34页
植物大战僵尸源代码.docx_第4页
第4页 / 共34页
植物大战僵尸源代码.docx_第5页
第5页 / 共34页
植物大战僵尸源代码.docx_第6页
第6页 / 共34页
植物大战僵尸源代码.docx_第7页
第7页 / 共34页
植物大战僵尸源代码.docx_第8页
第8页 / 共34页
植物大战僵尸源代码.docx_第9页
第9页 / 共34页
植物大战僵尸源代码.docx_第10页
第10页 / 共34页
植物大战僵尸源代码.docx_第11页
第11页 / 共34页
植物大战僵尸源代码.docx_第12页
第12页 / 共34页
植物大战僵尸源代码.docx_第13页
第13页 / 共34页
植物大战僵尸源代码.docx_第14页
第14页 / 共34页
植物大战僵尸源代码.docx_第15页
第15页 / 共34页
植物大战僵尸源代码.docx_第16页
第16页 / 共34页
植物大战僵尸源代码.docx_第17页
第17页 / 共34页
植物大战僵尸源代码.docx_第18页
第18页 / 共34页
植物大战僵尸源代码.docx_第19页
第19页 / 共34页
植物大战僵尸源代码.docx_第20页
第20页 / 共34页
亲,该文档总共34页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

植物大战僵尸源代码.docx

《植物大战僵尸源代码.docx》由会员分享,可在线阅读,更多相关《植物大战僵尸源代码.docx(34页珍藏版)》请在冰点文库上搜索。

植物大战僵尸源代码.docx

植物大战僵尸源代码

植物大战僵尸中文第二版和年度版游戏分析及delphi源码

格子数:

[[[6a9ec0]+768]+144]+24

怪物数=6a9ec0+768+a0

分析数据:

游戏基址:

6a9ec0768

阳光:

 [[6a9ec0]+768]+5560 

最多几个植物:

6a9ec076814424

准备了几个植物:

d247746a9ec0

僵尸行走:

52AFCA

486C55

获取怪物:

413108

ebx:

6a9ec0768

怪物属性偏移:

+2CX坐标

+30Y坐标

+C8当前血量

+CC最大血量

+1c第几行

+18是否可见

+11C怪物的大小

获取植物栏:

4131F0

植物属性:

+24当前恢复使用的值==+28可以使用

+28要多少恢复值才可以使用(种植植物后,恢复+28的地址为488f7d3个字节)

+34物品的类型

植物冷却状态地址(0为不可用,1为可用):

第1格:

[[[6A9EC0]+768]+144]+70

第2格:

[[[6A9EC0]+768]+144]+C0

第3格:

[[[6A9EC0]+768]+144]+110

第4格:

[[[6A9EC0]+768]+144]+160

第5格:

[[[6A9EC0]+768]+144]+1B0

第6格:

[[[6A9EC0]+768]+144]+200

第7格:

[[[6A9EC0]+768]+144]+250

第8格:

[[[6A9EC0]+768]+144]+2A0

第9格:

[[[6A9EC0]+768]+144]+2F0

第10格:

[[[6A9EC0]+768]+144]+340

植物栏列表:

dd[[[6a9ec0]+768]+144]+28+i*50

种植植物的属性:

4130F4

+58多久产生阳光

+24产生什么东西

+28会不会产生东西(表示会吐阳光)

+18可以看得见吗1表示可见

植物减血:

52FCF04个字节

地下物品:

413184

+58物品的类型

金钱数量地址:

[[[[6A9EC0]+768]+8C]+82C]+28

004130D0/$83EC08      SUBESP,8

004130D3|.55           PUSHEBP

004130D4|.56           PUSHESI

004130D5|.33ED         XOREBP,EBP

004130D7|.57           PUSHEDI

004130D8|.8D742410    LEAESI,DWORDPTRSS:

[ESP+10]

004130DC|.8BD3         MOVEDX,EBX

004130DE|.896C2410    MOVDWORDPTRSS:

[ESP+10],EBP

004130E2|.E869980000  CALLPlantsVs.0041C950

004130E7|.84C0         TESTAL,AL

004130E9|.741D        JESHORTPlantsVs.00413108

004130EB|.EB03        JMPSHORTPlantsVs.004130F0

004130ED|  8D4900      LEAECX,DWORDPTRDS:

[ECX]

004130F0|>8B442410    /MOVEAX,DWORDPTRSS:

[ESP+10]

004130F4|.E8470D0500  |CALLPlantsVs.00463E40                 ;种植的植物

004130F9|.8D742410    |LEAESI,DWORDPTRSS:

[ESP+10]

004130FD|.8BD3         |MOVEDX,EBX

004130FF|.E84C980000  |CALLPlantsVs.0041C950

00413104|.84C0         |TESTAL,AL

00413106|.^75E8        \JNZSHORTPlantsVs.004130F0

00413108|>8D742410    LEAESI,DWORDPTRSS:

[ESP+10]           ;取v的地址

0041310C|.8BD3         MOVEDX,EBX                             ;取角色对象

0041310E|.896C2410    MOVDWORDPTRSS:

[ESP+10],EBP           ;v=0

00413112|.E8D9970000  CALLPlantsVs.0041C8F0

00413117|.84C0         TESTAL,AL                              ;al!

=0的时候,表示有怪物要行动

00413119|.741D        JESHORTPlantsVs.00413138

0041311B|.EB03        JMPSHORTPlantsVs.00413120

0041311D|  8D4900      LEAECX,DWORDPTRDS:

[ECX]

00413120|>8B442410    /MOVEAX,DWORDPTRSS:

[ESP+10]

00413124|.E8377D1100  |CALLPlantsVs.0052AE60

00413129|.8D742410    |LEAESI,DWORDPTRSS:

[ESP+10]

0041312D|.8BD3         |MOVEDX,EBX

0041312F|.E8BC970000  |CALLPlantsVs.0041C8F0

00413134|.84C0         |TESTAL,AL

00413136|.^75E8        \JNZSHORTPlantsVs.00413120

00413138|>8D742410    LEAESI,DWORDPTRSS:

[ESP+10]

0041313C|.8BD3         MOVEDX,EBX

0041313E|.896C2410    MOVDWORDPTRSS:

[ESP+10],EBP

00413142|.E869980000  CALLPlantsVs.0041C9B0

00413147|.84C0         TESTAL,AL

00413149|.741D        JESHORTPlantsVs.00413168

0041314B|.EB03        JMPSHORTPlantsVs.00413150

0041314D|  8D4900      LEAECX,DWORDPTRDS:

[ECX]

00413150|>8B442410    /MOVEAX,DWORDPTRSS:

[ESP+10]

00413154|.E807B30500  |CALLPlantsVs.0046E460

00413159|.8D742410    |LEAESI,DWORDPTRSS:

[ESP+10]

0041315D|.8BD3         |MOVEDX,EBX

0041315F|.E84C980000  |CALLPlantsVs.0041C9B0

00413164|.84C0         |TESTAL,AL

00413166|.^75E8        \JNZSHORTPlantsVs.00413150

00413168|>8D742410    LEAESI,DWORDPTRSS:

[ESP+10]

0041316C|.8BD3         MOVEDX,EBX

0041316E|.896C2410    MOVDWORDPTRSS:

[ESP+10],EBP

00413172|.E899980000  CALLPlantsVs.0041CA10

00413177|.84C0         TESTAL,AL

00413179|.741D        JESHORTPlantsVs.00413198

0041317B|.EB03        JMPSHORTPlantsVs.00413180

0041317D|  8D4900      LEAECX,DWORDPTRDS:

[ECX]

00413180|>8B442410    /MOVEAX,DWORDPTRSS:

[ESP+10]

00413184|.E877E30100  |CALLPlantsVs.00431500                 ;地上的物品

00413189|.8D742410    |LEAESI,DWORDPTRSS:

[ESP+10]

0041318D|.8BD3         |MOVEDX,EBX

0041318F|.E87C980000  |CALLPlantsVs.0041CA10

00413194|.84C0         |TESTAL,AL

00413196|.^75E8        \JNZSHORTPlantsVs.00413180

00413198|>8D742410    LEAESI,DWORDPTRSS:

[ESP+10]

0041319C|.8BD3         MOVEDX,EBX

0041319E|.896C2410    MOVDWORDPTRSS:

[ESP+10],EBP

004131A2|.E8C9980000  CALLPlantsVs.0041CA70

004131A7|.84C0         TESTAL,AL

004131A9|.741E        JESHORTPlantsVs.004131C9

004131AB|.EB03        JMPSHORTPlantsVs.004131B0

004131AD|  8D4900      LEAECX,DWORDPTRDS:

[ECX]

004131B0|>8B442410    /MOVEAX,DWORDPTRSS:

[ESP+10]

004131B4|.50           |PUSHEAX

004131B5|.E826550400  |CALLPlantsVs.004586E0

004131BA|.8D742410    |LEAESI,DWORDPTRSS:

[ESP+10]

004131BE|.8BD3         |MOVEDX,EBX

004131C0|.E8AB980000  |CALLPlantsVs.0041CA70

004131C5|.84C0         |TESTAL,AL

004131C7|.^75E7        \JNZSHORTPlantsVs.004131B0

004131C9|>8Bc33C010000MOVEDI,DWORDPTRDS:

[EBX+13C]          ;edi=游戏基址

004131CF|.E8CC5B0200  CALLPlantsVs.00438DA0

004131D4|.8BB338010000MOVESI,DWORDPTRDS:

[EBX+138]

004131DA|.E8A1550200  CALLPlantsVs.00438780

004131DF|.8B8344010000MOVEAX,DWORDPTRDS:

[EBX+144]

004131E5|.33F6         XORESI,ESI

004131E7|.396824      CMPDWORDPTRDS:

[EAX+24],EBP

004131EA|.7E1E        JLESHORTPlantsVs.0041320A

004131EC|.33FF         XOREDI,EDI

004131EE|.8BFF         MOVEDI,EDI

004131F0|>8D440728    /LEAEAX,DWORDPTRDS:

[EDI+EAX+28]

004131F4|.E857400700  |CALLPlantsVs.00487250

004131F9|.8B8344010000|MOVEAX,DWORDPTRDS:

[EBX+144]

004131FF|.83C601      |ADDESI,1

00413202|.83C750      |ADDEDI,50

00413205|.3B7024      |CMPESI,DWORDPTRDS:

[EAX+24]

00413208|.^7CE6        \JLSHORTPlantsVs.004131F0

0041320A|>5F           POPEDI

0041320B|.5E           POPESI

0041320C|.5D           POPEBP

0041320D|.83C408      ADDESP,8

00413210\.C3           RETN

00410A94|.52           PUSHEDX                                ;-1

00410A95|.50           PUSHEAX                                ;植物类型

00410A96|.8B442420    MOVEAX,DWORDPTRSS:

[ESP+20]           ;Y

00410A9A|.57           PUSHEDI                                ;X

00410A9B|.55           PUSHEBP                                ;游戏基址

00410A9C|.E87FC6FFFF  CALLPlantsVs.0040D120

修改器代码:

var

Form1:

TForm1;

pGameBase:

Pointer;

pPlantBaseArray:

array[0..100]ofpointer;

pMonBaseArray:

array[0..100]ofpointer;

pGoodsBaseArray:

array[0..100]ofpointer;

  pPlantToolBarBaseArray:

array[0..100]ofpointer;

type

stMonsterInfo=record

x:

single;

y:

single;

nMaxHP:

integer;

nCurHP:

integer;

nRow:

integer;

fSize:

single;

end;

type

stPlantToolBarInfo=record

nType:

integer;

nMaxRecovery:

integer;

nCurRecovery:

integer;

end;

type

stGoodsInfo=record

nType:

integer;

end;

type

stPlantInfo=record

bIsProdure:

integer;

nType:

integer;

end;

implementation

{$R*.dfm}

procedureGetGameBase();

begin

asm

   pushad

   moveax,$6a9ec0

   moveax,[eax]

   addeax,$768

   moveax,[eax]

   movpGameBase,eax//游戏基址

   popad

end;

end;

functionGetMonsterBase(pMonBase:

Pointer):

Pointer;

begin

asm

   pushad

   movesi,pMonBase

   movedx,pGameBase//游戏基址

   movedi,$0041C8F0

   calledi//获取一个怪物地址

   popad

end;

Result:

=Pointer(pMonBase^);

end;

functionGetPlantBase(pPlantBase:

Pointer):

Pointer;

begin

asm

   pushad

   movesi,pPlantBase

   movedx,pGameBase//游戏基址

   movedi,$0041C950

   calledi//获取一个植物地址

   popad

end;

Result:

=Pointer(pPlantBase^);

end;

functionGetGoodsBase(pGoodsBase:

Pointer):

Pointer;

begin

asm

   pushad

   movesi,pGoodsBase

   movedx,pGameBase//游戏基址

   movedi,$0041CA10

   calledi//获取一个植物地址

   popad

end;

Result:

=Pointer(pGoodsBase^);

end;

functionGetPlantToolbarBase(nIndex:

integer):

Pointer;

var

pBase:

Pointer;

n:

integer;

begin

n:

=nIndex*$50+$28;

asm

pushad

   moveax,pGameBase

   moveax,[eax+$144]

   movpBase,eax

popad

end;

pBase:

=Pointer(DWORD(pBase)+n);

Result:

=pBase;

end;

functionGetMaxPlantNum():

integer;

var

n:

integer;

begin

asm

   pushad

   moveax,pGameBase

   moveax,[eax+$144]

   moveax,[eax+$24]

   movn,eax

   popad

end;

Result:

=n;

end;

procedureFreshMonsterList();

var

pMonBase:

Integer;

n,nIndex:

integer;

begin

nIndex:

=0;

pMonBase:

=0;

n:

=form1.RzComboBox1.ItemIndex;

form1.RzComboBox1.Clear;

repeat

   pMonBase:

=Integer(GetMonsterBase(@pMonBase));

   ifpMonBase=-1then

   begin

     form1.RzComboBox1.ItemIndex:

=n;

     exit;

   end;

   form1.RzComboBox1.Add('怪物:

'+IntToStr(nIndex+1));

   pMonBaseArray[nIndex]:

=Pointer(pMonBase);

   nIndex:

=nIndex+1;

until(false);

form1.RzComboBox1.ItemIndex:

=n;

end;

procedureFreshPlantToolBarList();

var

nMaxPlant:

integer;

i:

integer;

pPlantBase:

Pointer;

n,nIndex:

integer;

begin

n:

=form1.RzComboBox2.ItemIndex;

form1.RzComboBox2.Clear;

nIndex:

=0;

nMaxPlant:

=GetMaxPlantNum();

fori:

=0tonMaxPlant-1do

begin

   pPlantBase:

=GetPlantToolbarBase(i);

   pPlantToolBarBaseArray[nIndex]:

=pPlantBase;

   nIndex:

=nIndex+1;

   form1.RzComboBox2.Add('植物栏:

'+IntToStr(nIndex));

end;

form1.RzComboBox2.ItemIndex:

=n;

end;

procedureTForm1.FormCreate(Sender:

TObject);

begin

GetGameBase();

end;

procedureFreshPlantList();

var

pPlantBase:

Integer;

n,nIndex:

integer;

begin

n:

=form1.RzComboBox4.ItemIndex;

form1.RzComboBox4.Clear;

nIndex:

=0;

pPlantBase:

=0;

repeat

   pPlantBase:

=Integer(GetPlantBase(@pPlantBase));

   ifpPlantBase=-1then

   begin

     form1.RzComboBox4.ItemIndex:

=n;

     exit;

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 人文社科 > 法律资料

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2