;MIT License

;Copyright (c) 2021 Fedora Adventures Pixeltronics

;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.

.include "levels.h.s"
.include "entity.h.s"
.include "cpct_functions.h.s"

level:
    .db 1

platform1:
   .db #(e_cmps_platform)
   .db 0
   .db 8, 4, 0, 0, 0, 0
   .dw _fedora_bloques_0
   .db 0xC0, 0x00, 0, 0, 0   

platform2:
   .db #(e_cmps_platform)
   .db 0
   .db 8, 8, 0, 0, 0, 0
   .dw _fedora_bloques2
   .db 0xC0, 0x00, 0, 0, 0

platform3:
   .db #(e_cmps_platform)
   .db 0
   .db 8, 12, 0, 0, 0, 0
   .dw _fedora_bloques3
   .db 0xC0, 0x00, 0, 0, 0

platform4: 
   .db #(e_cmps_platform)
   .db 0
   .db 8, 16, 0, 0, 0, 0
   .dw _fedora_bloques4
   .db 0xC0, 0x00, 0, 0, 0

platform5:
   .db #(e_cmps_platform)
   .db 0
   .db 8, 20, 0, 0, 0, 0
   .dw _fedora_bloques5
   .db 0x00, 0xC0, 0, 0, 0

platform1_1:
   .db 0, 192

platform1_2: 
   .db 20, 192

platform1_3:
   .db 40, 192

platform1_4:
   .db 60, 192

platform1_5:
   .db 60, 184

platform1_6:
   .db 40, 184

platform1_7:
   .db 60, 176

platform1_8:
   .db 64, 168

platform1_9: 
   .db 68, 160

platform1_10:
   .db 70, 152

platform1_11:
   .db 16, 136

platform1_12:
   .db 40, 136

platform2_1:
   .db 68, 172   

platform2_2:
   .db 32, 148

platform2_3:
   .db 48, 124

platform2_4:
   .db 0, 116

platform2_5:
   .db 0, 96

platform2_6:
   .db 24, 80

platform2_7:
   .db 44, 80

platform2_8:
   .db 64, 80

platform2_9:
   .db 72, 60

platform2_10:
   .db 32, 48

platform2_11:
   .db 72, 32

platform2_12:
   .db 37, 17

platform3_1:
   .db 0, 192   

platform3_2:
   .db 20, 168

platform3_3:
   .db 0, 144

platform3_4:
   .db 20, 120

platform3_5:
   .db 0, 96

platform3_6:
   .db 20, 72

platform3_7:
   .db 64, 192

platform3_8:
   .db 64, 168

platform3_9:
   .db 64, 160

platform3_10:
   .db 64, 152

platform3_11:
   .db 64, 144

platform3_12:
   .db 72, 168

platform3_13:
   .db 64, 136

platform3_14:
   .db 32, 160

platform3_15:
   .db 32, 152

platform3_16:
   .db 32, 144

platform3_17:
   .db 32, 136

platform3_18:
   .db 32, 128

platform3_19:
   .db 32, 112

platform3_20:
   .db 32, 104

platform3_21:
   .db 32, 96

platform3_22:
   .db 32, 88

platform3_23:
   .db 32, 80

platform4_1:
   .db 60, 167   

platform4_2:
   .db 52, 120

platform4_3:
   .db 72, 144

platform4_4:
   .db 68, 96

platform4_6:
   .db 72, 16

platform4_7:
   .db 4, 168

platform4_8:
   .db 0, 144

platform4_9:
   .db 8, 120

platform4_10:
   .db 16, 95

platform4_11:
   .db 8, 71

platform4_12:
   .db 4, 49

platform4_13:
   .db 38, 27

platform4_14:
   .db 42, 19

platform4_15:
   .db 64, 27

platform5_1:
   .db 0, 120   

platform5_2:
   .db 40, 120

platform5_3:
   .db 60, 120

platform5_4:
   .db 4, 192

