-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Se han hecho las preparaciones finales para subir el código a github. Los cambios incluyen lo siguiente: - Se agregó la licencia Unlicense a todos los archivos de código - Se agregaron comentarios al archivo de la fuente Zilla Slab para indicar que la fuente está bajo la licencia SIL OFT. - Se agregaron los archivos de Markdown para github junto con su respectiva carpeta data para las imágenes. - Lo más importante, se copió el archivo game.h al repositorio permitiendo que por primera vez el código se pueda compilar de forma independiente. Todas las versiones anteriores a este commit se pueden compilar pero requerirán cambios menores a los archivos game.h y CMakeLists.txt. Con estos cambios, el código está finalmente listo para subirlo a github.
- Loading branch information
1 parent
7ae00e0
commit 25ac5a3
Showing
10 changed files
with
249 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
:octocat::octocat::octocat: To read the english version of this document [click here](./README.md). :octocat::octocat::octocat: | ||
|
||
[![monstrochan](./data/monstrochan.png)](http://monstrochan.org/l/) | ||
- - - | ||
# monstrominas | ||
#### *monstrominas* por *monstruosoft* por *monstrochan* | ||
|
||
*monstrominas* es un clón de Buscaminas escrito para el Reto de la toja azul 2019 en [monstrochan.org](http://monstrochan.org/l/). | ||
|
||
![monstrominas](./data/monstrominas.png) | ||
|
||
- - - | ||
## Características | ||
* Imagen de fondo. | ||
* Tamaño interactivo (usa la rueda del mouse). | ||
|
||
## Compilar | ||
En **Linux**, el archivo `CMakeLists.txt` incluído debería ser suficiente para compilar el proyecto si se encuentran instaladas las librerías requeridas. | ||
|
||
* Asegúrate de tener los siguientes paquetes instalados: | ||
* **CMake** | ||
* **Allegro 5** versión para desarrolladores | ||
* Crea una carpeta con el nombre *build* dentro de la carpeta del proyecto y compila usando *CMake + make*: | ||
``` | ||
monstruosoft@PC:~$ cd monstrominas | ||
monstruosoft@PC:~/monstrominas$ mkdir build | ||
monstruosoft@PC:~/monstrominas$ cd build | ||
monstruosoft@PC:~/monstrominas/build$ cmake .. | ||
monstruosoft@PC:~/monstrominas/build$ make | ||
``` | ||
|
||
En **Windows** debería ser posible compilar el juego usando *CMake y MinGW* pero buena suerte con eso ya que yo no puedo probar a compilarlo en Windows. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
:octocat::octocat::octocat: Para leer la versión en español de este documento [haz click aquí](./LEEME.md). :octocat::octocat::octocat: | ||
|
||
[![monstrochan](./data/monstrochan.png)](http://monstrochan.org/l/) | ||
- - - | ||
# monstrominas | ||
#### *monstrominas* by *monstruosoft* by *monstrochan* | ||
|
||
*monstrominas* is a Minesweeper clone written for the "Reto de la toja azul 2019" challenge at [monstrochan.org](http://monstrochan.org/l/). | ||
|
||
![monstrominas](./data/monstrominas.png) | ||
|
||
- - - | ||
## Features | ||
* Background image (because, why not?). | ||
* Interactive minefield size (use mouse wheel). | ||
|
||
## Building | ||
On **Linux**, the included `CMakeLists.txt` should build the project given that the necessary libraries are installed on your system. | ||
|
||
* Make sure you have the required packages installed: | ||
* **CMake** | ||
* **Allegro 5** development files | ||
* Create a *build* directory inside the project directory and build it using *CMake + make*: | ||
``` | ||
monstruosoft@PC:~$ cd monstrominas | ||
monstruosoft@PC:~/monstrominas$ mkdir build | ||
monstruosoft@PC:~/monstrominas$ cd build | ||
monstruosoft@PC:~/monstrominas/build$ cmake .. | ||
monstruosoft@PC:~/monstrominas/build$ make | ||
``` | ||
|
||
On **Windows**, you should be able to build the game using *CMake + MinGW*. Good luck with that, though, since I can't test the build process on Windows. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <https://unlicense.org> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/** | ||
* @file game.h | ||
* | ||
* @section LICENSE License | ||
* | ||
* This is free and unencumbered software released into the public domain. | ||
* | ||
* Anyone is free to copy, modify, publish, use, compile, sell, or | ||
* distribute this software, either in source code form or as a compiled | ||
* binary, for any purpose, commercial or non-commercial, and by any | ||
* means. | ||
* | ||
* In jurisdictions that recognize copyright laws, the author or authors | ||
* of this software dedicate any and all copyright interest in the | ||
* software to the public domain. We make this dedication for the benefit | ||
* of the public at large and to the detriment of our heirs and | ||
* successors. We intend this dedication to be an overt act of | ||
* relinquishment in perpetuity of all present and future rights to this | ||
* software under copyright law. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* For more information, please refer to <https://unlicense.org> | ||
* | ||
* @section DESCRIPTION Description | ||
* | ||
* This is an early implementation of isolated game logic by monstruosoft. | ||
* This filedefines basic typedefs and function prototypes. | ||
*/ | ||
|
||
// Game mode flags to be applied by select_game_mode() | ||
#define GM_DISABLE_KEYBOARD_INPUT 1 | ||
#define GM_DISABLE_MOUSE_INPUT 2 | ||
#define GM_ENABLE_KEYBOARD_INPUT 4 | ||
#define GM_ENABLE_MOUSE_INPUT 8 | ||
|
||
|
||
|
||
enum {GM_GAME, GM_WIN}; // Game modes | ||
|
||
|
||
|
||
typedef struct GAME_ACTOR { | ||
int x; | ||
int y; | ||
int age; | ||
int state; | ||
bool active; | ||
bool visible; | ||
void *data; | ||
void (*control) (); | ||
void (*logic) (); | ||
void (*draw) (); | ||
void (*print) (); | ||
void (*destroy)(); | ||
} GAME_ACTOR; | ||
|
||
|
||
|
||
void select_game_mode(int mode, int flags); | ||
|
||
// void game_logic(ALLEGRO_EVENT *event); | ||
// void game_update(); | ||
|
||
// void win_logic(ALLEGRO_EVENT *event); | ||
// void win_update(); | ||
|
||
|
||
|
||
GAME_ACTOR *game_actor_create(); // Create a dummy game actor instance | ||
void game_actor_print(GAME_ACTOR *actor); | ||
void game_actor_draw(GAME_ACTOR *actor); | ||
void game_actor_logic(GAME_ACTOR *actor, ALLEGRO_EVENT *event); | ||
void game_actor_destroy(GAME_ACTOR *actor); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters