Skip to content

Commit

Permalink
Ver.1.17.0-stable
Browse files Browse the repository at this point in the history
[ESP]
- Se ha añadido el parámetro "err" a los métodos de carga de recursos de la clase "NGN_Resources", el cual permite escoger si mostrar y registrar el error en caso de que el recurso no se encuentre.
- Se han actualizado los scripts de instalación de la librería para los entornos Linux y Raspberry Pi OS.
- Se ha realizado una optimización menor en la lectura de teclas/botones de la clase NGN_Input.
- Se ha corregido un error en la clase NGN_Camera, que impedía habilitar correctamente los fondos virtuales cuando se usaban texturas.
- Se ha optimizado el algoritmo de actualización de la clase NGN_Camera.
- Se ha añadido el método CheckIfRegistered() en la clase NGN_Camera, el cual verifica si un sprite está registrado actualmente en la cámara.
- Se ha añadido el método GetLookAt() en la clase NGN_Camera, el cual devuelve el punto al que está mirando la cámara en el mundo.
- Se ha añadido el método GetRendererSize() en la clase NGN_Camera, el cual devuelve el tamaño del renderizador de la cámara.
- Se ha añadido el método Shake() en la clase NGN_Camera, el cual crea un efecto de temblor en la escena.
- En los templates, se han añadido scripts para la búsqueda de dependencias en los entornos Linux y Raspberry Pi OS.
- En Windows, se ha actualizado la compilación de la librería usando las versiones SDL2 2.30.5, SDL_TTF 2.22.0 y LodePNG 20230410.

[ENG]
- The "err" parameter has been added to the resource loading methods of the "NGN_Resources" class, allowing you to choose whether to display and log the error if the resource cannot be found.
- The installation scripts for the library have been updated for Linux and Raspberry Pi OS environments.
- A minor optimisation has been made to the key/button reading in the NGN_Input class.
- A bug has been fixed in the NGN_Camera class, which prevented virtual backgrounds from being correctly enabled when using textures.
- The update algorithm in the NGN_Camera class has been optimised.
- The CheckIfRegistered() method has been added to the NGN_Camera class, which checks if a sprite is currently registered with the camera.
- The GetLookAt() method has been added to the NGN_Camera class, which returns the point the camera is looking at in the world.
- The GetRendererSize() method has been added to the NGN_Camera class, which returns the size of the camera’s renderer.
- The Shake() method has been added to the NGN_Camera class, which creates a shaking effect in the scene.
- In the templates, scripts have been added for dependency searching in Linux and Raspberry Pi OS environments.
- On Windows, the library has been rebuilt using SDL2 2.30.5, SDL_TTF 2.22.0, and LodePNG 20230410 versions.
  • Loading branch information
knightfox75 committed Jul 29, 2024
1 parent e460f0c commit 7dd58c5
Show file tree
Hide file tree
Showing 299 changed files with 2,967 additions and 1,616 deletions.
64 changes: 56 additions & 8 deletions Docs/[ENG] User manual/ngn_camera [ENG].txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NGN_CAMERA.H
v1.16.0-stable
v1.17.0-stable
English

--------------------------------------------------------------------------------
Expand Down Expand Up @@ -195,34 +195,82 @@ ngn->camera->Reset();

--------------------------------------------------------------------------------

- Method
bool CheckIfRegistered(NGN_Sprite* sprite);
bool CheckIfRegistered(NGN_Texture* texture);

- Description
Determines if a sprite or a texture is currently registered and managed by the 2D camera.

- Example
bool i = ngn->camera->CheckIfRegistered(bullet->sprite);

--------------------------------------------------------------------------------

- Method
Vector2 GetLookAt();

- Description
Returns a Vector2 representing the position the camera is currently looking at in the world.

- Example
Vector2 look = ngn->camera->GetLookAt();

--------------------------------------------------------------------------------

- Method
Size2I32 GetRendererSize();

- Description
Returns a Size2I32 variable with the current size of the camera's rendering area.

- Example
Size2I32 renderer_area = ngn->camera->GetRendererSize();

