;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 3.6.8 #9946 (CYGWIN)
;--------------------------------------------------------
	.module render
	.optsdcc -mz80
	
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
	.globl _renderScoreboard
	.globl _renderScore
	.globl _render
	.globl _renderText
	.globl _renderSprites
	.globl _renderDelete
	.globl _renderItem
	.globl _renderFace
	.globl _renderEnergy
	.globl _renderHour
	.globl _renderClock
	.globl _renderWeek
	.globl _redibujarTile
	.globl _showMessage
	.globl _abs
	.globl _mydrawStringM1
	.globl _cpct_etm_drawTileBox2x4
	.globl _cpct_getRandom_mxor_u8
	.globl _cpct_getScreenPtr
	.globl _cpct_drawSpriteMasked
	.globl _cpct_drawSprite
	.globl _cpct_drawSolidBox
	.globl _cpct_px2byteM0
	.globl _cpct_hflipSpriteM0
	.globl _txt_ende4
	.globl _txt_ende3
	.globl _txt_ende2
	.globl _txt_ende1
	.globl _txt_special_24
	.globl _txt_special_23
	.globl _txt_special_22
	.globl _txt_special_21
	.globl _txt_special_20
	.globl _txt_special_19
	.globl _txt_special_18
	.globl _txt_special_17
	.globl _txt_special_16
	.globl _txt_special_15
	.globl _txt_special_14
	.globl _txt_special_13
	.globl _txt_special_12
	.globl _txt_special_11
	.globl _txt_special_10
	.globl _txt_special_09
	.globl _txt_special_08
	.globl _txt_special_07
	.globl _txt_special_06
	.globl _txt_special_05
	.globl _txt_special_04
	.globl _txt_special_03
	.globl _txt_special_02
	.globl _txt_special_01
	.globl _txt_special_00
	.globl _txt_act0_61
	.globl _txt_act0_60
	.globl _txt_act0_59
	.globl _txt_act0_58
	.globl _txt_act0_57
	.globl _txt_act0_56
	.globl _txt_act0_55
	.globl _txt_act0_54
	.globl _txt_act0_53
	.globl _txt_act0_52
	.globl _txt_act0_51
	.globl _txt_act0_50
	.globl _txt_act0_49
	.globl _txt_act0_48
	.globl _txt_act0_47
	.globl _txt_act0_46
	.globl _txt_act0_45
	.globl _txt_act0_44
	.globl _txt_act0_43
	.globl _txt_act0_42
	.globl _txt_act0_41
	.globl _txt_act0_40
	.globl _txt_act0_39
	.globl _txt_act0_38
	.globl _txt_act0_37
	.globl _txt_act0_36
	.globl _txt_act0_35
	.globl _txt_act0_34
	.globl _txt_act0_33
	.globl _txt_act0_32
	.globl _txt_act0_31
	.globl _txt_act0_30
	.globl _txt_act0_29
	.globl _txt_act0_28
	.globl _txt_act0_27
	.globl _txt_act0_26
	.globl _txt_act0_25
	.globl _txt_act0_24
	.globl _txt_act0_23
	.globl _txt_act0_22
	.globl _txt_act0_21
	.globl _txt_act0_20
	.globl _txt_act0_19
	.globl _txt_act0_18
	.globl _txt_act0_17
	.globl _txt_act0_16
	.globl _txt_act0_15
	.globl _txt_act0_14
	.globl _txt_act0_13
	.globl _txt_act0_12
	.globl _txt_act0_11
	.globl _txt_act0_10
	.globl _txt_act0_9
	.globl _txt_act0_8
	.globl _txt_act0_7
	.globl _txt_act0_6
	.globl _txt_act0_5
	.globl _txt_act0_4
	.globl _txt_act0_3
	.globl _txt_act0_2
	.globl _txt_act0_1
	.globl _txt_act0_0
	.globl _txt_act
	.globl _txt_friday
	.globl _txt_thursday
	.globl _txt_wednesday
	.globl _txt_tuesday
	.globl _txt_monday
	.globl _txt_pause
	.globl _txt_credits4
	.globl _txt_credits3
	.globl _txt_credits2
	.globl _txt_credits1
	.globl _txt_pressKey
	.globl _txt_finalscore
	.globl _txt_highscore
	.globl _txt_intro8
	.globl _txt_intro7
	.globl _txt_intro6
	.globl _txt_intro5
	.globl _txt_intro4
	.globl _txt_intro3
	.globl _txt_intro2
	.globl _txt_intro1
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
	.area _DATA
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
	.area _INITIALIZED
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
	.area _DABS (ABS)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
	.area _HOME
	.area _GSINIT
	.area _GSFINAL
	.area _GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area _HOME
	.area _HOME
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area _CODE
;src/render.c:9: void redibujarTile(u8 x, u8 y, u8 ancho, u8 alto) {
;	---------------------------------
; Function redibujarTile
; ---------------------------------
_redibujarTile::
	call	___sdcc_enter_ix
;src/render.c:10: if (x % 2){ //Si estamos en posición impar hay que restablecer todo el tile
	bit	0, 4 (ix)
	jr	Z,00102$
;src/render.c:11: x--;
	dec	4 (ix)
;src/render.c:12: ancho++;
	inc	6 (ix)
00102$:
;src/render.c:14: if (ancho % 2){
	ld	a, 6 (ix)
	and	a, #0x01
	ld	c, a
;src/render.c:15: ancho = (ancho / 2) + 1;
	ld	b, 6 (ix)
	srl	b
;src/render.c:14: if (ancho % 2){
	ld	a, c
	or	a, a
	jr	Z,00104$
;src/render.c:15: ancho = (ancho / 2) + 1;
	ld	a, b
	inc	a
	ld	6 (ix), a
	jr	00105$
00104$:
;src/render.c:17: ancho = (ancho / 2);
	ld	6 (ix), b
00105$:
;src/render.c:19: cpct_etm_drawTileBox2x4 (x/2, y/4,ancho, alto/4, 34, CPCT_VMEM_START, &current_map[0] );
	ld	hl, #_current_map+0
	ld	d, 7 (ix)
	srl	d
	srl	d
	ld	b, 5 (ix)
	srl	b
	srl	b
	ld	c, 4 (ix)
	srl	c
	push	hl
	ld	hl, #0xc000
	push	hl
	ld	a, #0x22
	push	af
	inc	sp
	push	de
	inc	sp
	ld	a, 6 (ix)
	push	af
	inc	sp
	push	bc
	call	_cpct_etm_drawTileBox2x4
	pop	ix
	ret
_txt_intro1:
	.ascii "Roland es una persona normal, como t>."
	.db 0x00
_txt_intro2:
	.ascii "Cada Lunes, su alarma suena a las 7am."
	.db 0x00
_txt_intro3:
	.ascii "Empieza una semana con mucho por hacer"
	.db 0x00
_txt_intro4:
	.ascii "Ayuda a Roland en sus labores diarias "
	.db 0x00
_txt_intro5:
	.ascii "y otras actividades de entretenimiento"
	.db 0x00
_txt_intro6:
	.ascii "Debes 'sobrevivir' hasta el Viernes.  "
	.db 0x00
_txt_intro7:
	.ascii "* Usa QOP-SPACE, Cursores o Joystick *"
	.db 0x00
_txt_intro8:
	.ascii "     Pulsa H para Pausar el juego     "
	.db 0x00
_txt_highscore:
	.ascii "High Score"
	.db 0x00
_txt_finalscore:
	.ascii "Final Score"
	.db 0x00
_txt_pressKey:
	.ascii "Pulsa cualquier tecla "
	.db 0x00
_txt_credits1:
	.ascii "c=digo:cperezgrin v1.2"
	.db 0x00
_txt_credits2:
	.ascii "m>sica / fx: Greenweb "
	.db 0x00
_txt_credits3:
	.ascii "sprites: Ricardo Oy=n "
	.db 0x00
_txt_credits4:
	.ascii "powered by cpctelera  "
	.db 0x00
_txt_pause:
	.ascii "PAUSA,Pulsa 'H' para seguir. 'E', salir"
	.db 0x00
_txt_monday:
	.ascii "Lunes, 7 AM"
	.db 0x00
	.db 0x00
_txt_tuesday:
	.ascii "Martes, 7 AM"
	.db 0x00
	.db 0x00
_txt_wednesday:
	.ascii "Mi;rcoles, 7 AM"
	.db 0x00
_txt_thursday:
	.ascii "Jueves, 7 AM"
	.db 0x00
	.db 0x00
	.db 0x00
_txt_friday:
	.ascii "Viernes, 7 AM"
	.db 0x00
_txt_act:
	.ascii " Disparo para "
	.db 0x00
_txt_act0_0:
	.ascii "tomar un caf;  "
	.db 0x00
_txt_act0_1:
	.ascii "ver la tele    "
	.db 0x00
_txt_act0_2:
	.ascii "jugar ordenador"
	.db 0x00
_txt_act0_3:
	.ascii "limpiar basura "
	.db 0x00
_txt_act0_4:
	.ascii "leer un libro  "
	.db 0x00
_txt_act0_5:
	.ascii "picar algo     "
	.db 0x00
_txt_act0_6:
	.ascii "leer peri=dico "
	.db 0x00
_txt_act0_7:
	.ascii "beber de fuente"
	.db 0x00
_txt_act0_8:
	.ascii "entrar al cine "
	.db 0x00
_txt_act0_9:
	.ascii "hacer ejercicio"
	.db 0x00
_txt_act0_10:
	.ascii "comer delicias "
	.db 0x00
_txt_act0_11:
	.ascii "ligar con chica"
	.db 0x00
_txt_act0_12:
	.ascii "ligar con chico"
	.db 0x00
_txt_act0_13:
	.ascii "descansar      "
	.db 0x00
_txt_act0_14:
	.ascii "coger tel;fono "
	.db 0x00
_txt_act0_15:
	.ascii "usar telescopio"
	.db 0x00
_txt_act0_16:
	.ascii "beber cerveza  "
	.db 0x00
_txt_act0_17:
	.ascii "ajustar tiro   "
	.db 0x00
_txt_act0_18:
	.ascii "donar sangre   "
	.db 0x00
_txt_act0_19:
	.ascii "usar manguera  "
	.db 0x00
_txt_act0_20:
	.ascii "recoger perla  "
	.db 0x00
_txt_act0_21:
	.ascii "ajustar golpe  "
	.db 0x00
_txt_act0_22:
	.ascii "dar moneda     "
	.db 0x00
_txt_act0_23:
	.ascii "dar pescado    "
	.db 0x00
_txt_act0_24:
	.ascii "beber vino     "
	.db 0x00
_txt_act0_25:
	.ascii "tocar DO       "
	.db 0x00
_txt_act0_26:
	.ascii "tocar RE       "
	.db 0x00
_txt_act0_27:
	.ascii "tocar MI       "
	.db 0x00
_txt_act0_28:
	.ascii "tocar FA       "
	.db 0x00
_txt_act0_29:
	.ascii "tocar SOL      "
	.db 0x00
_txt_act0_30:
	.ascii "tocar LA       "
	.db 0x00
_txt_act0_31:
	.ascii "tocar SI       "
	.db 0x00
_txt_act0_32:
	.ascii "tocar DO'      "
	.db 0x00
_txt_act0_33:
	.ascii "tocar RE'      "
	.db 0x00
_txt_act0_34:
	.ascii "tocar MI'      "
	.db 0x00
_txt_act0_35:
	.ascii "pintar la pared"
	.db 0x00
_txt_act0_36:
	.ascii "alimentar gato "
	.db 0x00
_txt_act0_37:
	.ascii "nadar en el mar"
	.db 0x00
_txt_act0_38:
	.ascii "dar pan paloma "
	.db 0x00
_txt_act0_39:
	.ascii "lanzar moneda  "
	.db 0x00
_txt_act0_40:
	.ascii "dar carta      "
	.db 0x00
_txt_act0_41:
	.ascii "picar pared    "
	.db 0x00
_txt_act0_42:
	.ascii "dar bocadillo  "
	.db 0x00
_txt_act0_43:
	.ascii "lavar coche    "
	.db 0x00
_txt_act0_44:
	.ascii "dar carne      "
	.db 0x00
_txt_act0_45:
	.ascii "usar coche     "
	.db 0x00
_txt_act0_46:
	.ascii "ba$arse        "
	.db 0x00
_txt_act0_47:
	.ascii "coger tesoro   "
	.db 0x00
_txt_act0_48:
	.ascii "subir al bus   "
	.db 0x00
_txt_act0_49:
	.ascii "coger el metro "
	.db 0x00
_txt_act0_50:
	.ascii "dormir         "
	.db 0x00
_txt_act0_51:
	.ascii "subirse al tren"
	.db 0x00
_txt_act0_52:
	.ascii "coger *llaves* "
	.db 0x00
_txt_act0_53:
	.ascii "coger *pan*    "
	.db 0x00
_txt_act0_54:
	.ascii "coger *pescado*"
	.db 0x00
_txt_act0_55:
	.ascii "coger *ba$ador*"
	.db 0x00
_txt_act0_56:
	.ascii "coger *moneda* "
	.db 0x00
_txt_act0_57:
	.ascii "coger *carta*  "
	.db 0x00
_txt_act0_58:
	.ascii "coger *pico*   "
	.db 0x00
_txt_act0_59:
	.ascii "coger *bocata* "
	.db 0x00
_txt_act0_60:
	.ascii "coger *cubo*   "
	.db 0x00
_txt_act0_61:
	.ascii "coger *carne*  "
	.db 0x00
_txt_special_00:
	.ascii "fin del d<a.Vete a la cama a la pr=xima"
	.db 0x00
_txt_special_01:
	.ascii "Con el paso del tiempo, pierdes energ<a"
	.db 0x00
_txt_special_02:
	.ascii "Encuentra actividades para recuperarla."
	.db 0x00
_txt_special_03:
	.ascii "Algunas necesitan un objeto, otras s=lo"
	.db 0x00
_txt_special_04:
	.ascii "se podr|n hacer una vez o a una hora.  "
	.db 0x00
_txt_special_05:
	.ascii "Bien. Necesito caf; para empezar el d<a"
	.db 0x00
_txt_special_06:
	.ascii "Estaba deseando ver esta pel<cula      "
	.db 0x00
_txt_special_07:
	.ascii "mmmm Delicioso                         "
	.db 0x00
_txt_special_08:
	.ascii "Un ba$o r|pido antes de que me muerda  "
	.db 0x00
_txt_special_09:
	.ascii "Lluvia el martes y Jueves por la noche "
	.db 0x00
_txt_special_10:
	.ascii "Este agua es m|gica. Pero ya no hay m|s"
	.db 0x00
_txt_special_11:
	.ascii "]Gotas m|gicas !! C=gelas todas        "
	.db 0x00
_txt_special_12:
	.ascii "Demsiada luz para ver las estrellas    "
	.db 0x00
_txt_special_13:
	.ascii "Te encuentras mareado                  "
	.db 0x00
_txt_special_14:
	.ascii "Suficiente, probemos otra cosa         "
	.db 0x00
_txt_special_15:
	.ascii "Algo brilla tras esa grieta            "
	.db 0x00
_txt_special_16:
	.ascii "] Es un diamante !                     "
	.db 0x00
_txt_special_17:
	.ascii "Cuidado con el viento ma$anero         "
	.db 0x00
_txt_special_18:
	.ascii "Hoyo en uno                            "
	.db 0x00
_txt_special_19:
	.ascii "No,si me das dinero, lo gastar; en vino"
	.db 0x00
_txt_special_20:
	.ascii "Nah,no me gusta el pescado, no soy gato"
	.db 0x00
_txt_special_21:
	.ascii "No te olvides de ir al trabajo de 9 a 5"
	.db 0x00
_txt_special_22:
	.ascii "]] Est|n aqu<iiii !!                   "
	.db 0x00
_txt_special_23:
	.ascii "Una suave brisa ...                    "
	.db 0x00
_txt_special_24:
	.ascii "] Qu; belleza ! ]Esto es el futuro!    "
	.db 0x00
_txt_ende1:
	.ascii "No est| mal. Pero puedes mejorar "
	.db 0x00
_txt_ende2:
	.ascii "Bien,ayudaste a Roland.Disfruta el finde"
	.db 0x00
_txt_ende3:
	.ascii "Necesitas mejorar, vuelve a probar  "
	.db 0x00
_txt_ende4:
	.ascii "Mant;n Z y X en men> para algo especial"
	.db 0x00
	.db 0x00
;src/render.c:22: void renderWeek(){
;	---------------------------------
; Function renderWeek
; ---------------------------------
_renderWeek::
;src/render.c:25: cpct_drawSprite (&G_week[0],  cpctm_screenPtr (CPCT_VMEM_START, 70, 0),10, 8);
	ld	hl, #0x080a
	push	hl
	ld	hl, #0xc046
	push	hl
	ld	hl, #_G_week
	push	hl
	call	_cpct_drawSprite
;src/render.c:26: for (i = 0; i < day; i++) {
	ld	c, #0x00
00103$:
	ld	hl, #_day
;src/render.c:27: cpct_drawSprite (&G_day[0] ,  cpct_getScreenPtr (CPCT_VMEM_START, 70 + (i*2), 0),2, 8);
	ld	a,c
	cp	a,(hl)
	ret	NC
	add	a, a
	add	a, #0x46
	ld	b, a
	push	bc
	xor	a, a
	push	af
	inc	sp
	push	bc
	inc	sp
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ld	de, #0x0802
	push	de
	push	hl
	ld	hl, #_G_day
	push	hl
	call	_cpct_drawSprite
	pop	bc
;src/render.c:26: for (i = 0; i < day; i++) {
	inc	c
	jr	00103$
;src/render.c:31: void renderClock(){
;	---------------------------------
; Function renderClock
; ---------------------------------
_renderClock::
;src/render.c:32: cpct_drawSprite (&G_clock[0],  cpctm_screenPtr (CPCT_VMEM_START, 70, 16),10, 40);
	ld	hl, #0x280a
	push	hl
	ld	hl, #0xc0e6
	push	hl
	ld	hl, #_G_clock
	push	hl
	call	_cpct_drawSprite
;src/render.c:34: if (screen == 15)
	ld	a,(#_screen + 0)
	sub	a, #0x0f
	ret	NZ
;src/render.c:35: cpct_drawSprite (&G_clock[0],  cpctm_screenPtr (CPCT_VMEM_START, 29, 44),10, 40);
	ld	hl, #0x280a
	push	hl
	ld	hl, #0xe1ad
	push	hl
	ld	hl, #_G_clock
	push	hl
	call	_cpct_drawSprite
	ret
;src/render.c:38: void renderHour(){
;	---------------------------------
; Function renderHour
; ---------------------------------
_renderHour::
;src/render.c:41: if (hour > 18) 
	ld	a, #0x12
	ld	iy, #_hour
	sub	a, 0 (iy)
	jr	NC,00102$
;src/render.c:42: mod = hour - 19;
	ld	a, 0 (iy)
	add	a, #0xed
	ld	e, a
	jr	00103$
00102$:
;src/render.c:44: mod = hour - 7;
	ld	a,(#_hour + 0)
	add	a, #0xf9
	ld	e, a
00103$:
;src/render.c:46: cpct_drawSprite (&G_hour07[0] + (27*mod),  cpctm_screenPtr (CPCT_VMEM_START, 74, 32),3, 9);
	ld	bc, #_G_hour07+0
	ld	d,#0x00
	ld	l, e
	ld	h, d
	add	hl, hl
	add	hl, de
	add	hl, hl
	add	hl, hl
	add	hl, de
	add	hl, hl
	add	hl, de
	add	hl,bc
	ld	c, l
	ld	b, h
	ld	e, c
	ld	d, b
	push	bc
	ld	hl, #0x0903
	push	hl
	ld	hl, #0xc18a
	push	hl
	push	de
	call	_cpct_drawSprite
	pop	bc
;src/render.c:48: if (screen == 15)
	ld	a,(#_screen + 0)
	sub	a, #0x0f
	ret	NZ
;src/render.c:49: cpct_drawSprite (&G_hour07[0] + (27*mod),  cpctm_screenPtr (CPCT_VMEM_START, 33, 60),3, 9);
	ld	hl, #0x0903
	push	hl
	ld	hl, #0xe251
	push	hl
	push	bc
	call	_cpct_drawSprite
	ret
;src/render.c:52: void renderEnergy(){
;	---------------------------------
; Function renderEnergy
; ---------------------------------
_renderEnergy::
;src/render.c:54: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 70, 64), cpct_px2byteM0 (4, 4), 5, 8);
	ld	hl, #0x0404
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x0805
	push	bc
	push	hl
	ld	hl, #0xc2c6
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:55: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 75, 64), cpct_px2byteM0 (13, 13), 4, 8);
	ld	hl, #0x0d0d
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x0804
	push	bc
	push	hl
	ld	hl, #0xc2cb
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:56: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 79, 64), 0, 1, 8);
	ld	hl, #0x0801
	push	hl
	ld	hl, #0x0000
	push	hl
	ld	hl, #0xc2cf
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:58: bar = energy /27;
	ld	a, #0x1b
	push	af
	inc	sp
	ld	a, (_energy)
	push	af
	inc	sp
	call	__divuchar
;src/render.c:59: cpct_drawSolidBox (cpct_getScreenPtr (CPCT_VMEM_START, 70+bar, 64), cpct_px2byteM0 (1, 1), 1, 8);
	ex	(sp),hl
	ld	bc, #0x0101
	push	bc
	call	_cpct_px2byteM0
	ld	c, l
	pop	hl
	ld	b, #0x00
	ld	a, l
	add	a, #0x46
	ld	d, a
	push	bc
	ld	a, #0x40
	push	af
	inc	sp
	push	de
	inc	sp
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	pop	bc
	ld	de, #0x0801
	push	de
	push	bc
	push	hl
	call	_cpct_drawSolidBox
	ret
;src/render.c:62: void renderFace(u8 value) {
;	---------------------------------
; Function renderFace
; ---------------------------------
_renderFace::
;src/render.c:63: cpct_drawSprite (faces + (150*value),  cpctm_screenPtr (CPCT_VMEM_START, 72, 80),5, 30);			
	ld	hl, #2+0
	add	hl, sp
	ld	c, (hl)
	ld	b,#0x00
	ld	l, c
	ld	h, b
	add	hl, hl
	add	hl, hl
	add	hl, hl
	add	hl, bc
	add	hl, hl
	add	hl, hl
	add	hl, bc
	add	hl, hl
	add	hl, bc
	add	hl, hl
	ld	de, (_faces)
	add	hl, de
	ld	bc, #0x1e05
	push	bc
	ld	bc, #0xc368
	push	bc
	push	hl
	call	_cpct_drawSprite
	ret
;src/render.c:66: void renderItem(){
;	---------------------------------
; Function renderItem
; ---------------------------------
_renderItem::
;src/render.c:67: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 73, 132), cpct_px2byteM0 (0, 0), 5, 20);
	ld	hl, #0x0000
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x1405
	push	bc
	push	hl
	ld	hl, #0xe549
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:68: if (object) {
	ld	iy, #_object
	ld	a, 0 (iy)
	or	a, a
	ret	Z
;src/render.c:69: cpct_drawSprite (&G_o_carKeys[0] + (100*(object-1)),  cpctm_screenPtr (CPCT_VMEM_START, 73, 132),5, 20);			
	ld	bc, #_G_o_carKeys+0
	ld	e, 0 (iy)
	ld	d, #0x00
	dec	de
	ld	l, e
	ld	h, d
	add	hl, hl
	add	hl, de
	add	hl, hl
	add	hl, hl
	add	hl, hl
	add	hl, de
	add	hl, hl
	add	hl, hl
	add	hl, bc
	ld	bc, #0x1405
	push	bc
	ld	bc, #0xe549
	push	bc
	push	hl
	call	_cpct_drawSprite
	ret
;src/render.c:74: void renderDelete(){
;	---------------------------------
; Function renderDelete
; ---------------------------------
_renderDelete::
	call	___sdcc_enter_ix
	ld	hl, #-9
	add	hl, sp
	ld	sp, hl
;src/render.c:78: if (screen == 5) { //Borrar teléfonos
	ld	a,(#_screen + 0)
	sub	a, #0x05
	jr	NZ,00137$
;src/render.c:79: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 18, 44), cpct_px2byteM0 (14, 14), 2, 4);
	ld	hl, #0x0e0e
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x0402
	push	bc
	push	hl
	ld	hl, #0xe1a2
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:80: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 50, 44), cpct_px2byteM0 (14, 14), 2, 4);
	ld	hl, #0x0e0e
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x0402
	push	bc
	push	hl
	ld	hl, #0xe1c2
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:81: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 26, 92), cpct_px2byteM0 (14, 14), 2, 4);
	ld	hl, #0x0e0e
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x0402
	push	bc
	push	hl
	ld	hl, #0xe38a
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:85: for (i=0; i < MAX_ENTITIES; i++) {
00137$:
	ld	-8 (ix), #0x00
00124$:
;src/render.c:86: if (entities[i].id) {
	ld	c,-8 (ix)
	ld	b,#0x00
	ld	l, c
	ld	h, b
	add	hl, hl
	add	hl, hl
	add	hl, hl
	add	hl, bc
	add	hl, hl
	add	hl, bc
	ld	bc,#_entities
	add	hl,bc
	ex	de,hl
	ld	a, (de)
	ld	-1 (ix), a
	or	a, a
	jp	Z, 00125$
;src/render.c:87: ancho = entities[i].width;
	ld	hl, #0x0008
	add	hl,de
	ld	-3 (ix), l
	ld	-2 (ix), h
	ld	c, (hl)
;src/render.c:88: alto = entities[i].height;				
	ld	hl, #0x0007
	add	hl,de
	ld	-5 (ix), l
	ld	-4 (ix), h
	ld	b, (hl)
;src/render.c:89: x = entities[i].x0;
	push	de
	pop	iy
	ld	a, 5 (iy)
	ld	-9 (ix), a
	ld	-6 (ix), a
;src/render.c:90: y = entities[i].y0;
	push	de
	pop	iy
	ld	a, 6 (iy)
	ld	-7 (ix), a
;src/render.c:91: if (entities[i].id >= 250) { //los elementos de la carretera se borran de otra manera, pues no hay manera de recuperar el Tile original
	ld	a, -1 (ix)
	sub	a, #0xfa
	jp	C, 00109$
;src/render.c:92: cpct_drawSolidBox (cpct_getScreenPtr (CPCT_VMEM_START, entities[i].x0, entities[i].y), 0, ancho, alto);
	ld	l, e
	ld	h, d
	inc	hl
	inc	hl
	ld	h, (hl)
	push	bc
	push	de
	push	hl
	inc	sp
	ld	a, -9 (ix)
	push	af
	inc	sp
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	pop	de
	pop	bc
	push	hl
	pop	iy
	push	bc
	push	de
	push	bc
	ld	hl, #0x0000
	push	hl
	push	iy
	call	_cpct_drawSolidBox
	pop	de
	pop	bc
;src/render.c:93: if (entities[i].x == 0 || entities[i].x + ancho == 79) {
	ld	l, e
	ld	h, d
	inc	hl
	ld	l, (hl)
	ld	a, l
	or	a, a
	jr	Z,00105$
	ld	b, #0x00
	ld	h, #0x00
	add	hl, bc
	ld	a, l
	sub	a, #0x4f
	or	a, h
	jr	NZ,00110$
00105$:
;src/render.c:95: if (cpct_rand() % 2) {
	push	de
	call	_cpct_getRandom_mxor_u8
	pop	de
	bit	0, l
	jr	Z,00104$
;src/render.c:96: cpct_hflipSpriteM0 (entities[i].width, entities[i].height,  &entities[i].sprite_f1[0]);
	ld	l, e
	ld	h, d
	ld	bc, #0x000d
	add	hl, bc
	ld	c, (hl)
	inc	hl
	ld	b, (hl)
	push	bc
	pop	iy
	ld	l,-5 (ix)
	ld	h,-4 (ix)
	ld	a, (hl)
	ld	l,-3 (ix)
	ld	h,-2 (ix)
	ld	b, (hl)
	push	de
	push	iy
	push	af
	inc	sp
	push	bc
	inc	sp
	call	_cpct_hflipSpriteM0
	pop	de
;src/render.c:97: temp = 1 << ((entities[i].id) - 250); //2^i				
	ld	a, (de)
	add	a, #0x06
	ld	b, a
	ld	c, #0x01
	inc	b
	jr	00191$
00190$:
	sla	c
00191$:
	djnz	00190$
;src/render.c:98: vehicles = vehicles ^ temp; // marcar el bit correspondiente al inverso
	ld	iy, #_vehicles
	ld	a, 0 (iy)
	xor	a, c
	ld	0 (iy), a
00104$:
;src/render.c:100: entities[i].id = 0;
	xor	a, a
	ld	(de), a
	jr	00110$
00109$:
;src/render.c:104: redibujarTile(x, y, ancho, alto);	
	push	de
	push	bc
	ld	h, -7 (ix)
	ld	l, -6 (ix)
	push	hl
	call	_redibujarTile
	pop	af
	pop	af
	pop	de
00110$:
;src/render.c:108: if (dropsCollected == 10 && entities[i].id == 11) {
	ld	a,(#_dropsCollected + 0)
	sub	a, #0x0a
	jr	NZ,00112$
	ld	a, (de)
	sub	a, #0x0b
	jr	NZ,00112$
;src/render.c:109: entities[i].id = 0;
	xor	a, a
	ld	(de), a
;src/render.c:110: showMessage(ID_SPECIAL_MSG+14);
	push	de
	ld	a, #0x4c
	push	af
	inc	sp
	call	_showMessage
	inc	sp
	pop	de
00112$:
;src/render.c:114: if (spiders >= 3 && entities[i].id == 242) {
	ld	a,(#_spiders + 0)
	sub	a, #0x03
	jr	C,00125$
	ld	a, (de)
	sub	a, #0xf2
	jr	NZ,00125$
;src/render.c:115: activities[19]++;
	ld	bc, #_activities + 19
	ld	a, (bc)
	inc	a
	ld	(bc), a
;src/render.c:116: entities[i].id = 0;
	xor	a, a
	ld	(de), a
;src/render.c:117: showMessage(ID_SPECIAL_MSG+14);
	ld	a, #0x4c
	push	af
	inc	sp
	call	_showMessage
	inc	sp
00125$:
;src/render.c:85: for (i=0; i < MAX_ENTITIES; i++) {
	inc	-8 (ix)
	ld	a, -8 (ix)
	sub	a, #0x05
	jp	C, 00124$
;src/render.c:125: if (screen == 18 && entities[2].id && activities[3] ) {
	ld	a,(#_screen + 0)
	sub	a, #0x12
	jr	NZ,00126$
	ld	bc, #_entities + 38
	ld	a, (bc)
	or	a, a
	jr	Z,00126$
	ld	a, (#_activities + 3)
	or	a, a
	jr	Z,00126$
;src/render.c:126: entities[2].id = 0;
	xor	a, a
	ld	(bc), a
00126$:
	ld	sp, ix
	pop	ix
	ret
;src/render.c:132: void renderSprites(){
;	---------------------------------
; Function renderSprites
; ---------------------------------
_renderSprites::
	call	___sdcc_enter_ix
	ld	hl, #-19
	add	hl, sp
	ld	sp, hl
;src/render.c:141: if (screen == 5 && telephone) {
	ld	a,(#_screen + 0)
	sub	a, #0x05
	jr	NZ,00102$
	ld	iy, #_telephone
	ld	a, 1 (iy)
	or	a,0 (iy)
	jr	Z,00102$
;src/render.c:142: cpct_drawSprite (&G_telephone[0],  cpct_getScreenPtr (CPCT_VMEM_START, 2*(telephone % 34), 4*(telephone/34)),2, 4);		
	ld	hl, #0x0022
	push	hl
	ld	hl, (_telephone)
	push	hl
	call	__divuint
	pop	af
	pop	af
	ld	a, l
	add	a, a
	add	a, a
	ld	d, a
	push	de
	ld	hl, #0x0022
	push	hl
	ld	hl, (_telephone)
	push	hl
	call	__moduint
	pop	af
	pop	af
	ld	b, l
	pop	de
	sla	b
	ld	e, b
	push	de
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ld	bc, #_G_telephone+0
	ld	de, #0x0402
	push	de
	push	hl
	push	bc
	call	_cpct_drawSprite
00102$:
;src/render.c:146: if (screen == 8 && activities[ID_DIARY+2] == 0) {
	ld	a,(#_screen + 0)
	sub	a, #0x08
	jp	NZ,00113$
	ld	a, (#(_activities + 0x002f) + 0)
	or	a, a
	jr	NZ,00113$
;src/render.c:147: if (day == 1)
	ld	a,(#_day + 0)
	dec	a
	jr	NZ,00105$
;src/render.c:148: cpct_drawSprite (&G_treasure[0],  cpct_getScreenPtr (CPCT_VMEM_START, 16, 72), 4, 8);
	ld	hl, #0x4810
	push	hl
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ld	bc, #_G_treasure+0
	ld	de, #0x0804
	push	de
	push	hl
	push	bc
	call	_cpct_drawSprite
00105$:
;src/render.c:149: if (day == 2)
	ld	a,(#_day + 0)
	sub	a, #0x02
	jr	NZ,00107$
;src/render.c:150: cpct_drawSprite (&G_treasure[0],  cpct_getScreenPtr (CPCT_VMEM_START, 44, 88), 4, 8);
	ld	hl, #0x582c
	push	hl
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ld	bc, #_G_treasure+0
	ld	de, #0x0804
	push	de
	push	hl
	push	bc
	call	_cpct_drawSprite
00107$:
;src/render.c:151: if (day == 4)
	ld	a,(#_day + 0)
	sub	a, #0x04
	jr	NZ,00109$
;src/render.c:152: cpct_drawSprite (&G_treasure[0],  cpct_getScreenPtr (CPCT_VMEM_START, 48, 28), 4, 8);
	ld	hl, #0x1c30
	push	hl
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ld	bc, #_G_treasure+0
	ld	de, #0x0804
	push	de
	push	hl
	push	bc
	call	_cpct_drawSprite
00109$:
;src/render.c:153: if (day == 5)
	ld	a,(#_day + 0)
	sub	a, #0x05
	jr	NZ,00113$
;src/render.c:154: cpct_drawSprite (&G_treasure[0],  cpct_getScreenPtr (CPCT_VMEM_START, 42, 60), 4, 8);
	ld	hl, #0x3c2a
	push	hl
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ld	bc, #_G_treasure+0
	ld	de, #0x0804
	push	de
	push	hl
	push	bc
	call	_cpct_drawSprite
00113$:
;src/render.c:159: if (screen == 10 && activities[35]) {
	ld	a,(#_screen + 0)
	sub	a, #0x0a
	jr	NZ,00119$
	ld	a, (#(_activities + 0x0023) + 0)
	or	a, a
	jr	Z,00119$
;src/render.c:160: if (extra_char == 1)	
	ld	a,(#_extra_char + 0)
	dec	a
	jr	NZ,00116$
;src/render.c:161: cpct_drawSprite (&G_zx[0],  cpct_getScreenPtr (CPCT_VMEM_START, 1, 132), 3, 16);
	ld	hl, #0x8401
	push	hl
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ld	bc, #_G_zx+0
	ld	de, #0x1003
	push	de
	push	hl
	push	bc
	call	_cpct_drawSprite
	jr	00119$
00116$:
;src/render.c:163: cpct_drawSprite (&G_cpc[0], cpct_getScreenPtr (CPCT_VMEM_START, 1, 132), 3, 16);
	ld	hl, #0x8401
	push	hl
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ld	bc, #_G_cpc+0
	ld	de, #0x1003
	push	de
	push	hl
	push	bc
	call	_cpct_drawSprite
00119$:
;src/render.c:167: if (screen == 19) {
	ld	a,(#_screen + 0)
	sub	a, #0x13
	jp	NZ,00132$
;src/render.c:169: if (object == 9)
	ld	a,(#_object + 0)
	sub	a, #0x09
	jr	NZ,00122$
;src/render.c:170: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 14, 136),  cpct_px2byteM0 (3, 3), 2, 4);
	ld	hl, #0x0303
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x0402
	push	bc
	push	hl
	ld	hl, #0xc55e
	push	hl
	call	_cpct_drawSolidBox
00122$:
;src/render.c:173: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 45, 84),  cpct_px2byteM0 (1, 1), 1, 56);
	ld	hl, #0x0101
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x3801
	push	bc
	push	hl
	ld	hl, #0xe34d
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:174: if (hose) {
	ld	iy, #_hose
	ld	a, 0 (iy)
	or	a, a
	jr	Z,00132$
;src/render.c:175: hose--;
	dec	0 (iy)
;src/render.c:177: if (hose > HOSE_MAX-20) {
	ld	a, #0xb4
	sub	a, 0 (iy)
	jr	NC,00127$
;src/render.c:178: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 45, 84),  cpct_px2byteM0 (9, 9), 1, 56);	
	ld	hl, #0x0909
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x3801
	push	bc
	push	hl
	ld	hl, #0xe34d
	push	hl
	call	_cpct_drawSolidBox
	jr	00132$
00127$:
;src/render.c:180: if (hose % 2)
	ld	hl,#_hose+0
	bit	0, (hl)
	jr	Z,00124$
;src/render.c:181: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 45, 132),  cpct_px2byteM0 (9, 9), 1, 8);	
	ld	hl, #0x0909
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x0801
	push	bc
	push	hl
	ld	hl, #0xe52d
	push	hl
	call	_cpct_drawSolidBox
	jr	00132$
00124$:
;src/render.c:183: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 45, 136),  cpct_px2byteM0 (9, 9), 1, 4);	
	ld	hl, #0x0909
	push	hl
	call	_cpct_px2byteM0
	ld	h, #0x00
	ld	bc, #0x0401
	push	bc
	push	hl
	ld	hl, #0xc57d
	push	hl
	call	_cpct_drawSolidBox
00132$:
;src/render.c:188: if (carScreen == screen) {
	ld	a,(#_carScreen + 0)
	ld	iy, #_screen
	sub	a, 0 (iy)
	jr	NZ,00134$
;src/render.c:189: cpct_drawSpriteMasked (G_car_Roland, cpctm_screenPtr (CPCT_VMEM_START, 18, 140), 9, 12);
	ld	hl, #0x0c09
	push	hl
	ld	hl, #0xe562
	push	hl
	ld	hl, #_G_car_Roland
	push	hl
	call	_cpct_drawSpriteMasked
00134$:
;src/render.c:195: start = 0;
	ld	c, #0x00
;src/render.c:196: end = MAX_ENTITIES;
	ld	-18 (ix), #0x05
;src/render.c:197: next = 1;
	ld	-16 (ix), #0x01
;src/render.c:198: if (screen == 1 || screen == 15 || screen == 10 || screen == 19) { // En la estación cambiar el orden para que el mendigo quede detrás del protagonista
	ld	iy, #_screen
	ld	a, 0 (iy)
	dec	a
	jr	Z,00135$
	ld	a, 0 (iy)
	sub	a, #0x0f
	jr	Z,00135$
	ld	a, 0 (iy)
	sub	a, #0x0a
	jr	Z,00135$
	ld	a, 0 (iy)
	sub	a, #0x13
	jr	NZ,00136$
00135$:
;src/render.c:199: start = MAX_ENTITIES-1;
	ld	c, #0x04
;src/render.c:200: end = 255;
	ld	-18 (ix), #0xff
;src/render.c:201: next = -1;
	ld	-16 (ix), #0xff
00136$:
;src/render.c:203: for (i = start; i != end; i = i + next) { 
	ld	-19 (ix), c
00167$:
	ld	a, -18 (ix)
	sub	a, -19 (ix)
	jp	Z,00163$
;src/render.c:204: if (entities[i].id) {
	ld	c,-19 (ix)
	ld	b,#0x00
	ld	l, c
	ld	h, b
	add	hl, hl
	add	hl, hl
	add	hl, hl
	add	hl, bc
	add	hl, hl
	add	hl, bc
	ex	de,hl
	ld	hl, #_entities
	add	hl,de
	ld	c, l
	ld	b, h
	ld	a, (bc)
	ld	-1 (ix), a
	or	a, a
	jp	Z, 00168$
;src/render.c:209: entities[i].y = 136;
	ld	hl, #0x0002
	add	hl,bc
	ld	-3 (ix), l
	ld	-2 (ix), h
;src/render.c:210: entities[i].height = 16;
	ld	hl, #0x0007
	add	hl,bc
	ld	-5 (ix), l
	ld	-4 (ix), h
;src/render.c:212: entities[i].sprite_f2 = (u8*) &G_fire_f2[0]; 
	ld	hl, #0x000f
	add	hl,bc
	ld	-7 (ix), l
	ld	-6 (ix), h
;src/render.c:213: entities[i].sprite_f3 = (u8*) &G_fire_f2[0];
	ld	hl, #0x0011
	add	hl,bc
	ld	-9 (ix), l
	ld	-8 (ix), h
;src/render.c:208: if((u16) entities[i].sprite_f1 == (u16) G_fire_f1) {
	ld	hl, #0x000d
	add	hl,bc
	ex	de,hl
;src/render.c:207: if (entities[i].id == 10 && entities[i].data1 == 0) {
	ld	a, -1 (ix)
	sub	a, #0x0a
	jp	NZ,00144$
	ld	hl, #0x0009
	add	hl,bc
	ld	-11 (ix), l
	ld	-10 (ix), h
	ld	a, (hl)
	or	a, a
	jp	NZ, 00144$
;src/render.c:208: if((u16) entities[i].sprite_f1 == (u16) G_fire_f1) {
	ld	l, e
	ld	h, d
	ld	a, (hl)
	inc	hl
	ld	h, (hl)
	ld	-13 (ix), a
	ld	-12 (ix), h
	ld	-15 (ix), #<(_G_fire_f1)
	ld	-14 (ix), #>(_G_fire_f1)
	ld	a, -13 (ix)
	sub	a, -15 (ix)
	jr	NZ,00141$
	ld	a, -12 (ix)
	sub	a, -14 (ix)
	jr	NZ,00141$
;src/render.c:209: entities[i].y = 136;
	ld	l,-3 (ix)
	ld	h,-2 (ix)
	ld	(hl), #0x88
;src/render.c:210: entities[i].height = 16;
	ld	l,-5 (ix)
	ld	h,-4 (ix)
	ld	(hl), #0x10
;src/render.c:211: entities[i].sprite_f1 = (u8*) &G_fire_f2[0]; 
	ld	l, e
	ld	h, d
	ld	(hl), #<(_G_fire_f2)
	inc	hl
	ld	(hl), #>(_G_fire_f2)
;src/render.c:212: entities[i].sprite_f2 = (u8*) &G_fire_f2[0]; 
	ld	l,-7 (ix)
	ld	h,-6 (ix)
	ld	(hl), #<(_G_fire_f2)
	inc	hl
	ld	(hl), #>(_G_fire_f2)
;src/render.c:213: entities[i].sprite_f3 = (u8*) &G_fire_f2[0];
	ld	l,-9 (ix)
	ld	h,-8 (ix)
	ld	(hl), #<(_G_fire_f2)
	inc	hl
	ld	(hl), #>(_G_fire_f2)
	jr	00142$
00141$:
;src/render.c:215: entities[i].y = 144;
	ld	l,-3 (ix)
	ld	h,-2 (ix)
	ld	(hl), #0x90
;src/render.c:216: entities[i].height = 8;
	ld	l,-5 (ix)
	ld	h,-4 (ix)
	ld	(hl), #0x08
;src/render.c:217: entities[i].sprite_f1 = (u8*) &G_fire_f1[0]; 
	ld	l, e
	ld	h, d
	ld	(hl), #<(_G_fire_f1)
	inc	hl
	ld	(hl), #>(_G_fire_f1)
;src/render.c:218: entities[i].sprite_f2 = (u8*) &G_fire_f1[0]; 
	ld	l,-7 (ix)
	ld	h,-6 (ix)
	ld	(hl), #<(_G_fire_f1)
	inc	hl
	ld	(hl), #>(_G_fire_f1)
;src/render.c:219: entities[i].sprite_f3 = (u8*) &G_fire_f1[0];
	ld	l,-9 (ix)
	ld	h,-8 (ix)
	ld	(hl), #<(_G_fire_f1)
	inc	hl
	ld	(hl), #>(_G_fire_f1)
00142$:
;src/render.c:221: entities[i].data1 = 10 + (cpct_rand() % 10);
	push	bc
	push	de
	call	_cpct_getRandom_mxor_u8
	ld	h, l
	ld	a, #0x0a
	push	af
	inc	sp
	push	hl
	inc	sp
	call	__moduchar
	pop	af
	pop	de
	pop	bc
	ld	a, l
	add	a, #0x0a
	ld	l,-11 (ix)
	ld	h,-10 (ix)
	ld	(hl), a
00144$:
;src/render.c:224: sprite = entities[i].sprite_f1;
	ld	a, (de)
	ld	-15 (ix), a
	inc	de
	ld	a, (de)
	ld	-14 (ix), a
	ld	e,-15 (ix)
	ld	d,-14 (ix)
;src/render.c:225: if (frame > 6) {  //Cada 7 pasos se cambia el sprite
	ld	a, #0x06
	ld	iy, #_frame
	sub	a, 0 (iy)
	jr	NC,00147$
;src/render.c:226: sprite = entities[i].sprite_f2;
	ld	l,-7 (ix)
	ld	h,-6 (ix)
	ld	e, (hl)
	inc	hl
	ld	d, (hl)
00147$:
;src/render.c:228: if (frame > 13) {  //Cada 7 pasos se cambia el sprite
	ld	a, #0x0d
	ld	iy, #_frame
	sub	a, 0 (iy)
	jr	NC,00149$
;src/render.c:229: sprite = entities[i].sprite_f3;
	ld	l,-9 (ix)
	ld	h,-8 (ix)
	ld	e, (hl)
	inc	hl
	ld	d, (hl)
00149$:
;src/render.c:231: if (frame > 20) {  //Cada 7 pasos se cambia el sprite
	ld	a, #0x14
	ld	iy, #_frame
	sub	a, 0 (iy)
	jr	NC,00151$
;src/render.c:232: sprite = entities[i].sprite_f2;
	ld	l,-7 (ix)
	ld	h,-6 (ix)
	ld	e, (hl)
	inc	hl
	ld	d, (hl)
00151$:
;src/render.c:235: if (i == 0) { //Animación especial para el protagonista cada 3 frames cambia y vuelve a f1
	ld	a, -19 (ix)
	or	a, a
	jr	NZ,00157$
;src/render.c:236: frame_char = frame % 9;
	push	bc
	ld	a, #0x09
	push	af
	inc	sp
	ld	a, (_frame)
	push	af
	inc	sp
	call	__moduchar
	pop	af
	pop	bc
	ld	-17 (ix), l
;src/render.c:237: sprite = entities[i].sprite_f1;
	ld	e,-15 (ix)
	ld	d,-14 (ix)
;src/render.c:238: if (frame_char > 2) {  
	ld	a, #0x02
	sub	a, -17 (ix)
	jr	NC,00153$
;src/render.c:239: sprite = entities[i].sprite_f2;
	ld	l,-7 (ix)
	ld	h,-6 (ix)
	ld	e, (hl)
	inc	hl
	ld	d, (hl)
00153$:
;src/render.c:241: if (frame_char > 5) {  
	ld	a, #0x05
	sub	a, -17 (ix)
	jr	NC,00157$
;src/render.c:242: sprite = entities[i].sprite_f3;
	ld	l,-9 (ix)
	ld	h,-8 (ix)
	ld	e, (hl)
	inc	hl
	ld	d, (hl)
00157$:
;src/render.c:246: if (entities[i].id < 240) 
	ld	a, (bc)
	ld	-15 (ix), a
;src/render.c:247: cpct_drawSpriteMasked (sprite, cpct_getScreenPtr (CPCT_VMEM_START, entities[i].x, entities[i].y), entities[i].width, entities[i].height);
	push	bc
	pop	iy
	ld	hl, #0x0001
	add	hl,bc
	ld	-13 (ix), l
	ld	-12 (ix), h
	ld	-11 (ix), e
	ld	-10 (ix), d
	ld	l,-5 (ix)
	ld	h,-4 (ix)
	ld	a, (hl)
	ld	-9 (ix), a
	ld	a, 8 (iy)
	ld	-7 (ix), a
	ld	l,-3 (ix)
	ld	h,-2 (ix)
	ld	e, (hl)
	ld	l,-13 (ix)
	ld	h,-12 (ix)
	ld	d, (hl)
;src/render.c:246: if (entities[i].id < 240) 
	ld	a, -15 (ix)
	sub	a, #0xf0
	jr	NC,00159$
;src/render.c:247: cpct_drawSpriteMasked (sprite, cpct_getScreenPtr (CPCT_VMEM_START, entities[i].x, entities[i].y), entities[i].width, entities[i].height);
	push	bc
	ld	a, e
	push	af
	inc	sp
	push	de
	inc	sp
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ex	de,hl
	ld	h, -9 (ix)
	ld	l, -7 (ix)
	push	hl
	push	de
	ld	l,-11 (ix)
	ld	h,-10 (ix)
	push	hl
	call	_cpct_drawSpriteMasked
	pop	bc
	jr	00160$
00159$:
;src/render.c:249: cpct_drawSprite (sprite, cpct_getScreenPtr (CPCT_VMEM_START, entities[i].x, entities[i].y), entities[i].width, entities[i].height);
	push	bc
	ld	a, e
	push	af
	inc	sp
	push	de
	inc	sp
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	ex	de,hl
	ld	h, -9 (ix)
	ld	l, -7 (ix)
	push	hl
	push	de
	ld	l,-11 (ix)
	ld	h,-10 (ix)
	push	hl
	call	_cpct_drawSprite
	pop	bc
00160$:
;src/render.c:251: entities[i].x0 = entities[i].x;
	ld	hl, #0x0005
	add	hl,bc
	ex	de,hl
	ld	l,-13 (ix)
	ld	h,-12 (ix)
	ld	a, (hl)
	ld	(de), a
;src/render.c:252: entities[i].y0 = entities[i].y;
	ld	hl, #0x0006
	add	hl,bc
	ld	c, l
	ld	b, h
	ld	l,-3 (ix)
	ld	h,-2 (ix)
	ld	a, (hl)
	ld	(bc), a
00168$:
;src/render.c:203: for (i = start; i != end; i = i + next) { 
	ld	a, -19 (ix)
	add	a, -16 (ix)
	ld	-19 (ix), a
	jp	00167$
00163$:
;src/render.c:256: frame++;
	ld	iy, #_frame
	inc	0 (iy)
;src/render.c:258: if (frame == 28)
	ld	a, 0 (iy)
	sub	a, #0x1c
	jr	NZ,00169$
;src/render.c:259: frame = 0;
	ld	0 (iy), #0x00
00169$:
	ld	sp, ix
	pop	ix
	ret
;src/render.c:264: void renderText(){
;	---------------------------------
; Function renderText
; ---------------------------------
_renderText::
;src/render.c:265: if (possibleActivity < ID_SPECIAL_MSG && textPrinted != 1) { // No volver a pintar, si el texto pintado en el frame anterior fue de este tipo (1, textos normales)
	ld	a,(#_possibleActivity + 0)
	sub	a, #0x3e
	jr	NC,00102$
	ld	a,(#_textPrinted + 0)
	dec	a
	jr	Z,00102$
;src/render.c:266: mydrawStringM1(txt_act, cpctm_screenPtr(CPCT_VMEM_START, 0, 192));
	ld	hl, #0xc780
	push	hl
	ld	hl, #_txt_act
	push	hl
	call	_mydrawStringM1
;src/render.c:267: mydrawStringM1(&txt_act0_0[0] + (possibleActivity*16), cpctm_screenPtr(CPCT_VMEM_START, 28, 192));
	ld	bc, #_txt_act0_0+0
	ld	iy, #_possibleActivity
	ld	l, 0 (iy)
	ld	h, #0x00
	add	hl, hl
	add	hl, hl
	add	hl, hl
	add	hl, hl
	add	hl, bc
	ld	bc, #0xc79c
	push	bc
	push	hl
	call	_mydrawStringM1
;src/render.c:269: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 58, 192), 0, 20, 8);
	ld	hl, #0x0814
	push	hl
	ld	hl, #0x0000
	push	hl
	ld	hl, #0xc7ba
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:271: textPrinted = 1;
	ld	hl,#_textPrinted + 0
	ld	(hl), #0x01
00102$:
;src/render.c:274: if (possibleActivity == 255) {
	ld	a,(#_possibleActivity + 0)
	inc	a
	ret	NZ
;src/render.c:275: if (hintText != 0 && hintTextTime ) {
	ld	a,(#_hintText + 0)
	or	a, a
	jr	Z,00109$
	ld	a,(#_hintTextTime + 0)
	or	a, a
	jr	Z,00109$
;src/render.c:276: if (!textPrinted) {
	ld	a,(#_textPrinted + 0)
	or	a, a
	jr	NZ,00105$
;src/render.c:277: mydrawStringM1(&txt_special_00[0] + ((hintText-ID_SPECIAL_MSG)*40), cpctm_screenPtr(CPCT_VMEM_START, 0, 192));
	ld	bc, #_txt_special_00+0
	ld	a,(#_hintText + 0)
	ld	d, #0x00
	add	a, #0xc2
	ld	e, a
	ld	a, d
	adc	a, #0xff
	ld	d, a
	ld	l, e
	ld	h, d
	add	hl, hl
	add	hl, hl
	add	hl, de
	add	hl, hl
	add	hl, hl
	add	hl, hl
	add	hl, bc
	ld	bc, #0xc780
	push	bc
	push	hl
	call	_mydrawStringM1
;src/render.c:278: textPrinted = 2; //Para que no se vuelva a pintar, pero para que tampoco se borre
	ld	hl,#_textPrinted + 0
	ld	(hl), #0x02
00105$:
;src/render.c:281: hintTextTime--;
	ld	iy, #_hintTextTime
	dec	0 (iy)
;src/render.c:282: if (!hintTextTime) { //se acabó el tiempo que tenía que estar en pantalla, marcar para borrado
	ld	a, 0 (iy)
	or	a, a
	jr	NZ,00109$
;src/render.c:289: hintText = 0;
	ld	hl,#_hintText + 0
	ld	(hl), #0x00
;src/render.c:290: textPrinted = 1;
	ld	hl,#_textPrinted + 0
	ld	(hl), #0x01
;src/render.c:291: possibleActivity = 255;
	ld	hl,#_possibleActivity + 0
	ld	(hl), #0xff
00109$:
;src/render.c:295: if (textPrinted == 1) { // No hay actividad. Borrar posible texto anterior
	ld	a,(#_textPrinted + 0)
	dec	a
	ret	NZ
;src/render.c:296: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START, 0, 192), 0, 64, 8);
	ld	hl, #0x0840
	push	hl
	ld	hl, #0x0000
	push	hl
	ld	hl, #0xc780
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:297: cpct_drawSolidBox (cpctm_screenPtr (CPCT_VMEM_START,64, 192), 0, 16, 8);
	ld	hl, #0x0810
	push	hl
	ld	hl, #0x0000
	push	hl
	ld	hl, #0xc7c0
	push	hl
	call	_cpct_drawSolidBox
;src/render.c:298: textPrinted = 0;
	ld	hl,#_textPrinted + 0
	ld	(hl), #0x00
	ret
;src/render.c:303: void render(){
;	---------------------------------
; Function render
; ---------------------------------
_render::
;src/render.c:305: renderDelete(); //Pintado-Borrar
	call	_renderDelete
;src/render.c:307: renderSprites(); //Pintado-Pintar
	call	_renderSprites
;src/render.c:309: if (reset_face > 0){
	ld	iy, #_reset_face
	ld	a, 0 (iy)
	or	a, a
	ret	Z
;src/render.c:310: reset_face--;
	dec	0 (iy)
;src/render.c:311: if (!reset_face)
	ld	a, 0 (iy)
	or	a, a
	ret	NZ
;src/render.c:312: renderFace(0);
	xor	a, a
	push	af
	inc	sp
	call	_renderFace
	inc	sp
	ret
;src/render.c:320: void renderScore(u8 score){
;	---------------------------------
; Function renderScore
; ---------------------------------
_renderScore::
	call	___sdcc_enter_ix
	push	af
	push	af
	dec	sp
;src/render.c:323: txt_score[0] = 43;
	ld	hl, #0x0000
	add	hl, sp
	ld	c,l
	ld	b,h
	ld	(hl),#0x2b
;src/render.c:324: if (score < 127) {
	ld	a, 4 (ix)
	sub	a, #0x7f
	jr	NC,00102$
;src/render.c:325: txt_score[0] = 45; 
	ld	a, #0x2d
	ld	(bc), a
00102$:
;src/render.c:328: txt_score[1] = 48 + (abs(score - 127)) / 100; //48 es el carácter para 0
	ld	l, c
	ld	h, b
	inc	hl
	ld	a, 4 (ix)
	add	a, #0x81
	ld	d, a
	push	hl
	push	bc
	push	de
	push	de
	inc	sp
	call	_abs
	inc	sp
	ld	e, l
	pop	af
	ld	d, a
	push	de
	ld	d,#0x64
	push	de
	call	__divuchar
	pop	af
	ld	a, l
	pop	de
	pop	bc
	pop	hl
	add	a, #0x30
	ld	(hl), a
;src/render.c:329: txt_score[2] = 48 + (abs(score - 127) % 100) / 10;
	ld	hl, #0x0002
	add	hl,bc
	ld	e, l
	push	hl
	push	bc
	push	de
	push	de
	inc	sp
	call	_abs
	inc	sp
	pop	de
	pop	bc
	pop	af
	ld	h, a
	push	hl
	push	bc
	push	de
	ld	a, #0x64
	push	af
	inc	sp
	ld	a, l
	push	af
	inc	sp
	call	__moduchar
	pop	af
	pop	de
	pop	bc
	pop	af
	ld	h, a
	push	hl
	push	bc
	push	de
	ld	a, #0x0a
	push	af
	inc	sp
	ld	a, l
	push	af
	inc	sp
	call	__divuchar
	pop	af
	ld	a, l
	pop	de
	pop	bc
	pop	hl
	add	a, #0x30
	ld	l, e
	ld	(hl), a
;src/render.c:330: txt_score[3] = 48 + (abs(score - 127)) % 10;
	ld	l, c
	ld	h, b
	inc	hl
	inc	hl
	inc	hl
	push	hl
	push	bc
	push	de
	inc	sp
	call	_abs
	inc	sp
	ld	d, l
	ld	a, #0x0a
	push	af
	inc	sp
	push	de
	inc	sp
	call	__moduchar
	pop	af
	ld	a, l
	pop	bc
	pop	hl
	add	a, #0x30
	ld	(hl), a
;src/render.c:331: txt_score[4] = 0;
	ld	hl, #0x0004
	add	hl, bc
	ld	(hl), #0x00
;src/render.c:332: mydrawStringM1(txt_score, cpctm_screenPtr(CPCT_VMEM_START, 23, 192));
	ld	hl, #0xc797
	push	hl
	push	bc
	call	_mydrawStringM1
	ld	sp, ix
	pop	ix
	ret
;src/render.c:336: void renderScoreboard() {
;	---------------------------------
; Function renderScoreboard
; ---------------------------------
_renderScoreboard::
;src/render.c:337: renderWeek();
	call	_renderWeek
;src/render.c:338: renderClock();
	call	_renderClock
;src/render.c:339: renderHour();
	call	_renderHour
;src/render.c:340: renderEnergy();
	call	_renderEnergy
;src/render.c:341: renderFace(0);
	xor	a, a
	push	af
	inc	sp
	call	_renderFace
	inc	sp
;src/render.c:344: cpct_drawSprite (&G_item[0], cpctm_screenPtr (CPCT_VMEM_START, 72, 120), 8, 8);
	ld	hl, #0x0808
	push	hl
	ld	hl, #0xc4f8
	push	hl
	ld	hl, #_G_item
	push	hl
	call	_cpct_drawSprite
;src/render.c:346: renderItem();
	call	_renderItem
	ret
	.area _CODE
	.area _INITIALIZER
	.area _CABS (ABS)
