Compare commits
240 Commits
c6c4aebab1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| e941502615 | |||
| 8bab2da2ed | |||
| 5ef278ce70 | |||
| 14103175a9 | |||
| 10a3e2fedd | |||
| 25a36d5064 | |||
| 8706b2c7fb | |||
| d493ebf4f0 | |||
| 3e795998d1 | |||
| c694781f38 | |||
| 1a2298963d | |||
| 4c1ed1cf9b | |||
| f80d0a656e | |||
| 4429cd92c1 | |||
| 4ac34b8583 | |||
| cf7ea6cc9c | |||
| f5da35bfb2 | |||
| c0accd25e2 | |||
| ad8ad7e756 | |||
| 673587230e | |||
| 8538a1047f | |||
| e150097edc | |||
| 5f0d1f9577 | |||
| 6d8d02f0e4 | |||
| 5f7fb8625d | |||
| ce2fcefd71 | |||
| 6f31751d42 | |||
| 43de2c0b35 | |||
| 1ca9d0c01b | |||
| 90d5e6c3cc | |||
| a653dad7b0 | |||
| cf1f97a84f | |||
| 93fe17c3b2 | |||
| 3c2a5c9b37 | |||
| 270cd1d487 | |||
| 58512840a4 | |||
| 2f3161d701 | |||
| 99cc803f21 | |||
| d42b1753d0 | |||
| a1d17ccf99 | |||
| 3ca744ee46 | |||
| 302b86ddb4 | |||
| 81daf725d5 | |||
| d80c673882 | |||
| 4ac123abb0 | |||
| cb22ff321f | |||
| c35889a840 | |||
| c610065fe0 | |||
| d2be113c4e | |||
| 052bb063df | |||
| 9d974438b3 | |||
| b9fe376f2a | |||
| 0c05f6d5b6 | |||
| 39125ee57c | |||
| 7ebeeebaaf | |||
| c6c7b63f6d | |||
| 7959baeed9 | |||
| 5d1c6c6d99 | |||
| 145d1e3fc0 | |||
| 4679255d60 | |||
| 3cfb65320c | |||
| 636e4d932a | |||
| 9979f31b4a | |||
| 6190b35349 | |||
| fd4136a882 | |||
| 5362c5b022 | |||
| 357b5d5977 | |||
| f50ad68f10 | |||
| 155a7d038d | |||
| 4b732c189c | |||
| 1c3d59d678 | |||
| 1acbe1d097 | |||
| 245524c021 | |||
| b4624a9223 | |||
| 28e3e1ee0a | |||
| e250ca048f | |||
| 5bf96b9aba | |||
| ac6f521288 | |||
| 5a5c06efd1 | |||
| ef1a514c9b | |||
| ce54b10abb | |||
| 40538eaa28 | |||
| 88d814f371 | |||
| b933ceee63 | |||
| 75ccddbaa1 | |||
| fde77affdf | |||
| 52a387463d | |||
| 5a0fc9330d | |||
| 66661036a4 | |||
| bb132aade2 | |||
| d4e09e1e88 | |||
| 866f464d37 | |||
| da9f3c1e02 | |||
| 9b8fdf289f | |||
| bf12c1664a | |||
| d7836eedd7 | |||
| 4bac816e37 | |||
| 67f9103b96 | |||
| 8ddee66304 | |||
| 4fb6a9999f | |||
| 794dcf83f6 | |||
| 9fe73ed8e4 | |||
| e99b2abd7d | |||
| b128b285ed | |||
| c8bf9640cf | |||
| 2b4523d644 | |||
| 16306f2325 | |||
| d7c3ea7f69 | |||
| 413c3c30a6 | |||
| df6e7e5155 | |||
| 46974ef2eb | |||
| 50ccb2ccc2 | |||
| 9b966a260c | |||
| 49ea56f5e2 | |||
| 300edc90b5 | |||
| 5ff33ca6ca | |||
| 6dc6d8fc24 | |||
| 8d94ed516c | |||
| ba0b0930b0 | |||
| 29e76b1ddd | |||
| 54ceaa3042 | |||
| dcc223d287 | |||
| 7187412a45 | |||
| ff7aef827c | |||
| 6ff7ccf69a | |||
| e347e04d33 | |||
| 7946ea54a6 | |||
| 79033346c0 | |||
| 62b73d6f41 | |||
| 218ddabb5e | |||
| 427f40632a | |||
| a29b4d4379 | |||
| d851cdd2fe | |||
| 3354d00814 | |||
| 7bd7ba84e0 | |||
| 6ad34eaf57 | |||
| b4f2251508 | |||
| 473a52f986 | |||
| bcdd48d622 | |||
| 6985569573 | |||
| 5db43e674d | |||
| 34baa3c97d | |||
| bddb790fe2 | |||
| 6fae12ba02 | |||
| 4e083a8cdb | |||
| cbe4315701 | |||
| 49d561b583 | |||
| 6e56a6fd79 | |||
| 267d9647e0 | |||
| 13b3702d00 | |||
| 4500845dcd | |||
| a4abc02f88 | |||
| a0fb6934b0 | |||
| 19645445b2 | |||
| efe8628a3c | |||
| c98cb0d29f | |||
| c16fc1bae5 | |||
| fa0af1179a | |||
| d1e4a5eb07 | |||
| e18d1b186a | |||
| d056a5e336 | |||
| b9e26aa755 | |||
| b2afef2226 | |||
| c400aa96c0 | |||
| 8818954dcd | |||
| b92e5df98b | |||
| 83871273ec | |||
| 0459b39366 | |||
| 5bb0ff19bc | |||
| a867b3cf4d | |||
| 8a6ce8e66d | |||
| a40f04a739 | |||
| 0c670fd344 | |||
| 35f4bf690c | |||
| abeaf47f96 | |||
| 6498c35628 | |||
| d1c6af02db | |||
| 5edef17d84 | |||
| e4532fcef2 | |||
| 7a8d66c29d | |||
| 54292c9f8f | |||
| 3897553704 | |||
| 308f5c20fb | |||
| 987dcd0205 | |||
| d56f23544c | |||
| c79a846b29 | |||
| ad39d55e79 | |||
| 853ef426f0 | |||
| cadf7de3d8 | |||
| ec65ff9acb | |||
| d077374883 | |||
| 40a2b2cc00 | |||
| b3f3f151da | |||
| 3fdd61655a | |||
| 504727b95f | |||
| ff5446fcdf | |||
| 545eb70082 | |||
| 232a23a5dd | |||
| c9a29e26dd | |||
| 2977869ab5 | |||
| 6a223b68ba | |||
| 3fafff026b | |||
| 159528adc9 | |||
| 6c8f231b34 | |||
| c5d6d77ebf | |||
| 5e73327b2f | |||
| 720d286dcf | |||
| dd13a2bd7c | |||
| 1a6ef79466 | |||
| 8f83a1d13e | |||
| 9edfe6877f | |||
| 91b26631c6 | |||
| 331a690b78 | |||
| 5e3946e28b | |||
| d4a0189dc8 | |||
| 568b941990 | |||
| 49a3989ecf | |||
| af7cb01ead | |||
| 5c82916650 | |||
| 0c0518adac | |||
| cb7b290818 | |||
| ae30c9b34f | |||
| 9acd9aa631 | |||
| 577510ff8c | |||
| 66566913f6 | |||
| 3e6cc9dfab | |||
| a15e29344f | |||
| a96a17e11b | |||
| e0f6a424a9 | |||
| 49e30f947a | |||
| 470a07d28c | |||
| 65716fce20 | |||
| dfa66b0e95 | |||
| 3d9ffe356e | |||
| 19768cb72b | |||
| 26e0fd7247 | |||
| e2fd470ad3 | |||
| a72ae0a5fc | |||
| 7579594c22 | |||
| 6c702e7e23 |
@@ -1,6 +1,7 @@
|
|||||||
BasedOnStyle: Google
|
BasedOnStyle: Google
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
IndentAccessModifiers: true
|
NamespaceIndentation: All
|
||||||
|
IndentAccessModifiers: false
|
||||||
ColumnLimit: 0 # Sin límite de longitud de línea
|
ColumnLimit: 0 # Sin límite de longitud de línea
|
||||||
BreakBeforeBraces: Attach # Llaves en la misma línea
|
BreakBeforeBraces: Attach # Llaves en la misma línea
|
||||||
AllowShortIfStatementsOnASingleLine: true
|
AllowShortIfStatementsOnASingleLine: true
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
source/external/**
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
BasedOnStyle: Google
|
|
||||||
IndentWidth: 4
|
|
||||||
IndentAccessModifiers: true
|
|
||||||
ColumnLimit: 0 # Sin límite de longitud de línea
|
|
||||||
BreakBeforeBraces: Attach # Llaves en la misma línea
|
|
||||||
AllowShortIfStatementsOnASingleLine: true
|
|
||||||
AllowShortBlocksOnASingleLine: true
|
|
||||||
AllowShortFunctionsOnASingleLine: All
|
|
||||||
AlignOperands: false
|
|
||||||
AlignAfterOpenBracket: DontAlign
|
|
||||||
BinPackArguments: false
|
|
||||||
BinPackParameters: false
|
|
||||||
37
.clang-tidy
@@ -1,28 +1,25 @@
|
|||||||
Checks: >
|
Checks:
|
||||||
readability-*,
|
- readability-*
|
||||||
modernize-*,
|
- modernize-*
|
||||||
performance-*,
|
- performance-*
|
||||||
bugprone-unchecked-optional-access,
|
- bugprone-*
|
||||||
bugprone-sizeof-expression,
|
- -readability-identifier-length
|
||||||
bugprone-suspicious-missing-comma,
|
- -readability-magic-numbers
|
||||||
bugprone-suspicious-index,
|
- -bugprone-integer-division
|
||||||
bugprone-undefined-memory-manipulation,
|
- -bugprone-easily-swappable-parameters
|
||||||
bugprone-use-after-move,
|
- -bugprone-narrowing-conversions
|
||||||
bugprone-out-of-bound-access,
|
- -modernize-avoid-c-arrays,-warnings-as-errors
|
||||||
-readability-identifier-length,
|
|
||||||
-readability-magic-numbers,
|
|
||||||
-bugprone-narrowing-conversions,
|
|
||||||
-performance-enum-size,
|
|
||||||
-performance-inefficient-string-concatenation,
|
|
||||||
-bugprone-integer-division,
|
|
||||||
-bugprone-easily-swappable-parameters,
|
|
||||||
|
|
||||||
WarningsAsErrors: '*'
|
WarningsAsErrors: '*'
|
||||||
# Solo incluir archivos de tu código fuente
|
# Solo incluir archivos de tu código fuente (external tiene su propio .clang-tidy)
|
||||||
HeaderFilterRegex: '^source/(sections|ui)/.*'
|
# Excluye los headers SPIR-V generados en rendering/sdl3gpu/
|
||||||
|
HeaderFilterRegex: 'source/(?!external/|rendering/sdl3gpu/.*_spv\.h).*'
|
||||||
FormatStyle: file
|
FormatStyle: file
|
||||||
|
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
|
# bugprone-empty-catch: aceptar catches vacíos marcados con @INTENTIONAL en un comentario
|
||||||
|
- { key: bugprone-empty-catch.IgnoreCatchWithKeywords, value: '@INTENTIONAL' }
|
||||||
|
|
||||||
# Variables locales en snake_case
|
# Variables locales en snake_case
|
||||||
- { key: readability-identifier-naming.VariableCase, value: lower_case }
|
- { key: readability-identifier-naming.VariableCase, value: lower_case }
|
||||||
|
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
Checks: >
|
|
||||||
readability-identifier-naming,
|
|
||||||
readability-*,
|
|
||||||
modernize-*,
|
|
||||||
clang-analyzer-*,
|
|
||||||
-readability-identifier-length,
|
|
||||||
-readability-magic-numbers
|
|
||||||
|
|
||||||
WarningsAsErrors: '*'
|
|
||||||
|
|
||||||
HeaderFilterRegex: '.*'
|
|
||||||
FormatStyle: file
|
|
||||||
|
|
||||||
CheckOptions:
|
|
||||||
# Variables locales en snake_case
|
|
||||||
- { key: readability-identifier-naming.VariableCase, value: lower_case }
|
|
||||||
|
|
||||||
# Miembros privados en snake_case con sufijo _
|
|
||||||
- { key: readability-identifier-naming.PrivateMemberCase, value: lower_case }
|
|
||||||
- { key: readability-identifier-naming.PrivateMemberSuffix, value: _ }
|
|
||||||
|
|
||||||
# Miembros protegidos en snake_case con sufijo _
|
|
||||||
- { key: readability-identifier-naming.ProtectedMemberCase, value: lower_case }
|
|
||||||
- { key: readability-identifier-naming.ProtectedMemberSuffix, value: _ }
|
|
||||||
|
|
||||||
# Miembros públicos en snake_case (sin sufijo)
|
|
||||||
- { key: readability-identifier-naming.PublicMemberCase, value: lower_case }
|
|
||||||
|
|
||||||
# Namespaces en CamelCase
|
|
||||||
- { key: readability-identifier-naming.NamespaceCase, value: CamelCase }
|
|
||||||
|
|
||||||
# Constantes globales en UPPER_CASE
|
|
||||||
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }
|
|
||||||
|
|
||||||
# Variables constexpr globales en UPPER_CASE
|
|
||||||
- { key: readability-identifier-naming.ConstexprVariableCase, value: UPPER_CASE }
|
|
||||||
|
|
||||||
# Constantes locales en UPPER_CASE
|
|
||||||
- { key: readability-identifier-naming.LocalConstantCase, value: UPPER_CASE }
|
|
||||||
|
|
||||||
# Constantes estáticas dentro de clases en UPPER_CASE (sin sufijo)
|
|
||||||
- { key: readability-identifier-naming.StaticConstantCase, value: UPPER_CASE }
|
|
||||||
|
|
||||||
# Constexpr miembros en UPPER_CASE (sin sufijo)
|
|
||||||
- { key: readability-identifier-naming.ConstexprMemberCase, value: UPPER_CASE }
|
|
||||||
|
|
||||||
# Constexpr miembros privados/protegidos con sufijo _
|
|
||||||
- { key: readability-identifier-naming.ConstexprMethodCase, value: UPPER_CASE }
|
|
||||||
|
|
||||||
# Clases, structs y enums en CamelCase
|
|
||||||
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
|
|
||||||
- { key: readability-identifier-naming.StructCase, value: CamelCase }
|
|
||||||
- { key: readability-identifier-naming.EnumCase, value: CamelCase }
|
|
||||||
|
|
||||||
# Valores de enums en UPPER_CASE
|
|
||||||
- { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE }
|
|
||||||
|
|
||||||
# Métodos en camelBack (sin sufijos)
|
|
||||||
- { key: readability-identifier-naming.MethodCase, value: camelBack }
|
|
||||||
- { key: readability-identifier-naming.PrivateMethodCase, value: camelBack }
|
|
||||||
- { key: readability-identifier-naming.ProtectedMethodCase, value: camelBack }
|
|
||||||
- { key: readability-identifier-naming.PublicMethodCase, value: camelBack }
|
|
||||||
|
|
||||||
# Funciones en camelBack
|
|
||||||
- { key: readability-identifier-naming.FunctionCase, value: camelBack }
|
|
||||||
|
|
||||||
# Parámetros en lower_case
|
|
||||||
- { key: readability-identifier-naming.ParameterCase, value: lower_case }
|
|
||||||
11
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
.vscode
|
.claude/
|
||||||
|
.cache/
|
||||||
build/
|
build/
|
||||||
data/config/config.txt
|
data/config/config.txt
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
@@ -16,4 +17,10 @@ coffee_crisis*
|
|||||||
debug.txt
|
debug.txt
|
||||||
cppcheck-result*
|
cppcheck-result*
|
||||||
desktop.ini
|
desktop.ini
|
||||||
ccae_release/
|
dist/
|
||||||
|
release/windows/coffee.res
|
||||||
|
resources.pack
|
||||||
|
|
||||||
|
# Herramienta pack_resources (todas las plataformas)
|
||||||
|
tools/pack_resources/pack_resources
|
||||||
|
tools/pack_resources/pack_resources.exe
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json"
|
||||||
|
}
|
||||||
200
CHANGELOG.md
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
# CHANGELOG
|
||||||
|
|
||||||
|
Historial de canvis i novetats de Coffee Crisis Arcade Edition.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2026-04-03
|
||||||
|
|
||||||
|
- **Nova intro cinematogràfica**: les tarjetes s'llancen des dels costats de la pantalla amb zoom, rotació i rebot, simulant tirar cartes sobre una mesa. Les anteriors ixen despedides girant quan arriba la següent. Sombra amb efecte de perspectiva 2D→3D.
|
||||||
|
- **Efectes sonors i visuals en la intro**: shake de pantalla i sons configurables a cada impacte de tarjeta.
|
||||||
|
- **Migració a SDL3 GPU API**: postfx i crtpi migrats a SDL3GPU (Vulkan/Metal/D3D12).
|
||||||
|
- **Migració de configuració a YAML**: eliminat el format antic, ara tot en YAML.
|
||||||
|
- **Afegides opcions al Service Menu**.
|
||||||
|
- **HUD de FPS retocat**, presets per defecte ajustats, finestra a 2x i shader off per defecte.
|
||||||
|
- **Corregit bug d'input**: revertit un canvi que causava bucle infinit en F3 (pantalla completa) i F12 (service menu) en totes les escenes excepte Game.
|
||||||
|
- Neteja de codi: eliminades referencies a OpenGL, fitxers GLSL sobrants, normalitzada la carpeta release i el caption de la finestra.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2025-10-25
|
||||||
|
|
||||||
|
- **Migració a delta_time pur** en credits, instructions i hiscore_table. Eliminat un bug que feia que els credits no acabaren mai si no passaves a mà.
|
||||||
|
- **Corregida deformació subpixel** de textures en instructions i hiscore_table.
|
||||||
|
- **Detecció de fitxers de puntuació corruptes**.
|
||||||
|
- **Efecte de pulsos** afegit al scoreboard.
|
||||||
|
- Al posar nom, el carrusel apareix directament en el caràcter d'acabar si ja havies posat nom abans.
|
||||||
|
- Integrat jail_audio en la càrrega de resources.pack.
|
||||||
|
- Pasaeta de linter en múltiples fitxers.
|
||||||
|
- Nou icon per al joc.
|
||||||
|
- Corregida la versió release de macOS per a funcionar correctament amb resources.pack.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2025-08-21
|
||||||
|
|
||||||
|
- **Integració amb resources.pack**: textures, animacions, textos, dades de la demo i jail_audio integrats amb ResourceHelper.
|
||||||
|
- Actualitzat Makefile per a Windows, Linux i macOS.
|
||||||
|
- Neteja de temporals al acabar.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2025-08-17
|
||||||
|
|
||||||
|
- **Afegit fade RANDOM_SQUARE2** amb timings canviats a mil·lisegons.
|
||||||
|
- **Outline parametritzat** per als textos dels items.
|
||||||
|
- **Colors de camiseta parametritzats** per defecte i quan pillen café.
|
||||||
|
- Creat `defaults.h` amb els valors per defecte de Param.
|
||||||
|
- Afegit `param_red.txt` amb guardes en setParams.
|
||||||
|
- Fix: items que es quedaven engantxats a la part de dalt.
|
||||||
|
- Fix: en el modo demo, assignava cafés al jugador que no jugava.
|
||||||
|
- Fix: bug en l'estat pre del fade.
|
||||||
|
- Fix: globos apareixien un frame mal situats al crear-se des d'un pare.
|
||||||
|
- Afegit suport per a mapejar botons tipus trigger.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2025-08-10
|
||||||
|
|
||||||
|
- **Service Menu complet**: animació d'apertura/tancament, callback per a posar pausa en el joc, refresc visual al canviar mandos.
|
||||||
|
- **Mandos en calent**: es poden connectar i desconnectar mandos durant el joc, amb notificació visual.
|
||||||
|
- **PauseManager** afegit al joc.
|
||||||
|
- **Càrrega de recursos on_demand**.
|
||||||
|
- Afegit `shutdown.h` i `system_utils.h`.
|
||||||
|
- Fix: el nom apareixia duplicat en la tabla de records.
|
||||||
|
- Fix: Game no es desregistrava de ServiceMenu al destruir-se.
|
||||||
|
- Precàrrega de textures del jugador amb variants de paleta.
|
||||||
|
- Actualitzats frameworks per a macOS.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2025-03-25
|
||||||
|
|
||||||
|
- **Nova secció Intro** amb escenes seqüencials, animacions de tarjetes i text narratiu.
|
||||||
|
- **Shaders respecten l'escalat sencer** i SDL_RenderSetLogicalSize en pantalla completa.
|
||||||
|
- **Tecla per canviar l'integer scale** (F-key).
|
||||||
|
- Afegit intro03.png i intro04.png.
|
||||||
|
- Renomenat InputType a InputActions.
|
||||||
|
- Actualitzat gamecontrollerdb.txt amb mappings de la recreativa.
|
||||||
|
- Fix: al fer reset des de Game, en Intro no sonava la música.
|
||||||
|
- Fix: al acabar la partida i vore els records, torna al títol.
|
||||||
|
- Fix: amb l'àudio mutat, el fade per al soroll de boles el tornava a deixar activat.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2025-02-07
|
||||||
|
|
||||||
|
- **EnterName millorat**: si has omplit tots els slots, apretar una volta mes fixa el nom.
|
||||||
|
- **Control de repetició per als eixos del joystick**.
|
||||||
|
- **La tabla de puntuació** mostra amb altre color la puntuació acabada d'afegir i les aconseguides amb 1CC.
|
||||||
|
- Nova font per a la intro.
|
||||||
|
- Afegit efecte d'eixida a les instruccions.
|
||||||
|
- Afegit disparador per a l'aparició de l'enemic nou.
|
||||||
|
- Duplicada la font 04b_25 per a versió gris i versió negra.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2025-01-05
|
||||||
|
|
||||||
|
- **Optimitzat el circuit de render** en pantalla.
|
||||||
|
- **Atenuat de pantalla restaurat**: Fade feia dos SDL_SetRenderDrawBlendMode sense restaurar.
|
||||||
|
- Fix: es podia polsar per a jugar mentre feia el fade cap a la demo.
|
||||||
|
- Fix: error en la seqüència final de retrocedir en el temps.
|
||||||
|
- Calibrats els polsos al gust.
|
||||||
|
- Afegida una lluna i un sol al fondo.
|
||||||
|
- La powerball ja no es pot destruir fins que no ha fet un rebot.
|
||||||
|
- Modificada la cadència de foc sense autofire.
|
||||||
|
- Afegit botó per a activar o desactivar el ratolí.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2024-12-31
|
||||||
|
|
||||||
|
- **Enemic nou** complet: gràfics, comportament, àudio i veus.
|
||||||
|
- **Fade out sincronitzat** de vídeo i àudio en el títol i el joc.
|
||||||
|
- **Roidets de col·lisió** per als globos en certs moments.
|
||||||
|
- La finestra ja es pot fer tan gran com permeta la pantalla (zoom dinàmic).
|
||||||
|
- Afegides veus al jugador i efectes de so al rebotar quan mor.
|
||||||
|
- Afegit delay opcional al flash de Screen.
|
||||||
|
- Afegit botó per activar o desactivar l'autofire.
|
||||||
|
- Fix: mode demo desactivava els sons permanentment.
|
||||||
|
- Actualitzat jail_audio.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2024-12-05
|
||||||
|
|
||||||
|
- **Secció Credits acabada** a 320x240 (i per extensió, a qualsevol resolució).
|
||||||
|
- **Zoom afegit a la classe Sprite** i al subtítol ARCADE EDITION.
|
||||||
|
- Duplicats fitxers de shaders per a resolucions verticals de 256 i 240.
|
||||||
|
- Afegit globalInputs::update() a totes les seccions.
|
||||||
|
- Fix: faltava corregir el flash de destroyAllBalloons().
|
||||||
|
- Fix: si saltes el logo, talla el so a meitat sonar.
|
||||||
|
- Canvi d'idioma amb una tecla (i reinicia).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2024-11-27
|
||||||
|
|
||||||
|
- **Secció Credits**: disseny, música, globos amb play_area definida, opció de canviar la paleta al text.
|
||||||
|
- Afegides traduccions dels credits.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2024-11-20
|
||||||
|
|
||||||
|
- **Nova animació de mort del personatge**: rebots, llengua fora, ulls en X, gràfics de caure derrotat per al segon jugador.
|
||||||
|
- **Powerball redissenyada**: nous gràfics, nou comportament, ja no mata directament.
|
||||||
|
- **Globos fills** ja no ixen centrats al pare (evita apilar-se).
|
||||||
|
- Arreglos en el nom al obtindre la màxima puntuació.
|
||||||
|
- Acabat BalloonManager.
|
||||||
|
- CMakeLists.txt crea l'executable en l'arrel del projecte.
|
||||||
|
- Nova font de text gran amb el doble de definició.
|
||||||
|
- Fix: paleta verda del primer jugador ajustada a l'original.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2024-11-03
|
||||||
|
|
||||||
|
- **Teclat com a control independent**: ja pot jugar un jugador amb teclat i altre amb mando, o assignar el teclat a qualsevol jugador.
|
||||||
|
- **Implementat el final del joc** i l'Attract Mode.
|
||||||
|
- **Nou motor per a textos en pantalla** (game_text amb textures precarregades).
|
||||||
|
- **Noves animacions** per a deixar de disparar.
|
||||||
|
- Al redefinir botons, ja no pots repetir botó.
|
||||||
|
- Fix: l'animació de morir s'actualitzava dos voltes per frame.
|
||||||
|
- Fix: l'efecte de flash tenia un valor massa xicotet.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2024-10-28
|
||||||
|
|
||||||
|
- **Classe PathSprite completada**: el game_text gasta PathSprites en lloc de SmartSprites.
|
||||||
|
- **Time stopper redissenyat**.
|
||||||
|
- La partida sempre comença igual (createTwoBigBalloons).
|
||||||
|
- Revisades les classes Balloon i Bullet.
|
||||||
|
- Millorada l'aparició dels game_text.
|
||||||
|
- Fix: la paleta dels jugadors no s'iniciava correctament.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2024-10-20
|
||||||
|
|
||||||
|
- **Classe Resource creada**: precàrrega de tots els recursos (textures, música, sons, animacions).
|
||||||
|
- **Paletes de color** per a textures GIF amb shared_ptr.
|
||||||
|
- Precàrrega i assignació de paletes.
|
||||||
|
- Implementat comptador per a posar el nom al acabar la partida.
|
||||||
|
- Classe Notifier independitzada de Screen amb codis identificadors.
|
||||||
|
- Afegit codi per a apagar el sistema al eixir del joc.
|
||||||
|
- Fix: globos verds tenien setters mal assignats i velocitat incorrecta.
|
||||||
|
- Fix: no guardar el fitxer de puntuacions en el mode demo.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2024-10-14
|
||||||
|
|
||||||
|
- **Versió inicial**: clon del repositori de Coffee Crisis, adaptat per a Arcade Edition.
|
||||||
|
- Pasaeta de include-what-you-use i cppcheck.
|
||||||
|
- Estandarització de noms segons convencions (CamelCase, camelBack, snake_case).
|
||||||
|
- Herències de les classes Sprite corregides.
|
||||||
|
- Canvi a C++ modern amb smart pointers per a la càrrega de surfaces des de GIF.
|
||||||
|
- Eliminats últims defines i passats a enum class.
|
||||||
117
CLAUDE.md
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
Coffee Crisis Arcade Edition is a 2-player cooperative arcade shooter built with C++20 and SDL3. Players defend coffee against giant balloons. The game targets Windows, Linux, macOS (Intel/Apple Silicon), Raspberry Pi, and Anbernic handhelds.
|
||||||
|
|
||||||
|
## Build Commands
|
||||||
|
|
||||||
|
The project uses both CMake and a top-level Makefile. The Makefile is the primary build interface.
|
||||||
|
|
||||||
|
### CMake (generates compile_commands.json for IDE/linter support)
|
||||||
|
```bash
|
||||||
|
cmake -B build -DCMAKE_BUILD_TYPE=Debug # configure
|
||||||
|
cmake --build build # build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Makefile (delegates to CMake)
|
||||||
|
```bash
|
||||||
|
make # build Release via cmake
|
||||||
|
make debug # build Debug via cmake
|
||||||
|
make release # create release package (auto-detects OS)
|
||||||
|
make linux_release # release tar.gz with resources.pack
|
||||||
|
make windows_release # release zip for Windows
|
||||||
|
make macos_release # release dmg for macOS (Intel + Apple Silicon)
|
||||||
|
make raspi_release # release tar.gz for Raspberry Pi
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tools & Resources
|
||||||
|
```bash
|
||||||
|
make pack_tool # compile resource packer
|
||||||
|
make resources.pack # pack data/ into resources.pack (required for release builds)
|
||||||
|
make spirv # compile GLSL shaders to SPIR-V headers
|
||||||
|
```
|
||||||
|
|
||||||
|
### Code Quality
|
||||||
|
```bash
|
||||||
|
make format # run clang-format on all sources (or: cmake --build build --target format)
|
||||||
|
make format-check # check formatting without modifying
|
||||||
|
make tidy # run clang-tidy static analysis (cmake --build build --target tidy)
|
||||||
|
make tidy-fix # run clang-tidy with auto-fix
|
||||||
|
```
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Source layout
|
||||||
|
The `source/` tree is organised in the same style as the sibling projects `projecte_2026` and `jaildoctors_dilemma`:
|
||||||
|
|
||||||
|
```
|
||||||
|
source/
|
||||||
|
├── core/ # engine: audio, input, locale, rendering (+ sdl3gpu, sprite), resources, system
|
||||||
|
├── game/ # gameplay: entities, gameplay, scenes, ui, options
|
||||||
|
├── utils/ # color, param, utils
|
||||||
|
├── external/ # vendored third-party headers (json, fkyaml, stb_*)
|
||||||
|
└── main.cpp
|
||||||
|
```
|
||||||
|
|
||||||
|
`#include` paths are absolute relative to `source/` (e.g. `#include "core/audio/audio.hpp"`, `#include "game/scenes/logo.hpp"`). The CMake build adds a single `-I${CMAKE_SOURCE_DIR}/source`.
|
||||||
|
|
||||||
|
### Singletons (core systems)
|
||||||
|
- **Director** (`source/core/system/director.hpp`) — Application state machine, orchestrates scene transitions (Logo → Intro → Title → Game → Credits/HiScore → Title)
|
||||||
|
- **Screen** (`source/core/rendering/screen.hpp`) — Window management, SDL3 GPU rendering pipeline, post-processing effects
|
||||||
|
- **Resource** (`source/core/resources/resource.hpp`) — Asset loading/caching with PRELOAD and LAZY_LOAD modes, reads from `resources.pack`
|
||||||
|
- **Audio** (`source/core/audio/audio.hpp`) — Music and SFX management
|
||||||
|
- **Input** (`source/core/input/input.hpp`) — Keyboard and gamepad input handling
|
||||||
|
|
||||||
|
### Scenes (source/game/scenes/)
|
||||||
|
Each scene is a self-contained class with update/render lifecycle. Scene flow is managed by Director.
|
||||||
|
|
||||||
|
### Entity Managers
|
||||||
|
- `BalloonManager` / `BulletManager` — Object pool-based entity management (`source/game/gameplay/`)
|
||||||
|
- `Player` — Two-player support (player 1: keyboard, player 2: gamepad) (`source/game/entities/`)
|
||||||
|
|
||||||
|
### Rendering Pipeline
|
||||||
|
- SDL3 GPU API (Vulkan/Metal/D3D12 backends)
|
||||||
|
- SPIR-V shaders compiled offline from GLSL (`data/shaders/`) via `glslc`
|
||||||
|
- Compiled shader headers embedded in `source/core/rendering/sdl3gpu/postfx_*_spv.h`
|
||||||
|
- macOS uses Metal (no SPIR-V compilation needed)
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
- Game parameters: `config/param_320x240.txt`, `config/param_320x256.txt`
|
||||||
|
- Asset manifest: `config/assets.txt`
|
||||||
|
- Balloon formations: `config/formations.txt`
|
||||||
|
- Level definitions: `config/stages.txt`
|
||||||
|
- Gamepad mappings: `config/gamecontrollerdb.txt`
|
||||||
|
|
||||||
|
### External Libraries (header-only/vendored in source/external/)
|
||||||
|
- nlohmann/json, fkyaml (YAML), stb_image, stb_vorbis
|
||||||
|
|
||||||
|
`jail_audio` lives in `source/core/audio/` and `gif.{hpp,cpp}` in `source/core/rendering/` — these are first-party, not third-party.
|
||||||
|
|
||||||
|
## Code Style
|
||||||
|
|
||||||
|
Enforced via `.clang-format` (Google-based) and `.clang-tidy`:
|
||||||
|
|
||||||
|
- **Naming conventions**: Classes/structs `CamelCase`, methods/functions `camelBack`, variables/params `snake_case`, private/protected members `snake_case_` (trailing underscore), constants/constexpr `UPPER_CASE`, namespaces `CamelCase`, enum values `UPPER_CASE`
|
||||||
|
- 4-space indentation, no column limit, braces attach to statement
|
||||||
|
- clang-tidy treats all warnings as errors
|
||||||
|
|
||||||
|
## Conditional Compilation Defines
|
||||||
|
|
||||||
|
| Define | Purpose |
|
||||||
|
|--------|---------|
|
||||||
|
| `WINDOWS_BUILD` / `LINUX_BUILD` / `MACOS_BUILD` | Platform selection |
|
||||||
|
| `DEBUG` / `VERBOSE` | Debug output |
|
||||||
|
| `RELEASE_BUILD` | Release-specific code paths |
|
||||||
|
| `RECORDING` | Demo recording mode |
|
||||||
|
| `NO_SHADERS` | Disable shader pipeline (Anbernic) |
|
||||||
|
| `NO_AUDIO` | Build without audio |
|
||||||
|
| `ARCADE` | Arcade-specific mode |
|
||||||
|
| `MACOS_BUNDLE` | macOS .app bundle paths |
|
||||||
|
| `ANBERNIC` | Anbernic handheld build |
|
||||||
|
|
||||||
|
## Language
|
||||||
|
|
||||||
|
Code comments are in Spanish/Catalan. Game UI supports multiple languages via JSON files in `data/lang/`.
|
||||||
474
CMakeLists.txt
@@ -6,119 +6,233 @@ project(coffee_crisis_arcade_edition VERSION 2.00)
|
|||||||
# Establecer estándar de C++
|
# Establecer estándar de C++
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
# Establece la política CMP0072 para indicar cómo se debe seleccionar la implementación de OpenGL.
|
|
||||||
# En este caso, se elige la opción "GLVND", que utiliza bibliotecas modernas y modulares (libOpenGL, libGLX),
|
|
||||||
# en lugar de la biblioteca OpenGL clásica (libGL). Esto mejora la compatibilidad con drivers recientes
|
|
||||||
# y evita ambigüedades cuando se encuentran múltiples implementaciones de OpenGL en el sistema.
|
|
||||||
cmake_policy(SET CMP0072 NEW)
|
|
||||||
set(OpenGL_GL_PREFERENCE GLVND)
|
|
||||||
|
|
||||||
|
# --- GENERACIÓN DE VERSIÓN AUTOMÁTICA ---
|
||||||
|
# Si GIT_HASH se ha pasado desde fuera (p.ej. desde el Makefile via -DGIT_HASH=xxx),
|
||||||
|
# lo usamos tal cual. Esto evita problemas con Docker/emscripten, donde git aborta por
|
||||||
|
# "dubious ownership" en el volumen montado. En builds locales sin -DGIT_HASH, se
|
||||||
|
# resuelve aquí ejecutando git directamente.
|
||||||
|
if(NOT DEFINED GIT_HASH OR GIT_HASH STREQUAL "")
|
||||||
|
find_package(Git QUIET)
|
||||||
|
if(GIT_FOUND)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${GIT_EXECUTABLE} rev-parse --short=7 HEAD
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_HASH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
ERROR_QUIET
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT DEFINED GIT_HASH OR GIT_HASH STREQUAL "")
|
||||||
|
set(GIT_HASH "unknown")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Configurar archivo de versión
|
||||||
|
configure_file(${CMAKE_SOURCE_DIR}/source/version.h.in ${CMAKE_BINARY_DIR}/version.h @ONLY)
|
||||||
|
|
||||||
# --- 1. LISTA EXPLÍCITA DE FUENTES ---
|
# --- 1. LISTA EXPLÍCITA DE FUENTES ---
|
||||||
set(APP_SOURCES
|
set(APP_SOURCES
|
||||||
# --- Archivos Principales del Sistema ---
|
|
||||||
source/asset.cpp
|
|
||||||
source/audio.cpp
|
|
||||||
source/director.cpp
|
|
||||||
source/global_events.cpp
|
|
||||||
source/global_inputs.cpp
|
|
||||||
source/input.cpp
|
|
||||||
source/lang.cpp
|
|
||||||
source/main.cpp
|
source/main.cpp
|
||||||
source/param.cpp
|
|
||||||
source/resource.cpp
|
|
||||||
source/resource_helper.cpp
|
|
||||||
source/resource_loader.cpp
|
|
||||||
source/resource_pack.cpp
|
|
||||||
source/screen.cpp
|
|
||||||
source/text.cpp
|
|
||||||
source/writer.cpp
|
|
||||||
|
|
||||||
# --- UI (User Interface) ---
|
# --- core/audio ---
|
||||||
source/ui/menu_option.cpp
|
source/core/audio/audio.cpp
|
||||||
source/ui/menu_renderer.cpp
|
|
||||||
source/ui/notifier.cpp
|
|
||||||
source/ui/service_menu.cpp
|
|
||||||
source/ui/ui_message.cpp
|
|
||||||
source/ui/window_message.cpp
|
|
||||||
|
|
||||||
# --- Lógica del Juego ---
|
# --- core/input ---
|
||||||
source/balloon_formations.cpp
|
source/core/input/define_buttons.cpp
|
||||||
source/balloon_manager.cpp
|
source/core/input/global_inputs.cpp
|
||||||
source/balloon.cpp
|
source/core/input/input.cpp
|
||||||
source/bullet.cpp
|
source/core/input/input_types.cpp
|
||||||
source/enter_name.cpp
|
source/core/input/mouse.cpp
|
||||||
source/explosions.cpp
|
|
||||||
source/game_logo.cpp
|
|
||||||
source/item.cpp
|
|
||||||
source/manage_hiscore_table.cpp
|
|
||||||
source/player.cpp
|
|
||||||
source/scoreboard.cpp
|
|
||||||
source/tabe.cpp
|
|
||||||
|
|
||||||
# --- Escenas ---
|
# --- core/locale ---
|
||||||
source/sections/credits.cpp
|
source/core/locale/lang.cpp
|
||||||
source/sections/game.cpp
|
|
||||||
source/sections/hiscore_table.cpp
|
|
||||||
source/sections/instructions.cpp
|
|
||||||
source/sections/intro.cpp
|
|
||||||
source/sections/logo.cpp
|
|
||||||
source/sections/title.cpp
|
|
||||||
|
|
||||||
# --- Sprites y Gráficos ---
|
# --- core/rendering ---
|
||||||
source/animated_sprite.cpp
|
source/core/rendering/background.cpp
|
||||||
source/background.cpp
|
source/core/rendering/fade.cpp
|
||||||
source/fade.cpp
|
source/core/rendering/gif.cpp
|
||||||
source/moving_sprite.cpp
|
source/core/rendering/screen.cpp
|
||||||
source/path_sprite.cpp
|
source/core/rendering/text.cpp
|
||||||
source/smart_sprite.cpp
|
source/core/rendering/texture.cpp
|
||||||
source/sprite.cpp
|
source/core/rendering/tiled_bg.cpp
|
||||||
source/texture.cpp
|
source/core/rendering/writer.cpp
|
||||||
source/tiled_bg.cpp
|
source/core/rendering/sdl3gpu/sdl3gpu_shader.cpp
|
||||||
|
source/core/rendering/sprite/animated_sprite.cpp
|
||||||
|
source/core/rendering/sprite/card_sprite.cpp
|
||||||
|
source/core/rendering/sprite/moving_sprite.cpp
|
||||||
|
source/core/rendering/sprite/path_sprite.cpp
|
||||||
|
source/core/rendering/sprite/smart_sprite.cpp
|
||||||
|
source/core/rendering/sprite/sprite.cpp
|
||||||
|
|
||||||
# --- Otros ---
|
# --- core/resources ---
|
||||||
source/color.cpp
|
source/core/resources/asset.cpp
|
||||||
source/define_buttons.cpp
|
source/core/resources/asset_integrated.cpp
|
||||||
source/difficulty.cpp
|
source/core/resources/resource.cpp
|
||||||
source/input_types.cpp
|
source/core/resources/resource_helper.cpp
|
||||||
source/mouse.cpp
|
source/core/resources/resource_loader.cpp
|
||||||
source/options.cpp
|
source/core/resources/resource_pack.cpp
|
||||||
source/shutdown.cpp
|
|
||||||
source/stage.cpp
|
# --- core/system ---
|
||||||
source/system_utils.cpp
|
source/core/system/demo.cpp
|
||||||
source/utils.cpp
|
source/core/system/director.cpp
|
||||||
|
source/core/system/global_events.cpp
|
||||||
|
source/core/system/shutdown.cpp
|
||||||
|
source/core/system/system_utils.cpp
|
||||||
|
|
||||||
|
# --- game ---
|
||||||
|
source/game/options.cpp
|
||||||
|
|
||||||
|
# --- game/entities ---
|
||||||
|
source/game/entities/balloon.cpp
|
||||||
|
source/game/entities/bullet.cpp
|
||||||
|
source/game/entities/explosions.cpp
|
||||||
|
source/game/entities/item.cpp
|
||||||
|
source/game/entities/player.cpp
|
||||||
|
source/game/entities/tabe.cpp
|
||||||
|
|
||||||
|
# --- game/gameplay ---
|
||||||
|
source/game/gameplay/balloon_formations.cpp
|
||||||
|
source/game/gameplay/balloon_manager.cpp
|
||||||
|
source/game/gameplay/bullet_manager.cpp
|
||||||
|
source/game/gameplay/difficulty.cpp
|
||||||
|
source/game/gameplay/enter_name.cpp
|
||||||
|
source/game/gameplay/game_logo.cpp
|
||||||
|
source/game/gameplay/manage_hiscore_table.cpp
|
||||||
|
source/game/gameplay/scoreboard.cpp
|
||||||
|
source/game/gameplay/stage.cpp
|
||||||
|
|
||||||
|
# --- game/scenes ---
|
||||||
|
source/game/scenes/credits.cpp
|
||||||
|
source/game/scenes/game.cpp
|
||||||
|
source/game/scenes/hiscore_table.cpp
|
||||||
|
source/game/scenes/instructions.cpp
|
||||||
|
source/game/scenes/intro.cpp
|
||||||
|
source/game/scenes/logo.cpp
|
||||||
|
source/game/scenes/preload.cpp
|
||||||
|
source/game/scenes/title.cpp
|
||||||
|
|
||||||
|
# --- game/ui ---
|
||||||
|
source/game/ui/menu_option.cpp
|
||||||
|
source/game/ui/menu_renderer.cpp
|
||||||
|
source/game/ui/notifier.cpp
|
||||||
|
source/game/ui/service_menu.cpp
|
||||||
|
source/game/ui/ui_message.cpp
|
||||||
|
source/game/ui/window_message.cpp
|
||||||
|
|
||||||
|
# --- utils ---
|
||||||
|
source/utils/color.cpp
|
||||||
|
source/utils/param.cpp
|
||||||
|
source/utils/utils.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# Fuentes de librerías de terceros
|
|
||||||
set(EXTERNAL_SOURCES
|
|
||||||
source/external/jail_shader.cpp
|
|
||||||
source/external/json.hpp
|
|
||||||
source/external/gif.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
# Añadir archivos específicos para macOS (Metal)
|
|
||||||
if(APPLE)
|
|
||||||
list(APPEND EXTERNAL_SOURCES source/external/jail_shader_metal.mm)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Añadir jail_audio.cpp solo si el audio está habilitado
|
|
||||||
if(NOT DISABLE_AUDIO)
|
|
||||||
list(APPEND EXTERNAL_SOURCES source/external/jail_audio.cpp)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
# Configuración de SDL3
|
# Configuración de SDL3
|
||||||
find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
|
if(EMSCRIPTEN)
|
||||||
message(STATUS "SDL3 encontrado: ${SDL3_INCLUDE_DIRS}")
|
# En Emscripten, SDL3 se compila desde source con FetchContent
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
SDL3
|
||||||
|
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
|
||||||
|
GIT_TAG release-3.4.4
|
||||||
|
GIT_SHALLOW TRUE
|
||||||
|
)
|
||||||
|
set(SDL_SHARED OFF CACHE BOOL "" FORCE)
|
||||||
|
set(SDL_STATIC ON CACHE BOOL "" FORCE)
|
||||||
|
set(SDL_TEST_LIBRARY OFF CACHE BOOL "" FORCE)
|
||||||
|
FetchContent_MakeAvailable(SDL3)
|
||||||
|
message(STATUS "SDL3 compilado desde source para Emscripten")
|
||||||
|
else()
|
||||||
|
find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
|
||||||
|
message(STATUS "SDL3 encontrado: ${SDL3_INCLUDE_DIRS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# --- SHADER COMPILATION (Linux/Windows only - macOS uses Metal, Emscripten no soporta SDL3 GPU) ---
|
||||||
|
if(NOT APPLE AND NOT EMSCRIPTEN)
|
||||||
|
find_program(GLSLC_EXE NAMES glslc)
|
||||||
|
|
||||||
|
set(SHADER_VERT_SRC "${CMAKE_SOURCE_DIR}/data/shaders/postfx.vert")
|
||||||
|
set(SHADER_FRAG_SRC "${CMAKE_SOURCE_DIR}/data/shaders/postfx.frag")
|
||||||
|
set(SHADER_CRTPI_SRC "${CMAKE_SOURCE_DIR}/data/shaders/crtpi_frag.glsl")
|
||||||
|
set(SHADER_UPSCALE_SRC "${CMAKE_SOURCE_DIR}/data/shaders/upscale.frag")
|
||||||
|
set(SHADER_DOWNSCALE_SRC "${CMAKE_SOURCE_DIR}/data/shaders/downscale.frag")
|
||||||
|
|
||||||
|
set(SHADER_VERT_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/postfx_vert_spv.h")
|
||||||
|
set(SHADER_FRAG_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/postfx_frag_spv.h")
|
||||||
|
set(SHADER_CRTPI_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/crtpi_frag_spv.h")
|
||||||
|
set(SHADER_UPSCALE_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/upscale_frag_spv.h")
|
||||||
|
set(SHADER_DOWNSCALE_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/downscale_frag_spv.h")
|
||||||
|
|
||||||
|
set(ALL_SHADER_SOURCES "${SHADER_VERT_SRC}" "${SHADER_FRAG_SRC}" "${SHADER_CRTPI_SRC}" "${SHADER_UPSCALE_SRC}" "${SHADER_DOWNSCALE_SRC}")
|
||||||
|
set(ALL_SHADER_HEADERS "${SHADER_VERT_H}" "${SHADER_FRAG_H}" "${SHADER_CRTPI_H}" "${SHADER_UPSCALE_H}" "${SHADER_DOWNSCALE_H}")
|
||||||
|
|
||||||
|
if(GLSLC_EXE)
|
||||||
|
set(COMPILE_SHADER_SCRIPT "${CMAKE_SOURCE_DIR}/tools/shaders/compile_shader.cmake")
|
||||||
|
|
||||||
|
macro(add_shader SRC_FILE OUT_H VAR_NAME)
|
||||||
|
cmake_parse_arguments(S "" "STAGE" "" ${ARGN})
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${OUT_H}"
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
"-DGLSLC=${GLSLC_EXE}"
|
||||||
|
"-DSRC=${SRC_FILE}"
|
||||||
|
"-DOUT_H=${OUT_H}"
|
||||||
|
"-DVAR=${VAR_NAME}"
|
||||||
|
"-DSTAGE=${S_STAGE}"
|
||||||
|
-P "${COMPILE_SHADER_SCRIPT}"
|
||||||
|
DEPENDS "${SRC_FILE}" "${COMPILE_SHADER_SCRIPT}"
|
||||||
|
COMMENT "Compilando shader: ${VAR_NAME}"
|
||||||
|
)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
add_shader("${SHADER_VERT_SRC}" "${SHADER_VERT_H}" "postfx_vert_spv")
|
||||||
|
add_shader("${SHADER_FRAG_SRC}" "${SHADER_FRAG_H}" "postfx_frag_spv")
|
||||||
|
add_shader("${SHADER_CRTPI_SRC}" "${SHADER_CRTPI_H}" "crtpi_frag_spv" STAGE fragment)
|
||||||
|
add_shader("${SHADER_UPSCALE_SRC}" "${SHADER_UPSCALE_H}" "upscale_frag_spv")
|
||||||
|
add_shader("${SHADER_DOWNSCALE_SRC}" "${SHADER_DOWNSCALE_H}" "downscale_frag_spv")
|
||||||
|
|
||||||
|
add_custom_target(shaders DEPENDS ${ALL_SHADER_HEADERS})
|
||||||
|
message(STATUS "glslc encontrado: shaders se compilarán automáticamente")
|
||||||
|
else()
|
||||||
|
foreach(_h IN LISTS ALL_SHADER_HEADERS)
|
||||||
|
if(NOT EXISTS "${_h}")
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"glslc no encontrado y header SPIR-V no existe: ${_h}\n"
|
||||||
|
" Instala glslc: sudo apt install glslang-tools (Linux)\n"
|
||||||
|
" choco install vulkan-sdk (Windows)\n"
|
||||||
|
" O genera los headers manualmente: tools/shaders/compile_spirv.sh"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
message(STATUS "glslc no encontrado - usando headers SPIR-V precompilados")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if(EMSCRIPTEN)
|
||||||
|
message(STATUS "Emscripten: shaders SPIR-V omitidos (SDL3 GPU no soportado en WebGL2)")
|
||||||
|
else()
|
||||||
|
message(STATUS "macOS: shaders SPIR-V omitidos (usa Metal)")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# --- 2. AÑADIR EJECUTABLE ---
|
# --- 2. AÑADIR EJECUTABLE ---
|
||||||
add_executable(${PROJECT_NAME} ${APP_SOURCES} ${EXTERNAL_SOURCES})
|
if(EMSCRIPTEN)
|
||||||
|
# En Emscripten no compilamos sdl3gpu_shader (SDL3 GPU no está soportado en WebGL2)
|
||||||
|
set(APP_SOURCES_WASM ${APP_SOURCES})
|
||||||
|
list(REMOVE_ITEM APP_SOURCES_WASM source/core/rendering/sdl3gpu/sdl3gpu_shader.cpp)
|
||||||
|
add_executable(${PROJECT_NAME} ${APP_SOURCES_WASM})
|
||||||
|
else()
|
||||||
|
add_executable(${PROJECT_NAME} ${APP_SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT APPLE AND NOT EMSCRIPTEN AND GLSLC_EXE)
|
||||||
|
add_dependencies(${PROJECT_NAME} shaders)
|
||||||
|
endif()
|
||||||
|
|
||||||
# --- 3. DIRECTORIOS DE INCLUSIÓN ---
|
# --- 3. DIRECTORIOS DE INCLUSIÓN ---
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||||
"${CMAKE_SOURCE_DIR}/source"
|
"${CMAKE_SOURCE_DIR}/source"
|
||||||
"${CMAKE_SOURCE_DIR}/source/external"
|
"${CMAKE_BINARY_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Enlazar la librería SDL3
|
# Enlazar la librería SDL3
|
||||||
@@ -133,56 +247,152 @@ target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:RELEASE>:-Os -ffunctio
|
|||||||
# Definir _DEBUG en modo Debug
|
# Definir _DEBUG en modo Debug
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:DEBUG>:_DEBUG>)
|
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:DEBUG>:_DEBUG>)
|
||||||
|
|
||||||
# Opción para habilitar/deshabilitar audio
|
# Descomentar la siguiente línea para activar el modo grabación de demos
|
||||||
option(DISABLE_AUDIO "Disable audio system" OFF)
|
# target_compile_definitions(${PROJECT_NAME} PRIVATE RECORDING)
|
||||||
|
|
||||||
# Definir NO_AUDIO si la opción está activada
|
|
||||||
if(DISABLE_AUDIO)
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE NO_AUDIO)
|
|
||||||
message(STATUS "Audio deshabilitado - NO_AUDIO definido")
|
|
||||||
else()
|
|
||||||
message(STATUS "Audio habilitado")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Configuración específica para cada plataforma
|
# Configuración específica para cada plataforma
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE WINDOWS_BUILD)
|
target_compile_definitions(${PROJECT_NAME} PRIVATE WINDOWS_BUILD)
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE ws2_32 mingw32 opengl32)
|
target_link_libraries(${PROJECT_NAME} PRIVATE ws2_32 mingw32)
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE MACOS_BUILD)
|
target_compile_definitions(${PROJECT_NAME} PRIVATE MACOS_BUILD)
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-deprecated)
|
if(NOT CMAKE_OSX_ARCHITECTURES)
|
||||||
set(CMAKE_OSX_ARCHITECTURES "arm64")
|
set(CMAKE_OSX_ARCHITECTURES "arm64")
|
||||||
|
|
||||||
# Enlazar frameworks de Metal para macOS
|
|
||||||
find_library(METAL_FRAMEWORK Metal)
|
|
||||||
find_library(QUARTZCORE_FRAMEWORK QuartzCore)
|
|
||||||
find_library(COREFOUNDATION_FRAMEWORK CoreFoundation)
|
|
||||||
find_library(FOUNDATION_FRAMEWORK Foundation)
|
|
||||||
|
|
||||||
if(METAL_FRAMEWORK AND QUARTZCORE_FRAMEWORK AND COREFOUNDATION_FRAMEWORK AND FOUNDATION_FRAMEWORK)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
|
||||||
${METAL_FRAMEWORK}
|
|
||||||
${QUARTZCORE_FRAMEWORK}
|
|
||||||
${COREFOUNDATION_FRAMEWORK}
|
|
||||||
${FOUNDATION_FRAMEWORK})
|
|
||||||
message(STATUS "Metal frameworks encontrados y enlazados")
|
|
||||||
else()
|
|
||||||
message(WARNING "Algunos frameworks de Metal no se encontraron - OpenGL será usado como fallback")
|
|
||||||
endif()
|
endif()
|
||||||
|
if(MACOS_BUNDLE)
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PRIVATE MACOS_BUNDLE)
|
||||||
|
target_link_options(${PROJECT_NAME} PRIVATE
|
||||||
|
-framework SDL3
|
||||||
|
-F ${CMAKE_SOURCE_DIR}/release/macos/frameworks/SDL3.xcframework/macos-arm64_x86_64
|
||||||
|
-rpath @executable_path/../Frameworks/
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
elseif(EMSCRIPTEN)
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PRIVATE EMSCRIPTEN_BUILD NO_SHADERS)
|
||||||
|
# -fexceptions: habilita excepciones C++ (fkyaml, std::runtime_error...) — sin esto cualquier throw llama a abort()
|
||||||
|
target_compile_options(${PROJECT_NAME} PRIVATE -fexceptions)
|
||||||
|
target_link_options(${PROJECT_NAME} PRIVATE
|
||||||
|
"SHELL:--preload-file ${CMAKE_SOURCE_DIR}/data@/data"
|
||||||
|
"SHELL:--preload-file ${CMAKE_SOURCE_DIR}/config@/config"
|
||||||
|
-fexceptions
|
||||||
|
-sALLOW_MEMORY_GROWTH=1
|
||||||
|
-sMAX_WEBGL_VERSION=2
|
||||||
|
-sINITIAL_MEMORY=67108864
|
||||||
|
-sASSERTIONS=1
|
||||||
|
# ASYNCIFY solo para permitir emscripten_sleep(0) durante la precarga de recursos
|
||||||
|
# (el bucle principal del juego ya usa SDL3 Callback API, no depende de ASYNCIFY).
|
||||||
|
-sASYNCIFY=1
|
||||||
|
)
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".html")
|
||||||
elseif(UNIX AND NOT APPLE)
|
elseif(UNIX AND NOT APPLE)
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE LINUX_BUILD)
|
target_compile_definitions(${PROJECT_NAME} PRIVATE LINUX_BUILD)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Configuración común para OpenGL
|
# Especificar la ubicación del ejecutable
|
||||||
if(NOT WIN32)
|
if(EMSCRIPTEN)
|
||||||
find_package(OpenGL REQUIRED)
|
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
if(OPENGL_FOUND)
|
else()
|
||||||
message(STATUS "OpenGL encontrado: ${OPENGL_LIBRARIES}")
|
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${OPENGL_LIBRARIES})
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "OpenGL no encontrado")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Especificar la ubicación del ejecutable
|
# --- 5. STATIC ANALYSIS TARGETS ---
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
|
|
||||||
|
find_program(CLANG_TIDY_EXE NAMES clang-tidy)
|
||||||
|
find_program(CLANG_FORMAT_EXE NAMES clang-format)
|
||||||
|
find_program(CPPCHECK_EXE NAMES cppcheck)
|
||||||
|
|
||||||
|
# Recopilar todos los archivos fuente, excluyendo external/
|
||||||
|
file(GLOB_RECURSE ALL_SOURCE_FILES
|
||||||
|
"${CMAKE_SOURCE_DIR}/source/*.cpp"
|
||||||
|
"${CMAKE_SOURCE_DIR}/source/*.hpp"
|
||||||
|
"${CMAKE_SOURCE_DIR}/source/*.h"
|
||||||
|
)
|
||||||
|
list(FILTER ALL_SOURCE_FILES EXCLUDE REGEX ".*/external/.*")
|
||||||
|
|
||||||
|
# Para cppcheck, pasar solo .cpp (los headers se procesan transitivamente).
|
||||||
|
# Si pasamos .hpp como TUs independientes, cppcheck reporta falsos positivos de
|
||||||
|
# 'unusedStructMember' porque no hace análisis cross-TU y ve miembros de clase
|
||||||
|
# cuyo uso vive en un .cpp distinto.
|
||||||
|
set(CPPCHECK_SOURCES ${ALL_SOURCE_FILES})
|
||||||
|
list(FILTER CPPCHECK_SOURCES INCLUDE REGEX ".*\\.cpp$")
|
||||||
|
list(FILTER CPPCHECK_SOURCES EXCLUDE REGEX ".*_spv\\.h$")
|
||||||
|
|
||||||
|
# Targets de clang-tidy
|
||||||
|
if(CLANG_TIDY_EXE)
|
||||||
|
# En macOS con clang-tidy de Homebrew LLVM, es necesario pasar el sysroot
|
||||||
|
# explícitamente para que encuentre los headers del sistema (string, memory, etc.)
|
||||||
|
if(APPLE)
|
||||||
|
execute_process(
|
||||||
|
COMMAND xcrun --show-sdk-path
|
||||||
|
OUTPUT_VARIABLE MACOS_SDK_PATH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
set(TIDY_EXTRA_ARGS --extra-arg=-isysroot --extra-arg=${MACOS_SDK_PATH})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_custom_target(tidy
|
||||||
|
COMMAND ${CLANG_TIDY_EXE}
|
||||||
|
-p ${CMAKE_BINARY_DIR}
|
||||||
|
${TIDY_EXTRA_ARGS}
|
||||||
|
${ALL_SOURCE_FILES}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
COMMENT "Running clang-tidy..."
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(tidy-fix
|
||||||
|
COMMAND ${CLANG_TIDY_EXE}
|
||||||
|
-p ${CMAKE_BINARY_DIR}
|
||||||
|
--fix
|
||||||
|
${TIDY_EXTRA_ARGS}
|
||||||
|
${ALL_SOURCE_FILES}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
COMMENT "Running clang-tidy with fixes..."
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
message(STATUS "clang-tidy no encontrado - targets 'tidy' y 'tidy-fix' no disponibles")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Targets de clang-format
|
||||||
|
if(CLANG_FORMAT_EXE)
|
||||||
|
add_custom_target(format
|
||||||
|
COMMAND ${CLANG_FORMAT_EXE}
|
||||||
|
-i
|
||||||
|
${ALL_SOURCE_FILES}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
COMMENT "Running clang-format..."
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(format-check
|
||||||
|
COMMAND ${CLANG_FORMAT_EXE}
|
||||||
|
--dry-run
|
||||||
|
--Werror
|
||||||
|
${ALL_SOURCE_FILES}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
COMMENT "Checking clang-format..."
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
message(STATUS "clang-format no encontrado - targets 'format' y 'format-check' no disponibles")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Targets de cppcheck
|
||||||
|
if(CPPCHECK_EXE)
|
||||||
|
add_custom_target(cppcheck
|
||||||
|
COMMAND ${CPPCHECK_EXE}
|
||||||
|
--enable=warning,style,performance,portability
|
||||||
|
--std=c++20
|
||||||
|
--language=c++
|
||||||
|
--inline-suppr
|
||||||
|
--suppress=missingIncludeSystem
|
||||||
|
--suppress=toomanyconfigs
|
||||||
|
-D_DEBUG
|
||||||
|
-DLINUX_BUILD
|
||||||
|
--quiet
|
||||||
|
-I ${CMAKE_SOURCE_DIR}/source
|
||||||
|
${CPPCHECK_SOURCES}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
COMMENT "Running cppcheck..."
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
message(STATUS "cppcheck no encontrado - target 'cppcheck' no disponible")
|
||||||
|
endif()
|
||||||
|
|||||||
556
Makefile
@@ -1,269 +1,272 @@
|
|||||||
# Directorios
|
# ==============================================================================
|
||||||
|
# DIRECTORIES
|
||||||
|
# ==============================================================================
|
||||||
DIR_ROOT := $(dir $(abspath $(MAKEFILE_LIST)))
|
DIR_ROOT := $(dir $(abspath $(MAKEFILE_LIST)))
|
||||||
DIR_SOURCES := $(addsuffix /, $(DIR_ROOT)source)
|
DIR_TOOLS := $(addsuffix /, $(DIR_ROOT)tools)
|
||||||
DIR_BIN := $(addsuffix /, $(DIR_ROOT))
|
|
||||||
DIR_BUILD := $(addsuffix /, $(DIR_ROOT)build)
|
|
||||||
|
|
||||||
# Variables
|
# ==============================================================================
|
||||||
|
# TARGET NAMES
|
||||||
|
# ==============================================================================
|
||||||
TARGET_NAME := coffee_crisis_arcade_edition
|
TARGET_NAME := coffee_crisis_arcade_edition
|
||||||
TARGET_FILE := $(DIR_BIN)$(TARGET_NAME)
|
|
||||||
APP_NAME := Coffee Crisis Arcade Edition
|
|
||||||
RELEASE_FOLDER := ccae_release
|
|
||||||
RELEASE_FILE := $(RELEASE_FOLDER)/$(TARGET_NAME)
|
|
||||||
RESOURCE_FILE := release/coffee.res
|
|
||||||
|
|
||||||
# Versión automática basada en la fecha actual (específica por SO)
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
VERSION := $(shell powershell -Command "Get-Date -Format 'yyyy-MM-dd'")
|
TARGET_FILE := $(DIR_ROOT)$(TARGET_NAME).exe
|
||||||
else
|
else
|
||||||
VERSION := $(shell date +%Y-%m-%d)
|
TARGET_FILE := $(DIR_ROOT)$(TARGET_NAME)
|
||||||
|
endif
|
||||||
|
APP_NAME := Coffee Crisis Arcade Edition
|
||||||
|
DIST_DIR := dist
|
||||||
|
RELEASE_FOLDER := dist/_tmp
|
||||||
|
RELEASE_FILE := $(RELEASE_FOLDER)/$(TARGET_NAME)
|
||||||
|
RESOURCE_FILE := release/windows/coffee.res
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# TOOLS
|
||||||
|
# ==============================================================================
|
||||||
|
DIR_PACK_TOOL := $(DIR_TOOLS)pack_resources
|
||||||
|
SHADER_SCRIPT := $(DIR_ROOT)tools/shaders/compile_spirv.sh
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# VERSION (extraída de defines.hpp)
|
||||||
|
# ==============================================================================
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
VERSION := $(shell powershell -Command "(Select-String -Path 'source/utils/defines.hpp' -Pattern 'constexpr const char\* VERSION = \"(.+?)\"').Matches.Groups[1].Value")
|
||||||
|
else
|
||||||
|
VERSION := $(shell grep 'constexpr const char\* VERSION' source/utils/defines.hpp | sed -E 's/.*VERSION = "([^"]+)".*/\1/')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Variables específicas para Windows (usando APP_NAME)
|
# Hash del commit actual, computado en el host. Se pasa a CMake via -DGIT_HASH
|
||||||
|
# para que el build en docker/emscripten no falle por "dubious ownership" de Git.
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
WIN_TARGET_FILE := $(DIR_BIN)$(APP_NAME)
|
GIT_HASH := $(shell git rev-parse --short=7 HEAD 2>NUL)
|
||||||
|
else
|
||||||
|
GIT_HASH := $(shell git rev-parse --short=7 HEAD 2>/dev/null)
|
||||||
|
endif
|
||||||
|
ifeq ($(GIT_HASH),)
|
||||||
|
GIT_HASH := unknown
|
||||||
|
endif
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# SHELL (Windows usa cmd.exe)
|
||||||
|
# ==============================================================================
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
SHELL := cmd.exe
|
||||||
|
endif
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# WINDOWS-SPECIFIC VARIABLES
|
||||||
|
# ==============================================================================
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
WIN_TARGET_FILE := $(DIR_ROOT)$(APP_NAME)
|
||||||
WIN_RELEASE_FILE := $(RELEASE_FOLDER)/$(APP_NAME)
|
WIN_RELEASE_FILE := $(RELEASE_FOLDER)/$(APP_NAME)
|
||||||
else
|
else
|
||||||
WIN_TARGET_FILE := $(TARGET_FILE)
|
WIN_TARGET_FILE := $(TARGET_FILE)
|
||||||
WIN_RELEASE_FILE := $(RELEASE_FILE)
|
WIN_RELEASE_FILE := $(RELEASE_FILE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Nombres para los ficheros de lanzamiento
|
# ==============================================================================
|
||||||
WINDOWS_RELEASE := $(TARGET_NAME)-$(VERSION)-win32-x64.zip
|
# RELEASE NAMES
|
||||||
MACOS_INTEL_RELEASE := $(TARGET_FILE)-$(VERSION)-macos-intel.dmg
|
# ==============================================================================
|
||||||
MACOS_APPLE_SILICON_RELEASE := $(TARGET_FILE)-$(VERSION)-macos-apple-silicon.dmg
|
WINDOWS_RELEASE := $(DIST_DIR)/$(TARGET_NAME)-$(VERSION)-win32-x64.zip
|
||||||
LINUX_RELEASE := $(TARGET_FILE)-$(VERSION)-linux.tar.gz
|
MACOS_INTEL_RELEASE := $(DIST_DIR)/$(TARGET_NAME)-$(VERSION)-macos-intel.dmg
|
||||||
RASPI_RELEASE := $(TARGET_FILE)-$(VERSION)-raspberry.tar.gz
|
MACOS_APPLE_SILICON_RELEASE := $(DIST_DIR)/$(TARGET_NAME)-$(VERSION)-macos-apple-silicon.dmg
|
||||||
|
LINUX_RELEASE := $(DIST_DIR)/$(TARGET_NAME)-$(VERSION)-linux.tar.gz
|
||||||
|
RASPI_RELEASE := $(DIST_DIR)/$(TARGET_NAME)-$(VERSION)-raspberry.tar.gz
|
||||||
|
|
||||||
# Lista completa de archivos fuente (basada en CMakeLists.txt)
|
# ==============================================================================
|
||||||
APP_SOURCES := \
|
# PLATAFORMA
|
||||||
source/animated_sprite.cpp \
|
# ==============================================================================
|
||||||
source/asset.cpp \
|
|
||||||
source/audio.cpp \
|
|
||||||
source/background.cpp \
|
|
||||||
source/balloon_formations.cpp \
|
|
||||||
source/balloon_manager.cpp \
|
|
||||||
source/balloon.cpp \
|
|
||||||
source/bullet.cpp \
|
|
||||||
source/color.cpp \
|
|
||||||
source/define_buttons.cpp \
|
|
||||||
source/difficulty.cpp \
|
|
||||||
source/director.cpp \
|
|
||||||
source/enter_name.cpp \
|
|
||||||
source/explosions.cpp \
|
|
||||||
source/external/gif.cpp \
|
|
||||||
source/external/jail_audio.cpp \
|
|
||||||
source/external/jail_shader.cpp \
|
|
||||||
source/fade.cpp \
|
|
||||||
source/game_logo.cpp \
|
|
||||||
source/global_events.cpp \
|
|
||||||
source/global_inputs.cpp \
|
|
||||||
source/input_types.cpp \
|
|
||||||
source/input.cpp \
|
|
||||||
source/item.cpp \
|
|
||||||
source/lang.cpp \
|
|
||||||
source/main.cpp \
|
|
||||||
source/manage_hiscore_table.cpp \
|
|
||||||
source/mouse.cpp \
|
|
||||||
source/moving_sprite.cpp \
|
|
||||||
source/options.cpp \
|
|
||||||
source/param.cpp \
|
|
||||||
source/path_sprite.cpp \
|
|
||||||
source/player.cpp \
|
|
||||||
source/resource.cpp \
|
|
||||||
source/resource_helper.cpp \
|
|
||||||
source/resource_loader.cpp \
|
|
||||||
source/resource_pack.cpp \
|
|
||||||
source/scoreboard.cpp \
|
|
||||||
source/screen.cpp \
|
|
||||||
source/sections/credits.cpp \
|
|
||||||
source/sections/game.cpp \
|
|
||||||
source/sections/hiscore_table.cpp \
|
|
||||||
source/sections/instructions.cpp \
|
|
||||||
source/sections/intro.cpp \
|
|
||||||
source/sections/logo.cpp \
|
|
||||||
source/sections/title.cpp \
|
|
||||||
source/shutdown.cpp \
|
|
||||||
source/smart_sprite.cpp \
|
|
||||||
source/sprite.cpp \
|
|
||||||
source/stage.cpp \
|
|
||||||
source/system_utils.cpp \
|
|
||||||
source/tabe.cpp \
|
|
||||||
source/text.cpp \
|
|
||||||
source/texture.cpp \
|
|
||||||
source/tiled_bg.cpp \
|
|
||||||
source/ui/menu_option.cpp \
|
|
||||||
source/ui/menu_renderer.cpp \
|
|
||||||
source/ui/notifier.cpp \
|
|
||||||
source/ui/service_menu.cpp \
|
|
||||||
source/ui/ui_message.cpp \
|
|
||||||
source/ui/window_message.cpp \
|
|
||||||
source/utils.cpp \
|
|
||||||
source/writer.cpp
|
|
||||||
|
|
||||||
# Includes
|
|
||||||
INCLUDES := -Isource -Isource/external
|
|
||||||
|
|
||||||
# Variables según el sistema operativo
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
FixPath = $(subst /,\\,$1)
|
FixPath = $(subst /,\\,$1)
|
||||||
CXXFLAGS := -std=c++20 -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -static-libgcc -Wl,-Bstatic -lpthread -Wl,-Bdynamic -Wl,-subsystem,windows -DWINDOWS_BUILD
|
|
||||||
CXXFLAGS_DEBUG := -std=c++20 -Wall -g -D_DEBUG -DWINDOWS_BUILD
|
|
||||||
LDFLAGS := -lmingw32 -lws2_32 -lSDL3 -lopengl32
|
|
||||||
RM := del /Q
|
RM := del /Q
|
||||||
MKDIR := mkdir
|
MKDIR := mkdir
|
||||||
else
|
else
|
||||||
FixPath = $1
|
FixPath = $1
|
||||||
CXXFLAGS := -std=c++20 -Wall -Os -ffunction-sections -fdata-sections
|
|
||||||
CXXFLAGS_DEBUG := -std=c++20 -Wall -g -D_DEBUG
|
|
||||||
LDFLAGS := -lSDL3
|
|
||||||
RMFILE := rm -f
|
RMFILE := rm -f
|
||||||
RMDIR := rm -rdf
|
RMDIR := rm -rdf
|
||||||
MKDIR := mkdir -p
|
MKDIR := mkdir -p
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
ifeq ($(UNAME_S),Linux)
|
|
||||||
CXXFLAGS += -DLINUX_BUILD
|
|
||||||
LDFLAGS += -lGL
|
|
||||||
endif
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
|
||||||
CXXFLAGS += -Wno-deprecated -DMACOS_BUILD
|
|
||||||
CXXFLAGS_DEBUG += -Wno-deprecated -DMACOS_BUILD
|
|
||||||
LDFLAGS += -framework OpenGL
|
|
||||||
# Configurar arquitectura (por defecto arm64, como en CMake)
|
|
||||||
CXXFLAGS += -arch arm64
|
|
||||||
CXXFLAGS_DEBUG += -arch arm64
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Reglas para compilación
|
# ==============================================================================
|
||||||
windows:
|
# COMPILACIÓN CON CMAKE
|
||||||
@echo off
|
# ==============================================================================
|
||||||
@echo Compilando para Windows con nombre: "$(APP_NAME).exe"
|
all:
|
||||||
windres release/coffee.rc -O coff -o $(RESOURCE_FILE)
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
$(CXX) $(APP_SOURCES) $(RESOURCE_FILE) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o "$(WIN_TARGET_FILE).exe"
|
@cmake --build build
|
||||||
strip -s -R .comment -R .gnu.version "$(WIN_TARGET_FILE).exe" --strip-unneeded
|
|
||||||
|
|
||||||
windows_rec:
|
debug:
|
||||||
@echo off
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
|
||||||
@echo Compilando version de grabacion para Windows: "$(APP_NAME)_rec.exe"
|
@cmake --build build
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DRECORDING $(CXXFLAGS) $(LDFLAGS) -o "$(WIN_TARGET_FILE)_rec.exe"
|
|
||||||
|
|
||||||
windows_debug:
|
# ==============================================================================
|
||||||
@echo off
|
# RELEASE AUTOMÁTICO (detecta SO)
|
||||||
@echo Compilando version debug para Windows: "$(APP_NAME)_debug.exe"
|
# ==============================================================================
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DDEBUG -DVERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(WIN_TARGET_FILE)_debug.exe"
|
release:
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
@"$(MAKE)" windows_release
|
||||||
|
else
|
||||||
|
ifeq ($(UNAME_S),Darwin)
|
||||||
|
@$(MAKE) macos_release
|
||||||
|
else
|
||||||
|
@$(MAKE) linux_release
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# REGLAS PARA HERRAMIENTA DE EMPAQUETADO Y RESOURCES.PACK
|
||||||
|
# ==============================================================================
|
||||||
|
pack_tool:
|
||||||
|
@$(MAKE) -C $(DIR_PACK_TOOL)
|
||||||
|
|
||||||
|
resources.pack:
|
||||||
|
@$(MAKE) -C $(DIR_PACK_TOOL) pack
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# COMPILACIÓN DE SHADERS
|
||||||
|
# ==============================================================================
|
||||||
|
spirv:
|
||||||
|
@echo "Compilando shaders SPIR-V..."
|
||||||
|
$(SHADER_SCRIPT)
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# COMPILACIÓN PARA WINDOWS (RELEASE)
|
||||||
|
# ==============================================================================
|
||||||
windows_release:
|
windows_release:
|
||||||
|
@$(MAKE) resources.pack
|
||||||
@echo off
|
@echo off
|
||||||
@echo Creando release para Windows - Version: $(VERSION)
|
@echo Creando release para Windows - Version: $(VERSION)
|
||||||
|
|
||||||
# Crea carpeta temporal 'RELEASE_FOLDER'
|
# Compila con cmake
|
||||||
powershell if (Test-Path "$(RELEASE_FOLDER)") {Remove-Item "$(RELEASE_FOLDER)" -Recurse -Force}
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
powershell if (-not (Test-Path "$(RELEASE_FOLDER)")) {New-Item "$(RELEASE_FOLDER)" -ItemType Directory}
|
@cmake --build build
|
||||||
|
|
||||||
|
# Crea carpeta de distribución y carpeta temporal 'RELEASE_FOLDER'
|
||||||
|
@powershell -Command "if (-not (Test-Path '$(DIST_DIR)')) {New-Item '$(DIST_DIR)' -ItemType Directory}"
|
||||||
|
@powershell -Command "if (Test-Path '$(RELEASE_FOLDER)') {Remove-Item '$(RELEASE_FOLDER)' -Recurse -Force}"
|
||||||
|
@powershell -Command "if (-not (Test-Path '$(RELEASE_FOLDER)')) {New-Item '$(RELEASE_FOLDER)' -ItemType Directory}"
|
||||||
|
|
||||||
# Copia la carpeta 'config' y el archivo 'resources.pack'
|
# Copia la carpeta 'config' y el archivo 'resources.pack'
|
||||||
powershell Copy-Item -Path "config" -Destination "$(RELEASE_FOLDER)" -recurse -Force
|
@powershell -Command "Copy-Item -Path 'config' -Destination '$(RELEASE_FOLDER)' -recurse -Force"
|
||||||
powershell Copy-Item -Path "resources.pack" -Destination "$(RELEASE_FOLDER)"
|
@powershell -Command "Copy-Item -Path 'resources.pack' -Destination '$(RELEASE_FOLDER)'"
|
||||||
|
|
||||||
# Copia los ficheros que estan en la raíz del proyecto
|
# Copia los ficheros que estan en la raíz del proyecto
|
||||||
powershell Copy-Item "LICENSE" -Destination "$(RELEASE_FOLDER)"
|
@powershell -Command "Copy-Item 'LICENSE' -Destination '$(RELEASE_FOLDER)'"
|
||||||
powershell Copy-Item "README.md" -Destination "$(RELEASE_FOLDER)"
|
@powershell -Command "Copy-Item 'README.md' -Destination '$(RELEASE_FOLDER)'"
|
||||||
powershell Copy-Item "release\*.dll" -Destination "$(RELEASE_FOLDER)"
|
@powershell -Command "Copy-Item 'release\windows\dll\*.dll' -Destination '$(RELEASE_FOLDER)'"
|
||||||
|
@powershell -Command "Copy-Item -Path '$(TARGET_FILE)' -Destination '$(WIN_RELEASE_FILE).exe'"
|
||||||
# Compila
|
|
||||||
windres release/coffee.rc -O coff -o $(RESOURCE_FILE)
|
|
||||||
$(CXX) $(APP_SOURCES) $(RESOURCE_FILE) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o "$(WIN_RELEASE_FILE).exe"
|
|
||||||
strip -s -R .comment -R .gnu.version "$(WIN_RELEASE_FILE).exe" --strip-unneeded
|
strip -s -R .comment -R .gnu.version "$(WIN_RELEASE_FILE).exe" --strip-unneeded
|
||||||
|
|
||||||
# Crea el fichero .zip
|
# Crea el fichero .zip
|
||||||
powershell if (Test-Path "$(WINDOWS_RELEASE)") {Remove-Item "$(WINDOWS_RELEASE)"}
|
@powershell -Command "if (Test-Path '$(WINDOWS_RELEASE)') {Remove-Item '$(WINDOWS_RELEASE)'}"
|
||||||
powershell Compress-Archive -Path "$(RELEASE_FOLDER)"/* -DestinationPath "$(WINDOWS_RELEASE)"
|
@powershell -Command "Compress-Archive -Path '$(RELEASE_FOLDER)/*' -DestinationPath '$(WINDOWS_RELEASE)'"
|
||||||
@echo Release creado: $(WINDOWS_RELEASE)
|
@echo Release creado: $(WINDOWS_RELEASE)
|
||||||
|
|
||||||
# Elimina la carpeta temporal 'RELEASE_FOLDER'
|
# Elimina la carpeta temporal 'RELEASE_FOLDER'
|
||||||
powershell if (Test-Path "$(RELEASE_FOLDER)") {Remove-Item "$(RELEASE_FOLDER)" -Recurse -Force}
|
@powershell -Command "if (Test-Path '$(RELEASE_FOLDER)') {Remove-Item '$(RELEASE_FOLDER)' -Recurse -Force}"
|
||||||
|
|
||||||
macos:
|
|
||||||
@echo "Compilando para macOS: $(TARGET_NAME)"
|
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)"
|
|
||||||
|
|
||||||
macos_debug:
|
|
||||||
@echo "Compilando version debug para macOS: $(TARGET_NAME)_debug"
|
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DDEBUG -DVERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# COMPILACIÓN PARA MACOS (RELEASE)
|
||||||
|
# ==============================================================================
|
||||||
macos_release:
|
macos_release:
|
||||||
|
@$(MAKE) resources.pack
|
||||||
@echo "Creando release para macOS - Version: $(VERSION)"
|
@echo "Creando release para macOS - Version: $(VERSION)"
|
||||||
|
|
||||||
|
# Verificar e instalar create-dmg si es necesario
|
||||||
|
@which create-dmg > /dev/null || (echo "Instalando create-dmg..." && brew install create-dmg)
|
||||||
|
|
||||||
|
# Compila la versión para procesadores Intel con cmake
|
||||||
|
@cmake -S . -B build/intel -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DMACOS_BUNDLE=ON
|
||||||
|
@cmake --build build/intel
|
||||||
|
|
||||||
# Elimina datos de compilaciones anteriores
|
# Elimina datos de compilaciones anteriores
|
||||||
$(RMDIR) "$(RELEASE_FOLDER)"
|
$(RMDIR) "$(RELEASE_FOLDER)"
|
||||||
$(RMDIR) Frameworks
|
|
||||||
$(RMFILE) tmp.dmg
|
$(RMFILE) tmp.dmg
|
||||||
|
$(RMFILE) "$(DIST_DIR)"/rw.*
|
||||||
$(RMFILE) "$(MACOS_INTEL_RELEASE)"
|
$(RMFILE) "$(MACOS_INTEL_RELEASE)"
|
||||||
$(RMFILE) "$(MACOS_APPLE_SILICON_RELEASE)"
|
$(RMFILE) "$(MACOS_APPLE_SILICON_RELEASE)"
|
||||||
|
|
||||||
# Crea la carpeta temporal para hacer el trabajo y las carpetas obligatorias para crear una app de macos
|
# Crea la carpeta de distribución y la carpeta temporal con las carpetas obligatorias para una app macOS
|
||||||
|
$(MKDIR) "$(DIST_DIR)"
|
||||||
$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks"
|
$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks"
|
||||||
$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS"
|
$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS"
|
||||||
$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
|
$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
|
||||||
$(MKDIR) Frameworks
|
|
||||||
|
|
||||||
# Copia carpetas y ficheros
|
# Copia carpetas y ficheros
|
||||||
cp -R config "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
|
cp -R config "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
|
||||||
cp resources.pack "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
|
cp resources.pack "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
|
||||||
cp -R release/frameworks/SDL3.xcframework "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks"
|
cp -R release/macos/frameworks/SDL3.xcframework/macos-arm64_x86_64/SDL3.framework "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks"
|
||||||
cp -R release/frameworks/SDL3.xcframework Frameworks
|
cp release/icons/*.icns "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
|
||||||
cp release/*.icns "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
|
cp release/macos/Info.plist "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents"
|
||||||
cp release/Info.plist "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents"
|
|
||||||
cp LICENSE "$(RELEASE_FOLDER)"
|
cp LICENSE "$(RELEASE_FOLDER)"
|
||||||
cp README.md "$(RELEASE_FOLDER)"
|
cp README.md "$(RELEASE_FOLDER)"
|
||||||
|
|
||||||
# Crea enlaces
|
# Copia el ejecutable Intel al bundle
|
||||||
ln -s /Applications "$(RELEASE_FOLDER)"/Applications
|
cp "$(TARGET_FILE)" "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS/$(TARGET_NAME)"
|
||||||
|
|
||||||
# Compila la versión para procesadores Intel
|
|
||||||
ifdef ENABLE_MACOS_X86_64
|
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DMACOS_BUNDLE $(CXXFLAGS) $(LDFLAGS) -o "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS/$(TARGET_NAME)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.15
|
|
||||||
|
|
||||||
# Firma la aplicación
|
# Firma la aplicación
|
||||||
codesign --deep --force --sign - --timestamp=none "$(RELEASE_FOLDER)/$(APP_NAME).app"
|
codesign --deep --force --sign - --timestamp=none "$(RELEASE_FOLDER)/$(APP_NAME).app"
|
||||||
|
|
||||||
# Empaqueta el .dmg de la versión Intel
|
# Empaqueta el .dmg de la versión Intel con create-dmg
|
||||||
hdiutil create tmp.dmg -ov -volname "$(APP_NAME)" -fs HFS+ -srcfolder "$(RELEASE_FOLDER)"
|
@echo "Creando DMG Intel con iconos de 96x96..."
|
||||||
hdiutil convert tmp.dmg -format UDZO -o "$(MACOS_INTEL_RELEASE)"
|
create-dmg \
|
||||||
$(RMFILE) tmp.dmg
|
--volname "$(APP_NAME)" \
|
||||||
|
--window-pos 200 120 \
|
||||||
|
--window-size 720 300 \
|
||||||
|
--icon-size 96 \
|
||||||
|
--text-size 12 \
|
||||||
|
--icon "$(APP_NAME).app" 278 102 \
|
||||||
|
--icon "LICENSE" 441 102 \
|
||||||
|
--icon "README.md" 604 102 \
|
||||||
|
--app-drop-link 115 102 \
|
||||||
|
--hide-extension "$(APP_NAME).app" \
|
||||||
|
"$(MACOS_INTEL_RELEASE)" \
|
||||||
|
"$(RELEASE_FOLDER)" || true
|
||||||
@echo "Release Intel creado: $(MACOS_INTEL_RELEASE)"
|
@echo "Release Intel creado: $(MACOS_INTEL_RELEASE)"
|
||||||
endif
|
|
||||||
|
|
||||||
# Compila la versión para procesadores Apple Silicon
|
# Compila la versión para procesadores Apple Silicon con cmake
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DMACOS_BUNDLE -DSDL_DISABLE_IMMINTRIN_H $(CXXFLAGS) $(LDFLAGS) -o "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS/$(TARGET_NAME)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
|
@cmake -S . -B build/arm -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DMACOS_BUNDLE=ON
|
||||||
|
@cmake --build build/arm
|
||||||
|
cp "$(TARGET_FILE)" "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS/$(TARGET_NAME)"
|
||||||
|
|
||||||
# Firma la aplicación
|
# Firma la aplicación
|
||||||
codesign --deep --force --sign - --timestamp=none "$(RELEASE_FOLDER)/$(APP_NAME).app"
|
codesign --deep --force --sign - --timestamp=none "$(RELEASE_FOLDER)/$(APP_NAME).app"
|
||||||
|
|
||||||
# Empaqueta el .dmg de la versión Apple Silicon
|
# Empaqueta el .dmg de la versión Apple Silicon con create-dmg
|
||||||
hdiutil create tmp.dmg -ov -volname "$(APP_NAME)" -fs HFS+ -srcfolder "$(RELEASE_FOLDER)"
|
@echo "Creando DMG Apple Silicon con iconos de 96x96..."
|
||||||
hdiutil convert tmp.dmg -format UDZO -o "$(MACOS_APPLE_SILICON_RELEASE)"
|
create-dmg \
|
||||||
$(RMFILE) tmp.dmg
|
--volname "$(APP_NAME)" \
|
||||||
|
--window-pos 200 120 \
|
||||||
|
--window-size 720 300 \
|
||||||
|
--icon-size 96 \
|
||||||
|
--text-size 12 \
|
||||||
|
--icon "$(APP_NAME).app" 278 102 \
|
||||||
|
--icon "LICENSE" 441 102 \
|
||||||
|
--icon "README.md" 604 102 \
|
||||||
|
--app-drop-link 115 102 \
|
||||||
|
--hide-extension "$(APP_NAME).app" \
|
||||||
|
"$(MACOS_APPLE_SILICON_RELEASE)" \
|
||||||
|
"$(RELEASE_FOLDER)" || true
|
||||||
@echo "Release Apple Silicon creado: $(MACOS_APPLE_SILICON_RELEASE)"
|
@echo "Release Apple Silicon creado: $(MACOS_APPLE_SILICON_RELEASE)"
|
||||||
|
|
||||||
# Elimina las carpetas temporales
|
# Elimina las carpetas temporales
|
||||||
$(RMDIR) Frameworks
|
|
||||||
$(RMDIR) "$(RELEASE_FOLDER)"
|
$(RMDIR) "$(RELEASE_FOLDER)"
|
||||||
|
$(RMDIR) build/intel
|
||||||
|
$(RMDIR) build/arm
|
||||||
|
$(RMFILE) "$(DIST_DIR)"/rw.*
|
||||||
|
|
||||||
linux:
|
# ==============================================================================
|
||||||
@echo "Compilando para Linux: $(TARGET_NAME)"
|
# COMPILACIÓN PARA LINUX (RELEASE)
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)"
|
# ==============================================================================
|
||||||
strip -s -R .comment -R .gnu.version "$(TARGET_FILE)" --strip-unneeded
|
|
||||||
|
|
||||||
linux_debug:
|
|
||||||
@echo "Compilando version debug para Linux: $(TARGET_NAME)_debug"
|
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DDEBUG -DVERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
|
||||||
|
|
||||||
linux_release:
|
linux_release:
|
||||||
|
@$(MAKE) resources.pack
|
||||||
@echo "Creando release para Linux - Version: $(VERSION)"
|
@echo "Creando release para Linux - Version: $(VERSION)"
|
||||||
# Elimina carpetas previas
|
|
||||||
$(RMDIR) "$(RELEASE_FOLDER)"
|
|
||||||
|
|
||||||
# Crea la carpeta temporal para realizar el lanzamiento
|
# Compila con cmake
|
||||||
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
@cmake --build build
|
||||||
|
|
||||||
|
# Elimina carpeta temporal previa y la recrea (crea dist/ si no existe)
|
||||||
|
$(RMDIR) "$(RELEASE_FOLDER)"
|
||||||
$(MKDIR) "$(RELEASE_FOLDER)"
|
$(MKDIR) "$(RELEASE_FOLDER)"
|
||||||
|
|
||||||
# Copia ficheros
|
# Copia ficheros
|
||||||
@@ -271,9 +274,7 @@ linux_release:
|
|||||||
cp resources.pack "$(RELEASE_FOLDER)"
|
cp resources.pack "$(RELEASE_FOLDER)"
|
||||||
cp LICENSE "$(RELEASE_FOLDER)"
|
cp LICENSE "$(RELEASE_FOLDER)"
|
||||||
cp README.md "$(RELEASE_FOLDER)"
|
cp README.md "$(RELEASE_FOLDER)"
|
||||||
|
cp "$(TARGET_FILE)" "$(RELEASE_FILE)"
|
||||||
# Compila
|
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o "$(RELEASE_FILE)"
|
|
||||||
strip -s -R .comment -R .gnu.version "$(RELEASE_FILE)" --strip-unneeded
|
strip -s -R .comment -R .gnu.version "$(RELEASE_FILE)" --strip-unneeded
|
||||||
|
|
||||||
# Empaqueta ficheros
|
# Empaqueta ficheros
|
||||||
@@ -284,9 +285,18 @@ linux_release:
|
|||||||
# Elimina la carpeta temporal
|
# Elimina la carpeta temporal
|
||||||
$(RMDIR) "$(RELEASE_FOLDER)"
|
$(RMDIR) "$(RELEASE_FOLDER)"
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# COMPILACIÓN PARA LINUX (RELEASE CON INTEGRACIÓN DESKTOP)
|
||||||
|
# ==============================================================================
|
||||||
linux_release_desktop:
|
linux_release_desktop:
|
||||||
|
@$(MAKE) resources.pack
|
||||||
@echo "Creando release con integracion desktop para Linux - Version: $(VERSION)"
|
@echo "Creando release con integracion desktop para Linux - Version: $(VERSION)"
|
||||||
# Elimina carpetas previas
|
|
||||||
|
# Compila con cmake
|
||||||
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
@cmake --build build
|
||||||
|
|
||||||
|
# Elimina carpetas previas y recrea (crea dist/ si no existe)
|
||||||
$(RMDIR) "$(RELEASE_FOLDER)"
|
$(RMDIR) "$(RELEASE_FOLDER)"
|
||||||
|
|
||||||
# Crea la estructura de directorios estándar para Linux
|
# Crea la estructura de directorios estándar para Linux
|
||||||
@@ -302,8 +312,8 @@ linux_release_desktop:
|
|||||||
cp LICENSE "$(RELEASE_FOLDER)/$(TARGET_NAME)/"
|
cp LICENSE "$(RELEASE_FOLDER)/$(TARGET_NAME)/"
|
||||||
cp README.md "$(RELEASE_FOLDER)/$(TARGET_NAME)/"
|
cp README.md "$(RELEASE_FOLDER)/$(TARGET_NAME)/"
|
||||||
|
|
||||||
# Compila el ejecutable
|
# Copia el ejecutable
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o "$(RELEASE_FOLDER)/$(TARGET_NAME)/bin/$(TARGET_NAME)"
|
cp "$(TARGET_FILE)" "$(RELEASE_FOLDER)/$(TARGET_NAME)/bin/$(TARGET_NAME)"
|
||||||
strip -s -R .comment -R .gnu.version "$(RELEASE_FOLDER)/$(TARGET_NAME)/bin/$(TARGET_NAME)" --strip-unneeded
|
strip -s -R .comment -R .gnu.version "$(RELEASE_FOLDER)/$(TARGET_NAME)/bin/$(TARGET_NAME)" --strip-unneeded
|
||||||
|
|
||||||
# Crea el archivo .desktop
|
# Crea el archivo .desktop
|
||||||
@@ -321,25 +331,22 @@ linux_release_desktop:
|
|||||||
@echo 'Keywords=arcade;action;shooter;retro;' >> "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/applications/$(TARGET_NAME).desktop"
|
@echo 'Keywords=arcade;action;shooter;retro;' >> "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/applications/$(TARGET_NAME).desktop"
|
||||||
|
|
||||||
# Copia el icono (si existe) y lo redimensiona si es necesario
|
# Copia el icono (si existe) y lo redimensiona si es necesario
|
||||||
@if [ -f "release/icon.png" ]; then \
|
@if [ -f "release/icons/icon.png" ]; then \
|
||||||
if command -v magick >/dev/null 2>&1; then \
|
if command -v magick >/dev/null 2>&1; then \
|
||||||
magick "release/icon.png" -resize 256x256 "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/icons/hicolor/256x256/apps/$(TARGET_NAME).png"; \
|
magick "release/icons/icon.png" -resize 256x256 "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/icons/hicolor/256x256/apps/$(TARGET_NAME).png"; \
|
||||||
echo "Icono redimensionado de release/icon.png (usando ImageMagick)"; \
|
echo "Icono redimensionado de release/icons/icon.png (usando ImageMagick)"; \
|
||||||
elif command -v convert >/dev/null 2>&1; then \
|
elif command -v convert >/dev/null 2>&1; then \
|
||||||
convert "release/icon.png" -resize 256x256 "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/icons/hicolor/256x256/apps/$(TARGET_NAME).png"; \
|
convert "release/icons/icon.png" -resize 256x256 "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/icons/hicolor/256x256/apps/$(TARGET_NAME).png"; \
|
||||||
echo "Icono redimensionado de release/icon.png (usando ImageMagick legacy)"; \
|
echo "Icono redimensionado de release/icons/icon.png (usando ImageMagick legacy)"; \
|
||||||
elif command -v ffmpeg >/dev/null 2>&1; then \
|
elif command -v ffmpeg >/dev/null 2>&1; then \
|
||||||
ffmpeg -i "release/icon.png" -vf scale=256:256 "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/icons/hicolor/256x256/apps/$(TARGET_NAME).png" -y -loglevel quiet; \
|
ffmpeg -i "release/icons/icon.png" -vf scale=256:256 "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/icons/hicolor/256x256/apps/$(TARGET_NAME).png" -y -loglevel quiet; \
|
||||||
echo "Icono redimensionado de release/icon.png (usando ffmpeg)"; \
|
echo "Icono redimensionado de release/icons/icon.png (usando ffmpeg)"; \
|
||||||
else \
|
else \
|
||||||
cp "release/icon.png" "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/icons/hicolor/256x256/apps/$(TARGET_NAME).png"; \
|
cp "release/icons/icon.png" "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/icons/hicolor/256x256/apps/$(TARGET_NAME).png"; \
|
||||||
echo "Icono copiado sin redimensionar (instalar ImageMagick o ffmpeg para redimensionado automatico)"; \
|
echo "Icono copiado sin redimensionar (instalar ImageMagick o ffmpeg para redimensionado automatico)"; \
|
||||||
fi; \
|
fi; \
|
||||||
elif [ -f "release/coffee.png" ]; then \
|
|
||||||
cp "release/coffee.png" "$(RELEASE_FOLDER)/$(TARGET_NAME)/share/icons/hicolor/256x256/apps/$(TARGET_NAME).png"; \
|
|
||||||
echo "Icono copiado desde release/coffee.png"; \
|
|
||||||
else \
|
else \
|
||||||
echo "Advertencia: No se encontró release/icon.png ni release/coffee.png - crear icono manualmente"; \
|
echo "Advertencia: No se encontró release/icons/icon.png - crear icono manualmente"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Crea script de instalación
|
# Crea script de instalación
|
||||||
@@ -372,29 +379,27 @@ linux_release_desktop:
|
|||||||
chmod +x "$(RELEASE_FOLDER)/$(TARGET_NAME)/uninstall.sh"
|
chmod +x "$(RELEASE_FOLDER)/$(TARGET_NAME)/uninstall.sh"
|
||||||
|
|
||||||
# Empaqueta ficheros
|
# Empaqueta ficheros
|
||||||
$(RMFILE) "$(TARGET_NAME)-$(VERSION)-linux-desktop.tar.gz"
|
$(RMFILE) "$(DIST_DIR)/$(TARGET_NAME)-$(VERSION)-linux-desktop.tar.gz"
|
||||||
tar -czvf "$(TARGET_NAME)-$(VERSION)-linux-desktop.tar.gz" -C "$(RELEASE_FOLDER)" .
|
tar -czvf "$(DIST_DIR)/$(TARGET_NAME)-$(VERSION)-linux-desktop.tar.gz" -C "$(RELEASE_FOLDER)" .
|
||||||
@echo "Release con integracion desktop creado: $(TARGET_NAME)-$(VERSION)-linux-desktop.tar.gz"
|
@echo "Release con integracion desktop creado: $(DIST_DIR)/$(TARGET_NAME)-$(VERSION)-linux-desktop.tar.gz"
|
||||||
@echo "Para instalar: extraer y ejecutar ./$(TARGET_NAME)/install.sh"
|
@echo "Para instalar: extraer y ejecutar ./$(TARGET_NAME)/install.sh"
|
||||||
|
|
||||||
# Elimina la carpeta temporal
|
# Elimina la carpeta temporal
|
||||||
$(RMDIR) "$(RELEASE_FOLDER)"
|
$(RMDIR) "$(RELEASE_FOLDER)"
|
||||||
|
|
||||||
raspi:
|
# ==============================================================================
|
||||||
@echo "Compilando para Raspberry Pi: $(TARGET_NAME)"
|
# COMPILACIÓN PARA RASPBERRY PI (RELEASE)
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DVERBOSE $(CXXFLAGS) $(LDFLAGS) -o $(TARGET_FILE)
|
# ==============================================================================
|
||||||
strip -s -R .comment -R .gnu.version $(TARGET_FILE) --strip-unneeded
|
|
||||||
|
|
||||||
raspi_debug:
|
|
||||||
@echo "Compilando version debug para Raspberry Pi: $(TARGET_NAME)_debug"
|
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DVERBOSE -DDEBUG $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
|
|
||||||
|
|
||||||
raspi_release:
|
raspi_release:
|
||||||
|
@$(MAKE) resources.pack
|
||||||
@echo "Creando release para Raspberry Pi - Version: $(VERSION)"
|
@echo "Creando release para Raspberry Pi - Version: $(VERSION)"
|
||||||
# Elimina carpetas previas
|
|
||||||
$(RMDIR) "$(RELEASE_FOLDER)"
|
|
||||||
|
|
||||||
# Crea la carpeta temporal para realizar el lanzamiento
|
# Compila con cmake
|
||||||
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
@cmake --build build
|
||||||
|
|
||||||
|
# Elimina carpetas previas y recrea (crea dist/ si no existe)
|
||||||
|
$(RMDIR) "$(RELEASE_FOLDER)"
|
||||||
$(MKDIR) "$(RELEASE_FOLDER)"
|
$(MKDIR) "$(RELEASE_FOLDER)"
|
||||||
|
|
||||||
# Copia ficheros
|
# Copia ficheros
|
||||||
@@ -402,9 +407,7 @@ raspi_release:
|
|||||||
cp resources.pack "$(RELEASE_FOLDER)"
|
cp resources.pack "$(RELEASE_FOLDER)"
|
||||||
cp LICENSE "$(RELEASE_FOLDER)"
|
cp LICENSE "$(RELEASE_FOLDER)"
|
||||||
cp README.md "$(RELEASE_FOLDER)"
|
cp README.md "$(RELEASE_FOLDER)"
|
||||||
|
cp "$(TARGET_FILE)" "$(RELEASE_FILE)"
|
||||||
# Compila
|
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DVERBOSE $(CXXFLAGS) $(LDFLAGS) -o "$(RELEASE_FILE)"
|
|
||||||
strip -s -R .comment -R .gnu.version "$(RELEASE_FILE)" --strip-unneeded
|
strip -s -R .comment -R .gnu.version "$(RELEASE_FILE)" --strip-unneeded
|
||||||
|
|
||||||
# Empaqueta ficheros
|
# Empaqueta ficheros
|
||||||
@@ -415,49 +418,92 @@ raspi_release:
|
|||||||
# Elimina la carpeta temporal
|
# Elimina la carpeta temporal
|
||||||
$(RMDIR) "$(RELEASE_FOLDER)"
|
$(RMDIR) "$(RELEASE_FOLDER)"
|
||||||
|
|
||||||
anbernic:
|
# ==============================================================================
|
||||||
@echo "Compilando para Anbernic: $(TARGET_NAME)"
|
# COMPILACIÓN PARA WEBASSEMBLY (requiere Docker)
|
||||||
# Elimina carpetas previas
|
# ==============================================================================
|
||||||
$(RMDIR) "$(RELEASE_FOLDER)"_anbernic
|
wasm:
|
||||||
|
@echo "Compilando para WebAssembly - Version: $(VERSION) ($(GIT_HASH))"
|
||||||
|
docker run --rm \
|
||||||
|
--user $(shell id -u):$(shell id -g) \
|
||||||
|
-v $(DIR_ROOT):/src \
|
||||||
|
-w /src \
|
||||||
|
emscripten/emsdk:latest \
|
||||||
|
bash -c "emcmake cmake -S . -B build/wasm -DCMAKE_BUILD_TYPE=Release -DGIT_HASH=$(GIT_HASH) && cmake --build build/wasm"
|
||||||
|
$(MKDIR) "$(DIST_DIR)/wasm"
|
||||||
|
cp build/wasm/$(TARGET_NAME).html $(DIST_DIR)/wasm/
|
||||||
|
cp build/wasm/$(TARGET_NAME).js $(DIST_DIR)/wasm/
|
||||||
|
cp build/wasm/$(TARGET_NAME).wasm $(DIST_DIR)/wasm/
|
||||||
|
cp build/wasm/$(TARGET_NAME).data $(DIST_DIR)/wasm/
|
||||||
|
@echo "Output: $(DIST_DIR)/wasm/"
|
||||||
|
scp $(DIST_DIR)/wasm/$(TARGET_NAME).js $(DIST_DIR)/wasm/$(TARGET_NAME).wasm $(DIST_DIR)/wasm/$(TARGET_NAME).data \
|
||||||
|
maverick:/home/sergio/gitea/web_jailgames/static/games/coffee-crisis-arcade-edition/wasm/
|
||||||
|
ssh maverick 'cd /home/sergio/gitea/web_jailgames && ./deploy.sh'
|
||||||
|
@echo "Deployed to maverick"
|
||||||
|
|
||||||
# Crea la carpeta temporal para realizar el lanzamiento
|
# ==============================================================================
|
||||||
$(MKDIR) "$(RELEASE_FOLDER)"_anbernic
|
# CODE QUALITY (delegados a cmake)
|
||||||
|
# ==============================================================================
|
||||||
|
format:
|
||||||
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
@cmake --build build --target format
|
||||||
|
|
||||||
# Copia ficheros
|
format-check:
|
||||||
cp -R config "$(RELEASE_FOLDER)"_anbernic
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
cp resources.pack "$(RELEASE_FOLDER)"_anbernic
|
@cmake --build build --target format-check
|
||||||
|
|
||||||
# Compila
|
tidy:
|
||||||
$(CXX) $(APP_SOURCES) $(INCLUDES) -DANBERNIC -DNO_SHADERS -DARCADE -DVERBOSE $(CXXFLAGS) $(LDFLAGS) -o $(RELEASE_FOLDER)_anbernic/$(TARGET_NAME)
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
@cmake --build build --target tidy
|
||||||
|
|
||||||
# Opción para deshabilitar audio (equivalente a la opción DISABLE_AUDIO de CMake)
|
tidy-fix:
|
||||||
no_audio:
|
@cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
@echo "Compilando sin audio: $(TARGET_NAME)_no_audio"
|
@cmake --build build --target tidy-fix
|
||||||
$(CXX) $(filter-out source/external/jail_audio.cpp,$(APP_SOURCES)) $(INCLUDES) -DNO_AUDIO $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)_no_audio"
|
|
||||||
|
|
||||||
# Regla para mostrar la versión actual
|
# ==============================================================================
|
||||||
|
# DESCARGA DE GAMECONTROLLERDB
|
||||||
|
# ==============================================================================
|
||||||
|
controllerdb:
|
||||||
|
@echo "Descargando gamecontrollerdb.txt..."
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt \
|
||||||
|
-o gamecontrollerdb.txt
|
||||||
|
@echo "gamecontrollerdb.txt actualizado"
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# REGLAS ESPECIALES
|
||||||
|
# ==============================================================================
|
||||||
show_version:
|
show_version:
|
||||||
@echo "Version actual: $(VERSION)"
|
@echo "Version actual: $(VERSION)"
|
||||||
|
|
||||||
# Regla de ayuda
|
|
||||||
help:
|
help:
|
||||||
@echo "Makefile para Coffee Crisis Arcade Edition"
|
@echo "Makefile para Coffee Crisis Arcade Edition"
|
||||||
@echo "Comandos disponibles:"
|
@echo "Comandos disponibles:"
|
||||||
@echo " windows - Compilar para Windows"
|
@echo ""
|
||||||
@echo " windows_debug - Compilar debug para Windows"
|
@echo " Compilacion:"
|
||||||
@echo " windows_release - Crear release completo para Windows"
|
@echo " make - Compilar con cmake (Release)"
|
||||||
@echo " linux - Compilar para Linux"
|
@echo " make debug - Compilar con cmake (Debug)"
|
||||||
@echo " linux_debug - Compilar debug para Linux"
|
@echo ""
|
||||||
@echo " linux_release - Crear release basico para Linux"
|
@echo " Release:"
|
||||||
@echo " linux_release_desktop - Crear release con integracion desktop para Linux"
|
@echo " make release - Crear release (detecta SO automaticamente)"
|
||||||
@echo " macos - Compilar para macOS"
|
@echo " make windows_release - Crear release para Windows"
|
||||||
@echo " macos_debug - Compilar debug para macOS"
|
@echo " make linux_release - Crear release basico para Linux"
|
||||||
@echo " macos_release - Crear release completo para macOS"
|
@echo " make linux_release_desktop - Crear release con integracion desktop para Linux"
|
||||||
@echo " raspi - Compilar para Raspberry Pi"
|
@echo " make macos_release - Crear release para macOS"
|
||||||
@echo " raspi_release - Crear release completo para Raspberry Pi"
|
@echo " make raspi_release - Crear release para Raspberry Pi"
|
||||||
@echo " anbernic - Compilar para Anbernic"
|
@echo " make wasm - Crear build WebAssembly (requiere Docker) en dist/wasm"
|
||||||
@echo " no_audio - Compilar sin sistema de audio"
|
@echo ""
|
||||||
@echo " show_version - Mostrar version actual ($(VERSION))"
|
@echo " Herramientas:"
|
||||||
@echo " help - Mostrar esta ayuda"
|
@echo " make spirv - Compilar shaders SPIR-V"
|
||||||
|
@echo " make pack_tool - Compilar herramienta de empaquetado"
|
||||||
|
@echo " make resources.pack - Generar pack de recursos desde data/"
|
||||||
|
@echo ""
|
||||||
|
@echo " Calidad de codigo:"
|
||||||
|
@echo " make format - Formatear codigo con clang-format"
|
||||||
|
@echo " make format-check - Verificar formato sin modificar"
|
||||||
|
@echo " make tidy - Analisis estatico con clang-tidy"
|
||||||
|
@echo " make tidy-fix - Analisis estatico con auto-fix"
|
||||||
|
@echo ""
|
||||||
|
@echo " Otros:"
|
||||||
|
@echo " make show_version - Mostrar version actual ($(VERSION))"
|
||||||
|
@echo " make help - Mostrar esta ayuda"
|
||||||
|
|
||||||
.PHONY: windows windows_rec windows_debug windows_release macos macos_debug macos_release linux linux_debug linux_release linux_release_desktop raspi raspi_debug raspi_release anbernic no_audio show_version help
|
.PHONY: all debug release windows_release macos_release linux_release linux_release_desktop raspi_release wasm pack_tool resources.pack spirv format format-check tidy tidy-fix controllerdb show_version help
|
||||||
|
|||||||
13
README.md
@@ -1,6 +1,8 @@
|
|||||||
# Coffee Crisis Arcade Edition
|
<div align="center">
|
||||||
|
<img src="https://php.sustancia.synology.me/images/ccae/coffee_crisis_arcade_edition_cover_web.png" width="600" alt="Coffee Crisis Cover">
|
||||||
|
</div>
|
||||||
|
|
||||||
<img src="https://php.sustancia.synology.me/images/ccae/coffee_crisis_arcade_edition_cover_web.png" width="300" align="left" style="margin-right: 20px; margin-bottom: 10px;" alt="Coffee Crisis Cover">
|
# Coffee Crisis Arcade Edition
|
||||||
|
|
||||||
## ¡La batalla definitiva pel cafè està ací!
|
## ¡La batalla definitiva pel cafè està ací!
|
||||||
|
|
||||||
@@ -35,10 +37,7 @@ El joc està optimitzat per a ser jugat amb un mando de jocs, encara que un dels
|
|||||||
|
|
||||||
> Nota: El joc suporta nomes un jugador amb teclat.
|
> Nota: El joc suporta nomes un jugador amb teclat.
|
||||||
|
|
||||||
<p align="center">
|

|
||||||
<img src="https://php.sustancia.synology.me/images/ccae/ccae1.png" alt="Joc" width="45%" />
|
|
||||||
<img src="https://php.sustancia.synology.me/images/ccae/ccae3.png" alt="Joc" width="45%" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## Altres tecles
|
## Altres tecles
|
||||||
|
|
||||||
@@ -64,6 +63,8 @@ El joc està optimitzat per a ser jugat amb un mando de jocs, encara que un dels
|
|||||||
2. Descomprimix i executa l'arxiu `coffee_crisis_arcade_edition.exe`.
|
2. Descomprimix i executa l'arxiu `coffee_crisis_arcade_edition.exe`.
|
||||||
3. Gaudeix del joc!
|
3. Gaudeix del joc!
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Agraïments
|
## Agraïments
|
||||||
|
|
||||||
Vull expressar la meua gratitud a **ChatGPT** i **GitHub Copilot**. Gràcies per ser un suport constant en el desenvolupament d'aquest joc!
|
Vull expressar la meua gratitud a **ChatGPT** i **GitHub Copilot**. Gràcies per ser un suport constant en el desenvolupament d'aquest joc!
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
# Variables: ${PREFIX}, ${SYSTEM_FOLDER}
|
# Variables: ${PREFIX}, ${SYSTEM_FOLDER}
|
||||||
|
|
||||||
# Archivos de configuración del sistema (absolutos y opcionales)
|
# Archivos de configuración del sistema (absolutos y opcionales)
|
||||||
DATA|${SYSTEM_FOLDER}/config.txt|optional,absolute
|
DATA|${SYSTEM_FOLDER}/config.yaml|optional,absolute
|
||||||
DATA|${SYSTEM_FOLDER}/controllers.json|optional,absolute
|
DATA|${SYSTEM_FOLDER}/controllers.json|optional,absolute
|
||||||
|
DATA|${SYSTEM_FOLDER}/postfx.yaml|optional,absolute
|
||||||
|
DATA|${SYSTEM_FOLDER}/crtpi.yaml|optional,absolute
|
||||||
DATA|${SYSTEM_FOLDER}/score.bin|optional,absolute
|
DATA|${SYSTEM_FOLDER}/score.bin|optional,absolute
|
||||||
|
|
||||||
# Archivos de configuración del juego
|
# Archivos de configuración del juego
|
||||||
@@ -18,185 +20,183 @@ DATA|${PREFIX}/config/pools.txt
|
|||||||
DATA|${PREFIX}/config/stages.txt
|
DATA|${PREFIX}/config/stages.txt
|
||||||
|
|
||||||
# Archivos con los datos de la demo
|
# Archivos con los datos de la demo
|
||||||
DEMODATA|${PREFIX}/data/demo/demo1.bin
|
DEMODATA|/data/demo/demo1.bin
|
||||||
DEMODATA|${PREFIX}/data/demo/demo2.bin
|
DEMODATA|/data/demo/demo2.bin
|
||||||
|
DEMODATA|/data/demo/demo3.bin
|
||||||
|
|
||||||
# Música
|
# Música
|
||||||
MUSIC|${PREFIX}/data/music/credits.ogg
|
MUSIC|/data/music/congratulations.ogg
|
||||||
MUSIC|${PREFIX}/data/music/intro.ogg
|
MUSIC|/data/music/credits.ogg
|
||||||
MUSIC|${PREFIX}/data/music/playing.ogg
|
MUSIC|/data/music/intro.ogg
|
||||||
MUSIC|${PREFIX}/data/music/title.ogg
|
MUSIC|/data/music/playing.ogg
|
||||||
|
MUSIC|/data/music/title.ogg
|
||||||
|
|
||||||
# Sonidos
|
# Sonidos
|
||||||
SOUND|${PREFIX}/data/sound/balloon_bounce0.wav
|
SOUND|/data/sound/balloon_bounce0.wav
|
||||||
SOUND|${PREFIX}/data/sound/balloon_bounce1.wav
|
SOUND|/data/sound/balloon_bounce1.wav
|
||||||
SOUND|${PREFIX}/data/sound/balloon_bounce2.wav
|
SOUND|/data/sound/balloon_bounce2.wav
|
||||||
SOUND|${PREFIX}/data/sound/balloon_bounce3.wav
|
SOUND|/data/sound/balloon_bounce3.wav
|
||||||
SOUND|${PREFIX}/data/sound/balloon_pop0.wav
|
SOUND|/data/sound/balloon_pop0.wav
|
||||||
SOUND|${PREFIX}/data/sound/balloon_pop1.wav
|
SOUND|/data/sound/balloon_pop1.wav
|
||||||
SOUND|${PREFIX}/data/sound/balloon_pop2.wav
|
SOUND|/data/sound/balloon_pop2.wav
|
||||||
SOUND|${PREFIX}/data/sound/balloon_pop3.wav
|
SOUND|/data/sound/balloon_pop3.wav
|
||||||
SOUND|${PREFIX}/data/sound/bullet.wav
|
SOUND|/data/sound/bullet1p.wav
|
||||||
SOUND|${PREFIX}/data/sound/clock.wav
|
SOUND|/data/sound/bullet2p.wav
|
||||||
SOUND|${PREFIX}/data/sound/coffee_out.wav
|
SOUND|/data/sound/clock.wav
|
||||||
SOUND|${PREFIX}/data/sound/continue_clock.wav
|
SOUND|/data/sound/coffee_out.wav
|
||||||
SOUND|${PREFIX}/data/sound/credit.wav
|
SOUND|/data/sound/continue_clock.wav
|
||||||
SOUND|${PREFIX}/data/sound/debian_drop.wav
|
SOUND|/data/sound/credit.wav
|
||||||
SOUND|${PREFIX}/data/sound/debian_pickup.wav
|
SOUND|/data/sound/debian_drop.wav
|
||||||
SOUND|${PREFIX}/data/sound/hi_score_achieved.wav
|
SOUND|/data/sound/debian_pickup.wav
|
||||||
SOUND|${PREFIX}/data/sound/item_drop.wav
|
SOUND|/data/sound/hi_score_achieved.wav
|
||||||
SOUND|${PREFIX}/data/sound/item_pickup.wav
|
SOUND|/data/sound/item_drop.wav
|
||||||
SOUND|${PREFIX}/data/sound/jump.wav
|
SOUND|/data/sound/item_pickup.wav
|
||||||
SOUND|${PREFIX}/data/sound/logo.wav
|
SOUND|/data/sound/jump.wav
|
||||||
SOUND|${PREFIX}/data/sound/notify.wav
|
SOUND|/data/sound/logo.wav
|
||||||
SOUND|${PREFIX}/data/sound/player_collision.wav
|
SOUND|/data/sound/name_input_accept.wav
|
||||||
SOUND|${PREFIX}/data/sound/power_ball_explosion.wav
|
SOUND|/data/sound/notify.wav
|
||||||
SOUND|${PREFIX}/data/sound/service_menu_adjust.wav
|
SOUND|/data/sound/player_collision.wav
|
||||||
SOUND|${PREFIX}/data/sound/service_menu_back.wav
|
SOUND|/data/sound/power_ball_explosion.wav
|
||||||
SOUND|${PREFIX}/data/sound/service_menu_move.wav
|
SOUND|/data/sound/service_menu_adjust.wav
|
||||||
SOUND|${PREFIX}/data/sound/service_menu_select.wav
|
SOUND|/data/sound/service_menu_back.wav
|
||||||
SOUND|${PREFIX}/data/sound/stage_change.wav
|
SOUND|/data/sound/service_menu_move.wav
|
||||||
SOUND|${PREFIX}/data/sound/tabe_hit.wav
|
SOUND|/data/sound/service_menu_select.wav
|
||||||
SOUND|${PREFIX}/data/sound/tabe.wav
|
SOUND|/data/sound/stage_change.wav
|
||||||
SOUND|${PREFIX}/data/sound/title.wav
|
SOUND|/data/sound/tabe_hit.wav
|
||||||
SOUND|${PREFIX}/data/sound/voice_aw_aw_aw.wav
|
SOUND|/data/sound/tabe.wav
|
||||||
SOUND|${PREFIX}/data/sound/voice_coffee.wav
|
SOUND|/data/sound/title.wav
|
||||||
SOUND|${PREFIX}/data/sound/voice_credit_thankyou.wav
|
SOUND|/data/sound/voice_aw_aw_aw.wav
|
||||||
SOUND|${PREFIX}/data/sound/voice_get_ready.wav
|
SOUND|/data/sound/voice_coffee.wav
|
||||||
SOUND|${PREFIX}/data/sound/voice_no.wav
|
SOUND|/data/sound/voice_credit_thankyou.wav
|
||||||
SOUND|${PREFIX}/data/sound/voice_power_up.wav
|
SOUND|/data/sound/voice_game_over.wav
|
||||||
SOUND|${PREFIX}/data/sound/voice_recover.wav
|
SOUND|/data/sound/voice_get_ready.wav
|
||||||
SOUND|${PREFIX}/data/sound/voice_thankyou.wav
|
SOUND|/data/sound/voice_no.wav
|
||||||
SOUND|${PREFIX}/data/sound/walk.wav
|
SOUND|/data/sound/voice_power_up.wav
|
||||||
|
SOUND|/data/sound/voice_recover.wav
|
||||||
# Shaders
|
SOUND|/data/sound/voice_thankyou.wav
|
||||||
DATA|${PREFIX}/data/shaders/crtpi_240.glsl
|
SOUND|/data/sound/walk.wav
|
||||||
DATA|${PREFIX}/data/shaders/crtpi_240.metal
|
|
||||||
DATA|${PREFIX}/data/shaders/crtpi_256.glsl
|
|
||||||
DATA|${PREFIX}/data/shaders/crtpi_256.metal
|
|
||||||
|
|
||||||
# Texturas - Balloons
|
# Texturas - Balloons
|
||||||
ANIMATION|${PREFIX}/data/gfx/balloon/balloon0.ani
|
ANIMATION|/data/gfx/balloon/balloon0.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/balloon/balloon1.ani
|
ANIMATION|/data/gfx/balloon/balloon1.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/balloon/balloon2.ani
|
ANIMATION|/data/gfx/balloon/balloon2.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/balloon/balloon3.ani
|
ANIMATION|/data/gfx/balloon/balloon3.ani
|
||||||
BITMAP|${PREFIX}/data/gfx/balloon/balloon0.png
|
BITMAP|/data/gfx/balloon/balloon0.png
|
||||||
BITMAP|${PREFIX}/data/gfx/balloon/balloon1.png
|
BITMAP|/data/gfx/balloon/balloon1.png
|
||||||
BITMAP|${PREFIX}/data/gfx/balloon/balloon2.png
|
BITMAP|/data/gfx/balloon/balloon2.png
|
||||||
BITMAP|${PREFIX}/data/gfx/balloon/balloon3.png
|
BITMAP|/data/gfx/balloon/balloon3.png
|
||||||
|
|
||||||
# Texturas - Explosiones
|
# Texturas - Explosiones
|
||||||
ANIMATION|${PREFIX}/data/gfx/balloon/explosion0.ani
|
ANIMATION|/data/gfx/balloon/explosion0.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/balloon/explosion1.ani
|
ANIMATION|/data/gfx/balloon/explosion1.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/balloon/explosion2.ani
|
ANIMATION|/data/gfx/balloon/explosion2.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/balloon/explosion3.ani
|
ANIMATION|/data/gfx/balloon/explosion3.ani
|
||||||
BITMAP|${PREFIX}/data/gfx/balloon/explosion0.png
|
BITMAP|/data/gfx/balloon/explosion0.png
|
||||||
BITMAP|${PREFIX}/data/gfx/balloon/explosion1.png
|
BITMAP|/data/gfx/balloon/explosion1.png
|
||||||
BITMAP|${PREFIX}/data/gfx/balloon/explosion2.png
|
BITMAP|/data/gfx/balloon/explosion2.png
|
||||||
BITMAP|${PREFIX}/data/gfx/balloon/explosion3.png
|
BITMAP|/data/gfx/balloon/explosion3.png
|
||||||
|
|
||||||
# Texturas - Power Ball
|
# Texturas - Power Ball
|
||||||
ANIMATION|${PREFIX}/data/gfx/balloon/powerball.ani
|
ANIMATION|/data/gfx/balloon/powerball.ani
|
||||||
BITMAP|${PREFIX}/data/gfx/balloon/powerball.png
|
BITMAP|/data/gfx/balloon/powerball.png
|
||||||
|
|
||||||
# Texturas - Bala
|
# Texturas - Bala
|
||||||
ANIMATION|${PREFIX}/data/gfx/bullet/bullet.ani
|
ANIMATION|/data/gfx/bullet/bullet.ani
|
||||||
BITMAP|${PREFIX}/data/gfx/bullet/bullet.png
|
BITMAP|/data/gfx/bullet/bullet.png
|
||||||
|
|
||||||
# Texturas - Tabe
|
# Texturas - Tabe
|
||||||
ANIMATION|${PREFIX}/data/gfx/tabe/tabe.ani
|
ANIMATION|/data/gfx/tabe/tabe.ani
|
||||||
BITMAP|${PREFIX}/data/gfx/tabe/tabe.png
|
BITMAP|/data/gfx/tabe/tabe.png
|
||||||
|
|
||||||
# Texturas - Juego
|
# Texturas - Juego
|
||||||
BITMAP|${PREFIX}/data/gfx/game/game_buildings.png
|
BITMAP|/data/gfx/game/game_buildings.png
|
||||||
BITMAP|${PREFIX}/data/gfx/game/game_clouds1.png
|
BITMAP|/data/gfx/game/game_clouds1.png
|
||||||
BITMAP|${PREFIX}/data/gfx/game/game_clouds2.png
|
BITMAP|/data/gfx/game/game_clouds2.png
|
||||||
BITMAP|${PREFIX}/data/gfx/game/game_grass.png
|
ANIMATION|/data/gfx/game/game_grass.ani
|
||||||
BITMAP|${PREFIX}/data/gfx/game/game_moon.png
|
BITMAP|/data/gfx/game/game_grass.png
|
||||||
BITMAP|${PREFIX}/data/gfx/game/game_power_meter.png
|
BITMAP|/data/gfx/game/game_moon.png
|
||||||
BITMAP|${PREFIX}/data/gfx/game/game_sky_colors.png
|
BITMAP|/data/gfx/game/game_power_meter.png
|
||||||
BITMAP|${PREFIX}/data/gfx/game/game_sun.png
|
BITMAP|/data/gfx/game/game_sky_colors.png
|
||||||
|
BITMAP|/data/gfx/game/game_sun.png
|
||||||
|
|
||||||
# Texturas - Intro
|
# Texturas - Intro
|
||||||
BITMAP|${PREFIX}/data/gfx/intro/intro1.png
|
BITMAP|/data/gfx/intro/intro1.png
|
||||||
BITMAP|${PREFIX}/data/gfx/intro/intro2.png
|
BITMAP|/data/gfx/intro/intro2.png
|
||||||
BITMAP|${PREFIX}/data/gfx/intro/intro3.png
|
BITMAP|/data/gfx/intro/intro3.png
|
||||||
BITMAP|${PREFIX}/data/gfx/intro/intro4.png
|
BITMAP|/data/gfx/intro/intro4.png
|
||||||
BITMAP|${PREFIX}/data/gfx/intro/intro5.png
|
BITMAP|/data/gfx/intro/intro5.png
|
||||||
BITMAP|${PREFIX}/data/gfx/intro/intro6.png
|
BITMAP|/data/gfx/intro/intro6.png
|
||||||
|
|
||||||
# Texturas - Logo
|
# Texturas - Logo
|
||||||
BITMAP|${PREFIX}/data/gfx/logo/logo_jailgames_mini.png
|
BITMAP|/data/gfx/logo/logo_jailgames_mini.png
|
||||||
BITMAP|${PREFIX}/data/gfx/logo/logo_jailgames.png
|
BITMAP|/data/gfx/logo/logo_jailgames.png
|
||||||
BITMAP|${PREFIX}/data/gfx/logo/logo_since_1998.png
|
BITMAP|/data/gfx/logo/logo_since_1998.png
|
||||||
|
|
||||||
# Texturas - Items
|
# Texturas - Items
|
||||||
ANIMATION|${PREFIX}/data/gfx/item/item_clock.ani
|
ANIMATION|/data/gfx/item/item_clock.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/item/item_coffee_machine.ani
|
ANIMATION|/data/gfx/item/item_coffee_machine.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/item/item_coffee.ani
|
ANIMATION|/data/gfx/item/item_coffee.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/item/item_debian.ani
|
ANIMATION|/data/gfx/item/item_debian.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/item/item_points1_disk.ani
|
ANIMATION|/data/gfx/item/item_points1_disk.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/item/item_points2_gavina.ani
|
ANIMATION|/data/gfx/item/item_points2_gavina.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/item/item_points3_pacmar.ani
|
ANIMATION|/data/gfx/item/item_points3_pacmar.ani
|
||||||
BITMAP|${PREFIX}/data/gfx/item/item_clock.png
|
BITMAP|/data/gfx/item/item_clock.png
|
||||||
BITMAP|${PREFIX}/data/gfx/item/item_coffee_machine.png
|
BITMAP|/data/gfx/item/item_coffee_machine.png
|
||||||
BITMAP|${PREFIX}/data/gfx/item/item_coffee.png
|
BITMAP|/data/gfx/item/item_coffee.png
|
||||||
BITMAP|${PREFIX}/data/gfx/item/item_debian.png
|
BITMAP|/data/gfx/item/item_debian.png
|
||||||
BITMAP|${PREFIX}/data/gfx/item/item_points1_disk.png
|
BITMAP|/data/gfx/item/item_points1_disk.png
|
||||||
BITMAP|${PREFIX}/data/gfx/item/item_points2_gavina.png
|
BITMAP|/data/gfx/item/item_points2_gavina.png
|
||||||
BITMAP|${PREFIX}/data/gfx/item/item_points3_pacmar.png
|
BITMAP|/data/gfx/item/item_points3_pacmar.png
|
||||||
|
|
||||||
# Texturas - Titulo
|
# Texturas - Titulo
|
||||||
ANIMATION|${PREFIX}/data/gfx/title/title_dust.ani
|
ANIMATION|/data/gfx/title/title_dust.ani
|
||||||
BITMAP|${PREFIX}/data/gfx/title/title_arcade_edition.png
|
BITMAP|/data/gfx/title/title_arcade_edition.png
|
||||||
BITMAP|${PREFIX}/data/gfx/title/title_bg_tile.png
|
BITMAP|/data/gfx/title/title_bg_tile.png
|
||||||
BITMAP|${PREFIX}/data/gfx/title/title_coffee.png
|
BITMAP|/data/gfx/title/title_coffee.png
|
||||||
BITMAP|${PREFIX}/data/gfx/title/title_crisis.png
|
BITMAP|/data/gfx/title/title_crisis.png
|
||||||
BITMAP|${PREFIX}/data/gfx/title/title_dust.png
|
BITMAP|/data/gfx/title/title_dust.png
|
||||||
|
|
||||||
# Texturas - Jugador 1
|
# Texturas - Jugador 1
|
||||||
BITMAP|${PREFIX}/data/gfx/player/player1_power.png
|
BITMAP|/data/gfx/player/player1_power.png
|
||||||
BITMAP|${PREFIX}/data/gfx/player/player1.gif
|
BITMAP|/data/gfx/player/player1.gif
|
||||||
PALETTE|${PREFIX}/data/gfx/player/player1_coffee1.pal
|
PALETTE|/data/gfx/player/player1_coffee1.pal
|
||||||
PALETTE|${PREFIX}/data/gfx/player/player1_coffee2.pal
|
PALETTE|/data/gfx/player/player1_coffee2.pal
|
||||||
PALETTE|${PREFIX}/data/gfx/player/player1_invencible.pal
|
PALETTE|/data/gfx/player/player1_invencible.pal
|
||||||
|
|
||||||
# Texturas - Jugador 2
|
# Texturas - Jugador 2
|
||||||
BITMAP|${PREFIX}/data/gfx/player/player2_power.png
|
BITMAP|/data/gfx/player/player2_power.png
|
||||||
BITMAP|${PREFIX}/data/gfx/player/player2.gif
|
BITMAP|/data/gfx/player/player2.gif
|
||||||
PALETTE|${PREFIX}/data/gfx/player/player2_coffee1.pal
|
PALETTE|/data/gfx/player/player2_coffee1.pal
|
||||||
PALETTE|${PREFIX}/data/gfx/player/player2_coffee2.pal
|
PALETTE|/data/gfx/player/player2_coffee2.pal
|
||||||
PALETTE|${PREFIX}/data/gfx/player/player2_invencible.pal
|
PALETTE|/data/gfx/player/player2_invencible.pal
|
||||||
|
|
||||||
# Animaciones del jugador
|
# Animaciones del jugador
|
||||||
ANIMATION|${PREFIX}/data/gfx/player/player_power.ani
|
ANIMATION|/data/gfx/player/player_power.ani
|
||||||
ANIMATION|${PREFIX}/data/gfx/player/player.ani
|
ANIMATION|/data/gfx/player/player1.ani
|
||||||
|
ANIMATION|/data/gfx/player/player2.ani
|
||||||
# Texturas - Golpe del jugador
|
|
||||||
BITMAP|${PREFIX}/data/gfx/player/hit.png
|
|
||||||
|
|
||||||
# Fuentes de texto
|
# Fuentes de texto
|
||||||
BITMAP|${PREFIX}/data/font/04b_25_2x.png
|
BITMAP|/data/font/04b_25_2x.png
|
||||||
BITMAP|${PREFIX}/data/font/04b_25_2x_white.png
|
BITMAP|/data/font/04b_25_2x_white.png
|
||||||
BITMAP|${PREFIX}/data/font/04b_25_flat_2x.png
|
BITMAP|/data/font/04b_25_flat_2x.png
|
||||||
BITMAP|${PREFIX}/data/font/04b_25_flat.png
|
BITMAP|/data/font/04b_25_flat.png
|
||||||
BITMAP|${PREFIX}/data/font/04b_25_grey.png
|
BITMAP|/data/font/04b_25_grey.png
|
||||||
BITMAP|${PREFIX}/data/font/04b_25_metal.png
|
BITMAP|/data/font/04b_25_metal.png
|
||||||
BITMAP|${PREFIX}/data/font/04b_25_reversed_2x.png
|
BITMAP|/data/font/04b_25_reversed_2x.png
|
||||||
BITMAP|${PREFIX}/data/font/04b_25_reversed.png
|
BITMAP|/data/font/04b_25_reversed.png
|
||||||
BITMAP|${PREFIX}/data/font/04b_25_white.png
|
BITMAP|/data/font/04b_25_white.png
|
||||||
BITMAP|${PREFIX}/data/font/04b_25.png
|
BITMAP|/data/font/04b_25.png
|
||||||
BITMAP|${PREFIX}/data/font/8bithud.png
|
BITMAP|/data/font/8bithud.png
|
||||||
BITMAP|${PREFIX}/data/font/aseprite.png
|
BITMAP|/data/font/aseprite.png
|
||||||
BITMAP|${PREFIX}/data/font/smb2_grad.png
|
BITMAP|/data/font/smb2_grad.png
|
||||||
BITMAP|${PREFIX}/data/font/smb2.png
|
BITMAP|/data/font/smb2.png
|
||||||
FONT|${PREFIX}/data/font/04b_25_2x.txt
|
FONT|/data/font/04b_25_2x.txt
|
||||||
FONT|${PREFIX}/data/font/04b_25.txt
|
FONT|/data/font/04b_25.txt
|
||||||
FONT|${PREFIX}/data/font/8bithud.txt
|
FONT|/data/font/8bithud.txt
|
||||||
FONT|${PREFIX}/data/font/aseprite.txt
|
FONT|/data/font/aseprite.txt
|
||||||
FONT|${PREFIX}/data/font/smb2.txt
|
FONT|/data/font/smb2.txt
|
||||||
|
|
||||||
# Idiomas
|
# Idiomas
|
||||||
LANG|${PREFIX}/data/lang/ba_BA.json
|
LANG|/data/lang/ba_BA.json
|
||||||
LANG|${PREFIX}/data/lang/en_UK.json
|
LANG|/data/lang/en_UK.json
|
||||||
LANG|${PREFIX}/data/lang/es_ES.json
|
LANG|/data/lang/es_ES.json
|
||||||
@@ -8,270 +8,270 @@
|
|||||||
|
|
||||||
formation: 0
|
formation: 0
|
||||||
# Dos enemigos BALLOON3 uno a cada extremo
|
# Dos enemigos BALLOON3 uno a cada extremo
|
||||||
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
|
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0.0000
|
||||||
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
|
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0.0000
|
||||||
|
|
||||||
formation: 1
|
formation: 1
|
||||||
# Dos enemigos BALLOON3 uno a cada cuarto. Ambos van hacia el centro
|
# Dos enemigos BALLOON3 uno a cada cuarto. Ambos van hacia el centro
|
||||||
X3_25, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
|
X3_25, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0.0000
|
||||||
X3_75, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
|
X3_75, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0.0000
|
||||||
|
|
||||||
formation: 2
|
formation: 2
|
||||||
# Cuatro enemigos BALLOON1 uno detrás del otro. A la izquierda y hacia el centro
|
# Cuatro enemigos BALLOON1 uno detrás del otro. A la izquierda y hacia el centro
|
||||||
X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 30
|
X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.5000
|
||||||
X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 20
|
X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.3333
|
||||||
X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 10
|
X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.1667
|
||||||
X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0
|
X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.0000
|
||||||
|
|
||||||
formation: 3
|
formation: 3
|
||||||
# Cuatro enemigos BALLOON1 uno detrás del otro. A la derecha y hacia el centro
|
# Cuatro enemigos BALLOON1 uno detrás del otro. A la derecha y hacia el centro
|
||||||
X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 30
|
X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.5000
|
||||||
X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 20
|
X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.3333
|
||||||
X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 10
|
X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.1667
|
||||||
X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0
|
X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.0000
|
||||||
|
|
||||||
formation: 4
|
formation: 4
|
||||||
# Tres enemigos BALLOON2. 0, 25, 50. Hacia la derecha
|
# Tres enemigos BALLOON2. 0, 25, 50. Hacia la derecha
|
||||||
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
|
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.3333
|
||||||
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
|
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.1667
|
||||||
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
|
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 5
|
formation: 5
|
||||||
# Tres enemigos BALLOON2. 50, 75, 100. Hacia la izquierda
|
# Tres enemigos BALLOON2. 50, 75, 100. Hacia la izquierda
|
||||||
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
|
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.3333
|
||||||
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
|
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.1667
|
||||||
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
|
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 6
|
formation: 6
|
||||||
# Tres enemigos BALLOON2. 0, 0, 0. Hacia la derecha
|
# Tres enemigos BALLOON2. 0, 0, 0. Hacia la derecha
|
||||||
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
|
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.3333
|
||||||
X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
|
X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.1667
|
||||||
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
|
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 7
|
formation: 7
|
||||||
# Tres enemigos BALLOON2. 100, 100, 100. Hacia la izquierda
|
# Tres enemigos BALLOON2. 100, 100, 100. Hacia la izquierda
|
||||||
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
|
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.3333
|
||||||
X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
|
X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.1667
|
||||||
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
|
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 8
|
formation: 8
|
||||||
# Seis enemigos BALLOON0. 0, 0, 0, 0, 0, 0. Hacia la derecha
|
# Seis enemigos BALLOON0. 0, 0, 0, 0, 0, 0. Hacia la derecha
|
||||||
X0_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 50
|
X0_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.8333
|
||||||
X0_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 40
|
X0_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.6667
|
||||||
X0_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 30
|
X0_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.5000
|
||||||
X0_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 20
|
X0_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.3333
|
||||||
X0_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 10
|
X0_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.1667
|
||||||
X0_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0
|
X0_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.0000
|
||||||
|
|
||||||
formation: 9
|
formation: 9
|
||||||
# Seis enemigos BALLOON0. 100, 100, 100, 100, 100, 100. Hacia la izquierda
|
# Seis enemigos BALLOON0. 100, 100, 100, 100, 100, 100. Hacia la izquierda
|
||||||
X0_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 50
|
X0_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.8333
|
||||||
X0_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 40
|
X0_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.6667
|
||||||
X0_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 30
|
X0_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.5000
|
||||||
X0_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 20
|
X0_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.3333
|
||||||
X0_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 10
|
X0_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.1667
|
||||||
X0_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0
|
X0_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.0000
|
||||||
|
|
||||||
formation: 10
|
formation: 10
|
||||||
# Tres enemigos BALLOON3 seguidos desde la izquierda. Hacia la derecha
|
# Tres enemigos BALLOON3 seguidos desde la izquierda. Hacia la derecha
|
||||||
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 30
|
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0.5000
|
||||||
X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 15
|
X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0.2500
|
||||||
X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
|
X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0.0000
|
||||||
|
|
||||||
formation: 11
|
formation: 11
|
||||||
# Tres enemigos BALLOON3 seguidos desde la derecha. Hacia la izquierda
|
# Tres enemigos BALLOON3 seguidos desde la derecha. Hacia la izquierda
|
||||||
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 30
|
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0.5000
|
||||||
X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 15
|
X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0.2500
|
||||||
X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
|
X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0.0000
|
||||||
|
|
||||||
formation: 12
|
formation: 12
|
||||||
# Seis enemigos BALLOON1 uno detrás del otro. A la izquierda y hacia el centro
|
# Seis enemigos BALLOON1 uno detrás del otro. A la izquierda y hacia el centro
|
||||||
X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 50
|
X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.8333
|
||||||
X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 40
|
X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.6667
|
||||||
X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 30
|
X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.5000
|
||||||
X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 20
|
X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.3333
|
||||||
X1_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 10
|
X1_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.1667
|
||||||
X1_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0
|
X1_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.0000
|
||||||
|
|
||||||
formation: 13
|
formation: 13
|
||||||
# Seis enemigos BALLOON1 uno detrás del otro. A la derecha y hacia el centro
|
# Seis enemigos BALLOON1 uno detrás del otro. A la derecha y hacia el centro
|
||||||
X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 50
|
X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.8333
|
||||||
X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 40
|
X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.6667
|
||||||
X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 30
|
X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.5000
|
||||||
X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 20
|
X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.3333
|
||||||
X1_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 10
|
X1_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.1667
|
||||||
X1_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0
|
X1_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.0000
|
||||||
|
|
||||||
formation: 14
|
formation: 14
|
||||||
# Cinco enemigos BALLOON2. Hacia la derecha. Separados
|
# Cinco enemigos BALLOON2. Hacia la derecha. Separados
|
||||||
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 40
|
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.6667
|
||||||
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 30
|
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.5000
|
||||||
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
|
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.3333
|
||||||
X2_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
|
X2_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.1667
|
||||||
X2_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
|
X2_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 15
|
formation: 15
|
||||||
# Cinco enemigos BALLOON2. Hacia la izquierda. Separados
|
# Cinco enemigos BALLOON2. Hacia la izquierda. Separados
|
||||||
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 40
|
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.6667
|
||||||
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 30
|
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.5000
|
||||||
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
|
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.3333
|
||||||
X2_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
|
X2_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.1667
|
||||||
X2_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
|
X2_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 16
|
formation: 16
|
||||||
# Cinco enemigos BALLOON2. Hacia la derecha. Juntos
|
# Cinco enemigos BALLOON2. Hacia la derecha. Juntos
|
||||||
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 40
|
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.6667
|
||||||
X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 30
|
X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.5000
|
||||||
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
|
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.3333
|
||||||
X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
|
X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.1667
|
||||||
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
|
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 17
|
formation: 17
|
||||||
# Cinco enemigos BALLOON2. Hacia la izquierda. Juntos
|
# Cinco enemigos BALLOON2. Hacia la izquierda. Juntos
|
||||||
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 40
|
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.6667
|
||||||
X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 30
|
X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.5000
|
||||||
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
|
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.3333
|
||||||
X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
|
X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.1667
|
||||||
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
|
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 18
|
formation: 18
|
||||||
# Doce enemigos BALLOON0. Hacia la derecha. Juntos
|
# Doce enemigos BALLOON0. Hacia la derecha. Juntos
|
||||||
X0_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 110
|
X0_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.8333
|
||||||
X0_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 100
|
X0_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.6667
|
||||||
X0_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 90
|
X0_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.5000
|
||||||
X0_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 80
|
X0_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.3333
|
||||||
X0_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 70
|
X0_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.1667
|
||||||
X0_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 60
|
X0_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.0000
|
||||||
X0_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 50
|
X0_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.8333
|
||||||
X0_0, 7, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 40
|
X0_0, 7, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.6667
|
||||||
X0_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 30
|
X0_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.5000
|
||||||
X0_0, 9, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 20
|
X0_0, 9, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.3333
|
||||||
X0_0, 10, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 10
|
X0_0, 10, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.1667
|
||||||
X0_0, 11, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0
|
X0_0, 11, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.0000
|
||||||
|
|
||||||
formation: 19
|
formation: 19
|
||||||
# Doce enemigos BALLOON0. Hacia la izquierda. Juntos
|
# Doce enemigos BALLOON0. Hacia la izquierda. Juntos
|
||||||
X0_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 110
|
X0_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.8333
|
||||||
X0_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 100
|
X0_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.6667
|
||||||
X0_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 90
|
X0_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.5000
|
||||||
X0_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 80
|
X0_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.3333
|
||||||
X0_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 70
|
X0_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.1667
|
||||||
X0_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 60
|
X0_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.0000
|
||||||
X0_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 50
|
X0_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.8333
|
||||||
X0_100, -7, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 40
|
X0_100, -7, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.6667
|
||||||
X0_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 30
|
X0_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.5000
|
||||||
X0_100, -9, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 20
|
X0_100, -9, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.3333
|
||||||
X0_100, -10, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 10
|
X0_100, -10, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.1667
|
||||||
X0_100, -11, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0
|
X0_100, -11, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.0000
|
||||||
|
|
||||||
formation: 20
|
formation: 20
|
||||||
# Cuatro enemigos BALLOON3 seguidos desde la izquierda/derecha. Simétricos
|
# Cuatro enemigos BALLOON3 seguidos desde la izquierda/derecha. Simétricos
|
||||||
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
|
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0.0000
|
||||||
X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
|
X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0.0000
|
||||||
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
|
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0.0000
|
||||||
X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
|
X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0.0000
|
||||||
|
|
||||||
formation: 21
|
formation: 21
|
||||||
# Diez enemigos BALLOON1 uno detrás del otro. Izquierda/derecha. Simétricos
|
# Diez enemigos BALLOON1 uno detrás del otro. Izquierda/derecha. Simétricos
|
||||||
X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 12
|
X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.2000
|
||||||
X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 9
|
X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.1500
|
||||||
X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 6
|
X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.1000
|
||||||
X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 3
|
X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.0500
|
||||||
X1_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0
|
X1_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0.0000
|
||||||
X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 12
|
X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.2000
|
||||||
X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 9
|
X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.1500
|
||||||
X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 6
|
X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.1000
|
||||||
X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 3
|
X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.0500
|
||||||
X1_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0
|
X1_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0.0000
|
||||||
|
|
||||||
formation: 22
|
formation: 22
|
||||||
# Diez enemigos BALLOON2. Hacia la derecha/izquierda. Separados. Simétricos
|
# Diez enemigos BALLOON2. Hacia la derecha/izquierda. Separados. Simétricos
|
||||||
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 40
|
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.6667
|
||||||
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 30
|
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.5000
|
||||||
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
|
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.3333
|
||||||
X2_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
|
X2_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.1667
|
||||||
X2_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
|
X2_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.0000
|
||||||
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 40
|
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.6667
|
||||||
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 30
|
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.5000
|
||||||
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
|
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.3333
|
||||||
X2_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
|
X2_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.1667
|
||||||
X2_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
|
X2_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 23
|
formation: 23
|
||||||
# Diez enemigos BALLOON2. Hacia la derecha. Juntos. Simétricos
|
# Diez enemigos BALLOON2. Hacia la derecha. Juntos. Simétricos
|
||||||
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 40
|
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.6667
|
||||||
X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 30
|
X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.5000
|
||||||
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
|
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.3333
|
||||||
X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
|
X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.1667
|
||||||
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
|
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0.0000
|
||||||
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 40
|
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.6667
|
||||||
X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 30
|
X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.5000
|
||||||
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
|
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.3333
|
||||||
X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
|
X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.1667
|
||||||
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
|
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0.0000
|
||||||
|
|
||||||
formation: 24
|
formation: 24
|
||||||
# Treinta enemigos BALLOON0. Del centro hacia los extremos. Juntos. Simétricos
|
# Treinta enemigos BALLOON0. Del centro hacia los extremos. Juntos. Simétricos
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.0000
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 5
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.0833
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 10
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.1667
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 15
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.2500
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 20
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.3333
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 25
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.4167
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 30
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.5000
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 35
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.5833
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 40
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.6667
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 45
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.7500
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 50
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.8333
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 55
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.9167
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 60
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.0000
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 65
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.0833
|
||||||
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 70
|
X0_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.1667
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.0000
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 5
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.0833
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 10
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.1667
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 15
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.2500
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 20
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.3333
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 25
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.4167
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 30
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.5000
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 35
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.5833
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 40
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.6667
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 45
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.7500
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 50
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.8333
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 55
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.9167
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 60
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.0000
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 65
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.0833
|
||||||
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 70
|
X0_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.1667
|
||||||
|
|
||||||
formation: 25
|
formation: 25
|
||||||
# Treinta enemigos BALLOON0. Del centro hacia adentro. Juntos. Simétricos
|
# Treinta enemigos BALLOON0. Del centro hacia adentro. Juntos. Simétricos
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 70
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.1667
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 65
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.0833
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 60
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 1.0000
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 55
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.9167
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 50
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.8333
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 45
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.7500
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 40
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.6667
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 35
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.5833
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 30
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.5000
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 25
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.4167
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 20
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.3333
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 15
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.2500
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 10
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.1667
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 5
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.0833
|
||||||
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0
|
X0_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0.0000
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 70
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.1667
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 65
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.0833
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 60
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 1.0000
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 55
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.9167
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 50
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.8333
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 45
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.7500
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 40
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.6667
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 35
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.5833
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 30
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.5000
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 25
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.4167
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 20
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.3333
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 15
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.2500
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 10
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.1667
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 5
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.0833
|
||||||
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0
|
X0_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0.0000
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
# Formato: PARAMETRO VALOR
|
# Formato: PARAMETRO VALOR
|
||||||
|
|
||||||
# --- GAME ---
|
# --- GAME ---
|
||||||
game.item_size 20 # Tamaño de los items del juego (en píxeles)
|
|
||||||
game.item_text_outline_color E0E0E0F0 # Color del outline del texto de los items (RGBA hex)
|
game.item_text_outline_color E0E0E0F0 # Color del outline del texto de los items (RGBA hex)
|
||||||
game.width 320 # Ancho de la resolución nativa del juego (en píxeles)
|
game.width 320 # Ancho de la resolución nativa del juego (en píxeles)
|
||||||
game.height 240 # Alto de la resolución nativa del juego (en píxeles)
|
game.height 240 # Alto de la resolución nativa del juego (en píxeles)
|
||||||
@@ -12,8 +11,6 @@ game.play_area.rect.w 320 # Ancho de la zona jugable
|
|||||||
game.play_area.rect.h 200 # Alto de la zona jugable
|
game.play_area.rect.h 200 # Alto de la zona jugable
|
||||||
game.name_entry_idle_time 10 # Segundos para introducir el nombre al finalizar la partida si no se pulsa nada
|
game.name_entry_idle_time 10 # Segundos para introducir el nombre al finalizar la partida si no se pulsa nada
|
||||||
game.name_entry_total_time 60 # Segundos totales para introducir el nombre al finalizar la partida
|
game.name_entry_total_time 60 # Segundos totales para introducir el nombre al finalizar la partida
|
||||||
game.hit_stop false # Indica si debe haber un paro cuando el jugador es golpeado por un globo
|
|
||||||
game.hit_stop_ms 500 # Cantidad de milisegundos que dura el hit_stop
|
|
||||||
|
|
||||||
# --- FADE ---
|
# --- FADE ---
|
||||||
fade.color 1F2B30 # Color hexadecimal para el efecto de fundido
|
fade.color 1F2B30 # Color hexadecimal para el efecto de fundido
|
||||||
@@ -39,24 +36,24 @@ scoreboard.text_color2 FFFFFF # Color secundario del texto del marca
|
|||||||
scoreboard.skip_countdown_value 8 # Valor para saltar la cuenta atrás (segundos)
|
scoreboard.skip_countdown_value 8 # Valor para saltar la cuenta atrás (segundos)
|
||||||
|
|
||||||
# --- TITLE ---
|
# --- TITLE ---
|
||||||
title.press_start_position 180 # Posición Y del texto "Press Start"
|
title.press_start_position 180 # Posición Y del texto "Press Start"
|
||||||
title.title_duration 800 # Duración de la pantalla de título (frames)
|
title.title_duration 14 # Duración de la pantalla de título (segundos)
|
||||||
title.arcade_edition_position 123 # Posición Y del subtítulo "Arcade Edition"
|
title.arcade_edition_position 123 # Posición Y del subtítulo "Arcade Edition"
|
||||||
title.title_c_c_position 80 # Posición Y del título principal
|
title.title_c_c_position 80 # Posición Y del título principal
|
||||||
title.bg_color 41526F # Color de fondo en la sección titulo
|
title.bg_color 41526F # Color de fondo en la sección titulo
|
||||||
|
|
||||||
# --- BACKGROUND ---
|
# --- BACKGROUND ---
|
||||||
background.attenuate_color FFFFFF00 # Color de atenuación del fondo (RGBA hexadecimal)
|
background.attenuate_color FFFFFF00 # Color de atenuación del fondo (RGBA hexadecimal)
|
||||||
|
|
||||||
# --- BALLOONS ---
|
# --- BALLOONS --- (deltaTime en segundos: vel en pixels/s, grav en pixels/s²)
|
||||||
balloon.settings[0].vel 2.75f # Velocidad inicial del globo 1
|
balloon.settings[0].vel 165.0f # Velocidad inicial del globo 1 (pixels/s)
|
||||||
balloon.settings[0].grav 0.09f # Gravedad aplicada al globo 1
|
balloon.settings[0].grav 320.0f # Gravedad aplicada al globo 1 (pixels/s²)
|
||||||
balloon.settings[1].vel 3.70f # Velocidad inicial del globo 2
|
balloon.settings[1].vel 222.0f # Velocidad inicial del globo 2 (pixels/s)
|
||||||
balloon.settings[1].grav 0.10f # Gravedad aplicada al globo 2
|
balloon.settings[1].grav 360.0f # Gravedad aplicada al globo 2 (pixels/s²)
|
||||||
balloon.settings[2].vel 4.70f # Velocidad inicial del globo 3
|
balloon.settings[2].vel 282.0f # Velocidad inicial del globo 3 (pixels/s)
|
||||||
balloon.settings[2].grav 0.10f # Gravedad aplicada al globo 3
|
balloon.settings[2].grav 360.0f # Gravedad aplicada al globo 3 (pixels/s²)
|
||||||
balloon.settings[3].vel 5.45f # Velocidad inicial del globo 4
|
balloon.settings[3].vel 327.0f # Velocidad inicial del globo 4 (pixels/s)
|
||||||
balloon.settings[3].grav 0.10f # Gravedad aplicada al globo 4
|
balloon.settings[3].grav 360.0f # Gravedad aplicada al globo 4 (pixels/s²)
|
||||||
|
|
||||||
balloon.color[0] blue # Color de creación del globo normal
|
balloon.color[0] blue # Color de creación del globo normal
|
||||||
balloon.color[1] orange # Color del globo normal
|
balloon.color[1] orange # Color del globo normal
|
||||||
@@ -93,7 +90,7 @@ service_menu.window_message.text_safety_margin 15.0f # Margen de segu
|
|||||||
service_menu.window_message.animation_duration 0.3f # Duración de animaciones de ventanas (segundos)
|
service_menu.window_message.animation_duration 0.3f # Duración de animaciones de ventanas (segundos)
|
||||||
|
|
||||||
# --- INTRO ---
|
# --- INTRO ---
|
||||||
intro.bg_color 4664BD # Color de fondo de la intro
|
intro.bg_color 41526F # Color de fondo de la intro
|
||||||
intro.card_color CBDBFC # Color de las tarjetas en la intro
|
intro.card_color CBDBFC # Color de las tarjetas en la intro
|
||||||
intro.shadow_color 00000080 # Color de la sombra de las tarjetas en la intro
|
intro.shadow_color 00000080 # Color de la sombra de las tarjetas en la intro
|
||||||
intro.text_distance_from_bottom 48 # Posicion del texto
|
intro.text_distance_from_bottom 48 # Posicion del texto
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
# Formato: PARAMETRO VALOR
|
# Formato: PARAMETRO VALOR
|
||||||
|
|
||||||
# --- GAME ---
|
# --- GAME ---
|
||||||
game.item_size 20 # Tamaño de los items del juego (en píxeles)
|
|
||||||
game.item_text_outline_color E0E0E0F0 # Color del outline del texto de los items (RGBA hex)
|
game.item_text_outline_color E0E0E0F0 # Color del outline del texto de los items (RGBA hex)
|
||||||
game.width 320 # Ancho de la resolución nativa del juego (en píxeles)
|
game.width 320 # Ancho de la resolución nativa del juego (en píxeles)
|
||||||
game.height 256 # Alto de la resolución nativa del juego (en píxeles)
|
game.height 256 # Alto de la resolución nativa del juego (en píxeles)
|
||||||
@@ -12,8 +11,6 @@ game.play_area.rect.w 320 # Ancho de la zona jugable
|
|||||||
game.play_area.rect.h 216 # Alto de la zona jugable
|
game.play_area.rect.h 216 # Alto de la zona jugable
|
||||||
game.name_entry_idle_time 10 # Segundos para introducir el nombre al finalizar la partida si no se pulsa nada
|
game.name_entry_idle_time 10 # Segundos para introducir el nombre al finalizar la partida si no se pulsa nada
|
||||||
game.name_entry_total_time 60 # Segundos totales para introducir el nombre al finalizar la partida
|
game.name_entry_total_time 60 # Segundos totales para introducir el nombre al finalizar la partida
|
||||||
game.hit_stop false # Indica si debe haber un paro cuando el jugador es golpeado por un globo
|
|
||||||
game.hit_stop_ms 500 # Cantidad de milisegundos que dura el hit_stop
|
|
||||||
|
|
||||||
# --- FADE ---
|
# --- FADE ---
|
||||||
fade.color 1F2B30 # Color hexadecimal para el efecto de fundido
|
fade.color 1F2B30 # Color hexadecimal para el efecto de fundido
|
||||||
@@ -39,24 +36,24 @@ scoreboard.text_color2 FFFFFF # Color secundario del texto del marca
|
|||||||
scoreboard.skip_countdown_value 8 # Valor para saltar la cuenta atrás (segundos)
|
scoreboard.skip_countdown_value 8 # Valor para saltar la cuenta atrás (segundos)
|
||||||
|
|
||||||
# --- TITLE ---
|
# --- TITLE ---
|
||||||
title.press_start_position 180 # Posición Y del texto "Press Start"
|
title.press_start_position 180 # Posición Y del texto "Press Start"
|
||||||
title.title_duration 800 # Duración de la pantalla de título (frames)
|
title.title_duration 14 # Duración de la pantalla de título (segundos)
|
||||||
title.arcade_edition_position 123 # Posición Y del subtítulo "Arcade Edition"
|
title.arcade_edition_position 123 # Posición Y del subtítulo "Arcade Edition"
|
||||||
title.title_c_c_position 80 # Posición Y del título principal
|
title.title_c_c_position 80 # Posición Y del título principal
|
||||||
title.bg_color 41526F # Color de fondo en la sección titulo
|
title.bg_color 41526F # Color de fondo en la sección titulo
|
||||||
|
|
||||||
# --- BACKGROUND ---
|
# --- BACKGROUND ---
|
||||||
background.attenuate_color FFFFFF00 # Color de atenuación del fondo (RGBA hexadecimal)
|
background.attenuate_color FFFFFF00 # Color de atenuación del fondo (RGBA hexadecimal)
|
||||||
|
|
||||||
# --- BALLOONS ---
|
# --- BALLOONS --- (deltaTime en segundos: vel en pixels/s, grav en pixels/s²)
|
||||||
balloon.settings[0].vel 2.75f # Velocidad inicial del globo 1
|
balloon.settings[0].vel 165.0f # Velocidad inicial del globo 1 (pixels/s)
|
||||||
balloon.settings[0].grav 0.09f # Gravedad aplicada al globo 1
|
balloon.settings[0].grav 320.0f # Gravedad aplicada al globo 1 (pixels/s²)
|
||||||
balloon.settings[1].vel 3.70f # Velocidad inicial del globo 2
|
balloon.settings[1].vel 222.0f # Velocidad inicial del globo 2 (pixels/s)
|
||||||
balloon.settings[1].grav 0.10f # Gravedad aplicada al globo 2
|
balloon.settings[1].grav 360.0f # Gravedad aplicada al globo 2 (pixels/s²)
|
||||||
balloon.settings[2].vel 4.70f # Velocidad inicial del globo 3
|
balloon.settings[2].vel 282.0f # Velocidad inicial del globo 3 (pixels/s)
|
||||||
balloon.settings[2].grav 0.10f # Gravedad aplicada al globo 3
|
balloon.settings[2].grav 360.0f # Gravedad aplicada al globo 3 (pixels/s²)
|
||||||
balloon.settings[3].vel 5.45f # Velocidad inicial del globo 4
|
balloon.settings[3].vel 327.0f # Velocidad inicial del globo 4 (pixels/s)
|
||||||
balloon.settings[3].grav 0.10f # Gravedad aplicada al globo 4
|
balloon.settings[3].grav 360.0f # Gravedad aplicada al globo 4 (pixels/s²)
|
||||||
|
|
||||||
balloon.color[0] blue # Color de creación del globo normal
|
balloon.color[0] blue # Color de creación del globo normal
|
||||||
balloon.color[1] orange # Color del globo normal
|
balloon.color[1] orange # Color del globo normal
|
||||||
@@ -93,7 +90,7 @@ service_menu.window_message.text_safety_margin 15.0f # Margen de segu
|
|||||||
service_menu.window_message.animation_duration 0.3f # Duración de animaciones de ventanas (segundos)
|
service_menu.window_message.animation_duration 0.3f # Duración de animaciones de ventanas (segundos)
|
||||||
|
|
||||||
# --- INTRO ---
|
# --- INTRO ---
|
||||||
intro.bg_color 4664BD # Color de fondo de la intro
|
intro.bg_color 41526F # Color de fondo de la intro
|
||||||
intro.card_color CBDBFC # Color de las tarjetas en la intro
|
intro.card_color CBDBFC # Color de las tarjetas en la intro
|
||||||
intro.shadow_color 00000080 # Color de la sombra de las tarjetas en la intro
|
intro.shadow_color 00000080 # Color de la sombra de las tarjetas en la intro
|
||||||
intro.text_distance_from_bottom 48 # Posición del texto desde la parte inferior
|
intro.text_distance_from_bottom 48 # Posición del texto desde la parte inferior
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
# Los pools no necesitan estar ordenados ni ser consecutivos
|
# Los pools no necesitan estar ordenados ni ser consecutivos
|
||||||
|
|
||||||
# Pool para la fase 1
|
# Pool para la fase 1
|
||||||
POOL: 0 FORMATIONS: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
POOL: 0 FORMATIONS: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||||
|
|
||||||
# Pool para la fase 2
|
# Pool para la fase 2
|
||||||
POOL: 1 FORMATIONS: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
|
POOL: 1 FORMATIONS: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
|
||||||
|
|
||||||
# Pool para la fase 3
|
# Pool para la fase 3
|
||||||
POOL: 2 FORMATIONS: 0, 1, 2, 3, 4, 55, 56, 57, 58, 59
|
POOL: 2 FORMATIONS: 0, 1, 2, 3, 4, 55, 56, 57, 58, 59
|
||||||
|
|
||||||
# Pool para la fase 4
|
# Pool para la fase 4
|
||||||
POOL: 3 FORMATIONS: 50, 51, 52, 53, 54, 5, 6, 7, 8, 9
|
POOL: 3 FORMATIONS: 50, 51, 52, 53, 54, 5, 6, 7, 8, 9
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
data/demo/demo3.bin
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -185,7 +185,7 @@
|
|||||||
# 122 z
|
# 122 z
|
||||||
5
|
5
|
||||||
# 123 {
|
# 123 {
|
||||||
3
|
7
|
||||||
# 124 |
|
# 124 |
|
||||||
2
|
2
|
||||||
# 125 }
|
# 125 }
|
||||||
|
|||||||
@@ -3,28 +3,28 @@ frame_height=10
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=orange
|
name=orange
|
||||||
speed=10
|
speed=0.1667
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1,2,3,4,5,6,7,8,9
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=blue
|
name=blue
|
||||||
speed=20
|
speed=0.3333
|
||||||
loop=0
|
loop=0
|
||||||
frames=10,11,12,13,14,15,16,17,18,19
|
frames=10,11,12,13,14,15,16,17,18,19
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=green
|
name=green
|
||||||
speed=10
|
speed=0.1667
|
||||||
loop=0
|
loop=0
|
||||||
frames=20,21,22,23,24,25,26,27,28,29
|
frames=20,21,22,23,24,25,26,27,28,29
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=red
|
name=red
|
||||||
speed=20
|
speed=0.3333
|
||||||
loop=0
|
loop=0
|
||||||
frames=30,31,32,33,34,35,36,37,38,39
|
frames=30,31,32,33,34,35,36,37,38,39
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,28 +3,28 @@ frame_height=16
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=orange
|
name=orange
|
||||||
speed=10
|
speed=0.1667
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1,2,3,4,5,6,7,8,9
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=blue
|
name=blue
|
||||||
speed=20
|
speed=0.3333
|
||||||
loop=0
|
loop=0
|
||||||
frames=10,11,12,13,14,15,16,17,18,19
|
frames=10,11,12,13,14,15,16,17,18,19
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=green
|
name=green
|
||||||
speed=10
|
speed=0.1667
|
||||||
loop=0
|
loop=0
|
||||||
frames=20,21,22,23,24,25,26,27,28,29
|
frames=20,21,22,23,24,25,26,27,28,29
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=red
|
name=red
|
||||||
speed=20
|
speed=0.3333
|
||||||
loop=0
|
loop=0
|
||||||
frames=30,31,32,33,34,35,36,37,38,39
|
frames=30,31,32,33,34,35,36,37,38,39
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,28 +3,28 @@ frame_height=26
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=orange
|
name=orange
|
||||||
speed=10
|
speed=0.1667
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1,2,3,4,5,6,7,8,9
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=blue
|
name=blue
|
||||||
speed=20
|
speed=0.3333
|
||||||
loop=0
|
loop=0
|
||||||
frames=10,11,12,13,14,15,16,17,18,19
|
frames=10,11,12,13,14,15,16,17,18,19
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=green
|
name=green
|
||||||
speed=10
|
speed=0.1667
|
||||||
loop=0
|
loop=0
|
||||||
frames=20,21,22,23,24,25,26,27,28,29
|
frames=20,21,22,23,24,25,26,27,28,29
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=red
|
name=red
|
||||||
speed=20
|
speed=0.3333
|
||||||
loop=0
|
loop=0
|
||||||
frames=30,31,32,33,34,35,36,37,38,39
|
frames=30,31,32,33,34,35,36,37,38,39
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,28 +3,28 @@ frame_height=48
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=orange
|
name=orange
|
||||||
speed=10
|
speed=0.1667
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1,2,3,4,5,6,7,8,9
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=blue
|
name=blue
|
||||||
speed=20
|
speed=0.3333
|
||||||
loop=0
|
loop=0
|
||||||
frames=10,11,12,13,14,15,16,17,18,19
|
frames=10,11,12,13,14,15,16,17,18,19
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=green
|
name=green
|
||||||
speed=10
|
speed=0.1667
|
||||||
loop=0
|
loop=0
|
||||||
frames=20,21,22,23,24,25,26,27,28,29
|
frames=20,21,22,23,24,25,26,27,28,29
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=red
|
name=red
|
||||||
speed=20
|
speed=0.3333
|
||||||
loop=0
|
loop=0
|
||||||
frames=30,31,32,33,34,35,36,37,38,39
|
frames=30,31,32,33,34,35,36,37,38,39
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,7 +3,7 @@ frame_height=10
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=-1
|
loop=-1
|
||||||
frames=0,1,2,3,4,5,6,7,8,9
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,7 +3,7 @@ frame_height=16
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=-1
|
loop=-1
|
||||||
frames=0,1,2,3,4,5,6,7,8,9
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,7 +3,7 @@ frame_height=26
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=-1
|
loop=-1
|
||||||
frames=0,1,2,3,4,5,6,7,8,9
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,7 +3,7 @@ frame_height=48
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=-1
|
loop=-1
|
||||||
frames=0,1,2,3,4,5,6,7,8,9
|
frames=0,1,2,3,4,5,6,7,8,9
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,7 +3,7 @@ frame_height=49
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=powerball
|
name=powerball
|
||||||
speed=10
|
speed=0.0167
|
||||||
loop=-1
|
loop=-1
|
||||||
frames=1
|
frames=1
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -2,43 +2,85 @@ frame_width=12
|
|||||||
frame_height=12
|
frame_height=12
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=normal_up
|
name=yellow_up
|
||||||
speed=5
|
speed=20
|
||||||
loop=0
|
loop=-1
|
||||||
frames=0,1,2
|
frames=0
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=normal_left
|
name=yellow_left
|
||||||
speed=5
|
speed=20
|
||||||
loop=0
|
loop=-1
|
||||||
frames=3,4,5,5,4,3
|
frames=1
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=normal_right
|
name=yellow_right
|
||||||
speed=5
|
speed=20
|
||||||
loop=0
|
loop=-1
|
||||||
frames=6,7,8,8,7,6
|
frames=2
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=powered_up
|
name=green_up
|
||||||
speed=5
|
speed=20
|
||||||
loop=0
|
loop=-1
|
||||||
frames=9,10,11,11,10,9
|
frames=3
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=powered_left
|
name=green_left
|
||||||
speed=5
|
speed=20
|
||||||
loop=0
|
loop=-1
|
||||||
frames=12,13,14,14,13,12
|
frames=4
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=powered_right
|
name=green_right
|
||||||
speed=5
|
speed=20
|
||||||
loop=0
|
loop=-1
|
||||||
frames=15,16,17,17,26,15
|
frames=5
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=red_up
|
||||||
|
speed=20
|
||||||
|
loop=-1
|
||||||
|
frames=6
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=red_left
|
||||||
|
speed=20
|
||||||
|
loop=-1
|
||||||
|
frames=7
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=red_right
|
||||||
|
speed=20
|
||||||
|
loop=-1
|
||||||
|
frames=8
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=purple_up
|
||||||
|
speed=20
|
||||||
|
loop=-1
|
||||||
|
frames=9
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=purple_left
|
||||||
|
speed=20
|
||||||
|
loop=-1
|
||||||
|
frames=10
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=purple_right
|
||||||
|
speed=20
|
||||||
|
loop=-1
|
||||||
|
frames=11
|
||||||
[/animation]
|
[/animation]
|
||||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.7 KiB |
9
data/gfx/game/game_grass.ani
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
frame_width=320
|
||||||
|
frame_height=10
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=default
|
||||||
|
speed=0.2
|
||||||
|
loop=0
|
||||||
|
frames=0,1,2,1
|
||||||
|
[/animation]
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -2,8 +2,15 @@ frame_width=20
|
|||||||
frame_height=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=blink
|
||||||
speed=8
|
speed=0.2
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,0,1
|
frames=0,1
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=no-blink
|
||||||
|
speed=0
|
||||||
|
loop=-1
|
||||||
|
frames=1
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -2,8 +2,15 @@ frame_width=20
|
|||||||
frame_height=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=blink
|
||||||
speed=8
|
speed=0.2
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,0,1
|
frames=0,1
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=no-blink
|
||||||
|
speed=0
|
||||||
|
loop=-1
|
||||||
|
frames=1
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,7 +3,7 @@ frame_height=39
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
speed=6
|
speed=0.1
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1,2,3,4,5,6,7,8
|
frames=0,1,2,3,4,5,6,7,8
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -2,8 +2,15 @@ frame_width=20
|
|||||||
frame_height=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=blink
|
||||||
speed=8
|
speed=0.2
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,0,1
|
frames=0,1
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=no-blink
|
||||||
|
speed=0
|
||||||
|
loop=-1
|
||||||
|
frames=1
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -2,8 +2,15 @@ frame_width=20
|
|||||||
frame_height=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=blink
|
||||||
speed=8
|
speed=0.2
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,0,1
|
frames=0,1
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=no-blink
|
||||||
|
speed=0
|
||||||
|
loop=-1
|
||||||
|
frames=1
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -2,8 +2,15 @@ frame_width=20
|
|||||||
frame_height=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=blink
|
||||||
speed=8
|
speed=0.2
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,0,1
|
frames=0,1
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=no-blink
|
||||||
|
speed=0
|
||||||
|
loop=-1
|
||||||
|
frames=1
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -2,8 +2,15 @@ frame_width=20
|
|||||||
frame_height=20
|
frame_height=20
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=blink
|
||||||
speed=8
|
speed=0.2
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,0,1
|
frames=0,1
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=no-blink
|
||||||
|
speed=0
|
||||||
|
loop=-1
|
||||||
|
frames=1
|
||||||
[/animation]
|
[/animation]
|
||||||
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 312 B |
@@ -3,133 +3,133 @@ frame_height=32
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=walk
|
name=walk
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1,2,3
|
frames=0,1,2,3
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=stand
|
name=stand
|
||||||
speed=10
|
speed=0.167
|
||||||
loop=0
|
loop=0
|
||||||
frames=4,5,6,7
|
frames=4,5,6,7
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=walk-fire-side
|
name=walk-fire-side
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=8,9,10,11
|
frames=8,9,10,11
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=walk-recoil-side
|
name=walk-recoil-side
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=12,13,14,15
|
frames=12,13,14,15
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=walk-cool-side
|
name=walk-cool-side
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=16,17,18,19
|
frames=16,17,18,19
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=stand-fire-side
|
name=stand-fire-side
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=20
|
frames=20
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=stand-recoil-side
|
name=stand-recoil-side
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=21
|
frames=21
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=stand-cool-side
|
name=stand-cool-side
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=22
|
frames=22
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=walk-fire-center
|
name=walk-fire-center
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=23,24,25,26
|
frames=23,24,25,26
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=walk-recoil-center
|
name=walk-recoil-center
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=27,28,29,30
|
frames=27,28,29,30
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=walk-cool-center
|
name=walk-cool-center
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=31,32,33,34
|
frames=31,32,33,34
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=stand-fire-center
|
name=stand-fire-center
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=35
|
frames=35
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=stand-recoil-center
|
name=stand-recoil-center
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=36
|
frames=36
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=stand-cool-center
|
name=stand-cool-center
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=37
|
frames=37
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=rolling
|
name=rolling
|
||||||
speed=10
|
speed=0.167
|
||||||
loop=0
|
loop=0
|
||||||
frames=38,39,40,41
|
frames=38,39,40,41
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=celebration
|
name=celebration
|
||||||
speed=10
|
speed=0.167
|
||||||
loop=-1
|
loop=0
|
||||||
frames=42,42,42,42,42,42,43,44,45,46,46,46,46,46,46,45,45,45,46,46,46,45,45,45,44,43,42,42,42
|
frames=42,42,42,43,44,45,44,43,42,43,44,45,44,43,42,43,44,45,44,43,42,46,46,46,46,46,46,47,48,49,50,50,50,50,50,50,49,49,49,50,50,50,49,49,49,48,47,46,46,46
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=dizzy
|
name=dizzy
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=47,48,49,50,51,52,53
|
frames=51,52,53,54,55,56,57
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=recover
|
name=recover
|
||||||
speed=3
|
speed=0.05
|
||||||
loop=-1
|
loop=-1
|
||||||
frames=54,54,54,54,55,56,57,58,58,58,59,60,61,58,59,60,61,58,59,60,61,62,62,62,62
|
frames=58,58,58,58,59,60,61,62,62,62,63,64,65,62,63,64,65,62,63,64,65,66,66,66,66
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=hello
|
name=hello
|
||||||
speed=3
|
speed=0.05
|
||||||
loop=-1
|
loop=-1
|
||||||
frames=63,64,65,66,67,68,69,70,71,72,73,73,73,73,73,73,73,73,73,73,73,73,73,74,75,76,77,78,79,80,81,82,82,81,80,79,79,80,81,82,82,81,80,79,79,80,81,82,82,81,80,79,79,80,81,82,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63
|
frames=67,68,69,70,71,72,73,74,75,76,77,77,77,77,77,77,77,77,77,77,77,77,77,78,79,80,81,82,83,84,85,86,86,85,84,83,83,84,85,86,86,85,84,83,83,84,85,86,86,85,84,83,83,84,85,86,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67
|
||||||
[/animation]
|
[/animation]
|
||||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
135
data/gfx/player/player2.ani
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
frame_width=32
|
||||||
|
frame_height=32
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=walk
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=0,1,2,3
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=stand
|
||||||
|
speed=0.167
|
||||||
|
loop=0
|
||||||
|
frames=4,5,6,7
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=walk-fire-side
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=8,9,10,11
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=walk-recoil-side
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=12,13,14,15
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=walk-cool-side
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=16,17,18,19
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=stand-fire-side
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=20
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=stand-recoil-side
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=21
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=stand-cool-side
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=22
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=walk-fire-center
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=23,24,25,26
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=walk-recoil-center
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=27,28,29,30
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=walk-cool-center
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=31,32,33,34
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=stand-fire-center
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=35
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=stand-recoil-center
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=36
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=stand-cool-center
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=37
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=rolling
|
||||||
|
speed=0.167
|
||||||
|
loop=0
|
||||||
|
frames=38,39,40,41
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=celebration
|
||||||
|
speed=0.167
|
||||||
|
loop=0
|
||||||
|
frames=47,47,47,47,47,47,48,49,50,51,51,51,51,51,51,50,50,50,51,51,51,50,50,50,49,48,47,47,47,42,42,42,43,44,45,46,45,46,45,46,45,46,45,46,45,46,45,44,43,42
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=dizzy
|
||||||
|
speed=0.0833
|
||||||
|
loop=0
|
||||||
|
frames=52,53,54,55,56,57,58
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=recover
|
||||||
|
speed=0.05
|
||||||
|
loop=-1
|
||||||
|
frames=59,59,59,59,60,61,62,63,63,63,64,65,66,63,64,65,66,63,64,65,66,67,67,67,67
|
||||||
|
[/animation]
|
||||||
|
|
||||||
|
[animation]
|
||||||
|
name=hello
|
||||||
|
speed=0.05
|
||||||
|
loop=-1
|
||||||
|
frames=68,69,70,71,72,73,74,75,76,77,78,78,78,78,78,78,78,78,78,78,78,78,78,79,80,81,82,83,84,85,86,87,87,86,85,84,84,85,86,87,87,86,85,84,84,85,86,87,87,86,85,84,84,85,86,87,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68
|
||||||
|
[/animation]
|
||||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -3,7 +3,7 @@ frame_height=44
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
speed=5
|
speed=0.0833
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1,2,3
|
frames=0,1,2,3
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,14 +3,14 @@ frame_height=32
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=fly
|
name=fly
|
||||||
speed=2
|
speed=0.0333
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1
|
frames=0,1
|
||||||
[/animation]
|
[/animation]
|
||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=hit
|
name=hit
|
||||||
speed=2
|
speed=0.0333
|
||||||
loop=0
|
loop=0
|
||||||
frames=2,3
|
frames=2,3
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -3,7 +3,7 @@ frame_height=16
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
speed=8
|
speed=0.1333
|
||||||
loop=-1
|
loop=-1
|
||||||
frames=0,1,2,3,4,5,6
|
frames=0,1,2,3,4,5,6
|
||||||
[/animation]
|
[/animation]
|
||||||
@@ -21,12 +21,13 @@
|
|||||||
"[GAME_TEXT] 2": "Queden ",
|
"[GAME_TEXT] 2": "Queden ",
|
||||||
"[GAME_TEXT] 2A": " fases mes!",
|
"[GAME_TEXT] 2A": " fases mes!",
|
||||||
"[GAME_TEXT] 3": "Ultima fase!",
|
"[GAME_TEXT] 3": "Ultima fase!",
|
||||||
"[GAME_TEXT] 4": "SuperPoder!",
|
"[GAME_TEXT] 4": "Automatic!",
|
||||||
"[GAME_TEXT] 5": "+1 Colp",
|
"[GAME_TEXT] 5": "+1 Colp",
|
||||||
"[GAME_TEXT] 6": "Temps!",
|
"[GAME_TEXT] 6": "Temps!",
|
||||||
"[GAME_TEXT] 7": "Endavant!",
|
"[GAME_TEXT] 7": "Endavant!",
|
||||||
"[GAME_TEXT] 8": "1.000.000 de punts!",
|
"[GAME_TEXT] 8": "1.000.000 de punts!",
|
||||||
"[GAME_TEXT] THANK_YOU": "Gracies!",
|
"[GAME_TEXT] THANK_YOU": "Gracies!",
|
||||||
|
"[GAME_TEXT] NEW_RECORD": "Nou record!",
|
||||||
|
|
||||||
"[HIGHSCORE_TABLE] CAPTION": "Millors puntuacions",
|
"[HIGHSCORE_TABLE] CAPTION": "Millors puntuacions",
|
||||||
|
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
"[NOTIFICATIONS] DISCONNECTED": "desconectat",
|
"[NOTIFICATIONS] DISCONNECTED": "desconectat",
|
||||||
|
|
||||||
"[RESOURCE] LOADING": "Carregant",
|
"[RESOURCE] LOADING": "Carregant",
|
||||||
|
"[RESOURCE] PRESS_TO_CONTINUE": "Prem una tecla per continuar",
|
||||||
|
|
||||||
"[SERVICE_MENU] TITLE": "Menu de servei",
|
"[SERVICE_MENU] TITLE": "Menu de servei",
|
||||||
"[SERVICE_MENU] RESET": "Reiniciar",
|
"[SERVICE_MENU] RESET": "Reiniciar",
|
||||||
@@ -78,9 +80,13 @@
|
|||||||
"[SERVICE_MENU] SHUTDOWN": "Apagar el sistema",
|
"[SERVICE_MENU] SHUTDOWN": "Apagar el sistema",
|
||||||
"[SERVICE_MENU] FULLSCREEN": "Pantalla completa",
|
"[SERVICE_MENU] FULLSCREEN": "Pantalla completa",
|
||||||
"[SERVICE_MENU] WINDOW_SIZE": "Tamany de la finestra",
|
"[SERVICE_MENU] WINDOW_SIZE": "Tamany de la finestra",
|
||||||
"[SERVICE_MENU] SHADERS": "Filtre",
|
"[SERVICE_MENU] SHADER": "Shader",
|
||||||
|
"[SERVICE_MENU] SHADER_DISABLED": "Desactivat",
|
||||||
|
"[SERVICE_MENU] SHADER_PRESET": "Preset",
|
||||||
|
"[SERVICE_MENU] SUPERSAMPLING": "Supermostreig",
|
||||||
"[SERVICE_MENU] VSYNC": "Sincronisme vertical",
|
"[SERVICE_MENU] VSYNC": "Sincronisme vertical",
|
||||||
"[SERVICE_MENU] INTEGER_SCALE": "Escalat sencer",
|
"[SERVICE_MENU] INTEGER_SCALE": "Escalat sencer",
|
||||||
|
"[SERVICE_MENU] FILTER": "Filtre",
|
||||||
"[SERVICE_MENU] MAIN_VOLUME": "Volumen general",
|
"[SERVICE_MENU] MAIN_VOLUME": "Volumen general",
|
||||||
"[SERVICE_MENU] MUSIC_VOLUME": "Volumen de la musica",
|
"[SERVICE_MENU] MUSIC_VOLUME": "Volumen de la musica",
|
||||||
"[SERVICE_MENU] SFX_VOLUME": "Volumen dels sons",
|
"[SERVICE_MENU] SFX_VOLUME": "Volumen dels sons",
|
||||||
|
|||||||
@@ -20,12 +20,13 @@
|
|||||||
"[GAME_TEXT] 2": "",
|
"[GAME_TEXT] 2": "",
|
||||||
"[GAME_TEXT] 2A": " stages left!",
|
"[GAME_TEXT] 2A": " stages left!",
|
||||||
"[GAME_TEXT] 3": "Last stage!",
|
"[GAME_TEXT] 3": "Last stage!",
|
||||||
"[GAME_TEXT] 4": "PowerUp",
|
"[GAME_TEXT] 4": "AutoFire!",
|
||||||
"[GAME_TEXT] 5": "+1 Hit",
|
"[GAME_TEXT] 5": "+1 Hit",
|
||||||
"[GAME_TEXT] 6": "Stop!",
|
"[GAME_TEXT] 6": "Stop!",
|
||||||
"[GAME_TEXT] 7": "Get Ready!",
|
"[GAME_TEXT] 7": "Get Ready!",
|
||||||
"[GAME_TEXT] 8": "1,000,000 points!",
|
"[GAME_TEXT] 8": "1,000,000 points!",
|
||||||
"[GAME_TEXT] THANK_YOU": "Thank you!",
|
"[GAME_TEXT] THANK_YOU": "Thank you!",
|
||||||
|
"[GAME_TEXT] NEW_RECORD": "New record!",
|
||||||
|
|
||||||
"[HIGHSCORE_TABLE] CAPTION": "Best scores",
|
"[HIGHSCORE_TABLE] CAPTION": "Best scores",
|
||||||
|
|
||||||
@@ -70,6 +71,7 @@
|
|||||||
"[NOTIFICATIONS] DISCONNECTED": "disconnected",
|
"[NOTIFICATIONS] DISCONNECTED": "disconnected",
|
||||||
|
|
||||||
"[RESOURCE] LOADING": "Loading",
|
"[RESOURCE] LOADING": "Loading",
|
||||||
|
"[RESOURCE] PRESS_TO_CONTINUE": "Press any key to continue",
|
||||||
|
|
||||||
"[SERVICE_MENU] TITLE": "Service Menu",
|
"[SERVICE_MENU] TITLE": "Service Menu",
|
||||||
"[SERVICE_MENU] RESET": "Reset",
|
"[SERVICE_MENU] RESET": "Reset",
|
||||||
@@ -77,9 +79,13 @@
|
|||||||
"[SERVICE_MENU] SHUTDOWN": "Shutdown System",
|
"[SERVICE_MENU] SHUTDOWN": "Shutdown System",
|
||||||
"[SERVICE_MENU] FULLSCREEN": "Fullscreen",
|
"[SERVICE_MENU] FULLSCREEN": "Fullscreen",
|
||||||
"[SERVICE_MENU] WINDOW_SIZE": "Window Zoom",
|
"[SERVICE_MENU] WINDOW_SIZE": "Window Zoom",
|
||||||
"[SERVICE_MENU] SHADERS": "Shaders",
|
"[SERVICE_MENU] SHADER": "Shader",
|
||||||
|
"[SERVICE_MENU] SHADER_DISABLED": "Disabled",
|
||||||
|
"[SERVICE_MENU] SHADER_PRESET": "Preset",
|
||||||
|
"[SERVICE_MENU] SUPERSAMPLING": "Supersampling",
|
||||||
"[SERVICE_MENU] VSYNC": "V-Sync",
|
"[SERVICE_MENU] VSYNC": "V-Sync",
|
||||||
"[SERVICE_MENU] INTEGER_SCALE": "Integer Scale",
|
"[SERVICE_MENU] INTEGER_SCALE": "Integer Scale",
|
||||||
|
"[SERVICE_MENU] FILTER": "Filter",
|
||||||
"[SERVICE_MENU] MAIN_VOLUME": "Main Volume",
|
"[SERVICE_MENU] MAIN_VOLUME": "Main Volume",
|
||||||
"[SERVICE_MENU] MUSIC_VOLUME": "Music Volume",
|
"[SERVICE_MENU] MUSIC_VOLUME": "Music Volume",
|
||||||
"[SERVICE_MENU] SFX_VOLUME": "Sound Volume",
|
"[SERVICE_MENU] SFX_VOLUME": "Sound Volume",
|
||||||
|
|||||||
@@ -20,12 +20,13 @@
|
|||||||
"[GAME_TEXT] 2": "!Quedan ",
|
"[GAME_TEXT] 2": "!Quedan ",
|
||||||
"[GAME_TEXT] 2A": " fases!",
|
"[GAME_TEXT] 2A": " fases!",
|
||||||
"[GAME_TEXT] 3": "Ultima fase!",
|
"[GAME_TEXT] 3": "Ultima fase!",
|
||||||
"[GAME_TEXT] 4": "Potenciador",
|
"[GAME_TEXT] 4": "Automatico!",
|
||||||
"[GAME_TEXT] 5": "+1 Golpe",
|
"[GAME_TEXT] 5": "+1 Golpe",
|
||||||
"[GAME_TEXT] 6": "Tiempo!",
|
"[GAME_TEXT] 6": "Tiempo!",
|
||||||
"[GAME_TEXT] 7": "Adelante!",
|
"[GAME_TEXT] 7": "Adelante!",
|
||||||
"[GAME_TEXT] 8": "1.000.000 de puntos!",
|
"[GAME_TEXT] 8": "1.000.000 de puntos!",
|
||||||
"[GAME_TEXT] THANK_YOU": "Gracias!",
|
"[GAME_TEXT] THANK_YOU": "Gracias!",
|
||||||
|
"[GAME_TEXT] NEW_RECORD": "Nuevo record!",
|
||||||
|
|
||||||
"[HIGHSCORE_TABLE] CAPTION": "Mejores puntuaciones",
|
"[HIGHSCORE_TABLE] CAPTION": "Mejores puntuaciones",
|
||||||
|
|
||||||
@@ -70,6 +71,7 @@
|
|||||||
"[NOTIFICATIONS] DISCONNECTED": "desconectado",
|
"[NOTIFICATIONS] DISCONNECTED": "desconectado",
|
||||||
|
|
||||||
"[RESOURCE] LOADING": "Cargando",
|
"[RESOURCE] LOADING": "Cargando",
|
||||||
|
"[RESOURCE] PRESS_TO_CONTINUE": "Pulsa una tecla para continuar",
|
||||||
|
|
||||||
"[SERVICE_MENU] TITLE": "Menu de servicio",
|
"[SERVICE_MENU] TITLE": "Menu de servicio",
|
||||||
"[SERVICE_MENU] RESET": "Reiniciar",
|
"[SERVICE_MENU] RESET": "Reiniciar",
|
||||||
@@ -77,9 +79,13 @@
|
|||||||
"[SERVICE_MENU] SHUTDOWN": "Apagar el sistema",
|
"[SERVICE_MENU] SHUTDOWN": "Apagar el sistema",
|
||||||
"[SERVICE_MENU] FULLSCREEN": "Pantalla completa",
|
"[SERVICE_MENU] FULLSCREEN": "Pantalla completa",
|
||||||
"[SERVICE_MENU] WINDOW_SIZE": "Zoom de ventana",
|
"[SERVICE_MENU] WINDOW_SIZE": "Zoom de ventana",
|
||||||
"[SERVICE_MENU] SHADERS": "Filtro grafico",
|
"[SERVICE_MENU] SHADER": "Shader",
|
||||||
|
"[SERVICE_MENU] SHADER_DISABLED": "Desactivado",
|
||||||
|
"[SERVICE_MENU] SHADER_PRESET": "Preset",
|
||||||
|
"[SERVICE_MENU] SUPERSAMPLING": "Supersampling",
|
||||||
"[SERVICE_MENU] VSYNC": "Sincronismo vertical",
|
"[SERVICE_MENU] VSYNC": "Sincronismo vertical",
|
||||||
"[SERVICE_MENU] INTEGER_SCALE": "Escalado proporcional",
|
"[SERVICE_MENU] INTEGER_SCALE": "Escalado proporcional",
|
||||||
|
"[SERVICE_MENU] FILTER": "Filtro",
|
||||||
"[SERVICE_MENU] MAIN_VOLUME": "Volumen general",
|
"[SERVICE_MENU] MAIN_VOLUME": "Volumen general",
|
||||||
"[SERVICE_MENU] MUSIC_VOLUME": "Volumen de la musica",
|
"[SERVICE_MENU] MUSIC_VOLUME": "Volumen de la musica",
|
||||||
"[SERVICE_MENU] SFX_VOLUME": "Volumen de los efectos",
|
"[SERVICE_MENU] SFX_VOLUME": "Volumen de los efectos",
|
||||||
|
|||||||
BIN
data/music/congratulations.ogg
Normal file
@@ -1,234 +0,0 @@
|
|||||||
/*
|
|
||||||
crt-pi - A Raspberry Pi friendly CRT shader.
|
|
||||||
|
|
||||||
Copyright (C) 2015-2016 davej
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the Free
|
|
||||||
Software Foundation; either version 2 of the License, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
|
|
||||||
This shader is designed to work well on Raspberry Pi GPUs (i.e. 1080P @ 60Hz on a game with a 4:3 aspect ratio). It pushes the Pi's GPU hard and enabling some features will slow it down so that it is no longer able to match 1080P @ 60Hz. You will need to overclock your Pi to the fastest setting in raspi-config to get the best results from this shader: 'Pi2' for Pi2 and 'Turbo' for original Pi and Pi Zero. Note: Pi2s are slower at running the shader than other Pis, this seems to be down to Pi2s lower maximum memory speed. Pi2s don't quite manage 1080P @ 60Hz - they drop about 1 in 1000 frames. You probably won't notice this, but if you do, try enabling FAKE_GAMMA.
|
|
||||||
|
|
||||||
SCANLINES enables scanlines. You'll almost certainly want to use it with MULTISAMPLE to reduce moire effects. SCANLINE_WEIGHT defines how wide scanlines are (it is an inverse value so a higher number = thinner lines). SCANLINE_GAP_BRIGHTNESS defines how dark the gaps between the scan lines are. Darker gaps between scan lines make moire effects more likely.
|
|
||||||
|
|
||||||
GAMMA enables gamma correction using the values in INPUT_GAMMA and OUTPUT_GAMMA. FAKE_GAMMA causes it to ignore the values in INPUT_GAMMA and OUTPUT_GAMMA and approximate gamma correction in a way which is faster than true gamma whilst still looking better than having none. You must have GAMMA defined to enable FAKE_GAMMA.
|
|
||||||
|
|
||||||
CURVATURE distorts the screen by CURVATURE_X and CURVATURE_Y. Curvature slows things down a lot.
|
|
||||||
|
|
||||||
By default the shader uses linear blending horizontally. If you find this too blury, enable SHARPER.
|
|
||||||
|
|
||||||
BLOOM_FACTOR controls the increase in width for bright scanlines.
|
|
||||||
|
|
||||||
MASK_TYPE defines what, if any, shadow mask to use. MASK_BRIGHTNESS defines how much the mask type darkens the screen.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma parameter CURVATURE_X "Screen curvature - horizontal" 0.10 0.0 1.0 0.01
|
|
||||||
#pragma parameter CURVATURE_Y "Screen curvature - vertical" 0.15 0.0 1.0 0.01
|
|
||||||
#pragma parameter MASK_BRIGHTNESS "Mask brightness" 0.70 0.0 1.0 0.01
|
|
||||||
#pragma parameter SCANLINE_WEIGHT "Scanline weight" 6.0 0.0 15.0 0.1
|
|
||||||
#pragma parameter SCANLINE_GAP_BRIGHTNESS "Scanline gap brightness" 0.12 0.0 1.0 0.01
|
|
||||||
#pragma parameter BLOOM_FACTOR "Bloom factor" 1.5 0.0 5.0 0.01
|
|
||||||
#pragma parameter INPUT_GAMMA "Input gamma" 2.4 0.0 5.0 0.01
|
|
||||||
#pragma parameter OUTPUT_GAMMA "Output gamma" 2.2 0.0 5.0 0.01
|
|
||||||
|
|
||||||
// Haven't put these as parameters as it would slow the code down.
|
|
||||||
#define SCANLINES
|
|
||||||
#define MULTISAMPLE
|
|
||||||
#define GAMMA
|
|
||||||
//#define FAKE_GAMMA
|
|
||||||
//#define CURVATURE
|
|
||||||
//#define SHARPER
|
|
||||||
// MASK_TYPE: 0 = none, 1 = green/magenta, 2 = trinitron(ish)
|
|
||||||
#define MASK_TYPE 2
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef GL_ES
|
|
||||||
#define COMPAT_PRECISION mediump
|
|
||||||
precision mediump float;
|
|
||||||
#else
|
|
||||||
#define COMPAT_PRECISION
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PARAMETER_UNIFORM
|
|
||||||
uniform COMPAT_PRECISION float CURVATURE_X;
|
|
||||||
uniform COMPAT_PRECISION float CURVATURE_Y;
|
|
||||||
uniform COMPAT_PRECISION float MASK_BRIGHTNESS;
|
|
||||||
uniform COMPAT_PRECISION float SCANLINE_WEIGHT;
|
|
||||||
uniform COMPAT_PRECISION float SCANLINE_GAP_BRIGHTNESS;
|
|
||||||
uniform COMPAT_PRECISION float BLOOM_FACTOR;
|
|
||||||
uniform COMPAT_PRECISION float INPUT_GAMMA;
|
|
||||||
uniform COMPAT_PRECISION float OUTPUT_GAMMA;
|
|
||||||
#else
|
|
||||||
#define CURVATURE_X 0.05
|
|
||||||
#define CURVATURE_Y 0.1
|
|
||||||
#define MASK_BRIGHTNESS 0.80
|
|
||||||
#define SCANLINE_WEIGHT 6.0
|
|
||||||
#define SCANLINE_GAP_BRIGHTNESS 0.12
|
|
||||||
#define BLOOM_FACTOR 3.5
|
|
||||||
#define INPUT_GAMMA 2.4
|
|
||||||
#define OUTPUT_GAMMA 2.2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* COMPATIBILITY
|
|
||||||
- GLSL compilers
|
|
||||||
*/
|
|
||||||
|
|
||||||
//uniform vec2 TextureSize;
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
varying vec2 screenScale;
|
|
||||||
#endif
|
|
||||||
varying vec2 TEX0;
|
|
||||||
varying float filterWidth;
|
|
||||||
|
|
||||||
#if defined(VERTEX)
|
|
||||||
//uniform mat4 MVPMatrix;
|
|
||||||
//attribute vec4 VertexCoord;
|
|
||||||
//attribute vec2 TexCoord;
|
|
||||||
//uniform vec2 InputSize;
|
|
||||||
//uniform vec2 OutputSize;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
screenScale = vec2(1.0, 1.0); //TextureSize / InputSize;
|
|
||||||
#endif
|
|
||||||
filterWidth = (768.0 / 240.0) / 3.0;
|
|
||||||
TEX0 = vec2(gl_MultiTexCoord0.x, 1.0-gl_MultiTexCoord0.y)*1.0001;
|
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
|
||||||
}
|
|
||||||
#elif defined(FRAGMENT)
|
|
||||||
|
|
||||||
uniform sampler2D Texture;
|
|
||||||
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
vec2 Distort(vec2 coord)
|
|
||||||
{
|
|
||||||
vec2 CURVATURE_DISTORTION = vec2(CURVATURE_X, CURVATURE_Y);
|
|
||||||
// Barrel distortion shrinks the display area a bit, this will allow us to counteract that.
|
|
||||||
vec2 barrelScale = 1.0 - (0.23 * CURVATURE_DISTORTION);
|
|
||||||
coord *= screenScale;
|
|
||||||
coord -= vec2(0.5);
|
|
||||||
float rsq = coord.x * coord.x + coord.y * coord.y;
|
|
||||||
coord += coord * (CURVATURE_DISTORTION * rsq);
|
|
||||||
coord *= barrelScale;
|
|
||||||
if (abs(coord.x) >= 0.5 || abs(coord.y) >= 0.5)
|
|
||||||
coord = vec2(-1.0); // If out of bounds, return an invalid value.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
coord += vec2(0.5);
|
|
||||||
coord /= screenScale;
|
|
||||||
}
|
|
||||||
|
|
||||||
return coord;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
float CalcScanLineWeight(float dist)
|
|
||||||
{
|
|
||||||
return max(1.0-dist*dist*SCANLINE_WEIGHT, SCANLINE_GAP_BRIGHTNESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
float CalcScanLine(float dy)
|
|
||||||
{
|
|
||||||
float scanLineWeight = CalcScanLineWeight(dy);
|
|
||||||
#if defined(MULTISAMPLE)
|
|
||||||
scanLineWeight += CalcScanLineWeight(dy-filterWidth);
|
|
||||||
scanLineWeight += CalcScanLineWeight(dy+filterWidth);
|
|
||||||
scanLineWeight *= 0.3333333;
|
|
||||||
#endif
|
|
||||||
return scanLineWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec2 TextureSize = vec2(320.0, 240.0);
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
vec2 texcoord = Distort(TEX0);
|
|
||||||
if (texcoord.x < 0.0)
|
|
||||||
gl_FragColor = vec4(0.0);
|
|
||||||
else
|
|
||||||
#else
|
|
||||||
vec2 texcoord = TEX0;
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
vec2 texcoordInPixels = texcoord * TextureSize;
|
|
||||||
#if defined(SHARPER)
|
|
||||||
vec2 tempCoord = floor(texcoordInPixels) + 0.5;
|
|
||||||
vec2 coord = tempCoord / TextureSize;
|
|
||||||
vec2 deltas = texcoordInPixels - tempCoord;
|
|
||||||
float scanLineWeight = CalcScanLine(deltas.y);
|
|
||||||
vec2 signs = sign(deltas);
|
|
||||||
deltas.x *= 2.0;
|
|
||||||
deltas = deltas * deltas;
|
|
||||||
deltas.y = deltas.y * deltas.y;
|
|
||||||
deltas.x *= 0.5;
|
|
||||||
deltas.y *= 8.0;
|
|
||||||
deltas /= TextureSize;
|
|
||||||
deltas *= signs;
|
|
||||||
vec2 tc = coord + deltas;
|
|
||||||
#else
|
|
||||||
float tempY = floor(texcoordInPixels.y) + 0.5;
|
|
||||||
float yCoord = tempY / TextureSize.y;
|
|
||||||
float dy = texcoordInPixels.y - tempY;
|
|
||||||
float scanLineWeight = CalcScanLine(dy);
|
|
||||||
float signY = sign(dy);
|
|
||||||
dy = dy * dy;
|
|
||||||
dy = dy * dy;
|
|
||||||
dy *= 8.0;
|
|
||||||
dy /= TextureSize.y;
|
|
||||||
dy *= signY;
|
|
||||||
vec2 tc = vec2(texcoord.x, yCoord + dy);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
vec3 colour = texture2D(Texture, tc).rgb;
|
|
||||||
|
|
||||||
#if defined(SCANLINES)
|
|
||||||
#if defined(GAMMA)
|
|
||||||
#if defined(FAKE_GAMMA)
|
|
||||||
colour = colour * colour;
|
|
||||||
#else
|
|
||||||
colour = pow(colour, vec3(INPUT_GAMMA));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
scanLineWeight *= BLOOM_FACTOR;
|
|
||||||
colour *= scanLineWeight;
|
|
||||||
|
|
||||||
#if defined(GAMMA)
|
|
||||||
#if defined(FAKE_GAMMA)
|
|
||||||
colour = sqrt(colour);
|
|
||||||
#else
|
|
||||||
colour = pow(colour, vec3(1.0/OUTPUT_GAMMA));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#if MASK_TYPE == 0
|
|
||||||
gl_FragColor = vec4(colour, 1.0);
|
|
||||||
#else
|
|
||||||
#if MASK_TYPE == 1
|
|
||||||
float whichMask = fract((gl_FragCoord.x*1.0001) * 0.5);
|
|
||||||
vec3 mask;
|
|
||||||
if (whichMask < 0.5)
|
|
||||||
mask = vec3(MASK_BRIGHTNESS, 1.0, MASK_BRIGHTNESS);
|
|
||||||
else
|
|
||||||
mask = vec3(1.0, MASK_BRIGHTNESS, 1.0);
|
|
||||||
#elif MASK_TYPE == 2
|
|
||||||
float whichMask = fract((gl_FragCoord.x*1.0001) * 0.3333333);
|
|
||||||
vec3 mask = vec3(MASK_BRIGHTNESS, MASK_BRIGHTNESS, MASK_BRIGHTNESS);
|
|
||||||
if (whichMask < 0.3333333)
|
|
||||||
mask.x = 1.0;
|
|
||||||
else if (whichMask < 0.6666666)
|
|
||||||
mask.y = 1.0;
|
|
||||||
else
|
|
||||||
mask.z = 1.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gl_FragColor = vec4(colour * mask, 1.0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1,185 +0,0 @@
|
|||||||
/*
|
|
||||||
crt-pi - A Raspberry Pi friendly CRT shader.
|
|
||||||
|
|
||||||
Metal Shading Language version converted from GLSL
|
|
||||||
Copyright (C) 2015-2016 davej
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the Free
|
|
||||||
Software Foundation; either version 2 of the License, or (at your option)
|
|
||||||
any later version.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
using namespace metal;
|
|
||||||
|
|
||||||
// Haven't put these as parameters as it would slow the code down.
|
|
||||||
#define SCANLINES
|
|
||||||
#define MULTISAMPLE
|
|
||||||
#define GAMMA
|
|
||||||
//#define FAKE_GAMMA
|
|
||||||
//#define CURVATURE
|
|
||||||
//#define SHARPER
|
|
||||||
// MASK_TYPE: 0 = none, 1 = green/magenta, 2 = trinitron(ish)
|
|
||||||
#define MASK_TYPE 2
|
|
||||||
|
|
||||||
// Constants
|
|
||||||
#define CURVATURE_X 0.05
|
|
||||||
#define CURVATURE_Y 0.1
|
|
||||||
#define MASK_BRIGHTNESS 0.80
|
|
||||||
#define SCANLINE_WEIGHT 6.0
|
|
||||||
#define SCANLINE_GAP_BRIGHTNESS 0.12
|
|
||||||
#define BLOOM_FACTOR 3.5
|
|
||||||
#define INPUT_GAMMA 2.4
|
|
||||||
#define OUTPUT_GAMMA 2.2
|
|
||||||
|
|
||||||
struct VertexIn {
|
|
||||||
float4 position [[attribute(0)]];
|
|
||||||
float2 texcoord [[attribute(1)]];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct VertexOut {
|
|
||||||
float4 position [[position]];
|
|
||||||
float2 TEX0;
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
float2 screenScale;
|
|
||||||
#endif
|
|
||||||
float filterWidth;
|
|
||||||
};
|
|
||||||
|
|
||||||
vertex VertexOut vertex_main(VertexIn in [[stage_in]]) {
|
|
||||||
VertexOut out;
|
|
||||||
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
out.screenScale = float2(1.0, 1.0);
|
|
||||||
#endif
|
|
||||||
out.filterWidth = (768.0 / 240.0) / 3.0;
|
|
||||||
out.TEX0 = float2(in.texcoord.x, 1.0 - in.texcoord.y) * 1.0001;
|
|
||||||
out.position = in.position;
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
float2 Distort(float2 coord, float2 screenScale) {
|
|
||||||
float2 CURVATURE_DISTORTION = float2(CURVATURE_X, CURVATURE_Y);
|
|
||||||
// Barrel distortion shrinks the display area a bit, this will allow us to counteract that.
|
|
||||||
float2 barrelScale = 1.0 - (0.23 * CURVATURE_DISTORTION);
|
|
||||||
coord *= screenScale;
|
|
||||||
coord -= float2(0.5);
|
|
||||||
float rsq = coord.x * coord.x + coord.y * coord.y;
|
|
||||||
coord += coord * (CURVATURE_DISTORTION * rsq);
|
|
||||||
coord *= barrelScale;
|
|
||||||
if (abs(coord.x) >= 0.5 || abs(coord.y) >= 0.5)
|
|
||||||
coord = float2(-1.0); // If out of bounds, return an invalid value.
|
|
||||||
else {
|
|
||||||
coord += float2(0.5);
|
|
||||||
coord /= screenScale;
|
|
||||||
}
|
|
||||||
|
|
||||||
return coord;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
float CalcScanLineWeight(float dist) {
|
|
||||||
return max(1.0 - dist * dist * SCANLINE_WEIGHT, SCANLINE_GAP_BRIGHTNESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
float CalcScanLine(float dy, float filterWidth) {
|
|
||||||
float scanLineWeight = CalcScanLineWeight(dy);
|
|
||||||
#if defined(MULTISAMPLE)
|
|
||||||
scanLineWeight += CalcScanLineWeight(dy - filterWidth);
|
|
||||||
scanLineWeight += CalcScanLineWeight(dy + filterWidth);
|
|
||||||
scanLineWeight *= 0.3333333;
|
|
||||||
#endif
|
|
||||||
return scanLineWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment float4 fragment_main(VertexOut in [[stage_in]],
|
|
||||||
texture2d<float> Texture [[texture(0)]],
|
|
||||||
sampler textureSampler [[sampler(0)]]) {
|
|
||||||
float2 TextureSize = float2(320.0, 240.0);
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
float2 texcoord = Distort(in.TEX0, in.screenScale);
|
|
||||||
if (texcoord.x < 0.0)
|
|
||||||
return float4(0.0);
|
|
||||||
else
|
|
||||||
#else
|
|
||||||
float2 texcoord = in.TEX0;
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
float2 texcoordInPixels = texcoord * TextureSize;
|
|
||||||
#if defined(SHARPER)
|
|
||||||
float2 tempCoord = floor(texcoordInPixels) + 0.5;
|
|
||||||
float2 coord = tempCoord / TextureSize;
|
|
||||||
float2 deltas = texcoordInPixels - tempCoord;
|
|
||||||
float scanLineWeight = CalcScanLine(deltas.y, in.filterWidth);
|
|
||||||
float2 signs = sign(deltas);
|
|
||||||
deltas.x *= 2.0;
|
|
||||||
deltas = deltas * deltas;
|
|
||||||
deltas.y = deltas.y * deltas.y;
|
|
||||||
deltas.x *= 0.5;
|
|
||||||
deltas.y *= 8.0;
|
|
||||||
deltas /= TextureSize;
|
|
||||||
deltas *= signs;
|
|
||||||
float2 tc = coord + deltas;
|
|
||||||
#else
|
|
||||||
float tempY = floor(texcoordInPixels.y) + 0.5;
|
|
||||||
float yCoord = tempY / TextureSize.y;
|
|
||||||
float dy = texcoordInPixels.y - tempY;
|
|
||||||
float scanLineWeight = CalcScanLine(dy, in.filterWidth);
|
|
||||||
float signY = sign(dy);
|
|
||||||
dy = dy * dy;
|
|
||||||
dy = dy * dy;
|
|
||||||
dy *= 8.0;
|
|
||||||
dy /= TextureSize.y;
|
|
||||||
dy *= signY;
|
|
||||||
float2 tc = float2(texcoord.x, yCoord + dy);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
float3 colour = Texture.sample(textureSampler, tc).rgb;
|
|
||||||
|
|
||||||
#if defined(SCANLINES)
|
|
||||||
#if defined(GAMMA)
|
|
||||||
#if defined(FAKE_GAMMA)
|
|
||||||
colour = colour * colour;
|
|
||||||
#else
|
|
||||||
colour = pow(colour, float3(INPUT_GAMMA));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
scanLineWeight *= BLOOM_FACTOR;
|
|
||||||
colour *= scanLineWeight;
|
|
||||||
|
|
||||||
#if defined(GAMMA)
|
|
||||||
#if defined(FAKE_GAMMA)
|
|
||||||
colour = sqrt(colour);
|
|
||||||
#else
|
|
||||||
colour = pow(colour, float3(1.0/OUTPUT_GAMMA));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#if MASK_TYPE == 0
|
|
||||||
return float4(colour, 1.0);
|
|
||||||
#else
|
|
||||||
#if MASK_TYPE == 1
|
|
||||||
float whichMask = fract((in.position.x * 1.0001) * 0.5);
|
|
||||||
float3 mask;
|
|
||||||
if (whichMask < 0.5)
|
|
||||||
mask = float3(MASK_BRIGHTNESS, 1.0, MASK_BRIGHTNESS);
|
|
||||||
else
|
|
||||||
mask = float3(1.0, MASK_BRIGHTNESS, 1.0);
|
|
||||||
#elif MASK_TYPE == 2
|
|
||||||
float whichMask = fract((in.position.x * 1.0001) * 0.3333333);
|
|
||||||
float3 mask = float3(MASK_BRIGHTNESS, MASK_BRIGHTNESS, MASK_BRIGHTNESS);
|
|
||||||
if (whichMask < 0.3333333)
|
|
||||||
mask.x = 1.0;
|
|
||||||
else if (whichMask < 0.6666666)
|
|
||||||
mask.y = 1.0;
|
|
||||||
else
|
|
||||||
mask.z = 1.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return float4(colour * mask, 1.0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
/*
|
|
||||||
crt-pi - A Raspberry Pi friendly CRT shader.
|
|
||||||
|
|
||||||
Copyright (C) 2015-2016 davej
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the Free
|
|
||||||
Software Foundation; either version 2 of the License, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
|
|
||||||
This shader is designed to work well on Raspberry Pi GPUs (i.e. 1080P @ 60Hz on a game with a 4:3 aspect ratio). It pushes the Pi's GPU hard and enabling some features will slow it down so that it is no longer able to match 1080P @ 60Hz. You will need to overclock your Pi to the fastest setting in raspi-config to get the best results from this shader: 'Pi2' for Pi2 and 'Turbo' for original Pi and Pi Zero. Note: Pi2s are slower at running the shader than other Pis, this seems to be down to Pi2s lower maximum memory speed. Pi2s don't quite manage 1080P @ 60Hz - they drop about 1 in 1000 frames. You probably won't notice this, but if you do, try enabling FAKE_GAMMA.
|
|
||||||
|
|
||||||
SCANLINES enables scanlines. You'll almost certainly want to use it with MULTISAMPLE to reduce moire effects. SCANLINE_WEIGHT defines how wide scanlines are (it is an inverse value so a higher number = thinner lines). SCANLINE_GAP_BRIGHTNESS defines how dark the gaps between the scan lines are. Darker gaps between scan lines make moire effects more likely.
|
|
||||||
|
|
||||||
GAMMA enables gamma correction using the values in INPUT_GAMMA and OUTPUT_GAMMA. FAKE_GAMMA causes it to ignore the values in INPUT_GAMMA and OUTPUT_GAMMA and approximate gamma correction in a way which is faster than true gamma whilst still looking better than having none. You must have GAMMA defined to enable FAKE_GAMMA.
|
|
||||||
|
|
||||||
CURVATURE distorts the screen by CURVATURE_X and CURVATURE_Y. Curvature slows things down a lot.
|
|
||||||
|
|
||||||
By default the shader uses linear blending horizontally. If you find this too blury, enable SHARPER.
|
|
||||||
|
|
||||||
BLOOM_FACTOR controls the increase in width for bright scanlines.
|
|
||||||
|
|
||||||
MASK_TYPE defines what, if any, shadow mask to use. MASK_BRIGHTNESS defines how much the mask type darkens the screen.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma parameter CURVATURE_X "Screen curvature - horizontal" 0.10 0.0 1.0 0.01
|
|
||||||
#pragma parameter CURVATURE_Y "Screen curvature - vertical" 0.15 0.0 1.0 0.01
|
|
||||||
#pragma parameter MASK_BRIGHTNESS "Mask brightness" 0.70 0.0 1.0 0.01
|
|
||||||
#pragma parameter SCANLINE_WEIGHT "Scanline weight" 6.0 0.0 15.0 0.1
|
|
||||||
#pragma parameter SCANLINE_GAP_BRIGHTNESS "Scanline gap brightness" 0.12 0.0 1.0 0.01
|
|
||||||
#pragma parameter BLOOM_FACTOR "Bloom factor" 1.5 0.0 5.0 0.01
|
|
||||||
#pragma parameter INPUT_GAMMA "Input gamma" 2.4 0.0 5.0 0.01
|
|
||||||
#pragma parameter OUTPUT_GAMMA "Output gamma" 2.2 0.0 5.0 0.01
|
|
||||||
|
|
||||||
// Haven't put these as parameters as it would slow the code down.
|
|
||||||
#define SCANLINES
|
|
||||||
#define MULTISAMPLE
|
|
||||||
#define GAMMA
|
|
||||||
//#define FAKE_GAMMA
|
|
||||||
//#define CURVATURE
|
|
||||||
//#define SHARPER
|
|
||||||
// MASK_TYPE: 0 = none, 1 = green/magenta, 2 = trinitron(ish)
|
|
||||||
#define MASK_TYPE 2
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef GL_ES
|
|
||||||
#define COMPAT_PRECISION mediump
|
|
||||||
precision mediump float;
|
|
||||||
#else
|
|
||||||
#define COMPAT_PRECISION
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PARAMETER_UNIFORM
|
|
||||||
uniform COMPAT_PRECISION float CURVATURE_X;
|
|
||||||
uniform COMPAT_PRECISION float CURVATURE_Y;
|
|
||||||
uniform COMPAT_PRECISION float MASK_BRIGHTNESS;
|
|
||||||
uniform COMPAT_PRECISION float SCANLINE_WEIGHT;
|
|
||||||
uniform COMPAT_PRECISION float SCANLINE_GAP_BRIGHTNESS;
|
|
||||||
uniform COMPAT_PRECISION float BLOOM_FACTOR;
|
|
||||||
uniform COMPAT_PRECISION float INPUT_GAMMA;
|
|
||||||
uniform COMPAT_PRECISION float OUTPUT_GAMMA;
|
|
||||||
#else
|
|
||||||
#define CURVATURE_X 0.05
|
|
||||||
#define CURVATURE_Y 0.1
|
|
||||||
#define MASK_BRIGHTNESS 0.80
|
|
||||||
#define SCANLINE_WEIGHT 6.0
|
|
||||||
#define SCANLINE_GAP_BRIGHTNESS 0.12
|
|
||||||
#define BLOOM_FACTOR 3.5
|
|
||||||
#define INPUT_GAMMA 2.4
|
|
||||||
#define OUTPUT_GAMMA 2.2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* COMPATIBILITY
|
|
||||||
- GLSL compilers
|
|
||||||
*/
|
|
||||||
|
|
||||||
//uniform vec2 TextureSize;
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
varying vec2 screenScale;
|
|
||||||
#endif
|
|
||||||
varying vec2 TEX0;
|
|
||||||
varying float filterWidth;
|
|
||||||
|
|
||||||
#if defined(VERTEX)
|
|
||||||
//uniform mat4 MVPMatrix;
|
|
||||||
//attribute vec4 VertexCoord;
|
|
||||||
//attribute vec2 TexCoord;
|
|
||||||
//uniform vec2 InputSize;
|
|
||||||
//uniform vec2 OutputSize;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
screenScale = vec2(1.0, 1.0); //TextureSize / InputSize;
|
|
||||||
#endif
|
|
||||||
filterWidth = (768.0 / 256.0) / 3.0;
|
|
||||||
TEX0 = vec2(gl_MultiTexCoord0.x, 1.0-gl_MultiTexCoord0.y)*1.0001;
|
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
|
||||||
}
|
|
||||||
#elif defined(FRAGMENT)
|
|
||||||
|
|
||||||
uniform sampler2D Texture;
|
|
||||||
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
vec2 Distort(vec2 coord)
|
|
||||||
{
|
|
||||||
vec2 CURVATURE_DISTORTION = vec2(CURVATURE_X, CURVATURE_Y);
|
|
||||||
// Barrel distortion shrinks the display area a bit, this will allow us to counteract that.
|
|
||||||
vec2 barrelScale = 1.0 - (0.23 * CURVATURE_DISTORTION);
|
|
||||||
coord *= screenScale;
|
|
||||||
coord -= vec2(0.5);
|
|
||||||
float rsq = coord.x * coord.x + coord.y * coord.y;
|
|
||||||
coord += coord * (CURVATURE_DISTORTION * rsq);
|
|
||||||
coord *= barrelScale;
|
|
||||||
if (abs(coord.x) >= 0.5 || abs(coord.y) >= 0.5)
|
|
||||||
coord = vec2(-1.0); // If out of bounds, return an invalid value.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
coord += vec2(0.5);
|
|
||||||
coord /= screenScale;
|
|
||||||
}
|
|
||||||
|
|
||||||
return coord;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
float CalcScanLineWeight(float dist)
|
|
||||||
{
|
|
||||||
return max(1.0-dist*dist*SCANLINE_WEIGHT, SCANLINE_GAP_BRIGHTNESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
float CalcScanLine(float dy)
|
|
||||||
{
|
|
||||||
float scanLineWeight = CalcScanLineWeight(dy);
|
|
||||||
#if defined(MULTISAMPLE)
|
|
||||||
scanLineWeight += CalcScanLineWeight(dy-filterWidth);
|
|
||||||
scanLineWeight += CalcScanLineWeight(dy+filterWidth);
|
|
||||||
scanLineWeight *= 0.3333333;
|
|
||||||
#endif
|
|
||||||
return scanLineWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec2 TextureSize = vec2(320.0, 256.0);
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
vec2 texcoord = Distort(TEX0);
|
|
||||||
if (texcoord.x < 0.0)
|
|
||||||
gl_FragColor = vec4(0.0);
|
|
||||||
else
|
|
||||||
#else
|
|
||||||
vec2 texcoord = TEX0;
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
vec2 texcoordInPixels = texcoord * TextureSize;
|
|
||||||
#if defined(SHARPER)
|
|
||||||
vec2 tempCoord = floor(texcoordInPixels) + 0.5;
|
|
||||||
vec2 coord = tempCoord / TextureSize;
|
|
||||||
vec2 deltas = texcoordInPixels - tempCoord;
|
|
||||||
float scanLineWeight = CalcScanLine(deltas.y);
|
|
||||||
vec2 signs = sign(deltas);
|
|
||||||
deltas.x *= 2.0;
|
|
||||||
deltas = deltas * deltas;
|
|
||||||
deltas.y = deltas.y * deltas.y;
|
|
||||||
deltas.x *= 0.5;
|
|
||||||
deltas.y *= 8.0;
|
|
||||||
deltas /= TextureSize;
|
|
||||||
deltas *= signs;
|
|
||||||
vec2 tc = coord + deltas;
|
|
||||||
#else
|
|
||||||
float tempY = floor(texcoordInPixels.y) + 0.5;
|
|
||||||
float yCoord = tempY / TextureSize.y;
|
|
||||||
float dy = texcoordInPixels.y - tempY;
|
|
||||||
float scanLineWeight = CalcScanLine(dy);
|
|
||||||
float signY = sign(dy);
|
|
||||||
dy = dy * dy;
|
|
||||||
dy = dy * dy;
|
|
||||||
dy *= 8.0;
|
|
||||||
dy /= TextureSize.y;
|
|
||||||
dy *= signY;
|
|
||||||
vec2 tc = vec2(texcoord.x, yCoord + dy);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
vec3 colour = texture2D(Texture, tc).rgb;
|
|
||||||
|
|
||||||
#if defined(SCANLINES)
|
|
||||||
#if defined(GAMMA)
|
|
||||||
#if defined(FAKE_GAMMA)
|
|
||||||
colour = colour * colour;
|
|
||||||
#else
|
|
||||||
colour = pow(colour, vec3(INPUT_GAMMA));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
scanLineWeight *= BLOOM_FACTOR;
|
|
||||||
colour *= scanLineWeight;
|
|
||||||
|
|
||||||
#if defined(GAMMA)
|
|
||||||
#if defined(FAKE_GAMMA)
|
|
||||||
colour = sqrt(colour);
|
|
||||||
#else
|
|
||||||
colour = pow(colour, vec3(1.0/OUTPUT_GAMMA));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#if MASK_TYPE == 0
|
|
||||||
gl_FragColor = vec4(colour, 1.0);
|
|
||||||
#else
|
|
||||||
#if MASK_TYPE == 1
|
|
||||||
float whichMask = fract((gl_FragCoord.x*1.0001) * 0.5);
|
|
||||||
vec3 mask;
|
|
||||||
if (whichMask < 0.5)
|
|
||||||
mask = vec3(MASK_BRIGHTNESS, 1.0, MASK_BRIGHTNESS);
|
|
||||||
else
|
|
||||||
mask = vec3(1.0, MASK_BRIGHTNESS, 1.0);
|
|
||||||
#elif MASK_TYPE == 2
|
|
||||||
float whichMask = fract((gl_FragCoord.x*1.0001) * 0.3333333);
|
|
||||||
vec3 mask = vec3(MASK_BRIGHTNESS, MASK_BRIGHTNESS, MASK_BRIGHTNESS);
|
|
||||||
if (whichMask < 0.3333333)
|
|
||||||
mask.x = 1.0;
|
|
||||||
else if (whichMask < 0.6666666)
|
|
||||||
mask.y = 1.0;
|
|
||||||
else
|
|
||||||
mask.z = 1.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gl_FragColor = vec4(colour * mask, 1.0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1,185 +0,0 @@
|
|||||||
/*
|
|
||||||
crt-pi - A Raspberry Pi friendly CRT shader.
|
|
||||||
|
|
||||||
Metal Shading Language version converted from GLSL
|
|
||||||
Copyright (C) 2015-2016 davej
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the Free
|
|
||||||
Software Foundation; either version 2 of the License, or (at your option)
|
|
||||||
any later version.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
using namespace metal;
|
|
||||||
|
|
||||||
// Haven't put these as parameters as it would slow the code down.
|
|
||||||
#define SCANLINES
|
|
||||||
#define MULTISAMPLE
|
|
||||||
#define GAMMA
|
|
||||||
//#define FAKE_GAMMA
|
|
||||||
//#define CURVATURE
|
|
||||||
//#define SHARPER
|
|
||||||
// MASK_TYPE: 0 = none, 1 = green/magenta, 2 = trinitron(ish)
|
|
||||||
#define MASK_TYPE 2
|
|
||||||
|
|
||||||
// Constants
|
|
||||||
#define CURVATURE_X 0.05
|
|
||||||
#define CURVATURE_Y 0.1
|
|
||||||
#define MASK_BRIGHTNESS 0.80
|
|
||||||
#define SCANLINE_WEIGHT 6.0
|
|
||||||
#define SCANLINE_GAP_BRIGHTNESS 0.12
|
|
||||||
#define BLOOM_FACTOR 3.5
|
|
||||||
#define INPUT_GAMMA 2.4
|
|
||||||
#define OUTPUT_GAMMA 2.2
|
|
||||||
|
|
||||||
struct VertexIn {
|
|
||||||
float4 position [[attribute(0)]];
|
|
||||||
float2 texcoord [[attribute(1)]];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct VertexOut {
|
|
||||||
float4 position [[position]];
|
|
||||||
float2 TEX0;
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
float2 screenScale;
|
|
||||||
#endif
|
|
||||||
float filterWidth;
|
|
||||||
};
|
|
||||||
|
|
||||||
vertex VertexOut vertex_main(VertexIn in [[stage_in]]) {
|
|
||||||
VertexOut out;
|
|
||||||
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
out.screenScale = float2(1.0, 1.0);
|
|
||||||
#endif
|
|
||||||
out.filterWidth = (768.0 / 256.0) / 3.0;
|
|
||||||
out.TEX0 = float2(in.texcoord.x, 1.0 - in.texcoord.y) * 1.0001;
|
|
||||||
out.position = in.position;
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
float2 Distort(float2 coord, float2 screenScale) {
|
|
||||||
float2 CURVATURE_DISTORTION = float2(CURVATURE_X, CURVATURE_Y);
|
|
||||||
// Barrel distortion shrinks the display area a bit, this will allow us to counteract that.
|
|
||||||
float2 barrelScale = 1.0 - (0.23 * CURVATURE_DISTORTION);
|
|
||||||
coord *= screenScale;
|
|
||||||
coord -= float2(0.5);
|
|
||||||
float rsq = coord.x * coord.x + coord.y * coord.y;
|
|
||||||
coord += coord * (CURVATURE_DISTORTION * rsq);
|
|
||||||
coord *= barrelScale;
|
|
||||||
if (abs(coord.x) >= 0.5 || abs(coord.y) >= 0.5)
|
|
||||||
coord = float2(-1.0); // If out of bounds, return an invalid value.
|
|
||||||
else {
|
|
||||||
coord += float2(0.5);
|
|
||||||
coord /= screenScale;
|
|
||||||
}
|
|
||||||
|
|
||||||
return coord;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
float CalcScanLineWeight(float dist) {
|
|
||||||
return max(1.0 - dist * dist * SCANLINE_WEIGHT, SCANLINE_GAP_BRIGHTNESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
float CalcScanLine(float dy, float filterWidth) {
|
|
||||||
float scanLineWeight = CalcScanLineWeight(dy);
|
|
||||||
#if defined(MULTISAMPLE)
|
|
||||||
scanLineWeight += CalcScanLineWeight(dy - filterWidth);
|
|
||||||
scanLineWeight += CalcScanLineWeight(dy + filterWidth);
|
|
||||||
scanLineWeight *= 0.3333333;
|
|
||||||
#endif
|
|
||||||
return scanLineWeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment float4 fragment_main(VertexOut in [[stage_in]],
|
|
||||||
texture2d<float> Texture [[texture(0)]],
|
|
||||||
sampler textureSampler [[sampler(0)]]) {
|
|
||||||
float2 TextureSize = float2(320.0, 256.0);
|
|
||||||
#if defined(CURVATURE)
|
|
||||||
float2 texcoord = Distort(in.TEX0, in.screenScale);
|
|
||||||
if (texcoord.x < 0.0)
|
|
||||||
return float4(0.0);
|
|
||||||
else
|
|
||||||
#else
|
|
||||||
float2 texcoord = in.TEX0;
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
float2 texcoordInPixels = texcoord * TextureSize;
|
|
||||||
#if defined(SHARPER)
|
|
||||||
float2 tempCoord = floor(texcoordInPixels) + 0.5;
|
|
||||||
float2 coord = tempCoord / TextureSize;
|
|
||||||
float2 deltas = texcoordInPixels - tempCoord;
|
|
||||||
float scanLineWeight = CalcScanLine(deltas.y, in.filterWidth);
|
|
||||||
float2 signs = sign(deltas);
|
|
||||||
deltas.x *= 2.0;
|
|
||||||
deltas = deltas * deltas;
|
|
||||||
deltas.y = deltas.y * deltas.y;
|
|
||||||
deltas.x *= 0.5;
|
|
||||||
deltas.y *= 8.0;
|
|
||||||
deltas /= TextureSize;
|
|
||||||
deltas *= signs;
|
|
||||||
float2 tc = coord + deltas;
|
|
||||||
#else
|
|
||||||
float tempY = floor(texcoordInPixels.y) + 0.5;
|
|
||||||
float yCoord = tempY / TextureSize.y;
|
|
||||||
float dy = texcoordInPixels.y - tempY;
|
|
||||||
float scanLineWeight = CalcScanLine(dy, in.filterWidth);
|
|
||||||
float signY = sign(dy);
|
|
||||||
dy = dy * dy;
|
|
||||||
dy = dy * dy;
|
|
||||||
dy *= 8.0;
|
|
||||||
dy /= TextureSize.y;
|
|
||||||
dy *= signY;
|
|
||||||
float2 tc = float2(texcoord.x, yCoord + dy);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
float3 colour = Texture.sample(textureSampler, tc).rgb;
|
|
||||||
|
|
||||||
#if defined(SCANLINES)
|
|
||||||
#if defined(GAMMA)
|
|
||||||
#if defined(FAKE_GAMMA)
|
|
||||||
colour = colour * colour;
|
|
||||||
#else
|
|
||||||
colour = pow(colour, float3(INPUT_GAMMA));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
scanLineWeight *= BLOOM_FACTOR;
|
|
||||||
colour *= scanLineWeight;
|
|
||||||
|
|
||||||
#if defined(GAMMA)
|
|
||||||
#if defined(FAKE_GAMMA)
|
|
||||||
colour = sqrt(colour);
|
|
||||||
#else
|
|
||||||
colour = pow(colour, float3(1.0/OUTPUT_GAMMA));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#if MASK_TYPE == 0
|
|
||||||
return float4(colour, 1.0);
|
|
||||||
#else
|
|
||||||
#if MASK_TYPE == 1
|
|
||||||
float whichMask = fract((in.position.x * 1.0001) * 0.5);
|
|
||||||
float3 mask;
|
|
||||||
if (whichMask < 0.5)
|
|
||||||
mask = float3(MASK_BRIGHTNESS, 1.0, MASK_BRIGHTNESS);
|
|
||||||
else
|
|
||||||
mask = float3(1.0, MASK_BRIGHTNESS, 1.0);
|
|
||||||
#elif MASK_TYPE == 2
|
|
||||||
float whichMask = fract((in.position.x * 1.0001) * 0.3333333);
|
|
||||||
float3 mask = float3(MASK_BRIGHTNESS, MASK_BRIGHTNESS, MASK_BRIGHTNESS);
|
|
||||||
if (whichMask < 0.3333333)
|
|
||||||
mask.x = 1.0;
|
|
||||||
else if (whichMask < 0.6666666)
|
|
||||||
mask.y = 1.0;
|
|
||||||
else
|
|
||||||
mask.z = 1.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return float4(colour * mask, 1.0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
152
data/shaders/crtpi_frag.glsl
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
#version 450
|
||||||
|
|
||||||
|
// Vulkan GLSL fragment shader — CRT-Pi PostFX
|
||||||
|
// Algoritmo de scanlines continuas con pesos gaussianos, bloom y máscara de fósforo.
|
||||||
|
// Basado en el shader CRT-Pi original (GLSL 3.3), portado a GLSL 4.50 con parámetros uniformes.
|
||||||
|
//
|
||||||
|
// Compile: glslc -fshader-stage=frag --target-env=vulkan1.0 crtpi_frag.glsl -o crtpi_frag.spv
|
||||||
|
// xxd -i crtpi_frag.spv > ../../source/core/rendering/sdl3gpu/crtpi_frag_spv.h
|
||||||
|
|
||||||
|
layout(location = 0) in vec2 v_uv;
|
||||||
|
layout(location = 0) out vec4 out_color;
|
||||||
|
|
||||||
|
layout(set = 2, binding = 0) uniform sampler2D Texture;
|
||||||
|
|
||||||
|
layout(set = 3, binding = 0) uniform CrtPiBlock {
|
||||||
|
// vec4 #0
|
||||||
|
float scanline_weight; // Ajuste gaussiano de scanlines (default 6.0)
|
||||||
|
float scanline_gap_brightness; // Brillo mínimo entre scanlines (default 0.12)
|
||||||
|
float bloom_factor; // Factor de brillo en zonas iluminadas (default 3.5)
|
||||||
|
float input_gamma; // Gamma de entrada — linealización (default 2.4)
|
||||||
|
// vec4 #1
|
||||||
|
float output_gamma; // Gamma de salida — codificación (default 2.2)
|
||||||
|
float mask_brightness; // Brillo sub-píxeles de la máscara (default 0.80)
|
||||||
|
float curvature_x; // Distorsión barrel eje X (default 0.05)
|
||||||
|
float curvature_y; // Distorsión barrel eje Y (default 0.10)
|
||||||
|
// vec4 #2
|
||||||
|
int mask_type; // 0=ninguna, 1=verde/magenta, 2=RGB fósforo
|
||||||
|
int enable_scanlines; // 0 = off, 1 = on
|
||||||
|
int enable_multisample; // 0 = off, 1 = on (antialiasing analítico de scanlines)
|
||||||
|
int enable_gamma; // 0 = off, 1 = on
|
||||||
|
// vec4 #3
|
||||||
|
int enable_curvature; // 0 = off, 1 = on
|
||||||
|
int enable_sharper; // 0 = off, 1 = on
|
||||||
|
float texture_width; // Ancho del canvas lógico en píxeles
|
||||||
|
float texture_height; // Alto del canvas lógico en píxeles
|
||||||
|
} u;
|
||||||
|
|
||||||
|
// Distorsión barrel CRT
|
||||||
|
vec2 distort(vec2 coord, vec2 screen_scale) {
|
||||||
|
vec2 curvature = vec2(u.curvature_x, u.curvature_y);
|
||||||
|
vec2 barrel_scale = 1.0 - (0.23 * curvature);
|
||||||
|
coord *= screen_scale;
|
||||||
|
coord -= vec2(0.5);
|
||||||
|
float rsq = coord.x * coord.x + coord.y * coord.y;
|
||||||
|
coord += coord * (curvature * rsq);
|
||||||
|
coord *= barrel_scale;
|
||||||
|
if (abs(coord.x) >= 0.5 || abs(coord.y) >= 0.5) {
|
||||||
|
return vec2(-1.0); // fuera de pantalla
|
||||||
|
}
|
||||||
|
coord += vec2(0.5);
|
||||||
|
coord /= screen_scale;
|
||||||
|
return coord;
|
||||||
|
}
|
||||||
|
|
||||||
|
float calcScanLineWeight(float dist) {
|
||||||
|
return max(1.0 - dist * dist * u.scanline_weight, u.scanline_gap_brightness);
|
||||||
|
}
|
||||||
|
|
||||||
|
float calcScanLine(float dy, float filter_width) {
|
||||||
|
float weight = calcScanLineWeight(dy);
|
||||||
|
if (u.enable_multisample != 0) {
|
||||||
|
weight += calcScanLineWeight(dy - filter_width);
|
||||||
|
weight += calcScanLineWeight(dy + filter_width);
|
||||||
|
weight *= 0.3333333;
|
||||||
|
}
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec2 tex_size = vec2(u.texture_width, u.texture_height);
|
||||||
|
|
||||||
|
// filterWidth: equivalente al original (768.0 / TextureSize.y) / 3.0
|
||||||
|
float filter_width = (768.0 / u.texture_height) / 3.0;
|
||||||
|
|
||||||
|
vec2 texcoord = v_uv;
|
||||||
|
|
||||||
|
// Curvatura barrel opcional
|
||||||
|
if (u.enable_curvature != 0) {
|
||||||
|
texcoord = distort(texcoord, vec2(1.0, 1.0));
|
||||||
|
if (texcoord.x < 0.0) {
|
||||||
|
out_color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vec2 texcoord_in_pixels = texcoord * tex_size;
|
||||||
|
vec2 tc;
|
||||||
|
float scan_line_weight;
|
||||||
|
|
||||||
|
if (u.enable_sharper != 0) {
|
||||||
|
// Modo SHARPER: filtrado bicúbico-like con subpixel sharpen
|
||||||
|
vec2 temp_coord = floor(texcoord_in_pixels) + 0.5;
|
||||||
|
tc = temp_coord / tex_size;
|
||||||
|
vec2 deltas = texcoord_in_pixels - temp_coord;
|
||||||
|
scan_line_weight = calcScanLine(deltas.y, filter_width);
|
||||||
|
vec2 signs = sign(deltas);
|
||||||
|
deltas.x *= 2.0;
|
||||||
|
deltas = deltas * deltas;
|
||||||
|
deltas.y = deltas.y * deltas.y;
|
||||||
|
deltas.x *= 0.5;
|
||||||
|
deltas.y *= 8.0;
|
||||||
|
deltas /= tex_size;
|
||||||
|
deltas *= signs;
|
||||||
|
tc = tc + deltas;
|
||||||
|
} else {
|
||||||
|
// Modo estándar
|
||||||
|
float temp_y = floor(texcoord_in_pixels.y) + 0.5;
|
||||||
|
float y_coord = temp_y / tex_size.y;
|
||||||
|
float dy = texcoord_in_pixels.y - temp_y;
|
||||||
|
scan_line_weight = calcScanLine(dy, filter_width);
|
||||||
|
float sign_y = sign(dy);
|
||||||
|
dy = dy * dy;
|
||||||
|
dy = dy * dy;
|
||||||
|
dy *= 8.0;
|
||||||
|
dy /= tex_size.y;
|
||||||
|
dy *= sign_y;
|
||||||
|
tc = vec2(texcoord.x, y_coord + dy);
|
||||||
|
}
|
||||||
|
|
||||||
|
vec3 colour = texture(Texture, tc).rgb;
|
||||||
|
|
||||||
|
if (u.enable_scanlines != 0) {
|
||||||
|
if (u.enable_gamma != 0) {
|
||||||
|
colour = pow(colour, vec3(u.input_gamma));
|
||||||
|
}
|
||||||
|
colour *= scan_line_weight * u.bloom_factor;
|
||||||
|
if (u.enable_gamma != 0) {
|
||||||
|
colour = pow(colour, vec3(1.0 / u.output_gamma));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Máscara de fósforo
|
||||||
|
if (u.mask_type == 1) {
|
||||||
|
float which_mask = fract(gl_FragCoord.x * 0.5);
|
||||||
|
vec3 mask = (which_mask < 0.5)
|
||||||
|
? vec3(u.mask_brightness, 1.0, u.mask_brightness)
|
||||||
|
: vec3(1.0, u.mask_brightness, 1.0);
|
||||||
|
colour *= mask;
|
||||||
|
} else if (u.mask_type == 2) {
|
||||||
|
float which_mask = fract(gl_FragCoord.x * 0.3333333);
|
||||||
|
vec3 mask = vec3(u.mask_brightness);
|
||||||
|
if (which_mask < 0.3333333)
|
||||||
|
mask.x = 1.0;
|
||||||
|
else if (which_mask < 0.6666666)
|
||||||
|
mask.y = 1.0;
|
||||||
|
else
|
||||||
|
mask.z = 1.0;
|
||||||
|
colour *= mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
out_color = vec4(colour, 1.0);
|
||||||
|
}
|
||||||
48
data/shaders/downscale.frag
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
#version 450
|
||||||
|
layout(location = 0) in vec2 v_uv;
|
||||||
|
layout(location = 0) out vec4 out_color;
|
||||||
|
|
||||||
|
layout(set = 2, binding = 0) uniform sampler2D source;
|
||||||
|
|
||||||
|
layout(set = 3, binding = 0) uniform DownscaleUniforms {
|
||||||
|
int algorithm; // 0 = Lanczos2 (ventana 2, ±2 taps), 1 = Lanczos3 (ventana 3, ±3 taps)
|
||||||
|
float pad0;
|
||||||
|
float pad1;
|
||||||
|
float pad2;
|
||||||
|
} u;
|
||||||
|
|
||||||
|
// Kernel Lanczos normalizado: sinc(t) * sinc(t/a) para |t| < a, 0 fuera.
|
||||||
|
float lanczos(float t, float a) {
|
||||||
|
t = abs(t);
|
||||||
|
if (t < 0.0001) { return 1.0; }
|
||||||
|
if (t >= a) { return 0.0; }
|
||||||
|
const float PI = 3.14159265358979;
|
||||||
|
float pt = PI * t;
|
||||||
|
return (a * sin(pt) * sin(pt / a)) / (pt * pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec2 src_size = vec2(textureSize(source, 0));
|
||||||
|
// Posición en coordenadas de texel (centros de texel en N+0.5)
|
||||||
|
vec2 p = v_uv * src_size;
|
||||||
|
vec2 p_floor = floor(p);
|
||||||
|
|
||||||
|
float a = (u.algorithm == 0) ? 2.0 : 3.0;
|
||||||
|
int win = int(a);
|
||||||
|
|
||||||
|
vec4 color = vec4(0.0);
|
||||||
|
float weight_sum = 0.0;
|
||||||
|
|
||||||
|
for (int j = -win; j <= win; j++) {
|
||||||
|
for (int i = -win; i <= win; i++) {
|
||||||
|
// Centro del texel (i,j) relativo a p_floor
|
||||||
|
vec2 tap_center = p_floor + vec2(float(i), float(j)) + 0.5;
|
||||||
|
vec2 offset = tap_center - p;
|
||||||
|
float w = lanczos(offset.x, a) * lanczos(offset.y, a);
|
||||||
|
color += texture(source, tap_center / src_size) * w;
|
||||||
|
weight_sum += w;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
out_color = (weight_sum > 0.0) ? (color / weight_sum) : vec4(0.0, 0.0, 0.0, 1.0);
|
||||||
|
}
|
||||||
142
data/shaders/postfx.frag
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
#version 450
|
||||||
|
|
||||||
|
// Vulkan GLSL fragment shader — PostFX effects
|
||||||
|
// Used for SDL3 GPU API (SPIR-V path, Win/Linux).
|
||||||
|
// Compile: glslc postfx.frag -o postfx.frag.spv
|
||||||
|
// xxd -i postfx.frag.spv > ../../source/core/rendering/sdl3gpu/postfx_frag_spv.h
|
||||||
|
//
|
||||||
|
// PostFXUniforms must match exactly the C++ struct in sdl3gpu_shader.hpp
|
||||||
|
// (8 floats, 32 bytes, std140/scalar layout).
|
||||||
|
|
||||||
|
layout(location = 0) in vec2 v_uv;
|
||||||
|
layout(location = 0) out vec4 out_color;
|
||||||
|
|
||||||
|
layout(set = 2, binding = 0) uniform sampler2D scene;
|
||||||
|
|
||||||
|
layout(set = 3, binding = 0) uniform PostFXUniforms {
|
||||||
|
float vignette_strength;
|
||||||
|
float chroma_strength;
|
||||||
|
float scanline_strength;
|
||||||
|
float screen_height;
|
||||||
|
float mask_strength;
|
||||||
|
float gamma_strength;
|
||||||
|
float curvature;
|
||||||
|
float bleeding;
|
||||||
|
float pixel_scale; // physical pixels per logical pixel (vh / tex_height_)
|
||||||
|
float time; // seconds since SDL init
|
||||||
|
float oversample; // supersampling factor (1.0 = off, 3.0 = 3×SS)
|
||||||
|
float flicker; // 0 = off, 1 = phosphor flicker ~50 Hz — 48 bytes total (3 × 16)
|
||||||
|
} u;
|
||||||
|
|
||||||
|
// YCbCr helpers for NTSC bleeding
|
||||||
|
vec3 rgb_to_ycc(vec3 rgb) {
|
||||||
|
return vec3(
|
||||||
|
0.299*rgb.r + 0.587*rgb.g + 0.114*rgb.b,
|
||||||
|
-0.169*rgb.r - 0.331*rgb.g + 0.500*rgb.b + 0.5,
|
||||||
|
0.500*rgb.r - 0.419*rgb.g - 0.081*rgb.b + 0.5
|
||||||
|
);
|
||||||
|
}
|
||||||
|
vec3 ycc_to_rgb(vec3 ycc) {
|
||||||
|
float y = ycc.x;
|
||||||
|
float cb = ycc.y - 0.5;
|
||||||
|
float cr = ycc.z - 0.5;
|
||||||
|
return clamp(vec3(
|
||||||
|
y + 1.402*cr,
|
||||||
|
y - 0.344*cb - 0.714*cr,
|
||||||
|
y + 1.772*cb
|
||||||
|
), 0.0, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec2 uv = v_uv;
|
||||||
|
|
||||||
|
// Curvatura barrel CRT
|
||||||
|
if (u.curvature > 0.0) {
|
||||||
|
vec2 c = uv - 0.5;
|
||||||
|
float rsq = dot(c, c);
|
||||||
|
vec2 dist = vec2(0.05, 0.1) * u.curvature;
|
||||||
|
vec2 barrelScale = vec2(1.0) - 0.23 * dist;
|
||||||
|
c += c * (dist * rsq);
|
||||||
|
c *= barrelScale;
|
||||||
|
if (abs(c.x) >= 0.5 || abs(c.y) >= 0.5) {
|
||||||
|
out_color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uv = c + 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Muestra base
|
||||||
|
vec3 base = texture(scene, uv).rgb;
|
||||||
|
|
||||||
|
// Sangrado NTSC — difuminado horizontal de crominancia.
|
||||||
|
// step = 1 pixel lógico de juego en UV (corrige SS: textureSize.x = game_w * oversample).
|
||||||
|
vec3 colour;
|
||||||
|
if (u.bleeding > 0.0) {
|
||||||
|
float tw = float(textureSize(scene, 0).x);
|
||||||
|
float step = u.oversample / tw; // 1 pixel lógico en UV
|
||||||
|
vec3 ycc = rgb_to_ycc(base);
|
||||||
|
vec3 ycc_l2 = rgb_to_ycc(texture(scene, uv - vec2(2.0*step, 0.0)).rgb);
|
||||||
|
vec3 ycc_l1 = rgb_to_ycc(texture(scene, uv - vec2(1.0*step, 0.0)).rgb);
|
||||||
|
vec3 ycc_r1 = rgb_to_ycc(texture(scene, uv + vec2(1.0*step, 0.0)).rgb);
|
||||||
|
vec3 ycc_r2 = rgb_to_ycc(texture(scene, uv + vec2(2.0*step, 0.0)).rgb);
|
||||||
|
ycc.yz = (ycc_l2.yz + ycc_l1.yz*2.0 + ycc.yz*2.0 + ycc_r1.yz*2.0 + ycc_r2.yz) / 8.0;
|
||||||
|
colour = mix(base, ycc_to_rgb(ycc), u.bleeding);
|
||||||
|
} else {
|
||||||
|
colour = base;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Aberración cromática (drift animado con time para efecto NTSC real)
|
||||||
|
float ca = u.chroma_strength * 0.005 * (1.0 + 0.15 * sin(u.time * 7.3));
|
||||||
|
colour.r = texture(scene, uv + vec2(ca, 0.0)).r;
|
||||||
|
colour.b = texture(scene, uv - vec2(ca, 0.0)).b;
|
||||||
|
|
||||||
|
// Corrección gamma (linealizar antes de scanlines, codificar después)
|
||||||
|
if (u.gamma_strength > 0.0) {
|
||||||
|
vec3 lin = pow(colour, vec3(2.4));
|
||||||
|
colour = mix(colour, lin, u.gamma_strength);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scanlines — 1 pixel físico oscuro por fila lógica.
|
||||||
|
// Modelo sustractivo: las filas de scanline se oscurecen, las demás no cambian.
|
||||||
|
// Esto evita el efecto de sobrebrillo en contenido con colores vivos.
|
||||||
|
if (u.scanline_strength > 0.0) {
|
||||||
|
float ps = max(1.0, round(u.pixel_scale));
|
||||||
|
float frac_in_row = fract(uv.y * u.screen_height);
|
||||||
|
float row_pos = floor(frac_in_row * ps);
|
||||||
|
float is_dark = step(ps - 1.0, row_pos);
|
||||||
|
float scan = mix(1.0, 0.0, is_dark);
|
||||||
|
colour *= mix(1.0, scan, u.scanline_strength);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (u.gamma_strength > 0.0) {
|
||||||
|
vec3 enc = pow(colour, vec3(1.0 / 2.2));
|
||||||
|
colour = mix(colour, enc, u.gamma_strength);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Viñeta
|
||||||
|
vec2 d = uv - 0.5;
|
||||||
|
float vignette = 1.0 - dot(d, d) * u.vignette_strength;
|
||||||
|
colour *= clamp(vignette, 0.0, 1.0);
|
||||||
|
|
||||||
|
// Máscara de fósforo RGB — después de scanlines (orden original):
|
||||||
|
// filas brillantes saturadas → máscara invisible, filas oscuras → RGB visible.
|
||||||
|
if (u.mask_strength > 0.0) {
|
||||||
|
float whichMask = fract(gl_FragCoord.x * 0.3333333);
|
||||||
|
vec3 mask = vec3(0.80);
|
||||||
|
if (whichMask < 0.3333333)
|
||||||
|
mask.x = 1.0;
|
||||||
|
else if (whichMask < 0.6666666)
|
||||||
|
mask.y = 1.0;
|
||||||
|
else
|
||||||
|
mask.z = 1.0;
|
||||||
|
colour = mix(colour, colour * mask, u.mask_strength);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parpadeo de fósforo CRT (~50 Hz)
|
||||||
|
if (u.flicker > 0.0) {
|
||||||
|
float flicker_wave = sin(u.time * 100.0) * 0.5 + 0.5;
|
||||||
|
colour *= 1.0 - u.flicker * 0.04 * flicker_wave;
|
||||||
|
}
|
||||||
|
|
||||||
|
out_color = vec4(colour, 1.0);
|
||||||
|
}
|
||||||
24
data/shaders/postfx.vert
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#version 450
|
||||||
|
|
||||||
|
// Vulkan GLSL vertex shader — postfx full-screen triangle
|
||||||
|
// Used for SDL3 GPU API (SPIR-V path, Win/Linux).
|
||||||
|
// Compile: glslc postfx.vert -o postfx.vert.spv
|
||||||
|
// xxd -i postfx.vert.spv > ../../source/core/rendering/sdl3gpu/postfx_vert_spv.h
|
||||||
|
|
||||||
|
layout(location = 0) out vec2 v_uv;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
// Full-screen triangle (no vertex buffer needed)
|
||||||
|
const vec2 positions[3] = vec2[3](
|
||||||
|
vec2(-1.0, -1.0),
|
||||||
|
vec2( 3.0, -1.0),
|
||||||
|
vec2(-1.0, 3.0)
|
||||||
|
);
|
||||||
|
const vec2 uvs[3] = vec2[3](
|
||||||
|
vec2(0.0, 1.0),
|
||||||
|
vec2(2.0, 1.0),
|
||||||
|
vec2(0.0,-1.0)
|
||||||
|
);
|
||||||
|
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
|
||||||
|
v_uv = uvs[gl_VertexIndex];
|
||||||
|
}
|
||||||
15
data/shaders/upscale.frag
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#version 450
|
||||||
|
|
||||||
|
// Vulkan GLSL fragment shader — Nearest-neighbour upscale pass
|
||||||
|
// Used as the first render pass when supersampling is active.
|
||||||
|
// Compile: glslc upscale.frag -o upscale.frag.spv
|
||||||
|
// xxd -i upscale.frag.spv > ../../source/core/rendering/sdl3gpu/upscale_frag_spv.h
|
||||||
|
|
||||||
|
layout(location = 0) in vec2 v_uv;
|
||||||
|
layout(location = 0) out vec4 out_color;
|
||||||
|
|
||||||
|
layout(set = 2, binding = 0) uniform sampler2D scene;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
out_color = texture(scene, v_uv);
|
||||||
|
}
|
||||||
BIN
data/sound/bullet2p.wav
Normal file
BIN
data/sound/name_input_accept.wav
Normal file
BIN
data/sound/voice_game_over.wav
Normal file
2231
gamecontrollerdb.txt
Normal file
@@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
SECONDS=0
|
|
||||||
make linux_debug
|
|
||||||
duration=$SECONDS
|
|
||||||
echo "$((duration / 60)) minutes and $((duration % 60)) seconds elapsed."
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
SOURCEPATH=../source/
|
|
||||||
|
|
||||||
for i in "$SOURCEPATH"/*.cpp
|
|
||||||
do
|
|
||||||
include-what-you-use -D _DEBUG -std=c++20 -Wall "$i"
|
|
||||||
done
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
SOURCEPATH=../source/
|
|
||||||
|
|
||||||
for i in "$SOURCEPATH"/*.cpp
|
|
||||||
do
|
|
||||||
include-what-you-use -D DEBUG -std=c++20 -Wall "$i"
|
|
||||||
read -r -p "Presiona cualquier tecla para continuar..."
|
|
||||||
clear
|
|
||||||
done
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Verifica que se haya proporcionado un archivo como argumento
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
echo "Uso: $0 <archivo.cpp>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
FILE="$1"
|
|
||||||
|
|
||||||
include-what-you-use -D _DEBUG -std=c++20 -Wall "$FILE" \
|
|
||||||
-I../source \
|
|
||||||
-Xiwyu --mapping_file=sdl3_mapping.imp \
|
|
||||||
-Xiwyu --update_comments \
|
|
||||||
-Xiwyu --verbose=3
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# Per a un fitxer, desde l'arrel del projecte executar:
|
|
||||||
clang-tidy source/fitxer.cpp -p build/ --fix
|
|
||||||
|
|
||||||
# Per a varios fitxers, desde l'arrel:
|
|
||||||
find source/ \( -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \) | \
|
|
||||||
xargs -P4 -I{} bash -c 'echo "Procesando: {}"; clang-tidy {} -p build/ --fix'
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
*:/home/sergio/gitea/coffee_crisis_arcade_edition/source/stb*
|
|
||||||
*:/home/sergio/gitea/coffee_crisis_arcade_edition/source/gif.c
|
|
||||||
*:/home/sergio/gitea/coffee_crisis_arcade_edition/source/jail*
|
|
||||||
*:/usr/include/*
|
|
||||||
*:../source/stb*
|
|
||||||
*:../source/gif.c
|
|
||||||
*:../source/jail*
|
|
||||||
*:/usr/include/*
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# 🏁 Ruta base del proyecto
|
|
||||||
BASE_DIR="/home/sergio/gitea/coffee_crisis_arcade_edition"
|
|
||||||
|
|
||||||
# 📁 Ruta al build
|
|
||||||
BUILD_DIR="$BASE_DIR/build"
|
|
||||||
|
|
||||||
# 📄 Archivo de mapping personalizado
|
|
||||||
MAPPING_FILE="$BASE_DIR/linux_utils/sdl3_mapping.imp"
|
|
||||||
|
|
||||||
# 📦 Generar compile_commands.json
|
|
||||||
echo "🔧 Generando compile_commands.json..."
|
|
||||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S "$BASE_DIR" -B "$BUILD_DIR"
|
|
||||||
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Script para ejecutar clang-tidy en múltiples directorios
|
|
||||||
# Uso: ./run_clang-tidy.sh
|
|
||||||
|
|
||||||
# Lista de rutas donde ejecutar clang-tidy
|
|
||||||
PATHS=(
|
|
||||||
"/home/sergio/gitea/coffee_crisis_arcade_edition/source"
|
|
||||||
"/home/sergio/gitea/coffee_crisis_arcade_edition/source/sections"
|
|
||||||
"/home/sergio/gitea/coffee_crisis_arcade_edition/source/ui"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Ruta del directorio build (relativa desde donde se ejecuta el script)
|
|
||||||
BUILD_DIR="/home/sergio/gitea/coffee_crisis_arcade_edition/build/"
|
|
||||||
|
|
||||||
# Función para procesar un directorio
|
|
||||||
process_directory() {
|
|
||||||
local dir="$1"
|
|
||||||
|
|
||||||
echo "=== Procesando directorio: $dir ==="
|
|
||||||
|
|
||||||
# Verificar que el directorio existe
|
|
||||||
if [[ ! -d "$dir" ]]; then
|
|
||||||
echo "Error: El directorio $dir no existe"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Cambiar al directorio y ejecutar find con -maxdepth 1 para un solo nivel
|
|
||||||
cd "$dir" || return 1
|
|
||||||
|
|
||||||
# Buscar archivos .cpp, .h, .hpp solo en el nivel actual (no subdirectorios)
|
|
||||||
find . -maxdepth 1 \( -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \) | \
|
|
||||||
xargs -P4 -I{} bash -c 'echo "Procesando: {}"; clang-tidy {} -p '"$BUILD_DIR"' --fix'
|
|
||||||
|
|
||||||
echo "=== Completado: $dir ==="
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
# Procesar cada directorio en la lista
|
|
||||||
for path in "${PATHS[@]}"; do
|
|
||||||
process_directory "$path"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "¡Proceso completado para todos los directorios!"
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Función para mostrar el uso del script
|
|
||||||
mostrar_uso() {
|
|
||||||
echo "Uso: $0 [-o opción]"
|
|
||||||
echo "Opciones:"
|
|
||||||
echo " w Ejecutar cppcheck con warning, style, performance"
|
|
||||||
echo " a Ejecutar cppcheck con todas las opciones habilitadas"
|
|
||||||
echo " u Ejecutar cppcheck para unusedFunction"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Inicializar las variables
|
|
||||||
opcion=""
|
|
||||||
|
|
||||||
# Procesar las opciones
|
|
||||||
while getopts "o:" opt; do
|
|
||||||
case $opt in
|
|
||||||
o)
|
|
||||||
opcion=$OPTARG
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
mostrar_uso
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Ejecutar según la opción seleccionada
|
|
||||||
case $opcion in
|
|
||||||
w)
|
|
||||||
cppcheck --force --enable=warning,style,performance --std=c++20 \
|
|
||||||
--check-level=exhaustive \
|
|
||||||
--suppressions-list=./cppcheck_suppressions \
|
|
||||||
../source/ \
|
|
||||||
2>./cppcheck-result-warning-style-performance.txt
|
|
||||||
;;
|
|
||||||
a)
|
|
||||||
cppcheck --force --enable=all -I /usr/include --std=c++20 \
|
|
||||||
--suppress=missingIncludeSystem \
|
|
||||||
--suppressions-list=./cppcheck_suppressions \
|
|
||||||
../source/ \
|
|
||||||
2>./cppcheck-result-all.txt
|
|
||||||
;;
|
|
||||||
u)
|
|
||||||
cppcheck --enable=style --std=c++20 \
|
|
||||||
--suppressions-list=./cppcheck_suppressions \
|
|
||||||
../source/ \
|
|
||||||
2>./cppcheck-result-unusedFunction.txt
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
mostrar_uso
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# 🏁 Ruta base del proyecto
|
|
||||||
BASE_DIR="/home/sergio/gitea/coffee_crisis_arcade_edition"
|
|
||||||
|
|
||||||
# 📁 Ruta al build
|
|
||||||
BUILD_DIR="$BASE_DIR/build"
|
|
||||||
|
|
||||||
# 📄 Archivo de mapping personalizado
|
|
||||||
MAPPING_FILE="$BASE_DIR/linux_utils/sdl3_mapping.imp"
|
|
||||||
|
|
||||||
# 📦 Generar compile_commands.json
|
|
||||||
echo "🔧 Generando compile_commands.json..."
|
|
||||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S "$BASE_DIR" -B "$BUILD_DIR"
|
|
||||||
|
|
||||||
# 🛠️ Ejecutar IWYU con fix_includes.py
|
|
||||||
echo "🚀 Ejecutando IWYU..."
|
|
||||||
iwyu_tool.py -p "$BUILD_DIR" -- -Xiwyu --mapping_file="$MAPPING_FILE" -Xiwyu --verbose=3 \
|
|
||||||
| python3 /usr/bin/fix_includes.py --update_comments --reorder --nosafe_headers
|
|
||||||
|
|
||||||
# 🧹 Reemplazar // for por // Para en líneas de #include
|
|
||||||
echo "✍️ Corrigiendo comentarios en includes..."
|
|
||||||
find "$BASE_DIR" -type f \( -name "*.cpp" -o -name "*.h" \) -exec \
|
|
||||||
sed -i '/^#include .*\/\/ for/s/\/\/ for/\/\/ Para/' {} +
|
|
||||||
|
|
||||||
echo "✅ Script completado."
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# 🏁 Ruta base del proyecto
|
|
||||||
BASE_DIR="/home/sergio/gitea/coffee_crisis_arcade_edition"
|
|
||||||
|
|
||||||
# 📁 Ruta al build
|
|
||||||
BUILD_DIR="$BASE_DIR/build"
|
|
||||||
|
|
||||||
# 📄 Archivo de mapping personalizado
|
|
||||||
MAPPING_FILE="$BASE_DIR/linux_utils/sdl3_mapping.imp"
|
|
||||||
|
|
||||||
# 📦 Generar compile_commands.json
|
|
||||||
echo "🔧 Generando compile_commands.json..."
|
|
||||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S "$BASE_DIR" -B "$BUILD_DIR"
|
|
||||||
|
|
||||||
# 🛠️ Ejecutar IWYU con fix_includes.py
|
|
||||||
echo "🚀 Ejecutando IWYU..."
|
|
||||||
iwyu_tool.py -p "$BUILD_DIR" -- -Xiwyu --mapping_file="$MAPPING_FILE" -Xiwyu --verbose=3 \
|
|
||||||
| python3 /usr/bin/fix_includes.py --update_comments --reorder --nosafe_headers --dry_run
|
|
||||||
|
|
||||||
# 🧹 Reemplazar // for por // Para en líneas de #include
|
|
||||||
echo "✍️ Corrigiendo comentarios en includes..."
|
|
||||||
find "$BASE_DIR" -type f \( -name "*.cpp" -o -name "*.h" \) -exec \
|
|
||||||
sed -i '/^#include .*\/\/ for/s/\/\/ for/\/\/ Para/' {} +
|
|
||||||
|
|
||||||
echo "✅ Script completado."
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
valgrind --suppressions=valgrind_exceptions \
|
|
||||||
--leak-check=full \
|
|
||||||
~/gitea/coffee_crisis_arcade_edition/coffee_crisis_arcade_edition \
|
|
||||||
> ~/gitea/coffee_crisis_arcade_edition/linux_utils/valgrind_out.txt 2>&1
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
[
|
|
||||||
{ "include": ["<SDL3/SDL_stdinc.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_assert.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_asyncio.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_atomic.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_audio.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_bits.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_blendmode.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_camera.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_clipboard.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_cpuinfo.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_dialog.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_endian.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_error.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_events.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_filesystem.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_gamepad.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_gpu.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_guid.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_haptic.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_hidapi.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_hints.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_init.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_iostream.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_joystick.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_keyboard.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_keycode.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_loadso.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_locale.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_log.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_messagebox.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_metal.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_misc.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_mouse.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_mutex.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_pen.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_pixels.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_platform.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_power.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_process.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_properties.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_rect.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_render.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_scancode.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_sensor.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_storage.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_surface.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_system.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_thread.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_time.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_timer.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_tray.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_touch.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_version.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_video.h>", "private", "<SDL3/SDL.h>", "public"] },
|
|
||||||
{ "include": ["<SDL3/SDL_oldnames.h>", "private", "<SDL3/SDL.h>", "public"] }
|
|
||||||
]
|
|
||||||
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
ignore_unversioned_libs
|
|
||||||
Memcheck:Leak
|
|
||||||
...
|
|
||||||
obj:*/lib*/lib*.so
|
|
||||||
}
|
|
||||||
{
|
|
||||||
ignore_versioned_libs
|
|
||||||
Memcheck:Leak
|
|
||||||
...
|
|
||||||
obj:*/lib*/lib*.so.*
|
|
||||||
}
|
|
||||||
BIN
release/arcade/splash.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
@@ -1,106 +0,0 @@
|
|||||||
# SDL3 CMake configuration file:
|
|
||||||
# This file is meant to be placed in Resources/CMake of a SDL3 framework
|
|
||||||
|
|
||||||
# INTERFACE_LINK_OPTIONS needs CMake 3.12
|
|
||||||
cmake_minimum_required(VERSION 3.12)
|
|
||||||
|
|
||||||
include(FeatureSummary)
|
|
||||||
set_package_properties(SDL3 PROPERTIES
|
|
||||||
URL "https://www.libsdl.org/"
|
|
||||||
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Copied from `configure_package_config_file`
|
|
||||||
macro(set_and_check _var _file)
|
|
||||||
set(${_var} "${_file}")
|
|
||||||
if(NOT EXISTS "${_file}")
|
|
||||||
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
|
|
||||||
endif()
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
# Copied from `configure_package_config_file`
|
|
||||||
macro(check_required_components _NAME)
|
|
||||||
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
|
||||||
if(NOT ${_NAME}_${comp}_FOUND)
|
|
||||||
if(${_NAME}_FIND_REQUIRED_${comp})
|
|
||||||
set(${_NAME}_FOUND FALSE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
set(SDL3_FOUND TRUE)
|
|
||||||
|
|
||||||
# Compute the installation prefix relative to this file.
|
|
||||||
set(_sdl3_framework_path "${CMAKE_CURRENT_LIST_DIR}") # > /SDL3.framework/Resources/CMake/
|
|
||||||
get_filename_component(_sdl3_framework_path "${_sdl3_framework_path}" REALPATH) # > /SDL3.framework/Versions/Current/Resources/CMake
|
|
||||||
get_filename_component(_sdl3_framework_path "${_sdl3_framework_path}" REALPATH) # > /SDL3.framework/Versions/A/Resources/CMake/
|
|
||||||
get_filename_component(_sdl3_framework_path "${_sdl3_framework_path}" PATH) # > /SDL3.framework/Versions/A/Resources/
|
|
||||||
get_filename_component(_sdl3_framework_path "${_sdl3_framework_path}" PATH) # > /SDL3.framework/Versions/A/
|
|
||||||
get_filename_component(_sdl3_framework_path "${_sdl3_framework_path}" PATH) # > /SDL3.framework/Versions/
|
|
||||||
get_filename_component(_sdl3_framework_path "${_sdl3_framework_path}" PATH) # > /SDL3.framework/
|
|
||||||
get_filename_component(_sdl3_framework_parent_path "${_sdl3_framework_path}" PATH) # > /
|
|
||||||
|
|
||||||
|
|
||||||
# All targets are created, even when some might not be requested though COMPONENTS.
|
|
||||||
# This is done for compatibility with CMake generated SDL3-target.cmake files.
|
|
||||||
|
|
||||||
if(NOT TARGET SDL3::Headers)
|
|
||||||
add_library(SDL3::Headers INTERFACE IMPORTED)
|
|
||||||
set_target_properties(SDL3::Headers
|
|
||||||
PROPERTIES
|
|
||||||
INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${_sdl3_framework_parent_path}\""
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
set(SDL3_Headers_FOUND TRUE)
|
|
||||||
|
|
||||||
if(NOT TARGET SDL3::SDL3-shared)
|
|
||||||
add_library(SDL3::SDL3-shared SHARED IMPORTED)
|
|
||||||
set_target_properties(SDL3::SDL3-shared
|
|
||||||
PROPERTIES
|
|
||||||
FRAMEWORK "TRUE"
|
|
||||||
IMPORTED_LOCATION "${_sdl3_framework_path}/SDL3"
|
|
||||||
INTERFACE_LINK_LIBRARIES "SDL3::Headers"
|
|
||||||
COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
|
|
||||||
INTERFACE_SDL3_SHARED "ON"
|
|
||||||
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
|
||||||
INTERFACE_SDL_VERSION "SDL3"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
set(SDL3_SDL3-shared_FOUND TRUE)
|
|
||||||
|
|
||||||
set(SDL3_SDL3-static FALSE)
|
|
||||||
|
|
||||||
set(SDL3_SDL3_test FALSE)
|
|
||||||
|
|
||||||
unset(_sdl3_framework_parent_path)
|
|
||||||
unset(_sdl3_framework_path)
|
|
||||||
|
|
||||||
if(SDL3_SDL3-shared_FOUND)
|
|
||||||
set(SDL3_SDL3_FOUND TRUE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
|
|
||||||
if(CMAKE_VERSION VERSION_LESS "3.18")
|
|
||||||
# Aliasing local targets is not supported on CMake < 3.18, so make it global.
|
|
||||||
add_library(${NEW_TARGET} INTERFACE IMPORTED)
|
|
||||||
set_target_properties(${NEW_TARGET} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET}")
|
|
||||||
else()
|
|
||||||
add_library(${NEW_TARGET} ALIAS ${TARGET})
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
# Make sure SDL3::SDL3 always exists
|
|
||||||
if(NOT TARGET SDL3::SDL3)
|
|
||||||
if(TARGET SDL3::SDL3-shared)
|
|
||||||
_sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-shared)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
check_required_components(SDL3)
|
|
||||||
|
|
||||||
set(SDL3_LIBRARIES SDL3::SDL3)
|
|
||||||
set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static)
|
|
||||||
set(SDL3_STATIC_PRIVATE_LIBS)
|
|
||||||
|
|
||||||
set(SDL3TEST_LIBRARY SDL3::SDL3_test)
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# based on the files generated by CMake's write_basic_package_version_file
|
|
||||||
|
|
||||||
# SDL CMake version configuration file:
|
|
||||||
# This file is meant to be placed in Resources/CMake of a SDL3 framework
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.12)
|
|
||||||
|
|
||||||
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_version.h")
|
|
||||||
message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the Resources/CMake directory of SDL2.framework")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(READ "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_version.h" _sdl_version_h)
|
|
||||||
string(REGEX MATCH "#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_version_h}")
|
|
||||||
set(_sdl_major "${CMAKE_MATCH_1}")
|
|
||||||
string(REGEX MATCH "#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_version_h}")
|
|
||||||
set(_sdl_minor "${CMAKE_MATCH_1}")
|
|
||||||
string(REGEX MATCH "#define[ \t]+SDL_MICRO_VERSION[ \t]+([0-9]+)" _sdl_micro_re "${_sdl_version_h}")
|
|
||||||
set(_sdl_micro "${CMAKE_MATCH_1}")
|
|
||||||
if(_sdl_major_re AND _sdl_minor_re AND _sdl_micro_re)
|
|
||||||
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}")
|
|
||||||
else()
|
|
||||||
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
unset(_sdl_major_re)
|
|
||||||
unset(_sdl_major)
|
|
||||||
unset(_sdl_minor_re)
|
|
||||||
unset(_sdl_minor)
|
|
||||||
unset(_sdl_micro_re)
|
|
||||||
unset(_sdl_micro)
|
|
||||||
|
|
||||||
if(PACKAGE_FIND_VERSION_RANGE)
|
|
||||||
# Package version must be in the requested version range
|
|
||||||
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
|
|
||||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
|
|
||||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
|
|
||||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
||||||
else()
|
|
||||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
|
||||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
||||||
else()
|
|
||||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
|
||||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
|
||||||
set(PACKAGE_VERSION_EXACT TRUE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# The SDL3.xcframework only contains 64-bit archives
|
|
||||||
if(NOT "${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
|
||||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
|
||||||
endif()
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
/*
|
|
||||||
Simple DirectMedia Layer
|
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any damages
|
|
||||||
arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any purpose,
|
|
||||||
including commercial applications, and to alter it and redistribute it
|
|
||||||
freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must not
|
|
||||||
claim that you wrote the original software. If you use this software
|
|
||||||
in a product, an acknowledgment in the product documentation would be
|
|
||||||
appreciated but is not required.
|
|
||||||
2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
misrepresented as being the original software.
|
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Main include header for the SDL library, version 3.2.20
|
|
||||||
*
|
|
||||||
* It is almost always best to include just this one header instead of
|
|
||||||
* picking out individual headers included here. There are exceptions to
|
|
||||||
* this rule--SDL_main.h is special and not included here--but usually
|
|
||||||
* letting SDL.h include the kitchen sink for you is the correct approach.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SDL_h_
|
|
||||||
#define SDL_h_
|
|
||||||
|
|
||||||
#include <SDL3/SDL_stdinc.h>
|
|
||||||
#include <SDL3/SDL_assert.h>
|
|
||||||
#include <SDL3/SDL_asyncio.h>
|
|
||||||
#include <SDL3/SDL_atomic.h>
|
|
||||||
#include <SDL3/SDL_audio.h>
|
|
||||||
#include <SDL3/SDL_bits.h>
|
|
||||||
#include <SDL3/SDL_blendmode.h>
|
|
||||||
#include <SDL3/SDL_camera.h>
|
|
||||||
#include <SDL3/SDL_clipboard.h>
|
|
||||||
#include <SDL3/SDL_cpuinfo.h>
|
|
||||||
#include <SDL3/SDL_dialog.h>
|
|
||||||
#include <SDL3/SDL_endian.h>
|
|
||||||
#include <SDL3/SDL_error.h>
|
|
||||||
#include <SDL3/SDL_events.h>
|
|
||||||
#include <SDL3/SDL_filesystem.h>
|
|
||||||
#include <SDL3/SDL_gamepad.h>
|
|
||||||
#include <SDL3/SDL_gpu.h>
|
|
||||||
#include <SDL3/SDL_guid.h>
|
|
||||||
#include <SDL3/SDL_haptic.h>
|
|
||||||
#include <SDL3/SDL_hidapi.h>
|
|
||||||
#include <SDL3/SDL_hints.h>
|
|
||||||
#include <SDL3/SDL_init.h>
|
|
||||||
#include <SDL3/SDL_iostream.h>
|
|
||||||
#include <SDL3/SDL_joystick.h>
|
|
||||||
#include <SDL3/SDL_keyboard.h>
|
|
||||||
#include <SDL3/SDL_keycode.h>
|
|
||||||
#include <SDL3/SDL_loadso.h>
|
|
||||||
#include <SDL3/SDL_locale.h>
|
|
||||||
#include <SDL3/SDL_log.h>
|
|
||||||
#include <SDL3/SDL_messagebox.h>
|
|
||||||
#include <SDL3/SDL_metal.h>
|
|
||||||
#include <SDL3/SDL_misc.h>
|
|
||||||
#include <SDL3/SDL_mouse.h>
|
|
||||||
#include <SDL3/SDL_mutex.h>
|
|
||||||
#include <SDL3/SDL_pen.h>
|
|
||||||
#include <SDL3/SDL_pixels.h>
|
|
||||||
#include <SDL3/SDL_platform.h>
|
|
||||||
#include <SDL3/SDL_power.h>
|
|
||||||
#include <SDL3/SDL_process.h>
|
|
||||||
#include <SDL3/SDL_properties.h>
|
|
||||||
#include <SDL3/SDL_rect.h>
|
|
||||||
#include <SDL3/SDL_render.h>
|
|
||||||
#include <SDL3/SDL_scancode.h>
|
|
||||||
#include <SDL3/SDL_sensor.h>
|
|
||||||
#include <SDL3/SDL_storage.h>
|
|
||||||
#include <SDL3/SDL_surface.h>
|
|
||||||
#include <SDL3/SDL_system.h>
|
|
||||||
#include <SDL3/SDL_thread.h>
|
|
||||||
#include <SDL3/SDL_time.h>
|
|
||||||
#include <SDL3/SDL_timer.h>
|
|
||||||
#include <SDL3/SDL_tray.h>
|
|
||||||
#include <SDL3/SDL_touch.h>
|
|
||||||
#include <SDL3/SDL_version.h>
|
|
||||||
#include <SDL3/SDL_video.h>
|
|
||||||
#include <SDL3/SDL_oldnames.h>
|
|
||||||
|
|
||||||
#endif /* SDL_h_ */
|
|
||||||
@@ -1,662 +0,0 @@
|
|||||||
/*
|
|
||||||
Simple DirectMedia Layer
|
|
||||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any damages
|
|
||||||
arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any purpose,
|
|
||||||
including commercial applications, and to alter it and redistribute it
|
|
||||||
freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must not
|
|
||||||
claim that you wrote the original software. If you use this software
|
|
||||||
in a product, an acknowledgment in the product documentation would be
|
|
||||||
appreciated but is not required.
|
|
||||||
2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
misrepresented as being the original software.
|
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* # CategoryAssert
|
|
||||||
*
|
|
||||||
* A helpful assertion macro!
|
|
||||||
*
|
|
||||||
* SDL assertions operate like your usual `assert` macro, but with some added
|
|
||||||
* features:
|
|
||||||
*
|
|
||||||
* - It uses a trick with the `sizeof` operator, so disabled assertions
|
|
||||||
* vaporize out of the compiled code, but variables only referenced in the
|
|
||||||
* assertion won't trigger compiler warnings about being unused.
|
|
||||||
* - It is safe to use with a dangling-else: `if (x) SDL_assert(y); else
|
|
||||||
* do_something();`
|
|
||||||
* - It works the same everywhere, instead of counting on various platforms'
|
|
||||||
* compiler and C runtime to behave.
|
|
||||||
* - It provides multiple levels of assertion (SDL_assert, SDL_assert_release,
|
|
||||||
* SDL_assert_paranoid) instead of a single all-or-nothing option.
|
|
||||||
* - It offers a variety of responses when an assertion fails (retry, trigger
|
|
||||||
* the debugger, abort the program, ignore the failure once, ignore it for
|
|
||||||
* the rest of the program's run).
|
|
||||||
* - It tries to show the user a dialog by default, if possible, but the app
|
|
||||||
* can provide a callback to handle assertion failures however they like.
|
|
||||||
* - It lets failed assertions be retried. Perhaps you had a network failure
|
|
||||||
* and just want to retry the test after plugging your network cable back
|
|
||||||
* in? You can.
|
|
||||||
* - It lets the user ignore an assertion failure, if there's a harmless
|
|
||||||
* problem that one can continue past.
|
|
||||||
* - It lets the user mark an assertion as ignored for the rest of the
|
|
||||||
* program's run; if there's a harmless problem that keeps popping up.
|
|
||||||
* - It provides statistics and data on all failed assertions to the app.
|
|
||||||
* - It allows the default assertion handler to be controlled with environment
|
|
||||||
* variables, in case an automated script needs to control it.
|
|
||||||
* - It can be used as an aid to Clang's static analysis; it will treat SDL
|
|
||||||
* assertions as universally true (under the assumption that you are serious
|
|
||||||
* about the asserted claims and that your debug builds will detect when
|
|
||||||
* these claims were wrong). This can help the analyzer avoid false
|
|
||||||
* positives.
|
|
||||||
*
|
|
||||||
* To use it: compile a debug build and just sprinkle around tests to check
|
|
||||||
* your code!
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SDL_assert_h_
|
|
||||||
#define SDL_assert_h_
|
|
||||||
|
|
||||||
#include <SDL3/SDL_stdinc.h>
|
|
||||||
|
|
||||||
#include <SDL3/SDL_begin_code.h>
|
|
||||||
/* Set up for C function definitions, even when using C++ */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The level of assertion aggressiveness.
|
|
||||||
*
|
|
||||||
* This value changes depending on compiler options and other preprocessor
|
|
||||||
* defines.
|
|
||||||
*
|
|
||||||
* It is currently one of the following values, but future SDL releases might
|
|
||||||
* add more:
|
|
||||||
*
|
|
||||||
* - 0: All SDL assertion macros are disabled.
|
|
||||||
* - 1: Release settings: SDL_assert disabled, SDL_assert_release enabled.
|
|
||||||
* - 2: Debug settings: SDL_assert and SDL_assert_release enabled.
|
|
||||||
* - 3: Paranoid settings: All SDL assertion macros enabled, including
|
|
||||||
* SDL_assert_paranoid.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_ASSERT_LEVEL SomeNumberBasedOnVariousFactors
|
|
||||||
|
|
||||||
#elif !defined(SDL_ASSERT_LEVEL)
|
|
||||||
#ifdef SDL_DEFAULT_ASSERT_LEVEL
|
|
||||||
#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
|
|
||||||
#elif defined(_DEBUG) || defined(DEBUG) || \
|
|
||||||
(defined(__GNUC__) && !defined(__OPTIMIZE__))
|
|
||||||
#define SDL_ASSERT_LEVEL 2
|
|
||||||
#else
|
|
||||||
#define SDL_ASSERT_LEVEL 1
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attempt to tell an attached debugger to pause.
|
|
||||||
*
|
|
||||||
* This allows an app to programmatically halt ("break") the debugger as if it
|
|
||||||
* had hit a breakpoint, allowing the developer to examine program state, etc.
|
|
||||||
*
|
|
||||||
* This is a macro--not a function--so that the debugger breaks on the source
|
|
||||||
* code line that used SDL_TriggerBreakpoint and not in some random guts of
|
|
||||||
* SDL. SDL_assert uses this macro for the same reason.
|
|
||||||
*
|
|
||||||
* If the program is not running under a debugger, SDL_TriggerBreakpoint will
|
|
||||||
* likely terminate the app, possibly without warning. If the current platform
|
|
||||||
* isn't supported, this macro is left undefined.
|
|
||||||
*
|
|
||||||
* \threadsafety It is safe to call this macro from any thread.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner
|
|
||||||
|
|
||||||
#elif defined(_MSC_VER) && _MSC_VER >= 1310
|
|
||||||
/* Don't include intrin.h here because it contains C++ code */
|
|
||||||
extern void __cdecl __debugbreak(void);
|
|
||||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
|
||||||
#elif defined(_MSC_VER) && defined(_M_IX86)
|
|
||||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
|
||||||
#elif defined(ANDROID)
|
|
||||||
#include <assert.h>
|
|
||||||
#define SDL_TriggerBreakpoint() assert(0)
|
|
||||||
#elif SDL_HAS_BUILTIN(__builtin_debugtrap)
|
|
||||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
|
||||||
#elif SDL_HAS_BUILTIN(__builtin_trap)
|
|
||||||
#define SDL_TriggerBreakpoint() __builtin_trap()
|
|
||||||
#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
|
||||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
|
||||||
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
|
||||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
|
|
||||||
#elif ( defined(SDL_PLATFORM_APPLE) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
|
||||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
|
||||||
#elif defined(SDL_PLATFORM_APPLE) && defined(__arm__)
|
|
||||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
|
|
||||||
#elif defined(_WIN32) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) )
|
|
||||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #0xF000\n\t" )
|
|
||||||
#elif defined(__GNUC__) || defined(__clang__)
|
|
||||||
#define SDL_TriggerBreakpoint() __builtin_trap() /* older gcc may not support SDL_HAS_BUILTIN(__builtin_trap) above */
|
|
||||||
#elif defined(__386__) && defined(__WATCOMC__)
|
|
||||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
|
||||||
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
|
||||||
#include <signal.h>
|
|
||||||
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
|
||||||
#else
|
|
||||||
/* SDL_TriggerBreakpoint is intentionally left undefined on unknown platforms. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A macro that reports the current function being compiled.
|
|
||||||
*
|
|
||||||
* If SDL can't figure how the compiler reports this, it will use "???".
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_FUNCTION __FUNCTION__
|
|
||||||
|
|
||||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
|
||||||
# define SDL_FUNCTION __func__
|
|
||||||
#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
|
|
||||||
# define SDL_FUNCTION __FUNCTION__
|
|
||||||
#else
|
|
||||||
# define SDL_FUNCTION "???"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A macro that reports the current file being compiled.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_FILE __FILE__
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A macro that reports the current line number of the file being compiled.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_LINE __LINE__
|
|
||||||
|
|
||||||
/*
|
|
||||||
sizeof (x) makes the compiler still parse the expression even without
|
|
||||||
assertions enabled, so the code is always checked at compile time, but
|
|
||||||
doesn't actually generate code for it, so there are no side effects or
|
|
||||||
expensive checks at run time, just the constant size of what x WOULD be,
|
|
||||||
which presumably gets optimized out as unused.
|
|
||||||
This also solves the problem of...
|
|
||||||
|
|
||||||
int somevalue = blah();
|
|
||||||
SDL_assert(somevalue == 1);
|
|
||||||
|
|
||||||
...which would cause compiles to complain that somevalue is unused if we
|
|
||||||
disable assertions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A macro for wrapping code in `do {} while (0);` without compiler warnings.
|
|
||||||
*
|
|
||||||
* Visual Studio with really aggressive warnings enabled needs this to avoid
|
|
||||||
* compiler complaints.
|
|
||||||
*
|
|
||||||
* the `do {} while (0);` trick is useful for wrapping code in a macro that
|
|
||||||
* may or may not be a single statement, to avoid various C language
|
|
||||||
* accidents.
|
|
||||||
*
|
|
||||||
* To use:
|
|
||||||
*
|
|
||||||
* ```c
|
|
||||||
* do { SomethingOnce(); } while (SDL_NULL_WHILE_LOOP_CONDITION (0));
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
|
||||||
|
|
||||||
#elif defined(_MSC_VER) /* Avoid /W4 warnings. */
|
|
||||||
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
|
||||||
this condition isn't constant. And looks like an owl's face! */
|
|
||||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
|
||||||
#else
|
|
||||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The macro used when an assertion is disabled.
|
|
||||||
*
|
|
||||||
* This isn't for direct use by apps, but this is the code that is inserted
|
|
||||||
* when an SDL_assert is disabled (perhaps in a release build).
|
|
||||||
*
|
|
||||||
* The code does nothing, but wraps `condition` in a sizeof operator, which
|
|
||||||
* generates no code and has no side effects, but avoid compiler warnings
|
|
||||||
* about unused variables.
|
|
||||||
*
|
|
||||||
* \param condition the condition to assert (but not actually run here).
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_disabled_assert(condition) \
|
|
||||||
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Possible outcomes from a triggered assertion.
|
|
||||||
*
|
|
||||||
* When an enabled assertion triggers, it may call the assertion handler
|
|
||||||
* (possibly one provided by the app via SDL_SetAssertionHandler), which will
|
|
||||||
* return one of these values, possibly after asking the user.
|
|
||||||
*
|
|
||||||
* Then SDL will respond based on this outcome (loop around to retry the
|
|
||||||
* condition, try to break in a debugger, kill the program, or ignore the
|
|
||||||
* problem).
|
|
||||||
*
|
|
||||||
* \since This enum is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
typedef enum SDL_AssertState
|
|
||||||
{
|
|
||||||
SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
|
|
||||||
SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
|
|
||||||
SDL_ASSERTION_ABORT, /**< Terminate the program. */
|
|
||||||
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
|
|
||||||
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
|
|
||||||
} SDL_AssertState;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Information about an assertion failure.
|
|
||||||
*
|
|
||||||
* This structure is filled in with information about a triggered assertion,
|
|
||||||
* used by the assertion handler, then added to the assertion report. This is
|
|
||||||
* returned as a linked list from SDL_GetAssertionReport().
|
|
||||||
*
|
|
||||||
* \since This struct is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
typedef struct SDL_AssertData
|
|
||||||
{
|
|
||||||
bool always_ignore; /**< true if app should always continue when assertion is triggered. */
|
|
||||||
unsigned int trigger_count; /**< Number of times this assertion has been triggered. */
|
|
||||||
const char *condition; /**< A string of this assert's test code. */
|
|
||||||
const char *filename; /**< The source file where this assert lives. */
|
|
||||||
int linenum; /**< The line in `filename` where this assert lives. */
|
|
||||||
const char *function; /**< The name of the function where this assert lives. */
|
|
||||||
const struct SDL_AssertData *next; /**< next item in the linked list. */
|
|
||||||
} SDL_AssertData;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Never call this directly.
|
|
||||||
*
|
|
||||||
* Use the SDL_assert macros instead.
|
|
||||||
*
|
|
||||||
* \param data assert data structure.
|
|
||||||
* \param func function name.
|
|
||||||
* \param file file name.
|
|
||||||
* \param line line number.
|
|
||||||
* \returns assert state.
|
|
||||||
*
|
|
||||||
* \threadsafety It is safe to call this function from any thread.
|
|
||||||
*
|
|
||||||
* \since This function is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
extern SDL_DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data,
|
|
||||||
const char *func,
|
|
||||||
const char *file, int line) SDL_ANALYZER_NORETURN;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The macro used when an assertion triggers a breakpoint.
|
|
||||||
*
|
|
||||||
* This isn't for direct use by apps; use SDL_assert or SDL_TriggerBreakpoint
|
|
||||||
* instead.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_AssertBreakpoint() SDL_TriggerBreakpoint()
|
|
||||||
|
|
||||||
#elif !defined(SDL_AssertBreakpoint)
|
|
||||||
# if defined(ANDROID) && defined(assert)
|
|
||||||
/* Define this as empty in case assert() is defined as SDL_assert */
|
|
||||||
# define SDL_AssertBreakpoint()
|
|
||||||
# else
|
|
||||||
# define SDL_AssertBreakpoint() SDL_TriggerBreakpoint()
|
|
||||||
# endif
|
|
||||||
#endif /* !SDL_AssertBreakpoint */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The macro used when an assertion is enabled.
|
|
||||||
*
|
|
||||||
* This isn't for direct use by apps, but this is the code that is inserted
|
|
||||||
* when an SDL_assert is enabled.
|
|
||||||
*
|
|
||||||
* The `do {} while(0)` avoids dangling else problems:
|
|
||||||
*
|
|
||||||
* ```c
|
|
||||||
* if (x) SDL_assert(y); else blah();
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* ... without the do/while, the "else" could attach to this macro's "if". We
|
|
||||||
* try to handle just the minimum we need here in a macro...the loop, the
|
|
||||||
* static vars, and break points. The heavy lifting is handled in
|
|
||||||
* SDL_ReportAssertion().
|
|
||||||
*
|
|
||||||
* \param condition the condition to assert.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_enabled_assert(condition) \
|
|
||||||
do { \
|
|
||||||
while ( !(condition) ) { \
|
|
||||||
static struct SDL_AssertData sdl_assert_data = { false, 0, #condition, NULL, 0, NULL, NULL }; \
|
|
||||||
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
|
|
||||||
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
|
|
||||||
continue; /* go again. */ \
|
|
||||||
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
|
|
||||||
SDL_AssertBreakpoint(); \
|
|
||||||
} \
|
|
||||||
break; /* not retrying. */ \
|
|
||||||
} \
|
|
||||||
} while (SDL_NULL_WHILE_LOOP_CONDITION)
|
|
||||||
|
|
||||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An assertion test that is normally performed only in debug builds.
|
|
||||||
*
|
|
||||||
* This macro is enabled when the SDL_ASSERT_LEVEL is >= 2, otherwise it is
|
|
||||||
* disabled. This is meant to only do these tests in debug builds, so they can
|
|
||||||
* tend to be more expensive, and they are meant to bring everything to a halt
|
|
||||||
* when they fail, with the programmer there to assess the problem.
|
|
||||||
*
|
|
||||||
* In short: you can sprinkle these around liberally and assume they will
|
|
||||||
* evaporate out of the build when building for end-users.
|
|
||||||
*
|
|
||||||
* When assertions are disabled, this wraps `condition` in a `sizeof`
|
|
||||||
* operator, which means any function calls and side effects will not run, but
|
|
||||||
* the compiler will not complain about any otherwise-unused variables that
|
|
||||||
* are only referenced in the assertion.
|
|
||||||
*
|
|
||||||
* One can set the environment variable "SDL_ASSERT" to one of several strings
|
|
||||||
* ("abort", "break", "retry", "ignore", "always_ignore") to force a default
|
|
||||||
* behavior, which may be desirable for automation purposes. If your platform
|
|
||||||
* requires GUI interfaces to happen on the main thread but you're debugging
|
|
||||||
* an assertion in a background thread, it might be desirable to set this to
|
|
||||||
* "break" so that your debugger takes control as soon as assert is triggered,
|
|
||||||
* instead of risking a bad UI interaction (deadlock, etc) in the application.
|
|
||||||
*
|
|
||||||
* \param condition boolean value to test.
|
|
||||||
*
|
|
||||||
* \threadsafety It is safe to call this macro from any thread.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_assert(condition) if (assertion_enabled && (condition)) { trigger_assertion; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An assertion test that is performed even in release builds.
|
|
||||||
*
|
|
||||||
* This macro is enabled when the SDL_ASSERT_LEVEL is >= 1, otherwise it is
|
|
||||||
* disabled. This is meant to be for tests that are cheap to make and
|
|
||||||
* extremely unlikely to fail; generally it is frowned upon to have an
|
|
||||||
* assertion failure in a release build, so these assertions generally need to
|
|
||||||
* be of more than life-and-death importance if there's a chance they might
|
|
||||||
* trigger. You should almost always consider handling these cases more
|
|
||||||
* gracefully than an assert allows.
|
|
||||||
*
|
|
||||||
* When assertions are disabled, this wraps `condition` in a `sizeof`
|
|
||||||
* operator, which means any function calls and side effects will not run, but
|
|
||||||
* the compiler will not complain about any otherwise-unused variables that
|
|
||||||
* are only referenced in the assertion.
|
|
||||||
*
|
|
||||||
* One can set the environment variable "SDL_ASSERT" to one of several strings
|
|
||||||
* ("abort", "break", "retry", "ignore", "always_ignore") to force a default
|
|
||||||
* behavior, which may be desirable for automation purposes. If your platform
|
|
||||||
* requires GUI interfaces to happen on the main thread but you're debugging
|
|
||||||
* an assertion in a background thread, it might be desirable to set this to
|
|
||||||
* "break" so that your debugger takes control as soon as assert is triggered,
|
|
||||||
* instead of risking a bad UI interaction (deadlock, etc) in the application.
|
|
||||||
* *
|
|
||||||
*
|
|
||||||
* \param condition boolean value to test.
|
|
||||||
*
|
|
||||||
* \threadsafety It is safe to call this macro from any thread.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_assert_release(condition) SDL_disabled_assert(condition)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An assertion test that is performed only when built with paranoid settings.
|
|
||||||
*
|
|
||||||
* This macro is enabled when the SDL_ASSERT_LEVEL is >= 3, otherwise it is
|
|
||||||
* disabled. This is a higher level than both release and debug, so these
|
|
||||||
* tests are meant to be expensive and only run when specifically looking for
|
|
||||||
* extremely unexpected failure cases in a special build.
|
|
||||||
*
|
|
||||||
* When assertions are disabled, this wraps `condition` in a `sizeof`
|
|
||||||
* operator, which means any function calls and side effects will not run, but
|
|
||||||
* the compiler will not complain about any otherwise-unused variables that
|
|
||||||
* are only referenced in the assertion.
|
|
||||||
*
|
|
||||||
* One can set the environment variable "SDL_ASSERT" to one of several strings
|
|
||||||
* ("abort", "break", "retry", "ignore", "always_ignore") to force a default
|
|
||||||
* behavior, which may be desirable for automation purposes. If your platform
|
|
||||||
* requires GUI interfaces to happen on the main thread but you're debugging
|
|
||||||
* an assertion in a background thread, it might be desirable to set this to
|
|
||||||
* "break" so that your debugger takes control as soon as assert is triggered,
|
|
||||||
* instead of risking a bad UI interaction (deadlock, etc) in the application.
|
|
||||||
*
|
|
||||||
* \param condition boolean value to test.
|
|
||||||
*
|
|
||||||
* \threadsafety It is safe to call this macro from any thread.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
|
||||||
|
|
||||||
/* Enable various levels of assertions. */
|
|
||||||
#elif SDL_ASSERT_LEVEL == 0 /* assertions disabled */
|
|
||||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
|
||||||
# define SDL_assert_release(condition) SDL_disabled_assert(condition)
|
|
||||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
|
||||||
#elif SDL_ASSERT_LEVEL == 1 /* release settings. */
|
|
||||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
|
||||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
|
||||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
|
||||||
#elif SDL_ASSERT_LEVEL == 2 /* debug settings. */
|
|
||||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
|
||||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
|
||||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
|
||||||
#elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
|
|
||||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
|
||||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
|
||||||
# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
|
|
||||||
#else
|
|
||||||
# error Unknown assertion level.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An assertion test that is always performed.
|
|
||||||
*
|
|
||||||
* This macro is always enabled no matter what SDL_ASSERT_LEVEL is set to. You
|
|
||||||
* almost never want to use this, as it could trigger on an end-user's system,
|
|
||||||
* crashing your program.
|
|
||||||
*
|
|
||||||
* One can set the environment variable "SDL_ASSERT" to one of several strings
|
|
||||||
* ("abort", "break", "retry", "ignore", "always_ignore") to force a default
|
|
||||||
* behavior, which may be desirable for automation purposes. If your platform
|
|
||||||
* requires GUI interfaces to happen on the main thread but you're debugging
|
|
||||||
* an assertion in a background thread, it might be desirable to set this to
|
|
||||||
* "break" so that your debugger takes control as soon as assert is triggered,
|
|
||||||
* instead of risking a bad UI interaction (deadlock, etc) in the application.
|
|
||||||
*
|
|
||||||
* \param condition boolean value to test.
|
|
||||||
*
|
|
||||||
* \threadsafety It is safe to call this macro from any thread.
|
|
||||||
*
|
|
||||||
* \since This macro is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A callback that fires when an SDL assertion fails.
|
|
||||||
*
|
|
||||||
* \param data a pointer to the SDL_AssertData structure corresponding to the
|
|
||||||
* current assertion.
|
|
||||||
* \param userdata what was passed as `userdata` to SDL_SetAssertionHandler().
|
|
||||||
* \returns an SDL_AssertState value indicating how to handle the failure.
|
|
||||||
*
|
|
||||||
* \threadsafety This callback may be called from any thread that triggers an
|
|
||||||
* assert at any time.
|
|
||||||
*
|
|
||||||
* \since This datatype is available since SDL 3.2.0.
|
|
||||||
*/
|
|
||||||
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
|
||||||
const SDL_AssertData *data, void *userdata);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set an application-defined assertion handler.
|
|
||||||
*
|
|
||||||
* This function allows an application to show its own assertion UI and/or
|
|
||||||
* force the response to an assertion failure. If the application doesn't
|
|
||||||
* provide this, SDL will try to do the right thing, popping up a
|
|
||||||
* system-specific GUI dialog, and probably minimizing any fullscreen windows.
|
|
||||||
*
|
|
||||||
* This callback may fire from any thread, but it runs wrapped in a mutex, so
|
|
||||||
* it will only fire from one thread at a time.
|
|
||||||
*
|
|
||||||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
|
||||||
*
|
|
||||||
* \param handler the SDL_AssertionHandler function to call when an assertion
|
|
||||||
* fails or NULL for the default handler.
|
|
||||||
* \param userdata a pointer that is passed to `handler`.
|
|
||||||
*
|
|
||||||
* \threadsafety It is safe to call this function from any thread.
|
|
||||||
*
|
|
||||||
* \since This function is available since SDL 3.2.0.
|
|
||||||
*
|
|
||||||
* \sa SDL_GetAssertionHandler
|
|
||||||
*/
|
|
||||||
extern SDL_DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
|
||||||
SDL_AssertionHandler handler,
|
|
||||||
void *userdata);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the default assertion handler.
|
|
||||||
*
|
|
||||||
* This returns the function pointer that is called by default when an
|
|
||||||
* assertion is triggered. This is an internal function provided by SDL, that
|
|
||||||
* is used for assertions when SDL_SetAssertionHandler() hasn't been used to
|
|
||||||
* provide a different function.
|
|
||||||
*
|
|
||||||
* \returns the default SDL_AssertionHandler that is called when an assert
|
|
||||||
* triggers.
|
|
||||||
*
|
|
||||||
* \threadsafety It is safe to call this function from any thread.
|
|
||||||
*
|
|
||||||
* \since This function is available since SDL 3.2.0.
|
|
||||||
*
|
|
||||||
* \sa SDL_GetAssertionHandler
|
|
||||||
*/
|
|
||||||
extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the current assertion handler.
|
|
||||||
*
|
|
||||||
* This returns the function pointer that is called when an assertion is
|
|
||||||
* triggered. This is either the value last passed to
|
|
||||||
* SDL_SetAssertionHandler(), or if no application-specified function is set,
|
|
||||||
* is equivalent to calling SDL_GetDefaultAssertionHandler().
|
|
||||||
*
|
|
||||||
* The parameter `puserdata` is a pointer to a void*, which will store the
|
|
||||||
* "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
|
|
||||||
* will always be NULL for the default handler. If you don't care about this
|
|
||||||
* data, it is safe to pass a NULL pointer to this function to ignore it.
|
|
||||||
*
|
|
||||||
* \param puserdata pointer which is filled with the "userdata" pointer that
|
|
||||||
* was passed to SDL_SetAssertionHandler().
|
|
||||||
* \returns the SDL_AssertionHandler that is called when an assert triggers.
|
|
||||||
*
|
|
||||||
* \threadsafety It is safe to call this function from any thread.
|
|
||||||
*
|
|
||||||
* \since This function is available since SDL 3.2.0.
|
|
||||||
*
|
|
||||||
* \sa SDL_SetAssertionHandler
|
|
||||||
*/
|
|
||||||
extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a list of all assertion failures.
|
|
||||||
*
|
|
||||||
* This function gets all assertions triggered since the last call to
|
|
||||||
* SDL_ResetAssertionReport(), or the start of the program.
|
|
||||||
*
|
|
||||||
* The proper way to examine this data looks something like this:
|
|
||||||
*
|
|
||||||
* ```c
|
|
||||||
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
|
||||||
* while (item) {
|
|
||||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
|
||||||
* item->condition, item->function, item->filename,
|
|
||||||
* item->linenum, item->trigger_count,
|
|
||||||
* item->always_ignore ? "yes" : "no");
|
|
||||||
* item = item->next;
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* \returns a list of all failed assertions or NULL if the list is empty. This
|
|
||||||
* memory should not be modified or freed by the application. This
|
|
||||||
* pointer remains valid until the next call to SDL_Quit() or
|
|
||||||
* SDL_ResetAssertionReport().
|
|
||||||
*
|
|
||||||
* \threadsafety This function is not thread safe. Other threads calling
|
|
||||||
* SDL_ResetAssertionReport() simultaneously, may render the
|
|
||||||
* returned pointer invalid.
|
|
||||||
*
|
|
||||||
* \since This function is available since SDL 3.2.0.
|
|
||||||
*
|
|
||||||
* \sa SDL_ResetAssertionReport
|
|
||||||
*/
|
|
||||||
extern SDL_DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear the list of all assertion failures.
|
|
||||||
*
|
|
||||||
* This function will clear the list of all assertions triggered up to that
|
|
||||||
* point. Immediately following this call, SDL_GetAssertionReport will return
|
|
||||||
* no items. In addition, any previously-triggered assertions will be reset to
|
|
||||||
* a trigger_count of zero, and their always_ignore state will be false.
|
|
||||||
*
|
|
||||||
* \threadsafety This function is not thread safe. Other threads triggering an
|
|
||||||
* assertion, or simultaneously calling this function may cause
|
|
||||||
* memory leaks or crashes.
|
|
||||||
*
|
|
||||||
* \since This function is available since SDL 3.2.0.
|
|
||||||
*
|
|
||||||
* \sa SDL_GetAssertionReport
|
|
||||||
*/
|
|
||||||
extern SDL_DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#include <SDL3/SDL_close_code.h>
|
|
||||||
|
|
||||||
#endif /* SDL_assert_h_ */
|
|
||||||