dev: fix several little things *

- Makefile: remove flags -lcitro2d -lcitro3d
- .gitignore: add /mlx3ds.lst
- mlx_internal.h: header protection + little fix
This commit is contained in:
Zy 2024-10-08 19:32:03 +02:00
parent 13b93106ee
commit 97db58cd33
3 changed files with 13 additions and 6 deletions

2
.gitignore vendored
View file

@ -45,3 +45,5 @@ output/
# VSCode # VSCode
/.vscode/ /.vscode/
/mlx3ds.lst

View file

@ -65,7 +65,7 @@ LDFLAGS = -specs=3dsx.specs $(ARCH) -Wl,-Map,$(notdir $*.map)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# Libraries needed to link into the executable. # Libraries needed to link into the executable.
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
LIBS := -lcitro2d -lcitro3d -lctru -lm LIBS := -lctru -lm
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing # list of directories containing libraries, this must be the top level containing

View file

@ -1,5 +1,5 @@
/** /**
* mlx_internal.c * mlx_internal.h
* for the project "MinilibX for 3DS" * for the project "MinilibX for 3DS"
* by Zy * by Zy
* at https://github.com/frzysk/mlx3ds * at https://github.com/frzysk/mlx3ds
@ -9,15 +9,18 @@
* Internal utils of the mlx3ds. * Internal utils of the mlx3ds.
*/ */
#include <stdbool.h> #ifndef MLX_INTERNAL_H
#include "3ds.h" # define MLX_INTERNAL_H
# include <stdbool.h>
# include "3ds.h"
/// @brief Write an error message and exit the program. /// @brief Write an error message and exit the program.
/// ///
/// @param msg Message to write. Must use less than 38 colons. /// @param msg Message to write. Must use less than 38 colons.
void mlx3ds_internal_fatalerror(const char *msg); void mlx3ds_internal_fatalerror(const char *msg);
typedef struct s_internal_win t_internal_win; struct s_internal_win;
/// @brief Content of the mlx connection identifier. /// @brief Content of the mlx connection identifier.
typedef struct s_internal_mlx typedef struct s_internal_mlx
@ -25,7 +28,7 @@ typedef struct s_internal_mlx
/// @brief is true after mlx_init() was called, is false before. /// @brief is true after mlx_init() was called, is false before.
bool is_init_called; bool is_init_called;
/// @brief Window displayed on the top screen. /// @brief Window displayed on the top screen.
t_internal_win *top_window; struct s_internal_win *top_window;
} t_internal_mlx; } t_internal_mlx;
/// @brief Represents a window. /// @brief Represents a window.
@ -69,3 +72,5 @@ void mlx3ds_internal_drawstart(
/// @param win_ptr Reference to the window to draw on. /// @param win_ptr Reference to the window to draw on.
void mlx3ds_internal_drawend( void mlx3ds_internal_drawend(
t_internal_mlx *mlx_ptr, t_internal_win *win_ptr); t_internal_mlx *mlx_ptr, t_internal_win *win_ptr);
#endif