/
frm_Editor.frm
129 lines (110 loc) · 3.68 KB
/
frm_Editor.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
VERSION 5.00
Begin VB.Form frm_Editor
BackColor = &H00000000&
Caption = "TAKEDOWN level editor"
ClientHeight = 8385
ClientLeft = 60
ClientTop = 345
ClientWidth = 11250
LinkTopic = "Form1"
ScaleHeight = 8385
ScaleWidth = 11250
StartUpPosition = 3 'Windows Default
Begin VB.PictureBox PicScreen
AutoRedraw = -1 'True
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 7695
Left = 0
MousePointer = 2 'Cross
ScaleHeight = 513
ScaleMode = 3 'Pixel
ScaleWidth = 752
TabIndex = 0
Top = 0
Width = 11280
End
End
Attribute VB_Name = "frm_Editor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Editor_Episode As String
Dim Editor_Mission As Integer
Private Type editorenemytype
live As Boolean
x As Integer '20, 14, 1, "standing",1, 0
y As Integer
class As Integer
state As String
killgoal As Integer
triggerval As Integer
End Type
Private Type EditorPathType
live As Boolean
x As Integer
y As Integer
End Type
Dim Title As String
'Dim O(0 To ObjTop) As objtype
'Dim e(0 To EnemyTop) As editorenemytype
Dim groundstyle As Byte
Dim p_x As Integer
Dim p_y As Integer
Dim p_face As Integer
'Dim trig(0 To TrigTop) As Triggertype
'Dim path(0 To PathTop) As EditorPathType
Dim killgoal As Integer
Dim delay As Integer
Dim healamount As Integer
Dim bEnemies As Boolean
Dim bPlayer As Boolean
Dim bPaths As Boolean
' GRAPHICS STUFF
Private Sub game_moveimages()
Dim x As Integer, y As Integer, a As Integer, b As Integer
For a = 0 To screenWidth
For b = 0 To screenHeight
BitBlt PicScreen.hDC, a * TileSize, b * TileSize, TileSize, TileSize, frm_game.pic_ground.hDC, TileSize * groundstyle, 0, vbSrcCopy
Next b, a
For a = 0 To UBound(O)
If O(a).live = True Then
BitBlt PicScreen.hDC, O(a).x * TileSize, O(a).y * TileSize, TileSize, TileSize, frm_game.pic_groundm.hDC, TileSize * (O(a).type + 3), 0, vbSrcAnd
BitBlt PicScreen.hDC, O(a).x * TileSize, O(a).y * TileSize, TileSize, TileSize, frm_game.pic_ground.hDC, TileSize * (O(a).type + 3), 0, vbSrcPaint
End If
Next a
If bPlayer = True Then
x = p_x * TileSize
y = p_y * TileSize
BitBlt PicScreen.hDC, x, y, TileSize, TileSize, frm_game.pic_humanm.hDC, TileSize * (p_face - 1), 0, vbSrcAnd
BitBlt PicScreen.hDC, x, y, TileSize, TileSize, frm_game.pic_human.hDC, TileSize * (p_face - 1), 0, vbSrcPaint
End If
If bEnemies = True Then
For a = 0 To UBound(e)
If e(a).live = True And e(a).x <> -1 Then
x = e(a).x * TileSize
y = e(a).y * TileSize
BitBlt PicScreen.hDC, x, y, TileSize, TileSize, frm_game.pic_humanm.hDC, TileSize * (1), 0, vbSrcAnd
BitBlt PicScreen.hDC, x, y, TileSize, TileSize, frm_game.pic_human.hDC, TileSize * (1), TileSize * 1, vbSrcPaint
End If
Next a
End If
If bPaths = True Then
For a = 0 To UBound(path)
If path(a).live = True Then
x = path(a).x * TileSize
y = path(a).y * TileSize
BitBlt PicScreen.hDC, x, y, TileSize, TileSize, frm_game.pic_deadm.hDC, 0, 0, vbSrcAnd
BitBlt PicScreen.hDC, x, y, TileSize, TileSize, frm_game.pic_dead.hDC, 0, 0, vbSrcPaint
End If
Next a
End If
PicScreen.Refresh
End Sub
Private Sub PicScreen_MouseUp(button As Integer, shift As Integer, x As Single, y As Single)
x = Int(x / TileSize)
y = Int(y / TileSize)
If button = 0 Then
End If
End Sub