From 7887f53ea8238edfeb882079ad5b04b0ce515a74 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Tue, 24 Sep 2019 21:53:54 +0200 Subject: [PATCH] [Maintenance] Move the playfield constants to a separate .inc file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With both 16- and 32-bit build parts soon having full dependency tracking, having more small includes wins out over having fewer, larger ones – and also, over having to fix tons of macro conflicts that stem from most .inc files assuming the context of the big .asm files. Case in point, including ReC98.inc doesn't work right now without defining a .MODEL, which is counter-productive for ASM compilation units. Part of P0035, funded by zorg. --- ReC98.inc | 17 +---------------- th02/playfld.inc | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 th02/playfld.inc diff --git a/ReC98.inc b/ReC98.inc index 7d140650..7458f163 100644 --- a/ReC98.inc +++ b/ReC98.inc @@ -26,6 +26,7 @@ include libs/master.lib/clip.inc include libs/master.lib/macros.inc include libs/kaja/kaja.inc include th01/hardware/egc.inc +include th02/playfld.inc include th02/formats/pi_slots.inc include th03/formats/cdg.inc @@ -71,22 +72,6 @@ RES_Y = 400 GAIJI_TRAM_W = 2 -PLAYFIELD_X = 32 -PLAYFIELD_Y = 16 -PLAYFIELD_W = 384 -PLAYFIELD_H = 368 - -PLAYFIELD_LEFT = PLAYFIELD_X -PLAYFIELD_TOP = PLAYFIELD_Y -PLAYFIELD_RIGHT = PLAYFIELD_X + PLAYFIELD_W -PLAYFIELD_BOTTOM = PLAYFIELD_Y + PLAYFIELD_H - -PLAYFIELD_VRAM_X = PLAYFIELD_X / 8 -PLAYFIELD_VRAM_W = PLAYFIELD_W / 8 - -PLAYFIELD_TRAM_X = PLAYFIELD_X / 8 -PLAYFIELD_TRAM_W = PLAYFIELD_W / 8 - ROW_SIZE = (RES_X / 8) TILE_W = 16 diff --git a/th02/playfld.inc b/th02/playfld.inc new file mode 100644 index 00000000..440b1861 --- /dev/null +++ b/th02/playfld.inc @@ -0,0 +1,15 @@ +PLAYFIELD_X = 32 +PLAYFIELD_Y = 16 +PLAYFIELD_W = 384 +PLAYFIELD_H = 368 + +PLAYFIELD_LEFT = PLAYFIELD_X +PLAYFIELD_TOP = PLAYFIELD_Y +PLAYFIELD_RIGHT = PLAYFIELD_X + PLAYFIELD_W +PLAYFIELD_BOTTOM = PLAYFIELD_Y + PLAYFIELD_H + +PLAYFIELD_VRAM_X = PLAYFIELD_X / 8 +PLAYFIELD_VRAM_W = PLAYFIELD_W / 8 + +PLAYFIELD_TRAM_X = PLAYFIELD_X / 8 +PLAYFIELD_TRAM_W = PLAYFIELD_W / 8