--------------------------------------------------------------------------------

- Method
void Shake(float intensity, float frequency, bool split = true);

- Description
Creates a vertical shaking effect in the camera's scene.
The "intensity" parameter specifies the magnitude of the effect in pixels.
The "frequency" parameter specifies the speed of the effect (in radians per second).
The "split" parameter determines whether the effect is applied separately to the different layers of the scene.

- Example
ngn->camera->Shake(3.0f, 0.2f, false);

--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
PROPIEDADES de la clase
PROPERTIES of the class
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

- Propiedad
- Property
Size2I world

- Description
Almacena el tamaño actual del mundo.
Stores the current size of the world.

--------------------------------------------------------------------------------

- Propiedad
- Property
Vector2I position

- Description
Almacena la posición actual de la cámara en el mundo.
Stores the current position of the camera in the world.

--------------------------------------------------------------------------------

- Propiedad
- Property
bool animation_pause

- Description
Pausa la animación de todos los sprites si su valor es TRUE.
Pauses the animation of all sprites if its value is TRUE.

--------------------------------------------------------------------------------
18 changes: 9 additions & 9 deletions Docs/[ENG] User manual/ngn_resources [ENG].txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NGN_RESOURCES.H
v1.16.0-stable
v1.17.0-stable
English

--------------------------------------------------------------------------------
Expand Down Expand Up @@ -111,16 +111,16 @@ if (!ngn->resources->Load("local", "data/resources.txt")) return false;
--------------------------------------------------------------------------------

- Method
NGN_TextureData* GetTexture(std::string repo_name, std::string resource_name);
NGN_TiledBgData* GetTiledbg(std::string repo_name, std::string resource_name);
NGN_SpriteData* GetSprite(std::string repo_name, std::string resource_name);
NGN_CollisionMapData* GetCmap(std::string repo_name, std::string resource_name);
NGN_AudioClipData* GetSfx(std::string repo_name, std::string resource_name);
std::vector<std::string> GetTxt(std::string repo_name, std::string resource_name);
NGN_TextFont* GetTypeface(std::string repo_name, std::string resource_name);
NGN_TextureData* GetTexture(std::string repo_name, std::string resource_name, bool err = true);
NGN_TiledBgData* GetTiledbg(std::string repo_name, std::string resource_name, bool err = true);
NGN_SpriteData* GetSprite(std::string repo_name, std::string resource_name, bool err = true);
NGN_CollisionMapData* GetCmap(std::string repo_name, std::string resource_name, bool err = true);
NGN_AudioClipData* GetSfx(std::string repo_name, std::string resource_name, bool err = true);
std::vector<std::string> GetTxt(std::string repo_name, std::string resource_name, bool err = true);
NGN_TextFont* GetTypeface(std::string repo_name, std::string resource_name, bool err = true);

- Description
Returns a memory pointer to the resource with the requested name or a vector with the content in the case of text files. If the resource or the repository is not found, it returns NULL or an empty vector.
Returns the memory pointer to the resource with the requested name or a vector with the content in the case of text files. If the resource or repository is not found, it returns NULL or an empty vector. If the "err" parameter is TRUE (by default), it also prints the error in the debug console and in the log file if the resource is not found.

- Example
NGN_Texture* bg = new NGN_Texture(ngn->resources->GetTexture(“local”, “background”), 0, 0);
Expand Down
50 changes: 49 additions & 1 deletion Docs/[ESP] Manual del usuario/ngn_camera [ESP].txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NGN_CAMERA.H
v1.16.0-stable
v1.17.0-stable
Español

--------------------------------------------------------------------------------
Expand Down Expand Up @@ -194,6 +194,54 @@ ngn->camera->Reset();

--------------------------------------------------------------------------------

- Método
bool CheckIfRegistered(NGN_Sprite* sprite);
bool CheckIfRegistered(NGN_Texture* texture);

- Descripción
Determina si un sprite o una textura están actualmente registrados y gestionados por la cámara 2D.

- Ejemplo
bool i = ngn->camera->CheckIfRegistered(bullet->sprite);

