1
;; ___________ _________ _____ __
2
;; \_ _____/______ ____ ____ \_ ___ \____________ _/ ____\/ |_
3
;; | __) \_ __ \_/ __ \_/ __ \/ \ \/\_ __ \__ \\ __\\ __\
4
;; | \ | | \/\ ___/\ ___/\ \____| | \// __ \| | | |
5
;; \___ / |__| \___ >\___ >\______ /|__| (____ /__| |__|
7
;; ______________________ ______________________
8
;; T H E W A R B E G I N S
9
;; FreeCraft - A free fantasy real time strategy game engine
11
;; ui.ccl - Define the mythical user interface
13
;; (c) Copyright 2001 by Lutz Sammer
15
;; FreeCraft is free software; you can redistribute it and/or modify
16
;; it under the terms of the GNU General Public License as published
17
;; by the Free Software Foundation; either version 2 of the License,
18
;; or (at your option) any later version.
20
;; FreeCraft is distributed in the hope that it will be useful,
21
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
;; GNU General Public License for more details.
25
;; $Id: ui.ccl,v 1.1 2001/06/19 22:19:26 johns Exp $
27
;;=============================================================================
30
;; (define-cursor 'ident 'race 'image "file-path"
31
;; 'hotspot ( x y ) 'size ( width height ))
33
(define-cursor 'cursor-point 'mythical
34
'image "ui/mythical/cursors/orcish claw.png"
35
'hot-spot '( 3 2) 'size '(26 32) )
36
(define-cursor 'cursor-green-hair 'mythical
37
'image "ui/mythical/cursors/green crosshairs.png"
38
'hot-spot '(15 15) 'size '(32 32) )
39
(define-cursor 'cursor-yellow-hair 'mythical
40
'image "ui/mythical/cursors/yellow crosshairs.png"
41
'hot-spot '(15 15) 'size '(32 32) )
42
(define-cursor 'cursor-red-hair 'mythical
43
'image "ui/mythical/cursors/red crosshairs.png"
44
'hot-spot '(15 15) 'size '(32 32) )
46
;;=============================================================================
47
;; Define the user interface
49
;; (define-ui "race" screen-width screen-height
50
;; (list "filler" x y)
51
;; (list "resource" x y)
52
;; (list "gold-icon" nummer x y width height text-x text-y)
53
;; (list "wood-icon" nummer x y width height text-x text-y)
54
;; (list "oil-icon" nummer x y width height text-x text-y)
55
;; (list "ore-icon" nummer x y width height text-x text-y)
56
;; (list "stone-icon" nummer x y width height text-x text-y)
57
;; (list "coal-icon" nummer x y width height text-x text-y)
58
;; (list "food-icon" nummer x y width height text-x text-y)
59
;; (list "score-icon" nummer x y width height text-x text-y)
60
;; (list "infopanel" x y width height)
61
;; (list complete-bar-color x y text-x text-y)
62
;; (list "buttonpanel" x y)
63
;; (list map-x map-y end-x end-y)
64
;; (list "menubutton" x y)
65
;; (list "minimap" x y)
66
;; (list "statusline" x y)
68
;; (list menu-button-x menu-button-y width height)
69
;; ; 9 Character portraits
70
;; (list selected-1-x selected-1-y width height)
71
;; (list selected-2-x selected-2-y width height)
72
;; (list selected-3-x selected-3-y width height)
73
;; (list selected-4-x selected-4-y width height)
74
;; (list selected-5-x selected-5-y width height)
75
;; (list selected-6-x selected-6-y width height)
76
;; (list selected-7-x selected-7-y width height)
77
;; (list selected-8-x selected-8-y width height)
78
;; (list selected-9-x selected-9-y width height)
79
;; ; 9 Buttons interface
80
;; (list button-1-x button-1-y width height)
81
;; (list button-2-x button-2-y width height)
82
;; (list button-3-x button-3-y width height)
83
;; (list button-4-x button-4-y width height)
84
;; (list button-5-x button-5-y width height)
85
;; (list button-6-x button-6-y width height)
86
;; (list button-7-x button-7-y width height)
87
;; (list button-8-x button-8-y width height)
88
;; (list button-9-x button-9-y width height)
89
;; ; 6 training queue buttons.
90
;; (list train-1-x train-1-y width height)
91
;; (list train-2-x train-2-y width height)
92
;; (list train-3-x train-3-y width height)
93
;; (list train-4-x train-4-y width height)
94
;; (list train-5-x train-5-y width height)
95
;; (list train-6-x train-6-y width height)
96
;; ; Cursors used by engine
98
;; 'cursor-point 'cursor-glass 'cursor-cross
99
;; 'cursor-yellow-hair 'cursor-green-hair 'cursor-red-hair
100
;; 'cursor-scroll 'cursor-arrow-e 'cursor-arrow-ne
101
;; 'cursor-arrow-n 'cursor-arrow-nw 'cursor-arrow-w
102
;; 'cursor-arrow-sw 'cursor-arrow-s 'cursor-arrow-se )
103
;; '(panel1)'(panel2)'(panel3)'(panel4)'(panel5) )
105
;; This defines the position and sizes of the different user
106
;; interface sections.
109
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
111
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
113
(define (mythical_screen screen_width screen_height)
115
;;(screen_height-(16+((screen_height - 192)/32)*32))
116
(map_bottom (+ 16 (* 32 (trunc (/ (- screen_height 192) 32)))))
119
(define-ui "mythical" screen_width screen_height ; Selector
122
"graphics/ui/mythical/"
123
(number->string screen_width) "x" (number->string screen_height)
124
"/filler1.png") 528 (+ map_bottom 16))
128
"graphics/ui/mythical/"
129
(number->string screen_width) "x" (number->string screen_height)
130
"/resource.png") 0 0)
133
(list "graphics/ui/gold,wood,oil,mana.png" 0
134
(+ 176 0) 0 14 14 (+ 176 0 18) 1)
136
(list "graphics/ui/gold,wood,oil,mana.png" 1
137
(+ 176 65) 0 14 14 (+ 176 65 18) 1)
139
(list "graphics/ui/gold,wood,oil,mana.png" 2
140
(+ 176 120) 0 14 14 (+ 176 120 18) 1)
142
(list "graphics/ui/ore,stone,coal.png" 0
143
(+ 176 175) 0 14 14 (+ 176 175 18) 1)
145
(list "graphics/ui/ore,stone,coal.png" 1
146
(+ 176 230) 0 14 14 (+ 176 230 18) 1)
148
(list "graphics/ui/ore,stone,coal.png" 2
149
(+ 176 285) 0 14 14 (+ 176 285 18) 1)
152
(list "graphics/ui/food.png" 0
153
(+ 176 330) 0 14 14 (+ 176 330 18) 1)
155
(list "graphics/ui/score.png" 0
156
(+ 176 409) 0 14 14 (+ 176 409 18) 1)
159
(list "graphics/ui/mythical/infopanel.png" 0 map_bottom 176 176)
162
(list color-dark-green 12 (+ map_bottom 153) 50 (+ map_bottom 153))
164
; Command button panel
165
(list "graphics/ui/mythical/buttonpanel.png" 352 (+ map_bottom 16))
168
(list 0 16 screen_width map_bottom)
171
(list "graphics/ui/mythical/menubutton.png" 176 (+ map_bottom 16))
174
(list "graphics/ui/mythical/minimap.png" 176 (+ map_bottom 40))
178
"graphics/ui/mythical/"
179
(number->string screen_width) "x" (number->string screen_height)
180
"/statusline.png") 176 map_bottom)
182
; Defines position and size of the different buttons.
184
(list 198 (+ map_bottom 18) 128 17 )
185
; 9 Character portraits
186
(list 6 (+ map_bottom 6) 46 38 )
187
(list 62 (+ map_bottom 6) 46 38 )
188
(list 118 (+ map_bottom 6) 46 38 )
189
(list 6 (+ map_bottom 58) 46 38 )
190
(list 62 (+ map_bottom 58) 46 38 )
191
(list 118 (+ map_bottom 58) 46 38 )
192
(list 6 (+ map_bottom 110) 46 38 )
193
(list 62 (+ map_bottom 110) 46 38 )
194
(list 118 (+ map_bottom 110) 46 38 )
195
; 9 Buttons interface
196
(list 358 (+ map_bottom 33) 46 38 )
197
(list 414 (+ map_bottom 33) 46 38 )
198
(list 470 (+ map_bottom 33) 46 38 )
199
(list 358 (+ map_bottom 80) 46 38 )
200
(list 414 (+ map_bottom 80) 46 38 )
201
(list 470 (+ map_bottom 80) 46 38 )
202
(list 358 (+ map_bottom 127) 46 38 )
203
(list 414 (+ map_bottom 127) 46 38 )
204
(list 470 (+ map_bottom 127) 46 38 )
206
; Defines position and size of the training queue buttons.
207
(list 6 (+ map_bottom 56) 46 38 )
208
(list 62 (+ map_bottom 56) 46 38 )
209
(list 118 (+ map_bottom 56) 46 38 )
210
(list 6 (+ map_bottom 103) 46 38 )
211
(list 62 (+ map_bottom 103) 46 38 )
212
(list 118 (+ map_bottom 103) 46 38 )
213
(list 'cursor-point 'cursor-glass 'cursor-cross
214
'cursor-yellow-hair 'cursor-green-hair 'cursor-red-hair
215
'cursor-scroll 'cursor-arrow-e 'cursor-arrow-ne 'cursor-arrow-n
216
'cursor-arrow-nw 'cursor-arrow-w 'cursor-arrow-sw
217
'cursor-arrow-s 'cursor-arrow-se )
218
'("graphics/ui/mythical/panel 1.png")
219
'("graphics/ui/mythical/panel 2.png")
220
'("graphics/ui/mythical/panel 3.png")
221
'("graphics/ui/mythical/panel 4.png")
222
'("graphics/ui/mythical/panel 5.png")
227
(mythical_screen 640 480)
228
(mythical_screen 800 600)
229
(mythical_screen 1024 768)
230
(mythical_screen 1600 1200)
1
;; ___________ _________ _____ __
2
;; \_ _____/______ ____ ____ \_ ___ \____________ _/ ____\/ |_
3
;; | __) \_ __ \_/ __ \_/ __ \/ \ \/\_ __ \__ \\ __\\ __\
4
;; | \ | | \/\ ___/\ ___/\ \____| | \// __ \| | | |
5
;; \___ / |__| \___ >\___ >\______ /|__| (____ /__| |__|
7
;; ______________________ ______________________
8
;; T H E W A R B E G I N S
9
;; FreeCraft - A free fantasy real time strategy game engine
11
;; ui.ccl - Define the mythical user interface
13
;; (c) Copyright 2001,2002 by Lutz Sammer
15
;; FreeCraft is free software; you can redistribute it and/or modify
16
;; it under the terms of the GNU General Public License as published
17
;; by the Free Software Foundation; either version 2 of the License,
18
;; or (at your option) any later version.
20
;; FreeCraft is distributed in the hope that it will be useful,
21
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
;; GNU General Public License for more details.
25
;; $Id: ui.ccl,v 1.1 2001/06/19 22:19:26 johns Exp $
27
;;=============================================================================
30
;; (define-cursor 'ident 'race 'image "file-path"
31
;; 'hotspot ( x y ) 'size ( width height ))
33
(define-cursor 'cursor-point 'mythical
34
'image "ui/mythical/cursors/orcish claw.png"
35
'hot-spot '( 3 2) 'size '(26 32) )
36
(define-cursor 'cursor-green-hair 'mythical
37
'image "ui/mythical/cursors/green crosshairs.png"
38
'hot-spot '(15 15) 'size '(32 32) )
39
(define-cursor 'cursor-yellow-hair 'mythical
40
'image "ui/mythical/cursors/yellow crosshairs.png"
41
'hot-spot '(15 15) 'size '(32 32) )
42
(define-cursor 'cursor-red-hair 'mythical
43
'image "ui/mythical/cursors/red crosshairs.png"
44
'hot-spot '(15 15) 'size '(32 32) )
46
;;=============================================================================
47
;; Define the user interface
49
;; (define-ui "race" screen-width screen-height
50
;; (list "filler" x y)
51
;; (list "resource" x y)
52
;; (list "gold-icon" nummer x y width height text-x text-y)
53
;; (list "wood-icon" nummer x y width height text-x text-y)
54
;; (list "oil-icon" nummer x y width height text-x text-y)
55
;; (list "ore-icon" nummer x y width height text-x text-y)
56
;; (list "stone-icon" nummer x y width height text-x text-y)
57
;; (list "coal-icon" nummer x y width height text-x text-y)
58
;; (list "food-icon" nummer x y width height text-x text-y)
59
;; (list "score-icon" nummer x y width height text-x text-y)
60
;; (list "infopanel" x y width height)
61
;; (list complete-bar-color x y text-x text-y)
62
;; (list "buttonpanel" x y)
63
;; (list map-x map-y end-x end-y)
64
;; (list "menubutton" x y)
65
;; (list "minimap" x y)
66
;; (list "statusline" x y)
68
;; (list menu-button-x menu-button-y width height)
69
;; ; 9 Character portraits
70
;; (list selected-1-x selected-1-y width height)
71
;; (list selected-2-x selected-2-y width height)
72
;; (list selected-3-x selected-3-y width height)
73
;; (list selected-4-x selected-4-y width height)
74
;; (list selected-5-x selected-5-y width height)
75
;; (list selected-6-x selected-6-y width height)
76
;; (list selected-7-x selected-7-y width height)
77
;; (list selected-8-x selected-8-y width height)
78
;; (list selected-9-x selected-9-y width height)
79
;; ; 9 Buttons interface
80
;; (list button-1-x button-1-y width height)
81
;; (list button-2-x button-2-y width height)
82
;; (list button-3-x button-3-y width height)
83
;; (list button-4-x button-4-y width height)
84
;; (list button-5-x button-5-y width height)
85
;; (list button-6-x button-6-y width height)
86
;; (list button-7-x button-7-y width height)
87
;; (list button-8-x button-8-y width height)
88
;; (list button-9-x button-9-y width height)
89
;; ; 6 training queue buttons.
90
;; (list train-1-x train-1-y width height)
91
;; (list train-2-x train-2-y width height)
92
;; (list train-3-x train-3-y width height)
93
;; (list train-4-x train-4-y width height)
94
;; (list train-5-x train-5-y width height)
95
;; (list train-6-x train-6-y width height)
96
;; ; Cursors used by engine
98
;; 'cursor-point 'cursor-glass 'cursor-cross
99
;; 'cursor-yellow-hair 'cursor-green-hair 'cursor-red-hair
100
;; 'cursor-scroll 'cursor-arrow-e 'cursor-arrow-ne
101
;; 'cursor-arrow-n 'cursor-arrow-nw 'cursor-arrow-w
102
;; 'cursor-arrow-sw 'cursor-arrow-s 'cursor-arrow-se )
103
;; '(panel1)'(panel2)'(panel3)'(panel4)'(panel5) )
105
;; This defines the position and sizes of the different user
106
;; interface sections.
109
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
111
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
113
(define (mythical_screen screen_width screen_height)
115
;;(screen_height-(16+((screen_height - 192)/32)*32))
116
(map_bottom (+ 16 (* 32 (trunc (/ (- screen_height 192) 32)))))
119
(define-ui "mythical" screen_width screen_height ; Selector
122
"graphics/ui/mythical/"
123
(number->string screen_width) "x" (number->string screen_height)
124
"/filler1.png") 528 (+ map_bottom 16))
128
"graphics/ui/mythical/"
129
(number->string screen_width) "x" (number->string screen_height)
130
"/resource.png") 0 0)
133
(list "graphics/ui/gold,wood,oil,mana.png" 0
134
(+ 176 0) 0 14 14 (+ 176 0 18) 1)
136
(list "graphics/ui/gold,wood,oil,mana.png" 1
137
(+ 176 65) 0 14 14 (+ 176 65 18) 1)
139
(list "graphics/ui/gold,wood,oil,mana.png" 2
140
(+ 176 120) 0 14 14 (+ 176 120 18) 1)
142
(list "graphics/ui/ore,stone,coal.png" 0
143
(+ 176 175) 0 14 14 (+ 176 175 18) 1)
145
(list "graphics/ui/ore,stone,coal.png" 1
146
(+ 176 230) 0 14 14 (+ 176 230 18) 1)
148
(list "graphics/ui/ore,stone,coal.png" 2
149
(+ 176 285) 0 14 14 (+ 176 285 18) 1)
152
(list "graphics/ui/food.png" 0
153
(+ 176 330) 0 14 14 (+ 176 330 18) 1)
155
(list "graphics/ui/score.png" 0
156
(+ 176 409) 0 14 14 (+ 176 409 18) 1)
159
(list "graphics/ui/mythical/infopanel.png" 0 map_bottom 176 176)
162
(list color-dark-green 12 (+ map_bottom 153) 50 (+ map_bottom 153))
164
; Command button panel
165
(list "graphics/ui/mythical/buttonpanel.png" 352 (+ map_bottom 16))
168
(list 0 16 screen_width map_bottom)
171
(list "graphics/ui/mythical/menubutton.png" 176 (+ map_bottom 16))
174
(list "graphics/ui/mythical/minimap.png" 176 (+ map_bottom 40))
178
"graphics/ui/mythical/"
179
(number->string screen_width) "x" (number->string screen_height)
180
"/statusline.png") 176 map_bottom)
182
; Defines position and size of the different buttons.
184
(list 198 (+ map_bottom 18) 128 17 )
185
; 9 Character portraits
186
(list 6 (+ map_bottom 6) 46 38 )
187
(list 62 (+ map_bottom 6) 46 38 )
188
(list 118 (+ map_bottom 6) 46 38 )
189
(list 6 (+ map_bottom 58) 46 38 )
190
(list 62 (+ map_bottom 58) 46 38 )
191
(list 118 (+ map_bottom 58) 46 38 )
192
(list 6 (+ map_bottom 110) 46 38 )
193
(list 62 (+ map_bottom 110) 46 38 )
194
(list 118 (+ map_bottom 110) 46 38 )
195
; 9 Buttons interface
196
(list 358 (+ map_bottom 33) 46 38 )
197
(list 414 (+ map_bottom 33) 46 38 )
198
(list 470 (+ map_bottom 33) 46 38 )
199
(list 358 (+ map_bottom 80) 46 38 )
200
(list 414 (+ map_bottom 80) 46 38 )
201
(list 470 (+ map_bottom 80) 46 38 )
202
(list 358 (+ map_bottom 127) 46 38 )
203
(list 414 (+ map_bottom 127) 46 38 )
204
(list 470 (+ map_bottom 127) 46 38 )
206
; Defines position and size of the training queue buttons.
207
(list 6 (+ map_bottom 56) 46 38 )
208
(list 62 (+ map_bottom 56) 46 38 )
209
(list 118 (+ map_bottom 56) 46 38 )
210
(list 6 (+ map_bottom 103) 46 38 )
211
(list 62 (+ map_bottom 103) 46 38 )
212
(list 118 (+ map_bottom 103) 46 38 )
213
(list 'cursor-point 'cursor-glass 'cursor-cross
214
'cursor-yellow-hair 'cursor-green-hair 'cursor-red-hair
215
'cursor-scroll 'cursor-arrow-e 'cursor-arrow-ne 'cursor-arrow-n
216
'cursor-arrow-nw 'cursor-arrow-w 'cursor-arrow-sw
217
'cursor-arrow-s 'cursor-arrow-se )
218
'("graphics/ui/mythical/panel 1.png")
219
'("graphics/ui/mythical/panel 2.png")
220
'("graphics/ui/mythical/panel 3.png")
221
'("graphics/ui/mythical/panel 4.png")
222
'("graphics/ui/mythical/panel 5.png")
227
(mythical_screen 640 480)
228
(mythical_screen 800 600)
229
(mythical_screen 1024 768)
230
(mythical_screen 1280 960)
231
(mythical_screen 1600 1200)