Skip to content

Define COLL_CELL constants #1170

@vulcandth

Description

@vulcandth

We should define some additional constants to represent the "Collision cells". That is, 2x2 tiles that represent the area mapobjects typically reside in.

DEF COLL_CELL_WIDTH EQU TILE_WIDTH * 2
DEF SCREEN_COLL_WIDTH EQU 10
DEF SCREEN_COLL_HEIGHT EQU 18

Anything that references SCREEN_WIDTH / 2 or SCREEN_HEIGHT / 2 is likely referring to collision cells.

The above names and definitions are just to get the idea across.

Note; we also have the follwing definitions:

DEF MAPOBJECT_SCREEN_WIDTH  EQU (SCREEN_WIDTH / 2) + 2
DEF MAPOBJECT_SCREEN_HEIGHT EQU (SCREEN_HEIGHT / 2) + 2

the +2 I believe is because mapbojects may spawn 1 tile coll cell offscreen.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions