Skip to content

Commit 407210a

Browse files
authored
Define SCRN_B and SCRN_V_B constants (#57)
1 parent 97e979b commit 407210a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

HISTORY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,5 @@
8888
- Added `rSYS` alias for `rKEY0`
8989
- Added separate bit number and flag constants for each audio channel
9090
- Refactored the `rev_Check_hardware_inc` macro
91+
- **Rev 4.12.0** - 2025-06-06 *(Rangi42)*
92+
- Added `SCRN_B` and `SCRN_V_B` constants

hardware.inc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ endc
2222
; Define the include guard and the current hardware.inc version
2323
; (do this after the RGBDS version check since the `def` syntax depends on it)
2424
def HARDWARE_INC equ 1
25-
def HARDWARE_INC_VERSION equs "4.11.0"
25+
def HARDWARE_INC_VERSION equs "4.12.0"
2626

2727
; Usage: rev_Check_hardware_inc <min_ver>
2828
; Examples:
@@ -731,7 +731,7 @@ def rROMB0 equ $2000
731731
def rROMB1 equ $3000
732732

733733
; -- RAMB ($4000-$5FFF) -------------------------------------------------------
734-
; SRAM bank number [wo]
734+
; SRAM bank number [wo]
735735
def rRAMB equ $4000
736736

737737
; (MBC3-only) Special RAM bank numbers that actually map values into RTCREG
@@ -773,11 +773,13 @@ def SCRN_X equ 160 ; width of screen in pixels
773773
def SCRN_Y equ 144 ; height of screen in pixels
774774
def SCRN_X_B equ 20 ; width of screen in bytes
775775
def SCRN_Y_B equ 18 ; height of screen in bytes
776+
def SCRN_B equ SCRN_X_B * SCRN_Y_B ; size of screen in bytes
776777

777778
def SCRN_VX equ 256 ; width of tilemap in pixels
778779
def SCRN_VY equ 256 ; height of tilemap in pixels
779780
def SCRN_VX_B equ 32 ; width of tilemap in bytes
780781
def SCRN_VY_B equ 32 ; height of tilemap in bytes
782+
def SCRN_V_B equ SCRN_VX_B * SCRN_VY_B ; size of tilemap in bytes
781783

782784
def TILE_X equ 8 ; width of tile in pixels
783785
def TILE_Y equ 8 ; height of tile in pixels

0 commit comments

Comments
 (0)