公共变量.bas
资源名称:vbmcrisrc.rar [点击查看]
上传用户:pcw2004
上传日期:2022-02-02
资源大小:743k
文件大小:6k
源码类别:
DirextX编程
开发平台:
Visual Basic
- Attribute VB_Name = "公共变量"
- Option Explicit
- Public Declare Function GetTickCount Lib "kernel32" () As Long
- Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
- ' Download by http://www.codefans.net
- Public Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
- Public Const KEY_DOWN As Integer = &H1000
- Public SCREEN_WIDTH As Integer
- Public SCREEN_HEIGHT As Integer
- Public JianFa As Boolean
- Public Running As Integer '游戏状态(0账号登陆1角色选择2进入游戏)
- Public NetWalkData As Boolean
- Public NetRunData As Boolean
- Public NetMagicData As Boolean
- Public NetAttackData As Boolean
- Public Const TILE_WIDTH = 48
- Public Const TILE_HEIGHT = 32
- Public Const MainSleep = 20
- Public MainLassTime As Long
- Public NETDATACOUNT As Long
- Public NETDATA() As String
- Public NowNETData As String
- '///////// 定义主角编号
- Public MainHeroNum As Integer
- '///// 定义FPS变量
- Public FPS As Integer
- Public Frame As Long
- Public FrameLassTime As Long
- '//// 定义玩家怪物变量
- Public PlayerCount As Integer
- Public Player() As PlayerInfo
- '//// 定义游戏登陆贴图变量
- Public ChrSelTex() As TexInfo
- Public DoorPic As Integer
- Public DoorPicSpeed As Integer
- Public IDLoginOK As Boolean
- '//// 定义装备物品贴图变量
- Public HumTex() As TexInfo
- Public WeaponTex() As TexInfo
- Public ItemsTex() As TexInfo
- Public StateItemTex() As TexInfo
- '//////// 定义怪物贴图变量
- Public Type MonTexInfo
- MonTex() As TexInfo
- End Type
- Public MonPic() As MonTexInfo
- '////// 定义其它图片变量
- Public PrguseTex() As TexInfo
- Public Prguse2Tex() As TexInfo
- Public Prguse3Tex() As TexInfo
- '////////// 定义NPC贴图变量
- Public NpcTex() As TexInfo
- '//// 资源路径
- Public ResPath As String
- '//////定义地图视角变量
- Public MapX As Integer
- Public MapY As Integer
- Public WorldX As Integer
- Public WorldY As Integer
- '///// 定义地图变量
- Public Type MapMagicInfo
- MapMagicNum() As Integer
- MapMagicCount As Integer
- End Type
- Public Type MapType
- Width As Long
- Height As Long
- Map1() As Long '地板
- Map2() As Long '遮挡层
- Map3() As Long '人
- Map4() As Long '怪
- Map5() As Long 'NPC
- End Type
- Public Map As MapType
- Public Map3Tex As Direct3DTexture8
- '///// 定义鼠标键盘变量
- Public Type MouseType
- X As Single
- Y As Single
- MX As Integer
- MY As Integer
- SelX As Integer
- SelY As Integer
- Button1DownX As Single
- Button1DownY As Single
- Button2DownX As Single
- Button2DownY As Single
- Button1Down As Boolean
- button2Down As Boolean
- SelFrm As SelectFrm
- Item As ItemState
- MSelMonNum As Long
- End Type
- Public Mouse As MouseType
- Public ShiftKey As Boolean
- '/////// 定义其他窗口属性
- Public Type OtherFrmType
- X As Long
- Y As Long
- State As Boolean
- Item As ItemState
- MDX As Integer '鼠标按下坐标X
- MDY As Integer '鼠标按下坐标Y
- Type As Integer
- End Type
- Public HeroInfoFrm As OtherFrmType '定义主角信息窗口
- 'Type属性(0主角装备窗口 1 主角属性窗口 2 主角技能窗口 3 主角其他信息窗口)
- Public BagFrm As OtherFrmType '定义包裹窗口
- Public NpcFrm As OtherFrmType '定义NPC信息窗口
- Public ErrorFrm As OtherFrmType
- Public ErrorStr As String
- '//////// 鼠标选择的窗口
- Public Enum SelectFrm
- MainFrom = 0
- InfoFrom = 1
- JiaoYiFrom = 2
- NpcFrom = 3
- BagFrom = 4
- HeroInfoFrom = 5
- ErrorFrom = 6
- End Enum
- Public PaiXuPlayerNum() As Long
- '//////////// 定义交易变量
- Public Type JiaoYiType
- State As Boolean
- JiaoYiOK As Boolean
- JiaoYiPlayerNum As Integer
- JiaoYiPlayerName As String
- JiaoYiItems(9) As ItemState
- BeiJiaoYiItems(9) As ItemState
- End Type
- Public JiaoYi As JiaoYiType
- Public SendDataOK As Boolean '发送数据成功
- '/////// 定义聊天变量
- Public Type TalkType
- mStr As String
- mColor As Long
- PlayerName As String
- End Type
- Public TalkCount As Long
- Public TalkStr() As TalkType
- Public TalkStrStart As Long
- '///////// 定义技能属性
- Public Type MagicType
- Magic_Name As String
- Magic_Exp As Long
- Magic_MaxExp As Long
- Magic_Level As Integer
- Magic_Image As Long
- End Type
- Public HeroMagic() As MagicType
- '///// 定义角色信息
- Public Type mHeroType
- State As Boolean
- mName As String
- Level As Integer
- Job As Integer
- Sex As Integer
- mSel As Integer
- StartPic As Integer
- Pic As Integer
- PicSpeed As Integer
- End Type
- Public mHero(2) As mHeroType
- Public mSelHeroNum As Integer
- Public HeroID As String
- Public RegIDFrm As Boolean '注册ID窗口
- Public RegHero As Boolean '注册角色
- Public RegHeroJob As JobType
- Public RegHeroSex As SexType
- Public RegHeroPic As Integer
- Public mPic As Integer
- Public mPicSpeed As Integer
- '//////// 定义选择角色的魔法变量
- Public SelHeroMagic As Boolean
- Public SelHeroMagicPic As Integer
- Public SelHeroMagicPicSpeed As Integer
- '////////// 定义声音变量
- Public mVolume As Long '定义音量
- Public LoginGameMusic As DirectSoundSecondaryBuffer8
- Public Type MapItemType
- X As Long
- Y As Long
- ID As Long
- mItem As ItemType
- End Type
- Public MapItemCount As Long
- Public MapItem() As MapItemType
- '///////// 定义主角属性
- Public Enum 攻击模式属性
- 和平攻击模式 = 0
- 编组攻击模式 = 1
- 全体攻击模式 = 2
- 行会攻击模式 = 3
- End Enum
- '///////// 定义主角属性
- Public Type HeroType
- 攻击模式 As 攻击模式属性
- MagicX As Integer
- MagicY As Integer
- MagicLock As Boolean '魔法锁定
- MagicLockType As Integer '魔法锁定目标类型(0 怪 1 玩家 )
- MagicLockNum As Integer '魔法锁定目标编号
- Map_地图 As String
- End Type
- Public Hero As HeroType