--------------------------------------------------------------------------------

- Método
Vector2 GetLookAt();

- Descripción
Devuelve un Vector2 con la posición a la que está mirando actualmente la cámara en el mundo.

- Ejemplo
Vector2 look = ngn->camera->GetLookAt();

--------------------------------------------------------------------------------

- Método
Size2I32 GetRendererSize();

- Descripción
Devuelve una variable Size2I32 con el tamaño actual del área de renderizado de la cámara.

- Ejemplo
Size2I32 renderer_area = ngn->camera->GetRendererSize();

--------------------------------------------------------------------------------

- Método
void Shake(float intensity, float frequency, bool split = true);

- Descripción
Genera un efecto de temblor vertical en la escena de la cámara.
El parámetro "intensity" especifica la magnitud del efecto en píxeles.
El parámetro "frequency" especifica la velocidad del efecto (en radianes por segundo).
El parámetro "split" determina si el efecto se aplica por separado a las diferentes capas de la escena.

- Ejemplo
ngn->camera->Shake(3.0f, 0.2f, false);

--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
Expand Down
18 changes: 9 additions & 9 deletions Docs/[ESP] Manual del usuario/ngn_resources [ESP].txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NGN_RESOURCES.H
v1.16.0-stable
v1.17.0-stable
Español

--------------------------------------------------------------------------------
Expand Down Expand Up @@ -109,16 +109,16 @@ if (!ngn->resources->Load("local", "data/resources.txt")) return false;
--------------------------------------------------------------------------------

- Métodos
NGN_TextureData* GetTexture(std::string repo_name, std::string resource_name);
NGN_TiledBgData* GetTiledbg(std::string repo_name, std::string resource_name);
NGN_SpriteData* GetSprite(std::string repo_name, std::string resource_name);
NGN_CollisionMapData* GetCmap(std::string repo_name, std::string resource_name);
NGN_AudioClipData* GetSfx(std::string repo_name, std::string resource_name);
std::vector<std::string> GetTxt(std::string repo_name, std::string resource_name);
NGN_TextFont* GetTypeface(std::string repo_name, std::string resource_name);
NGN_TextureData* GetTexture(std::string repo_name, std::string resource_name, bool err = true);
NGN_TiledBgData* GetTiledbg(std::string repo_name, std::string resource_name, bool err = true);
NGN_SpriteData* GetSprite(std::string repo_name, std::string resource_name, bool err = true);
NGN_CollisionMapData* GetCmap(std::string repo_name, std::string resource_name, bool err = true);
NGN_AudioClipData* GetSfx(std::string repo_name, std::string resource_name, bool err = true);
std::vector<std::string> GetTxt(std::string repo_name, std::string resource_name, bool err = true);
NGN_TextFont* GetTypeface(std::string repo_name, std::string resource_name, bool err = true);

- Descripción
Devuelve el puntero de memoria al recurso con el nombre solicitado, o un vector con el contenido en el caso de los archivos de texto. Si el recurso o el repositorio no se encuentran, devuelve NULL o un vector vacío.
Devuelve el puntero de memoria al recurso con el nombre solicitado, o un vector con el contenido en el caso de los archivos de texto. Si el recurso o el repositorio no se encuentran, devuelve NULL o un vector vacío. Si el parámetro "err" está en TRUE (por defecto), además imprime en la consola de depuración y en el archivo de registro el error en caso de no encontrar el recurso.

