End of today - hope not final commit for CCJ2023
This commit is contained in:
parent
a174837a53
commit
6860168760
|
@ -0,0 +1,44 @@
|
|||
{ "compressionlevel":-1,
|
||||
"height":14,
|
||||
"infinite":false,
|
||||
"layers":[
|
||||
{
|
||||
"data":[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":14,
|
||||
"id":2,
|
||||
"name":"Foreground",
|
||||
"opacity":1,
|
||||
"type":"tilelayer",
|
||||
"visible":false,
|
||||
"width":25,
|
||||
"x":0,
|
||||
"y":0
|
||||
}],
|
||||
"nextlayerid":3,
|
||||
"nextobjectid":1,
|
||||
"orientation":"orthogonal",
|
||||
"renderorder":"right-down",
|
||||
"tiledversion":"1.8.0",
|
||||
"tileheight":16,
|
||||
"tilesets":[
|
||||
{
|
||||
"firstgid":1,
|
||||
"source":"tilesetnpp.tsx"
|
||||
}],
|
||||
"tilewidth":16,
|
||||
"type":"map",
|
||||
"version":"1.8",
|
||||
"width":25
|
||||
}
|
|
@ -19,7 +19,7 @@
|
|||
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="2" name="Foreground" width="25" height="14">
|
||||
<layer id="2" name="Foreground" width="25" height="14" visible="0">
|
||||
<data encoding="csv">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
{ "compressionlevel":-1,
|
||||
"height":14,
|
||||
"infinite":false,
|
||||
"layers":[
|
||||
{
|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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
|
||||
"height":14,
|
||||
"id":1,
|
||||
"name":"Background",
|
||||
"opacity":1,
|
||||
"type":"tilelayer",
|
||||
"visible":true,
|
||||
"width":25,
|
||||
"x":0,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 23, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 34, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 33, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 0, 0, 42, 0, 0, 0, 23, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":14,
|
||||
"id":2,
|
||||
"name":"Foreground",
|
||||
"opacity":1,
|
||||
"type":"tilelayer",
|
||||
"visible":true,
|
||||
"width":25,
|
||||
"x":0,
|
||||
"y":0
|
||||
}],
|
||||
"nextlayerid":4,
|
||||
"nextobjectid":3,
|
||||
"orientation":"orthogonal",
|
||||
"renderorder":"right-down",
|
||||
"tiledversion":"1.8.0",
|
||||
"tileheight":16,
|
||||
"tilesets":[
|
||||
{
|
||||
"firstgid":1,
|
||||
"source":"tilesetnpp.tsx"
|
||||
}],
|
||||
"tilewidth":16,
|
||||
"type":"map",
|
||||
"version":"1.8",
|
||||
"width":25
|
||||
}
|
|
@ -9,13 +9,13 @@
|
|||
2,0,0,14,2,2,13,0,0,0,0,0,0,0,0,0,0,0,14,2,2,13,0,0,2,
|
||||
2,0,0,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,0,0,2,
|
||||
2,0,0,2,2,2,2,0,0,0,17,18,2,15,16,0,0,0,2,2,2,2,0,0,2,
|
||||
2,1,0,2,2,2,2,0,0,0,2,2,2,2,2,0,0,0,2,2,2,2,0,0,2,
|
||||
2,0,0,2,2,2,2,0,0,0,2,3,1,4,2,0,0,0,2,2,2,2,0,0,2,
|
||||
2,0,0,2,2,2,2,13,0,14,2,1,0,1,2,13,0,14,2,2,2,2,0,0,2,
|
||||
2,0,0,2,2,2,2,2,2,2,2,1,2,1,2,2,2,2,2,2,2,2,0,0,2,
|
||||
2,0,0,4,2,2,2,2,2,5,6,1,2,1,7,8,2,2,2,2,2,3,0,0,2,
|
||||
2,13,0,0,22,0,0,1,0,0,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
||||
0,0,0,0,0,0,0,0,0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
{ "compressionlevel":-1,
|
||||
"height":14,
|
||||
"infinite":false,
|
||||
"layers":[
|
||||
{
|
||||
"data":[0, 0, 0, 0, 17, 18, 2, 2, 15, 16, 0, 0, 0, 0, 0, 17, 18, 2, 2, 15, 16, 0, 0, 0, 0, 0, 0, 0, 14, 5, 6, 22, 0, 7, 8, 15, 16, 0, 17, 18, 5, 6, 22, 0, 7, 8, 13, 0, 0, 0, 0, 0, 14, 3, 0, 0, 22, 0, 0, 0, 4, 2, 2, 2, 3, 0, 0, 22, 0, 0, 0, 4, 13, 0, 0, 0, 14, 3, 0, 0, 0, 22, 0, 0, 0, 0, 26, 2, 25, 0, 0, 0, 22, 0, 0, 0, 0, 4, 13, 0, 28, 25, 0, 0, 0, 0, 2, 2, 0, 0, 0, 36, 2, 35, 0, 0, 0, 2, 2, 0, 0, 0, 0, 26, 27, 38, 35, 0, 0, 17, 18, 2, 2, 27, 0, 0, 0, 2, 0, 0, 0, 28, 2, 2, 15, 16, 0, 0, 36, 37, 2, 0, 0, 14, 2, 2, 2, 2, 37, 0, 0, 0, 0, 0, 0, 0, 38, 2, 2, 2, 2, 13, 0, 0, 2, 2, 0, 0, 4, 2, 2, 2, 2, 2, 15, 16, 0, 0, 0, 17, 18, 2, 2, 2, 2, 2, 3, 0, 0, 2, 26, 27, 0, 0, 7, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 6, 0, 0, 28, 25, 36, 37, 0, 0, 0, 0, 4, 2, 5, 6, 0, 0, 0, 0, 0, 7, 8, 2, 3, 0, 0, 0, 0, 38, 35, 0, 4, 13, 0, 0, 0, 0, 21, 0, 0, 0, 14, 2, 13, 0, 0, 0, 21, 0, 0, 0, 0, 14, 3, 0, 0, 0, 4, 13, 0, 0, 0, 21, 0, 0, 14, 2, 2, 2, 13, 0, 0, 21, 0, 0, 0, 14, 3, 0, 0, 0, 0, 0, 4, 15, 16, 0, 21, 17, 18, 5, 6, 0, 7, 8, 15, 16, 21, 0, 17, 18, 3, 0, 0, 0, 0, 0, 0, 0, 7, 8, 2, 2, 5, 6, 0, 0, 0, 0, 0, 7, 8, 2, 2, 5, 6, 0, 0, 0, 0],
|
||||
"height":14,
|
||||
"id":1,
|
||||
"name":"Background",
|
||||
"opacity":1,
|
||||
"type":"tilelayer",
|
||||
"visible":false,
|
||||
"width":25,
|
||||
"x":0,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 0, 0, 42, 31, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":14,
|
||||
"id":2,
|
||||
"name":"Foreground",
|
||||
"opacity":1,
|
||||
"type":"tilelayer",
|
||||
"visible":true,
|
||||
"width":25,
|
||||
"x":0,
|
||||
"y":0
|
||||
}],
|
||||
"nextlayerid":3,
|
||||
"nextobjectid":1,
|
||||
"orientation":"orthogonal",
|
||||
"renderorder":"right-down",
|
||||
"tiledversion":"1.8.0",
|
||||
"tileheight":16,
|
||||
"tilesets":[
|
||||
{
|
||||
"firstgid":1,
|
||||
"source":"tilesetnpp.tsx"
|
||||
}],
|
||||
"tilewidth":16,
|
||||
"type":"map",
|
||||
"version":"1.8",
|
||||
"width":25
|
||||
}
|
|
@ -1,22 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="25" height="14" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="1">
|
||||
<tileset firstgid="1" source="tilesetnpp.tsx"/>
|
||||
<layer id="1" name="Background" width="25" height="14">
|
||||
<layer id="1" name="Background" width="25" height="14" visible="0">
|
||||
<data encoding="csv">
|
||||
1,1,1,1,17,18,2,2,15,16,1,1,1,1,1,17,18,2,2,15,16,1,1,1,1,
|
||||
1,1,1,14,5,6,22,1,7,8,15,16,1,17,18,5,6,22,0,7,8,13,1,1,1,
|
||||
1,1,14,3,0,0,22,1,0,0,4,2,2,2,3,0,0,22,0,0,0,4,13,1,1,
|
||||
1,14,3,0,0,0,22,1,0,0,0,10,2,9,0,0,0,22,0,0,0,0,4,13,1,
|
||||
30,9,0,0,0,0,2,2,0,0,0,20,2,19,0,0,0,2,2,1,0,0,1,10,29,
|
||||
40,19,0,0,17,18,2,2,29,0,0,0,2,0,0,0,30,2,2,15,16,0,0,20,39,
|
||||
2,0,0,14,2,2,2,2,39,0,0,0,0,0,0,0,40,2,2,2,2,13,0,0,2,
|
||||
0,0,0,0,17,18,2,2,15,16,0,0,0,0,0,17,18,2,2,15,16,0,0,0,0,
|
||||
0,0,0,14,5,6,22,0,7,8,15,16,0,17,18,5,6,22,0,7,8,13,0,0,0,
|
||||
0,0,14,3,0,0,22,0,0,0,4,2,2,2,3,0,0,22,0,0,0,4,13,0,0,
|
||||
0,14,3,0,0,0,22,0,0,0,0,26,2,25,0,0,0,22,0,0,0,0,4,13,0,
|
||||
28,25,0,0,0,0,2,2,0,0,0,36,2,35,0,0,0,2,2,0,0,0,0,26,27,
|
||||
38,35,0,0,17,18,2,2,27,0,0,0,2,0,0,0,28,2,2,15,16,0,0,36,37,
|
||||
2,0,0,14,2,2,2,2,37,0,0,0,0,0,0,0,38,2,2,2,2,13,0,0,2,
|
||||
2,0,0,4,2,2,2,2,2,15,16,0,0,0,17,18,2,2,2,2,2,3,0,0,2,
|
||||
10,29,0,0,7,8,2,2,2,2,2,2,2,2,2,2,2,2,2,5,6,0,0,30,9,
|
||||
20,39,0,0,0,0,4,2,5,6,0,0,0,0,0,7,8,2,3,0,0,0,0,40,19,
|
||||
1,4,13,0,0,0,0,21,0,0,0,14,2,13,0,0,0,21,0,0,0,0,14,3,1,
|
||||
1,1,4,13,0,0,0,21,0,0,14,2,2,2,13,0,0,21,0,0,0,14,3,1,1,
|
||||
1,1,1,4,15,16,0,21,17,18,5,6,1,7,8,15,16,21,0,17,18,3,1,1,1,
|
||||
1,1,1,1,7,8,2,2,5,6,1,1,1,1,1,7,8,2,2,5,6,1,1,1,1
|
||||
26,27,0,0,7,8,2,2,2,2,2,2,2,2,2,2,2,2,2,5,6,0,0,28,25,
|
||||
36,37,0,0,0,0,4,2,5,6,0,0,0,0,0,7,8,2,3,0,0,0,0,38,35,
|
||||
0,4,13,0,0,0,0,21,0,0,0,14,2,13,0,0,0,21,0,0,0,0,14,3,0,
|
||||
0,0,4,13,0,0,0,21,0,0,14,2,2,2,13,0,0,21,0,0,0,14,3,0,0,
|
||||
0,0,0,4,15,16,0,21,17,18,5,6,0,7,8,15,16,21,0,17,18,3,0,0,0,
|
||||
0,0,0,0,7,8,2,2,5,6,0,0,0,0,0,7,8,2,2,5,6,0,0,0,0
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="2" name="Foreground" width="25" height="14">
|
||||
|
@ -24,13 +24,13 @@
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,42,0,0,0,0,42,26,0,25,42,0,0,0,0,42,0,0,0,0,0,
|
||||
28,25,0,0,42,0,0,0,0,0,42,36,0,35,42,0,0,0,0,0,42,31,0,26,27,
|
||||
38,35,0,42,0,0,0,0,27,0,42,0,0,0,42,0,28,0,0,0,0,42,0,36,37,
|
||||
0,0,42,0,0,0,0,0,37,0,0,0,0,0,0,0,38,0,0,0,0,0,42,0,0,
|
||||
0,0,0,0,0,42,0,0,0,0,42,0,0,0,42,0,0,0,0,42,0,0,0,0,0,
|
||||
0,0,0,0,42,0,0,0,0,0,42,0,0,0,42,0,0,0,0,0,42,31,0,0,0,
|
||||
0,0,0,42,0,0,0,0,0,0,42,0,0,0,42,0,0,0,0,0,0,42,0,0,0,
|
||||
0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,
|
||||
0,0,42,0,0,0,0,0,0,0,0,0,41,0,0,0,0,0,0,0,0,0,42,0,0,
|
||||
26,27,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,28,25,
|
||||
36,37,0,0,42,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,42,0,0,38,35,
|
||||
0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,
|
||||
0,0,0,0,42,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,42,0,0,0,0,
|
||||
0,0,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{ "columns":10,
|
||||
"image":"tileset.png",
|
||||
"imageheight":80,
|
||||
"imagewidth":160,
|
||||
"margin":0,
|
||||
"name":"tileset",
|
||||
"spacing":0,
|
||||
"tilecount":50,
|
||||
"tiledversion":"1.8.0",
|
||||
"tileheight":16,
|
||||
"tilewidth":16,
|
||||
"type":"tileset",
|
||||
"version":"1.8"
|
||||
}
|
4
build
4
build
|
@ -1,3 +1 @@
|
|||
rm -r build-cg
|
||||
rm *.g3a
|
||||
fxsdk build-cg -B VERBOSE=1
|
||||
fxsdk build-cg VERBOSE=1
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.7 KiB |
|
@ -3,6 +3,8 @@
|
|||
#include <azur/azur.h>
|
||||
#include <azur/gint/render.h>
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -74,16 +76,23 @@ void Level::Render( void )
|
|||
{
|
||||
uint16_t index = j * map_level->w + i;
|
||||
uint16_t currentTile = map_level->layers[u][ index ];
|
||||
if (currentTile!=0 && currentTile!=32)
|
||||
if (currentTile!=0) // && currentTile!=32)
|
||||
{
|
||||
uint16_t xtile = ((currentTile % map_level->tileset_size)-1) * 16;
|
||||
uint16_t ytile = (currentTile / map_level->tileset_size) * 16;
|
||||
azrp_subimage_p8( i*16, j*16, map_level->tileset, xtile, ytile, 16, 16, DIMAGE_NONE );
|
||||
|
||||
|
||||
// TODO :
|
||||
// the last column of tile is not fully drawn cause 4 pixels are missing
|
||||
// to upgrade the
|
||||
|
||||
/*
|
||||
if (u==0) Azur_draw_text( i*16+1, j*16+1, "%d", GetTileBackgroundINT( i, j ) );
|
||||
else if (u==1) Azur_draw_text( i*16+1, j*16+1, "%d", GetTileForegroundINT( i, j ) );
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -107,14 +116,27 @@ void Level::Update( float dt )
|
|||
}
|
||||
|
||||
|
||||
int Level::GetTileBackgroundINT( uint8_t x, uint8_t y )
|
||||
{
|
||||
uint16_t index = y * map_level->w + x;
|
||||
uint16_t currentTile = map_level->layers[0][ index ];
|
||||
return currentTile;
|
||||
}
|
||||
|
||||
|
||||
int Level::GetTileForegroundINT( uint8_t x, uint8_t y )
|
||||
{
|
||||
uint16_t index = y * map_level->w + x;
|
||||
uint16_t currentTile = map_level->layers[1][ index ];
|
||||
return currentTile;
|
||||
}
|
||||
|
||||
int Level::GetTileBackground( uint8_t x, uint8_t y )
|
||||
{
|
||||
uint8_t tileX = x / 16;
|
||||
uint8_t tileY = y / 16;
|
||||
|
||||
uint16_t index = tileY * map_level->w + tileX % map_level->w;
|
||||
uint16_t index = tileY * map_level->w + tileX;
|
||||
uint16_t currentTile = map_level->layers[0][ index ];
|
||||
return currentTile;
|
||||
}
|
||||
|
@ -150,7 +172,7 @@ bool Level::CanGo( Player *MyPlayer )
|
|||
XinTile = xmin % 16;
|
||||
YinTile = ymin % 16;
|
||||
*/
|
||||
|
||||
/*
|
||||
if ((MyPlayer->action == RUN || MyPlayer->action == WALK) && MyPlayer->direction == LEFT)
|
||||
{
|
||||
if( GetTileBackground( xmin, ymin ) != 0 || GetTileBackground( xmin, ymax ) != 0) return false;
|
||||
|
@ -167,6 +189,7 @@ bool Level::CanGo( Player *MyPlayer )
|
|||
{
|
||||
if( GetTileBackground( xmin, ymax ) != 0 || GetTileBackground( xmax, ymax ) != 0) return false;
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
|
@ -43,6 +43,8 @@ class Level
|
|||
private:
|
||||
int GetTileBackground( uint8_t x, uint8_t y );
|
||||
int GetTileForeground( uint8_t x, uint8_t y );
|
||||
int GetTileBackgroundINT( uint8_t x, uint8_t y );
|
||||
int GetTileForegroundINT( uint8_t x, uint8_t y );
|
||||
};
|
||||
|
||||
|
||||
|
|
16
src/main.cpp
16
src/main.cpp
|
@ -34,7 +34,7 @@ bool screenshot = false;
|
|||
bool record = false;
|
||||
bool textoutput = false;
|
||||
bool exitToOS = false;
|
||||
uint8_t texttodraw=2;
|
||||
uint8_t texttodraw=0;
|
||||
|
||||
|
||||
#define SCALE_PIXEL 1
|
||||
|
@ -108,8 +108,6 @@ static void render( void )
|
|||
|
||||
#if(BIAS)
|
||||
if (texttodraw>=1) Azur_draw_text(1,01, "FPS = %.0f", (float) (1000.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>=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 );
|
||||
|
@ -144,12 +142,10 @@ static void get_inputs( float dt )
|
|||
if( MyKeyboard.IsKeyPressedEvent(MYKEY_F1) ) { MyLevel.ChangeMap(1, &MyPlayer); }
|
||||
if( MyKeyboard.IsKeyPressedEvent(MYKEY_F2) ) { MyLevel.ChangeMap(2, &MyPlayer); }
|
||||
if( MyKeyboard.IsKeyPressedEvent(MYKEY_F3) ) { MyLevel.ChangeMap(3, &MyPlayer); }
|
||||
// if( MyKeyboard.IsKeyPressedEvent(MYKEY_F4) ) { MyLevel.ChangeMap(4, &MyPlayer); }
|
||||
// if( MyKeyboard.IsKeyPressedEvent(MYKEY_F5) ) { MyLevel.ChangeMap(5, &MyPlayer); }
|
||||
// if( MyKeyboard.IsKeyPressedEvent(MYKEY_F6) ) { MyLevel.ChangeMap(6, &MyPlayer); }
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
if(MyKeyboard.IsKeyPressed(MYKEY_ALPHA) && MyKeyboard.IsKeyPressed(MYKEY_LEFT))
|
||||
{
|
||||
MyPlayer.Walk_Left( dt );
|
||||
|
@ -158,7 +154,9 @@ static void get_inputs( float dt )
|
|||
{
|
||||
MyPlayer.Walk_Right( dt );
|
||||
}
|
||||
else if(MyKeyboard.IsKeyPressed(MYKEY_LEFT))
|
||||
else
|
||||
*/
|
||||
if(MyKeyboard.IsKeyPressed(MYKEY_LEFT))
|
||||
{
|
||||
MyPlayer.Run_Left( dt );
|
||||
}
|
||||
|
@ -273,7 +271,7 @@ int main(void)
|
|||
|
||||
get_inputs( elapsedTime );
|
||||
|
||||
// update( elapsedTime );
|
||||
update( elapsedTime );
|
||||
|
||||
// update the RAM consumption status
|
||||
_uram_stats = kmalloc_get_gint_stats(_uram);
|
||||
|
@ -288,7 +286,7 @@ int main(void)
|
|||
|
||||
{
|
||||
// all the stuff to be rendered should be put here
|
||||
azrp_clear( C_WHITE );
|
||||
azrp_clear( C_GREEN );
|
||||
render();
|
||||
azrp_update();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,255 @@
|
|||
#include "player.h"
|
||||
#include <num/num.h>
|
||||
#include <gint/rtc.h>
|
||||
#include "level.h"
|
||||
#include "utilities.h"
|
||||
|
||||
/*
|
||||
extern bopti_image_t img_walking;
|
||||
extern bopti_image_t img_running;
|
||||
extern bopti_image_t img_static;
|
||||
*/
|
||||
|
||||
extern bopti_image_t img_circle;
|
||||
|
||||
static uint32_t framecounter = 0;
|
||||
|
||||
extern Level MyLevel;
|
||||
|
||||
#define SPEEDWALK 6.0f
|
||||
#define SPEEDRUN 12.0f
|
||||
#define SPEEDSTATIC 0.0f
|
||||
|
||||
#define SPEEDJUMPWALK 4.0f
|
||||
#define SPEEDJUMPRUN 12.0f
|
||||
#define SPEEDJUMPSTATIC 8.0f
|
||||
|
||||
#define MAXFALLSPEED 20.0f
|
||||
|
||||
|
||||
Player::Player( int16_t _x, int16_t _y )
|
||||
{
|
||||
this->x = _x;
|
||||
this->y = _y;
|
||||
|
||||
this->vx = 0.0f;
|
||||
this->vy = 0.0f;
|
||||
|
||||
this->ax = 0.0f;
|
||||
this->ay = 1.0f;
|
||||
|
||||
this->width = 8;
|
||||
this->height = 8;
|
||||
|
||||
this->xmin = (int) this->x - this->width;
|
||||
this->xmax = (int) this->x + this->width;
|
||||
this->ymin = (int) this->y - this->height;
|
||||
this->ymax = (int) this->y + this->height;
|
||||
|
||||
last_tick = rtc_ticks();
|
||||
}
|
||||
|
||||
Player::~Player()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Player::Update( float dt )
|
||||
{
|
||||
float DeltaTime = dt / 100.0f ;
|
||||
|
||||
//this->vx += this->ax * DeltaTime; // horizontal acceleration not considered (yet)
|
||||
this->vy += this->ay * DeltaTime;
|
||||
|
||||
if (this->vy >= MAXFALLSPEED) this->vy = MAXFALLSPEED;
|
||||
|
||||
// we were jumping and are reaching the top of the curve or even starting falling
|
||||
if (this->action == JUMP && this->vy >= 0)
|
||||
{
|
||||
this->action = FALL;
|
||||
}
|
||||
|
||||
this->nextx = this->x + this->vx * DeltaTime;
|
||||
this->nexty = this->y + this->vy * DeltaTime;
|
||||
|
||||
|
||||
bool testdestination = MyLevel.CanGo( this ); // true if we can go to the planed position
|
||||
|
||||
if (testdestination)
|
||||
{
|
||||
this->x = this->nextx;
|
||||
this->y = this->nexty;
|
||||
}
|
||||
else if(this->action == JUMP)
|
||||
{
|
||||
this->vx = 0;
|
||||
this->vy = 0;
|
||||
this->action = FALL;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->vx = 0;
|
||||
this->vy = 0;
|
||||
this->action = STATIC;
|
||||
}
|
||||
|
||||
xmin = (int) x - width;
|
||||
xmax = (int) x + width;
|
||||
ymin = (int) y - height;
|
||||
ymax = (int) y + height;
|
||||
|
||||
}
|
||||
|
||||
void Player::Render( void )
|
||||
{
|
||||
uint32_t temptick = rtc_ticks();
|
||||
if (temptick-last_tick>=10)
|
||||
{
|
||||
last_tick = temptick;
|
||||
framecounter++;
|
||||
}
|
||||
/*
|
||||
if (action==RUN)
|
||||
{
|
||||
uint8_t frameinternal = framecounter % 8;
|
||||
azrp_subimage_p8_effect(xmin, ymin, &img_running, frameinternal*16, 0, 16, 16, direction==RIGHT ? DIMAGE_NONE : IMAGE_HFLIP );
|
||||
}
|
||||
else if (action==WALK)
|
||||
{
|
||||
uint8_t frameinternal = framecounter % 7;
|
||||
azrp_subimage_p8_effect(xmin, ymin, &img_walking, frameinternal*16, 0, 16, 16, direction==RIGHT ? DIMAGE_NONE : IMAGE_HFLIP );
|
||||
}
|
||||
else if (action==STATIC)
|
||||
{
|
||||
uint8_t frameinternal = framecounter % 8;
|
||||
azrp_subimage_p8_effect(xmin, ymin, &img_static, frameinternal*16, 0, 16, 16, DIMAGE_NONE);
|
||||
}
|
||||
*/
|
||||
|
||||
azrp_image_p8_effect(xmin, ymin, &img_circle, DIMAGE_NONE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
void Player::Walk_Left( float dt )
|
||||
{
|
||||
if ( this->action != JUMP && this->action != FALL )
|
||||
{
|
||||
this->vx -= 1.0f;
|
||||
|
||||
if ( this->vx <= SPEEDWALK*-1.0f )
|
||||
this->vx = -1.0f*SPEEDWALK;
|
||||
|
||||
this->direction = LEFT;
|
||||
this->action = WALK;
|
||||
}
|
||||
|
||||
this->Update( dt );
|
||||
}
|
||||
|
||||
void Player::Walk_Right( float dt )
|
||||
{
|
||||
if ( this->action != JUMP && this->action != FALL )
|
||||
{
|
||||
this->vx += 1.0f;
|
||||
|
||||
if ( this->vx >= SPEEDWALK )
|
||||
this->vx = SPEEDWALK;
|
||||
|
||||
this->direction = RIGHT;
|
||||
this->action = WALK;
|
||||
}
|
||||
|
||||
this->Update( dt );
|
||||
}
|
||||
*/
|
||||
|
||||
void Player::Run_Left( float dt )
|
||||
{
|
||||
if ( this->action != JUMP && this->action != FALL )
|
||||
{
|
||||
this->vx -= 1.0f;
|
||||
|
||||
if ( this->vx <= SPEEDRUN*-1.0f )
|
||||
this->vx = -1.0f*SPEEDRUN;
|
||||
|
||||
this->direction = LEFT;
|
||||
this->action = RUN;
|
||||
}
|
||||
|
||||
this->Update( dt );
|
||||
}
|
||||
|
||||
void Player::Run_Right( float dt )
|
||||
{
|
||||
if ( this->action != JUMP && this->action != FALL )
|
||||
{
|
||||
this->vx += 1.0f;
|
||||
|
||||
if ( this->vx >= SPEEDRUN )
|
||||
this->vx = SPEEDRUN;
|
||||
|
||||
|
||||
this->direction = RIGHT;
|
||||
this->action = RUN;
|
||||
}
|
||||
|
||||
this->Update( dt );
|
||||
}
|
||||
|
||||
void Player::Jump( float dt )
|
||||
{
|
||||
// check if we are already jumping or not
|
||||
if (this->action != JUMP && this->action != FALL) // not in a jump or in a fall
|
||||
{
|
||||
if ( this->action == WALK )
|
||||
{
|
||||
this->vy -= SPEEDJUMPWALK;
|
||||
}
|
||||
else if ( this->action == RUN )
|
||||
{
|
||||
this->vy -= SPEEDJUMPRUN;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->vy -= SPEEDJUMPSTATIC;
|
||||
}
|
||||
}
|
||||
else if ( this->action == FALL) // descending phase (FALL) of a jump, we can start a new small jump
|
||||
{
|
||||
this->vy -= SPEEDJUMPSTATIC;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
this->action = JUMP;
|
||||
|
||||
this->Update( dt );
|
||||
}
|
||||
|
||||
void Player::No_Order( float dt )
|
||||
{
|
||||
|
||||
if (this->action == RUN || this->action == WALK)
|
||||
{
|
||||
this->action = BREAK;
|
||||
|
||||
this->vx *= 0.9;
|
||||
|
||||
if (ABS(this->vx) <= 0.2 )
|
||||
{
|
||||
this->vx = 0;
|
||||
this->action = STATIC;
|
||||
this->direction = STATIC;
|
||||
}
|
||||
}
|
||||
|
||||
this->Update( dt );
|
||||
}
|
182
src/player.cpp
182
src/player.cpp
|
@ -2,6 +2,7 @@
|
|||
#include <num/num.h>
|
||||
#include <gint/rtc.h>
|
||||
#include "level.h"
|
||||
#include "utilities.h"
|
||||
|
||||
/*
|
||||
extern bopti_image_t img_walking;
|
||||
|
@ -19,11 +20,11 @@ extern Level MyLevel;
|
|||
#define SPEEDRUN 12.0f
|
||||
#define SPEEDSTATIC 0.0f
|
||||
|
||||
#define SPEEDJUMPWALK 4.0f
|
||||
#define SPEEDJUMPRUN 12.0f
|
||||
#define SPEEDJUMPSTATIC 8.0f
|
||||
#define SPEEDJUMPWALK 3.0f
|
||||
#define SPEEDJUMPRUN 9.0f
|
||||
#define SPEEDJUMPSTATIC 6.0f
|
||||
|
||||
#define MAXFALLSPEED 20.0f
|
||||
#define MAXFALLSPEED 15.0f
|
||||
|
||||
|
||||
Player::Player( int16_t _x, int16_t _y )
|
||||
|
@ -46,22 +47,20 @@ Player::Player( int16_t _x, int16_t _y )
|
|||
this->ymax = (int) this->y + this->height;
|
||||
|
||||
last_tick = rtc_ticks();
|
||||
|
||||
this->action = STATIC;
|
||||
this->direction = STATIC;
|
||||
}
|
||||
|
||||
|
||||
Player::~Player()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Player::Update( float dt )
|
||||
{
|
||||
float DeltaTime = dt / 100.0f ;
|
||||
|
||||
//this->vx += this->ax * DeltaTime; // horizontal acceleration not considered (yet)
|
||||
this->vy += this->ay * DeltaTime;
|
||||
|
||||
if (this->vy >= MAXFALLSPEED) this->vy = MAXFALLSPEED;
|
||||
|
@ -75,9 +74,9 @@ void Player::Update( float dt )
|
|||
this->nextx = this->x + this->vx * DeltaTime;
|
||||
this->nexty = this->y + this->vy * DeltaTime;
|
||||
|
||||
|
||||
bool testdestination = MyLevel.CanGo( this ); // true if we can go to the planed position
|
||||
|
||||
|
||||
if (testdestination)
|
||||
{
|
||||
this->x = this->nextx;
|
||||
|
@ -103,6 +102,7 @@ void Player::Update( float dt )
|
|||
|
||||
}
|
||||
|
||||
|
||||
void Player::Render( void )
|
||||
{
|
||||
uint32_t temptick = rtc_ticks();
|
||||
|
@ -111,129 +111,105 @@ void Player::Render( void )
|
|||
last_tick = temptick;
|
||||
framecounter++;
|
||||
}
|
||||
/*
|
||||
if (action==RUN)
|
||||
{
|
||||
uint8_t frameinternal = framecounter % 8;
|
||||
azrp_subimage_p8_effect(xmin, ymin, &img_running, frameinternal*16, 0, 16, 16, direction==RIGHT ? DIMAGE_NONE : IMAGE_HFLIP );
|
||||
}
|
||||
else if (action==WALK)
|
||||
{
|
||||
uint8_t frameinternal = framecounter % 7;
|
||||
azrp_subimage_p8_effect(xmin, ymin, &img_walking, frameinternal*16, 0, 16, 16, direction==RIGHT ? DIMAGE_NONE : IMAGE_HFLIP );
|
||||
}
|
||||
else if (action==STATIC)
|
||||
{
|
||||
uint8_t frameinternal = framecounter % 8;
|
||||
azrp_subimage_p8_effect(xmin, ymin, &img_static, frameinternal*16, 0, 16, 16, DIMAGE_NONE);
|
||||
}
|
||||
*/
|
||||
|
||||
azrp_image_p8_effect(xmin, ymin, &img_circle, DIMAGE_NONE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Player::Walk_Left( float dt )
|
||||
{
|
||||
this->vx = SPEEDWALK * -1.0f;
|
||||
|
||||
this->direction = LEFT;
|
||||
this->action = WALK;
|
||||
azrp_image_p8_effect(xmin, ymin, &img_circle, DIMAGE_NONE);
|
||||
|
||||
|
||||
if (this->action==STATIC) Azur_draw_text( this->xmin+4, this->ymin+4, "S" );
|
||||
else if (this->action==DRAFT) Azur_draw_text( this->xmin+4, this->ymin+4, "D" );
|
||||
else if (this->action==WALK) Azur_draw_text( this->xmin+4, this->ymin+4, "W" );
|
||||
else if (this->action==RUN) Azur_draw_text( this->xmin+4, this->ymin+4, "R" );
|
||||
else if (this->action==JUMP) Azur_draw_text( this->xmin+4, this->ymin+4, "J" );
|
||||
else if (this->action==FALL) Azur_draw_text( this->xmin+4, this->ymin+4, "F" );
|
||||
else Azur_draw_text( this->xmin+4, this->ymin+4, "X" );
|
||||
|
||||
this->Update( dt );
|
||||
}
|
||||
|
||||
void Player::Walk_Right( float dt )
|
||||
{
|
||||
this->vx = SPEEDWALK * 1.0f;
|
||||
this->direction = RIGHT;
|
||||
this->action = WALK;
|
||||
|
||||
this->Update( dt );
|
||||
}
|
||||
|
||||
void Player::Run_Left( float dt )
|
||||
{
|
||||
this->vx = SPEEDRUN * -1.0f;
|
||||
this->direction = LEFT;
|
||||
this->action = RUN;
|
||||
if ( this->action == STATIC )
|
||||
{
|
||||
this->vx -= 1.0f;
|
||||
this->action = RUN;
|
||||
if ( this->vx <= -SPEEDRUN ) this->vx = -SPEEDRUN;
|
||||
}
|
||||
else if ( this->action == JUMP || this->action == FALL )
|
||||
{
|
||||
this->vx -= 1.0f;
|
||||
if ( this->vx <= -SPEEDRUN ) this->vx = -SPEEDRUN;
|
||||
}
|
||||
else if ( this->action == RUN || this->action == WALK )
|
||||
{
|
||||
this->vx -= 1.0f;
|
||||
this->action = RUN;
|
||||
if ( this->vx <= -SPEEDRUN ) this->vx = -SPEEDRUN;
|
||||
}
|
||||
|
||||
this->Update( dt );
|
||||
this->direction = LEFT;
|
||||
}
|
||||
|
||||
|
||||
void Player::Run_Right( float dt )
|
||||
{
|
||||
this->vx = SPEEDRUN * 1.0f;
|
||||
if ( this->action == STATIC )
|
||||
{
|
||||
this->vx += 1.0f;
|
||||
this->action = RUN;
|
||||
if ( this->vx >= SPEEDRUN ) this->vx = SPEEDRUN;
|
||||
}
|
||||
else if ( this->action == JUMP || this->action == FALL )
|
||||
{
|
||||
this->vx += 1.0f;
|
||||
if ( this->vx >= SPEEDRUN ) this->vx = SPEEDRUN;
|
||||
}
|
||||
else if ( this->action == RUN || this->action == WALK )
|
||||
{
|
||||
this->vx += 1.0f;
|
||||
this->action = RUN;
|
||||
if ( this->vx >= SPEEDRUN ) this->vx = SPEEDRUN;
|
||||
}
|
||||
|
||||
this->direction = RIGHT;
|
||||
this->action = RUN;
|
||||
|
||||
this->Update( dt );
|
||||
}
|
||||
|
||||
|
||||
void Player::Jump( float dt )
|
||||
{
|
||||
// check if we are already jumping or not
|
||||
if (this->action != JUMP && this->action != FALL) // not in a jump or in a fall
|
||||
if ( this->action == STATIC )
|
||||
{
|
||||
if (this->action==WALK)
|
||||
{
|
||||
this->vy = SPEEDJUMPWALK * -1.0f;
|
||||
}
|
||||
else if (this->action==RUN)
|
||||
{
|
||||
this->vy = SPEEDJUMPRUN * -1.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->vy = SPEEDJUMPSTATIC * -1.0f;
|
||||
}
|
||||
this->vy = -SPEEDJUMPSTATIC;
|
||||
}
|
||||
else if (this->action == FALL) // descending phase (FALL) of a jump, we can start a new small jump
|
||||
else if (this->action != JUMP && this->action != FALL) // not in a jump or in a fall
|
||||
{
|
||||
this->vy = SPEEDJUMPSTATIC * -1.0f;
|
||||
this->vy -= SPEEDJUMPRUN;
|
||||
}
|
||||
else
|
||||
else if ( this->action == FALL) // descending phase (FALL) of a jump, we can start a new small jump
|
||||
{
|
||||
|
||||
this->vy -= SPEEDJUMPSTATIC;
|
||||
}
|
||||
else if ( this->action == JUMP) // descending phase (FALL) of a jump, we can start a new small jump
|
||||
{
|
||||
this->vy *= 0.9f;
|
||||
}
|
||||
|
||||
this->Update( dt );
|
||||
this->action = JUMP;
|
||||
}
|
||||
|
||||
|
||||
void Player::No_Order( float dt )
|
||||
{
|
||||
/*
|
||||
if (this->action == RUN || this->action == WALK)
|
||||
{
|
||||
this->action = BREAK;
|
||||
}
|
||||
this->action = DRAFT;
|
||||
|
||||
if (this->direction == LEFT) // we were going LEFT and we stop moving to the left so we decrease speed till reaching static
|
||||
{
|
||||
this->vx += 1;
|
||||
if (vx>=0)
|
||||
{
|
||||
this->vx = 0;
|
||||
this->action = STATIC;
|
||||
this->direction = STATIC;
|
||||
}
|
||||
}
|
||||
else if (this->direction == RIGHT) // we were going RIGHT and we stop moving to the left so we decrease speed till reaching static
|
||||
{
|
||||
this->vx -= 1;
|
||||
if (vx<=0)
|
||||
{
|
||||
this->vx = 0;
|
||||
this->action = STATIC;
|
||||
this->direction = STATIC;
|
||||
}
|
||||
}
|
||||
|
||||
this->Update( 0.0f, 0.0, 0.0 );
|
||||
*/
|
||||
this->vx *= 0.9;
|
||||
|
||||
this->Update( dt );
|
||||
if (ABS(this->vx) <= 0.1 && ABS(this->vy) <= 0.1)
|
||||
{
|
||||
this->vx = 0;
|
||||
this->action = STATIC;
|
||||
this->direction = STATIC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
16
src/player.h
16
src/player.h
|
@ -11,16 +11,20 @@
|
|||
|
||||
enum
|
||||
{
|
||||
LEFT = -2,
|
||||
RIGHT = -1,
|
||||
STATIC = 0,
|
||||
BREAK = 1,
|
||||
DRAFT = 1,
|
||||
WALK = 2,
|
||||
RUN = 3,
|
||||
JUMP = 4,
|
||||
FALL = 5,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
LEFT = -1,
|
||||
CENTER = 0,
|
||||
RIGHT = 1,
|
||||
};
|
||||
|
||||
|
||||
class Player
|
||||
|
@ -32,8 +36,8 @@ class Player
|
|||
void Update( float dt );
|
||||
void Render( );
|
||||
|
||||
void Walk_Left( float dt );
|
||||
void Walk_Right( float dt );
|
||||
//void Walk_Left( float dt );
|
||||
//void Walk_Right( float dt );
|
||||
|
||||
void Run_Left( float dt );
|
||||
void Run_Right( float dt );
|
||||
|
@ -53,6 +57,8 @@ class Player
|
|||
|
||||
uint32_t last_tick;
|
||||
|
||||
bool playeronground = true;
|
||||
|
||||
int8_t direction = STATIC;
|
||||
int8_t action = STATIC;
|
||||
};
|
||||
|
|
|
@ -3,4 +3,6 @@
|
|||
|
||||
void Azur_draw_text(int x, int y, char const *fmt, ...);
|
||||
|
||||
#define ABS(a) ( ( (a) >= 0 ) ? (a) : -(a) )
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue