changeset 3612 | b50215a8a43d |
parent 3611 | ed00aa2b339e |
child 3634 | 93d260c96635 |
3611:ed00aa2b339e | 3612:b50215a8a43d |
---|---|
181 THogEffect = (heInvulnerable, hePoisoned); |
181 THogEffect = (heInvulnerable, hePoisoned); |
182 |
182 |
183 TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite); |
183 TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite); |
184 const sfMax = 1000; |
184 const sfMax = 1000; |
185 |
185 |
186 const |
|
187 // message constants |
186 // message constants |
188 errmsgCreateSurface = 'Error creating SDL surface'; |
187 errmsgCreateSurface = 'Error creating SDL surface'; |
189 errmsgTransparentSet = 'Error setting transparent color'; |
188 errmsgTransparentSet = 'Error setting transparent color'; |
190 errmsgUnknownCommand = 'Unknown command'; |
189 errmsgUnknownCommand = 'Unknown command'; |
191 errmsgUnknownVariable = 'Unknown variable'; |
190 errmsgUnknownVariable = 'Unknown variable'; |
238 tpLowest = 0.00; |
237 tpLowest = 0.00; |
239 tpLow = 0.25; |
238 tpLow = 0.25; |
240 tpMedium = 0.50; |
239 tpMedium = 0.50; |
241 tpHigh = 0.75; |
240 tpHigh = 0.75; |
242 tpHighest = 1.00; |
241 tpHighest = 1.00; |
243 |
|
244 {* REFERENCE |
|
245 4096 -> $FFFFF000 |
|
246 2048 -> $FFFFF800 |
|
247 1024 -> $FFFFFC00 |
|
248 512 -> $FFFFFE00 *} |
|
249 |
|
250 {$IFDEF LOWRES} |
|
251 // default for iphone pre 3gs |
|
252 LAND_WIDTH = 2048; |
|
253 LAND_HEIGHT = 1024; |
|
254 LAND_WIDTH_MASK = $FFFFF800; |
|
255 LAND_HEIGHT_MASK = $FFFFFC00; |
|
256 {$ELSE} |
|
257 LAND_WIDTH = 4096; |
|
258 LAND_HEIGHT = 2048; |
|
259 LAND_WIDTH_MASK = $FFFFF000; |
|
260 LAND_HEIGHT_MASK = $FFFFF800; |
|
261 {$ENDIF} |
|
262 |
242 |
263 // To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects |
243 // To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects |
264 // TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits |
244 // TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits |
265 lfBasic = $8000; // white |
245 lfBasic = $8000; // white |
266 lfIndestructible = $4000; // red |
246 lfIndestructible = $4000; // red |
466 ); |
446 ); |
467 |
447 |
468 var PathPrefix: shortstring = './'; |
448 var PathPrefix: shortstring = './'; |
469 Pathz: array[TPathType] of shortstring; |
449 Pathz: array[TPathType] of shortstring; |
470 CountTexz: array[1..Pred(AMMO_INFINITE)] of PTexture; |
450 CountTexz: array[1..Pred(AMMO_INFINITE)] of PTexture; |
451 LAND_WIDTH :longint; |
|
452 LAND_HEIGHT :longint; |
|
453 LAND_WIDTH_MASK :longWord; |
|
454 LAND_HEIGHT_MASK :longWord; |
|
471 |
455 |
472 const |
456 const |
473 cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13); |
457 cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13); |
474 cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0); |
458 cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0); |
475 |
459 |
2184 |
2168 |
2185 procedure initModule; |
2169 procedure initModule; |
2186 procedure freeModule; |
2170 procedure freeModule; |
2187 |
2171 |
2188 implementation |
2172 implementation |
2173 uses uMisc; |
|
2189 |
2174 |
2190 procedure initModule; |
2175 procedure initModule; |
2191 |
|
2192 begin |
2176 begin |
2193 Pathz:= cPathz; |
2177 Pathz:= cPathz; |
2194 |
2178 {* REFERENCE |
2179 4096 -> $FFFFF000 |
|
2180 2048 -> $FFFFF800 |
|
2181 1024 -> $FFFFFC00 |
|
2182 512 -> $FFFFFE00 *} |
|
2183 if (cReducedQuality and rqLowRes) <> 0 then |
|
2184 begin |
|
2185 LAND_WIDTH:= 2048; |
|
2186 LAND_HEIGHT:= 1024; |
|
2187 LAND_WIDTH_MASK:= $FFFFF800; |
|
2188 LAND_HEIGHT_MASK:= $FFFFFC00; |
|
2189 end |
|
2190 else |
|
2191 begin |
|
2192 LAND_WIDTH:= 4096; |
|
2193 LAND_HEIGHT:= 2048; |
|
2194 LAND_WIDTH_MASK:= $FFFFF000; |
|
2195 LAND_HEIGHT_MASK:= $FFFFF800 |
|
2196 end; |
|
2195 end; |
2197 end; |
2196 |
2198 |
2197 procedure freeModule; |
2199 procedure freeModule; |
2198 begin |
2200 begin |
2199 PathPrefix := './'; |
2201 PathPrefix := './'; |