from __future__ import annotations
from enum import IntEnum
DISPLAY_WIDTH = 240
DISPLAY_HEIGHT = 160
HBLANK_PIXELS = 68
VBLANK_LINES = 68
DISPLAY_FULL_WIDTH = DISPLAY_WIDTH + HBLANK_PIXELS
DISPLAY_FULL_HEIGHT = DISPLAY_HEIGHT + VBLANK_LINES
CYCLES_PIXEL = 4
CYCLES_HDRAW = DISPLAY_WIDTH * CYCLES_PIXEL
CYCLES_HBLANK = HBLANK_PIXELS * CYCLES_PIXEL
CYCLES_FRAME = DISPLAY_FULL_WIDTH * DISPLAY_FULL_HEIGHT * CYCLES_PIXEL
SMALL_DISPLAY_WIDTH = 160
SMALL_DISPLAY_HEIGHT = 128
MAX_NUM_OBJECTS = 128
OAM_ENTRY_SIZE = 8
TILE_WIDTH = 8
TILE_HEIGHT = 8
TILE_SIZE = TILE_WIDTH * TILE_HEIGHT
TILE_MAP_ENTRY_SIZE = 2
TILE_MAP_BLOCK_WIDTH = 32
TILE_MAP_BLOCK_HEIGHT = 32
TILE_MAP_BLOCK_SIZE = TILE_MAP_BLOCK_WIDTH * TILE_MAP_BLOCK_HEIGHT * TILE_MAP_ENTRY_SIZE
TILE_SET_BLOCK_SIZE = TILE_MAP_BLOCK_SIZE * 8
COLOUR_SIZE = 2
TRANSPARENT_COLOUR = 32768
OBJ_TILE_SET_OFFSET = 65536
OBJ_PALETTE_OFFSET = 512
VRAM_PAGE_OFFSET = 40960
NUM_BACKGROUNDS = 4
NUM_PRIORITIES = 4
NUM_PRIMARY_WINDOWS = 2

class LayerType(IntEnum):
    BG_0 = 0
    BG_1 = 1
    BG_2 = 2
    BG_3 = 3
    OBJ = 4
    BACKDROP = 5

class WindowIndex(IntEnum):
    WIN_0 = 0
    WIN_1 = 1
    WIN_OBJ = 2
    WIN_OUT = 3

class VideoMode(IntEnum):
    MODE_0 = 0
    MODE_1 = 1
    MODE_2 = 2
    MODE_3 = 3
    MODE_4 = 4
    MODE_5 = 5

class ObjectMode(IntEnum):
    NORMAL = 0
    BLEND = 1
    WINDOW = 2

class ObjectShape(IntEnum):
    SQUARE = 0
    HORIZONTAL = 1
    VERTICAL = 2

class BlendMode(IntEnum):
    OFF = 0
    ALPHA = 1
    LIGHTEN = 2
    DARKEN = 3