2014-08-22 15:06:33 +00:00
|
|
|
; ReC98
|
|
|
|
; Main include file
|
|
|
|
|
2015-02-19 06:46:36 +00:00
|
|
|
; Order segments alphabetically.
|
|
|
|
; Rather ugly workaround to prevent the automatically generated code segment
|
|
|
|
; for the large model (filename_TEXT) from enforcing its word alignment
|
2015-02-21 11:47:24 +00:00
|
|
|
; between _TEXT and the first code segment even though we never emit anything
|
|
|
|
; into it.
|
2015-02-19 06:46:36 +00:00
|
|
|
; However, this merely pushes filename_TEXT before _TEXTC, and therefore
|
|
|
|
; breaks another group of files. In these, we actually have to rename that
|
|
|
|
; automatically generated code segment to one that is expected to have word
|
|
|
|
; alignment.
|
|
|
|
.alpha
|
|
|
|
|
2014-08-22 15:06:33 +00:00
|
|
|
locals
|
|
|
|
|
|
|
|
include libs/BorlandC/RULES.ASI
|
2014-10-15 06:39:22 +00:00
|
|
|
include libs/BorlandC/doserror.inc
|
2014-11-09 13:49:18 +00:00
|
|
|
include libs/BorlandC/errno.inc
|
2014-10-13 04:12:09 +00:00
|
|
|
include libs/BorlandC/stdio.inc
|
2014-08-22 15:06:33 +00:00
|
|
|
include libs/master.lib/func.inc
|
|
|
|
include libs/master.lib/super.inc
|
2014-08-25 02:49:19 +00:00
|
|
|
include libs/master.lib/bgm.inc
|
2014-08-26 18:54:57 +00:00
|
|
|
include libs/master.lib/pf.inc
|
2014-08-28 01:42:26 +00:00
|
|
|
include libs/master.lib/clip.inc
|
2014-12-20 21:14:58 +00:00
|
|
|
include libs/master.lib/macros.inc
|
2014-11-27 18:35:54 +00:00
|
|
|
include libs/kaja/kaja.inc
|
2018-12-20 17:09:29 +00:00
|
|
|
include th01/hardware/egc.inc
|
2014-11-18 16:56:13 +00:00
|
|
|
include th02/formats/pi_slots.inc
|
2017-01-12 18:54:26 +00:00
|
|
|
include th03/formats/cdg.inc
|
2014-08-22 15:08:37 +00:00
|
|
|
|
|
|
|
nopcall macro func
|
|
|
|
if LDATA
|
|
|
|
nop ; PC-98 Touhou compatibility
|
|
|
|
endif
|
|
|
|
call func
|
|
|
|
endm
|
2014-08-22 17:28:05 +00:00
|
|
|
|
2014-11-13 23:55:00 +00:00
|
|
|
; Avoids specifying both segment and offset of a function. Too bad that it
|
|
|
|
; still doesn't cause TASM to require [func] to be a valid identifier.
|
|
|
|
setfarfp macro farfp, func
|
|
|
|
mov word ptr farfp+2, seg func
|
|
|
|
mov word ptr farfp, offset func
|
|
|
|
endm
|
|
|
|
|
2014-08-22 17:28:05 +00:00
|
|
|
pushSS_ macro
|
|
|
|
if LDATA
|
|
|
|
push ss
|
|
|
|
endif
|
|
|
|
endm
|
2014-10-30 08:38:46 +00:00
|
|
|
|
|
|
|
popCX_ macro
|
|
|
|
if LDATA
|
|
|
|
pop cx
|
|
|
|
endif
|
|
|
|
endm
|
2018-09-11 17:34:19 +00:00
|
|
|
|
|
|
|
twobyte_t struc
|
|
|
|
lo db ?
|
|
|
|
hi db ?
|
|
|
|
twobyte_t ends
|
2018-12-21 21:27:05 +00:00
|
|
|
|
|
|
|
RES_X = 640
|
|
|
|
RES_Y = 400
|
|
|
|
|
|
|
|
PLAYFIELD_X = 32
|
|
|
|
PLAYFIELD_Y = 16
|
|
|
|
PLAYFIELD_W = 384
|
|
|
|
PLAYFIELD_H = 368
|
|
|
|
PLAYFIELD_VRAM_X = PLAYFIELD_X / 8
|
|
|
|
PLAYFIELD_VRAM_W = PLAYFIELD_W / 8
|
|
|
|
|
|
|
|
ROW_SIZE = (RES_X / 8)
|
2018-12-27 20:10:47 +00:00
|
|
|
|
|
|
|
TILE_W = 16
|
|
|
|
TILE_H = 16
|
2018-12-28 17:13:25 +00:00
|
|
|
TILE_VRAM_W = (TILE_W / 8)
|
2018-12-27 20:10:47 +00:00
|
|
|
TILES_Y = 1 + (PLAYFIELD_H / TILE_H) + 1
|
|
|
|
TILES_X = (PLAYFIELD_W / TILE_W)
|
2018-12-29 17:33:27 +00:00
|
|
|
|
|
|
|
TILE_FLAG_H = (TILE_H / 2)
|
|
|
|
TILE_FLAGS_Y = TILES_Y * (TILE_H / TILE_FLAG_H)
|