- Ejemplo
NGN_Texture* bg = new NGN_Texture(ngn->resources->GetTexture(“local”, “background”), 0, 0);
Expand Down
16 changes: 16 additions & 0 deletions Docs/changelog [ENG].txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
--------------------------------------------------------------------------------
2024-07-29 Ver.1.17.0-stable
--------------------------------------------------------------------------------
- The "err" parameter has been added to the resource loading methods of the "NGN_Resources" class, allowing you to choose whether to display and log the error if the resource cannot be found.
- The installation scripts for the library have been updated for Linux and Raspberry Pi OS environments.
- A minor optimisation has been made to the key/button reading in the NGN_Input class.
- A bug has been fixed in the NGN_Camera class, which prevented virtual backgrounds from being correctly enabled when using textures.
- The update algorithm in the NGN_Camera class has been optimised.
- The CheckIfRegistered() method has been added to the NGN_Camera class, which checks if a sprite is currently registered with the camera.
- The GetLookAt() method has been added to the NGN_Camera class, which returns the point the camera is looking at in the world.
- The GetRendererSize() method has been added to the NGN_Camera class, which returns the size of the camera’s renderer.
- The Shake() method has been added to the NGN_Camera class, which creates a shaking effect in the scene.
- In the templates, scripts have been added for dependency searching in Linux and Raspberry Pi OS environments.
- On Windows, the library has been rebuilt using SDL2 2.30.5, SDL_TTF 2.22.0, and LodePNG 20230410 versions.


--------------------------------------------------------------------------------
2024-03-16 Ver.1.16.0-Stable
--------------------------------------------------------------------------------
Expand Down
16 changes: 16 additions & 0 deletions Docs/changelog [ESP].txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
--------------------------------------------------------------------------------
2024-07-29 Ver.1.17.0-stable
--------------------------------------------------------------------------------
- Se ha añadido el parámetro "err" a los métodos de carga de recursos de la clase "NGN_Resources", el cual permite escoger si mostrar y registrar el error en caso de que el recurso no se encuentre.
- Se han actualizado los scripts de instalación de la librería para los entornos Linux y Raspberry Pi OS.
- Se ha realizado una optimización menor en la lectura de teclas/botones de la clase NGN_Input.
- Se ha corregido un error en la clase NGN_Camera, que impedía habilitar correctamente los fondos virtuales cuando se usaban texturas.
- Se ha optimizado el algoritmo de actualización de la clase NGN_Camera.
- Se ha añadido el método CheckIfRegistered() en la clase NGN_Camera, el cual verifica si un sprite está registrado actualmente en la cámara.
- Se ha añadido el método GetLookAt() en la clase NGN_Camera, el cual devuelve el punto al que está mirando la cámara en el mundo.
- Se ha añadido el método GetRendererSize() en la clase NGN_Camera, el cual devuelve el tamaño del renderizador de la cámara.
- Se ha añadido el método Shake() en la clase NGN_Camera, el cual crea un efecto de temblor en la escena.
- En los templates, se han añadido scripts para la búsqueda de dependencias en los entornos Linux y Raspberry Pi OS.
- En Windows, se ha actualizado la compilación de la librería usando las versiones SDL2 2.30.5, SDL_TTF 2.22.0 y LodePNG 20230410.