platform5_5:
   .db 24, 144

platform5_6:
   .db 28, 152

platform5_7:
   .db 44, 192

platform5_8:
   .db 72, 96

platform5_9:
   .db 50, 76

platform5_10:
   .db 28, 56

platform5_11:
   .db 0, 36

platform6_0:
   .db 0, 172

platform6_1:
   .db 12, 148   

platform6_2:
   .db 68, 149

platform6_3:
   .db 72, 125

platform6_4:
   .db 64, 101

platform6_5:
   .db 0, 102

platform6_6:
   .db 4, 78

platform6_7:
   .db 12, 54

platform6_8:
   .db 68, 54

platform7_1:
   .db 4, 76   

platform7_2:
   .db 8, 68

platform7_3:
   .db 8, 60

platform7_4:
   .db 8, 52

platform7_5:
   .db 8, 44

platform7_6:
   .db 8, 76

platform7_7:
   .db 8, 84

platform7_8:
   .db 8, 92

platform7_9:
   .db 8, 100

platform7_10:
   .db 8, 108

platform7_11:
   .db 21, 120

platform7_12:
   .db 44, 168

platform7_13:
   .db 64, 144

platform7_14:
   .db 64, 96

platform7_15:
   .db 44, 76

player_1: 
   .db #(e_cmps_alive | e_cmps_render | e_cmps_player)
   .db 0
   .db 12, 4, 0, 0, 24, 0
   .dw _fedora_sprites_00
   .db 0x00, 0xC0, 5, 5, 5
   .db 1, 180

player_2: 
   .db #(e_cmps_alive | e_cmps_render | e_cmps_player)
   .db 0
   .db 12, 4, 0, 0, 24, 0
   .dw _fedora_sprites_00
   .db 0x00, 0xC0, 5, 5, 5
   .db 0, 108

player_6: 
   .db #(e_cmps_alive | e_cmps_render | e_cmps_player)
   .db 0
   .db 12, 4,  0, 0, 24, 0
   .dw _fedora_sprites_00
   .db 0x00, 0xC0, 5, 5, 5  
   .db 1, 160

player_7: 
   .db #(e_cmps_alive | e_cmps_render | e_cmps_player)
   .db 0
   .db 12, 4, 0, 0, 24, 0
   .dw _fedora_sprites_00
   .db 0x00, 0xC0, 5, 5, 5     
   .db 4, 64

cmps_treasure = (e_cmps_alive | e_cmps_render)
treasure: 
   .db #cmps_treasure
   .db 0
   .db 9, 6, 0, 0, 20, 0
   .dw _fedora_diamante
   .db 0x00, 0xC0, 0, 0, 0
   .db 72, 141

treasure_2: 
   .db #cmps_treasure
   .db 0
   .db 9, 6, 0, 0, 20, 0
   .dw _fedora_diamante
   .db 0x00, 0xC0, 0, 0, 0
   .db 40, 70
treasure_3: 
   .db #cmps_treasure
   .db 0
   .db 9, 6, 0, 0, 20, 0
   .dw _fedora_diamante
   .db 0x00, 0xC0, 0, 0, 0       
   .db 68, 90

treasure_4: 
   .db #cmps_treasure
   .db 0
   .db 9, 6,  0, 0, 20, 0
   .dw _fedora_diamante
   .db 0x00, 0xC0, 0, 0, 0
   .db 10, 110

treasure_5: 
   .db #cmps_treasure
   .db 0
   .db 9, 6, 0, 0, 20, 0
   .dw _fedora_diamante
   .db 0x00, 0xC0, 0, 0, 0
   .db 8, 182

treasure_6: 
   .db #cmps_treasure
   .db 0
   .db 9, 6, 0, 0, 20, 0
   .dw _fedora_diamante
   .db 0x00, 0xC0, 0, 0, 0
   .db 40, 100

