summaryrefslogtreecommitdiff
path: root/engine/map_objects_2.asm
diff options
context:
space:
mode:
authormid-kid <esteve.varela@gmail.com>2018-03-13 13:07:16 +0100
committermid-kid <esteve.varela@gmail.com>2018-03-13 13:21:40 +0100
commitbaa0dc5a963a79843b37888bcfe1d2dfe833ade9 (patch)
tree968c86105bd67a3121d8f3f20018bfc59191f4c9 /engine/map_objects_2.asm
parent12070ca50067d3abe36a730190f88ee43f2cace9 (diff)
Organize the engine/ directory
This is an informed attempt at reorganizing the engine/ directory by creating categorized subdirectories, in order to make it easier to navigate and find things. The directories created are as follows: * engine/game: Contains all "minigames", things like the unown puzzle and slot machine. * engine/gfx: Contains all handling of graphics. From loading palettes to playing animations. * engine/link: Contains all multiplayer functionality. * engine/menu: Contains all generic/misc. menus and menu code. Other, more specialized menus are in their own subdirectories (pokedex, pokegear, party menu, etc). * engine/overworld: Contains all handling of the overworld. From loading and connecting maps to wild encounters and the scripting engine. * engine/pokegear: In the same vein as engine/pokedex, except it could use some more splitting up. * engine/pokemon: Contains everything related to manipulating pokemon data. From the pokemon storage system to evolution and mail. * engine/printer: Contains everything related to printing things as well as the printer communication. * engine/title: Contains intro sequences, title screens and credits.
Diffstat (limited to 'engine/map_objects_2.asm')
-rw-r--r--engine/map_objects_2.asm70
1 files changed, 0 insertions, 70 deletions
diff --git a/engine/map_objects_2.asm b/engine/map_objects_2.asm
deleted file mode 100644
index 038e2b49b..000000000
--- a/engine/map_objects_2.asm
+++ /dev/null
@@ -1,70 +0,0 @@
-LoadObjectMasks: ; 2454f
- ld hl, wObjectMasks
- xor a
- ld bc, NUM_OBJECTS
- call ByteFill
- nop
- ld bc, wMapObjects
- ld de, wObjectMasks
- xor a
-.loop
- push af
- push bc
- push de
- call GetObjectTimeMask
- jr c, .next
- call CheckObjectFlag
-.next
- pop de
- ld [de], a
- inc de
- pop bc
- ld hl, OBJECT_LENGTH
- add hl, bc
- ld b, h
- ld c, l
- pop af
- inc a
- cp NUM_OBJECTS
- jr nz, .loop
- ret
-
-CheckObjectFlag: ; 2457d (9:457d)
- ld hl, MAPOBJECT_SPRITE
- add hl, bc
- ld a, [hl]
- and a
- jr z, .masked
- ld hl, MAPOBJECT_EVENT_FLAG
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- cp -1
- jr nz, .check
- ld a, e
- cp -1
- jr z, .unmasked
- jr .masked
-.check
- ld b, CHECK_FLAG
- call EventFlagAction
- ld a, c
- and a
- jr nz, .masked
-.unmasked
- xor a
- ret
-
-.masked
- ld a, -1
- scf
- ret
-
-GetObjectTimeMask: ; 245a7 (9:45a7)
- call CheckObjectTime
- ld a, -1
- ret c
- xor a
- ret