;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 3.6.8 #9946 (CYGWIN)
;--------------------------------------------------------
	.module functions
	.optsdcc -mz80
	
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
	.globl _cutreZoomModo0
	.globl _showMessage
	.globl _swipeScreen
	.globl _fade
	.globl _updateEnergy
	.globl _updatePalette
	.globl _clearScreens
	.globl _typeOfTile
	.globl _tileValue
	.globl _tileCell
	.globl _sizeString
	.globl _pressedFire
	.globl _pressedRight
	.globl _pressedLeft
	.globl _pressedUp
	.globl _pausaTeclado
	.globl _pausaTecladoLibre
	.globl _pausa
	.globl _numToCharacter
	.globl _maximo
	.globl _abs
	.globl _renderFace
	.globl _renderEnergy
	.globl _cpct_setCRTCReg
	.globl _cpct_getScreenPtr
	.globl _cpct_getHWColour
	.globl _cpct_setPalette
	.globl _cpct_isAnyKeyPressed_f
	.globl _cpct_isKeyPressed
	.globl _cpct_memcpy
	.globl _cpct_memset
;--------------------------------------------------------
; 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/functions.c:7: u8 abs (i8 valor){
;	---------------------------------
; Function abs
; ---------------------------------
_abs::
;src/functions.c:8: return (valor > 0 ? valor : -valor);
	xor	a, a
	ld	iy, #2
	add	iy, sp
	sub	a, 0 (iy)
	jp	PO, 00109$
	xor	a, #0x80
00109$:
	jp	P, 00103$
	ld	iy, #2
	add	iy, sp
	ld	l, 0 (iy)
	ret
00103$:
	xor	a, a
	ld	iy, #2
	add	iy, sp
	sub	a, 0 (iy)
	ld	l, a
	ret
;src/functions.c:11: u8 maximo (u8 punto1, u8 punto2) {
;	---------------------------------
; Function maximo
; ---------------------------------
_maximo::
;src/functions.c:12: return (punto1 > punto2 ? punto1 : punto2);
	ld	hl, #3
	add	hl, sp
	ld	a, (hl)
	ld	iy, #2
	add	iy, sp
	sub	a, 0 (iy)
	jr	NC,00103$
	ld	l, 0 (iy)
	ret
00103$:
	ld	iy, #3
	add	iy, sp
	ld	l, 0 (iy)
	ret
;src/functions.c:15: u8 numToCharacter(u8 value) {
;	---------------------------------
; Function numToCharacter
; ---------------------------------
_numToCharacter::
;src/functions.c:16: return 48 + value; //48 es el carácter para 0
	ld	hl, #2+0
	add	hl, sp
	ld	a, (hl)
	add	a, #0x30
	ld	l, a
	ret
;src/functions.c:19: void pausa(u16 ciclos) {
;	---------------------------------
; Function pausa
; ---------------------------------
_pausa::
;src/functions.c:22: for (i = 0; i < ciclos; i++)
	ld	bc, #0x0000
00103$:
	ld	hl, #2
	add	hl, sp
	ld	a, c
	sub	a, (hl)
	ld	a, b
	inc	hl
	sbc	a, (hl)
	ret	NC
	inc	bc
	jr	00103$
;src/functions.c:26: void pausaTecladoLibre(){
;	---------------------------------
; Function pausaTecladoLibre
; ---------------------------------
_pausaTecladoLibre::
;src/functions.c:27: while (cpct_isAnyKeyPressed_f ()) { //Asegurarnos que se ha dejado de pulsar la tecla anterior 
00101$:
	call	_cpct_isAnyKeyPressed_f
	ld	a, l
	or	a, a
	jr	NZ,00101$
	ret
;src/functions.c:33: void pausaTeclado(){
;	---------------------------------
; Function pausaTeclado
; ---------------------------------
_pausaTeclado::
;src/functions.c:34: pausaTecladoLibre();
	call	_pausaTecladoLibre
;src/functions.c:35: while (!cpct_isAnyKeyPressed_f())
00101$:
	call	_cpct_isAnyKeyPressed_f
	ld	a, l
	or	a, a
	jr	Z,00101$
	ret
;src/functions.c:40: u8 pressedUp() {
;	---------------------------------
; Function pressedUp
; ---------------------------------
_pressedUp::
;src/functions.c:41: return (cpct_isKeyPressed(Key_Q) || cpct_isKeyPressed(Key_CursorUp) 
	ld	hl, #0x0808
	call	_cpct_isKeyPressed
	ld	a, l
	or	a, a
	jr	NZ,00104$
	ld	hl, #0x0100
	call	_cpct_isKeyPressed
	ld	a, l
	or	a, a
	jr	NZ,00104$
;src/functions.c:42: || ((!using2ndbtn && cpct_isKeyPressed(Joy0_Up)) || (using2ndbtn && cpct_isKeyPressed(Joy0_Fire2))));
	ld	a,(#_using2ndbtn + 0)
	or	a, a
	jr	NZ,00114$
	ld	hl, #0x0109
	call	_cpct_isKeyPressed
	ld	a, l
	or	a, a
	jr	NZ,00104$
00114$:
	ld	a,(#_using2ndbtn + 0)
	or	a, a
	jr	Z,00103$
	ld	hl, #0x2009
	call	_cpct_isKeyPressed
	ld	a, l
	or	a, a
	jr	NZ,00104$
00103$:
	ld	l, #0x00
	ret
00104$:
	ld	l, #0x01
	ret
;src/functions.c:49: u8 pressedLeft() {
;	---------------------------------
; Function pressedLeft
; ---------------------------------
_pressedLeft::
;src/functions.c:50: return (cpct_isKeyPressed(Key_O) || cpct_isKeyPressed(Key_CursorLeft) || cpct_isKeyPressed(Joy0_Left));
	ld	hl, #0x0404
	call	_cpct_isKeyPressed
	ld	a, l
	or	a, a
	jr	NZ,00104$
	ld	hl, #0x0101
	call	_cpct_isKeyPressed
	ld	a, l
	or	a, a
	jr	NZ,00104$
	ld	hl, #0x0409
	call	_cpct_isKeyPressed
	ld	a, l
	or	a,a
	jr	NZ,00104$
	ld	l,a
	ret
00104$:
	ld	l, #0x01
	ret
;src/functions.c:53: u8 pressedRight() {
;	---------------------------------
; Function pressedRight
; ---------------------------------
_pressedRight::
;src/functions.c:54: return (cpct_isKeyPressed(Key_P) || cpct_isKeyPressed(Key_CursorRight) || cpct_isKeyPressed(Joy0_Right));
	ld	hl, #0x0803
	call	_cpct_isKeyPressed
	ld	a, l
	or	a, a
	jr	NZ,00104$
	ld	hl, #0x0200
	call	_cpct_isKeyPressed
	ld	a, l
	or	a, a
	jr	NZ,00104$
	ld	hl, #0x0809
	call	_cpct_isKeyPressed
	ld	a, l
	or	a,a
	jr	NZ,00104$
	ld	l,a
	ret
00104$:
	ld	l, #0x01
	ret
;src/functions.c:57: u8 pressedFire() {
;	---------------------------------
; Function pressedFire
; ---------------------------------
_pressedFire::
;src/functions.c:58: return (cpct_isKeyPressed(Key_Space) || cpct_isKeyPressed(Joy0_Fire1));
	ld	hl, #0x8005
	call	_cpct_isKeyPressed
	ld	a, l
	or	a, a
	jr	NZ,00104$
	ld	hl, #0x1009
	call	_cpct_isKeyPressed
	ld	a, l
	or	a,a
	jr	NZ,00104$
	ld	l,a
	ret
00104$:
	ld	l, #0x01
	ret
;src/functions.c:62: u8 sizeString(u8* string){
;	---------------------------------
; Function sizeString
; ---------------------------------
_sizeString::
;src/functions.c:66: while (*(string) != 0) {
	pop	de
	pop	bc
	push	bc
	push	de
	ld	e, #0x01
00101$:
	ld	a, (bc)
	or	a, a
	jr	Z,00103$
;src/functions.c:67: string++;
	inc	bc
;src/functions.c:68: i++;
	inc	e
	jr	00101$
00103$:
;src/functions.c:71: return i;
	ld	l, e
	ret
;src/functions.c:74: u16 tileCell(u8 x, u8 y) {
;	---------------------------------
; Function tileCell
; ---------------------------------
_tileCell::
	call	___sdcc_enter_ix
;src/functions.c:75: return (34*(y/4)) + (x/2);
	ld	c, 5 (ix)
	srl	c
	srl	c
	ld	b,#0x00
	ld	l, c
	ld	h, b
	add	hl, hl
	add	hl, hl
	add	hl, hl
	add	hl, hl
	add	hl, bc
	add	hl, hl
	ld	c, 4 (ix)
	srl	c
	ld	b, #0x00
	add	hl, bc
	pop	ix
	ret
;src/functions.c:78: u8 tileValue(u8 x, u8 y){
;	---------------------------------
; Function tileValue
; ---------------------------------
_tileValue::
	call	___sdcc_enter_ix
;src/functions.c:79: return (current_map[tileCell(x, y)]);
	ld	h, 5 (ix)
	ld	l, 4 (ix)
	push	hl
	call	_tileCell
	pop	af
	ld	de, #_current_map
	add	hl, de
	ld	l, (hl)
	pop	ix
	ret
;src/functions.c:82: u8 typeOfTile(u8 tile){
;	---------------------------------
; Function typeOfTile
; ---------------------------------
_typeOfTile::
;src/functions.c:84: if (tile <= MAX_TILES_PLATFORMS)
	ld	a, #0x0f
	ld	iy, #2
	add	iy, sp
	sub	a, 0 (iy)
	jr	C,00105$
;src/functions.c:85: return 1;
	ld	l, #0x01
	ret
00105$:
;src/functions.c:86: else if (tile <= MAX_TILES_SOLID)
	ld	a, #0x1f
	ld	iy, #2
	add	iy, sp
	sub	a, 0 (iy)
	jr	C,00102$
;src/functions.c:87: return 2;
	ld	l, #0x02
	ret
00102$:
;src/functions.c:89: return 0;
	ld	l, #0x00
	ret
;src/functions.c:92: void clearScreens(){
;	---------------------------------
; Function clearScreens
; ---------------------------------
_clearScreens::
;src/functions.c:93: cpct_memset ((u8*) 0xC000, 0x00, 0x4000);
	ld	hl, #0x4000
	push	hl
	xor	a, a
	push	af
	inc	sp
	ld	h, #0xc0
	push	hl
	call	_cpct_memset
	ret
;src/functions.c:96: void updatePalette(){
;	---------------------------------
; Function updatePalette
; ---------------------------------
_updatePalette::
;src/functions.c:97: cpct_memcpy (&current_palette[0],&paletteM0,16);
	ld	hl, #0x0010
	push	hl
	ld	hl, #_paletteM0
	push	hl
	ld	hl, #_current_palette
	push	hl
	call	_cpct_memcpy
;src/functions.c:98: cpct_setPalette(current_palette,16);
	ld	hl, #0x0010
	push	hl
	ld	hl, #_current_palette
	push	hl
	call	_cpct_setPalette
	ret
;src/functions.c:102: void updateEnergy (i8 new){
;	---------------------------------
; Function updateEnergy
; ---------------------------------
_updateEnergy::
	call	___sdcc_enter_ix
;src/functions.c:105: test = energy + new;
	ld	iy, #_energy
	ld	c, 0 (iy)
	ld	b, #0x00
	ld	l, 4 (ix)
	ld	a, 4 (ix)
	rla
	sbc	a, a
	ld	h, a
	add	hl, bc
;src/functions.c:107: if (test <0)
	bit	7, h
	jr	Z,00105$
;src/functions.c:108: energy = 0;
	ld	0 (iy), #0x00
	jr	00106$
00105$:
;src/functions.c:109: else if (test > 255) 
	ld	a, #0xff
	cp	a, l
	ld	a, #0x00
	sbc	a, h
	jp	PO, 00124$
	xor	a, #0x80
00124$:
	jp	P, 00102$
;src/functions.c:110: energy = 255;
	ld	hl,#_energy + 0
	ld	(hl), #0xff
	jr	00106$
00102$:
;src/functions.c:112: energy = test;
	ld	iy, #_energy
	ld	0 (iy), l
00106$:
;src/functions.c:115: if (new < 0)
	bit	7, 4 (ix)
	jr	Z,00108$
;src/functions.c:116: renderFace(1);
	ld	a, #0x01
	push	af
	inc	sp
	call	_renderFace
	inc	sp
	jr	00109$
00108$:
;src/functions.c:118: renderFace(2);
	ld	a, #0x02
	push	af
	inc	sp
	call	_renderFace
	inc	sp
00109$:
;src/functions.c:120: reset_face = 20;
	ld	hl,#_reset_face + 0
	ld	(hl), #0x14
;src/functions.c:123: renderEnergy();
	pop	ix
	jp	_renderEnergy
;src/functions.c:126: void fade(){
;	---------------------------------
; Function fade
; ---------------------------------
_fade::
;src/functions.c:130: for (i=26;i>0;i--){
	ld	c, #0x1a
;src/functions.c:131: for (j=1;j<16;j++){
00111$:
	ld	b, #0x01
00103$:
;src/functions.c:132: current_palette[j]=cpct_getHWColour (i);
	ld	a, #<(_current_palette)
	add	a, b
	ld	e, a
	ld	a, #>(_current_palette)
	adc	a, #0x00
	ld	d, a
	ld	l, c
	ld	h, #0x00
	push	bc
	push	de
	call	_cpct_getHWColour
	ld	a, l
	pop	de
	pop	bc
	ld	(de), a
;src/functions.c:131: for (j=1;j<16;j++){
	inc	b
	ld	a, b
	sub	a, #0x10
	jr	C,00103$
;src/functions.c:134: cpct_setPalette(current_palette,16);
	push	bc
	ld	hl, #0x0010
	push	hl
	ld	hl, #_current_palette
	push	hl
	call	_cpct_setPalette
	ld	hl, #0x0400
	push	hl
	call	_pausa
	pop	af
	pop	bc
;src/functions.c:130: for (i=26;i>0;i--){
	dec c
	jr	NZ,00111$
;src/functions.c:138: clearScreens();
	call	_clearScreens
;src/functions.c:139: updatePalette();
	call	_updatePalette
	ret
;src/functions.c:143: void swipeScreen (u8 V, u8 H) {
;	---------------------------------
; Function swipeScreen
; ---------------------------------
_swipeScreen::
	call	___sdcc_enter_ix
	push	af
	push	af
	push	af
;src/functions.c:153: i = 40;  //H es par
;src/functions.c:154: j = 25;  //V es par
	ld	bc,#0x1928
;src/functions.c:155: if (H & 0x01) 
	ld	a, 5 (ix)
	and	a, #0x01
	ld	-1 (ix), a
	or	a, a
	jr	Z,00102$
;src/functions.c:156: i = 0;  //H es impar
	ld	c, #0x00
00102$:
;src/functions.c:157: if (V & 0x01) 
	ld	a, 4 (ix)
	and	a, #0x01
	ld	-2 (ix), a
	or	a, a
	jr	Z,00142$
;src/functions.c:158: j = 0;  //V es impar
	ld	b, #0x00
;src/functions.c:160: do {
00142$:
	ld	a, #0x01
	sub	a, 5 (ix)
	ld	a, #0x00
	rla
	ld	-3 (ix), a
	ld	a, #0x01
	sub	a, 4 (ix)
	ld	a, #0x00
	rla
	ld	-4 (ix), a
	ld	a, 4 (ix)
	inc	a
	jr	NZ,00183$
	ld	a,#0x01
	jr	00184$
00183$:
	xor	a,a
00184$:
	ld	-5 (ix), a
	ld	a, 5 (ix)
	inc	a
	jr	NZ,00185$
	ld	a,#0x01
	jr	00186$
00185$:
	xor	a,a
00186$:
	ld	-6 (ix), a
00123$:
;src/functions.c:161: if (H != 255) {
	bit	0, -6 (ix)
	jr	NZ,00108$
;src/functions.c:162: cpct_setCRTCReg (1, i);   //Cambiar nº columnas por pantalla (1-40)
	push	bc
	ld	d, c
	ld	e,#0x01
	push	de
	call	_cpct_setCRTCReg
	pop	bc
;src/functions.c:163: if (H > 1)
	ld	a, -3 (ix)
	or	a, a
	jr	Z,00108$
;src/functions.c:164: cpct_setCRTCReg (2, i+6);   //Cambiar columna de inicio (1-40)
	ld	a, c
	add	a, #0x06
	ld	d, a
	push	bc
	ld	e, #0x02
	push	de
	call	_cpct_setCRTCReg
	pop	bc
00108$:
;src/functions.c:167: if (V != 255) {
	bit	0, -5 (ix)
	jr	NZ,00112$
;src/functions.c:168: cpct_setCRTCReg (6, j);   //Cambiar nº filas por pantalla (1-25)
	push	bc
	push	bc
	inc	sp
	ld	a, #0x06
	push	af
	inc	sp
	call	_cpct_setCRTCReg
	pop	bc
;src/functions.c:169: if (V > 1)
	ld	a, -4 (ix)
	or	a, a
	jr	Z,00112$
;src/functions.c:170: cpct_setCRTCReg (7, j+5);   //Cambiar fila de inicio 
	ld	a, b
	add	a, #0x05
	ld	d, a
	push	bc
	ld	e, #0x07
	push	de
	call	_cpct_setCRTCReg
	pop	bc
00112$:
;src/functions.c:173: for (k = 0; k < 1024; k++)
	ld	de, #0x0400
00128$:
	ex	de,hl
	dec	hl
	ld	e, l
	ld	a,h
	ld	d,a
	or	a,l
	jr	NZ,00128$
;src/functions.c:176: if (H & 0x01)  {
	ld	a, -1 (ix)
	or	a, a
	jr	Z,00115$
;src/functions.c:177: i++;
	inc	c
	jr	00116$
00115$:
;src/functions.c:179: i--; 
	dec	c
00116$:
;src/functions.c:182: if (V & 0x01)  {
	ld	a, -2 (ix)
	or	a, a
	jr	Z,00118$
;src/functions.c:183: j++;
	inc	b
	jr	00124$
00118$:
;src/functions.c:185: j--; 
	dec	b
00124$:
;src/functions.c:187: } while ((H != 255 && i <= 40)
	bit	0, -6 (ix)
	jr	NZ,00122$
	ld	a, #0x28
	sub	a, c
	jr	NC,00123$
00122$:
;src/functions.c:188: ||(V != 255 && j <= 25));
	bit	0, -5 (ix)
	jr	NZ,00129$
	ld	a, #0x19
	sub	a, b
	jr	NC,00123$
00129$:
	ld	sp, ix
	pop	ix
	ret
;src/functions.c:192: void showMessage(u8 id) {
;	---------------------------------
; Function showMessage
; ---------------------------------
_showMessage::
;src/functions.c:193: textPrinted = 0;
	ld	hl,#_textPrinted + 0
	ld	(hl), #0x00
;src/functions.c:194: hintText = id; 
	ld	hl, #2+0
	add	hl, sp
	ld	a, (hl)
	ld	(#_hintText + 0),a
;src/functions.c:195: hintTextTime = HINT_TIME_ON_SCREEN;  
	ld	hl,#_hintTextTime + 0
	ld	(hl), #0x80
	ret
;src/functions.c:198: void cutreZoomModo0 (void* sprite, u8 x, u8 y, u8 width, u8 height, u8 factor) {
;	---------------------------------
; Function cutreZoomModo0
; ---------------------------------
_cutreZoomModo0::
	call	___sdcc_enter_ix
	ld	hl, #-12
	add	hl, sp
	ld	sp, hl
;src/functions.c:210: xc = x + (width/2);
	ld	h, 8 (ix)
	srl	h
	ld	a, 6 (ix)
	add	a, h
	ld	d, a
;src/functions.c:211: yc = y + (height/2);
	ld	e, 9 (ix)
	srl	e
	ld	a, 7 (ix)
	add	a, e
	ld	c, a
;src/functions.c:214: x0 = xc - ((width/2) * factor);
	push	de
	ld	e, 10 (ix)
	ld	l, #0x00
	ld	d, l
	ld	b, #0x08
00176$:
	add	hl, hl
	jr	NC,00177$
	add	hl, de
00177$:
	djnz	00176$
	pop	de
	ld	a, d
	sub	a, l
	ld	-9 (ix), a
;src/functions.c:215: y0 = yc - ((height/2) * factor);
	ld	h, 10 (ix)
	ld	l, #0x00
	ld	d, l
	ld	b, #0x08
00178$:
	add	hl, hl
	jr	NC,00179$
	add	hl, de
00179$:
	djnz	00178$
	ld	a, c
	sub	a, l
	ld	-10 (ix), a
;src/functions.c:217: ptr = sprite;
	ld	c,4 (ix)
	ld	b,5 (ix)
;src/functions.c:218: pasos = 0;
	ld	-1 (ix), #0x00
;src/functions.c:221: for (i = 0; i < height; i++){
	ld	a, 10 (ix)
	srl	a
	ld	-2 (ix), a
	ld	a, 10 (ix)
	and	a, #0x01
	ld	-3 (ix), a
	ld	-11 (ix), #0x00
00124$:
	ld	a, -11 (ix)
	sub	a, 9 (ix)
	jp	NC, 00126$
;src/functions.c:222: for (j = 0; j < width; j++){
	push	bc
	ld	e, 10 (ix)
	ld	h, -11 (ix)
	ld	l, #0x00
	ld	d, l
	ld	b, #0x08
00180$:
	add	hl, hl
	jr	NC,00181$
	add	hl, de
00181$:
	djnz	00180$
	pop	bc
	ld	a, -10 (ix)
	add	a, l
	ld	-4 (ix), a
	ld	-12 (ix), #0x00
00121$:
	ld	a, -12 (ix)
	sub	a, 8 (ix)
	jp	NC, 00125$
;src/functions.c:223: for (k = 0; k < factor; k++){
	push	bc
	ld	e, 10 (ix)
	ld	h, -12 (ix)
	ld	l, #0x00
	ld	d, l
	ld	b, #0x08
00182$:
	add	hl, hl
	jr	NC,00183$
	add	hl, de
00183$:
	djnz	00182$
	pop	bc
	ld	a, -9 (ix)
	add	a, l
	ld	-5 (ix), a
	ld	-7 (ix), c
	ld	-6 (ix), b
	ld	a, -1 (ix)
	ld	-8 (ix), a
	ld	c, #0x00
00118$:
	ld	a, c
	sub	a, 10 (ix)
	jr	NC,00140$
;src/functions.c:231: color1 = *ptr;
	ld	l,-7 (ix)
	ld	h,-6 (ix)
	ld	b, (hl)
	ld	a, b
;src/functions.c:232: color1 = color1 & 0b10101010;
	and	a, #0xaa
	ld	e, a
;src/functions.c:234: color2 = color2 & 0b01010101;
	ld	a, b
	and	a, #0x55
	ld	d, a
;src/functions.c:240: if (k < (factor/2)) { 
	ld	a, c
	sub	a, -2 (ix)
	jr	NC,00106$
;src/functions.c:241: pixelFinal = color1 | (color1 >> 1);
	ld	a, e
	srl	a
	or	a, e
	ld	b, a
	jr	00134$
00106$:
;src/functions.c:242: } else if ((factor % 2) == 0 || (k > (factor/2))){
	ld	a, -3 (ix)
	or	a, a
	jr	Z,00101$
	ld	a, -2 (ix)
	sub	a, c
	jr	NC,00102$
00101$:
;src/functions.c:243: pixelFinal = color2 | (color2 << 1);
	ld	a, d
	add	a, a
	or	a, d
	ld	b, a
	jr	00134$
00102$:
;src/functions.c:245: pixelFinal = color1 | color2;
	ld	a, e
	or	a, d
	ld	b, a
;src/functions.c:249: for (l=0;l<factor;l++) {
00134$:
	ld	a, -5 (ix)
	add	a, c
	ld	d, a
	ld	e, #0x00
00115$:
	ld	a, e
	sub	a, 10 (ix)
	jr	NC,00108$
;src/functions.c:251: *(cpct_getScreenPtr (CPCT_VMEM_START, x0+(j*factor)+k,y0+(i*factor)+l)) = pixelFinal;
	ld	a, -4 (ix)
	add	a, e
	ld	h, a
	push	bc
	push	de
	ld	l, d
	push	hl
	ld	hl, #0xc000
	push	hl
	call	_cpct_getScreenPtr
	pop	de
	pop	bc
	ld	(hl), b
;src/functions.c:249: for (l=0;l<factor;l++) {
	inc	e
	jr	00115$
00108$:
;src/functions.c:254: pasos++;
	inc	-8 (ix)
;src/functions.c:255: if (pasos % factor == 0)
	push	bc
	ld	h, 10 (ix)
	ld	l, -8 (ix)
	push	hl
	call	__moduchar
	pop	af
	pop	bc
	ld	a, l
	or	a, a
	jr	NZ,00119$
;src/functions.c:256: ptr++;
	inc	-7 (ix)
	jr	NZ,00184$
	inc	-6 (ix)
00184$:
00119$:
;src/functions.c:223: for (k = 0; k < factor; k++){
	inc	c
	jp	00118$
00140$:
	ld	c,-7 (ix)
	ld	b,-6 (ix)
	ld	a, -8 (ix)
	ld	-1 (ix), a
;src/functions.c:222: for (j = 0; j < width; j++){
	inc	-12 (ix)
	jp	00121$
00125$:
;src/functions.c:221: for (i = 0; i < height; i++){
	inc	-11 (ix)
	jp	00124$
00126$:
	ld	sp, ix
	pop	ix
	ret
	.area _CODE
	.area _INITIALIZER
	.area _CABS (ABS)
