;;---------------------------------------------------------------------------------------------------------------
;#MIT License                                                                                                   #
;#Copyright (c) 2021 Cyb3rApes                                                                                  #
;#                                                                                                              #
;#Permission is hereby granted, free of charge, to any person obtaining a copy 					                #
;#of this software and associated documentation files (the "Software"), 					                    #
;#to deal in the Software without restriction, including without limitation the rights to use, copy, 		    #
;#modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 				            #
;#and to permit persons to whom the Software is furnished to do so, subject to the following conditions:	    #
;#														                                                        #
;#The above copyright notice and this permission notice shall be included in all copies or substantial 		    #
;#portions of the Software.											                                            #
;#														                                                        #
;#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 		    #
;#NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.	    #
;#IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,	    #
;#WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 		    #
;#SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.							                            #
;################################################################################################################

;#GPL License
;#This file is part of "The Capeture".
;#
;#"The Capeture" is free software: you can redistribute it and/or modify
;#it under the terms of the GNU General Public License as published by
;#the Free Software Foundation, either version 3 of the License, or
;#(at your option) any later version.
;#
;#"The Capeture"  is distributed in the hope that it will be useful,
;#but WITHOUT ANY WARRANTY; without even the implied warranty of
;#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;#GNU General Public License for more details.
;#
;#You should have received a copy of the GNU General Public License
;#along with "The Capeture".  If not, see https://www.gnu.org/licenses/.
;;----------------------------------------------------------------------------------------------------------------
.globl cpct_zx7b_decrunch_s_asm

;;
;; Puntero general del mapa
;;
man_level_map:: .ds 500
man_level_map_end = .-1
.globl _boss_end
.globl _arco_end
.globl _nivel1_end
.globl _nivel2_end
.globl _nivel3_end
.globl _nivel4_end
.globl _nivel5_end
.globl _nivel6_end
.globl _nivel7_end
.globl _nivel8_end
.globl _nivel9_end


man_init_level_boss::
    ld hl, #_boss_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret

man_init_level_arco::
    ld hl, #_arco_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret

man_init_level1::
    ld hl, #_nivel1_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret
;;    ld hl, #_level1
;;    ld de, #man_level_map
;;    ld bc, #0x01F4
;;    ldir
;;
;;    ret
;;
man_init_level2::
    ld hl, #_nivel2_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret
;;    ld hl, #_level2
;;    ld de, #man_level_map
;;    ld bc, #0x01F4
;;    ldir
;;
;;    ret
;;
man_init_level3::
    ld hl, #_nivel3_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret
;;    ld hl, #_level3
;;    ld de, #man_level_map
;;    ld bc, #0x01F4
;;    ldir
;;
;;    ret
man_init_level4::
    ld hl, #_nivel4_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret
man_init_level5::
    ld hl, #_nivel5_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret
man_init_level6::
    ld hl, #_nivel6_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret
man_init_level7::
    ld hl, #_nivel7_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret
man_init_level8::
    ld hl, #_nivel8_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret
man_init_level9::
    ld hl, #_nivel9_end
    ld de, #man_level_map_end
    call cpct_zx7b_decrunch_s_asm
    ret