📄 msc.asm
字号:
mov eax,5
mul T_disY
mov T_disY,eax
.if eax<T_disX
mov eax,hBitmapP3
mov P_Zealot.state,eax
.else
mov eax,hBitmapP5
mov P_Zealot.state,eax
mov eax,object.speed
.if T_disY>eax
sub P_Zealot.yPos,eax
.endif
.endif
.if T_disX<=24 && T_disY<=60
mov P_isArrive,TRUE
.endif
.endif
.elseif object.nameId==ZEALOT2
.if T_disX<eax
mov eax,object.speed
.if T_disY>eax
sub P_Zealot2.yPos,eax
.endif
mov eax,T_disY
add T_disY,eax
mov eax,5
mul T_disX
mov T_disX,eax
.if eax<T_disY
mov eax,hBitmapP1
mov P_Zealot2.state,eax
.else
mov eax,hBitmapP5
mov P_Zealot2.state,eax
mov eax,object.speed
.if T_disX>eax
sub P_Zealot2.xPos,eax
.endif
.endif
.if T_disX<=60 && T_disY<=24
mov P2_isArrive,TRUE
.endif
.else
mov eax,object.speed
.if T_disX>eax
sub P_Zealot2.xPos,eax
.endif
mov eax,T_disX
add T_disX,eax
mov eax,5
mul T_disY
mov T_disY,eax
.if eax<T_disX
mov eax,hBitmapP3
mov P_Zealot2.state,eax
.else
mov eax,hBitmapP5
mov P_Zealot2.state,eax
mov eax,object.speed
.if T_disY>eax
sub P_Zealot2.yPos,eax
.endif
.endif
.if T_disX<=24 && T_disY<=60
mov P2_isArrive,TRUE
.endif
.endif
.endif
jmp update
three:
mov eax,object.xPos
sub eax,destX
mov T_disX,eax
mov eax,destY
sub eax,object.yPos
mov T_disY,eax
.if object.nameId==VULTURE
.if T_disX<eax
mov eax,object.speed
.if T_disY>eax
add T_Vulture.yPos,eax
.endif
mov eax,T_disY
add T_disY,eax
mov eax,5
mul T_disX
mov T_disX,eax
.if eax<T_disY
mov eax,hBitmapT2
mov T_Vulture.state,eax
.else
mov eax,hBitmapT6
mov T_Vulture.state,eax
mov eax,object.speed
.if T_disX>eax
sub T_Vulture.xPos,eax
.endif
.endif
.if T_disX<=100 && T_disY<=40
mov T_isArrive,TRUE
.endif
.else
mov eax,object.speed
.if T_disX>eax
sub T_Vulture.xPos,eax
.endif
mov eax,T_disX
add T_disX,eax
mov eax,5
mul T_disY
mov T_disY,eax
.if eax<T_disX
mov eax,hBitmapT3
mov T_Vulture.state,eax
.else
mov eax,hBitmapT6
mov T_Vulture.state,eax
mov eax,object.speed
.if T_disY>eax
add T_Vulture.yPos,eax
.endif
.endif
.if T_disX<=40 && T_disY<=100
mov T_isArrive,TRUE
.endif
.endif
.elseif object.nameId==ZEALOT
.if T_disX<eax
mov eax,object.speed
.if T_disY>eax
add P_Zealot.yPos,eax
.endif
mov eax,T_disY
add T_disY,eax
mov eax,5
mul T_disX
mov T_disX,eax
.if eax<T_disY
mov eax,hBitmapP2
mov P_Zealot.state,eax
.else
mov eax,hBitmapP6
mov P_Zealot.state,eax
mov eax,object.speed
.if T_disX>eax
sub P_Zealot.xPos,eax
.endif
.endif
.if T_disX<=60 && T_disY<=24
mov P_isArrive,TRUE
.endif
.else
mov eax,object.speed
.if T_disX>eax
sub P_Zealot.xPos,eax
.endif
mov eax,T_disX
add T_disX,eax
mov eax,5
mul T_disY
mov T_disY,eax
.if eax<T_disX
mov eax,hBitmapP3
mov P_Zealot.state,eax
.else
mov eax,hBitmapP6
mov P_Zealot.state,eax
mov eax,object.speed
.if T_disY>eax
add P_Zealot.yPos,eax
.endif
.endif
.if T_disX<=24 && T_disY<=60
mov P_isArrive,TRUE
.endif
.endif
.elseif object.nameId==ZEALOT2
.if T_disX<eax
mov eax,object.speed
.if T_disY>eax
add P_Zealot2.yPos,eax
.endif
mov eax,T_disY
add T_disY,eax
mov eax,5
mul T_disX
mov T_disX,eax
.if eax<T_disY
mov eax,hBitmapP2
mov P_Zealot2.state,eax
.else
mov eax,hBitmapP6
mov P_Zealot2.state,eax
mov eax,object.speed
.if T_disX>eax
sub P_Zealot2.xPos,eax
.endif
.endif
.if T_disX<=60 && T_disY<=24
mov P2_isArrive,TRUE
.endif
.else
mov eax,object.speed
.if T_disX>eax
sub P_Zealot2.xPos,eax
.endif
mov eax,T_disX
add T_disX,eax
mov eax,5
mul T_disY
mov T_disY,eax
.if eax<T_disX
mov eax,hBitmapP3
mov P_Zealot2.state,eax
.else
mov eax,hBitmapP6
mov P_Zealot2.state,eax
mov eax,object.speed
.if T_disY>eax
add P_Zealot2.yPos,eax
.endif
.endif
.if T_disX<=24 && T_disY<=60
mov P2_isArrive,TRUE
.endif
.endif
.endif
jmp update
four:
mov eax,destX
sub eax,object.xPos
mov T_disX,eax
mov eax,destY
sub eax,object.yPos
mov T_disY,eax
.if object.nameId==VULTURE
.if T_disX<eax
mov eax,object.speed
.if T_disY>eax
add T_Vulture.yPos,eax
.endif
mov eax,T_disY
add T_disY,eax
mov eax,5
mul T_disX
mov T_disX,eax
.if eax<T_disY
mov eax,hBitmapT2
mov T_Vulture.state,eax
.else
mov eax,hBitmapT7
mov T_Vulture.state,eax
mov eax,object.speed
.if T_disX>eax
add T_Vulture.xPos,eax
.endif
.endif
.if T_disX<=100 && T_disY<=40
mov T_isArrive,TRUE
.endif
.else
mov eax,object.speed
.if T_disX>eax
add T_Vulture.xPos,eax
.endif
mov eax,T_disX
add T_disX,eax
mov eax,5
mul T_disY
mov T_disY,eax
.if eax<T_disX
mov eax,hBitmapT4
mov T_Vulture.state,eax
.else
mov eax,hBitmapT7
mov T_Vulture.state,eax
mov eax,object.speed
.if T_disY>eax
add T_Vulture.yPos,eax
.endif
.endif
.if T_disX<=40 && T_disY<=100
mov T_isArrive,TRUE
.endif
.endif
.elseif object.nameId==ZEALOT
.if T_disX<eax
mov eax,object.speed
.if T_disY>eax
add P_Zealot.yPos,eax
.endif
mov eax,T_disY
add T_disY,eax
mov eax,5
mul T_disX
mov T_disX,eax
.if eax<T_disY
mov eax,hBitmapP2
mov P_Zealot.state,eax
.else
mov eax,hBitmapP7
mov P_Zealot.state,eax
mov eax,object.speed
.if T_disX>eax
add P_Zealot.xPos,eax
.endif
.endif
.if T_disX<=60 && T_disY<=24
mov P_isArrive,TRUE
.endif
.else
mov eax,object.speed
.if T_disX>eax
add P_Zealot.xPos,eax
.endif
mov eax,T_disX
add T_disX,eax
mov eax,5
mul T_disY
mov T_disY,eax
.if eax<T_disX
mov eax,hBitmapP4
mov P_Zealot.state,eax
.else
mov eax,hBitmapP7
mov P_Zealot.state,eax
mov eax,object.speed
.if T_disY>eax
add P_Zealot.yPos,eax
.endif
.endif
.if T_disX<=24 && T_disY<=60
mov P_isArrive,TRUE
.endif
.endif
.elseif object.nameId==ZEALOT2
.if T_disX<eax
mov eax,object.speed
.if T_disY>eax
add P_Zealot2.yPos,eax
.endif
mov eax,T_disY
add T_disY,eax
mov eax,5
mul T_disX
mov T_disX,eax
.if eax<T_disY
mov eax,hBitmapP2
mov P_Zealot2.state,eax
.else
mov eax,hBitmapP7
mov P_Zealot2.state,eax
mov eax,object.speed
.if T_disX>eax
add P_Zealot2.xPos,eax
.endif
.endif
.if T_disX<=60 && T_disY<=24
mov P2_isArrive,TRUE
.endif
.else
mov eax,object.speed
.if T_disX>eax
add P_Zealot2.xPos,eax
.endif
mov eax,T_disX
add T_disX,eax
mov eax,5
mul T_disY
mov T_disY,eax
.if eax<T_disX
mov eax,hBitmapP4
mov P_Zealot2.state,eax
.else
mov eax,hBitmapP7
mov P_Zealot2.state,eax
mov eax,object.speed
.if T_disY>eax
add P_Zealot2.yPos,eax
.endif
.endif
.if T_disX<=24 && T_disY<=60
mov P2_isArrive,TRUE
.endif
.endif
.endif
update:
mov eax,object.xPos
sub eax,object.speed
mov T_updateRect.left,eax
.if object.nameId==VULTURE
add eax,96 ; 56+object.speed*2
.elseif object.nameId==ZEALOT
add eax,48 ; 24+object.speed*2
.elseif object.nameId==ZEALOT2
add eax,48
.endif
mov T_updateRect.right,eax
mov eax,object.yPos
sub eax,object.speed
mov T_updateRect.top,eax
.if object.nameId==VULTURE
add eax,96
.elseif object.nameId==ZEALOT
add eax,54
.elseif object.nameId==ZEALOT2
add eax,54
.endif
mov T_updateRect.bottom,eax
invoke InvalidateRect,hWnd,addr T_updateRect,TRUE
invoke InvalidateRect,hWnd,addr stateRect,TRUE
ret
MoveProc endp
end start
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -