V-MapClass.asm
资源名称:VeMU.rar [点击查看]
上传用户:santakups8
上传日期:2021-03-23
资源大小:544k
文件大小:6k
源码类别:
模拟服务器
开发平台:
Asm
- ;EasyCodeName=Module1,1
- ;-----------------------------------------------------------------------------------
- ; VeMU
- ; Its a package that allows the user to set his own server of the game
- ; "MuOnline", this is not an emulator since i am not "emulating"
- ; what the actual games does, i am "creating" a method for set a Server
- ; of this Game.
- ;
- ; Copyright (C) 2010 Felipe Ya馿z
- ;
- ; This program is free software: you can redistribute it and/or modify
- ; it under the terms of the GNU General Public License as published by
- ; the Free Software Foundation, either version 3 of the License, or
- ; (at your option) any later version.
- ;
- ; This program is distributed in the hope that it will be useful,
- ; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ; GNU General Public License for more details.
- ;
- ; You should have received a copy of the GNU General Public License
- ; along with this program. If not, see http://www.gnu.org/licenses/.
- ;-----------------------------------------------------------------------------------
- ;-----------------------------------------------------------------------------------
- ; -----------------
- ; Coded /
- ; By /
- ; -={FeN$x)=-
- ; / Felipe Y.
- ; /
- ; -----------------
- ; Programming Lang: ASM
- ; Country: Chile
- ; My respect for all those who lost their lifes
- ; In the earthquake of my country...
- ; Let god take their spirits home...
- ;-----------------------------------------------------------------------------------
- ;////////////////////////////////////////////////////////////////////////////////////
- ; VeMU Project
- ; MAP CLASS !
- ;////////////////////////////////////////////////////////////////////////////////////
- V_CMap_LoadTerrain Proto :DWord
- ;///////////////////////////////////////
- ;View Port Player struct
- ;Will be moved for sure
- ;to another file in future
- ;versions.
- ;/////////////////////////////////////
- VIEW_PORT_PLAYER Struct
- State Word ? ;B
- Number Word ?
- iType Word ? ;B
- Index Word ?
- Dis DWord ?
- VIEW_PORT_PLAYER EndS
- ;///////////////////////////////////////
- ;CMAPItem struct, handles positions
- ;PlayersID, and alot of more
- ;variables that are important
- ;But only for ITEMS !
- ;/////////////////////////////////////
- CMAPITEM Struct
- Items ItemStruct <?>
- PlayerX Byte ?
- PlayerY Byte ?
- Live Byte ?
- Give Byte ?
- State DWord ?
- Time DWord ?
- PlayerID DWord ?
- LootTime DWord ?
- VpPlayer VIEW_PORT_PLAYER 75 Dup (<?>) ;this is weird the VIEW_PORT of players is for max 75 players
- VpCounter DWord ?
- CMAPITEM EndS
- ;////////////////////////////////////////////////////
- ;The main Map structure
- ;This class got inside support
- ;for items, regen area, ViewPort
- ;and others, its a very big struct
- ;linked to the total of Maps to load.
- ;////////////////////////////////////////////////////
- MapClass Struct
- pMapAttr DWord ? ;Pointer to save maps attributes
- Header DWord ?
- gWidth DWord ?
- gHeight DWord ?
- pPath DWord ? ;pointer to struct PATHDIMENSION
- ItemMaps CMAPITEM 300 Dup (<?>) ;How much items you can put in map, i cant put the constant but its MAXITEMS_INMAP
- ItemCounter DWord ?
- RegenArea RECT 57 Dup (<?>) ;This array is for the spawn area, i cant put the constats but its MAPLIMIT
- MapNumber DWord ?
- MapClass EndS
- ;////////////////////////////////////////////////////
- ;This is a virtual initialised struct
- ;And got information about the path of maps
- ;its used for store the bytes readed from a terrain.
- ;////////////////////////////////////////////////////
- PATHDIMENSION Struct
- vWidth DWord ?
- vHeight DWord ?
- NumPath DWord ?
- PathX Byte 500 Dup(?) ;Max X Cords (a little exagerated)
- PathY Byte 500 Dup(?) ;Max Y Cords (a little exagerated)
- Dir Byte 64 Dup(?) ; Direction a little weird so much bytes
- LastDir DWord ?
- NumFails DWord ?
- pMap DWord ? ;same pointer has pMap from global struct no reason for this
- pHitMap DWord ? ;Pointer
- cStx DWord ?
- cSty DWord ?
- cEdx DWord ?
- cEdy DWord ?
- PATHDIMENSION EndS
- ;////////////////////////////////////////////////////
- ;Constants for maps !
- ;////////////////////////////////////////////////////
- .Const
- ATT12 Equ 11 ;since terrain0.att doesnt exist its -1
- ATT19 Equ 18 ;since terrain0.att doesnt exist its -1
- ATT25 Equ 24 ;since terrain0.att doesnt exist its -1
- ATT46 equ 45 ;since terrain0.att doesnt exist its -1
- ATT57 equ 56 ;since terrain0.att doesnt exist its -1
- MAPLIMIT Equ 57 ;NEW MAPS LIMITS !
- MAPWIDTH Equ 256
- MAPHEIGHT Equ 256
- MAXITEMS_INMAP Equ 300
- MAPTRADEINV_SIZE equ 32
- MAPINV_SIZE equ 96
- MAPWARE_SIZE equ 120
- ALIGN_MAP_STRINGS equ 26 ;Aligment that each Map string use
- ;////////////////////////////////////////////////////
- ;Unitialized Data !
- ;////////////////////////////////////////////////////
- .Data?
- pMapObjSpace DB MAPLIMIT * SizeOf MapClass Dup(?) ;Main space for store allmost everything releated to maps
- pTempInventoryMap DB MAPINV_SIZE Dup(?)
- pTempTradeMap DB MAPTRADEINV_SIZE Dup(?)
- pTempWareHouseMap DB MAPWARE_SIZE Dup(?)
- pInventoryMap1 DB (MAX_OBJ_ID - START_OBJ_PLAYERID) * SizeOf ItemStruct * MAPINV_SIZE Dup(?)
- pInventoryMap2 DB (MAX_OBJ_ID - START_OBJ_PLAYERID) * SizeOf ItemStruct * MAPINV_SIZE Dup(?)
- .Data
- .Code