ASxxxx Assembler V02.00 + NoICE + SDCC mods  (Zilog Z80 / Hitachi HD64180), page 1.
Hexadecimal [16-Bits]



                              1 ;;-----------------------------LICENSE NOTICE------------------------------------
                              2 ;;  This file is part of Damned Games 
                              3 ;;  Copyright (C) 2021 Jorge Marín Ferrándiz, Yeray Mora Sobrino
                              4 ;;
                              5 ;;  This program is free software: you can redistribute it and/or modify
                              6 ;;  it under the terms of the GNU Lesser General Public License as published by
                              7 ;;  the Free Software Foundation, either version 3 of the License, or
                              8 ;;  (at your option) any later version.
                              9 ;;
                             10 ;;  This program is distributed in the hope that it will be useful,
                             11 ;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
                             12 ;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                             13 ;;  GNU Lesser General Public License for more details.
                             14 ;;
                             15 ;;  You should have received a copy of the GNU Lesser General Public License
                             16 ;;  along with this program.  If not, see <http://www.gnu.org/licenses/>.
                             17 ;;-------------------------------------------------------------------------------
                             18 ;;
                             19 ;;CABECERA DE ENTITYMANAGER
                             20 ;;
                             21 .globl entityman_getEntityVector_IX
                             22 .globl entityman_getNumEntities_A
                             23 .globl entityman_getPlayerIX_enemyIY
                             24 .globl man_entity_getArray
                             25 .globl entityman_create
                             26 .globl man_entity_new
                             27 .globl man_entity_init
                             28 .globl man_entity_forall
                             29 .globl man_entity_forall_matching
                             30 .globl man_entity_forall_matching_iy
                             31 .globl entityman_get_elements
                             32 
                             33 ;;Macro creacion de entidades
                             34 .macro DefineEntityAnnonimous _cmps, _x, _y, _vx, _vy, _w, _h,_animationptr,_prevsprite, _sprite, _prevptr,_prevptr2, _lantern, _aimx, _aist, _colfunc, _type
                             35 
                             36    .db _cmps
                             37    .db _x
                             38    .db _y
                             39    .db _vx
                             40    .db _vy
                             41    .db _w
                             42    .db _h
                             43    .dw _animationptr
                             44    .dw _prevsprite
                             45    .dw _sprite
                             46    .dw _prevptr
                             47    .dw _prevptr2
                             48    .db _lantern
                             49    .db _aimx, 0x00
                             50    .db _aist
                             51    .dw _colfunc
                             52    .db _type
                             53 
                             54 .endm
                             55 
ASxxxx Assembler V02.00 + NoICE + SDCC mods  (Zilog Z80 / Hitachi HD64180), page 2.
Hexadecimal [16-Bits]



                             56 .macro DefineEntity _name, _cmps, _x, _y, _vx, _vy, _w, _h,_animationptr,_prevsprite, _sprite, _prevptr, _prevptr2, _lantern, _aimx, _aist, _colfunc, _type
                             57     _name::
                             58         DefineEntityAnnonimous _cmps, _x, _y, _vx, _vy, _w, _h,_animationptr,_prevsprite, _sprite, _prevptr, _prevptr2, _lantern, _aimx, _aist, _colfunc, _type
                             59 
                             60 .endm
                             61 
                             62 .macro DefineEntityArray _name, _N
                             63     _name::
                             64         .rept _N
                             65             DefineEntityAnnonimous 0xDE, 0xAD, 0xDE, 0xAD,0xDE, 0xAD, 0xDE, 0xAD, 0xDE, 0xAD, 0xDE, 0xAD,0xDE, 0xAD, 0xDE, 0xAD, 0xAA
                             66         .endm
                             67 .endm
                             68 
                     0000    69 e_cmps       = 0
                     0001    70 e_x          = 1
                     0002    71 e_y          = 2
                     0003    72 e_vx         = 3
                     0004    73 e_vy         = 4
                     0005    74 e_w          = 5
                     0006    75 e_h          = 6
                     0007    76 e_animptr    = 7
                     0009    77 e_prevsprite = 9
                     000B    78 e_sprite     = 11
                     000D    79 e_prevptr    = 13
                     000F    80 e_prevptr2   = 15
                     0011    81 e_lantr      = 17
                     0012    82 e_ai_aim_x   = 18
                     0013    83 e_ai_aim_y   = 19
                     0014    84 e_ai_st      = 20
                     0015    85 e_col_func   = 21
                     0017    86 e_type       = 23
                     0018    87 sizeof_e     = 24
                             88 
                     0030    89 doublesizeof_e = 48
                             90 
                             91 ;; SISTEMAS DE IA QUE PUEDE TENER UNA ENTIDAD
                             92 
                     0000    93 e_ai_st_noAI     = 0
                     0001    94 e_ai_st_stand_by = 1
                     0002    95 e_ai_st_move_to  = 2
                     0003    96 e_ai_st_escape   = 3
                             97 
                             98 ;; TIPOS DE CMPS QUE PUEDE TENER UNA ENTIDAD
                     0000    99 e_invalid       = 0x00
                     0080   100 e_alive         = 0x80
                     0010   101 e_collider      = 0x10 
                     0008   102 e_collisionable = 0x08
                     0002   103 e_recollectable = 0x02
                     0001   104 e_animation     = 0x01
                     00C0   105 e_UI            = 0xC0
                     0020   106 e_physics       = 0x20
                            107 
                            108 ;; TIPOS DE ENTIDADES
                            109 
                     0080   110 e_player        = 0x80
ASxxxx Assembler V02.00 + NoICE + SDCC mods  (Zilog Z80 / Hitachi HD64180), page 3.
Hexadecimal [16-Bits]



                     0040   111 e_yesquero      = 0x40
                     0010   112 e_bloq          = 0x10
                     0008   113 e_enemy         = 0x08
                     0002   114 e_destructor    = 0x02