treasure_7: 
   .db #cmps_treasure
   .db 0
   .db 9, 6, 0, 0, 20, 0
   .dw _fedora_diamante
   .db 0x00, 0xC0, 0, 0, 0   
   .db 25, 107

cmps_door = (e_cmps_render)
door: 
   .db #cmps_door
   .db 0
   .db 12, 8, 22, 135, 1, 1
   .dw _fedora_puerta_0
   .db 0x00, 0xC0, 0, 0, 0
   .db 18, 124

door_2: 
   .db #cmps_door
   .db 0
   .db 12, 8, 41, 16, 1, 1
   .dw _fedora_puerta_0
   .db 0x00, 0xC0, 0, 0, 0
   .db 37, 5

door_3: 
   .db #cmps_door
   .db 0
   .db 12, 8, 76, 167, 1, 1
   .dw _fedora_puerta_0
   .db 0x00, 0xC0, 0, 0, 0  
   .db 72, 156

door_4: 
   .db #cmps_door
   .db 0
   .db 12, 8, 76, 15, 1, 1
   .dw _fedora_puerta_0
   .db 0x00, 0xC0, 0, 0, 0    
   .db 72, 4

door_5: 
   .db #cmps_door
   .db 0
   .db 12, 8, 4, 35, 1, 1
   .dw _fedora_puerta_0
   .db 0x00, 0xC0, 0, 0, 0
   .db 0, 24

door_6: 
   .db #cmps_door
   .db 0
   .db 12, 8, 74, 53, 1, 1
   .dw _fedora_puerta_0
   .db 0x00, 0xC0, 0, 0, 0
   .db 70, 42

door_7: 
   .db #cmps_door
   .db 0
   .db 12, 8, 16, 75, 1, 1
   .dw _fedora_puerta_0
   .db 0x00, 0xC0, 0, 0, 0
   .db 12, 64

;platform7_1:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 20, 4, 76, 0, 0, 20, 0
;    .dw _fedora_bloques5
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_2:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 8, 68, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_3:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 8, 60, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_4:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 8, 52, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_5:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 8, 44, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_6:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 8, 76, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_7:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 8, 84, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_8:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 8, 92, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_9:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 8, 100, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_10:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 8, 108, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_11:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 16, 21, 120, 0, 0, 20, 0
;    .dw _fedora_bloques4
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_12:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 44, 168, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_13:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 16, 64, 144, 0, 0, 20, 0
;    .dw _fedora_bloques4
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_14:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 16, 64, 96, 0, 0, 20, 0
;    .dw _fedora_bloques4
;    .db 0x00, 0xC0, 0, 0, 0
;
;platform7_15:
;    .db #(e_cmps_platform)
;    .db 0
;    .db 8, 4, 44, 76, 0, 0, 20, 0
;    .dw _fedora_bloques_0
;    .db 0x00, 0xC0, 0, 0, 0    
;
man_levels_get_level:
    ld hl, #level
    ld a, (hl)
ret

man_levels_reload_level: 

    cpctm_clearScreen_asm 0

    call man_entity_reset

    ld hl, #level
    ld a, (hl)
    cp #1
    jp z, man_levels_load_level_1
    cp #2
    jp z, man_levels_load_level_2
    cp #3
    jp z, man_levels_load_level_3
    cp #4
    jp z, man_levels_load_level_4
    cp #5
    jp z, man_levels_load_level_5
    cp #6
    jp z, man_levels_load_level_6
    cp #7
    jp z, man_levels_load_level_7
ret

man_levels_load_next_level:
    cpctm_clearScreen_asm 0

    call man_entity_reset

    ld hl, #level
    ld a, (hl)
    cp #1
    jp z, man_levels_load_level_2
    cp #2
    jp z, man_levels_load_level_3
    cp #3
    jp z, man_levels_load_level_4  
    cp #4
    jp z, man_levels_load_level_5
    cp #5
    jp z, man_levels_load_level_6
    cp #6
    jp z, man_levels_load_level_7
