/[projet1]/users/chema/skooldaze/params.h
Defence Force logotype

Contents of /users/chema/skooldaze/params.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 610 - (show annotations)
Sat Sep 10 23:40:26 2011 UTC (8 years, 6 months ago) by Chema
File MIME type: text/plain
File size: 5529 byte(s)
More bug hunting (Symoon's) and some of the ideas from Dbug included.
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ;; -----------------------------------
3 ;; Skool Daze
4 ;; The Oric Version
5 ;; -----------------------------------
6 ;; (c) Chema 2011
7 ;; enguita@gmail.com
8 ;; -----------------------------------
9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10
11 ;;Main definitions
12 ;;----------------
13
14 ; Rom addresses
15 #define _hires $ec33
16 #define _text $ec21
17 #define _ping $fa9f
18 #define _shoot $fab5
19 #define _zap $fae1
20 #define _explode $facb
21 #define _kbdclick1 $fb14
22 #define _kbdclick2 $fb2a
23 #define _cls $ccce
24 #define _lores0 $d9ed
25 #define _lores1 $d9ea
26
27 ; Attributes
28 #define A_FWBLACK 0
29 #define A_FWRED 1
30 #define A_FWGREEN 2
31 #define A_FWYELLOW 3
32 #define A_FWBLUE 4
33 #define A_FWMAGENTA 5
34 #define A_FWCYAN 6
35 #define A_FWWHITE 7
36 #define A_BGBLACK 16
37 #define A_BGRED 17
38 #define A_BGGREEN 18
39 #define A_BGYELLOW 19
40 #define A_BGBLUE 20
41 #define A_BGMAGENTA 21
42 #define A_BGCYAN 22
43 #define A_BGWHITE 23
44
45 ; Game constants
46
47 #define MAX_CHARACTERS 21
48 #define SKOOL_ROWS 21
49 #define SKOOL_COLS 128
50 #define FIRST_VIS_COL 2
51 #define LAST_VIS_COL 37
52 #define VISIBLE_COLS (LAST_VIS_COL-FIRST_VIS_COL+1)
53 #define SRB_SIZE 105
54
55 ; Offscreen position (for pellets). Keep it >128 and <255-3
56 #define OFFSCREEN_POS 200
57
58 ; Buffer width for lesson/lines box.
59 #define BUFFER_TEXT_WIDTH 11
60
61 ; Ticks to change the lesson (originally $1500=5376)
62 #define LESCLK_VAL 5376
63
64 ; Value of the high byte that marks when the teacher tells the kids to sit down (originally 15)
65 #define CLASS_START 15
66
67 ; Visibility ranges for characters
68 #define VIS_RANGE_X 14
69 #define VIS_RANGE_Y 14
70
71
72 ; Eric's main timer constants
73 #define INITIAL_ERIC_TIMER 17
74 #define NORMAL_ERIC_TIMER 9-4
75 #define FAST_ERIC_TIMER 4-2
76 #define MIDS_ERIC_TIMER 5-2
77
78 ;;;; Conditional compiling and optimizations
79
80 ;; Partial support for AIC mode... necessary if we want colors
81 #define AIC_SUPPORT
82
83 ;; Tries to get rid of unnecessary jsr instructions
84 #define AVOID_JSRS
85
86 ;; Substitutes the multiplying with a big (512) table, not much optimization though.
87 ;#define FULLTABLEMUL8
88
89 ;; Avoid Oricutron's bug with ror addr,x
90 #define AVOID_ORICUTRON_BUG
91
92 ;; Inverse things to get white bubbles
93 #define WHITE_BUBBLES
94
95 ;; Center play area
96 #define CENTER_PLAY_AREA
97
98 ;; Definitions for characters
99
100 #define CHAR_ERIC 0
101 #define CHAR_EINSTEIN 1
102 #define CHAR_ANGELFACE 2
103 #define CHAR_BOYWANDER 3
104 #define CHAR_BOY1 4
105 #define CHAR_BOY2 5
106 #define CHAR_BOY3 6
107 #define CHAR_BOY4 7
108 #define CHAR_BOY5 8
109 #define CHAR_BOY6 9
110 #define CHAR_BOY7 10
111 #define CHAR_BOY8 11
112 #define CHAR_BOY9 12
113 #define CHAR_BOY10 13
114 #define CHAR_BOY11 14
115 #define CHAR_CREAK 15
116 #define CHAR_ROCKITT 16
117 #define CHAR_WACKER 17
118 #define CHAR_WITHIT 18
119 #define CHAR_EPELLET 19
120 #define CHAR_BPELLET 20
121
122 #define CHAR_FIRST_TEACHER CHAR_CREAK
123
124 ;;; Character flags field
125
126 ; Original Spectrum flags field is
127 ;0 Restart the command list at the next opportunity if bit 1 is reset (see 25126)
128 ;1 Always reset
129 ;2-3 Unused
130 ;4 Character is a teacher (checked by 25367)
131 ;5 Character is walking fast continuously (set for pellets and stampeding boys; see 27246)
132 ;6 Character is walking slowly continuously (always reset, but checked by 25367)
133 ;7 Character is walking slowly (see 25266)
134
135
136 #define RESET_COMMAND_LIST 1
137 #define UNKNOWN 2
138 #define IS_FACING_RIGHT 4
139 #define FREE 8
140 #define IS_TEACHER 16
141 #define IS_FAST_WALK 32
142 #define IS_SLOW_CONTINUOUS 64
143 #define IS_SLOW_WALK 128
144
145
146
147 ; Eric's status flags
148 ; 0 ERIC is firing the catapult
149 ; 1 ERIC is hitting
150 ; 2 ERIC is jumping
151 ; 3 ERIC is being spoken to by little boy no. 10
152 ; 4 ERIC has just been knocked down or unseated
153 ; 5 ERIC is writing on a blackboard
154 ; 6 Unused (always reset)
155 ; 7 ERIC is sitting or lying down
156
157 #define ERIC_FIRING 1
158 #define ERIC_HITTING 2
159 #define ERIC_JUMPING 4
160 #define ERIC_SPOKEN 8
161 #define ERIC_DOWN 16
162 #define ERIC_WRITTING 32
163
164 #define ERIC_SITTINGLYING 128
165
166
167 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
168 ; Lesson descriptors
169 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
170 ; Each entry in this table defines the teacher for the period
171 ; (if any), and the room. The teacher is identified by bits 4-6
172 ;
173 ; Bits Teacher
174 #define DES_ROCKITT %0000
175 #define DES_WACKER %0001
176 #define DES_WITHIT %0010
177 #define DES_CREAK %0011
178 #define DES_NONE %0100
179
180 ; The room is identified by bits 0-3
181 ; Bits Room
182 #define DES_READING %0001
183 #define DES_MAP %0010
184 #define DES_WHITE %0011
185 #define DES_EXAM %0100
186 #define DES_LIBRARY %0101
187 #define DES_DINNER %0110
188 #define DES_PLAY %0111
189
190
191
192 ;;; Collision map
193 #define WALLTOPFLOOR 77
194 #define WALLMIDDLEFLOOR 53
195 #define WALLMIDDLEFLOOR2 107
196
197 ;; Stairs
198
199 ; The bottom and top cols are all equal
200 #define STAIRLBOTTOM 24+1
201 #define STAIRLTOP STAIRLBOTTOM-7
202 #define STAIRRBOTTOM 96-1
203 #define STAIRRTOP STAIRRBOTTOM+7
204
205
206 ; Position of chairs
207 ; Reading room
208
209 #define CH_READR 74
210 #define CH_READL 62
211
212 ; Map room
213 #define CH_MAPR 96
214 #define CH_MAPL 84
215
216 ; White room
217 #define CH_WHITER 50
218 #define CH_WHITEL 38
219
220 ; Exam room
221 #define CH_EXAMAR 87
222 #define CH_EXAMAL 75
223 #define CH_EXAMBR 70
224 #define CH_EXAMBL 58
225
226 ; Position of blackboards
227 #define COL_EXAM_BOARD 55
228 #define COL_WHITE_BOARD 34
229 #define COL_READING_BOARD 56
230
231
232

  ViewVC Help
Powered by ViewVC 1.1.26