Compare commits
5 Commits
35552182e9
...
6d5379d2c3
Author | SHA1 | Date |
---|---|---|
|
6d5379d2c3 | |
|
57192d8b0e | |
|
e2b5044bc5 | |
|
3edec92632 | |
|
1ea9aa6a55 |
|
@ -3,11 +3,11 @@
|
|||
{
|
||||
"name": "fx-9860G",
|
||||
"compilerPath": "~/.local/bin/sh-elf-gcc",
|
||||
"compilerArgs": [ "-D FX9860G" ],
|
||||
|
||||
"compilerArgs": [
|
||||
"-D FX9860G"
|
||||
],
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "gnu++17",
|
||||
|
||||
"includePath": [],
|
||||
"intelliSenseMode": "${default}",
|
||||
"mergeConfigurations": false,
|
||||
|
@ -19,11 +19,11 @@
|
|||
{
|
||||
"name": "fx-CG50",
|
||||
"compilerPath": "~/.local/bin/sh-elf-gcc",
|
||||
"compilerArgs": [ "-D FXCG50" ],
|
||||
|
||||
"compilerArgs": [
|
||||
"-D FXCG50"
|
||||
],
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "gnu++17",
|
||||
|
||||
"includePath": [],
|
||||
"intelliSenseMode": "${default}",
|
||||
"mergeConfigurations": false,
|
||||
|
@ -34,4 +34,4 @@
|
|||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Build Send and Debug CG",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build-cg/myaddin",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/home/ulysse-cura/.local/bin/fxgdb-wrapper",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Activer la prise en charge de l'impression détaillée",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "Build CG and Send"
|
||||
},
|
||||
{
|
||||
"name": "Debug CG",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build-cg/myaddin",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/home/ulysse-cura/.local/bin/fxgdb-wrapper",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Activer la prise en charge de l'impression détaillée",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -7,6 +7,27 @@
|
|||
"stdlib.h": "c",
|
||||
"kmalloc.h": "c",
|
||||
"types.h": "c",
|
||||
"linked_list.h": "c"
|
||||
}
|
||||
"linked_list.h": "c",
|
||||
"ostream": "cpp",
|
||||
"stddef.h": "c",
|
||||
"textures.h": "c",
|
||||
"stdarg.h": "c",
|
||||
"config.h": "c",
|
||||
"exc.h": "c",
|
||||
"util.h": "c",
|
||||
"keydev.h": "c",
|
||||
"keycodes.h": "c",
|
||||
"stdio.h": "c",
|
||||
"printf.h": "c",
|
||||
"game.h": "c",
|
||||
"event.h": "c",
|
||||
"ecs.h": "c",
|
||||
"components.h": "c",
|
||||
"animation_system.h": "c",
|
||||
"display-cg.h": "c",
|
||||
"stdbool.h": "c",
|
||||
"libimg.h": "c",
|
||||
"stdint.h": "c"
|
||||
},
|
||||
"C_Cpp.default.compilerPath": "/home/ulysse-cura/.local/bin/sh-elf-gcc"
|
||||
}
|
|
@ -5,12 +5,18 @@
|
|||
"label": "Build CG",
|
||||
"type": "shell",
|
||||
"command": "fxsdk build-cg",
|
||||
"problemMatcher": ["$gcc"]
|
||||
},
|
||||
{
|
||||
"label": "Send G3A to Calculator",
|
||||
"type": "shell",
|
||||
"command": "fxlink -isw *.g3a",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Copy G3A to Calculator",
|
||||
"label": "Build CG and Send",
|
||||
"type": "shell",
|
||||
"command": "cp ${workspaceFolder}/*.g3a /media/$USER/disk/ && udisksctl unmount -b /dev/sdc1 && udisksctl power-off -b /dev/sdc1",
|
||||
"command": "fxsdk build-cg && fxlink -isw *.g3a",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
project(2D_Engine)
|
||||
|
||||
include(GenerateG1A)
|
||||
include(GenerateG3A)
|
||||
include(GenerateHH2Bin)
|
||||
include(Fxconv)
|
||||
|
@ -13,27 +12,36 @@ find_package(Gint 2.9 REQUIRED)
|
|||
set(SOURCES
|
||||
src/main.c
|
||||
src/game.c
|
||||
src/vector2d.c
|
||||
src/linked_list.c
|
||||
src/texture_manager.c
|
||||
src/vector2d.c
|
||||
src/ecs/ecs.c
|
||||
src/ecs/transform_component.c
|
||||
src/ecs/sprite_component.c
|
||||
src/ecs/animation_system.c
|
||||
src/ecs/player_system.c
|
||||
)
|
||||
|
||||
# fx-CG-50-only assets
|
||||
set(ASSETS_cg
|
||||
assets-cg/player-sheets/player_idle_sheet.png
|
||||
assets-cg/player-sheets/player_run_sheet.png
|
||||
)
|
||||
|
||||
fxconv_declare_assets(${ASSETS_cg} WITH_METADATA)
|
||||
|
||||
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
|
||||
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -g -flto)
|
||||
# Release only
|
||||
target_compile_options(myaddin PRIVATE -Wall -Wextra -Ofast -flto)
|
||||
# target_compile_options(myaddin PRIVATE -Wall -Wextra -g -flto -Wpedantic -Wshadow -Wconversion -Wfloat-equal -Wformat=2 -Wuninitialized -Wsign-compare -Wundef -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes)
|
||||
target_link_libraries(myaddin Gint::Gint)
|
||||
|
||||
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
||||
generate_g3a(TARGET myaddin OUTPUT "2D_Engine.g3a"
|
||||
NAME "2D_Engine" ICONS assets-cg/Icon/icon-uns.png assets-cg/Icon/icon-sel.png)
|
||||
NAME "2D_Engine" ICONS assets-cg/icon/icon-uns.png assets-cg/icon/icon-sel.png)
|
||||
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G_G3A)
|
||||
generate_g3a(TARGET myaddin OUTPUT "2D_Engine-fx.g3a"
|
||||
NAME "2D_Engine-fx" ICONS assets-cg/Icon/icon-uns.png assets-cg/Icon/icon-sel.png)
|
||||
NAME "2D_Engine-fx" ICONS assets-cg/icon/icon-uns.png assets-cg/icon/icon-sel.png)
|
||||
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCP)
|
||||
generate_hh2_bin(TARGET myaddin OUTPUT "2D_Engine-hh2.bin")
|
||||
endif()
|
||||
|
|
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.5 KiB |
|
@ -1,4 +1,3 @@
|
|||
Tileset/tileset.png:
|
||||
tileset.png:
|
||||
type: bopti-image
|
||||
name: img_tileset
|
||||
|
||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1,3 @@
|
|||
*.png:
|
||||
type: bopti-image
|
||||
name_regex: (.*)\.png img_\1
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
|
@ -1,82 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.10" tiledversion="1.11.0" orientation="orthogonal" renderorder="right-down" width="22" height="21" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="1">
|
||||
<editorsettings>
|
||||
<export target="../../maps/dungeon entry prout.json" format="json"/>
|
||||
</editorsettings>
|
||||
<tileset firstgid="1" source="../../tileset/tileset.tsx"/>
|
||||
<layer id="1" name="Calque de Tuiles 1" width="22" height="21">
|
||||
<data encoding="csv">
|
||||
297,306,306,306,306,297,306,297,297,306,297,306,297,408,306,306,278,297,278,306,278,297,
|
||||
278,278,278,297,692,306,306,306,306,297,278,297,297,417,306,278,297,306,278,630,278,297,
|
||||
306,297,278,278,306,278,278,297,297,278,278,306,278,297,297,278,297,306,297,306,306,306,
|
||||
278,278,278,278,306,297,297,306,297,297,297,278,297,306,297,297,306,297,306,306,278,297,
|
||||
306,297,306,278,297,297,297,306,278,306,278,297,306,297,278,306,278,297,297,306,297,297,
|
||||
297,278,274,282,306,297,297,297,306,297,297,306,306,297,297,278,278,297,274,282,297,297,
|
||||
306,278,273,274,278,278,306,302,310,309,1,1,310,309,299,306,278,297,274,274,278,306,
|
||||
297,278,274,282,297,297,302,311,319,318,322,323,319,318,308,310,299,278,283,273,306,278,
|
||||
297,297,274,274,302,310,311,320,328,327,331,332,328,327,317,319,308,299,273,273,297,278,
|
||||
306,297,283,273,285,319,320,329,306,306,306,306,306,297,326,328,317,280,282,283,297,306,
|
||||
278,278,283,273,285,329,324,278,297,297,306,306,306,297,297,315,326,280,283,274,306,306,
|
||||
306,278,274,274,285,297,306,306,297,306,315,297,278,306,306,278,297,280,274,282,278,278,
|
||||
278,278,274,273,285,278,297,306,306,297,306,306,278,306,297,306,306,280,274,273,278,278,
|
||||
278,599,283,273,275,306,297,297,278,306,278,306,278,297,333,306,278,272,282,283,297,297,
|
||||
607,608,609,274,283,1,278,306,324,278,297,364,365,366,278,297,278,282,274,283,278,306,
|
||||
306,297,273,438,439,274,274,306,306,278,306,373,374,375,272,273,283,659,660,274,297,278,
|
||||
278,297,306,278,278,306,278,306,306,364,365,365,366,278,306,278,306,412,306,278,278,278,
|
||||
306,278,278,297,297,297,297,278,278,373,374,374,375,297,306,306,278,297,306,306,306,306,
|
||||
278,278,306,297,306,306,278,278,297,373,374,374,375,306,306,297,278,278,278,297,278,278,
|
||||
278,297,278,306,306,278,278,278,278,382,363,374,379,366,278,297,278,278,306,297,278,297,
|
||||
297,306,297,278,278,278,278,278,297,306,373,374,374,375,297,306,297,306,278,297,306,278
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="2" name="Calque de Tuiles 2" width="22" height="21">
|
||||
<data encoding="csv">
|
||||
620,621,1,682,683,684,1,640,641,1,1,406,407,646,452,453,1,619,620,621,1,1,
|
||||
629,630,1,691,409,693,1,649,650,1,1,415,416,655,461,462,1,628,629,397,398,1,
|
||||
569,570,571,1,418,419,1,658,659,1,1,424,425,664,470,471,1,421,422,406,407,408,
|
||||
578,579,580,1,427,428,1,667,668,1,1,433,434,435,479,480,1,430,431,415,416,417,
|
||||
587,588,589,1,1,437,1,1,677,1,1,442,443,1,488,489,1,439,440,424,425,426,
|
||||
596,597,598,1,1,1,1,1,1,1,1,1,1,1,1,1,1,508,509,510,511,512,
|
||||
605,606,607,1,1,1,1,1,1,1,1,1,1,1,1,1,1,457,518,519,520,521,
|
||||
614,615,616,1,1,464,1,1,1,1,1,1,1,1,1,1,1,1,407,408,529,629,
|
||||
1,1,585,558,1,1,1,1,1,515,1,1,516,1,1,1,1,1,416,417,538,1,
|
||||
1,1,1,1,1,1,638,639,1,1,1,1,1,1,533,1,1,1,425,546,547,1,
|
||||
1,644,645,646,1,532,647,648,1,1,1,1,1,1,515,1,1,1,434,1,1,1,
|
||||
1,653,654,655,1,1,534,1,1,1,1,1,1,1,1,1,1,1,586,587,588,589,
|
||||
1,662,663,664,1,1,514,1,714,1,1,1,1,1,1,525,514,1,595,596,597,598,
|
||||
670,418,419,420,1,276,1,1,1,1,1,1,697,1,1,1,640,641,642,605,606,607,
|
||||
1,427,428,429,567,275,265,266,1,516,1,1,1,1,271,264,649,650,651,614,615,616,
|
||||
1,436,493,494,1,440,460,461,264,265,265,265,264,264,400,401,402,403,404,662,662,663,
|
||||
1,1,502,503,1,1,469,470,471,1,1,1,1,1,409,410,411,404,669,1,671,672,
|
||||
1,1,511,512,570,571,572,573,480,1,1,715,1,1,418,419,420,413,678,1,680,681,
|
||||
1,1,520,521,579,580,581,582,583,1,1,1,1,1,427,428,429,422,687,1,689,690,
|
||||
1,1,529,530,588,589,590,591,592,1,1,1,1,1,1,1,1,431,1,1,1,1,
|
||||
1,1,538,1,597,598,599,600,1,1,1,1,1,1,1,1,1,440,1,1,1,1
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="3" name="Calque de Tuiles 3" width="22" height="21">
|
||||
<data encoding="csv">
|
||||
551,552,553,554,400,401,402,403,404,642,643,644,645,451,400,401,402,403,404,388,389,390,
|
||||
560,561,562,563,564,410,411,412,413,651,652,653,654,460,409,410,411,412,473,474,475,399,
|
||||
474,475,0,572,573,574,420,421,422,660,661,662,663,469,418,419,420,481,482,483,484,485,
|
||||
483,484,485,581,582,583,429,430,431,669,670,671,672,478,427,428,429,490,491,492,493,494,
|
||||
492,493,494,590,591,592,438,439,440,678,679,680,681,487,436,437,438,499,500,501,502,503,
|
||||
501,502,503,599,600,446,447,448,686,687,688,689,690,496,497,498,447,388,389,390,610,611,
|
||||
510,511,512,608,609,455,456,457,1,1,313,314,1,505,506,455,456,397,398,399,619,620,
|
||||
519,520,521,617,618,464,465,466,1,1,1,1,1,1,1,464,465,406,550,551,552,553,
|
||||
625,626,627,1,1,1,1,1,1,1,1,1,1,1,1,1,1,415,559,560,561,562,
|
||||
634,635,636,637,1,1,1,1,1,1,1,1,1,1,1,1,1,424,568,569,570,571,
|
||||
643,391,392,393,394,1,1,1,1,1,1,1,1,1,391,1,1,433,577,578,579,580,
|
||||
652,400,401,402,403,404,1,1,1,1,1,1,1,1,1,1,622,623,624,625,626,1,
|
||||
661,409,410,411,412,413,1,1,1,1,1,1,1,1,1,1,631,632,633,634,635,636,
|
||||
473,474,475,476,421,422,1,1,1,1,1,1,1,1,1,1,640,641,1,643,644,645,
|
||||
482,483,484,485,430,431,451,452,453,1,1,1,1,1,1,392,393,394,1,652,653,654,
|
||||
491,492,1,551,552,553,554,555,462,1,1,1,1,1,392,393,394,472,473,474,475,476,
|
||||
500,501,559,560,561,562,563,564,565,1,1,1,1,400,401,402,403,481,482,483,484,485,
|
||||
509,510,568,569,472,473,474,475,574,1,1,1,1,409,410,411,412,490,491,492,493,494,
|
||||
518,519,577,578,481,482,483,484,485,1,1,1,1,418,419,420,421,499,500,501,502,503,
|
||||
527,528,586,587,490,491,492,493,494,1,1,1,1,427,428,429,430,508,509,510,511,512,
|
||||
536,537,595,596,499,500,501,502,503,1,1,1,1,436,437,438,439,517,518,519,520,521
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
|
@ -1,118 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.10" tiledversion="1.11.0" orientation="orthogonal" renderorder="right-down" width="51" height="33" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="1">
|
||||
<editorsettings>
|
||||
<export target="../../maps/map 1.tmj" format="json"/>
|
||||
</editorsettings>
|
||||
<tileset firstgid="1" source="../../tileset/tileset.tsx"/>
|
||||
<layer id="1" name="Calque de Tuiles 1" width="51" height="33">
|
||||
<data encoding="csv">
|
||||
19,31,31,31,31,31,31,31,31,31,31,31,31,20,1,1,1,1,1,19,31,31,163,165,31,31,20,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
28,3,2,2,2,2,2,2,2,2,2,2,4,29,1,1,1,1,1,28,3,2,163,165,2,4,29,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
28,12,11,11,11,11,95,95,11,11,11,11,13,29,1,1,1,1,1,28,12,11,163,165,11,13,29,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
28,154,155,155,155,130,131,131,132,155,155,155,156,29,1,1,1,1,1,28,154,155,167,166,155,156,29,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
28,163,164,164,164,139,140,140,141,164,164,164,165,29,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,19,31,31,31,31,31,31,31,31,31,31,31,31,31,20,
|
||||
28,163,164,181,182,148,149,149,150,164,164,164,165,29,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,28,3,2,2,2,2,2,2,2,2,2,2,2,4,29,
|
||||
28,163,164,190,191,164,164,164,164,183,164,164,165,29,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,28,12,11,11,11,11,11,11,11,11,11,11,11,13,29,
|
||||
28,163,164,164,164,193,164,164,164,164,193,164,165,29,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,28,154,155,155,155,155,155,155,155,155,155,155,155,156,29,
|
||||
28,172,173,173,173,173,158,157,173,173,173,173,174,29,1,1,1,1,1,28,163,164,164,164,193,165,29,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,164,164,164,164,164,164,164,165,29,
|
||||
37,22,22,22,359,46,163,165,46,377,22,22,22,38,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,28,172,173,173,173,173,173,173,173,158,157,173,173,174,29,
|
||||
1,1,1,1,28,3,163,165,4,29,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,52,46,46,46,46,46,46,46,46,163,165,46,46,46,44,
|
||||
1,1,1,1,28,12,163,165,13,29,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,28,3,2,2,2,2,2,2,2,163,165,2,2,4,29,
|
||||
1,1,1,1,28,154,167,166,156,29,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,28,12,11,11,11,11,11,11,11,163,165,11,11,13,29,
|
||||
1,1,1,1,28,163,164,164,165,30,31,31,31,31,31,31,31,31,31,32,163,164,164,164,164,165,30,31,31,31,31,31,31,31,31,31,32,154,155,155,155,155,155,155,155,167,166,155,155,156,29,
|
||||
1,1,1,1,28,163,164,164,165,6,2,2,2,2,2,2,2,2,2,7,163,164,164,164,164,165,6,2,2,2,2,2,2,2,2,2,7,163,164,164,157,173,173,173,173,173,173,173,173,174,29,
|
||||
1,1,1,1,28,163,164,164,165,15,11,11,11,11,11,11,10,11,11,16,163,164,164,164,164,165,15,11,11,11,11,11,11,11,11,11,16,163,164,164,165,21,22,22,22,22,22,22,22,22,38,
|
||||
1,1,1,1,28,163,164,164,166,155,155,155,155,155,155,155,155,155,155,155,167,164,164,164,164,166,155,155,155,155,155,155,155,155,155,155,155,167,164,164,165,30,31,31,31,31,31,31,31,31,20,
|
||||
1,1,1,1,28,172,173,173,173,173,173,173,173,173,173,173,173,173,173,173,158,183,164,164,164,157,173,173,173,173,173,173,173,173,173,173,173,158,164,164,165,6,2,2,2,2,2,2,2,4,29,
|
||||
1,1,1,1,37,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,163,164,164,164,164,165,21,22,22,22,22,22,22,22,22,22,23,163,164,164,165,15,11,11,10,11,11,11,11,13,29,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,28,163,164,183,166,155,155,155,155,155,155,155,155,156,29,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,28,172,173,173,173,173,173,173,173,173,173,173,173,174,29,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,37,22,22,22,22,22,22,22,22,22,22,22,22,22,38,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,28,163,164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,19,31,31,31,31,31,32,163,164,164,164,164,165,30,31,31,31,31,31,20,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,19,31,31,31,31,31,360,3,2,2,2,2,7,163,164,164,164,164,165,6,2,2,2,2,4,386,31,31,31,31,31,20,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,28,3,2,2,2,4,33,12,11,11,11,11,16,163,164,164,164,164,165,15,11,11,11,11,13,33,2,2,2,2,4,29,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,28,12,11,11,11,13,234,154,155,155,155,155,155,167,164,164,164,164,166,155,155,155,155,155,156,234,11,11,10,11,13,29,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,28,154,155,155,155,156,243,163,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,165,243,154,155,155,155,156,29,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,28,163,164,192,193,166,155,167,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,166,155,167,164,164,164,165,29,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,28,172,173,173,173,173,173,173,173,173,173,173,173,173,173,158,157,173,173,173,173,173,173,173,173,173,173,173,173,173,174,29,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,37,22,22,22,22,22,22,22,22,22,22,22,22,22,22,1,1,22,22,22,22,22,22,22,22,22,22,22,22,22,22,38,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="2" name="Calque de Tuiles 2" width="51" height="33">
|
||||
<data encoding="csv">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,341,342,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,350,351,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
|
@ -1,340 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.10" tiledversion="1.11.0" orientation="orthogonal" renderorder="left-up" width="30" height="20" tilewidth="16" tileheight="16" infinite="1" nextlayerid="8" nextobjectid="1">
|
||||
<tileset firstgid="1" source="../tileset/tileset.tsx"/>
|
||||
<layer id="5" name="Calque de Tuiles 1" width="30" height="20">
|
||||
<data encoding="csv">
|
||||
<chunk x="-32" y="0" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,19,31,31,31,31,31,31,31,
|
||||
1,1,1,1,1,1,1,1,28,3,2,2,2,2,2,2,
|
||||
1,1,1,1,1,1,1,1,28,12,11,10,11,11,11,11,
|
||||
1,1,1,1,1,1,1,1,28,154,155,155,155,155,155,155,
|
||||
1,1,1,1,1,1,1,1,28,163,157,173,173,173,173,173,
|
||||
1,1,1,1,1,1,1,1,28,163,165,21,22,22,22,22,
|
||||
1,1,1,1,1,1,1,1,28,163,165,29,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,28,163,165,29,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,28,163,165,29,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="-16" y="0" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
19,1,1,20,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
28,1,1,29,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
32,1,1,30,31,31,31,31,31,31,31,31,31,31,31,31,
|
||||
7,154,156,6,2,2,2,2,2,2,2,2,2,2,2,2,
|
||||
16,163,165,15,11,11,11,11,11,11,11,11,10,11,11,11,
|
||||
155,167,166,155,155,155,155,155,155,155,155,155,155,155,155,155,
|
||||
173,173,173,173,173,173,173,173,173,173,158,157,173,173,173,173,
|
||||
22,22,22,22,22,22,22,22,22,23,163,165,21,22,22,22,
|
||||
1,1,1,1,1,1,1,1,1,28,163,165,29,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,28,163,165,29,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,28,159,160,29,1,1,1
|
||||
</chunk>
|
||||
<chunk x="0" y="0" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
31,31,1,1,31,20,1,1,1,1,1,1,1,1,1,1,
|
||||
2,2,1,1,4,29,1,1,1,1,1,1,1,1,1,1,
|
||||
11,11,1,1,13,29,1,1,1,1,1,1,1,1,1,1,
|
||||
155,155,155,155,156,29,1,1,1,1,1,1,1,1,1,1,
|
||||
173,173,173,173,174,29,1,1,1,1,1,1,1,1,1,1,
|
||||
22,22,22,22,22,38,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="-32" y="16" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,28,163,165,29,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,28,163,165,29,1,1,1,1,
|
||||
1,1,1,19,31,31,31,31,32,1,1,30,31,31,31,31,
|
||||
1,1,1,28,3,2,2,2,7,1,1,6,2,2,2,2,
|
||||
1,1,1,28,12,11,11,11,16,1,1,15,11,11,11,11,
|
||||
1,1,1,28,199,200,200,200,200,200,200,200,200,200,200,201,
|
||||
1,1,1,28,208,209,209,236,209,209,209,209,209,209,209,210,
|
||||
1,1,1,28,208,209,209,209,209,209,236,209,236,209,209,210,
|
||||
1,1,1,28,208,209,209,209,209,209,209,209,209,209,209,210,
|
||||
1,1,1,28,208,209,236,209,209,209,209,209,236,209,209,210,
|
||||
1,1,1,28,217,218,218,218,218,218,218,218,218,218,218,219,
|
||||
1,1,1,37,22,22,22,22,22,22,22,22,22,22,22,22,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="-16" y="16" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,28,168,169,29,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,28,154,156,29,1,1,1,
|
||||
43,31,31,31,31,31,31,31,31,32,163,165,30,31,31,31,
|
||||
47,3,2,2,2,2,2,2,2,7,163,165,6,2,2,2,
|
||||
47,10,11,11,11,11,11,11,11,16,163,165,15,11,11,11,
|
||||
47,154,155,155,155,155,155,155,155,155,167,166,155,155,155,155,
|
||||
47,163,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
|
||||
47,163,164,164,164,164,164,164,164,164,39,40,164,164,164,164,
|
||||
47,163,164,164,164,164,164,164,164,164,48,49,164,164,183,164,
|
||||
47,163,164,164,164,164,181,182,164,164,6,7,164,164,164,164,
|
||||
47,172,173,173,173,158,190,191,164,164,15,16,164,164,164,164,
|
||||
53,22,22,22,23,163,164,164,164,164,164,164,164,164,193,164,
|
||||
1,1,1,1,28,172,173,173,173,173,173,173,173,173,173,173,
|
||||
1,1,1,1,37,22,22,22,22,22,1,1,22,22,22,22,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="0" y="16" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
31,31,31,31,31,20,1,1,1,1,1,1,1,1,1,1,
|
||||
2,2,2,2,4,386,31,1,1,31,20,1,1,1,1,1,
|
||||
11,11,11,11,13,234,3,1,1,4,29,1,1,1,1,1,
|
||||
155,155,155,155,156,243,12,1,1,13,29,1,1,1,1,1,
|
||||
164,164,164,164,165,173,154,155,155,156,29,1,1,1,1,1,
|
||||
164,164,164,164,165,25,172,173,173,174,29,1,1,1,1,1,
|
||||
164,164,164,164,165,368,22,22,22,22,38,1,1,1,1,1,
|
||||
164,164,164,164,165,29,1,1,1,1,1,1,1,1,1,1,
|
||||
157,173,173,173,174,29,1,1,1,1,1,1,1,1,1,1,
|
||||
165,21,22,22,22,38,1,1,1,1,1,1,1,1,1,1,
|
||||
174,29,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
22,38,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="6" name="Calque de Tuiles 2" width="30" height="20">
|
||||
<data encoding="csv">
|
||||
<chunk x="-32" y="0" width="16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1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="0" y="0" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,57,58,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,66,67,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,75,76,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
0,253,206,256,207,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,251,260,242,216,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="-32" y="16" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,773,774,1,1,1,1,1,1,773,774,773,774,
|
||||
1,1,1,1,782,783,751,752,753,1,1,1,782,783,782,783,
|
||||
1,1,1,1,791,792,760,761,762,1,1,1,791,792,791,792,
|
||||
1,1,1,1,1,771,772,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,780,781,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,789,790,1,754,755,755,756,1,754,756,1,
|
||||
1,1,1,1,1,1,1,1,763,764,764,765,1,763,765,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="-16" y="16" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,701,1,1,1,701,1,1,1,1,1,1,701,1,
|
||||
1,1,1,710,1,1,1,710,1,1,1,1,1,1,710,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="0" y="16" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,701,1,1,1,1,57,58,1,1,1,1,1,1,1,
|
||||
1,1,710,1,1,1,1,66,67,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,75,76,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,252,260,251,260,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,261,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="7" name="Calque de Tuiles 3" width="30" height="20">
|
||||
<data encoding="csv">
|
||||
<chunk x="-32" y="0" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|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|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="0" y="0" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="-32" y="16" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,341,342,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,395,396,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="-16" y="16" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,341,342,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,350,351,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
<chunk x="0" y="16" width="16" height="16">
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
</chunk>
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
|
@ -1,118 +0,0 @@
|
|||
{
|
||||
"TileMapWidth": 22,
|
||||
"TileMapHeight": 21,
|
||||
|
||||
"Layer 1": [
|
||||
[297, 306, 306, 306, 306, 297, 306, 297, 297, 306, 297, 306, 297, 408, 306, 306, 278, 297, 278, 306, 278, 297],
|
||||
[278, 278, 278, 297, 692, 306, 306, 306, 306, 297, 278, 297, 297, 417, 306, 278, 297, 306, 278, 630, 278, 297],
|
||||
[306, 297, 278, 278, 306, 278, 278, 297, 297, 278, 278, 306, 278, 297, 297, 278, 297, 306, 297, 306, 306, 306],
|
||||
[278, 278, 278, 278, 306, 297, 297, 306, 297, 297, 297, 278, 297, 306, 297, 297, 306, 297, 306, 306, 278, 297],
|
||||
[306, 297, 306, 278, 297, 297, 297, 306, 278, 306, 278, 297, 306, 297, 278, 306, 278, 297, 297, 306, 297, 297],
|
||||
[297, 278, 274, 282, 306, 297, 297, 297, 306, 297, 297, 306, 306, 297, 297, 278, 278, 297, 274, 282, 297, 297],
|
||||
[306, 278, 273, 274, 278, 278, 306, 302, 310, 309, 330, 330, 310, 309, 299, 306, 278, 297, 274, 274, 278, 306],
|
||||
[297, 278, 274, 282, 297, 297, 302, 311, 319, 318, 322, 323, 319, 318, 308, 310, 299, 278, 283, 273, 306, 278],
|
||||
[297, 297, 274, 274, 302, 310, 311, 320, 328, 327, 331, 332, 328, 327, 317, 319, 308, 299, 273, 273, 297, 278],
|
||||
[306, 297, 283, 273, 285, 319, 320, 329, 306, 306, 306, 306, 306, 297, 326, 328, 317, 280, 282, 283, 297, 306],
|
||||
[278, 278, 283, 273, 285, 329, 324, 278, 297, 297, 306, 306, 306, 297, 297, 315, 326, 280, 283, 274, 306, 306],
|
||||
[306, 278, 274, 274, 285, 297, 306, 306, 297, 306, 315, 297, 278, 306, 306, 278, 297, 280, 274, 282, 278, 278],
|
||||
[278, 278, 274, 273, 285, 278, 297, 306, 306, 297, 306, 306, 278, 306, 297, 306, 306, 280, 274, 273, 278, 278],
|
||||
[278, 599, 283, 273, 275, 306, 297, 297, 278, 306, 278, 306, 278, 297, 333, 306, 278, 272, 282, 283, 297, 297],
|
||||
[607, 608, 609, 274, 283, 1, 278, 306, 324, 278, 297, 364, 365, 366, 278, 297, 274, 282, 274, 283, 278, 306],
|
||||
[306, 297, 273, 438, 439, 274, 274, 306, 306, 278, 306, 373, 374, 375, 272, 273, 283, 659, 660, 274, 297, 278],
|
||||
[278, 297, 306, 278, 278, 306, 278, 306, 306, 364, 365, 365, 366, 278, 306, 278, 306, 412, 306, 278, 278, 278],
|
||||
[306, 278, 278, 297, 297, 297, 297, 278, 278, 373, 374, 374, 375, 297, 306, 306, 278, 297, 306, 306, 306, 306],
|
||||
[278, 278, 306, 297, 306, 306, 278, 278, 297, 373, 374, 374, 375, 306, 306, 297, 278, 278, 278, 297, 278, 278],
|
||||
[278, 297, 278, 306, 306, 278, 278, 278, 278, 382, 363, 374, 379, 366, 278, 297, 278, 278, 306, 297, 278, 297],
|
||||
[297, 306, 297, 278, 278, 278, 278, 278, 297, 306, 373, 374, 374, 375, 297, 306, 297, 306, 278, 297, 306, 278]
|
||||
],
|
||||
|
||||
"Layer 2": [
|
||||
[620, 621, 1, 682, 683, 684, 1, 640, 641, 1, 1, 406, 407, 646, 452, 453, 1, 619, 620, 621, 1, 1],
|
||||
[629, 630, 1, 691, 409, 693, 1, 649, 650, 1, 1, 415, 416, 655, 461, 462, 1, 628, 629, 397, 398, 1],
|
||||
[569, 570, 571, 1, 418, 419, 1, 658, 659, 1, 1, 424, 425, 664, 470, 471, 1, 421, 422, 406, 407, 408],
|
||||
[578, 579, 580, 1, 427, 428, 1, 667, 668, 1, 1, 433, 434, 435, 479, 480, 1, 430, 431, 415, 416, 417],
|
||||
[587, 588, 589, 1, 1, 437, 1, 1, 677, 1, 1, 442, 443, 1, 488, 489, 1, 439, 440, 424, 425, 426],
|
||||
[596, 597, 598, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 508, 509, 510, 511, 512],
|
||||
[605, 606, 607, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 457, 518, 519, 520, 521],
|
||||
[614, 615, 616, 1, 1, 464, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 407, 408, 529, 629],
|
||||
[1, 1, 585, 558, 1, 1, 1, 1, 1, 515, 1, 1, 516, 1, 1, 1, 1, 1, 416, 417, 538, 1],
|
||||
[1, 1, 1, 1, 1, 1, 638, 639, 1, 1, 1, 1, 1, 1, 533, 1, 1, 1, 425, 546, 547, 1],
|
||||
[1, 644, 645, 646, 1, 532, 647, 648, 1, 1, 1, 1, 1, 1, 515, 1, 1, 1, 434, 1, 1, 1],
|
||||
[1, 653, 654, 655, 1, 1, 534, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 586, 587, 588, 589],
|
||||
[1, 662, 663, 664, 1, 1, 514, 1, 714, 1, 1, 1, 1, 1, 1, 525, 514, 1, 595, 596, 597, 598],
|
||||
[670, 418, 419, 420, 1, 276, 1, 1, 1, 1, 1, 1, 697, 1, 1, 1, 640, 641, 642, 605, 606, 607],
|
||||
[1, 427, 428, 429, 567, 275, 265, 266, 1, 516, 1, 1, 1, 1, 271, 264, 649, 650, 651, 614, 615, 616],
|
||||
[1, 436, 493, 494, 1, 440, 460, 461, 264, 265, 265, 265, 264, 264, 400, 401, 402, 403, 404, 662, 662, 663],
|
||||
[1, 1, 502, 503, 1, 1, 469, 470, 471, 1, 1, 1, 1, 1, 409, 410, 411, 404, 669, 1, 671, 672],
|
||||
[1, 1, 511, 512, 570, 571, 572, 573, 480, 1, 1, 715, 1, 1, 418, 419, 420, 413, 678, 1, 680, 681],
|
||||
[1, 1, 520, 521, 579, 580, 581, 582, 583, 1, 1, 1, 1, 1, 427, 428, 429, 422, 687, 1, 689, 690],
|
||||
[1, 1, 529, 530, 588, 589, 590, 591, 592, 1, 1, 1, 1, 1, 1, 1, 1, 431, 1, 1, 1, 1],
|
||||
[1, 1, 538, 1, 597, 598, 599, 600, 1, 1, 1, 1, 1, 1, 1, 1, 1, 440, 1, 1, 1, 1]
|
||||
],
|
||||
|
||||
"Layer 3": [
|
||||
[551, 552, 553, 554, 400, 401, 402, 403, 404, 642, 643, 644, 645, 451, 400, 401, 402, 403, 404, 388, 389, 390],
|
||||
[560, 561, 562, 563, 564, 410, 411, 412, 413, 651, 652, 653, 654, 460, 409, 410, 411, 412, 473, 474, 475, 399],
|
||||
[474, 475, 0, 572, 573, 574, 420, 421, 422, 660, 661, 662, 663, 469, 418, 419, 420, 481, 482, 483, 484, 485],
|
||||
[483, 484, 485, 581, 582, 583, 429, 430, 431, 669, 670, 671, 672, 478, 427, 428, 429, 490, 491, 492, 493, 494],
|
||||
[492, 493, 494, 590, 591, 592, 438, 439, 440, 678, 679, 680, 681, 487, 436, 437, 438, 499, 500, 501, 502, 503],
|
||||
[501, 502, 503, 599, 600, 446, 447, 448, 686, 687, 688, 689, 690, 496, 497, 498, 447, 388, 389, 390, 610, 611],
|
||||
[510, 511, 512, 608, 609, 455, 456, 457, 1, 1, 313, 314, 1, 505, 506, 455, 456, 397, 398, 399, 619, 620],
|
||||
[519, 520, 521, 617, 618, 464, 465, 466, 1, 1, 1, 1, 1, 1, 1, 464, 465, 406, 550, 551, 552, 553],
|
||||
[625, 626, 627, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 415, 559, 560, 561, 562],
|
||||
[634, 635, 636, 637, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 424, 568, 569, 570, 571],
|
||||
[643, 391, 392, 393, 394, 1, 1, 1, 1, 1, 1, 1, 1, 1, 391, 1, 1, 433, 577, 578, 579, 580],
|
||||
[652, 400, 401, 402, 403, 404, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 622, 623, 624, 625, 626, 1],
|
||||
[661, 409, 410, 411, 412, 413, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 631, 632, 633, 634, 635, 636],
|
||||
[473, 474, 475, 476, 421, 422, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 640, 641, 1, 643, 644, 645],
|
||||
[482, 483, 484, 485, 430, 431, 451, 452, 453, 1, 1, 1, 1, 1, 1, 392, 393, 394, 1, 652, 653, 654],
|
||||
[491, 492, 1, 551, 552, 553, 554, 555, 462, 1, 1, 1, 1, 1, 392, 393, 394, 472, 473, 474, 475, 476],
|
||||
[500, 501, 559, 560, 561, 562, 563, 564, 565, 1, 1, 1, 1, 400, 401, 402, 403, 481, 482, 483, 484, 485],
|
||||
[509, 510, 568, 569, 472, 473, 474, 475, 574, 1, 1, 1, 1, 409, 410, 411, 412, 490, 491, 492, 493, 494],
|
||||
[518, 519, 577, 578, 481, 482, 483, 484, 485, 1, 1, 1, 1, 418, 419, 420, 421, 499, 500, 501, 502, 503],
|
||||
[527, 528, 586, 587, 490, 491, 492, 493, 494, 1, 1, 1, 1, 427, 428, 429, 430, 508, 509, 510, 511, 512],
|
||||
[536, 537, 595, 596, 499, 500, 501, 502, 503, 1, 1, 1, 1, 436, 437, 438, 439, 517, 518, 519, 520, 521]
|
||||
],
|
||||
|
||||
"Hitboxes": [
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
],
|
||||
|
||||
"NextMaps": [
|
||||
{
|
||||
"Number": 2,
|
||||
|
||||
"Path": "ressources/maps/map dungeon 1.json",
|
||||
|
||||
"PlayerInitPos": {
|
||||
"x": 22,
|
||||
"y": 30
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"PlayerInitPos": {
|
||||
"x": 10,
|
||||
"y": 11
|
||||
}
|
||||
}
|
|
@ -1,434 +0,0 @@
|
|||
{
|
||||
"TileMapWidth": 51,
|
||||
"TileMapHeight": 33,
|
||||
|
||||
"Layer 1": [
|
||||
[19, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 20, 1, 1, 1, 1, 1, 19, 31, 31, 163, 165, 31, 31, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[28, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 29, 1, 1, 1, 1, 1, 28, 3, 2, 163, 165, 2, 4, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[28, 12, 11, 11, 11, 11, 95, 95, 11, 11, 11, 11, 13, 29, 1, 1, 1, 1, 1, 28, 12, 11, 163, 165, 11, 13, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[28, 154, 155, 155, 155, 130, 131, 131, 132, 155, 155, 155, 156, 29, 1, 1, 1, 1, 1, 28, 154, 155, 167, 166, 155, 156, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[28, 163, 164, 164, 164, 139, 140, 140, 141, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 20],
|
||||
[28, 163, 164, 181, 182, 148, 149, 149, 150, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 29],
|
||||
[28, 163, 164, 190, 191, 164, 164, 164, 164, 183, 164, 164, 165, 29, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 29],
|
||||
[28, 163, 164, 164, 164, 193, 164, 164, 164, 164, 193, 164, 165, 29, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 154, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 156, 29],
|
||||
[28, 172, 173, 173, 173, 173, 158, 157, 173, 173, 173, 173, 174, 29, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 193, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 165, 29],
|
||||
[37, 22, 22, 22, 359, 46, 163, 165, 46, 377, 22, 22, 22, 38, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 172, 173, 173, 173, 173, 173, 173, 173, 158, 157, 173, 173, 174, 29],
|
||||
[1, 1, 1, 1, 28, 3, 163, 165, 4, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 52, 46, 46, 46, 46, 46, 46, 46, 46, 163, 165, 46, 46, 46, 44],
|
||||
[1, 1, 1, 1, 28, 12, 163, 165, 13, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 3, 2, 2, 2, 2, 2, 2, 2, 163, 165, 2, 2, 4, 29],
|
||||
[1, 1, 1, 1, 28, 154, 167, 166, 156, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 12, 11, 11, 11, 11, 11, 11, 11, 163, 165, 11, 11, 13, 29],
|
||||
[1, 1, 1, 1, 28, 163, 164, 164, 165, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 163, 164, 164, 164, 164, 165, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 154, 155, 155, 155, 155, 155, 155, 155, 167, 166, 155, 155, 156, 29],
|
||||
[1, 1, 1, 1, 28, 163, 164, 164, 165, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 163, 164, 164, 164, 164, 165, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 163, 164, 164, 157, 173, 173, 173, 173, 173, 173, 173, 173, 174, 29],
|
||||
[1, 1, 1, 1, 28, 163, 164, 164, 165, 15, 11, 11, 11, 11, 11, 11, 10, 11, 11, 16, 163, 164, 164, 164, 164, 165, 15, 11, 11, 11, 11, 11, 11, 11, 11, 11, 16, 163, 164, 164, 165, 21, 22, 22, 22, 22, 22, 22, 22, 22, 38],
|
||||
[1, 1, 1, 1, 28, 163, 164, 164, 166, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 167, 164, 164, 164, 164, 166, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 167, 164, 164, 165, 30, 31, 31, 31, 31, 31, 31, 31, 31, 20],
|
||||
[1, 1, 1, 1, 28, 172, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 158, 183, 164, 164, 164, 157, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 158, 164, 164, 165, 6, 2, 2, 2, 2, 2, 2, 2, 4, 29],
|
||||
[1, 1, 1, 1, 37, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 163, 164, 164, 164, 164, 165, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 163, 164, 164, 165, 15, 11, 11, 10, 11, 11, 11, 11, 13, 29],
|
||||
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 183, 166, 155, 155, 155, 155, 155, 155, 155, 155, 156, 29],
|
||||
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 172, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 174, 29],
|
||||
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 37, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 38],
|
||||
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 31, 31, 31, 31, 31, 32, 163, 164, 164, 164, 164, 165, 30, 31, 31, 31, 31, 31, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 19, 31, 31, 31, 31, 31, 360, 3, 2, 2, 2, 2, 7, 163, 164, 164, 164, 164, 165, 6, 2, 2, 2, 2, 4, 386, 31, 31, 31, 31, 31, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 28, 3, 2, 2, 2, 4, 33, 12, 11, 11, 11, 11, 16, 163, 164, 164, 164, 164, 165, 15, 11, 11, 11, 11, 13, 33, 2, 2, 2, 2, 4, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 28, 12, 11, 11, 11, 13, 234, 154, 155, 155, 155, 155, 155, 167, 164, 164, 164, 164, 166, 155, 155, 155, 155, 155, 156, 234, 11, 11, 10, 11, 13, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 28, 154, 155, 155, 155, 156, 243, 163, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 165, 243, 154, 155, 155, 155, 156, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 28, 163, 164, 192, 193, 166, 155, 167, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 166, 155, 167, 164, 164, 164, 165, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 28, 172, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 158, 157, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 174, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
[1, 1, 1, 1, 1, 1, 1, 37, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 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 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
],
|
||||
|
||||
"NextMaps": [
|
||||
{
|
||||
"Number": 2,
|
||||
|
||||
"Path": "ressources/maps/dungeon entry.json",
|
||||
|
||||
"PlayerInitPos": {
|
||||
"x": 10,
|
||||
"y": 7
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"Entities": [
|
||||
[
|
||||
{
|
||||
"Type": "TransformComponent",
|
||||
|
||||
"Position": {
|
||||
"x": 47,
|
||||
"y": 12
|
||||
},
|
||||
|
||||
"Dimension": {
|
||||
"x": 48,
|
||||
"y": 32
|
||||
},
|
||||
|
||||
"Scale": 2,
|
||||
|
||||
"Speed": 0
|
||||
},
|
||||
{
|
||||
"Type": "SpriteComponent",
|
||||
|
||||
"Path": "ressources/props/lever.png"
|
||||
},
|
||||
{
|
||||
"Type": "AnimationSystem",
|
||||
|
||||
"NbFrames": 3,
|
||||
|
||||
"CurrentFrame": 0,
|
||||
|
||||
"FrameDelay": 10,
|
||||
|
||||
"PlayAnimation": false
|
||||
},
|
||||
{
|
||||
"Type": "HitboxComponent",
|
||||
|
||||
"Scale": {
|
||||
"x": 0.33333,
|
||||
"y": 0.21875
|
||||
},
|
||||
|
||||
"Position": {
|
||||
"x": 0.5,
|
||||
"y": 0.82
|
||||
}
|
||||
},
|
||||
{
|
||||
"Type": "Lever",
|
||||
|
||||
"Channel": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"Type": "TransformComponent",
|
||||
|
||||
"Position": {
|
||||
"x": 47,
|
||||
"y": 18
|
||||
},
|
||||
|
||||
"Dimension": {
|
||||
"x": 48,
|
||||
"y": 32
|
||||
},
|
||||
|
||||
"Scale": 2,
|
||||
|
||||
"Speed": 0
|
||||
},
|
||||
{
|
||||
"Type": "SpriteComponent",
|
||||
|
||||
"Path": "ressources/props/lever.png"
|
||||
},
|
||||
{
|
||||
"Type": "AnimationSystem",
|
||||
|
||||
"NbFrames": 3,
|
||||
|
||||
"CurrentFrame": 0,
|
||||
|
||||
"FrameDelay": 10,
|
||||
|
||||
"PlayAnimation": false
|
||||
},
|
||||
{
|
||||
"Type": "HitboxComponent",
|
||||
|
||||
"Scale": {
|
||||
"x": 0.33333,
|
||||
"y": 0.21875
|
||||
},
|
||||
|
||||
"Position": {
|
||||
"x": 0.5,
|
||||
"y": 0.82
|
||||
}
|
||||
},
|
||||
{
|
||||
"Type": "Lever",
|
||||
|
||||
"Channel": 1
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"Type": "TransformComponent",
|
||||
|
||||
"Position": {
|
||||
"x": 23,
|
||||
"y": 1
|
||||
},
|
||||
|
||||
"Dimension": {
|
||||
"x": 16,
|
||||
"y": 32
|
||||
},
|
||||
|
||||
"Scale": 2,
|
||||
|
||||
"Speed": 0
|
||||
},
|
||||
{
|
||||
"Type": "SpriteComponent",
|
||||
|
||||
"Path": "ressources/props/lock.png"
|
||||
},
|
||||
{
|
||||
"Type": "AnimationSystem",
|
||||
|
||||
"NbFrames": 7,
|
||||
|
||||
"CurrentFrame": 0,
|
||||
|
||||
"FrameDelay": 8,
|
||||
|
||||
"PlayAnimation": false
|
||||
},
|
||||
{
|
||||
"Type": "Lock",
|
||||
|
||||
"Channel": 2
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"Type": "TransformComponent",
|
||||
|
||||
"Position": {
|
||||
"x": 45,
|
||||
"y": 10
|
||||
},
|
||||
|
||||
"Dimension": {
|
||||
"x": 32,
|
||||
"y": 48
|
||||
},
|
||||
|
||||
"Scale": 2,
|
||||
|
||||
"Speed": 0
|
||||
},
|
||||
{
|
||||
"Type": "SpriteComponent",
|
||||
|
||||
"Path": "ressources/props/barred door 2.png"
|
||||
},
|
||||
{
|
||||
"Type": "AnimationSystem",
|
||||
|
||||
"NbFrames": 8,
|
||||
|
||||
"CurrentFrame": 0,
|
||||
|
||||
"FrameDelay": 3,
|
||||
|
||||
"PlayAnimation": false
|
||||
},
|
||||
{
|
||||
"Type": "HitboxComponent",
|
||||
|
||||
"Scale": {
|
||||
"x": 1,
|
||||
"y": 0.6666666666666
|
||||
},
|
||||
|
||||
"Position": {
|
||||
"x": 0,
|
||||
"y": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"Type": "Door",
|
||||
|
||||
"States": [
|
||||
{
|
||||
"Channel": 0,
|
||||
"State": false
|
||||
},
|
||||
{
|
||||
"Channel": 1,
|
||||
"State": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"Type": "TransformComponent",
|
||||
|
||||
"Position": {
|
||||
"x": 6,
|
||||
"y": 9
|
||||
},
|
||||
|
||||
"Dimension": {
|
||||
"x": 32,
|
||||
"y": 48
|
||||
},
|
||||
|
||||
"Scale": 2,
|
||||
|
||||
"Speed": 0
|
||||
},
|
||||
{
|
||||
"Type": "SpriteComponent",
|
||||
|
||||
"Path": "ressources/props/barred door 2.png"
|
||||
},
|
||||
{
|
||||
"Type": "AnimationSystem",
|
||||
|
||||
"NbFrames": 8,
|
||||
|
||||
"CurrentFrame": 0,
|
||||
|
||||
"FrameDelay": 3,
|
||||
|
||||
"PlayAnimation": false
|
||||
},
|
||||
{
|
||||
"Type": "HitboxComponent",
|
||||
|
||||
"Scale": {
|
||||
"x": 1,
|
||||
"y": 0.6666666666666
|
||||
},
|
||||
|
||||
"Position": {
|
||||
"x": 0,
|
||||
"y": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"Type": "Door",
|
||||
|
||||
"States": [
|
||||
{
|
||||
"Channel": 0,
|
||||
"State": true
|
||||
},
|
||||
{
|
||||
"Channel": 1,
|
||||
"State": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 928 B |
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 1004 B |
Before Width: | Height: | Size: 621 B |
Before Width: | Height: | Size: 670 B |
Before Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 68 KiB |
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tileset version="1.10" tiledversion="1.11.0" name="tileset" tilewidth="16" tileheight="16" tilecount="1053" columns="9">
|
||||
<image source="tileset.png" width="144" height="1408"/>
|
||||
</tileset>
|
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 793 B |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
@ -0,0 +1,111 @@
|
|||
#include <gint/kmalloc.h>
|
||||
#include "animation_system.h"
|
||||
#include "../game.h"
|
||||
|
||||
// Args : size_t nb_frames, size_t actual_frame, float frame_delay_ms, bool play, bool loop, bool reverse
|
||||
void animation_system_init(component_t *component, va_list args)
|
||||
{
|
||||
animation_system_data_t *system_data = component->component_data.animation_system_data;
|
||||
|
||||
system_data->sprite_component_data = get_component(component->entity, SPRITE_COMPONENT)->component_data.sprite_component_data;
|
||||
|
||||
system_data->nb_frames = va_arg(args, size_t);
|
||||
system_data->actual_frame_nb= va_arg(args, size_t);
|
||||
system_data->frame_delay_ms = (float)va_arg(args, double);
|
||||
system_data->play = (bool)va_arg(args, int);
|
||||
system_data->loop = (bool)va_arg(args, int);
|
||||
system_data->reverse = (bool)va_arg(args, int);
|
||||
|
||||
system_data->frame_timer_ms = 0;
|
||||
|
||||
linked_list_init(&system_data->frames, sizeof(rect_t), NULL);
|
||||
|
||||
animation_system_create_frames_clips(system_data);
|
||||
}
|
||||
|
||||
void animation_system_update(component_t *component)
|
||||
{
|
||||
animation_system_data_t *system_data = component->component_data.animation_system_data;
|
||||
|
||||
if(system_data->play)
|
||||
{
|
||||
system_data->frame_timer_ms += (float)game.delta_time_ms;
|
||||
|
||||
if(system_data->frame_timer_ms >= system_data->frame_delay_ms)
|
||||
{
|
||||
system_data->frame_timer_ms = 0;
|
||||
|
||||
if(system_data->reverse)
|
||||
{
|
||||
if(system_data->actual_frame->prev)
|
||||
{
|
||||
system_data->actual_frame = system_data->actual_frame->prev;
|
||||
system_data->actual_frame_nb--;
|
||||
}
|
||||
else if(!system_data->loop)
|
||||
{
|
||||
system_data->play = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
system_data->actual_frame = system_data->frames.last;
|
||||
system_data->actual_frame_nb = system_data->frames.size - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(system_data->actual_frame->next)
|
||||
{
|
||||
system_data->actual_frame = system_data->actual_frame->next;
|
||||
system_data->actual_frame_nb++;
|
||||
}
|
||||
else if(!system_data->loop)
|
||||
{
|
||||
system_data->play = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
system_data->actual_frame = system_data->frames.first;
|
||||
system_data->actual_frame_nb = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
system_data->sprite_component_data->srcR = *(rect_t *)system_data->actual_frame->data;
|
||||
}
|
||||
}
|
||||
|
||||
inline void animation_system_destroy(component_t *component)
|
||||
{
|
||||
linked_list_clear(&component->component_data.animation_system_data->frames);
|
||||
kfree(component->component_data.animation_system_data);
|
||||
}
|
||||
|
||||
void animation_system_create_frames_clips(animation_system_data_t *system_data)
|
||||
{
|
||||
linked_list_clear(&system_data->frames);
|
||||
|
||||
rect_t *sprite_srcR = &system_data->sprite_component_data->srcR;
|
||||
|
||||
for(size_t actual_frame_nb = 0; actual_frame_nb < system_data->nb_frames; actual_frame_nb++)
|
||||
{
|
||||
elem_t *frame = elem_create(&system_data->frames);
|
||||
|
||||
((rect_t *)frame->data)->x = sprite_srcR->w * (float)actual_frame_nb;
|
||||
((rect_t *)frame->data)->y = 0;
|
||||
((rect_t *)frame->data)->w = sprite_srcR->w;
|
||||
((rect_t *)frame->data)->h = sprite_srcR->h;
|
||||
|
||||
linked_list_push_back_elem(&system_data->frames, frame);
|
||||
}
|
||||
|
||||
system_data->actual_frame = linked_list_get_elem(&system_data->frames, system_data->actual_frame_nb);
|
||||
}
|
||||
|
||||
inline void animation_system_change_animation(animation_system_data_t *system_data, const char *name, size_t nb_frames)
|
||||
{
|
||||
system_data->nb_frames = nb_frames;
|
||||
sprite_component_set_texture(system_data->sprite_component_data, name);
|
||||
animation_system_create_frames_clips(system_data);
|
||||
system_data->sprite_component_data->srcR = *(rect_t *)system_data->actual_frame->data;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef ANIMATION_SYSTEM_H
|
||||
#define ANIMATION_SYSTEM_H
|
||||
|
||||
#include "ecs.h"
|
||||
#include "sprite_component.h"
|
||||
|
||||
typedef struct animation_system_data_t {
|
||||
sprite_component_data_t *sprite_component_data;
|
||||
|
||||
bool play :1;
|
||||
bool loop :1;
|
||||
bool reverse :1;
|
||||
|
||||
float frame_delay_ms;
|
||||
float frame_timer_ms;
|
||||
|
||||
elem_t *actual_frame;
|
||||
size_t actual_frame_nb;
|
||||
|
||||
size_t nb_frames;
|
||||
linked_list_t frames;
|
||||
} animation_system_data_t;
|
||||
|
||||
void animation_system_init(component_t *, va_list);
|
||||
|
||||
void animation_system_update(component_t *);
|
||||
|
||||
void animation_system_destroy(component_t *);
|
||||
|
||||
void animation_system_create_frames_clips(animation_system_data_t *);
|
||||
|
||||
void animation_system_change_animation(animation_system_data_t *, const char *, size_t);
|
||||
|
||||
#endif // SPRITE_COMPONENT_H
|
|
@ -0,0 +1,10 @@
|
|||
#ifndef COMPONENTS_H
|
||||
#define COMPONENTS_H
|
||||
|
||||
#include "transform_component.h"
|
||||
#include "sprite_component.h"
|
||||
#include "animation_system.h"
|
||||
#include "player_system.h"
|
||||
// Add new components header file here
|
||||
|
||||
#endif // COMPONENTS_H
|
|
@ -0,0 +1,194 @@
|
|||
#include <gint/kmalloc.h>
|
||||
#include <stdarg.h>
|
||||
#include "ecs.h"
|
||||
#include "components.h"
|
||||
|
||||
component_t *create_component(component_type_t component_type)
|
||||
{
|
||||
component_t *component = kmalloc(sizeof(component_t), NULL);
|
||||
component->component_type = component_type;
|
||||
|
||||
switch(component_type)
|
||||
{
|
||||
case TRANSFORM_COMPONENT:
|
||||
component->component_init = transform_component_init;
|
||||
component->component_update = transform_component_update;
|
||||
component->component_draw = NULL;
|
||||
|
||||
component->component_data.transform_component_data = kmalloc(sizeof(transform_component_data_t), NULL);
|
||||
if(!component->component_data.transform_component_data) return NULL;
|
||||
|
||||
component->component_deleter = transform_component_destroy;
|
||||
break;
|
||||
|
||||
case SPRITE_COMPONENT:
|
||||
component->component_init = sprite_component_init;
|
||||
component->component_update = sprite_component_update;
|
||||
component->component_draw = sprite_component_draw;
|
||||
|
||||
component->component_data.sprite_component_data = kmalloc(sizeof(sprite_component_data_t), NULL);
|
||||
if(!component->component_data.sprite_component_data) return NULL;
|
||||
|
||||
component->component_deleter = sprite_component_destroy;
|
||||
break;
|
||||
|
||||
case ANIMATION_SYSTEM:
|
||||
component->component_init = animation_system_init;
|
||||
component->component_update = animation_system_update;
|
||||
component->component_draw = NULL;
|
||||
|
||||
component->component_data.animation_system_data = kmalloc(sizeof(animation_system_data_t), NULL);
|
||||
if(!component->component_data.animation_system_data) return NULL;
|
||||
|
||||
component->component_deleter = animation_system_destroy;
|
||||
break;
|
||||
|
||||
case PLAYER_SYSTEM:
|
||||
component->component_init = player_system_init;
|
||||
component->component_update = player_system_update;
|
||||
component->component_draw = NULL;
|
||||
|
||||
component->component_data.player_system_data = kmalloc(sizeof(player_system_data_t), NULL);
|
||||
if(!component->component_data.player_system_data) return NULL;
|
||||
|
||||
component->component_deleter = player_system_destroy;
|
||||
break;
|
||||
|
||||
// Add new components attributions here
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return component;
|
||||
}
|
||||
|
||||
inline void destroy_component(component_t *component)
|
||||
{
|
||||
component->component_deleter(component);
|
||||
kfree(component);
|
||||
}
|
||||
|
||||
entity_t *create_entity(const char *name)
|
||||
{
|
||||
entity_t *entity = kmalloc(sizeof(entity_t), NULL);
|
||||
if(!entity) return NULL;
|
||||
|
||||
entity->name = name;
|
||||
entity->draw_priority = 0;
|
||||
linked_list_init(&entity->components, sizeof(component_t), (deleter_t)destroy_component);
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
void add_component(entity_t *entity, component_t *component, ...)
|
||||
{
|
||||
if(!component) return;
|
||||
|
||||
component->entity = entity;
|
||||
|
||||
va_list args, args_copy;
|
||||
va_start(args, component);
|
||||
va_copy(args_copy, args);
|
||||
|
||||
component->component_init(component, args_copy);
|
||||
|
||||
va_end(args_copy);
|
||||
va_end(args);
|
||||
|
||||
linked_list_push_back(&entity->components, component);
|
||||
}
|
||||
|
||||
// Only for this file
|
||||
// Arg : component_type_t component_type
|
||||
static inline bool condition_is_component_type(elem_t *elem, va_list args)
|
||||
{
|
||||
return ((component_t *)elem->data)->component_type == va_arg(args, component_type_t);
|
||||
}
|
||||
|
||||
inline component_t *get_component(entity_t *entity, component_type_t component_type)
|
||||
{
|
||||
return linked_list_get_if(&entity->components, condition_is_component_type, component_type);
|
||||
}
|
||||
|
||||
// Only for this file
|
||||
// No args
|
||||
static inline void action_update_component(elem_t *elem, va_list args __attribute__((unused)))
|
||||
{
|
||||
component_t *component = elem->data;
|
||||
component->component_update(component);
|
||||
}
|
||||
|
||||
inline void update_entity(entity_t *entity)
|
||||
{
|
||||
linked_list_for_each(&entity->components, action_update_component);
|
||||
}
|
||||
|
||||
// Only for this file
|
||||
// No args
|
||||
static inline void action_draw_component(elem_t *elem, va_list args __attribute__((unused)))
|
||||
{
|
||||
component_t *component = elem->data;
|
||||
if(component->component_draw) component->component_draw(component);
|
||||
}
|
||||
|
||||
inline void draw_entity(entity_t *entity)
|
||||
{
|
||||
linked_list_for_each(&entity->components, action_draw_component);
|
||||
}
|
||||
|
||||
inline void destroy_entity(entity_t *entity)
|
||||
{
|
||||
linked_list_clear(&entity->components);
|
||||
kfree(entity);
|
||||
}
|
||||
|
||||
inline void entity_manager_init(entity_manager_t *entity_manager)
|
||||
{
|
||||
linked_list_init(&entity_manager->entities, sizeof(entity_t), (deleter_t)destroy_entity);
|
||||
}
|
||||
|
||||
inline entity_t *entity_manager_add_entity(entity_manager_t *entity_manager, const char *name)
|
||||
{
|
||||
entity_t *entity = create_entity(name);
|
||||
linked_list_push_back(&entity_manager->entities, entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
// Only for this file
|
||||
static inline void action_update_entity(elem_t *elem, va_list args __attribute__((unused)))
|
||||
{
|
||||
update_entity(elem->data);
|
||||
}
|
||||
|
||||
inline void entity_manager_update(entity_manager_t *entity_manager)
|
||||
{
|
||||
linked_list_for_each(&entity_manager->entities, action_update_entity);
|
||||
}
|
||||
|
||||
// Only for this file
|
||||
static inline void action_draw_entity(elem_t *elem, va_list args __attribute__((unused)))
|
||||
{
|
||||
draw_entity(elem->data);
|
||||
}
|
||||
|
||||
inline void entity_manager_draw(entity_manager_t *entity_manager)
|
||||
{
|
||||
linked_list_for_each(&entity_manager->entities, action_draw_entity);
|
||||
}
|
||||
|
||||
// Only for this file
|
||||
static inline bool condition_is_entity_name(elem_t *elem, va_list args)
|
||||
{
|
||||
return ((entity_t *)elem->data)->name == va_arg(args, const char *);
|
||||
}
|
||||
|
||||
inline void entity_manager_remove_entity(entity_manager_t *entity_manager, const char *name)
|
||||
{
|
||||
linked_list_remove_if(&entity_manager->entities, condition_is_entity_name, name);
|
||||
}
|
||||
|
||||
inline void entity_manager_clear(entity_manager_t *entity_manager)
|
||||
{
|
||||
linked_list_clear(&entity_manager->entities);
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
#ifndef ECS_H
|
||||
#define ECS_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "../linked_list.h"
|
||||
|
||||
typedef enum component_type_t {
|
||||
TRANSFORM_COMPONENT,
|
||||
SPRITE_COMPONENT,
|
||||
ANIMATION_SYSTEM,
|
||||
PLAYER_SYSTEM
|
||||
} component_type_t;
|
||||
|
||||
typedef struct transform_component_data_t transform_component_data_t;
|
||||
typedef struct sprite_component_data_t sprite_component_data_t;
|
||||
typedef struct animation_system_data_t animation_system_data_t;
|
||||
typedef struct player_system_data_t player_system_data_t;
|
||||
|
||||
typedef struct component_t component_t;
|
||||
|
||||
typedef void (*component_init_t)(component_t *, va_list);
|
||||
typedef void (*component_update_t)(component_t *);
|
||||
typedef void (*component_draw_t)(component_t *);
|
||||
|
||||
typedef void (*component_deleter_t)(component_t *);
|
||||
|
||||
typedef struct component_t {
|
||||
component_type_t component_type;
|
||||
|
||||
struct entity_t *entity;
|
||||
|
||||
component_init_t component_init;
|
||||
component_update_t component_update;
|
||||
component_draw_t component_draw;
|
||||
|
||||
union {
|
||||
transform_component_data_t *transform_component_data;
|
||||
sprite_component_data_t *sprite_component_data;
|
||||
animation_system_data_t *animation_system_data;
|
||||
player_system_data_t *player_system_data;
|
||||
} component_data;
|
||||
|
||||
component_deleter_t component_deleter;
|
||||
} component_t;
|
||||
|
||||
component_t *create_component(component_type_t);
|
||||
|
||||
void destroy_component(component_t *);
|
||||
|
||||
typedef struct entity_t {
|
||||
const char *name;
|
||||
size_t draw_priority;
|
||||
linked_list_t components;
|
||||
} entity_t;
|
||||
|
||||
entity_t *create_entity(const char *name);
|
||||
|
||||
void add_component(entity_t *, component_t *, ...);
|
||||
|
||||
component_t *get_component(entity_t *, component_type_t);
|
||||
|
||||
void update_entity(entity_t *);
|
||||
|
||||
void draw_entity(entity_t *);
|
||||
|
||||
void destroy_entity(entity_t *);
|
||||
|
||||
typedef struct entity_manager_t {
|
||||
linked_list_t entities;
|
||||
} entity_manager_t;
|
||||
|
||||
void entity_manager_init(entity_manager_t *);
|
||||
|
||||
entity_t *entity_manager_add_entity(entity_manager_t *, const char *);
|
||||
|
||||
void entity_manager_update(entity_manager_t *);
|
||||
|
||||
void entity_manager_draw(entity_manager_t *);
|
||||
|
||||
void entity_manager_remove_entity(entity_manager_t *, const char *);
|
||||
|
||||
void entity_manager_clear(entity_manager_t *);
|
||||
|
||||
#endif // ECS_H
|
|
@ -0,0 +1,79 @@
|
|||
#include <gint/kmalloc.h>
|
||||
#include "player_system.h"
|
||||
#include "animation_system.h"
|
||||
#include "sprite_component.h"
|
||||
#include "transform_component.h"
|
||||
#include "../game.h"
|
||||
|
||||
// No args
|
||||
void player_system_init(component_t *component, va_list args __attribute__((unused)))
|
||||
{
|
||||
player_system_data_t *system_data = component->component_data.player_system_data;
|
||||
|
||||
system_data->animation_system_data = get_component(component->entity, ANIMATION_SYSTEM)->component_data.animation_system_data;
|
||||
system_data->sprite_component_data = system_data->animation_system_data->sprite_component_data;
|
||||
system_data->transform_component_data = system_data->sprite_component_data->transform_component_data;
|
||||
|
||||
system_data->state = IDLE;
|
||||
}
|
||||
|
||||
// Only for this file
|
||||
static void player_system_get_inputs(component_t *component)
|
||||
{
|
||||
player_system_data_t *system_data = component->component_data.player_system_data;
|
||||
|
||||
system_data->last_state = system_data->state;
|
||||
|
||||
system_data->state &= 0xF0;
|
||||
|
||||
system_data->state |= game.event.keys[KEY_UP] * RUNNING_UP;
|
||||
system_data->state |= game.event.keys[KEY_DOWN] * RUNNING_DOWN;
|
||||
system_data->state |= game.event.keys[KEY_LEFT] * RUNNING_LEFT;
|
||||
system_data->state |= game.event.keys[KEY_RIGHT] * RUNNING_RIGHT;
|
||||
}
|
||||
|
||||
// Only for this file
|
||||
static void player_system_set_state_velocity_and_animation(component_t *component)
|
||||
{
|
||||
player_system_data_t *system_data = component->component_data.player_system_data;
|
||||
transform_component_data_t *transform_component_data = system_data->transform_component_data;
|
||||
sprite_component_data_t *sprite_component_data = system_data->sprite_component_data;
|
||||
animation_system_data_t *animation_system_data = system_data->animation_system_data;
|
||||
|
||||
transform_component_data->velocity.x =
|
||||
(float)((system_data->state & RUNNING_RIGHT) >> 3) - (float)((system_data->state & RUNNING_LEFT) >> 2);
|
||||
transform_component_data->velocity.y =
|
||||
(float)((system_data->state & RUNNING_DOWN) >> 1) - (float)(system_data->state & RUNNING_UP);
|
||||
|
||||
if(system_data->state & RUNNING_LEFT) sprite_component_data->flip = true;
|
||||
if(system_data->state & RUNNING_RIGHT) sprite_component_data->flip = false;
|
||||
|
||||
if(is_not_zero(transform_component_data->velocity.x) && is_not_zero(transform_component_data->velocity.y))
|
||||
{
|
||||
transform_component_data->velocity.x *= 0.707106781186548f;
|
||||
transform_component_data->velocity.y *= 0.707106781186548f;
|
||||
}
|
||||
|
||||
if((system_data->state & RUNNING) && !(system_data->last_state & RUNNING))
|
||||
{
|
||||
animation_system_data->frame_delay_ms = 200;
|
||||
animation_system_change_animation(animation_system_data, "player_run_sheet", 6);
|
||||
}
|
||||
else if(!(system_data->state & RUNNING) && (system_data->last_state & RUNNING))
|
||||
{
|
||||
animation_system_data->actual_frame_nb = 0;
|
||||
animation_system_data->frame_delay_ms = 200;
|
||||
animation_system_change_animation(animation_system_data, "player_idle_sheet", 4);
|
||||
}
|
||||
}
|
||||
|
||||
void player_system_update(component_t *component)
|
||||
{
|
||||
player_system_get_inputs(component);
|
||||
player_system_set_state_velocity_and_animation(component);
|
||||
}
|
||||
|
||||
void player_system_destroy(component_t *component)
|
||||
{
|
||||
kfree(component->component_data.player_system_data);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
#ifndef PLAYER_SYSTEM_H
|
||||
#define PLAYER_SYSTEM_H
|
||||
|
||||
#include "ecs.h"
|
||||
#include "transform_component.h"
|
||||
|
||||
typedef enum player_state_t {
|
||||
IDLE = 0x00, // 00000000
|
||||
RUNNING_UP = 0x01, // 00000001
|
||||
RUNNING_DOWN = 0x02, // 00000010
|
||||
RUNNING_LEFT = 0x04, // 00000100
|
||||
RUNNING_RIGHT = 0x08, // 00001000
|
||||
RUNNING = 0x0F, // 00001111
|
||||
DEATH = 0x80 // 10000000
|
||||
} player_state_t;
|
||||
|
||||
typedef struct player_system_data_t {
|
||||
transform_component_data_t *transform_component_data;
|
||||
sprite_component_data_t *sprite_component_data;
|
||||
animation_system_data_t *animation_system_data;
|
||||
|
||||
player_state_t state;
|
||||
player_state_t last_state;
|
||||
} player_system_data_t;
|
||||
|
||||
void player_system_init(component_t *, va_list);
|
||||
|
||||
void player_system_update(component_t *);
|
||||
|
||||
void player_system_destroy(component_t *);
|
||||
|
||||
#endif // PLAYER_SYSTEM_H
|
|
@ -0,0 +1,41 @@
|
|||
#include <gint/kmalloc.h>
|
||||
#include "sprite_component.h"
|
||||
#include "../game.h"
|
||||
|
||||
// Arg : const char *name
|
||||
void sprite_component_init(component_t *component, va_list args)
|
||||
{
|
||||
sprite_component_data_t *component_data = component->component_data.sprite_component_data;
|
||||
|
||||
component_data->transform_component_data = get_component(component->entity, TRANSFORM_COMPONENT)->component_data.transform_component_data;
|
||||
|
||||
component_data->srcR = component_data->transform_component_data->bounds;
|
||||
component_data->srcR.x = 0;
|
||||
component_data->srcR.y = 0;
|
||||
|
||||
component_data->flip = false;
|
||||
|
||||
sprite_component_set_texture(component_data, va_arg(args, const char *));
|
||||
}
|
||||
|
||||
inline void sprite_component_update(component_t *component)
|
||||
{
|
||||
sprite_component_data_t *component_data = component->component_data.sprite_component_data;
|
||||
component_data->dstR = component_data->transform_component_data->bounds;
|
||||
}
|
||||
|
||||
inline void sprite_component_draw(component_t *component)
|
||||
{
|
||||
sprite_component_data_t *component_data = component->component_data.sprite_component_data;
|
||||
draw_texture(component_data->texture, &component_data->srcR, &component_data->dstR, component_data->flip);
|
||||
}
|
||||
|
||||
inline void sprite_component_destroy(component_t *component)
|
||||
{
|
||||
kfree(component->component_data.sprite_component_data);
|
||||
}
|
||||
|
||||
inline void sprite_component_set_texture(sprite_component_data_t *component_data, const char *name)
|
||||
{
|
||||
component_data->texture = texture_manager_get_texture(&game.texture_manager, name);
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef SPRITE_COMPONENT_H
|
||||
#define SPRITE_COMPONENT_H
|
||||
|
||||
#include "ecs.h"
|
||||
#include "transform_component.h"
|
||||
#include "../texture_manager.h"
|
||||
|
||||
typedef struct sprite_component_data_t {
|
||||
transform_component_data_t *transform_component_data;
|
||||
|
||||
texture_t *texture;
|
||||
|
||||
rect_t srcR;
|
||||
rect_t dstR;
|
||||
|
||||
bool flip;
|
||||
} sprite_component_data_t;
|
||||
|
||||
void sprite_component_init(component_t *, va_list);
|
||||
|
||||
void sprite_component_update(component_t *);
|
||||
|
||||
void sprite_component_draw(component_t *);
|
||||
|
||||
void sprite_component_destroy(component_t *);
|
||||
|
||||
void sprite_component_set_texture(sprite_component_data_t *, const char *);
|
||||
|
||||
#endif // SPRITE_COMPONENT_H
|
|
@ -0,0 +1,32 @@
|
|||
#include <gint/kmalloc.h>
|
||||
#include "transform_component.h"
|
||||
#include "../game.h"
|
||||
|
||||
// Args : rect_t bounds, double speed
|
||||
void transform_component_init(component_t *component, va_list args)
|
||||
{
|
||||
transform_component_data_t *const component_data = component->component_data.transform_component_data;
|
||||
|
||||
rect_t bounds = va_arg(args, rect_t);
|
||||
float speed = (float)va_arg(args, double);
|
||||
|
||||
component_data->bounds = bounds;
|
||||
|
||||
component_data->velocity.x = 0;
|
||||
component_data->velocity.y = 0;
|
||||
|
||||
component_data->speed = speed;
|
||||
}
|
||||
|
||||
void transform_component_update(component_t *component)
|
||||
{
|
||||
transform_component_data_t *component_data = component->component_data.transform_component_data;
|
||||
|
||||
component_data->bounds.x += component_data->velocity.x * component_data->speed * (float)game.delta_time_ms / 1000.0f;
|
||||
component_data->bounds.y += component_data->velocity.y * component_data->speed * (float)game.delta_time_ms / 1000.0f;
|
||||
}
|
||||
|
||||
inline void transform_component_destroy(component_t *component)
|
||||
{
|
||||
kfree(component->component_data.transform_component_data);
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef TRANSFORM_COMPONENT_H
|
||||
#define TRANSFORM_COMPONENT_H
|
||||
|
||||
#include "ecs.h"
|
||||
#include "../vector2d.h"
|
||||
|
||||
typedef struct transform_component_data_t {
|
||||
rect_t bounds;
|
||||
vector2d_t velocity;
|
||||
float speed;
|
||||
} transform_component_data_t;
|
||||
|
||||
void transform_component_init(component_t *, va_list);
|
||||
|
||||
void transform_component_update(component_t *);
|
||||
|
||||
void transform_component_destroy(component_t *);
|
||||
|
||||
#endif // TRANSFORM_COMPONENT_H
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
#include <gint/keycodes.h>
|
||||
|
||||
typedef struct {
|
||||
// Base struct
|
||||
typedef struct event_t {
|
||||
bool keys[0xa6];
|
||||
} event_t;
|
||||
|
||||
|
|
70
src/game.c
|
@ -1,11 +1,69 @@
|
|||
#include <gint/kmalloc.h>
|
||||
#include <gint/keyboard.h>
|
||||
#include <gint/display.h>
|
||||
#include "game.h"
|
||||
#include "ecs/components.h"
|
||||
|
||||
int game_init(game_t *game)
|
||||
void game_init(void)
|
||||
{
|
||||
game = kmalloc(sizeof(game_t), NULL);
|
||||
texture_manager_init(&game.texture_manager);
|
||||
texture_manager_load_builtin_textures(&game.texture_manager);
|
||||
|
||||
if(game == NULL) return 1;
|
||||
entity_manager_init(&game.entity_manager);
|
||||
|
||||
return 0;
|
||||
}
|
||||
entity_t *player = entity_manager_add_entity(&game.entity_manager, "player");
|
||||
|
||||
rect_t player_bounds = {10.0f, 10.0f, 32.0f, 32.0f};
|
||||
float player_speed = 50.0f;
|
||||
|
||||
add_component(player, create_component(TRANSFORM_COMPONENT), player_bounds, player_speed);
|
||||
add_component(player, create_component(SPRITE_COMPONENT), "player_idle_sheet");
|
||||
add_component(player, create_component(ANIMATION_SYSTEM), 4, 0, 200.0f, true, true, false);
|
||||
add_component(player, create_component(PLAYER_SYSTEM));
|
||||
|
||||
game.last_clock_state = clock();
|
||||
|
||||
game.is_running = true;
|
||||
}
|
||||
|
||||
void game_handle_event(void)
|
||||
{
|
||||
key_event_t key_event;
|
||||
|
||||
do
|
||||
{
|
||||
key_event = pollevent();
|
||||
|
||||
if (key_event.type == KEYEV_DOWN)
|
||||
game.event.keys[key_event.key] = true;
|
||||
else if (key_event.type == KEYEV_UP)
|
||||
game.event.keys[key_event.key] = false;
|
||||
|
||||
if (key_event.type == KEYEV_DOWN && key_event.key == KEY_EXIT)
|
||||
game.is_running = false;
|
||||
}
|
||||
while (key_event.type != KEYEV_NONE);
|
||||
}
|
||||
|
||||
void game_update(void)
|
||||
{
|
||||
clock_t start_clock = clock();
|
||||
game.delta_time_ms = (double)(start_clock - game.last_clock_state) * 1000.0f / CLOCKS_PER_SEC;
|
||||
game.last_clock_state = start_clock;
|
||||
|
||||
entity_manager_update(&game.entity_manager);
|
||||
}
|
||||
|
||||
void game_render(void)
|
||||
{
|
||||
dclear(C_WHITE);
|
||||
|
||||
entity_manager_draw(&game.entity_manager);
|
||||
|
||||
dupdate();
|
||||
}
|
||||
|
||||
void game_exit(void)
|
||||
{
|
||||
entity_manager_clear(&game.entity_manager);
|
||||
texture_manager_clear(&game.texture_manager);
|
||||
}
|
||||
|
|
28
src/game.h
|
@ -1,25 +1,31 @@
|
|||
#ifndef GAME_H
|
||||
#define GAME_H
|
||||
|
||||
#include <gint/defs/types.h>
|
||||
#include <time.h>
|
||||
#include "event.h"
|
||||
#include "texture_manager.h"
|
||||
#include "ecs/ecs.h"
|
||||
|
||||
#define WINDOW_WIDTH 396
|
||||
#define WINDOW_HEIGHT 224
|
||||
|
||||
typedef struct {
|
||||
typedef struct game_t {
|
||||
event_t event;
|
||||
texture_manager_t *texture_manager;
|
||||
texture_manager_t texture_manager;
|
||||
entity_manager_t entity_manager;
|
||||
|
||||
bool is_running;
|
||||
clock_t last_clock_state;
|
||||
double delta_time_ms;
|
||||
} game_t;
|
||||
|
||||
int game_init(game_t*);
|
||||
extern game_t game;
|
||||
|
||||
int game_handle_event(game_t*);
|
||||
int game_update(game_t*);
|
||||
int game_render(game_t*);
|
||||
void game_init(void);
|
||||
|
||||
int game_exit(game_t*);
|
||||
void game_handle_event(void);
|
||||
|
||||
void game_update(void);
|
||||
|
||||
void game_render(void);
|
||||
|
||||
void game_exit(void);
|
||||
|
||||
#endif // GAME_H
|
|
@ -1,30 +1,46 @@
|
|||
#include <gint/kmalloc.h>
|
||||
#include <stdarg.h>
|
||||
#include "linked_list.h"
|
||||
#include "malloc.h"
|
||||
|
||||
void linked_list_init(linked_list_t *linked_list, const size_t data_size)
|
||||
elem_t *elem_create(const linked_list_t *linked_list)
|
||||
{
|
||||
linked_list->data_size = data_size;
|
||||
linked_list->first = NULL;
|
||||
linked_list->last = NULL;
|
||||
}
|
||||
elem_t *tmp;
|
||||
tmp = kmalloc(sizeof(elem_t), NULL);
|
||||
if(!tmp) return NULL;
|
||||
|
||||
elem_t *elem_create(linked_list_t *linked_list)
|
||||
{
|
||||
elem_t *elem;
|
||||
elem = malloc(sizeof(elem_t));
|
||||
if(!elem) return NULL;
|
||||
|
||||
elem->data = malloc(linked_list->data_size);
|
||||
if(!elem->data)
|
||||
tmp->data = kmalloc(linked_list->data_size, NULL);
|
||||
if(!tmp->data)
|
||||
{
|
||||
free(elem);
|
||||
kfree(tmp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return elem;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
void linked_list_push_back(linked_list_t *linked_list, elem_t *elem)
|
||||
inline void destroy_elem(elem_t *elem, const deleter_t elem_deleter)
|
||||
{
|
||||
if(!elem) return;
|
||||
|
||||
if(elem_deleter)
|
||||
elem_deleter(elem->data);
|
||||
else
|
||||
kfree(elem->data);
|
||||
|
||||
kfree(elem);
|
||||
}
|
||||
|
||||
void linked_list_init(linked_list_t *linked_list, const size_t data_size, deleter_t elem_deleter)
|
||||
{
|
||||
linked_list->first = NULL;
|
||||
linked_list->last = NULL;
|
||||
linked_list->size = 0;
|
||||
|
||||
linked_list->data_size = data_size;
|
||||
linked_list->elem_deleter = elem_deleter;
|
||||
}
|
||||
|
||||
void linked_list_push_back_elem(linked_list_t *linked_list, elem_t *elem)
|
||||
{
|
||||
if(!elem) return;
|
||||
|
||||
|
@ -37,9 +53,11 @@ void linked_list_push_back(linked_list_t *linked_list, elem_t *elem)
|
|||
linked_list->first = elem;
|
||||
|
||||
linked_list->last = elem;
|
||||
|
||||
linked_list->size++;
|
||||
}
|
||||
|
||||
void linked_list_push_front(linked_list_t *linked_list, elem_t *elem)
|
||||
void linked_list_push_front_elem(linked_list_t *linked_list, elem_t *elem)
|
||||
{
|
||||
if(!elem) return;
|
||||
|
||||
|
@ -52,6 +70,26 @@ void linked_list_push_front(linked_list_t *linked_list, elem_t *elem)
|
|||
linked_list->last = elem;
|
||||
|
||||
linked_list->first = elem;
|
||||
|
||||
linked_list->size++;
|
||||
}
|
||||
|
||||
void linked_list_push_back(linked_list_t *linked_list, void *data)
|
||||
{
|
||||
elem_t *tmp = kmalloc(sizeof(elem_t), NULL);
|
||||
if(!tmp) return;
|
||||
tmp->data = data;
|
||||
|
||||
linked_list_push_back_elem(linked_list, tmp);
|
||||
}
|
||||
|
||||
void linked_list_push_front(linked_list_t *linked_list, void *data)
|
||||
{
|
||||
elem_t *tmp = kmalloc(sizeof(elem_t), NULL);
|
||||
if(!tmp) return;
|
||||
tmp->data = data;
|
||||
|
||||
linked_list_push_front_elem(linked_list, tmp);
|
||||
}
|
||||
|
||||
void linked_list_pop_back(linked_list_t *linked_list)
|
||||
|
@ -66,8 +104,9 @@ void linked_list_pop_back(linked_list_t *linked_list)
|
|||
else
|
||||
linked_list->first = NULL;
|
||||
|
||||
free(tmp->data);
|
||||
free(tmp);
|
||||
destroy_elem(tmp, linked_list->elem_deleter);
|
||||
|
||||
linked_list->size--;
|
||||
}
|
||||
|
||||
void linked_list_pop_front(linked_list_t *linked_list)
|
||||
|
@ -82,38 +121,50 @@ void linked_list_pop_front(linked_list_t *linked_list)
|
|||
else
|
||||
linked_list->last = NULL;
|
||||
|
||||
free(tmp->data);
|
||||
free(tmp);
|
||||
destroy_elem(tmp, linked_list->elem_deleter);
|
||||
|
||||
linked_list->size--;
|
||||
}
|
||||
|
||||
size_t linked_list_get_size(linked_list_t *linked_list)
|
||||
void linked_list_clear(linked_list_t *linked_list)
|
||||
{
|
||||
elem_t *actual_elem = linked_list->first;
|
||||
if(!actual_elem) return 0;
|
||||
elem_t *tmp;
|
||||
|
||||
size_t size = 0;
|
||||
while(actual_elem)
|
||||
{
|
||||
tmp = actual_elem;
|
||||
|
||||
destroy_elem(tmp, linked_list->elem_deleter);
|
||||
|
||||
actual_elem = actual_elem->next;
|
||||
size++;
|
||||
}
|
||||
return size;
|
||||
|
||||
linked_list->first = NULL;
|
||||
linked_list->last = NULL;
|
||||
|
||||
linked_list->size = 0;
|
||||
}
|
||||
|
||||
bool linked_list_is_empty(linked_list_t *linked_list)
|
||||
inline bool linked_list_is_empty(const linked_list_t *linked_list)
|
||||
{
|
||||
return !linked_list->first;
|
||||
}
|
||||
|
||||
bool linked_list_is_in_bound(linked_list_t *linked_list, size_t index)
|
||||
inline bool linked_list_is_in_bound(const linked_list_t *linked_list, const size_t index)
|
||||
{
|
||||
return index < linked_list_get_size(linked_list);
|
||||
return index < linked_list->size;
|
||||
}
|
||||
|
||||
elem_t *linked_list_get_elem(linked_list_t *linked_list, size_t index)
|
||||
elem_t *linked_list_get_elem(const linked_list_t *linked_list, const size_t index)
|
||||
{
|
||||
if(!linked_list_is_in_bound(linked_list, index)) return NULL;
|
||||
|
||||
if(index == 0)
|
||||
return linked_list->first;
|
||||
if(index == linked_list->size - 1)
|
||||
return linked_list->last;
|
||||
|
||||
elem_t *actual_elem = linked_list->first;
|
||||
if(!actual_elem) return NULL;
|
||||
|
||||
|
@ -124,8 +175,202 @@ elem_t *linked_list_get_elem(linked_list_t *linked_list, size_t index)
|
|||
|
||||
return actual_elem;
|
||||
}
|
||||
/*
|
||||
void linked_list_insert(linked_list_t *linked_list, elem_t *elem, size_t index)
|
||||
|
||||
void *linked_list_get(const linked_list_t *linked_list, const size_t index)
|
||||
{
|
||||
|
||||
}*/
|
||||
elem_t *tmp = linked_list_get_elem(linked_list, index);
|
||||
if(!tmp) return NULL;
|
||||
return tmp->data;
|
||||
}
|
||||
|
||||
void linked_list_insert_elem(linked_list_t *linked_list, elem_t *elem, const size_t index)
|
||||
{
|
||||
if(!elem) return;
|
||||
if(!linked_list_is_in_bound(linked_list, index)) return;
|
||||
|
||||
if(index == 0)
|
||||
{
|
||||
linked_list_push_front(linked_list, elem);
|
||||
}
|
||||
else if(index == (linked_list->size - 1))
|
||||
{
|
||||
linked_list_push_back(linked_list, elem);
|
||||
}
|
||||
else
|
||||
{
|
||||
elem_t *next_insert_elem = linked_list_get_elem(linked_list, index);
|
||||
elem_t *prev_insert_elem = next_insert_elem->prev;
|
||||
|
||||
elem->prev = prev_insert_elem;
|
||||
elem->next = next_insert_elem;
|
||||
|
||||
prev_insert_elem->next = elem;
|
||||
next_insert_elem->prev = elem;
|
||||
|
||||
linked_list->size++;
|
||||
}
|
||||
}
|
||||
|
||||
void linked_list_insert(linked_list_t *linked_list, void *data, const size_t index)
|
||||
{
|
||||
elem_t *tmp = kmalloc(sizeof(elem_t), NULL);
|
||||
if(!tmp) return;
|
||||
tmp->data = data;
|
||||
|
||||
linked_list_insert_elem(linked_list, tmp, index);
|
||||
}
|
||||
|
||||
void linked_list_remove_elem(linked_list_t *linked_list, elem_t *elem)
|
||||
{
|
||||
if(!elem) return;
|
||||
if(!elem->prev && !elem->next) return;
|
||||
|
||||
if(elem == linked_list->first)
|
||||
{
|
||||
linked_list_pop_front(linked_list);
|
||||
}
|
||||
else if(elem == linked_list->last)
|
||||
{
|
||||
linked_list_pop_back(linked_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
elem_t *prev_insert_elem = elem->prev;
|
||||
elem_t *next_insert_elem = elem->next;
|
||||
|
||||
prev_insert_elem->next = next_insert_elem;
|
||||
next_insert_elem->prev = prev_insert_elem;
|
||||
|
||||
destroy_elem(elem, linked_list->elem_deleter);
|
||||
|
||||
linked_list->size--;
|
||||
}
|
||||
}
|
||||
|
||||
void linked_list_remove(linked_list_t *linked_list, const size_t index)
|
||||
{
|
||||
if(!linked_list_is_in_bound(linked_list, index)) return;
|
||||
|
||||
elem_t *tmp = linked_list_get_elem(linked_list, index);
|
||||
if(tmp) linked_list_remove_elem(linked_list, tmp);
|
||||
}
|
||||
|
||||
elem_t *linked_list_get_elem_if(const linked_list_t *linked_list, const condition_t condition, ...)
|
||||
{
|
||||
if(!condition) return NULL;
|
||||
|
||||
va_list args;
|
||||
va_start(args, condition);
|
||||
|
||||
elem_t *actual_elem = linked_list->first;
|
||||
elem_t *next_elem;
|
||||
|
||||
while(actual_elem)
|
||||
{
|
||||
next_elem = actual_elem->next;
|
||||
|
||||
va_list args_copy;
|
||||
va_copy(args_copy, args);
|
||||
|
||||
if(condition(actual_elem, args_copy))
|
||||
{
|
||||
va_end(args_copy);
|
||||
va_end(args);
|
||||
|
||||
return actual_elem;
|
||||
}
|
||||
|
||||
va_end(args_copy);
|
||||
|
||||
actual_elem = next_elem;
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *linked_list_get_if(const linked_list_t *linked_list, const condition_t condition, ...)
|
||||
{
|
||||
if(!condition) return NULL;
|
||||
|
||||
va_list args;
|
||||
va_start(args, condition);
|
||||
|
||||
elem_t *actual_elem = linked_list->first;
|
||||
elem_t *next_elem;
|
||||
|
||||
while(actual_elem)
|
||||
{
|
||||
next_elem = actual_elem->next;
|
||||
|
||||
va_list args_copy;
|
||||
va_copy(args_copy, args);
|
||||
|
||||
if(condition(actual_elem, args_copy))
|
||||
{
|
||||
va_end(args_copy);
|
||||
va_end(args);
|
||||
|
||||
return actual_elem->data;
|
||||
}
|
||||
|
||||
va_end(args_copy);
|
||||
|
||||
actual_elem = next_elem;
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void linked_list_remove_if(linked_list_t *linked_list, const condition_t condition, ...)
|
||||
{
|
||||
if(!condition) return;
|
||||
|
||||
va_list args;
|
||||
va_start(args, condition);
|
||||
|
||||
elem_t *actual_elem = linked_list->first;
|
||||
elem_t *next_elem;
|
||||
|
||||
while(actual_elem)
|
||||
{
|
||||
next_elem = actual_elem->next;
|
||||
|
||||
va_list args_copy;
|
||||
va_copy(args_copy, args);
|
||||
|
||||
if(condition(actual_elem, args_copy))
|
||||
{
|
||||
linked_list_remove_elem(linked_list, actual_elem);
|
||||
}
|
||||
|
||||
va_end(args_copy);
|
||||
|
||||
actual_elem = next_elem;
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void linked_list_for_each(const linked_list_t *linked_list, const action_t action, ...)
|
||||
{
|
||||
if(!action) return;
|
||||
|
||||
va_list args;
|
||||
va_start(args, action);
|
||||
|
||||
for(elem_t *actual_elem = linked_list->first; actual_elem; actual_elem = actual_elem->next)
|
||||
{
|
||||
va_list args_copy;
|
||||
va_copy(args_copy, args);
|
||||
|
||||
action(actual_elem, args_copy);
|
||||
|
||||
va_end(args_copy);
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
|
|
@ -15,16 +15,59 @@ typedef struct elem_t {
|
|||
struct elem_t *next;
|
||||
} elem_t;
|
||||
|
||||
/* deleter_t: A type for deleters used during the destruction of elements
|
||||
|
||||
During the initialisation of linked lists you can pass in argument a deleter.
|
||||
It is used during the destruction of an element.
|
||||
You can pass NULL to the initialisation to use the default deleter (kfree(elem->data)).
|
||||
Your deleter_t function declaration must look like this :
|
||||
|
||||
void name_of_your_deleter(void *data);
|
||||
|
||||
Then do what you need to destroy your data (don't forget to kfree the data itself...).
|
||||
You can define your function with "inline" if the deleting is short. */
|
||||
typedef void (*deleter_t)(void *);
|
||||
|
||||
/* condition_t: A type for condition used for conditionned function like linked_list_remove_if
|
||||
|
||||
For function like linked_list_remove_if you need a condition.
|
||||
It have two argument which are "elem_t *" and "va_list", that is because it passes the element on the actual index
|
||||
and the args passed to the function.
|
||||
Your condition_t function declaration must look like this :
|
||||
|
||||
bool name_of_your_condition(elem_t *elem, va_list);
|
||||
|
||||
Then return true if you want the element to be removed from the list or false if not.
|
||||
You can define your function with "static inline" if the condition is short. */
|
||||
typedef bool (*condition_t)(elem_t *, va_list);
|
||||
|
||||
/* action_t: A type for action used for function like linked_list_for_each
|
||||
|
||||
For function like linked_list_for_each you need an action to do.
|
||||
It have two argument which are "elem_t *" and "va_list", that is because it passes the element on the actual index
|
||||
and the args passed to the function.
|
||||
Your condition_t function declaration must look like this :
|
||||
|
||||
void name_of_your_condition(elem_t *elem, va_list);
|
||||
|
||||
Then do whatever you want with the element data, just don't remove it XD.
|
||||
You can define your function with "static inline" if the condition is short. */
|
||||
typedef void (*action_t)(elem_t *, va_list);
|
||||
|
||||
/* linked_list_t: Base of linked lists
|
||||
This struct is the base for creating linked lists.
|
||||
|
||||
@data_size Size of the data stored in the linked list
|
||||
@first Pointer to the first element in the linked list
|
||||
@last Pointer to the last element in the linked list */
|
||||
typedef struct {
|
||||
@last Pointer to the last element in the linked list
|
||||
@size Size of the linked list
|
||||
@deleter Deleter of the data when removing an element*/
|
||||
typedef struct linked_list_t {
|
||||
size_t data_size;
|
||||
elem_t *first;
|
||||
elem_t *last;
|
||||
size_t size;
|
||||
deleter_t elem_deleter;
|
||||
} linked_list_t;
|
||||
|
||||
/* linked_list_init(): Init a linked_list_t
|
||||
|
@ -32,64 +75,159 @@ typedef struct {
|
|||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@data_size Data size for the linked list */
|
||||
void linked_list_init(linked_list_t *linked_list, const size_t data_size);
|
||||
void linked_list_init(linked_list_t *, const size_t, deleter_t deleter);
|
||||
|
||||
/* elem_create(): Create an elem to fill with data and insert in a linked list.
|
||||
This function is usefull when you want to initialise an elem with the proper data_size.
|
||||
WARNING : Don't change the "data" ptr after calling this function or it will lead to memory leaks !
|
||||
Instead do something like this :
|
||||
*(int *)elem->data = 42;
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
Return adress of initialised elem, NULL on error. */
|
||||
elem_t *elem_create(linked_list_t *linked_list);
|
||||
elem_t *elem_create(const linked_list_t *);
|
||||
|
||||
/* linked_list_push_back(): Insert an elem_t from the back in a linked_list_t.
|
||||
/* destroy_elem(): Destroy the given element and its data.
|
||||
This function is usefull when you want to free an element.
|
||||
The deleter is used for the data only.
|
||||
|
||||
@elem Pointer to an elem_t
|
||||
Free the given elem. */
|
||||
void destroy_elem(elem_t *, const deleter_t);
|
||||
|
||||
/* linked_list_push_back_elem(): Insert an elem_t from the back in a linked_list_t.
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@elem Pointer to an elem_t
|
||||
Insert elem in the back of the linked list, do nothing on error. */
|
||||
void linked_list_push_back(linked_list_t *linked_list, elem_t *elem);
|
||||
void linked_list_push_back_elem(linked_list_t *, elem_t *);
|
||||
|
||||
/* linked_list_push_front(): Insert an elem_t from the front in a linked_list_t.
|
||||
/* linked_list_push_front_elem(): Insert an elem_t from the front in a linked_list_t.
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@elem Pointer to an elem_t
|
||||
Insert elem in the front of the linked list, do nothing on error. */
|
||||
void linked_list_push_front(linked_list_t *linked_list, elem_t *elem);
|
||||
void linked_list_push_front_elem(linked_list_t *, elem_t *);
|
||||
|
||||
/* linked_list_push_back_elem(): Insert an elem_t filled with data from the back in a linked_list_t.
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@data Pointer to any data
|
||||
Insert elem filled with data in the back of the linked list, do nothing on error. */
|
||||
void linked_list_push_back(linked_list_t *, void *);
|
||||
|
||||
/* linked_list_push_front_elem(): Insert an elem_t filled with data from the front in a linked_list_t.
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@data Pointer to any data
|
||||
Insert elem filled with data in the front of the linked list, do nothing on error. */
|
||||
void linked_list_push_front(linked_list_t *, void *);
|
||||
|
||||
/* linked_list_pop_back(): Delete the last elem in the given linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
Delete last elem of the linked list, do nothing on error. */
|
||||
void linked_list_pop_back(linked_list_t *linked_list);
|
||||
void linked_list_pop_back(linked_list_t *);
|
||||
|
||||
/* linked_list_pop_front(): Delete the first elem in the given linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
Delete first elem of the linked list, do nothing on error. */
|
||||
void linked_list_pop_front(linked_list_t *linked_list);
|
||||
void linked_list_pop_front(linked_list_t *);
|
||||
|
||||
/* linked_list_get_size(): Get the size of the given linked list
|
||||
/* linked_list_clear(): Clear the given linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
Return size of the given linked list, 0 if it's empty. */
|
||||
size_t linked_list_get_size(linked_list_t *linked_list);
|
||||
Clear linked list. */
|
||||
void linked_list_clear(linked_list_t *);
|
||||
|
||||
/* linked_list_is_empty(): Check if the given linked list is empty
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
Return true if the given linked list is empty else false. */
|
||||
bool linked_list_is_empty(linked_list_t *linked_list);
|
||||
bool linked_list_is_empty(const linked_list_t *);
|
||||
|
||||
/* linked_list_is_in_bound(): Check if the given index is whithin the range of the linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
Return true if the given linked list is empty else false. */
|
||||
bool linked_list_is_in_bound(linked_list_t *linked_list, size_t index);
|
||||
bool linked_list_is_in_bound(const linked_list_t *, const size_t);
|
||||
|
||||
/* linked_list_get_elem(): Get element at the given index in the linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@index Index of the wanted element
|
||||
Return the element, NULL on error. */
|
||||
elem_t *linked_list_get_elem(linked_list_t *linked_list, size_t index);
|
||||
elem_t *linked_list_get_elem(const linked_list_t *, const size_t);
|
||||
|
||||
/* linked_list_get(): Get data in the element at the given index in the linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@index Index of the wanted element
|
||||
Return the data, NULL on error. */
|
||||
void *linked_list_get(const linked_list_t *, const size_t);
|
||||
|
||||
/* linked_list_insert_elem(): Insert element at the given index in the linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@elem Pointer to an element
|
||||
@index Index of the wanted element
|
||||
Insert the element, do nothing on error. */
|
||||
void linked_list_insert_elem(linked_list_t *, elem_t *, const size_t);
|
||||
|
||||
/* linked_list_insert(): Insert element with data at the given index in the linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@data Data to put in the new element
|
||||
@index Index of the wanted element
|
||||
Return the element, do nothing on error. */
|
||||
void linked_list_insert(linked_list_t *, void *, const size_t);
|
||||
|
||||
/* linked_list_remove_elem(): Remove the given elem in the linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@elem Element to remove
|
||||
Remove the element, do nothing on error. */
|
||||
void linked_list_remove_elem(linked_list_t *, elem_t *);
|
||||
|
||||
/* linked_list_remove(): Remove element at the given index in the linked list
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@index Index of the element
|
||||
Remove the element, do nothing on error. */
|
||||
void linked_list_remove(linked_list_t *, const size_t);
|
||||
|
||||
/* linked_list_get_elem_if(): Return first element that the condition verify
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@condition Condition to verify
|
||||
@... Argument to pass to the condition
|
||||
Return the element, NULL on error. */
|
||||
elem_t *linked_list_get_elem_if(const linked_list_t *, const condition_t, ...);
|
||||
|
||||
/* linked_list_get_if(): Return data in the first element that the condition verify
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@condition Condition to verify
|
||||
@... Argument to pass to the condition
|
||||
Return the element data, NULL on error. */
|
||||
void *linked_list_get_if(const linked_list_t *, const condition_t, ...);
|
||||
|
||||
/* linked_list_remove_if(): Remove element(s) that the condition verify
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@condition Condition to verify
|
||||
@... Argument to pass to the condition
|
||||
Remove the element(s), do nothing on error. */
|
||||
void linked_list_remove_if(linked_list_t *, const condition_t, ...);
|
||||
|
||||
/* linked_list_for_each(): Apply the condition to every elements in the list
|
||||
Useful for changing a value in every single element data.
|
||||
The condition can be anything that dont destroy the element.
|
||||
|
||||
@linked_list Pointer to an linked_list_t
|
||||
@condition Condition to apply
|
||||
@... Argument to pass to the condition */
|
||||
void linked_list_for_each(const linked_list_t *, const action_t, ...);
|
||||
|
||||
#endif // LINKED_LIST_H
|
302
src/main.c
|
@ -1,57 +1,289 @@
|
|||
//#include "game.h"
|
||||
/*
|
||||
#include <gint/defs/types.h>
|
||||
|
||||
//#include <gint/gdb.h>
|
||||
|
||||
#include "game.h"
|
||||
|
||||
//#define TEXTURE_TEST
|
||||
//#define LINKED_LIST_TEST
|
||||
|
||||
game_t game;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
game_t *game;
|
||||
//gdb_start();
|
||||
|
||||
game_init(game);
|
||||
//__asm__("trapa #42");
|
||||
|
||||
while(game->is_running)
|
||||
game_init();
|
||||
|
||||
while(game.is_running)
|
||||
{
|
||||
game_handle_event(game);
|
||||
game_update(game);
|
||||
game_render(game);
|
||||
game_handle_event();
|
||||
game_update();
|
||||
game_render();
|
||||
}
|
||||
|
||||
return game_exit(game);
|
||||
game_exit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
#include <gint/display.h>
|
||||
#include <gint/keyboard.h>
|
||||
#include "malloc.h"
|
||||
#include "linked_list.h"
|
||||
|
||||
// Texture Unit Tests
|
||||
#ifdef TEXTURE_TEST
|
||||
|
||||
#include "texture_manager.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
dclear(C_RGB(1, 70, 34));
|
||||
dclear(C_WHITE);
|
||||
|
||||
linked_list_t linked_list;
|
||||
linked_list_init(&linked_list, sizeof(int));
|
||||
texture_manager_t texture_manager;
|
||||
texture_manager_init(&texture_manager);
|
||||
texture_manager_load_builtin_textures(&texture_manager);
|
||||
|
||||
elem_t *elem1 = elem_create(&linked_list);
|
||||
if(!elem1)
|
||||
{
|
||||
dtext(1, 1, C_RED, "elem1 is not initialised correctly");
|
||||
goto Exit;
|
||||
}
|
||||
texture_t *texture = texture_manager_get_texture(&texture_manager, "player_run_sheet");
|
||||
|
||||
linked_list_push_back(&linked_list, elem1);
|
||||
if( linked_list.first == linked_list.last &&
|
||||
linked_list.first &&
|
||||
linked_list.first->prev == NULL &&
|
||||
linked_list.last->prev == NULL)
|
||||
{
|
||||
dtext(1, 1, C_BLACK, "elem1 is correctly inserted in linked list");
|
||||
}
|
||||
rect_t srcR = {0,0,32,32};
|
||||
rect_t dstR = srcR;
|
||||
|
||||
Exit:
|
||||
draw_texture(texture, &src, &dst);
|
||||
|
||||
src.x = 33;
|
||||
dst.x = 33;
|
||||
|
||||
draw_texture(texture, &src, &dst);
|
||||
|
||||
texture_manager_remove_texture(&texture_manager, "player_run_sheet");
|
||||
|
||||
src.w = 128;
|
||||
dst.x = 0;
|
||||
dst.y = 33;
|
||||
|
||||
texture_manager_draw_texture(&texture_manager, "player_idle_sheet", &src, &dst);
|
||||
|
||||
texture_manager_clear(&texture_manager);
|
||||
|
||||
dupdate();
|
||||
getkey();
|
||||
|
||||
if(elem1) free(elem1->data);
|
||||
if(elem1) free(elem1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // TEXTURE_TEST
|
||||
|
||||
// Linked List Unit Tests
|
||||
#ifdef LINKED_LIST_TEST
|
||||
|
||||
#include "linked_list.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
dclear(C_WHITE);
|
||||
|
||||
linked_list_t linked_list;
|
||||
linked_list_init(&linked_list, sizeof(int));
|
||||
if(linked_list.first == linked_list.last &&
|
||||
linked_list.first == NULL)
|
||||
{
|
||||
dtext(1, 0, C_BLACK, "linked_list is initialised correctly");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
elem_t *elem1 = NULL;
|
||||
elem_t *elem2 = NULL;
|
||||
elem_t *elem3 = NULL;
|
||||
elem_t *elem4 = NULL;
|
||||
|
||||
elem1 = elem_create(&linked_list);
|
||||
if(elem1 && elem1->data)
|
||||
{
|
||||
dtext(1, 10, C_BLACK, "elem1 is initalised correctly");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
linked_list_push_back_elem(&linked_list, elem1);
|
||||
if(linked_list.first == linked_list.last &&
|
||||
linked_list.first == elem1 &&
|
||||
!linked_list.first->prev &&
|
||||
!linked_list.first->next &&
|
||||
!linked_list.last->prev &&
|
||||
!linked_list.last->next)
|
||||
{
|
||||
dtext(1, 20, C_BLACK, "elem1 is correctly pushed back");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
linked_list_pop_back(&linked_list);
|
||||
if(linked_list.first == linked_list.last &&
|
||||
linked_list.first == NULL)
|
||||
{
|
||||
dtext(1, 30, C_BLACK, "elem1 is correctly poped back");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
elem1 = elem_create(&linked_list);
|
||||
elem2 = elem_create(&linked_list);
|
||||
elem3 = elem_create(&linked_list);
|
||||
elem4 = elem_create(&linked_list);
|
||||
|
||||
linked_list_push_back_elem(&linked_list, elem1);
|
||||
linked_list_push_back_elem(&linked_list, elem2);
|
||||
if(linked_list.first == elem1 &&
|
||||
linked_list.last == elem2 &&
|
||||
!linked_list.first->prev &&
|
||||
linked_list.first->next &&
|
||||
linked_list.last->prev &&
|
||||
!linked_list.last->next &&
|
||||
linked_list.first->next == elem2 &&
|
||||
linked_list.last->prev == elem1)
|
||||
{
|
||||
dtext(1, 40, C_BLACK, "elem1 and elem2 are correctly pushed back");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
linked_list_push_front_elem(&linked_list, elem3);
|
||||
linked_list_push_front_elem(&linked_list, elem4);
|
||||
if(!linked_list.first->prev &&
|
||||
!linked_list.last->next &&
|
||||
linked_list.first == elem4 &&
|
||||
linked_list.first->next == elem3 &&
|
||||
linked_list.first->next->next == elem1 &&
|
||||
linked_list.first->next->next->next == elem2 &&
|
||||
linked_list.last == elem2 &&
|
||||
linked_list.last->prev == elem1 &&
|
||||
linked_list.last->prev->prev == elem3 &&
|
||||
linked_list.last->prev->prev->prev == elem4)
|
||||
{
|
||||
dtext(1, 50, C_BLACK, "elem3 and elem4 are correctly pushed front");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
if(linked_list_get_elem(&linked_list, 2) == elem1)
|
||||
{
|
||||
dtext(1, 60, C_BLACK, "elem4 is got correctly");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
linked_list_pop_back(&linked_list);
|
||||
if(!linked_list.first->prev &&
|
||||
!linked_list.last->next &&
|
||||
linked_list.first == elem4 &&
|
||||
linked_list.first->next == elem3 &&
|
||||
linked_list.first->next->next == elem1 &&
|
||||
linked_list.last == elem1 &&
|
||||
linked_list.last->prev == elem3 &&
|
||||
linked_list.last->prev->prev == elem4)
|
||||
{
|
||||
dtext(1, 70, C_BLACK, "elem2 is correctly poped back");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
linked_list_remove(&linked_list, 1);
|
||||
if(!linked_list.first->prev &&
|
||||
!linked_list.last->next &&
|
||||
linked_list.first == elem4 &&
|
||||
linked_list.first->next == elem1 &&
|
||||
linked_list.last == elem1 &&
|
||||
linked_list.last->prev == elem4)
|
||||
{
|
||||
dtext(1, 80, C_BLACK, "elem3 is correctly removed");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
linked_list_clear(&linked_list);
|
||||
if(linked_list.first == linked_list.last &&
|
||||
linked_list.first == NULL)
|
||||
{
|
||||
dtext(1, 90, C_BLACK, "linked list is correctly cleared");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
elem1 = elem_create(&linked_list);
|
||||
elem2 = elem_create(&linked_list);
|
||||
elem3 = elem_create(&linked_list);
|
||||
elem4 = elem_create(&linked_list);
|
||||
|
||||
linked_list_push_back_elem(&linked_list, elem1);
|
||||
linked_list_push_back_elem(&linked_list, elem2);
|
||||
linked_list_push_front_elem(&linked_list, elem3);
|
||||
if(linked_list.first == elem3 &&
|
||||
linked_list.last == elem2 &&
|
||||
!linked_list.first->prev &&
|
||||
linked_list.first->next &&
|
||||
linked_list.last->prev &&
|
||||
!linked_list.last->next &&
|
||||
linked_list.first->next == elem1 &&
|
||||
linked_list.first->next->next == elem2 &&
|
||||
linked_list.last->prev == elem1 &&
|
||||
linked_list.last->prev->prev == elem3)
|
||||
{
|
||||
dtext(1, 100, C_BLACK, "elem1, elem2 and elem3 are correctly pushed");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
linked_list_insert_elem(&linked_list, elem4, 1);
|
||||
if(linked_list.first == elem3 &&
|
||||
linked_list.last == elem2 &&
|
||||
!linked_list.first->prev &&
|
||||
linked_list.first->next &&
|
||||
linked_list.last->prev &&
|
||||
!linked_list.last->next &&
|
||||
linked_list.first->next == elem4 &&
|
||||
linked_list.first->next->next == elem1 &&
|
||||
linked_list.first->next->next->next == elem2 &&
|
||||
linked_list.last->prev == elem1 &&
|
||||
linked_list.last->prev->prev == elem4 &&
|
||||
linked_list.last->prev->prev->prev == elem3)
|
||||
{
|
||||
dtext(1, 110, C_BLACK, "elem3 is correctly inserted");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
linked_list_clear(&linked_list);
|
||||
|
||||
Exit:
|
||||
dupdate();
|
||||
getkey();
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LINKED_LIST_TEST
|
||||
|
|
25
src/malloc.h
|
@ -1,25 +0,0 @@
|
|||
#ifndef MALLOC_H
|
||||
#define MALLOC_H
|
||||
|
||||
#include <gint/kmalloc.h>
|
||||
|
||||
/* malloc(): Just call kmalloc from gint/kmalloc.h.
|
||||
|
||||
@size Size of requested block
|
||||
Returns address of allocated block, NULL on error. */
|
||||
inline void *malloc(size_t size)
|
||||
{
|
||||
return kmalloc(size, NULL);
|
||||
}
|
||||
|
||||
/* malloc(): Just call kmalloc from gint/kmalloc.h.
|
||||
|
||||
@ptr Pointer to free
|
||||
Free given ptr and reaffect to NULL. */
|
||||
inline void free(void *ptr)
|
||||
{
|
||||
kfree(ptr);
|
||||
ptr = NULL;
|
||||
}
|
||||
|
||||
#endif // MALLOC_H
|
|
@ -0,0 +1,73 @@
|
|||
#include <gint/kmalloc.h>
|
||||
#include <string.h>
|
||||
#include "texture_manager.h"
|
||||
#include "textures.h"
|
||||
|
||||
texture_t *create_texture(image_t *image, const char *name)
|
||||
{
|
||||
if(!image) return NULL;
|
||||
|
||||
texture_t *texture = kmalloc(sizeof(texture_t), NULL);
|
||||
if (!texture) return NULL;
|
||||
|
||||
texture->name = name;
|
||||
texture->image = image;
|
||||
|
||||
return texture;
|
||||
}
|
||||
|
||||
inline void destroy_texture(texture_t *texture)
|
||||
{
|
||||
kfree(texture);
|
||||
}
|
||||
|
||||
inline void draw_texture(const texture_t *texture, const rect_t *src, const rect_t *dst, bool flip)
|
||||
{
|
||||
dsubimage_rgb16_effect((int)dst->x, (int)dst->y, texture->image, (int)src->x, (int)src->y, (int)src->w, (int)src->h, flip ? IMAGE_HFLIP : DIMAGE_NONE);
|
||||
}
|
||||
|
||||
inline void texture_manager_init(texture_manager_t *texture_manager)
|
||||
{
|
||||
linked_list_init(&texture_manager->textures, sizeof(texture_t), NULL);
|
||||
}
|
||||
|
||||
void texture_manager_load_builtin_textures(texture_manager_t *texture_manager)
|
||||
{
|
||||
for(size_t i = 0; i < BUILTIN_TEXTURE_COUNT; i++)
|
||||
{
|
||||
texture_t *texture = create_texture((image_t *)builtin_textures[i].image, builtin_textures[i].name);
|
||||
texture_manager_add_texture(texture_manager, texture);
|
||||
}
|
||||
}
|
||||
|
||||
inline void texture_manager_add_texture(texture_manager_t *texture_manager, texture_t *texture)
|
||||
{
|
||||
linked_list_push_back(&texture_manager->textures, texture);
|
||||
}
|
||||
|
||||
// Only for this file
|
||||
// Arg : const char *name
|
||||
static inline bool is_texture_name(elem_t *elem, va_list args)
|
||||
{
|
||||
return !strcmp(((texture_t *)elem->data)->name, va_arg(args, const char*));
|
||||
}
|
||||
|
||||
inline texture_t *texture_manager_get_texture(const texture_manager_t *texture_manager, const char *name)
|
||||
{
|
||||
return linked_list_get_if(&texture_manager->textures, is_texture_name, name);
|
||||
}
|
||||
|
||||
inline void texture_manager_remove_texture(texture_manager_t *texture_manager, const char *name)
|
||||
{
|
||||
linked_list_remove_if(&texture_manager->textures, is_texture_name, name);
|
||||
}
|
||||
|
||||
inline void texture_manager_clear(texture_manager_t *texture_manager)
|
||||
{
|
||||
linked_list_clear(&texture_manager->textures);
|
||||
}
|
||||
|
||||
inline void texture_manager_draw_texture(const texture_manager_t *texture_manager, const char *name, const rect_t *src, const rect_t *dst, bool flip)
|
||||
{
|
||||
draw_texture(texture_manager_get_texture(texture_manager, name), src, dst, flip);
|
||||
}
|
|
@ -1,8 +1,86 @@
|
|||
#ifndef TEXTURE_MANAGER_H
|
||||
#define TEXTURE_MANAGER_H
|
||||
|
||||
typedef struct {
|
||||
#include <gint/image.h>
|
||||
#include "vector2d.h"
|
||||
#include "linked_list.h"
|
||||
|
||||
/* texture_t: Texture definition
|
||||
This struct is the base for textures
|
||||
|
||||
@name Name of the texture
|
||||
@image Texture of type bopti_image_t */
|
||||
typedef struct texture_t {
|
||||
const char *name;
|
||||
image_t *image;
|
||||
} texture_t;
|
||||
|
||||
/* create_texture(): Create a texture with the given image and name
|
||||
|
||||
@name Name of the texture
|
||||
@image Texture of type bopti_image_t
|
||||
Return the created texture, NULL on error. */
|
||||
texture_t *create_texture(image_t *, const char *);
|
||||
|
||||
/* destroy_texture(): Destroy the given texture
|
||||
|
||||
@texture Texture to destroy */
|
||||
void destroy_texture(texture_t *);
|
||||
|
||||
/* draw_texture(): Draw the given texture from given src rect to dst rect
|
||||
|
||||
@texture Texture to draw
|
||||
@src Source rectangle of the texture to draw
|
||||
@dst Destination of the drawing */
|
||||
void draw_texture(const texture_t *, const rect_t *, const rect_t *, bool);
|
||||
|
||||
/* texture_manager_t: Texture manager
|
||||
|
||||
@textures Textures loaded in memory */
|
||||
typedef struct texture_manager_t {
|
||||
linked_list_t textures;
|
||||
} texture_manager_t;
|
||||
|
||||
/* texture_manager_init(): Initialise the given texture_manager
|
||||
|
||||
@texture_manager Pointer to a texture manager */
|
||||
void texture_manager_init(texture_manager_t *);
|
||||
|
||||
/* texture_manager_load_builtin_textures(): Load textures declared in "textures.h"
|
||||
|
||||
@texture_manager Pointer to a texture manager */
|
||||
void texture_manager_load_builtin_textures(texture_manager_t *);
|
||||
|
||||
/* texture_manager_add_texture(): Add a texture in the texture manager
|
||||
|
||||
@texture_manager Pointer to a texture manager
|
||||
@texture Texture to add in the texture manager */
|
||||
void texture_manager_add_texture(texture_manager_t *, texture_t *);
|
||||
|
||||
/* texture_manager_get_texture(): Get a texture in the texture manager
|
||||
|
||||
@texture_manager Pointer to a texture manager
|
||||
@name Name of the texture to get
|
||||
Return the texture, NULL on error or if the texture is not found. */
|
||||
texture_t *texture_manager_get_texture(const texture_manager_t *, const char *);
|
||||
|
||||
/* texture_manager_remove_texture(): Remove a texture in the texture manager
|
||||
|
||||
@texture_manager Pointer to a texture manager
|
||||
@name Name of the texture to remove
|
||||
Do nothing if the texture is not found. */
|
||||
void texture_manager_remove_texture(texture_manager_t *, const char *);
|
||||
|
||||
/* texture_manager_clear(): Clear the texture manager
|
||||
|
||||
@texture_manager Pointer to a texture manager */
|
||||
void texture_manager_clear(texture_manager_t *);
|
||||
|
||||
/* texture_manager_draw_texture(): Draw a texture in the texture manager
|
||||
|
||||
@texture_manager Pointer to a texture manager
|
||||
@name Name of the texture to draw
|
||||
Do nothing if the texture is not found. */
|
||||
void texture_manager_draw_texture(const texture_manager_t *, const char *, const rect_t *, const rect_t *, bool);
|
||||
|
||||
#endif // TEXTURE_MANAGER_H
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef TEXTURES_H
|
||||
#define TEXTURES_H
|
||||
|
||||
#include <gint/display.h>
|
||||
#include "texture_manager.h"
|
||||
|
||||
typedef struct builtin_texture_t {
|
||||
const char *name;
|
||||
bopti_image_t *image;
|
||||
} builtin_texture_t;
|
||||
|
||||
extern bopti_image_t img_player_idle_sheet;
|
||||
extern bopti_image_t img_player_run_sheet;
|
||||
|
||||
static struct builtin_texture_t builtin_textures[] = {
|
||||
{"player_idle_sheet", &img_player_idle_sheet},
|
||||
{"player_run_sheet", &img_player_run_sheet},
|
||||
};
|
||||
|
||||
#define BUILTIN_TEXTURE_COUNT (sizeof(builtin_textures) / sizeof(builtin_texture_t))
|
||||
|
||||
#endif // TEXTURES_H
|
|
@ -1,15 +1,28 @@
|
|||
#include "vector2d.h"
|
||||
|
||||
__attribute__((const)) float fabsf(float x)
|
||||
{
|
||||
union {
|
||||
float f;
|
||||
uint32_t i;
|
||||
} u = { x };
|
||||
|
||||
u.i &= 0x7FFFFFFF;
|
||||
return u.f;
|
||||
}
|
||||
|
||||
bool has_intersection(const rect_t * A, const rect_t * B)
|
||||
{
|
||||
int Amin, Amax, Bmin, Bmax;
|
||||
float Amin, Amax, Bmin, Bmax;
|
||||
|
||||
if (!A || !B) {
|
||||
if (!A || !B)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Special cases for empty rects */
|
||||
if (rect_empty(A) || rect_empty(B)) {
|
||||
if (rect_empty(A) || rect_empty(B))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -42,18 +55,20 @@ bool has_intersection(const rect_t * A, const rect_t * B)
|
|||
|
||||
bool intersect_rect(const rect_t * A, const rect_t * B, rect_t * result)
|
||||
{
|
||||
int Amin, Amax, Bmin, Bmax;
|
||||
|
||||
if (!A || !B || !result) {
|
||||
if (!A || !B || !result)
|
||||
{
|
||||
// TODO error message
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Special cases for empty rects */
|
||||
if (rect_empty(A) || rect_empty(B)) {
|
||||
if (rect_empty(A) || rect_empty(B))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
float Amin, Amax, Bmin, Bmax;
|
||||
|
||||
/* Horizontal intersection */
|
||||
Amin = A->x;
|
||||
Amax = Amin + A->w;
|
||||
|
|
|
@ -10,22 +10,67 @@
|
|||
|
||||
#include <gint/defs/types.h>
|
||||
|
||||
typedef struct {
|
||||
int x, y;
|
||||
/* vector2d_t: A point in space
|
||||
This struct is the base for storing 2D positions.
|
||||
|
||||
@x X pos of the vector
|
||||
@y Y pos of the vector */
|
||||
typedef struct vector2d_t {
|
||||
float x, y;
|
||||
} vector2d_t;
|
||||
|
||||
typedef struct {
|
||||
int x, y;
|
||||
int w, h;
|
||||
/* vector2d_t: A point in space
|
||||
This struct is the base for storing 2D positions.
|
||||
|
||||
@x X pos of the rectangle
|
||||
@y Y pos of the rectangle
|
||||
@w Width of the rectangle
|
||||
@h Height of the rectangle */
|
||||
typedef struct rect_t {
|
||||
float x, y;
|
||||
float w, h;
|
||||
} rect_t;
|
||||
|
||||
#define EPSILON 0.000001f
|
||||
|
||||
__attribute__((const)) float fabsf(float x);
|
||||
|
||||
#define is_equal_to_zero(X) (fabsf(X) <= EPSILON)
|
||||
|
||||
#define is_not_zero(X) (fabsf(X) > EPSILON)
|
||||
|
||||
/* point_in_rect(): Verify if a point is in a rectangle
|
||||
This function is useful for verify if a point is in a rectangle.
|
||||
|
||||
@P A Vector2d
|
||||
@R A rectangle
|
||||
Return true if the condition is validated else false. */
|
||||
#define point_in_rect(P, R) (((P)->x >= (R)->x) && ((P)->x < ((R)->x + (R)->w)) && \
|
||||
((P)->y >= (R)->y) && ((P)->y < ((R)->y + (R)->h)))
|
||||
|
||||
#define rect_empty(X) ((!(X)) || ((X)->w <= 0) || ((X)->h <= 0))
|
||||
/* rect_empty(): Verify if a rectangle is empty
|
||||
This function is useful for verify if a rectangle exists.
|
||||
|
||||
bool has_intersection(const rect_t * A, const rect_t * B);
|
||||
@R A rectangle
|
||||
Return true if the condition is validated else false. */
|
||||
#define rect_empty(R) ((!(R)) || (is_equal_to_zero((R)->w)) || (is_equal_to_zero((R)->h)))
|
||||
|
||||
bool intersect_rect(const rect_t * A, const rect_t * B, rect_t * result);
|
||||
/* has_intersection(): Verify if there is a intersction between two rectangles
|
||||
This function is useful for verify intersection between two rectangles.
|
||||
|
||||
@A A rectangle
|
||||
@B Another rectangle
|
||||
Return true if the condition is validated else false. */
|
||||
bool has_intersection(const rect_t *, const rect_t *);
|
||||
|
||||
/* intersect_rect(): Like has_intersection but has a result rectangle
|
||||
This function is useful for verify intersection between two rectangles
|
||||
and get the intersection rectangle.
|
||||
|
||||
@A A rectangle
|
||||
@B Another rectangle
|
||||
@result The intersection rectangle
|
||||
Return true if the condition is validated else false. */
|
||||
bool intersect_rect(const rect_t *, const rect_t *, rect_t *);
|
||||
|
||||
#endif // VECTOR2D_H
|