ret

man_levels_load_level_1:

    ld de, #_song_game
    call cpct_akp_musicInit_asm

    ld a, #1
    ld (level), a

   ld hl, #treasure
   call create_entity
   ld hl, #door
   call create_entity
    ld hl, #player_1
   call create_entity
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform1_1
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform1_2
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform1_3
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform1_4
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform1_5
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform1_6
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform1_7
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform1_8
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform1_9
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform1_10
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform1_11
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform1_12
   call create_entity_2
ret

man_levels_load_level_3:

   ld a, #3
   ld (level), a

   ld hl, #treasure_2
   call create_entity
   ld hl, #door_2
   call create_entity
   ld hl, #player_1
   call create_entity
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform1_1
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform1_3
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform2_1
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform2_2
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform2_3
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform2_4
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform2_5
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform2_6
   call create_entity_2  
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform2_7
   call create_entity_2 
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform2_8
   call create_entity_2               
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform2_9
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform2_10
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform2_11
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform2_12
   call create_entity_2
ret

man_levels_load_level_7:

   ld a, #7
   ld (level), a

   ld hl, #treasure_3
   call create_entity
   ld hl, #door_3
   call create_entity
   ld hl, #player_1
   call create_entity
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform3_1
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform3_2
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform3_3
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform3_4
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform3_5
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform3_6
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_7
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_8
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_9
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_10
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_11
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform3_12
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform3_13
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_14
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_15
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_16
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_17
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_18
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform3_19
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_20
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_21
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_22
   call create_entity_2       
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform3_23
   call create_entity_2    
ret 

man_levels_load_level_4:
   ld a, #4
   ld (level), a

   ld hl, #treasure_4
   call create_entity
   ld hl, #door_4
   call create_entity
   ld hl, #player_1
   call create_entity
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform3_1
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform4_1
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform4_2
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform4_3
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform4_4
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform4_6
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform4_7
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
    ld hl, #platform4_8
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
    ld hl, #platform4_9
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
    ld hl, #platform4_10
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
    ld hl, #platform4_11
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
    ld hl, #platform4_12
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
    ld hl, #platform4_13
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
    ld hl, #platform4_14
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
    ld hl, #platform4_15
    call create_entity_2
ret

man_levels_load_level_2:
   ld a, #2
   ld (level), a

   ld hl, #treasure_5
   call create_entity
   ld hl, #door_5
   call create_entity
   ld hl, #player_2
   call create_entity
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform5_1
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform5_2
   call create_entity_2
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform5_3
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform5_4
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform5_5
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform5_6
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform5_7
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform2_1
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform5_8
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform5_9
   call create_entity_2
   ld hl, #platform2
   call create_entity_1
   ld hl, #platform5_10
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform5_11
   call create_entity_2
ret

man_levels_load_level_6:
   ld a, #6
   ld (level), a

   ld hl, #treasure_6
   call create_entity
   ld hl, #door_6
   call create_entity
   ld hl, #player_6
   call create_entity
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform6_0
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform6_1
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform6_2
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform6_3
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform6_4
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform6_5
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform6_6
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform6_7
   call create_entity_2
   ld hl, #platform3
   call create_entity_1
   ld hl, #platform6_8
   call create_entity_2
ret

man_levels_load_level_5:
   ld a, #5
   ld (level), a

   ld hl, #treasure_7
   call create_entity
   ld hl, #door_7
   call create_entity
   ld hl, #player_7
   call create_entity
   ld hl, #platform5
   call create_entity_1
   ld hl, #platform7_1
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_2
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_3
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_4
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_5
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_6
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_7
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_8
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_9
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_10
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform7_11
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_12
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform7_13
   call create_entity_2
   ld hl, #platform4
   call create_entity_1
   ld hl, #platform7_14
   call create_entity_2
   ld hl, #platform1
   call create_entity_1
   ld hl, #platform7_15
   call create_entity_2
ret    