Compare commits

...

20 Commits

Author SHA1 Message Date
attilavs2 5f20fa36ab README.md : corrections 2024-02-21 22:15:01 +01:00
attilavs2 db502029da moteur.c : tentative 3 dstripe + build.sh : ajout "clean" + editeur : avancées + README.md : update
(Oui j'aurais du commit avant)
2024-02-21 22:07:05 +01:00
attilavs2 cc2551e035 Avancées sur l'éditeur 2024-02-19 22:57:09 +01:00
attilavs2 b868a5e08a Start of editor, basic CLI for now 2024-02-18 21:51:06 +01:00
attilavs2 a97080f8e1 convert.py : Me souviens plus ce que j'ai fait
(il était tard)
2024-02-18 10:11:57 +01:00
attilavs2 95e72743a6 convert.py : utilisation de split() pour extention 2024-02-17 17:20:49 +01:00
attilavs2 b53e656975 moteur.c : refactorisation pour map de taille variable 2024-02-17 12:38:04 +01:00
attilavs2 4150a163d4 convert.py : fini, refactoring à faire pour maps de taille arbitraire 2024-02-17 11:44:02 +01:00
attilavs2 9b3dd33916 Progrès sur le système de convertion, réparation de pb du type ShooterMap + doc 2024-02-17 11:04:02 +01:00
attilavs2 474e132732 Début convertisseur + ajout timestamps 2024-02-14 18:17:04 +01:00
attilavs2 534ffbe6f2 Ajout d'une boucle de logique 2024-02-14 16:10:50 +01:00
attilavs2 e93cec3894 fixed : suppression des fonctions ASM (aucune amélioration de perf) 2024-02-11 19:16:27 +01:00
attilavs2 cd30c37210 fixed : Traduction en ASM des dernières fonctions "simples" 2024-02-11 11:05:54 +01:00
attilavs2 c217e69ce8 fixes i don't remember + fixed_t functions to ASM for practice 2024-02-10 23:08:41 +01:00
attilavs2 1d53ceebb3 Suppression icones inutiles 2024-01-29 10:10:58 +01:00
attilavs2 6b41b80147 debug murs + build file 2024-01-29 10:09:50 +01:00
attilavs2 6881fedbe8 3lvl texturé 2024-01-25 10:30:03 +01:00
attilavs2 9ad4a74181 Occlusion rapide qui marche, textures toujours cassées 2024-01-11 11:53:14 +01:00
attilavs2 d69a379121 Rafraichissement raycast(), commentaires et ffloor en macro 2024-01-06 18:54:57 +01:00
attilavs2 8b825add63 dstripe + debug ymin/ymax + mouvement vertical + retour fxconv 2024-01-04 15:18:54 +01:00
54 changed files with 963 additions and 687 deletions

5
.gitignore vendored
View File

@ -3,12 +3,14 @@
/build-fx
/build-cg
/build-cg-push
#build files
*/converted.c
#builds
#fx-cg
*.g3a
#Linux
*.x86_64
*.amd64
#Windows
*.exe
@ -16,6 +18,7 @@
__pycache__/
# Common IDE files
*.kate-swp
*.sublime-project
*.sublime-workspace
.vscode

View File

@ -1,9 +1,9 @@
#Fcalva 14/02/2024
# Configure with [fxsdk build-fx] or [fxsdk build-cg], which provide the
# toolchain file and module path of the fxSDK
# With standard make, it compiles with SDL2 and SDL2_image
cmake_minimum_required(VERSION 3.15)
project(RaycasterGame)
project(RaycasterGame LANGUAGES C ASM)
#FX-CG50 build
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
@ -35,10 +35,11 @@ set(SOURCES
src/inputs.c
src/ui.c
src/sdl_image.c
maps/convert/converted.c
)
set(ASSETS
assets-cg/map/0.json
#assets-cg/map/0.json
assets-cg/textures/briques0.png
assets-cg/textures/buisson1.png
@ -46,25 +47,9 @@ set(ASSETS
assets-cg/sprites/zombard1.png
#assets-cg/skybox0.png
)
if("${FXSDK_PLATFORM_LONG}" STREQUAL aaaaaa)
fxconv_declare_converters(assets-cg/map/converters.py)
#Les lignes suivantes proviennent de https://gitea.planet-casio.com/Slyvtt/Collab_RPG
add_custom_command(
COMMENT "Convert Tiled TMX map to usable JSON file"
COMMAND 'find | grep .*.tmx | sed 's/.tmx//g' | xargs -l bash -c 'tiled --export-map json $$0.tmx $$0.json''
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/assets-cg/map/
OUTPUT "${CMAKE_CURRENT_LIST_DIR}/assets-cg/map/Shooterlevel0.json"
# if several levels/maps are created, just copy the previous line and change the .json name with the new level/map
DEPENDS assets-cg/map/converters.py
assets-cg/map/0.tmx
)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
endif()
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
set(CFLAGS -Wall -Wextra -Ofast -pipe -flto)

View File

@ -1,57 +1,53 @@
# Raycaster_G90
Raycaster texturé écrit en C pour G90+E/FX-CG50 avec gint et PC (Linux) avec SDL2
Touches :
# Raycaster_G90
Raycaster texturé écrit en C pour G90+E/FX-CG50 avec gint et PC (Linux) avec SDL2
Touches :
- PC :
- Echap pour quitter
- Zqsd pour se déplacer
- F pour intéragir
- F pour intéragir
- G90+E/FC-CGxx :
- F6 pour quitter
- Dpad pour se déplacer
- Shift pour intéragir
## Build
- Dépendances :
- Pour Linux (Port non finalisé) :
- les lib `sdl2`, `sdl2-image` et `sdl2-tty` de dev
- `cmake`
- `build-essential` sur dérivés de Debian,
- `base-devel` sur Arch et dérivés
- Pour G90+E/FX-CGxx :
- Le [fxsdk](https://gitea.planet-casio.com/Lephenixnoir/fxsdk)
- [Gint](https://gitea.planet-casio.com/Lephenixnoir/gint)
- [libprof](https://gitea.planet-casio.com/Lephenixnoir/libprof)
- Instructions pour G90+E/FC-CGxx :
Clonez ce repo dans le dossier de votre choix avec
`git clone https://gitea.planet-casio.com/Fcalva/Raycaster_G90`
Entrez dans le dossier avec
`cd Raycaster_G90`
Et finalement pour compiler :
`fxsdk build-cg`
Et vous devrez avoir un .g3a tout frais dans le dossier.
- Instructions pour Linux :
Le build n'est pas encore officielement supporté et n'est pas complété. Voyez ces instructions comme pour le futur ou pour les devs voulant aider.
## Build
- Dépendances :
- Pour Linux (Port non finalisé) :
- les lib `sdl2`, `sdl2-image` et `sdl2-tty` de dev
- `cmake`
- `build-essential` sur dérivés de Debian,
- `base-devel` sur Arch et dérivés
- Pour G90+E/FX-CGxx :
- Le [fxsdk](https://gitea.planet-casio.com/Lephenixnoir/fxsdk)
- [Gint](https://gitea.planet-casio.com/Lephenixnoir/gint)
- [libprof](https://gitea.planet-casio.com/Lephenixnoir/libprof)
- `python3` pour convertir les maps
- `libncursesdev` si vous voulez utiliser l'éditeur
- Installez les dépendances
Ce qui pour Debian, Ubuntu et dérivés ressemblerait à
`sudo apt install git libsdl2-dev libsdl2-image-dev libsdl-ttf2.0-dev build-essential cmake`
- Instructions pour G90+E/FC-CGxx :
- Clonez ce repo une fois dans le dossier de votre choix avec
`git clone https://gitea.planet-casio.com/Fcalva/Raycaster_G90`
- Entrez dans le dossier avec
`cd Raycaster_G90`
- Et finalement utilisez le script pour build :
`sh build.sh cg`
Et vous devrez avoir un .g3a tout frais dans le dossier.
- Instructions pour Linux :
Le build n'est pas encore officielement supporté et n'est pas complété. Voyez ces instructions comme pour le futur ou pour les devs voulant aider.
- Installez les dépendances
Ce qui pour Debian, Ubuntu et dérivés ressemblerait à
`sudo apt install git libsdl2-dev libsdl2-image-dev libsdl-ttf2.0-dev build-essential cmake`
et pour Arch et dérivés (Pour SDL_image et SDL_TTF, allez voir dans leurs pages respectives)
`sudo pacman -S git sdl2 cmake base-devel`
- Clonez le repo dans le dossier de votre choix avec
`git clone https://gitea.planet-casio.com/Fcalva/Raycaster_G90`
- Allez dans le dossier et configurez le dossier de build
`cd Raycaster_G90`
`mkdir build`
`cd build`
`cmake ..`
- Et finalement, compilez
`make`
`sudo pacman -S git sdl2 cmake base-devel`
- Clonez le repo dans le dossier de votre choix avec
`git clone https://gitea.planet-casio.com/Fcalva/Raycaster_G90`
- Allez dans le dossier
`cd Raycaster_G90`
- Et finalement, utilisez le script pour build
`sh build.sh linux`
Attention pour que le programme puisse importer ses assets correctement, il faut le mettre dans un dossier contenant son assets-cg, +/- faire ceci:
`mv RaycasterGame ../RaycasterGame`
## Licenses
Tout le code original est sous license GPLv3, le code de move() et la majorité de draw_walls() et de raycast() provient directement de Lode Vandevenne et sont sous leur propre license.
Celle des assets (le contenu de /assets-cg) est a préciser donc n'en réutilisez pas.
## Licenses
Tout le code original est sous license GPLv3, la base de move(), de draw_walls() et de raycast() provient directement de Lode Vandevenne et sont sous leur propre license.
Celle des assets (le contenu de /assets-cg) est a préciser donc n'en réutilisez pas.
Toute la base du raycaster vient de https://lodev.org/cgtutor/raycasting.html , grand merci

Binary file not shown.

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M472.7 22.8l-38.5 44.91L448 84.24l48-34.65zm-50.4 55.05L312.2 178.7l-25.3 8.1-66.3 69.6 22.8 24.7 69.3-65.4 12.9-21.5L435.7 93.27zm-8.7 72.65l-19.9 25.6 10.3 13.4 26.6-19.6zm-32.4 37.1l-68.5 62.3-16 3.6-42.1 39.2 20.7 22.3 43.6-39.5 6.4-13.8 65.2-62.4zm-245.8 67.3c-26.6.3-52.06 25.8-52.33 52.4-.33 17.8 9.08 34.4 24.53 43.3l23.6-7.6c-18-2.1-31.59-17.5-31.39-35.7 0-19.7 15.89-35.7 35.59-35.7 10-.2 19.5 3.8 26.4 11v-17c-8-4.7-17.1-11-26.4-10.7zm44.5 8.2v78.5L120.5 365v23.5h145v-55.2l-65.4-70.2zM87.51 407.2l-43.29 43h13.47l11.54 8 35.57-27.3h107.6l11.5 19.3H245l6.1-19.3h23.4l97.3 28.2 9.6-8.9h16l-106.5-43zm-50.68 59.9l-20.85 22.1h62.55l-20.84-22.1zm187.07 0L203 489.2h62.9L245 467.1zm160.7 0l-19.3 22.1h61L407 467.1z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 992 B

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M238.219 131.963l-.24.19-6.41-8a14.89 14.89 0 0 1 2.27-20.94l1.51-1.21a14.89 14.89 0 0 1 20.94 2.3l6.41 8zm-7.18 40.88l18.76 23.32 11.85-9.53-18.76-23.33zm72.91 40.85l176.34-141.83v-44.56h-86.42l-145.58 117.13zm142.81-4c-2 1.64-3.7 2.31-5.16 2.31-4.79 0-7.29-7.26-13.09-11.09a10.74 10.74 0 0 0-6-1.74c-3.71 0-7.59 1.59-10.91 3.69-3.32 2.1-28.75 33.49-41.36 43.63-11.87 9.55-38.27 21.46-53.46 36.38l-27.16-33.76 113.22-91.06a22.73 22.73 0 0 1 14.19-5 19.46 19.46 0 0 1 16.37 8.29c7.04 10.4 23.13 40.51 13.36 48.37zm-113.62 31.89a7.26 7.26 0 1 0-1.11 10.21 7.26 7.26 0 0 0 1.11-10.21zm82.3-66.19a7.26 7.26 0 1 0-1.15 10.2 7.26 7.26 0 0 0 1.15-10.21zm-164.48 95.37l36.33 45.17-144 115.84c-11.65 9.37-106.88 58.17-111.47 52.46-3-3.67 57.76-83.64 75.14-97.63zm-64.14 80.76c-38.85 31.24-68.65 58.67-66.56 61.27 2.09 2.6 35.27-20.63 74.11-51.87 38.84-31.24 68.65-58.67 66.56-61.27-2.09-2.6-35.26 20.65-74.11 51.87zm40.65-135.5l102 126.77 9.09-7.31-102-126.77zm-16.43 27.36l18.75 23.32 10.87-8.74-18.76-23.32zm77.25-23.69l-18.8-23.32-13.55 10.93 18.76 23.32z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M162.322 17.943l-28.316 105.682 18.053 4.838 4.194-15.654 169.764 45.487 11.28-42.088-169.872-45.105 4.838-18.052 169.87 45.103 4.038-15.066L176.404 37.6l3.97-14.82-18.052-4.837zM361.336 98.7l-14.453 53.943c53.99 13.97 102.986 20.59 150.95 10.964-37.1-32.648-82.453-50.034-136.497-64.906zM128.676 145l-41.82 101.104 17.27 7.142 6.216-15.023L272.75 305.4l16.36-39.556-162.43-67.12 7.142-17.27 162.432 67.118 6.254-15.12-162.406-67.18 5.843-14.13-17.27-7.142zm186.818 105.95l-21.344 51.605c51.717 20.872 99.435 33.81 148.24 30.502-32.538-37.196-75.244-60.332-126.896-82.106zM77.107 266.067l-54.705 94.752 16.186 9.346 8.133-14.086 152.23 87.893 20.472-35.452L66.988 320.97l9.344-16.183 152.434 87.545 9.117-15.79L85.65 288.647l7.643-13.238-16.186-9.344zM248.46 395.594l-27.92 48.363c48.526 27.46 94.13 46.532 142.942 49.647-27.38-41.132-66.678-69.662-115.02-98.01z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M188.644 288.505V397.78h67.373V288.505h-67.373zm-132.32-35.4v-.951c-9.554 24.886-27.426 69.693-27.426 69.693a34.188 34.188 0 1 0 65.397 16.127c1.819-13.702 8.707-65.47 11.205-84.9H56.292zm0 53.67a11.905 11.905 0 1 1 11.904 11.936 11.905 11.905 0 0 1-11.905-11.936zM36.035 147.06a15.134 15.134 0 0 0 21.845 13.588c-5.226 10.054-12.542 40.187 3.982 74.689h55.573v.073c6.542.554 11.068 12.96 14.768 22.367 4.18 10.452 17.611 14.016 23.14 14.016h101.467V130.463l-73.8-.743v-15.5H80.425v20.904H60.567v.073a15.145 15.145 0 0 0-24.53 11.863zm99.47 94.15a25.21 25.21 0 0 1 9.345-19.618 77.125 77.125 0 0 0 1.87 6.637 61.586 61.586 0 0 0 1.903 4.965 43.783 43.783 0 0 0 2.362 4.599c.44.721.857 1.421 1.338 2.09a21.134 21.134 0 0 0 1.432 1.892 18.06 18.06 0 0 0 1.494 1.662 16.138 16.138 0 0 0 1.526 1.41 13.357 13.357 0 0 0 1.516 1.15l.721.492.721.397a16.127 16.127 0 0 0 2.456 1.118 16.723 16.723 0 0 0 1.641.481l.575.146-.49-.334a16.033 16.033 0 0 1-1.35-.962 14.873 14.873 0 0 1-1.818-1.745l-.491-.544-.46-.637a11.142 11.142 0 0 1-.92-1.39 13.305 13.305 0 0 1-.836-1.589 14.695 14.695 0 0 1-.732-1.766 17.1 17.1 0 0 1-.616-1.913c-.21-.648-.335-1.348-.491-2.09a37.627 37.627 0 0 1-.596-4.37c-.094-1.504-.157-3.03-.126-4.577.032-1.547.115-3.083.24-4.589.126-1.505.314-3 .523-4.442l.22-1.41a25.252 25.252 0 1 1-20.956 24.938zM276.41 130.662l39.487 4.463H470.06v-2.247a7.42 7.42 0 0 1 7.42-7.42h1.098a7.42 7.42 0 0 1 7.421 7.42V157.073H315.896l-42.299 26.13V130.63z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M237.58 213.41a48.65 48.65 0 0 1 2.09-14.63h-17.15a1.45 1.45 0 0 0-1.37 1.37v14.58a15 15 0 0 0 1 6.15c.1 0 .26-.1.38-.1h15.58a59 59 0 0 1-.53-7.37zM145.16 396l-2.07 13.22-106.72-16.69 2.11-13.48 106.06 16.86zm249.29-246.22H86.71c2.08-37 19.18-47 19.18-47h378.27v32.53c-59-2.45-81.32 6.47-89.71 14.47zm89.59.92h.12v27.08h-80v-16.77c4-3.09 20.68-12.82 79.87-10.31zM27.84 361.78l119.12 19s25.79-87.28 36.14-115.79c6.14-16.95 29.91-20.21 41.32-20.21h31.32c16.06 0 29.42-13.69 30.42-30.92l-.2-23.08a7 7 0 0 1 7.2-7h96v-18H83.64c-3.18 4.32-9.37 6.14-21.27 7.24-27.3 2.54-21.28 19.3-21.28 19.3a37.51 37.51 0 0 1 4.56-.29c9.55 0 27.65 2.63 39.74 17.75 14.49 18.08-38.28 94.73-57.55 152zm178.32-161.63a16.16 16.16 0 0 1 16.37-16.37h37.31a16.12 16.12 0 0 1 16.32 16.37v14.58c0 12-9.11 22.05-18.32 22.05h-35.32c-12 0-16.37-9.89-16.37-22.05v-14.58zm-155 151.53a10.23 10.23 0 0 1-1.73-10.49c12.36-30.23 55.41-128.32 70.86-161.48 6.48-13.9 35.77-14.41 52.31-8.65 14.25 5 21.13 14.74 18.4 26.15-5.46 22.81-36.94 120.87-52.6 165.22-1.33 3.78-4.7 6.15-10 7.05a45.81 45.81 0 0 1-7.46.51c-9.91 0-23.26-1.95-33.24-4-19.89-4-32.18-8.82-36.54-14.31zm83-165.32c-14.86 31.91-55 123.3-69 156.95 4.32 2.21 14.25 5.53 28.85 8.26 15.21 2.84 26.29 3.37 30.81 2.88 15.65-44.71 46-139.46 51.14-160.83.26-1.09.87-3.65-5.17-6.64-5.51-2.73-14.08-4.26-22.36-4-8.68.28-13.37 2.4-14.27 3.38zm5.86 18.66a8.3 8.3 0 1 1 8.3 8.3 8.3 8.3 0 0 1-8.31-8.3zm-30.79 124.15a8.3 8.3 0 1 1-8.3-8.3 8.3 8.3 0 0 1 8.28 8.3zM77.99 116l-4.59 15.93a10.15 10.15 0 0 1-2.94-4.2c-.73-2.39-9.62-17.8-19.42-18.59 10.12-4.61 26.94 6.86 26.94 6.86z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M269.188 155.574l-16.644 6.852 112 272 16.644-6.852zm192.825 34.781L325.28 246.656l13.71 33.29 136.73-56.301zm-13.117 62.456l-103.35 43.06 6.585 14.94 86.545-36.133zm-172.44 13.95l-86.443 35.594 8.162 19.823a90.276 90.276 0 0 0-10.62 7.736c-26.465 22.463-38.002 55.997-39.413 82.63L19.856 460.519l6.02 16.964 140.055-52.148-.065-6.424c-.22-22.04 10.067-55.522 33.338-75.273 21.751-18.462 66.699-30.458 106.637-5.514-29.509-71.324-19.211-45.077-29.385-71.361zM256.866 342c-40.21 0-73 32.79-73 73s32.79 73 73 73 73-32.79 73-73-32.79-73-73-73zm0 18c30.482 0 55 24.518 55 55s-24.518 55-55 55-55-24.518-55-55 24.518-55 55-55zm1 21c-18.119 0-33 14.881-33 33s14.881 33 33 33 33-14.881 33-33-14.881-33-33-33z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 972 B

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M253.713 25.463l-4.16 15.523C147.833 33.02 69.483 164.754 40.46 273.08l11.374 57.45C105.83 169.524 184.77 82.474 254.436 83.35l136.16 36.486 14.424-53.828-151.307-40.543zm164.695 62.78l-4.836 18.05 24.246 6.498c-1.23 1.64-2.35 3.376-3.353 5.175-5.413 9.698-8.35 22.035-8.35 35.55 0 13.513 2.937 25.85 8.35 35.548s14.18 17.628 25.46 17.628c11.278 0 20.043-7.93 25.456-17.627 5.414-9.7 8.352-22.035 8.352-35.55 0-13.512-2.938-25.848-8.35-35.546-4.145-7.425-10.26-13.8-17.956-16.387l.05-.19L418.41 88.24zm-162.88 14.017c-16.805 5.265-33.33 14.11-48.827 26.033l43.484 11.652c8.062-12.484 16.437-23.367 24.978-32.424l-19.635-5.26zm40.638 10.888c-8.584 7.96-17.527 18.798-26.414 32.04l66.496 17.818c-1.075-15.91-3.4-29.77-6.855-40.953l-33.227-8.905zm163.758 5.877c2.23 0 5.697 1.883 9.14 8.05 3.44 6.166 5.98 15.744 5.98 26.44 0 10.694-2.54 20.274-5.98 26.44-3.443 6.166-6.91 8.05-9.14 8.05-2.23 0-5.7-1.884-9.14-8.05-3.442-6.166-5.98-15.746-5.98-26.44 0-10.697 2.538-20.277 5.98-26.443 3.44-6.166 6.91-8.047 9.14-8.047zm-109.528 8.655c2.87 12.113 4.678 25.725 5.418 40.568l48.528 13.004c-7.46-18.074-17.346-33.997-29.266-46.96l-24.68-6.612zm-160.75 15.392c-18.056 17.506-34.11 39.42-46.763 64.79l66.03 17.695c9.335-25.593 19.883-48.854 31.226-68.955l-50.495-13.53zm69.762 18.694c-11.404 19.538-22.43 42.79-32.164 68.703l103.178 27.643c4.528-27.308 6.605-52.958 6.498-75.58l-77.512-20.767zm96.778 25.93c-.228 23.08-2.723 48.5-7.436 75.33l71.076 19.044c1.728-28.298-1.217-55.304-8.1-79.492l-55.54-14.88zm-221.15 37.413c-4.475 10.84-8.35 22.21-11.522 34.048-2.768 10.33-4.893 20.618-6.416 30.797l68.04 18.23c2.17-10.04 4.624-20.227 7.385-30.533 3.164-11.807 6.598-23.282 10.254-34.392l-67.74-18.15zm85.93 23.023c-3.733 11.077-7.225 22.543-10.39 34.355-2.762 10.308-5.183 20.513-7.29 30.56l106.593 28.56c3.198-9.752 6.204-19.8 8.966-30.108 3.165-11.813 5.877-23.488 8.183-34.947l-106.065-28.42zm124.247 33.293c-2.39 11.45-5.15 23.103-8.315 34.91-2.76 10.305-5.73 20.357-8.87 30.137l73.085 19.582c3.77-9.577 7.072-19.547 9.84-29.877 3.173-11.84 5.5-23.623 7.043-35.25l-72.783-19.502zm-230.256 27.3c-2 25.508-.197 50.033 4.86 72.49L173.51 395.6c.822-21.46 3.467-44.693 7.943-69.057l-66.498-17.818zm84.8 22.723c-4.306 24.693-6.634 48.122-7.153 69.267l82.693 22.158c10.122-18.572 19.82-40.026 28.437-63.564l-103.976-27.86zm122.28 32.763c-8.305 23.338-17.63 44.783-27.646 63.78l58.74 15.737c15.605-16.92 29.43-37.258 40.45-60.347l-71.543-19.17zM125.65 402.125c7.774 23.043 19.257 43.167 33.743 58.918l19.636 5.262c-3.55-15.012-5.47-32.33-5.76-51.42l-47.62-12.76zm66.998 17.953c.63 20.52 3.166 38.184 7.387 51.856l33.217 8.9c10.492-9.73 21.52-23.758 32.326-41.215l-72.93-19.542zm92.31 24.733c-9.796 16.388-20.118 30.428-30.698 41.653l24.68 6.613c20.423-6.398 40.43-18.082 58.683-34.152l-52.666-14.113z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M418.2 18L375 65.56c-16.9 12.53-44.7 14.05-56.3 22.77L122.6 234.2c-9.6 6.9-3.7 23.8-5.8 36.9 6.9 27.7 28.6 44.9 59.7 41.8 32.7-3.4 98.5-47.4 120.2-63.6 6.9 6.1-77.4 77.3-118.3 81.5-34.3 3.5-62.3-14.6-74.7-42.7l-62.37 47.4c38.23 55.9 82.97 105.4 142.77 132.3l187.8-273 17 25.8c15.2 19.6 82.4-16 75.1-29.1l-26.9-55.3L494 61.68V18h-75.8zM26.96 346.4l-6.71 5.1C-5.009 373.7 155.9 512 166.5 493.3l7.2-10.5c-62.4-28.9-108.31-80.4-146.74-136.4z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 709 B

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M196 496c-16.62 0-30-13.38-30-30V346H46c-16.62 0-30-13.38-30-30V196c0-16.62 13.38-30 30-30h120V46c0-16.62 13.38-30 30-30h120c16.62 0 30 13.38 30 30v120h120c16.62 0 30 13.38 30 30v120c0 16.62-13.38 30-30 30H346v120c0 16.62-13.38 30-30 30zm0-135h120l-60-60zm0-75h120l-60-60zm0-75h120l-60-60z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 561 B

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M372.48 31.215c-77.65 0-116.48 65.73-116.48 65.73s-38.83-65.72-116.48-65.72c-37.14 0-107.77 33.72-107.77 125.13 0 161.24 224.25 324.43 224.25 324.43s224.25-163.19 224.25-324.43c0-91.42-70.63-125.13-107.77-125.14zm-145.492 115.02h60.698v79.415h79.238v60.7h-79.238v79.884h-60.698V286.35h-80.064v-60.7h80.064z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 578 B

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M96 36.61L41.21 173.6c.26.6.84 1.4 2.15 2.5 2.16 1.8 6.2 4 11.49 5.8 10.57 3.5 25.9 5.5 41.15 5.5 15.2 0 30.6-2 41.2-5.5 5.2-1.8 9.3-4 11.4-5.8 1.3-1.2 1.9-1.9 2.2-2.5zm160 0L201.2 173.6c.3.6.9 1.3 2.2 2.5 2.1 1.8 6.2 4 11.4 5.8 10.6 3.5 26 5.5 41.2 5.5 15.3 0 30.6-2 41.2-5.5 5.2-1.8 9.3-4 11.4-5.8 1.3-1.2 1.9-1.9 2.2-2.5zm160 0L361.2 173.6c.3.6.9 1.3 2.2 2.5 2.1 1.8 6.2 4 11.4 5.8 10.6 3.5 26 5.5 41.2 5.5 15.2 0 30.6-2 41.2-5.5 5.2-1.8 9.3-4 11.4-5.8 1.3-1.2 1.9-1.9 2.2-2.5zM41 195.7v17c0 1 .2 1.8 2.36 3.7 2.16 1.8 6.2 4 11.49 5.8 10.57 3.5 25.9 5.5 41.15 5.5 15.2 0 30.6-2 41.2-5.5 5.2-1.8 9.3-4 11.4-5.8 2.2-1.9 2.4-2.7 2.4-3.7v-17c-2.6 1.2-5.3 2.3-8.2 3.2-13.4 4.5-30 6.5-46.8 6.5-16.75 0-33.42-2-46.85-6.5-2.87-.9-5.59-2-8.15-3.2zm160 0v17c0 1 .2 1.8 2.4 3.7 2.1 1.8 6.2 4 11.4 5.8 10.6 3.5 26 5.5 41.2 5.5 15.3 0 30.6-2 41.2-5.5 5.2-1.8 9.3-4 11.4-5.8 2.2-1.9 2.4-2.7 2.4-3.7v-17c-2.6 1.2-5.3 2.3-8.2 3.2-13.4 4.5-30 6.5-46.8 6.5-16.8 0-33.4-2-46.8-6.5-2.9-.9-5.6-2-8.2-3.2zm160 0v17c0 1 .2 1.8 2.4 3.7 2.1 1.8 6.2 4 11.4 5.8 10.6 3.5 26 5.5 41.2 5.5 15.2 0 30.6-2 41.2-5.5 5.2-1.8 9.3-4 11.4-5.8 2.2-1.9 2.4-2.7 2.4-3.7v-17c-2.6 1.2-5.3 2.3-8.2 3.2-13.4 4.5-30 6.5-46.8 6.5-16.8 0-33.4-2-46.8-6.5-2.9-.9-5.6-2-8.2-3.2zM41 236v158.3l17.06 34.1-16.71 33.4c.3.6.87 1.3 2.01 2.3 2.16 1.8 6.2 4 11.49 5.8 10.57 3.5 25.9 5.5 41.15 5.5 15.2 0 30.6-2 41.2-5.5 5.2-1.8 9.3-4 11.4-5.8 1.2-1 1.7-1.7 2.1-2.3l-16.8-33.4 17.1-34.1V236c-2.6 1.2-5.3 2.3-8.2 3.2-13.4 4.5-30 6.5-46.8 6.5-16.75 0-33.42-2-46.85-6.5-2.87-.9-5.59-2-8.15-3.2zm160 0v158.3l17.1 34.1-16.8 33.4c.4.6.9 1.3 2.1 2.3 2.1 1.8 6.2 4 11.4 5.8 10.6 3.5 26 5.5 41.2 5.5 15.3 0 30.6-2 41.2-5.5 5.2-1.8 9.3-4 11.4-5.8 1.2-1 1.7-1.7 2.1-2.3l-16.8-33.4 17.1-34.1V236c-2.6 1.2-5.3 2.3-8.2 3.2-13.4 4.5-30 6.5-46.8 6.5-16.8 0-33.4-2-46.8-6.5-2.9-.9-5.6-2-8.2-3.2zm160 0v158.3l17.1 34.1-16.8 33.4c.4.6.9 1.3 2.1 2.3 2.1 1.8 6.2 4 11.4 5.8 10.6 3.5 26 5.5 41.2 5.5 15.2 0 30.6-2 41.2-5.5 5.2-1.8 9.3-4 11.4-5.8 1.2-1 1.7-1.7 2.1-2.3l-16.8-33.4 17.1-34.1V236c-2.6 1.2-5.3 2.3-8.2 3.2-13.4 4.5-30 6.5-46.8 6.5-16.8 0-33.4-2-46.8-6.5-2.9-.9-5.6-2-8.2-3.2z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M465.659 42.63l-16.16 11.83 11.82 15.69-.272.181 6.32 8.559 22.551-17-8-10.68-6.26 4.71-10-13.29zm-29.09 21.48L269.108 183.86c0 .54-.06 1.03-.06 1.54l-2.16 22.78a16 16 0 0 1-6.52 11.46l-41.91 30.5a16 16 0 0 1-22.35-3.52l-4.95-6.8-29.79 21.48c-1.67 1.22-2.011 3.74-.811 6l2.09 3.951a4.9 4.9 0 0 1-.158 5.37l-48 58.71a1.77 1.77 0 0 1-.282.27l-90.699 70.42c-1.84 1.43-1.91 4.46-.15 6.76l40.82 54.179a5.69 5.69 0 0 0 4.41 2.41h.18a3.47 3.47 0 0 0 2.84-1.59l84.43-111.3a4.2 4.2 0 0 0 1.33-4.37s-3.04-16.07-2.32-17.07c0 0 28.7-38.39 28.95-38.58L454.788 88.7l-18.22-24.59zm-183.5 119.82l-54.14 39.39 10.118 13.91 41.91-30.5 2.112-22.8zm20.138 64.25l-38.629 29.6 7.49 15.37a5.14 5.14 0 0 0 4.73 2.87h.25a6 6 0 0 0 4.57-2.45l22.77-30.59a5.63 5.63 0 0 0 1-4.51l-2.18-10.29zm-59.44 45.6l-5.929 4.59a12.81 12.81 0 0 1-16.48 18.16l-2.26 3-2.26 3a20.27 20.27 0 0 0 30.08-14.81 20.1 20.1 0 0 0-3.15-13.94z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +0,0 @@
Toutes les icônes de ce fichier proviennent de https://game-icons.net/ sous leurs licenses respectives

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M42.652 136.716v32.494a24.107 24.107 0 0 0 8.168 18.1h270.5v-50.406a7.302 7.302 0 0 0-7.146-5.978h-81.512a19.33 19.33 0 0 0-18.172-12.768h-58.948c6.208 25.003-12.71 49.193-38.472 49.193S72.39 143.16 78.6 118.16H61.136c-10.223.035-18.49 8.335-18.485 18.558zm409.04 1.554l2.65-3.38 7.896-11.474c3.297-4.768 8.94-4.768 12.236 0l7.615 14.802h8.835v29.344H338.01V138.27h113.703zM39.074 396.064c18.09 15.597 51.33 13.933 71.643 1.366 21.22-13.127 4.11-31.993 32.13-67.606 8.595-10.932 31.41-42.446 51.47-71.06 6.174-8.814 18.035-3.522 43.602 6.607 6.363 1.39 14.48 1.79 18.578 2.132 19.016 0 42.086-17.687 44.218-32.423 2.173-15.016-6.757-19.388 2.828-21.993 3.328-.905 9.26-5.045 9.67-9.067h-41.027c8.512 4.59 14.145 12.518 14.145 21.49 0 14.186-13.99 25.68-31.295 25.68-17.306 0-31.294-11.474-31.294-25.68 0-8.993 5.633-16.9 14.145-21.49H77.754c23.19 20.206 11.09 43.812 2.806 55.412l-52.158 73.24c-14.555 20.452-5.557 49.4 10.672 63.392zm21.14-38.28c0-11.868 14.347-17.81 22.74-9.418 8.39 8.39 2.448 22.74-9.42 22.74-7.357 0-13.32-5.964-13.32-13.32zm188.2-117.13c-9.727-7.012-7.78-25.204-5.018-36.613h12.8c-7.575 8.55-11.452 27.26-7.783 36.615zM140.008 127.64c0 20.447-24.72 30.684-39.177 16.227-14.456-14.456-4.22-39.176 16.227-39.176 12.674 0 22.95 10.276 22.95 22.95z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M163.042 247.9l-.31-12.46a47.42 47.42 0 0 0-10-.16c-.5 2.82-1.26 6.75-2.19 11.33zm24 1.86a18.33 18.33 0 0 0 5.1-6.26h8.52a27 27 0 0 1-8.53 12.46c-6.74 5.49-16.36 8.12-28.75 8.12a109.5 109.5 0 0 1-16.16-1.39c.56-2.68 1.12-5.21 1.64-7.75 21.97 3.23 32.87-.82 38.18-5.18zm132 142.74h-30v-130h30zM20.302 206.35a22.55 22.55 0 0 1 22.74-21.85h21s.09 15 .24 16h-21.24a6.62 6.62 0 0 0-6.77 6.39l-2.31 68.61a8 8 0 0 1-8 7.69h-.28a7.94 7.94 0 0 1-7.72-8.2zm346.74-54.56l13 14.07v11.92l-13 14.07zm127 14.71v12h-98v-12zm-399-47h6v9.14l13.36 6.86h-19.36zm230 127h-40v-32s-12.21-4.29-15.05-4.29a7.75 7.75 0 0 0-4.52 1.45l-20.29 14.4a7.86 7.86 0 0 1-4.55 1.46h-62.76c-3.6-5-12.35-8.71-20.81-8.71-9.42 0-18.49 3.74-19.73 11.75-1.91 12.38-15.64 74.54-15.64 74.54a13.86 13.86 0 0 1-17.53 10.36l-26.37-7.87a6.34 6.34 0 0 1-4.17-8.18c5.17-14.72 22.12-71.53 22.68-80.43.31-4.94-2.77-8.45-6.32-10.45h235.06v38zm-75-103h72v19h-72zm-16 8v27h104v-27h13v41h-271v-41z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M201.7 103c.1-3.13 0-6.23-.2-9.23l54.3 65.93c4.1 5.3 6.6 10.7 7.8 16.8 1.3 7.2.5 14.7-2.3 21.5-1.9 4.6-4.8 8.8-8.3 12.4-11.7 9.2-20.7 12.6-34 10.3l-83.6-17.1.5-.3c12.6-5.8 23.9-13.8 33.5-23.8 9.7-10.1 17.6-21.8 23.1-34.7 5.7-13.2 8.9-27.4 9.2-41.8zm52.3 25.3l16.1 19.6c6 7.3 10 15.9 11.7 25.2 4.7 26.2-9.3 52.2-33.9 62.6-5.4 2.2-11 3.6-16.8 4.1-5.4.4-10.7.3-15.9-.9l-55.7-11.5-1.3 23.4 128.1-.4 1.3-124.6zm78.6 47.2c-4.9.3-9.7 5.2-11.9 8.7-2.2 4.2-2.8 9.4.2 13.2 3.2 3.4 7.8 3.6 11.8 1.4 3.1-1.7 5.3-4.4 6.8-7.2 3.4-7.2.5-16.4-6.9-16.1zm11.6 41.4c-.6-.4-1.2-.7-1.8-.9-6.2-2.1-12.9 3.5-15.2 8.1-1.8 4.3-1.9 9.5 1.4 12.9.8.8 1.7 1.4 2.7 1.9 4.6 2.2 10.2-.3 13.2-3.6 2-2.7 3.5-6 3.7-8.9.2-3.7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 15-7.9 19zm-5.9-22.8c-3.9-6.3-10.8-9-17.1-5.6-2.5 1.4-4.3 3.9-4.9 6.7-1 4.7 1.1 9.3 4.8 12.1 3.9 2.8 8.8 3.4 13.1 1 5.3-3.3 6.2-9.1 4.1-14.2zm17.9-8.4c.3-4.5-2.8-8.1-6.3-10.1l-17.7-8.5c.1 2.7-.1 5.3-.7 7.6 8.8 3.7 16.5 7 24.7 11zM284.7 291.2c-4.7.1-17.4 3.7-18.2 9.5l82.1 165.1c6.1-3 13.2-6.2 18.3-9.5-16.7-33.3-65.5-131.8-82.2-165.1zm-61-.7l-97.6 163.1c5.7 3.4 12.7 7.3 18 10.3 19.5-33.1 77.9-130.2 97.5-163.2-.9-3.5-12.3-12.6-17.9-10.2zm28.5 28.6l22.7 78.3c5.7-1.4 11.5-3.3 16.6-4.7l-37.8-76.1zm-29.3-47.4c3-.3 6.4.2 8.9 1 7.1 2.3 13.9 5.8 19.4 10.5.8.7 1.6 1.4 2.4 2.2h1.1c7.3-5.9 18.9-12 26.8-12.9 5.7-.2 11.8 1.8 15.4 4.9 2.7 2.1 4 5.1 5.6 8.2 14.7 0 29.4.2 44.1.3-14-5.7-28-11.4-42.1-17-49.2 0-98.3.2-147.5.4l48.4 9.1 3.5.6c3.4-4.3 8.5-7 14-7.3zM89.96 56.17c-2.09-1.2-4.5-1.72-6.9-1.5-.92.1-1.82.3-2.7.6a14.386 14.386 0 0 0-8.2 6.7c-1.88 3.2-2.45 6.99-1.6 10.6 1.49 6.88 8.63 10.93 15.3 8.7 7.24-2.38 11.48-9.87 9.8-17.3-.72-3.28-2.79-6.11-5.7-7.8zm93.24 46.33c-.3 12-2.9 23.9-7.7 34.9-4.7 10.8-11.3 20.7-19.5 29.2a91.39 91.39 0 0 1-27.8 19.9c-8.3 3.8-17.3 6.2-26.4 7-1.95.2-3.94.3-5.94.3a69.44 69.44 0 0 1-30.4-6.7 66.506 66.506 0 0 1-22.9-17.9c-6.2-7.6-10.83-16.3-13.6-25.7a84.42 84.42 0 0 1-3.1-31.1c.87-10.8 3.58-21.28 8-31.13a98.478 98.478 0 0 1 17.2-26.1 93.2 93.2 0 0 1 24.3-19 81.99 81.99 0 0 1 29.54-9.5l2.2-.2c9.4-.84 18.9.21 27.9 3.1 9.4 3.03 17.9 8.08 25.1 14.8 7.5 7 13.3 15.52 17.2 25 4.2 10.52 6.3 21.81 5.9 33.13zM111 56.07l-9.8-8.7c-.4-.33-.6-.56-1-.9-6.66-5.5-15.71-7.2-23.94-4.5a28.235 28.235 0 0 0-16.2 13.1 28.233 28.233 0 0 0-3 20.7 25.635 25.635 0 0 0 16.1 18.3l14.2 5.5c.23.11.46.21.7.3 3.12 1.03 6.42 1.43 9.7 1.13 8.24-.8 15.54-5.58 19.54-12.83 6.3-11 3.5-25-6.3-32.1z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M274.416 16.05c-13.347 2.888-35.426 19.905-27.508 51.26 9.262 36.67-75.52 36.213-41.63-24.058C183.646 58.92 167.17 55.08 161.8 23.148c-22.233 27.904-22.512 73.433-9.892 101.918 16.77 37.852-29.304 44.6-49.738 8.97 22.28 116.072-46.865 107.22-30.28 71.462 17.254-37.196 27.745-77.21-42.12-94.23 38.313 20.83 32.962 105.25.93 70.77-19.66 36.393 28.903 46.923 30.32 73.558 1.145 21.548-18.805 21.214-33.916 7.468 1.39 33.63 26.576 36.938 39.054 54.836 27.306 39.166-14.327 68.647-39.308 46.163 4.337 38.776 26.144 64.053 54.576 84.212C92.46 304.957 131.467 205.87 178.576 150.22c25.333-29.928 53.268-47.503 80.98-51.273 3.463-.47 6.913-.712 10.34-.726 21.053-.087 41.165 8.386 57.596 24.544 36.358-6.065 45.915-44.68 13.487-70.46 1.828 64.344-67.158 21.956-66.564-36.255zm104.12 3.993c-6.333.11-13.55 2.39-21.448 7.477 35.57 10.134 37.05 44.868 14.775 81.2 49.277-26.507 40.868-89.265 6.672-88.677zm-272.333 3.12C69.545 22.65 54.15 79.77 92.807 103.84c-11.116-31.483 5.797-61.904 27.802-77.71-5.083-1.97-9.905-2.9-14.407-2.964zm163.87 93.696c-2.633.034-5.3.237-8 .605-21.6 2.94-45.96 17.336-69.233 44.828-44.866 53.002-84.617 154.055-93.772 303.228 8.6-2.924 16.847-2.806 23.96-.305 5.363 1.885 10.034 4.62 14.37 7.623 5.066-72.095 13.248-143.837 30.592-214.016l.473.117-6.81 147.94.25.01c-2.782 26.187-4.914 52.54-6.655 79.008 7.317 4.79 14.645 8.118 23.81 8.262 9.88.156 22.915-3.568 40.856-15.93-16.913-92.954-21.596-183.95 3.97-268.86-.17-3.325.088-6.7.848-10.056 2.023-8.927 7.973-17.458 17.41-22.906l.003-.002 52.53-30.29 17.848-11.81c-12.794-12.023-27.02-17.653-42.45-17.447zm68.37 27.91c-3.02.173-4.934.53-6.95 1.69h-.007l-80.004 46.136c-5.395 3.116-7.58 6.683-8.523 10.847-.945 4.166-.275 9.192 1.894 13.848 4.337 9.313 13.166 15.533 22.32 13.08l6.924-1.852 57.933 100.294.036.063c8.55 15.338 10.57 28.975 8.63 40.664-1.936 11.688-7.168 20.96-11.337 29.63-4.17 8.67-7.43 16.607-7.702 26.346-.27 9.734 2.376 21.82 12.088 38.724l.01.02 17.71 30.353H493.27V326.61c-12.267-6.23-24.566-5.693-39.182-7.292-16.313-1.783-35.21-8.355-49.412-31.873l-.04-.066-49.236-84.71-53.31 30.78-9.346-16.186 53.264-30.752-.1-.172 7.2-4.895c3.907-2.655 5.554-5.617 6.26-9.334.704-3.715.116-8.287-1.74-12.64-3.708-8.707-11.835-15.106-19.18-14.7h-.005z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M336.313 25.057l-42.536 73.45-1.718 28.036 45.754 26.498 23.463-15.446 42.535-73.448zm-50.3 118.785l-31.07 53.654 30.307 17.55c.91-.06 1.825-.103 2.75-.103 3.218 0 6.35.39 9.36 1.1l28.46-49.148zm-61.238 20.455l-4.63 7.72-33.665 56.106-11.09-7.19-7.55-4.9-9.795 15.102 7.55 4.896 11.618 7.538-5.068 8.448-4.63 7.716 15.434 9.262 4.63-7.72 48-80 4.63-7.715zm14.22 44.766l-31.07 53.652 53.655 31.072 2.623-4.53c-10.39-7.46-17.203-19.63-17.203-33.314 0-13.334 6.466-25.24 16.412-32.742zM288 232.942c-12.81 0-23 10.19-23 23s10.19 23 23 23 23-10.19 23-23-10.19-23-23-23zM205.83 282.3l-78.078 134.827c5.496 5.717 8.967 13.386 9.223 21.816h31.298l77.364-133.59zm109.432 4.184c-3.484 3.116-7.498 5.644-11.885 7.436l89.393 161.023h16.01zM104 424.944c-8.39 0-15 6.608-15 15 0 8.39 6.61 15 15 15s15-6.61 15-15c0-8.392-6.61-15-15-15zm-63 32v30h35.498c5.765-4.327 12.842-6.912 20.772-8.764 9.43-2.204 20.05-3.237 30.675-3.237 10.626 0 21.22 1.03 30.608 3.24 7.86 1.847 14.873 4.418 20.568 8.76H215v-30h-82.766c-5.803 9.562-16.317 16-28.234 16-11.917 0-22.43-6.438-28.234-16zm336 16v14h94v-14z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M341.552 242.585l-21.197 21.197 89.386 89.386 21.197-21.197-89.386-89.386zm-13.619-101.81l-12.612-12.613a7.649 7.649 0 0 0-9.1 1.296L84.337 351.342c-7.625 7.625-3.489 47.897 9.693 61.079l4.066 4.066a13.245 13.245 0 0 0 16.928 1.46c1.967-1.687 13.182-4.957 15.414 8.717l7.875 53.438a12.76 12.76 0 0 0 14.478 10.762l21.236-8.42a12.318 12.318 0 0 0 4.253-2.693c2.834-2.833 3.81-6.93 3.083-11.34-.96-5.784-8.358-6.018-9.1-12.893l-7.445-49.856 26.902-26.903a16.037 16.037 0 0 0 0-22.68l-7.297-7.297 78.194-78.194a15.596 15.596 0 0 0 0-22.056l-10.107-10.107c1.818-1.818 3.262-1.701 4.199-1.202l1.397 1.397a11.126 11.126 0 0 0 15.734 0l7.297-7.297 23.351 23.351 27.933-27.932-41.294-41.294 35.542-35.542a7.66 7.66 0 0 0 1.272-9.124zM158.215 372.928l14.048-14.048a10.353 10.353 0 0 1 14.642 0l2.068 2.068a10.353 10.353 0 0 1 0 14.642l-14.049 14.048a10.353 10.353 0 0 1-14.64 0l-2.07-2.068a10.353 10.353 0 0 1 .024-14.618zM221.9 234.242a8.83 8.83 0 0 1 0 12.487l-87.934 87.934a8.83 8.83 0 1 1-12.487-12.487l87.934-87.934a8.83 8.83 0 0 1 12.487 0zM399.798 40.173l-8-12.292a4.415 4.415 0 0 1 5.604-6.431l15.898 8.905 5.752-5.752 12.417 12.417-30.828 30.828a25.022 25.022 0 0 0-1.499 23.227 3.311 3.311 0 0 1-.632 3.754 3.311 3.311 0 0 1-4.682 0L383.76 84.76l-43.433 43.432-12.433-12.433 71.568-71.568z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M227.752 139.172l51.998 54.29 13-12.45-52-54.29-12.998 12.45zM187.74 256.424l9.683 10.11 56.33-53.952-9.684-10.11-56.33 53.952zM385.14 72.18l-38.345 72.733 24.227 25.294 74.315-35.176-60.198-62.85zm15.994-9.322l54.207 56.595 7.832-35.195-26.54-27.708-35.498 6.308zM48.828 433.784l20.75 21.666 9.39-8.992-20.752-21.666-9.388 8.992zm22.388-21.442l20.75 21.665 264.318-253.164-20.75-21.666L71.215 412.342z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 674 B

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M129.284 156.072a70.653 70.653 0 0 0-6.262-2.29c-1.569-.476-3.18-.932-4.853-1.302a62.484 62.484 0 0 0-5.097-.912 47.967 47.967 0 0 0-5.139-.381h-2.511c-.826 0-1.642.095-2.437.17a35.612 35.612 0 0 0-4.514.741 30.844 30.844 0 0 0-3.867 1.145c-1.176.392-2.194.9-3.094 1.292-.9.392-1.632.858-2.236 1.208l-1.844 1.176 2.12-.445c.678-.116 1.504-.212 2.426-.339.922-.127 1.981-.159 3.179-.116a27.38 27.38 0 0 1 3.613.254 30.643 30.643 0 0 1 3.9.773c.656.18 1.324.35 1.991.594.668.243 1.325.455 1.992.73a39.957 39.957 0 0 1 3.889 1.802c1.26.689 2.5 1.41 3.666 2.193 1.165.785 2.12 1.452 3.073 2.194a35.305 35.305 0 0 1 12.005-8.487zm287.25 39.543a7.417 7.417 0 0 1-7.417 7.417H304.781v-16.953h111.753zM99.5 207.365c-40.783 27.03-77.211 113.057-73.195 170.497h98.54s-17.907-71.384 6.675-94.885c.382-.36.784-.7 1.198-1.06 10.966-19.485 11.178-37.562.37-52.629-9.61-13.425-24.804-20.418-33.588-21.922zm-13.033 137.49a12.715 12.715 0 1 1-12.715-12.714 12.715 12.715 0 0 1 12.715 12.715zm395.857-210.579a2.808 2.808 0 0 1 3.677 2.68v32.17H304.813V143.77h148.096zM124.187 198.91h-.159a74.562 74.562 0 0 1 22.834 20.492c14.325 19.942 12.778 40.423 7.089 56.582 5.382.222 10.066 1.695 12.227 4.418a55.744 55.744 0 0 0 43.866 21.35c23.237 0 45.212-14.643 48.487-41.503a23.618 23.618 0 0 0 18.15-16.582l11.157-38.315V136.48H157.913v7.237h-11.051v25.843c-27.549.053-22.717 29.35-22.717 29.35zm130.338-38.515a8.477 8.477 0 0 1-8.476 8.476h-55.564a8.477 8.477 0 0 1 0-16.953h55.564a8.477 8.477 0 0 1 8.476 8.477zm0 24.37a8.477 8.477 0 0 1-8.476 8.476h-55.564a8.477 8.477 0 0 1 0-16.953h55.564a8.477 8.477 0 0 1 8.476 8.477zm-8.476 32.317h-55.564a8.477 8.477 0 1 1 0-16.953h55.564a8.477 8.477 0 0 1 0 16.953zm-71.076 43.442c0-14.124 8.476-15.321 20.767-14.95.265 1.282.562 2.606.922 3.963.434 1.578.9 3.178 1.483 4.8.583 1.62 1.23 3.178 1.94 4.8a48.062 48.062 0 0 0 2.415 4.556c.424.73.88 1.43 1.356 2.119.477.688.954 1.335 1.442 1.97a35.57 35.57 0 0 0 3.03 3.434 30.78 30.78 0 0 0 3.03 2.67c.954.784 1.929 1.377 2.734 1.928.805.551 1.6.932 2.214 1.25l1.982.943-1.505-1.557c-.455-.509-.985-1.155-1.578-1.876a17.971 17.971 0 0 1-1.76-2.585 27.348 27.348 0 0 1-1.705-3.179 30.632 30.632 0 0 1-1.42-3.719c-.201-.657-.403-1.314-.551-2.002-.148-.69-.329-1.367-.445-2.12a39.935 39.935 0 0 1-.54-4.238 43.98 43.98 0 0 1-.096-4.238c.042-1.378.127-2.787.254-4.122.085-.795.18-1.557.287-2.31h1.165c19.56 0 35.411-4.8 35.411 14.474a35.416 35.416 0 0 1-70.833-.021z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M235.223 42.74c-8.67.003-17.32.527-25.252 1.49l22.995 7.374 26.06-7.204-14.904 8.266 29.183.938-31.168 1.953 7.627 4.894c12.12-1.384 25.08-4.335 39.133-9.216-2.915-1.435-6.917-2.873-11.635-4.064-11.368-2.87-26.75-4.434-42.037-4.43zm-25.452 1.512c-5.98.732-11.56 1.705-16.362 2.932-4.785 1.222-8.804 2.705-11.63 4.156 3.057 1.185 6.148 2.28 9.277 3.285l32.324-1.734zm-18.176 10.543c7.56 2.397 15.358 4.233 23.506 5.353l8.462-4.365zm40.732 2.166l-13.195 3.68c8.334.888 17.042 1.022 26.23.247zm61.553 11.56c-46.084 15.603-83.883 12.33-116.5.343v265.383c35.69 13.848 74.13 13.286 116.5-1.504.03-87.962.005-180.644 0-264.22zm26.42 162.384c-.07 0-.143.003-.214.002.998 1.19 1.976 2.432 2.94 3.723 7.82 10.48 14.66 24.324 19.845 38.66 2.266 6.26 4.196 12.576 5.693 18.76l3.472-17.605-.037.202c.346-1.993.785-3.923 1.283-5.81-2.916-10.882-7.918-20.998-13.995-27.82-5.77-6.48-11.836-9.965-18.984-10.113zm97.268 5.592c-24.834.066-43.015 13.465-47.84 41.23l-.017.102-3.814 21.336c15.8-9.586 32.307-15.674 50.56-15.127 20.85.625 43.688 7 61.058 18.172l-3.38-25.292-.01-.11c-5.358-29.38-29.49-40.086-56.556-40.312zm-105.69 13.7v83.113l19.768-6.546-.017-.086c.516-.107.265.336.983-1.34.72-1.676 1.386-5.31 1.27-10.024-.233-9.425-3.236-22.905-7.938-35.902-3.877-10.72-8.928-21.185-14.068-29.215zM159.38 266.26c-26.83 5.996-54.302 12.135-74.978 16.775-3.493.784-5.36 1.21-8.54 1.924 2.44 1.747 4.765 3.663 6.945 5.737 12.8 12.178 21.682 29.216 26.61 47.237 4.93 18.02 5.93 37.097 1.563 53.85-.805 3.094-1.827 6.122-3.058 9.044l51.46-17.035zM44.138 292.244c-.22.004-.448.026-.67.033l-.766.174c-2.258.52-4.354 1.064-3.49.818l-.187.052-.187.045c-3.245.778-5.52 2.43-7.758 5.71-2.238 3.282-4.103 8.264-5.115 14.433-2.024 12.338-.608 29.12 3.922 45.05 4.53 15.926 12.184 31.026 21.205 40.588 8.128 8.617 16.29 12.72 25.928 11.456 8.42-4.317 13.658-12.273 16.546-23.356 3.324-12.754 2.71-29.15-1.505-44.564-4.218-15.415-12.014-29.77-21.658-38.946-7.835-7.454-16.33-11.65-26.265-11.492zm371.504 9.742c-21.177-.128-41.18 6.894-55.216 22.91l-3.385 17.155c15.41-16.114 37.094-26.187 61.087-26.187 26.287 0 49.818 12.072 65.348 30.957l-2.55-19.078C465 312.387 441.15 302.724 417.92 302.027c-.76-.022-1.52-.036-2.277-.04zM38.997 315.023L57.7 343.928l13.663-21.848-6.69 29.15 27.198 15.944-24.782-4.742 10.422 27.355-17.703-26.1-12.787 20.225 5.455-27.603-25.204-14.65 24.07 5.488zm379.13 16.614c-38.096 0-68.81 30.715-68.81 68.812 0 38.096 30.714 68.81 68.81 68.81 38.098 0 68.813-30.714 68.813-68.81 0-38.098-30.716-68.813-68.813-68.813zM293.88 351.71c-40.93 13.13-80.13 14.003-116.5 1.66v40.038c35.69 14.074 74.128 13.705 116.5-.928zm124.247 24.265c13.517 0 24.475 10.957 24.475 24.474 0 13.516-10.958 24.474-24.475 24.474-13.517 0-24.475-10.958-24.475-24.475 0-13.518 10.958-24.475 24.475-24.475zm-121.23 34.488c-42.767 14.164-83.67 15-121.467 1.433l-3.157 13.618c38.888 19.18 84.998 18.925 128.79-.21z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -1 +0,0 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#000000" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M200.02 282.864c.647 5.763-.805 16.744-4.795 23.737-7.455 12.98-70.408 119.37-93.583 158.517a10.8 10.8 0 0 1-18.156.723l-38.987-55.936a9.806 9.806 0 0 1 .71-12.2l76.428-66.323a15.526 15.526 0 0 1 11.655-5.148l4.886.031a13.414 13.414 0 0 0 13.335-11.224l48.504-32.203zm81.47-88.347l14.718 22.17a9.292 9.292 0 0 1-2.602 12.88l-25.679 17.05s-3.853 9.861-3.262 14.073c.59 4.212 4.087 15.196 3.565 18.187-.522 2.991-3.116 7.07-2.512 9.177.604 2.107 6.36 8.384 6.175 9.302a12.146 12.146 0 0 1-3.888 3.554 18.939 18.939 0 0 1-12.95 3.322c-9.173-1.309-12.276-1.153-14.047-2.582-1.77-1.428-8.27-3.416-9.518-12.686-1.25-9.27 3.298-24.648 3.15-26.688-.148-2.039-.188-9.467-4.485-13.835-4.298-4.368-14.83 2.432-24.26 8.598l-52.413 34.798-17.882-26.934 9.054-6.011-.938-16.397a9.292 9.292 0 0 1 7.537-8.854l25.396-4.884a4.795 4.795 0 0 1 4.897 2.051l1.648 2.482 119.976-79.654 12.212 18.393-33.877 22.491zm8.04 20.697a8.528 8.528 0 0 0-11.821-2.388l-13.077 8.683a8.528 8.528 0 0 0-2.388 11.82l.827 1.247a8.528 8.528 0 0 0 11.821 2.387l13.077-8.682a8.528 8.528 0 0 0 2.388-11.821l-.796-1.198zm164.75-161.89l-11.84 7.861 7.235 10.9 19.62-13.027L459.06 43.64a4.67 4.67 0 0 0-6.472-1.307 4.909 4.909 0 0 0-.752.622 4.738 4.738 0 0 0-.486 5.955zM306.809 199.63l63.016 94.916 18.67-12.395-63.017-94.916zm42.065-36.08l85.918-57.044a13.174 13.174 0 0 0 3.689-18.262l-11.259-16.957-107.868 71.617 11.258 16.957a13.174 13.174 0 0 0 18.252 3.695z" fill="#ffffff" fill-opacity="1"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,11 +1,27 @@
#Script to do the build for you. Not meant to be more then an automation tool for devs.
#Fcalva 21/02/2024
#Script to do the build for you.
#Is now meant to be used since it runs the converter script
rm "./maps/convert/converted.c"
python3 "./maps/convert/convert.py" script
mkdir "./build"
cd "./build"
cmake ..
make
mv "./RaycasterGame" "../RaycasterGame.x86_64"
if test $1 = "linux"; then
mkdir "./build-linux"
cd "./build-linux"
cmake ..
make
mv "./RaycasterGame" "../RaycasterGame.amd64";
elif test $1 = "cg"; then
fxsdk build-cg;
elif test $1 = "win"; then
#todo
echo "not done yet !";
elif test $1 = "ems"; then
mkdir "./build-ems"
cd "./build-ems"
cmake ..
emmake make
emcc -O0 RaycasterGame.o -o RaycasterGame.js;
elif test $1 = "clean"; then
rm -rf "./build-cg" "./build-linux" "./build-ems"
rm "./maps/convert/converted.c"
fi

5
docs/map_format.txt Normal file
View File

@ -0,0 +1,5 @@
The map format is defined as follows :
- The name of the map is it's file name, suffixed with ".rcmap"
- It is a .json file with the elements as in types.h, the sprites being converted to an array, and the values already
in 16:16 fixed point
- The data is disposed in a one dimensional array with, in order : lines (width), times columns (height), times depth

1
editor/map.rcmap Normal file
View File

@ -0,0 +1 @@
{"w": 16, "h": 16, "d": 2, "startpos_x": 196608, "startpos_y": 196608, "startpos_z": 0, "startdir_x": 0, "startdir_y": 65536, "startplane_x": 43253, "startplane_y": 0, "floor": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, "sprites": []}

167
editor/raycastedit.py Normal file
View File

@ -0,0 +1,167 @@
import os
import sys
import json
import time
import curses
def fix(x):
return int(x*65536)
class WindowDat:
s = 0
def __init__(self):
self.s = curses.initscr()
curses.noecho()
curses.cbreak()
self.s.keypad(True)
#little trick that allows us to not worry about closing
def __del__(self):
curses.nocbreak()
self.s.keypad(False)
curses.echo()
curses.endwin()
class RaycastMap:
w = 0
h = 0
d = 0
#provide usable start values to avoid headscratching
startpos_x = 196608
startpos_y = 196608
startpos_z = 0
startdir_x = 0
startdir_y = 65536
startplane_x = 43253
startplane_y = 0
floor = []
wall = []
sprite_count = 0
sprites = []
def toscreen(self, layer):
#if layer < -1 or layer > self.d :
# return ""
#if layer == -1:
# for i in range(0, self.w*self.h):
# string += str(self.floor[i])
#else:
for i in range(layer*self.w*self.h, (layer+1)*self.w*self.h):
string += str(self.wall[i])
return string
def parseout(self):
out = json.JSONEncoder().encode({\
"w":self.w,\
"h":self.h,\
"d":self.d,\
"startpos_x":self.startpos_x,\
"startpos_y":self.startpos_y,\
"startpos_z":self.startpos_z,\
"startdir_x":self.startdir_x,\
"startdir_y":self.startdir_y,\
"startplane_x":self.startplane_x,\
"startplane_y":self.startplane_y,\
"floor":self.floor,\
"wall":self.wall,\
"sprite_count":self.sprite_count,\
"sprites":self.sprites\
})
return out
def __init__(self, w, h, d):
self.w = w
self.h = h
self.d = d
for i in range(0, w*h):
self.floor.append(0)
for i in range(0, w*h*d):
self.wall.append(0)
def helppage():
print("usage : python3 raycastedit.py [options] [file]")
print("If [file] exists and is in .rcmap format, il will be edited")
print("Otherwise, the editor will attempt to create [file]")
print("Options :")
print("-h : display this page")
print("-n W H D : Create a new empty map in [file], if it doesn't exist")
print(" already, of width W, height H and depth D")
def seehelppls():
print('See usage with "--help or "-h"')
if len(sys.argv) < 2:
print("No file provided !")
seehelppls()
os._exit(1)
def parsin(string):
data = json.load(string)
nmap = RaycastMap(0, 0, 0)
nmap.w = data["w"]
nmap.h = data["h"]
nmap.d = data["d"]
nmap.startpos_x = data["startpos_x"]
nmap.startpos_y = data["startpos_y"]
nmap.startpos_z = data["startpos_z"]
nmap.startdir_x = data["startdir_x"]
nmap.startdir_y = data["startdir_y"]
nmap.startplane_x = data["startplane_x"]
nmap.startplane_y = data["startplane_y"]
return nmap
def parsefile(filename):
nmap = parsin(open(filename, "r"))
return nmap
def gen_ne(filename, w, h, d):
try:
nfile = open(filename, mode="x+t", buffering=1, encoding="utf-8", newline="\n")
except:
print("Error creating file !")
return 1
nmap = RaycastMap(w, h ,d)
nfile.write(nmap.parseout())
nfile.write("\n")
if len(sys.argv) > 2:
for i in range(1, len(sys.argv)-1):
option_set = -1
if sys.argv[i] == "-h":
helppage()
os._exit(0)
if sys.argv[i] == "-n":
i+=3
try:
filename = sys.argv[-1]
w = int(sys.argv[i-2])
h = int(sys.argv[i-1])
d = int(sys.argv[i])
except:
print("Invalid use of option -n !")
seehelppls()
os._exit(1)
gen_ne(filename, w, h, d)
os._exit(0)
if option_set == -1:
print('Invalid option "'+sys.argv[i]+'" !')
seehelppls()
os._exit(1)
openmap = parsefile(sys.argv[-1])
def main():
scr = WindowDat()
while True:
scr.s.clear()
scr.s.addstr(0, 0, openmap.toscreen(0))
scr.s.refresh()
time.sleep(0.01666)
main()

106
maps/convert/convert.py Normal file
View File

@ -0,0 +1,106 @@
#Fcalva 17/02/2023
import os
import os.path
import sys
import json
def conv_log(msg):
print("convert.py : "+msg)
conv_log("Converting maps to C object...")
try:
if sys.argv[1] == "script":
converted_path = "./maps/convert/converted.c"
maps_path = "./maps/"
except:
converted_path = "./converted.c"
maps_path = "../"
try:
convert = open(converted_path, mode="x+t", buffering=1, encoding="utf-8", newline="\n")
convert.write('#include "../../src/fixed.h"\n')
convert.write('#include "../../src/types.h"\n')
except:
conv_log("converted.c wasn't deleted !")
folder = os.listdir(path=maps_path)
for i in range(0, len(folder)):
extention = folder[i].split(".")
extention = extention[-1]
if extention == "rcmap":
continue
else:
folder.pop(i)
for map in folder:
conv_log("Coverting map "+map)
data = json.load(open(maps_path+map, "r"))
mapname = map.split(".")[0]
w = data["w"]
h = data["h"]
d = data["d"]
scount = data["sprite_count"]
convert.write("uint8_t "+mapname+"_floor[]={")
for i in range(0, w*h-1):
convert.write(str(data["floor"][i])+",")
convert.write(str(data["floor"][w*h-1]))
convert.write("};\n")
convert.write("uint8_t "+mapname+"_wall[]={")
for i in range(0, w*h*d-1):
c = data["wall"][i]
if i < w*h:
for j in range(0, d):
if data["wall"][i+w*h*j] != 0:
c=data["wall"][i]
break
c=255
convert.write(str(c)+",")
convert.write(str(data["wall"][w*h*d-1]))
convert.write("};\n")
convert.write("Sprite "+mapname+"_sprites[]={")
for i in range(0, scount-1):
sprite = data["sprites"][i]
convert.write("{")
convert.write(str(sprite[0])+",")
convert.write(str(sprite[1])+",")
convert.write(str(sprite[2])+",")
convert.write(str(sprite[3]))
convert.write("},")
try:
sprite = data["sprites"][scount-1]
convert.write("{")
convert.write(str(sprite[0])+",")
convert.write(str(sprite[1])+",")
convert.write(str(sprite[2])+",")
convert.write(str(sprite[3]))
convert.write("}};\n")
except:
convert.write("};\n")
convert.write("ShooterMap "+mapname+"={")
convert.write(str(w)+",")
convert.write(str(h)+",")
convert.write(str(d)+",")
convert.write(str(data["startpos_x"])+",")
convert.write(str(data["startpos_y"])+",")
convert.write(str(data["startpos_z"])+",")
convert.write(str(data["startdir_x"])+",")
convert.write(str(data["startdir_y"])+",")
convert.write(str(data["startplane_x"])+",")
convert.write(str(data["startplane_y"])+",")
convert.write("&"+mapname+"_floor,")
convert.write("&"+mapname+"_wall,")
convert.write(str(scount)+",")
convert.write("&"+mapname+"_sprites")
convert.write("};\n")

141
maps/map0.rcmap Normal file
View File

@ -0,0 +1,141 @@
{ "w":32,
"h":32,
"d": 3,
"startpos_x":196608,
"startpos_y":196608,
"startpos_z":0,
"startdir_x":0,
"startdir_y":65536,
"startplane_x":43253,
"startplane_y":0,
"floor":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],
"sprite_count":0,
"sprites":[]
}

View File

@ -1,3 +1,5 @@
//Fcalva 17/02/2024
#ifndef config__h
#define config__h
@ -16,6 +18,10 @@
#define player_height 0x7FFF
#define TPS 20
#define tick_time (int)((1.0/(float)TPS) * 1000.0)
//param. graphiques
//int, qui règle l'upscale de la fenêtre SDL
@ -26,7 +32,7 @@
#define screen_h 224
#define viewport_w 396
#define viewport_h 224
#define max_dist fix(16) //en tuiles
#define max_dist fix(18) //en tuiles
#define max_sprite_dist fix(20) //en tuiles << 16, 20
#define max_sprite_search 24
@ -38,10 +44,6 @@
#define G 0x9CCCC //Gravity, m/s/s
#define map_h 32
#define map_w 32
#define map_d 3 //map depth
#define tindex_size 256
#define tsize 64

View File

@ -3,13 +3,18 @@
// ---
//
// Fcalva : vient de https://gitea.planet-casio.com/Slyvtt/OutRun
//
// Fcalva 14/02/2024
#pragma once
#include <stdint.h>
typedef int32_t fixed_t;
/* Standard arithmetic. */
#define fix(x) ((int)((x) * 65536))
//GCC complained when in inline functions
#define ffloor(f) ((int)(f) >> 16)
static inline fixed_t fmul(fixed_t left, fixed_t right)
{
/* Generally optimized by the compiler to use dmuls.l and xtrct */
@ -17,35 +22,11 @@ static inline fixed_t fmul(fixed_t left, fixed_t right)
return (int32_t)(p >> 16);
}
static inline fixed_t fdiv(fixed_t left, fixed_t right)
{
/* Pretty slow */
int64_t d = (int64_t)left << 16;
return d / right;
}
#define fix(x) ((int)((x) * 65536))
static inline fixed_t fixdouble(double constant)
{
return (fixed_t)(constant * 65536);
}
static inline fixed_t fixfloat(float constant)
{
return (fixed_t)(constant * 65536);
}
static inline fixed_t fdec(fixed_t f)
{
return f & 0xffff;
}
static inline int ffloor(fixed_t f)
{
return f >> 16;
}
static inline int fceil(fixed_t f)
{
return (f + 0xffff) >> 16;
@ -56,21 +37,6 @@ static inline int fround(fixed_t f)
return (f + 0x8000) >> 16;
}
static inline float f2float(fixed_t f)
{
return (float)f / 65536;
}
static inline double f2double(fixed_t f)
{
return (double)f / 65536;
}
static inline double f2int(fixed_t f)
{
return (int)f / 65536;
}
static inline fixed_t feasein(fixed_t x)
{
return fmul(x, x);
@ -86,3 +52,35 @@ static inline fixed_t fease(fixed_t x)
return fix(1) - 2 * fmul(x, x);
}
}
static inline fixed_t fdiv(fixed_t left, fixed_t right)
{
/* Pretty slow */
int64_t d = (int64_t)left << 16;
return d / right;
}
static inline fixed_t fixdouble(double constant)
{
return (fixed_t)(constant * 65536);
}
static inline fixed_t fixfloat(float constant)
{
return (fixed_t)(constant * 65536);
}
static inline float f2float(fixed_t f)
{
return (float)f / 65536;
}
static inline double f2double(fixed_t f)
{
return (double)f / 65536;
}
static inline double f2int(fixed_t f)
{
return (int)f / 65536;
}

View File

@ -1,3 +1,4 @@
//Fcalva 14/02/2024
// Tout les #include extérieurs au projet
#ifndef includes__h

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"
#include "inputs.h"
@ -73,8 +75,12 @@ void keys_get(Game *game){
#endif
#ifdef SDL2
/*=============================================================================
*================= SDL2 ====================
*=============================================================================
*/
//This SDL2 part is very unfinished
//The actual keys behind the RCKEY_ ones
@ -99,14 +105,14 @@ void rc_pollevent(){
SDL_PumpEvents();
}
//All the following is to redo
uint8_t rc_keydown(enum keys key){
return 1;
}
//To reimplement
uint8_t rc_getkey(enum keys key) {
dupdate();

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"
#include "types.h"

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#ifdef FX9860G
#error "Ce code n'est pas pour FX, enlevez ce message a vos riques et périls"
#endif
@ -32,8 +34,8 @@
//
#ifdef FXCG50
//extern image_t briques0;
//extern image_t buisson0;
extern image_t briques0;
extern image_t buisson0;
#endif
Player player1;
@ -41,8 +43,8 @@ Player player1;
char exit_game = 0;
char disp_frame_time = 0;
char first_frame = 1;
int frame_time_timer = 1;
int capture_timer = 1;
char frame_time_timer = 1;
char capture_timer = 1;
int frame_time = 0;
int raycast_time = 0;
@ -65,17 +67,17 @@ int main(){
//trucs de chargement
image_t *vram = image_create_vram();
/*image_t *sky_tex = image_alloc(64, 64, IMAGE_RGB565);
image_t *sky_tex = image_alloc(64, 64, IMAGE_RGB565);
image_t *D_tex = image_alloc(64, 64, IMAGE_RGB565);
image_fill(D_tex, C_DGRAY);
image_fill(sky_tex, C_BSKY);*/
image_fill(sky_tex, C_BSKY);
extern image_t *tex_index[tindex_size];
//tex_index[0] = D_tex;
//tex_index[1] = &buisson0;
//tex_index[2] = &briques0;
//tex_index[3] = sky_tex;
tex_index[0] = D_tex;
tex_index[1] = &buisson0;
tex_index[2] = &briques0;
tex_index[3] = sky_tex;
prof_init();
@ -112,21 +114,21 @@ int main(){
keys_get(&game);
//logic();
do_logic(&game);
if (disp_frame_time == 1) dprint( 1, 1, C_BLACK, "Frame time : %d ms", frame_time);
if (disp_frame_time == 1) dprint( 1, 1, C_BLACK, "Fps : %d", (int)(1.0/((float)frame_time/1000.0)));
#ifdef debug
dprint( 1, 10,C_BLACK, "Raycast time : %d ms", raycast_time);
dprint( 1, 20,C_BLACK, "Draw time : %d ms", draw_time);
dprint( 1, 30, C_BLACK, "planeX : %d", player1.plane.x);
dprint( 1, 40, C_BLACK, "planeY : %d", player1.plane.y);
dprint( 1, 50, C_BLACK, "dirX : %d", player1.dir.x);
dprint( 1, 60, C_BLACK, "dirY : %d", player1.dir.y);
dprint( 1, 70, C_BLACK, "posX : %d", player1.pos.x);
dprint( 1, 80, C_BLACK, "posY : %d", player1.pos.y);
dprint( 1, 90, C_BLACK, "posZ : %d", player1.pos.z);
dprint( 1, 30, C_BLACK, "planeX : %d", player.plane.x);
dprint( 1, 40, C_BLACK, "planeY : %d", player.plane.y);
dprint( 1, 50, C_BLACK, "dirX : %d", player.dir.x);
dprint( 1, 60, C_BLACK, "dirY : %d", player.dir.y);
dprint( 1, 70, C_BLACK, "posX : %d", player.pos.x);
dprint( 1, 80, C_BLACK, "posY : %d", player.pos.y);
dprint( 1, 90, C_BLACK, "posZ : %d", player.pos.z);
#ifdef FXCG50
dprint( 1, 130, C_BLACK, "RAM usage : %d",
kmalloc_get_gint_stats(kmalloc_get_arena("_uram"))->used_memory);
@ -148,11 +150,11 @@ int main(){
usb_close();
#endif
//image_free(vram);
//image_free(&briques0);
//image_free(&buisson0);
//image_free(sky_tex);
//image_free(D_tex);
image_free(vram);
image_free(&briques0);
image_free(&buisson0);
image_free(sky_tex);
image_free(D_tex);
#ifdef SDL2
sdl_image_quit();

165
src/map.c
View File

@ -1,173 +1,18 @@
//Fcalva 17/02/2024
#include "includes.h"
#include "types.h"
ShooterMap ShooterLevel0 = {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,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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,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,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,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,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,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,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,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,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
}
},
16,
{{fix(12),fix(18),fix(0),1},
{fix(16),fix(18),fix(0),1},
{fix(18),fix(24),fix(0),1},
{fix(16),fix(3),fix(1),1},
{fix(16),fix(5),fix(1),1},
{fix(8),fix(18),fix(1),1},
{fix(20),fix(12),fix(0),1},
{fix(22),fix(11),fix(0),1},
{fix(4),fix(2),fix(0),1},
{fix(16),fix(4),fix(1),1},
{fix(16),fix(9),fix(1),1},
{fix(13),fix(13),fix(1),1},
{fix(10),fix(16),fix(1),1},
{fix(9),fix(18),fix(0),1},
{fix(28),fix(17),fix(0),1},
{fix(3),fix(18),fix(0),1},
{fix(15),fix(20),fix(1),1}
}
};
void load_map(Game *game, int map_id){
extern ShooterMap ShooterLevel0;
extern ShooterMap map0;
dprint( 1, 1, C_BLACK, "Chargement...");
dupdate();
switch(map_id){
case 0:{game->shooterLevel = &ShooterLevel0; break;}
default:{game->shooterLevel = &ShooterLevel0; break;}
case 0:{game->shooterLevel = &map0; break;}
default:{game->shooterLevel = &map0; break;}
}
}

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"
#include "types.h"

View File

@ -1,3 +1,5 @@
//Fcalva 21/02/2024
#include "includes.h"
#include "moteur.h"
@ -35,34 +37,42 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
image_t *tex_index[tindex_size];
int8_t on_solid_ground(ShooterMap *ShooterLevel, Vector3d pos) {
int8_t on_ground(ShooterMap *shooterLevel, Vector3d pos) {
int map_w = shooterLevel->w;
int map_h = shooterLevel->h;
int dfact = map_w*map_h;
// If pos is int and tile under is either solid or z is 0
if(fix(ffloor(pos.z)) == pos.z){
if(pos.z < fix(1)) return 1;
if(has_collision(
ShooterLevel->wall[ffloor(pos.z - 0x0001)][ffloor(pos.x)][ffloor(pos.y)]
shooterLevel->wall[ffloor(pos.z - 0x0001)*dfact+ffloor(pos.x)*map_w+ffloor(pos.y)]
) > 0){
return 1;
}
}
return 0;
}
int8_t bumps_head(ShooterMap *ShooterLevel, Vector3d pos) {
int8_t bumps_head(ShooterMap *shooterLevel, Vector3d pos) {
int map_w = shooterLevel->w;
int map_h = shooterLevel->h;
int map_d = shooterLevel->d;
int dfact = map_w*map_h;
pos.z += player_height;
if(fix(ffloor(pos.z)) == pos.z){
if(pos.z > fix(3)) return 1;
if(has_collision(
ShooterLevel->wall[ffloor(pos.z + 0x0001)][ffloor(pos.x)][ffloor(pos.y)]
) > 0){
return 1;
}
if(pos.z >= fix(map_d)) return 1;
if(has_collision(
shooterLevel->wall[ffloor(pos.z + 0x0001)*dfact+ffloor(pos.x)*map_w+ffloor(pos.y)]
) > 0){
return 1;
}
return 0;
}
void move(Game *game, uint8_t keys) {
void move(Game *game, uint32_t keys) {
Player *player = game->player;
ShooterMap *shooterLevel = game->shooterLevel;
int map_w = shooterLevel->w;
int map_h = shooterLevel->h;
int dfact = map_w*map_h;
extern int frame_time;
fixed_t sFrameTime = fix(frame_time)/1000; //Frame time in seconds
@ -81,12 +91,22 @@ void move(Game *game, uint8_t keys) {
player->velocity.x = fmul(player->dir.x, moveSpeed);
player->velocity.y = fmul(player->dir.y, moveSpeed);
}
if(keys & 0b10) {
if(keys & 0b1<<1) {
player->velocity.x = -fmul(player->dir.x, moveSpeed);
player->velocity.y = -fmul(player->dir.y, moveSpeed);
}
/*if(keydown(KEY_F2)){
if(player->pos.z - fmul(moveSpeed, 0x3FFF) > 0){
player->pos.z -= fmul(moveSpeed, 0x3FFF);
}
}
if(keydown(KEY_F3)){
if(player->pos.z + player_height + fmul(moveSpeed, 0x3FFF) < fix(3)){
player->pos.z += fmul(moveSpeed, 0x3FFF);
}
}*/
//rotate to the right
if(keys & 0b1000) {
if(keys & 0b1<<3) {
//both camera direction and camera plane must be rotated
oldDirX = player->dir.x;
player->dir.x = (fmul(player->dir.x, c_rotSpeed)+1) - (fmul(player->dir.y, -s_rotSpeed)+1);
@ -96,7 +116,7 @@ void move(Game *game, uint8_t keys) {
player->plane.y = (fmul(oldPlaneX, -s_rotSpeed)+1) + (fmul(player->plane.y, c_rotSpeed)+1);
}
//rotate to the left
if(keys & 0b100) {
if(keys & 0b1<<2) {
//both camera direction and camera plane must be rotated
oldDirX = player->dir.x;
player->dir.x = (fmul(player->dir.x, c_rotSpeed)-1) - (fmul(player->dir.y, s_rotSpeed)-1);
@ -106,8 +126,8 @@ void move(Game *game, uint8_t keys) {
player->plane.y = (fmul(oldPlaneX, s_rotSpeed)+1) + (fmul(player->plane.y, c_rotSpeed) + 1);
}
//Jump
if(keys & 0b10000) {
if(on_solid_ground(shooterLevel, player->pos) > 0){
if(keys & 0b1<<4) {
if(on_ground(shooterLevel, player->pos) > 0){
player->velocity.z = moveSpeed;
jumped = 1;
dprint(1,150,C_BLACK,"jumped");
@ -125,9 +145,9 @@ void move(Game *game, uint8_t keys) {
player->velocity.x -= fmul(player->velocity.x, fmul(0x5000, fsq(player->velocity.x)));
player->velocity.y -= fmul(player->velocity.y, fmul(0x5000, fsq(player->velocity.x)));
if(shooterLevel->wall[fpos.z][temp.x][fpos.y] == 0) player->pos.x = player->pos.x + fmul(player->velocity.x, sFrameTime);
if(!has_collision(shooterLevel->wall[fpos.z*dfact+temp.x*map_w+fpos.y])) player->pos.x = player->pos.x + fmul(player->velocity.x, sFrameTime);
else player->velocity.x = 0;
if(shooterLevel->wall[fpos.z][fpos.x][temp.y] == 0) player->pos.y = player->pos.y + fmul(player->velocity.y, sFrameTime);
if(!has_collision(shooterLevel->wall[fpos.z*dfact+fpos.x*map_w+temp.y])) player->pos.y = player->pos.y + fmul(player->velocity.y, sFrameTime);
else player->velocity.y = 0;
/*if((on_solid_ground(shooterLevel, (Vector3d){player->pos.x, player->pos.y, temp.z}) > 0
@ -142,22 +162,90 @@ void move(Game *game, uint8_t keys) {
if (player->dir.x < -0xFFFF) player->dir.x = -0xFFFF;
if (player->dir.y < -0xFFFF) player->dir.y = -0xFFFF;
}
/*
void draw_background(int back_id){ //a refaire
}*/
fixed_t ticks_todo;
void do_logic(Game *game){
extern int frame_time;
extern fixed_t ticks_todo;
ticks_todo += fix(frame_time);
fixed_t old = ticks_todo;
int ticks_now = ffloor(ticks_todo/tick_time);
ticks_todo = old % tick_time;
for(int t_done = 0; t_done < ticks_todo; t_done++){
logic(game);
}
}
void logic(){
//logique (logique)
void logic(Game *game){
}
/*
void draw_f(image_t *vram){ //a refaire
}*/
//#ifdef SDL2
void dstripe(image_t *stripe, image_t *vram, int x, int linePos, int lineHeight, int ymin, int ymax){
int i;
fixed_t cpixel;
int cy;
int texSampleY = 0;
int texSample = tsize;
struct image_linear_map tmap;
image_t stripe1;
fixed_t texScale = fix(lineHeight) / tsize; //taille proportionelle de la ligne a la tex
if(linePos < ymin || linePos+lineHeight > ymax){
texSampleY = f2int(fdiv(fix(linePos - ymin), texScale));
texSample = f2int(fdiv(fix(linePos + lineHeight - ymax), texScale));
}
image_sub(stripe, 0, texSampleY, 2, texSample, &stripe1);
image_scale(&stripe1, 0xFFFF, texScale, &tmap);
image_linear(&stripe1, image_at(vram, x, ymin), &tmap);
}
/*#endif
#ifdef FXCG50
// ! Absolutely DO NOT use with images in other formats than RGB565 !
// Checks are skipped for performance, be warned
void dstripe(image_t *stripe, image_t *vram, int x, int linePos, int lineHeight, int ymin, int ymax){
uint16_t *strpdat = stripe->data;
uint16_t *vramdat = stripe->data;
fixed_t texScale = fix(ymax-ymin)/lineHeight;
texScale = fmul(fix(lineHeight)/tsize, texScale);
fixed_t iTexScale = fdiv(0xFFFF, texScale);
fixed_t tpos = fmul(fix(ymin-linePos), iTexScale);
for(int i=fix(linePos); i<fix(ymax); i+=texScale){
//>>14 instead of >>16 is because of padding + width
//vramdat[ffloor(i)*screen_w+x] = strpdat[(tpos>>14)];
//vramdat[ffloor(i)*screen_w+x+1] = strpdat[(tpos>>14)+1];
tpos += iTexScale;
}
}
void draw_walls(Game *game, image_t *vram){
#endif*/
void __attribute__((aligned(4))) draw_walls(Game *game, image_t *vram){
Player *player = game->player;
ShooterMap *shooterLevel = game->shooterLevel;
int map_w = shooterLevel->w;
int map_h = shooterLevel->h;
int map_d = shooterLevel->d;
int dfact = map_w*map_h;
fixed_t cameraX;
fixed_t rayDirX;
@ -183,12 +271,15 @@ void draw_walls(Game *game, image_t *vram){
int v_offset = 0; //(int)(sin(f2int(posX + posY)) * 5); //a raffiner un peu
fixed_t h_offset = 0; //fix(sin(f2int(posX - posY)) * 0.01);
uint8_t *dbuffer[viewport_h];
#ifdef FXCG50
//Assign dbuffer to xyram so that checks go vroom vroom
int32_t __attribute__((aligned(4))) *dbuffer = (void *)0xe500e000 + 32;
#else
int32_t dbuffer[viewport_h];
#endif
struct image_linear_map temp;
image_t *tex_stripe;
extern image_t *tex_index[tindex_size];
extern int raycast_time;
@ -224,10 +315,9 @@ void draw_walls(Game *game, image_t *vram){
// stepping further below works. So the values can be computed as below.
// Division through zero is prevented, even though technically that's not
// needed in C++ with IEEE 754 floating point values.
// Fcalva : removed the 0 div prevention
deltaDistX = abs(fdiv(0xFFFF, rayDirX));
deltaDistY = abs(fdiv(0xFFFF, rayDirY));
deltaDistX = rayDirX == 0 ? 0xFFFF : abs(fdiv(0xFFFF, rayDirX));
deltaDistY = rayDirY == 0 ? 0xFFFF : abs(fdiv(0xFFFF, rayDirY));
//calculate step and initial sideDist
if (rayDirX < 0) {
@ -248,8 +338,8 @@ void draw_walls(Game *game, image_t *vram){
sideDistY = fmul( fix(mapY + 1) - player->pos.y, deltaDistY);
}
for(i=0; i<viewport_h; i++){
dbuffer[i] = 0x7FFFFFFF;
for(i = 0; i < viewport_h; i++){
dbuffer[i] = max_dist + 0xFFFF;
}
//perform DDA
@ -258,8 +348,8 @@ void draw_walls(Game *game, image_t *vram){
if (sideDistX >= max_dist || sideDistY >= max_dist || mapX < 0 || mapY < 0 || mapX >= map_w || mapY >= map_h) {
break;
}
//Otherwise check if ray has hit walls, and draw them
else if(shooterLevel->wall[0][mapX][mapY] != 255){
//Otherwise if ray has hit something else than an air column
else if(shooterLevel->wall[mapX*map_w+mapY] != 255){
prof_leave(rayscat);
prof_enter(img_drw);
@ -294,66 +384,51 @@ void draw_walls(Game *game, image_t *vram){
int glinePos = viewport_h/2 - lineHeight/2;
fixed_t texSize = fix(lineHeight) / tsize; //taille proportionelle de la ligne a la tex
for(i = 0; i < map_d; i++) {
if(!has_collision(shooterLevel->wall[i][mapX][mapY])) continue;
if(!has_collision(shooterLevel->wall[i*dfact+mapX*map_w+mapY])) continue;
int zOffset = player->pos.z - fix(i);
// The reasoning here is to offset the wall slice vertically from the center of the screen,
// depending on the offset between the wall and the player
int linePos = glinePos + fround(zOffset*lineHeight);
int linePos = glinePos + fround(fmul(zOffset,fix(lineHeight)));
if(linePos >= viewport_h) continue;
if(linePos+lineHeight < 1) continue;
//if(dbuffer[linePos]<perpWallDist && dbuffer[linePos+lineHeight]<perpWallDist) continue;
uint8_t tex = shooterLevel->wall[i*dfact+mapX*map_w+mapY];
uint8_t tex = 0; //ShooterLevel->wall[mapX][mapY][i];
int ymin = linePos;
int ymax = linePos+lineHeight;
int midline = linePos + lineHeight/2;
int j;
if (linePos < 1) {
texSampleY = texSize*abs(linePos);
texSample = tsize - texSampleY;
linePos = 1;
}
else {
texSampleY = 0;
texSample = 64;
}
color_t color;
switch(i){
case 0 : {color = C_PINK; break;}
case 1 : {color = C_BLACK; break;}
case 2 : {color = C_BSKY; break;}
}
//char ymin = 0;
//char ymax = viewport_h;
//int midline = (linePos*2+lineHeight)/2;
for(int j=linePos+2; j<linePos+lineHeight-2; j+=4){
if(dbuffer[j] < perpWallDist>>14){
//if(j <= midline) ymin = j;
//if(j >= midline) ymax = j;
for(j = linePos; j < midline && j < viewport_h; j++){
if(dbuffer[j] < perpWallDist){
ymin = j;
continue;
}
dbuffer[j] = perpWallDist >> 14;
dbuffer[j+1] = perpWallDist >> 14;
dbuffer[j+2] = perpWallDist >> 14;
dbuffer[j+3] = perpWallDist >> 14;
drect(x,j,x+1,j+3,perpWallDist>>16);
else dbuffer[j] = perpWallDist;
}
for(int j = linePos+lineHeight; j >= midline && j > 0; j--){
if(dbuffer[j] < perpWallDist){
ymax = j;
continue;
}
else dbuffer[j] = perpWallDist;
}
if(abs(ymax-ymin) < 2) continue;
/*image_sub(tex_index[tex], texX, texSampleY, 1, texSample, tex_stripe);
//gint_dvline(ymin, ymax, x, rgb565to8888(perpWallDist>>15));
//gint_dvline(ymin, ymax, x+1, rgb565to8888(perpWallDist>>15));
image_scale(tex_stripe, 0xFFFF, texSize, &temp);
image_t tex_stripe;
image_linear(tex_stripe, image_at(vram, x, linePos), &temp);*/
image_sub(tex_index[tex], texX, 0, 2, tsize, &tex_stripe);
dstripe(&tex_stripe, vram, x, linePos, lineHeight, ymin, ymax);
//prof_leave(img_drw);
//prof_enter(rayscat);

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"
#include "types.h"
@ -5,19 +7,10 @@
#ifndef moteur_h
#define moteur_h
static inline uint8_t has_collision(uint8_t tile){
switch(tile){
case 0: return 0;
case 254: return 0;
case 255: return 0;
default: return 1;
}
}
void draw_background(int back_id);
void logic();
void do_logic(Game *game);
void draw_f(image_t *vram);
void draw_walls(Game *game, image_t *vram);
void move(Game *game, uint8_t keys);
void move(Game *game, uint32_t keys);
#endif /* moteur */

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"
#ifndef player_h

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"
#ifdef SDL2
@ -157,6 +159,13 @@ image_t *image_sub(image_t *src, int x, int y, int w, int h, image_t *dest){
return dest;
}
void image_fill(image_t *img, SDL_Color color) {
//SDL_FillRect(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
}
void image_scale(image_t const *src, int gamma_x, int gamma_y, struct image_linear_map *map){
map->h_scale = f2float(gamma_x) * upscale;
map->v_scale = f2float(gamma_y) * upscale;

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#ifdef SDL2
#ifndef sdl__h
@ -138,5 +140,7 @@ image_t sdl_tex_load(char *filename);
void sdl_image_init();
void sdl_image_quit();
#endif
#endif

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"
#include "types.h"
@ -9,8 +11,8 @@ void draw_map_sprites(image_t *sprite, ShooterMap *ShooterLevel, Player *player)
//This sorts the sprites by distance, before prunning the ones further than max_sprite_dist
//Then it adds the remaining ones to the render queue, starting from furthest
Sprite *sprite_list;
fixed_t *dist_list;
Sprite sprite_list[max_sprite_search];
fixed_t dist_list[max_sprite_search];
int count;
int a_count = 0; //Actual count
fixed_t *base;
@ -20,8 +22,6 @@ void draw_map_sprites(image_t *sprite, ShooterMap *ShooterLevel, Player *player)
count = ShooterLevel->sprite_count < max_sprite_search ? ShooterLevel->sprite_count:max_sprite_search;
dist_list = malloc(sizeof(fixed_t) * count * 2);
for(i = 0; i < count; i++){
dist_list[i] = fmul(player->pos.x - ShooterLevel->sprites[i].pos_x, player->pos.x - ShooterLevel->sprites[i].pos_x)
+ fmul(player->pos.y - ShooterLevel->sprites[i].pos_y, player->pos.y - ShooterLevel->sprites[i].pos_y);
@ -34,8 +34,6 @@ void draw_map_sprites(image_t *sprite, ShooterMap *ShooterLevel, Player *player)
count = ShooterLevel->sprite_count < max_sprite_display ? ShooterLevel->sprite_count:max_sprite_display;
sprite_list = malloc(sizeof(Sprite) * count);
for(i = 0; i < count; i++){
if(dist_list[i] > fmul(max_sprite_dist, max_sprite_dist)) break;
a_count++;
@ -48,8 +46,8 @@ void draw_map_sprites(image_t *sprite, ShooterMap *ShooterLevel, Player *player)
Vector2d sprite_pos;
//Les pos des sprites sont cassées....
for(i = a_count; i >= 0; i--){
sprite_pos.x = /*sprite_list[i].pos_x*/ fix(4) - player->pos.x;
sprite_pos.y = /*sprite_list[i].pos_y*/ fix(4) - player->pos.y;
sprite_pos.x = sprite_list[i].pos_x - player->pos.x;
sprite_pos.y = sprite_list[i].pos_y - player->pos.y;
sprite_dir = fix2DNorml(sprite_pos);
sprite_dir.x -= player->dir.x;
@ -73,8 +71,6 @@ void draw_map_sprites(image_t *sprite, ShooterMap *ShooterLevel, Player *player)
*/
}
free(dist_list);
free(sprite_list);
}
void draw_sprites(image_t *sprite, ShooterMap *ShooterLevel, Player *player){

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"
#ifndef sprites_h
@ -5,6 +7,6 @@
#include "types.h"
void draw_sprites(image_t*, ShooterMap *ShooterLevel, Player*);
void draw_sprites(image_t *sprite, ShooterMap *ShooterLevel, Player *player);
#endif

View File

@ -1,3 +1,5 @@
//Fcalva 17/02/2024
#include "includes.h"
#ifndef types_h
@ -25,25 +27,25 @@ typedef struct{
typedef struct{
//size (hardcoded to 128x128 for now)
//int w, h;
//size
int w, h, d;
//Start info
uint32_t startpos_x; uint32_t startpos_y;
uint32_t startpos_x; uint32_t startpos_y; uint32_t startpos_z;
uint32_t startdir_x; uint32_t startdir_y;
uint32_t startplane_x; uint32_t startplane_y;
//Floor layer data (Unused for now)
//Floor tile 0;0 is used to say if there is a sky
//0 == No, >0 is the sky's ID
uint8_t floor[map_w][map_h];
uint8_t *floor;
//Wall layer data
uint8_t wall[map_d][map_w][map_h];
uint8_t *wall;
//Sprite layer data
uint8_t sprite_count;
Sprite sprites[256];
Sprite *sprites;
} ShooterMap;

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#include "includes.h"
#include "ui.h"

View File

@ -1,3 +1,5 @@
//Fcalva 14/02/2024
#ifndef ui__h
#define ui__h

View File

@ -1,10 +1,12 @@
//Fcalva 14/02/2024
#include "includes.h"
#include "types.h"
#include "utils.h"
void debug_func(){
int debug_func(){
return 1;
}
@ -129,141 +131,60 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// Function using the same raycast logic returning distance (and without the same comments)
// Returns -1 if it didn't hit anything, -2 if incorrect type input
// Type 0 = Mobs & Walls; Type 1 = Mobs; Type 2 = Walls
// A refactoriser pour utiliser des vecteurs
// 3D raycast function based on Permadi's'
// Returns -1 if it didn't hit anything within dist, else distance to hit
fixed_t raycast(ShooterMap *ShooterLevel, fixed_t posX, fixed_t posY, fixed_t rayDirX, fixed_t rayDirY, fixed_t dist, char type){
/*fixed_t raycast(ShooterMap *ShooterLevel, Vector3d pos, Vector3d rayDir, fixed_t dist){
fixed_t sideDistX;
fixed_t sideDistY;
fixed_t deltaDistX;
fixed_t deltaDistY;
fixed_t wallDist;
char side;
int mapX;
int mapY;
int stepX;
int stepY;
Vector3d sideDist;
Vector3d deltaDist;
Vector3d map;
Vector3d step;
int hit = 0;
int *sideDistp = (int*)&sideDist;
int *deltaDistp = (int*)&deltaDist;
int *rayDirp = (int*)&deltaDist;
int *mapp = (int*)&map;
int *stepp = (int*)&step;
int *posp = (int*)&pos;
int side;
mapX = f2int(posX);
mapY = f2int(posY);
map.x = f2int(pos.x);
map.y = f2int(pos.y);
map.z = f2int(pos.z);
deltaDistX = abs(fdiv(0xFFFF, rayDirX));
deltaDistY = abs(fdiv(0xFFFF, rayDirY));
deltaDist.x = abs(fdiv(0xFFFF, rayDir.x));
deltaDist.y = abs(fdiv(0xFFFF, rayDir.y));
deltaDist.z = abs(fdiv(0xFFFF, rayDir.z));
if (rayDirX <= 0) {
stepX = -1;
sideDistX = fmul(posX - fix(mapX), deltaDistX);
}
else {
stepX = 1;
sideDistX = fmul( fix(mapX + 1) - posX, deltaDistX);
}
if (rayDirY <= 0) {
stepY = -1;
sideDistY = fmul(posY - fix(mapY), deltaDistY);
}
else {
stepY = 1;
sideDistY = fmul( fix(mapY + 1) - posY, deltaDistY);
for(int i = 0; i < 3; i++){
if(rayDirp[i] < 0){
stepp[i] = -1;
sideDistp[i] = fmul(posp[i] - fix(mapp[i]), deltaDistp[i]);
} else {
stepp[i] = 1;
sideDistp[i] = fmul(fix(mapp[i] + 1) - posp[i], deltaDistp[i]);
}
}
//perform DDA
switch(type){
//Walls and mobs raycast
case 0 : {
while(1) {
//Check if the ray is out of range/bounds
if (sideDistX >= dist || sideDistY >= dist || mapX < 0 || mapY < 0) {
hit = 0;
break;
}
//Otherwise check if ray has hit a wall/mob
else if (ShooterLevel->wall[mapX][mapY] != 0 || 0 != 0) {
hit = 1;
break;
}
if (sideDistX < sideDistY) {
sideDistX += deltaDistX;
mapX += stepX;
side = 0;
}
else {
sideDistY += deltaDistY;
mapY += stepY;
side = 1;
}
}
while(1) {
//Check if the ray is out of range/bounds
if (sideDist.x > dist || sideDist.y > dist || sideDist.z > dist|| map.x < 0 || map.y < 0 || map.z < 0) {
hit = 0;
break;
}
//Mobs only
case 1 : {
while(1) {
//Check if the ray is out of range/bounds
if (sideDistX >= dist || sideDistY >= dist || mapX < 0 || mapY < 0) {
hit = 0;
break;
}
//Otherwise check if ray has hit a wall
else if (ShooterLevel->wall[mapX][mapY] != 0) {
hit = 1;
break;
}
if (sideDistX < sideDistY) {
sideDistX += deltaDistX;
mapX += stepX;
side = 0;
}
else {
sideDistY += deltaDistY;
mapY += stepY;
side = 1;
}
}
break;
}
//Walls only
case 2 : {
while(1) {
//Check if the ray is out of range/bounds
if (sideDistX >= dist || sideDistY >= dist || mapX < 0 || mapY < 0) {
hit = 0;
break;
}
//Otherwise check if ray has hit a mob
else if (0 != 0) {
hit = 1;
break;
}
if (sideDistX < sideDistY) {
sideDistX += deltaDistX;
mapX += stepX;
side = 0;
}
else {
sideDistY += deltaDistY;
mapY += stepY;
side = 1;
}
}
break;
}
default : {
return -2;
//Otherwise check if ray has hit a wall
else if (has_collision(ShooterLevel->wall[map.z][map.x][map.y])) {
hit = 1;
break;
}
side = sml_v3d(&sideDist);
sideDistp[side] += deltaDistp[side];
mapp[side] += stepp[side];
}
if (hit == 0) wallDist = -1;
else if (side == 0) wallDist = (sideDistX - deltaDistX);
else wallDist = (sideDistY - deltaDistY);
return wallDist;
}
if (hit == 0) return -1;
return sideDistp[side] - deltaDistp[side];
}*/

View File

@ -1,131 +1,142 @@
#include "includes.h"
#ifndef utils__h
#define utils__h
#include "types.h"
#define sq(x) (x*x)
#define fsq(x) (fmul(x,x))
//Provient de
//https://stackoverflow.com/questions/31117497/fastest-integer-square-root-in-the-least-amount-of-instructions
//, njuffa
static const uint8_t clz_tab[32] = {
31, 22, 30, 21, 18, 10, 29, 2, 20, 17, 15, 13, 9, 6, 28, 1,
23, 19, 11, 3, 16, 14, 7, 24, 12, 4, 8, 25, 5, 26, 27, 0};
static inline uint8_t clz (uint32_t a)
{
a |= a >> 16;
a |= a >> 8;
a |= a >> 4;
a |= a >> 2;
a |= a >> 1;
return clz_tab [0x07c4acdd * a >> 27];
}
/* 16 x 16 -> 32 bit unsigned multiplication; should be single instruction */
static inline uint32_t umul16w (uint16_t a, uint16_t b)
{
return (uint32_t)a * b;
}
/* Reza Hashemian, "Square Rooting Algorithms for Integer and Floating-Point
Numbers", IEEE Transactions on Computers, Vol. 39, No. 8, Aug. 1990, p. 1025
*/
static uint16_t isqrt (uint32_t x)
{
volatile uint16_t y, z, lsb, mpo, mmo, lz, t;
if (x == 0) return x; // early out, code below can't handle zero
lz = clz (x); // #leading zeros, 32-lz = #bits of argument
lsb = lz & 1;
mpo = 17 - (lz >> 1); // m+1, result has roughly half the #bits of argument
mmo = mpo - 2; // m-1
t = 1 << mmo; // power of two for two's complement of initial guess
y = t - (x >> (mpo - lsb)); // initial guess for sqrt
t = t + t; // power of two for two's complement of result
z = y;
y = (umul16w (y, y) >> mpo) + z;
y = (umul16w (y, y) >> mpo) + z;
if (x >= 0x40400) {
y = (umul16w (y, y) >> mpo) + z;
y = (umul16w (y, y) >> mpo) + z;
if (x >= 0x1002000) {
y = (umul16w (y, y) >> mpo) + z;
y = (umul16w (y, y) >> mpo) + z;
}
}
y = t - y; // raw result is 2's complement of iterated solution
y = y - umul16w (lsb, (umul16w (y, 19195) >> 16)); // mult. by sqrt(0.5)
if ((int32_t)(x - umul16w (y, y)) < 0) y--; // iteration may overestimate
if ((int32_t)(x - umul16w (y, y)) < 0) y--; // result, adjust downward if
if ((int32_t)(x - umul16w (y, y)) < 0) y--; // necessary
return y; // (int)sqrt(x)
}
static inline fixed_t fsqrt(fixed_t x){
return isqrt(x) << 8;
}
static inline fixed_t fix2Ddotp(Vector2d a, Vector2d b){
return fmul(a.x, b.x) + fmul(a.y, b.y);
}
static inline fixed_t fix2DNorm(Vector2d a) {
return fsqrt(fix2Ddotp(a, a));
}
static inline Vector2d fix2DNorml(Vector2d a) {
Vector2d b;
fixed_t ilen = 1/fix2DNorm(a);
b.x = fmul(a.x ,ilen);
b.y = fmul(a.y, ilen);
return b;
}
int cmpfunc(const void *, const void *);
fixed_t raycast(ShooterMap*, fixed_t, fixed_t, fixed_t, fixed_t, fixed_t, char);
#ifdef FXCG50
typedef uint16_t color_t;
void *bsearch (const void *key, const void *base0, size_t nmemb, size_t size,
int (*compar)(const void *, const void *));
static inline color_t rgb565to8888(uint16_t a){
return a;
}
#endif
#ifdef SDL2
typedef SDL_Color color_t;
static color_t rgb565to8888(uint16_t a){
uint8_t r,g,b;
r = (a & 0b1111000000000) >> 11;
g = (a & 0b0000111110000) >> 5;
b = a & 0b0000000001111;
SDL_Color c = {r, g, b, 255};
return c;
}
#endif
//Function to trigger GDB breakpoints
void debug_func();
#endif /* sprites.h */
//Fcalva 14/02/2024
#include "includes.h"
#ifndef utils__h
#define utils__h
#include "types.h"
#define sq(x) (x*x)
#define fsq(x) (fmul(x,x))
static inline uint8_t has_collision(uint8_t tile){
switch(tile){
case 0: return 0;
case 254: return 0;
case 255: return 0;
default: return 1;
}
}
//Provient de
//https://stackoverflow.com/questions/31117497/fastest-integer-square-root-in-the-least-amount-of-instructions
//, njuffa
static const uint8_t clz_tab[32] = {
31, 22, 30, 21, 18, 10, 29, 2, 20, 17, 15, 13, 9, 6, 28, 1,
23, 19, 11, 3, 16, 14, 7, 24, 12, 4, 8, 25, 5, 26, 27, 0};
static inline uint8_t clz (uint32_t a)
{
a |= a >> 16;
a |= a >> 8;
a |= a >> 4;
a |= a >> 2;
a |= a >> 1;
return clz_tab [0x07c4acdd * a >> 27];
}
/* 16 x 16 -> 32 bit unsigned multiplication; should be single instruction */
static inline uint32_t umul16w (uint16_t a, uint16_t b)
{
return (uint32_t)a * b;
}
/* Reza Hashemian, "Square Rooting Algorithms for Integer and Floating-Point
Numbers", IEEE Transactions on Computers, Vol. 39, No. 8, Aug. 1990, p. 1025
*/
static uint16_t isqrt (uint32_t x)
{
volatile uint16_t y, z, lsb, mpo, mmo, lz, t;
if (x == 0) return x; // early out, code below can't handle zero
lz = clz (x); // #leading zeros, 32-lz = #bits of argument
lsb = lz & 1;
mpo = 17 - (lz >> 1); // m+1, result has roughly half the #bits of argument
mmo = mpo - 2; // m-1
t = 1 << mmo; // power of two for two's complement of initial guess
y = t - (x >> (mpo - lsb)); // initial guess for sqrt
t = t + t; // power of two for two's complement of result
z = y;
y = (umul16w (y, y) >> mpo) + z;
y = (umul16w (y, y) >> mpo) + z;
if (x >= 0x40400) {
y = (umul16w (y, y) >> mpo) + z;
y = (umul16w (y, y) >> mpo) + z;
if (x >= 0x1002000) {
y = (umul16w (y, y) >> mpo) + z;
y = (umul16w (y, y) >> mpo) + z;
}
}
y = t - y; // raw result is 2's complement of iterated solution
y = y - umul16w (lsb, (umul16w (y, 19195) >> 16)); // mult. by sqrt(0.5)
if ((int32_t)(x - umul16w (y, y)) < 0) y--; // iteration may overestimate
if ((int32_t)(x - umul16w (y, y)) < 0) y--; // result, adjust downward if
if ((int32_t)(x - umul16w (y, y)) < 0) y--; // necessary
return y; // (int)sqrt(x)
}
static inline fixed_t fsqrt(fixed_t x){
return isqrt(x) << 8;
}
static inline fixed_t fix2Ddotp(Vector2d a, Vector2d b){
return fmul(a.x, b.x) + fmul(a.y, b.y);
}
static inline fixed_t fix2DNorm(Vector2d a) {
return fsqrt(fix2Ddotp(a, a));
}
static inline Vector2d fix2DNorml(Vector2d a) {
Vector2d b;
fixed_t ilen = 1/fix2DNorm(a);
b.x = fmul(a.x ,ilen);
b.y = fmul(a.y, ilen);
return b;
}
int cmpfunc(const void *, const void *);
fixed_t raycast(ShooterMap *ShooterLevel, Vector3d pos, Vector3d rayDir, fixed_t dist);
#ifdef FXCG50
typedef uint16_t color_t;
void *bsearch (const void *key, const void *base0, size_t nmemb, size_t size,
int (*compar)(const void *, const void *));
static inline color_t rgb565to8888(uint16_t a){
return a;
}
#endif
#ifdef SDL2
typedef SDL_Color color_t;
static color_t rgb565to8888(uint16_t a){
uint8_t r,g,b;
r = (a & 0b1111100000000000) >> 11;
g = (a & 0b0000011111100000) >> 5;
b = a & 0b0000000000011111;
SDL_Color c = {r, g, b, 255};
return c;
}
#endif
//Function to trigger GDB breakpoints
int debug_func();
#endif /* sprites.h */