added vertical scrolling of the background for large maps

This commit is contained in:
Sylvain PILLOT 2023-01-31 23:07:32 +01:00
parent bc90a2d6c5
commit 7df7b70f5d
7 changed files with 144 additions and 66 deletions

View File

@ -15,12 +15,12 @@ find_package(LibProf 2.4 REQUIRED)
fxconv_declare_converters(assets-cg/converters.py)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_LIST_DIR}/assets-cg/Levels/Level1.json"
OUTPUT "${CMAKE_CURRENT_LIST_DIR}/assets-cg/Levels/Level2.json"
COMMENT "Convert Tiled TMX map to usable JSON file"
COMMAND tiled --export-tileset json Tileset_Space.tsx Tileset_Space.json
COMMAND find | grep .*.tmx | sed 's/.tmx//g' | xargs -l bash -c 'tiled --export-map json $$0.tmx $$0.json'
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/assets-cg/Levels/
DEPENDS assets-cg/Levels/Level1.tmx
DEPENDS assets-cg/Levels/Level2.tmx
assets-cg/converters.py
assets-cg/Levels/tileset.png
assets-cg/Levels/Tileset_Space.tsx)
@ -66,7 +66,7 @@ set(ASSETS_cg
assets-cg/Sprites/Enemies/Enemy_Red_Lvl1.png
assets-cg/Levels/tileset.png
assets-cg/Levels/Level1.json
assets-cg/Levels/Level2.json
# assets-cg/Levels/Tileset_Space.json
# ...
)

File diff suppressed because one or more lines are too long

View File

@ -1,40 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="90" height="14" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="1">
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="96" height="30" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="1">
<tileset firstgid="1" source="Tileset_Space.tsx"/>
<layer id="2" name="Background" width="90" height="14">
<layer id="2" name="Background" width="96" height="30">
<data encoding="csv">
0,0,0,0,1310,0,1310,0,0,0,0,1310,0,1310,1310,0,1310,1310,0,1310,0,0,0,0,1310,0,1310,0,0,1310,0,1310,0,0,0,0,1310,0,1310,0,0,0,0,759,760,759,760,759,760,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,2003,2003,2003,0,0,0,0,2003,2003,2003,2003,2003,2003,2003,2003,2003,0,0,0,0,2003,2003,2003,0,0,2003,2003,2003,0,0,0,0,2003,2003,2003,0,0,0,0,791,792,791,792,791,792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
834,842,0,0,919,77,921,0,0,0,0,0,852,661,724,0,0,919,77,921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,919,77,921,0,0,0,0,919,77,921,919,77,921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,810,0,0,919,77,921,601,601,877,0,691,630,819,0,0,0,919,77,921,0,820,0,0,0,0,0,0,691,692,693,694,691,692,693,694,919,77,921,0,601,0,601,919,77,921,919,77,921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
851,0,0,0,116,533,118,601,601,907,852,661,724,0,0,0,0,116,533,118,886,601,0,0,0,0,0,0,723,724,725,726,723,724,725,726,116,533,118,0,601,0,601,116,533,118,116,533,118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
627,628,629,630,308,213,310,601,0,629,630,819,0,0,0,0,0,308,213,310,627,628,0,0,0,0,0,0,627,628,629,630,627,628,629,630,308,213,310,0,601,0,0,308,213,310,308,213,310,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
659,660,661,662,919,77,921,601,852,661,662,0,0,0,0,0,0,919,77,921,659,660,0,0,0,0,0,0,659,660,661,662,659,660,661,662,919,77,921,0,601,0,0,919,77,921,919,77,921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
691,692,693,694,919,77,921,691,692,819,0,0,0,0,0,0,0,919,77,921,691,692,0,0,0,0,0,0,691,692,693,694,691,692,693,694,919,77,921,0,601,0,0,919,77,921,919,77,921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
723,724,725,726,116,533,118,723,724,0,0,0,0,0,0,0,0,919,77,921,723,724,0,0,0,0,0,0,723,724,725,726,723,724,725,726,116,533,118,0,601,0,0,116,533,118,116,533,118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
918,0,0,917,308,213,310,918,0,0,0,0,0,0,0,0,620,541,542,509,619,0,0,0,0,0,0,0,0,0,0,0,0,0,0,917,308,213,310,0,0,0,0,308,213,310,308,213,310,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,919,77,921,0,0,0,0,0,0,0,0,0,652,653,695,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,919,77,921,0,0,0,0,919,77,921,919,77,921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,919,77,921,0,0,0,0,0,0,0,0,811,0,0,727,0,0,810,0,0,0,0,0,0,0,0,0,0,0,0,0,0,919,77,921,0,0,0,0,919,77,921,919,77,921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1497,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,541,542,509,510,542,543,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,524,756,525,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,524,756,525,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,
918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,
0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,
0,0,0,0,885,915,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,
886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,
883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,
917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,
885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,
884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,
918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,
0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,
0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,915,883,886,
886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,
883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,
917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,884,918,0,0,0,0,
885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,
884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,
918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,
0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,
0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,
886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,
883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,
917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,884,918,0,0,0,0,917,883,915,918,0,0,0,0,917,883,915,918,0,0,0,0,
885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,915,883,886,0,0,0,0,885,884,883,886,0,0,0,0,885,884,883,886,0,0,0,0,
915,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,915,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,915,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,915,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,884,918,917,883,886,0,0,885,
918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,918,0,0,917,883,886,885,884,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer id="1" name="Foreground" width="90" height="14">
<layer id="1" name="Foreground" width="96" height="30">
<data encoding="csv">
866,1986,1991,1971,976,1011,977,1971,741,742,1971,976,1011,977,976,1011,977,976,1011,977,1971,741,742,1971,976,1011,977,0,0,976,1011,977,1971,741,742,1971,976,1011,977,1971,1991,0,1972,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
898,1986,1991,1974,1498,1497,1499,1973,773,774,1974,1498,1497,1499,1498,1497,1499,1498,1497,1499,1973,773,774,1974,1498,1497,1499,0,0,1498,1497,1499,1973,773,774,1974,1498,1497,1499,1973,1991,0,1972,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
899,2018,2023,2020,0,0,0,2002,2003,2003,2020,0,0,0,0,0,0,0,0,0,2002,2003,2003,2020,0,0,0,0,0,0,0,0,2002,2003,2003,2020,0,0,0,2002,2023,0,2004,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
612,908,874,877,0,0,0,908,874,0,0,0,0,0,0,0,876,0,0,0,0,601,627,628,691,692,693,694,0,0,0,0,0,0,601,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
644,0,908,907,0,0,0,0,908,0,877,0,0,0,0,843,875,0,0,0,0,0,659,660,723,724,725,726,0,0,0,0,0,0,601,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1398,569,855,908,907,842,0,0,843,875,810,0,0,1398,569,855,629,630,627,628,629,630,0,0,0,0,0,0,854,569,1398,0,265,569,569,0,855,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,908,874,842,843,875,810,0,0,0,0,0,0,661,662,659,660,661,662,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,601,0,0,0,811,907,875,810,0,0,0,0,0,0,0,693,694,691,692,693,694,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1398,855,0,0,0,0,0,0,0,0,0,0,0,0,0,0,725,726,723,724,725,726,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,810,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1398,569,855,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,852,0,0,0,0,0,842,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,265,819,0,0,0,811,265,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,37,38,6,38,39,0,0,0,0,0,0,0,0,0,0,265,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,38,6,38,39,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,535,503,408,504,537,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,535,503,408,504,537,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1954,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1956,741,742,741,742,1954,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1956,741,742,741,742,1954,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1956,741,742,741,742,1954,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1956,741,742,741,742,
1986,1987,1990,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,1989,1987,1988,773,774,773,774,1986,1987,1990,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,1989,1987,1988,773,774,773,774,1986,1987,1990,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,1989,1987,1988,773,774,773,774,1986,1987,1990,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,1989,1987,1988,773,774,773,774,
2018,2019,2020,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2018,2019,2020,1925,1926,1926,1927,2018,2019,2020,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2018,2019,2020,1925,1926,1926,1927,2018,2019,2020,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2018,2019,2020,1925,1926,1926,1927,2018,2019,2020,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2018,2019,2020,1925,1926,1926,1927,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,
0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,
0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,
0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,627,628,629,630,0,0,0,0,
659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,659,660,661,662,0,0,0,0,
691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,691,692,693,694,0,0,0,0,
723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,723,724,725,726,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1954,1955,1956,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1954,1955,1956,1925,1926,1926,1927,1954,1955,1956,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1954,1955,1956,1925,1926,1926,1927,1954,1955,1956,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1954,1955,1956,1925,1926,1926,1927,1954,1955,1956,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1954,1955,1956,1925,1926,1926,1927,
1986,1987,1958,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1957,1987,1988,741,742,741,742,1986,1987,1958,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1957,1987,1988,741,742,741,742,1986,1987,1958,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1957,1987,1988,741,742,741,742,1986,1987,1958,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1955,1957,1987,1988,741,742,741,742,
2018,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2020,773,774,773,774,2018,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2020,773,774,773,774,2018,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2020,773,774,773,774,2018,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2019,2020,773,774,773,774
</data>
</layer>
</map>

View File

@ -7,7 +7,7 @@
extern struct Map map_Level1;
extern struct Map map_Level2;
Background::Background( )
@ -22,47 +22,74 @@ Background::~Background( )
void Background::Render( void )
{
/* int x0 = (int) xlevel;
int shifttile = (int) (16*xlevel.frac());
int x0 = (int) xlevel;
int xshifttile = (int) (16*xlevel.frac());
int y0 = (int) ylevel;
int yshifttile = (int) (16*ylevel.frac());
for(int u=0; u<map_Level1.nblayers;u++)
for(int u=0; u<map_Level2.nblayers;u++)
for(int i=0; i<=25; i++)
{
for(int j=0; j<14; j++)
for(int j=0; j<=14; j++)
{
uint16_t index = j * map_Level1.w + (x0+i) % map_Level1.w;
uint16_t currentTile = map_Level1.layers[u][ index ];
uint16_t index = (j+y0) * map_Level2.w + (x0+i) % map_Level2.w;
uint16_t currentTile = map_Level2.layers[u][ index ];
if (currentTile!=0)
{
uint16_t xtile = ((currentTile % map_Level1.tileset_size)-1) * 16;
uint16_t ytile = (currentTile / map_Level1.tileset_size) * 16;
azrp_subimage_p8( i*16-shifttile, j*16, map_Level1.tileset, xtile, ytile, 16, 16, DIMAGE_NONE );
uint16_t xtile = ((currentTile % map_Level2.tileset_size)-1) * 16;
uint16_t ytile = (currentTile / map_Level2.tileset_size) * 16;
azrp_subimage_p8( i*16-xshifttile, j*16-yshifttile, map_Level2.tileset, xtile, ytile, 16, 16, DIMAGE_NONE );
}
}
}
*/
int x0 = (int) xlevel;
/* int x0 = (int) xlevel;
int shifttile = (int) (16*xlevel.frac());
uint16_t tilemap[25*14]={0};
for(int u=0; u<map_Level1.nblayers;u++)
for(int u=0; u<map_Level2.nblayers;u++)
{
for(int j=0; j<14; j++)
{
for(int i=0; i<=25; i++)
{
uint16_t index = j * map_Level1.w + (x0+i) % map_Level1.w;
tilemap[25*j+i]= cmap_Level1.layers[u][ index ];
uint16_t index = j * map_Level2.w + (x0+i) % map_Level2.w;
tilemap[25*j+i]= cmap_Level2.layers[u][ index ];
}
}
azrp_tilesmap( shifttile, tilemap, map_Level1.tileset, map_Level1.tileset_size);
azrp_tilesmap( shifttile, tilemap, map_Level2.tileset, map_Level2.tileset_size);
}
*/
}
void Background::Update( float dt )
{
libnum::num a = libnum::num( dt / 90000.0f); //18000.0f );
xlevel += a;
}
void Background::IncXCoordinate( libnum::num x )
{
xlevel += x ;
}
void Background::IncYCoordinate( libnum::num y )
{
ylevel += y ;
if (ylevel<0) ylevel=libnum::num(0);
if (ylevel>map_Level2.h-14) ylevel=libnum::num(map_Level2.h-14);
}
int Background::GetXCoordinate( void )
{
return (int) xlevel;
}
int Background::GetYCoordinate( void )
{
return (int) ylevel;
}

View File

@ -32,6 +32,12 @@ class Background
void Update( float dt );
void Render( );
void IncXCoordinate( libnum::num x );
void IncYCoordinate( libnum::num y );
int GetXCoordinate( void );
int GetYCoordinate( void );
private:
libnum::num xlevel, ylevel;

View File

@ -213,13 +213,12 @@ static void render( void )
#if(BIAS)
if (texttodraw>=1) Azur_draw_text(1,01, "FPS = %.0f", (float) (1000000.0f / elapsedTime) );
if (texttodraw>=1) Azur_draw_text(1,11, "Part.= %d - Bull.= %d", MyParticles.size(), MyPlayerBullets.size() );
if (texttodraw>=1 && !MyEnemies.empty()) Azur_draw_text(1,21, "Ennmy Life= %d", MyEnemies[0]->life );
//if (texttodraw>=1) Azur_draw_text(1,11, "Part.= %d - Bull.= %d", MyParticles.size(), MyPlayerBullets.size() );
//if (texttodraw>=1 && !MyEnemies.empty()) Azur_draw_text(1,21, "Ennmy Life= %d", MyEnemies[0]->life );
if (texttodraw>=2) Azur_draw_text(1,31, "Update = %.0f mc secs", (float) time_update );
if (texttodraw>=2) Azur_draw_text(1,41, "Render = %.0f mc secs", (float) time_render );
if (texttodraw>=2) Azur_draw_text(1,51, ">Total = %.3f ml secs", (float) elapsedTime / 1000.0f );
if (texttodraw>=2) Azur_draw_text(1,61, ">Total = %.0f seconds", (float) elapsedTime );
if (texttodraw>=2) Azur_draw_text(1,31, "Update = %.3f ms", (float) time_update / 1000.0f );
if (texttodraw>=2) Azur_draw_text(1,41, "Render = %.3f ms", (float) time_render / 1000.0f );
if (texttodraw>=2) Azur_draw_text(1,51, ">Total = %.0f ms", (float) elapsedTime / 1000.0f );
if (texttodraw>=3) Azur_draw_text(1,81, "Mem Used : %d", _uram_stats->used_memory + extram_stats->used_memory);
if (texttodraw>=3) Azur_draw_text(1,91, "Mem Free : %d", _uram_stats->free_memory + extram_stats->free_memory);

View File

@ -4,10 +4,12 @@
#include <num/num.h>
#include <gint/rtc.h>
#include <math.h>
#include "background.h"
extern bopti_image_t img_mainship1;
extern bopti_image_t img_Satellite_Lvl1;
extern Background MyBackground;
static int16_t cosTable[360], sinTable[360];
#define PI 3.141592
@ -178,6 +180,12 @@ void Player::Go_Up( float dt )
y -= a * libnum::num( speed );
this->Update( 0.0f );
}
if (y<azrp_height/4)
{
libnum::num a = libnum::num( -1.0f * dt / 90000.0f );
MyBackground.IncYCoordinate( a );
}
}
void Player::Go_Down( float dt )
@ -186,6 +194,12 @@ void Player::Go_Down( float dt )
{
libnum::num a = libnum::num( dt / 60000.0f );
y += a * libnum::num( speed );
this->Update( 0.0f );
this->Update( 0.0f );
}
if (y>3*azrp_height/4)
{
libnum::num a = libnum::num( dt / 90000.0f );
MyBackground.IncYCoordinate( a );
}
}