--------------------------------------------------------------------------------
2024-03-16 Ver.1.16.0-estable
--------------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions Examples/01_texture_loading/Texture_Loading.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@
<Target title="RASPBIAN - Debug">
<Option platforms="Unix;" />
<Option output="./Demo_Texture_Loading" prefix_auto="1" extension_auto="1" />
<Option working_dir="" />
<Option object_output="obj/raspbian_debug/" />
<Option type="5" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-Og" />
Expand Down Expand Up @@ -188,6 +187,8 @@
</Compiler>
<Unit filename="resource/resource.rc">
<Option compilerVar="WINDRES" />
<Option target="WIN - Debug" />
<Option target="WIN - Release" />
</Unit>
<Unit filename="source/demo/demo.cpp" />
<Unit filename="source/demo/demo.h" />
Expand Down
16 changes: 8 additions & 8 deletions Examples/01_texture_loading/source/demo/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
Archivo de Demo (Programa)
Proyecto iniciado el 1 de Febrero del 2016
(c) 2016 - 2023 by Cesar Rincon "NightFox"
(c) 2016 - 2024 by Cesar Rincon "NightFox"
https://nightfoxandco.com
[email protected]
Requiere N'gine 1.15.0-stable o superior
(c) 2016 - 2023 by Cesar Rincon "NightFox"
Requiere N'gine 1.17.0-stable o superior
(c) 2016 - 2024 by Cesar Rincon "NightFox"
https://nightfoxandco.com
Requiere GCC 11.3.0 MinGW64 (SEH) - 64-bits
Requiere GCC 13.2.0 MinGW64 (SEH) - 64-bits
https://www.mingw-w64.org/
Requiere SDL2 (2.26.3) - 64-bits
Requiere SDL2 (2.30.5) - 64-bits
http://www.libsdl.org/download-2.0.php
Requiere SDL2_TTF (2.20.2) - 64-bits
Requiere SDL2_TTF (2.22.0) - 64-bits
http://www.libsdl.org/download-2.0.php
Requiere SFML (3.0.0) - 64-bits
http://www.sfml-dev.org/
Requiere LodePNG (20220717)
(c) 2005 - 2022 by Lode Vandevenne
Requiere LodePNG (20230410)
(c) 2005 - 2023 by Lode Vandevenne
http://lodev.org/lodepng/
******************************************************************************/
Expand Down
16 changes: 8 additions & 8 deletions Examples/01_texture_loading/source/demo/demo.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
Archivo de Demo (Declaraciones)
Proyecto iniciado el 1 de Febrero del 2016
(c) 2016 - 2023 by Cesar Rincon "NightFox"
(c) 2016 - 2024 by Cesar Rincon "NightFox"
https://nightfoxandco.com
[email protected]
Requiere N'gine 1.15.0-stable o superior
(c) 2016 - 2023 by Cesar Rincon "NightFox"
Requiere N'gine 1.17.0-stable o superior
(c) 2016 - 2024 by Cesar Rincon "NightFox"
https://nightfoxandco.com
Requiere GCC 11.3.0 MinGW64 (SEH) - 64-bits
Requiere GCC 13.2.0 MinGW64 (SEH) - 64-bits
https://www.mingw-w64.org/
Requiere SDL2 (2.26.3) - 64-bits
Requiere SDL2 (2.30.5) - 64-bits
http://www.libsdl.org/download-2.0.php
Requiere SDL2_TTF (2.20.2) - 64-bits
Requiere SDL2_TTF (2.22.0) - 64-bits
http://www.libsdl.org/download-2.0.php
Requiere SFML (3.0.0) - 64-bits
http://www.sfml-dev.org/
Requiere LodePNG (20220717)
(c) 2005 - 2022 by Lode Vandevenne
Requiere LodePNG (20230410)
(c) 2005 - 2023 by Lode Vandevenne
http://lodev.org/lodepng/
******************************************************************************/
Expand Down
16 changes: 8 additions & 8 deletions Examples/01_texture_loading/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
Ejemplo de carga de texturas en formato PNG
Proyecto iniciado el 1 de Febrero del 2016
(c) 2016 - 2023 by Cesar Rincon "NightFox"
(c) 2016 - 2024 by Cesar Rincon "NightFox"
https://nightfoxandco.com
[email protected]
Requiere N'gine 1.15.0-stable o superior
(c) 2016 - 2023 by Cesar Rincon "NightFox"
Requiere N'gine 1.17.0-stable o superior
(c) 2016 - 2024 by Cesar Rincon "NightFox"
https://nightfoxandco.com
Requiere GCC 11.3.0 MinGW64 (SEH) - 64-bits
Requiere GCC 13.2.0 MinGW64 (SEH) - 64-bits
https://www.mingw-w64.org/
Requiere SDL2 (2.26.3) - 64-bits
Requiere SDL2 (2.30.5) - 64-bits
http://www.libsdl.org/download-2.0.php
Requiere SDL2_TTF (2.20.2) - 64-bits
Requiere SDL2_TTF (2.22.0) - 64-bits
http://www.libsdl.org/download-2.0.php
Requiere SFML (3.0.0) - 64-bits
http://www.sfml-dev.org/
Requiere LodePNG (20220717)
(c) 2005 - 2022 by Lode Vandevenne
Requiere LodePNG (20230410)
(c) 2005 - 2023 by Lode Vandevenne
http://lodev.org/lodepng/
******************************************************************************/
Expand Down
Loading

0 comments on commit 7dd58c5

Please sign in to comment.