Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
redone committed Sep 25, 2023
1 parent b065d82 commit 108fb9f
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ find_package(OpenGL REQUIRED)

target_link_libraries(mlx42 OpenGL::GL)
if (NOT glfw3_FOUND AND GLFW_FETCH)
message(STATUS "Install GLFW to supress this message")
message(STATUS "Install GLFW to suppress this message")
message(STATUS "Please wait, fetching GLFW ...")
include(${CMAKE_DIR}/LinkGLFW.cmake)
LinkGLFW(mlx42)
Expand Down
6 changes: 3 additions & 3 deletions docs/42.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ It addresses one of the main problems at 42, which is that although it is a tech
| 19 || Inquired and interested on it but no further details |
| Hive || |
| Vienna || |
| Seoul || I didnt really understand why but basically as long as Paris says no they will too |
| Seoul || I didn't really understand why but basically as long as Paris says no they will too |
| Madrid || They Tolerate it but it's up to the evaluator to decide because it's not part of the subject. |
| Porto || Not Auth from Paris|
| Lisboa || Not Auth from Paris|
Expand All @@ -63,7 +63,7 @@ The miniLibX has many problems that have been around for almost 10+ years:

- `Poor documentation`: The documentation consists of a few man pages that are outdated and an online documentation created by another student. It's understandable that students have to learn on their own, but a library with an extensive API requires proper documentation for anyone to start understanding it.

- `Poor execution`: There are multiple versions: OpenGL, Swift, and X11. Instead of becoming better with each new iteration, they stay the same with no real improvement. It should be future-proof and not dependent on a specific platform. People are struggling with the there being so many different versions that they start loosing track where the problem actually is.
- `Poor execution`: There are multiple versions: OpenGL, Swift, and X11. Instead of becoming better with each new iteration, they stay the same with no real improvement. It should be future-proof and not dependent on a specific platform. People are struggling with the there being so many different versions that they start losing track where the problem actually is.

- `Not cross-platform`: Students constantly encounter the same problem: at school they work with MacOS, but at home they use Linux. Or they write their project on Linux, but want to show it to their parents using Windows or MacOS. At each point, miniLibX fails to fill that gap. The pandemic in 2019 showed just how much students struggled to evaluate each other using different machines and versions.

Expand Down Expand Up @@ -189,7 +189,7 @@ Q: **_"Who will maintain MLX42? How long can this be guaranteed?"_**
A: Currently it is being maintained by `lde-la-h` (W2Wizard). However commits from the 42 Pedago or really anyone are very much welcome.
I myself have been taking care of it since the 1st of January 2021 and aim to continue to support it until I can't.

Once the time comes, someone else will take the lead of maintaing the library whoever that may be.
Once the time comes, someone else will take the lead of maintaining the library whoever that may be.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/Hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Generic hooks execute each frame and are useful for stuff that needs to be updat
* @param[in] mlx The MLX instance handle.
* @param[in] f The function.
* @param[in] param The parameter to pass onto the function.
* @returns Wether the hook was added successfuly.
* @returns Wether the hook was added successfully.
*/
bool mlx_loop_hook(mlx_t* mlx, void (*f)(void*), void* param);
```
Expand Down
2 changes: 1 addition & 1 deletion docs/Shaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void main()

Shaders aren't really meant to be used by students but are more there for the convenience of developers. (though some advanced students might make some use of them)

# Compiliation
# Compilation

Shaders are converted into a `.c` appropriate format and then compiled into the library and referenced via a `extern` global variable appropriately named `vert_shader` & `frag_shader`. The reason this is done is to keep the final game/executable portable, that is being able to use it at any given location within a filesystem, while still being easy to work on the shaders instead of having to mess with it in the `.c` files directly.

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ A: Officially, _no_. However, ask your head of studies first about using it, see

Q: **_"Is it faster?"_**

A: From my personal projects there was a considerable peformance gain, especially when compiled with `-Ofast`. Projects such as FDF could rotate their maps mindblowingly smooth and even larger maps with a width and height of 1000+ points moved/rotated relatively smooth, so in short, yes.
A: From my personal projects there was a considerable performance gain, especially when compiled with `-Ofast`. Projects such as FDF could rotate their maps mindblowingly smooth and even larger maps with a width and height of 1000+ points moved/rotated relatively smooth, so in short, yes.

Q: **_"Can I just drag and drop it into my old project and just not do anything?"_**

Expand Down
4 changes: 2 additions & 2 deletions include/MLX42/MLX42.h
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ void mlx_get_window_pos(mlx_t* mlx, int32_t* xpos, int32_t* ypos);

/**
* Changes the window size to the newly specified values.
* Use this to update the window width and heigth values in the mlx handle.
* Use this to update the window width and height values in the mlx handle.
*
* @param[in] mlx The MLX instance handle.
* @param[in] new_width The new desired width.
Expand Down Expand Up @@ -857,7 +857,7 @@ mlx_image_t* mlx_new_image(mlx_t* mlx, uint32_t width, uint32_t height);
* NOT the pointer! It will become invalid!
*
* WARNING: Try to display as few images on the window as possible,
* drawing too many images will cause a loss in peformance!
* drawing too many images will cause a loss in performance!
*
* @param[in] mlx The MLX instance handle.
* @param[in] img The image to draw on the screen.
Expand Down
6 changes: 3 additions & 3 deletions include/lodepng/lodepng.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings);
typedef enum LodePNGFilterStrategy {
/*every filter at zero*/
LFS_ZERO = 0,
/*every filter at 1, 2, 3 or 4 (paeth), unlike LFS_ZERO not a good choice, but for testing*/
/*every filter at 1, 2, 3 or 4 (path), unlike LFS_ZERO not a good choice, but for testing*/
LFS_ONE = 1,
LFS_TWO = 2,
LFS_THREE = 3,
Expand Down Expand Up @@ -835,7 +835,7 @@ typedef struct LodePNGEncoderSettings {
const unsigned char* predefined_filters;

/*force creating a PLTE chunk if colortype is 2 or 6 (= a suggested palette).
If colortype is 3, PLTE is always created. If color type is explicitely set
If colortype is 3, PLTE is always created. If color type is explicitly set
to a grayscale type (1 or 4), this is not done and is ignored. If enabling this,
a palette must be present in the info_png.
NOTE: enabling this may worsen compression if auto_convert is used to choose
Expand Down Expand Up @@ -1874,7 +1874,7 @@ state.decoder.remember_unknown_chunks: whether to read in unknown chunks
state.info_raw.colortype: desired color type for decoded image
state.info_raw.bitdepth: desired bit depth for decoded image
state.info_raw....: more color settings, see struct LodePNGColorMode
state.info_png....: no settings for decoder but ouput, see struct LodePNGInfo
state.info_png....: no settings for decoder but output, see struct LodePNGInfo
For encoding:
Expand Down
8 changes: 4 additions & 4 deletions lib/png/lodepng.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ static unsigned inflateNoCompression(ucvector* out, LodePNGBitReader* reader,
/*read the literal data: LEN bytes are now stored in the out buffer*/
if(bytepos + LEN > size) return 23; /*error: reading outside of in buffer*/

/*out->data can be NULL (when LEN is zero), and arithmetics on NULL ptr is undefined*/
/*out->data can be NULL (when LEN is zero), and arithmetic on NULL ptr is undefined*/
if (LEN) {
lodepng_memcpy(out->data + out->size - LEN, reader->data + bytepos, LEN);
bytepos += LEN;
Expand Down Expand Up @@ -4237,7 +4237,7 @@ static unsigned auto_choose_color(LodePNGColorMode* mode_out,

#endif /* #ifdef LODEPNG_COMPILE_ENCODER */

/*Paeth predictor, used by PNG filter type 4*/
/*Path predictor, used by PNG filter type 4*/
static unsigned char paethPredictor(unsigned char a, unsigned char b, unsigned char c) {
/* the subtractions of unsigned char cast it to a signed type.
With gcc, short is faster than int, with clang int is as fast (as of april 2023)*/
Expand Down Expand Up @@ -5854,7 +5854,7 @@ static void filterScanline(unsigned char* out, const unsigned char* scanline, co
for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - (scanline[i - bytewidth] >> 1);
}
break;
case 4: /*Paeth*/
case 4: /*Path*/
if(prevline) {
/*paethPredictor(0, prevline[i], 0) is always prevline[i]*/
for(i = 0; i != bytewidth; ++i) out[i] = (scanline[i] - prevline[i]);
Expand Down Expand Up @@ -6390,7 +6390,7 @@ unsigned lodepng_encode(unsigned char** out, size_t* outsize,
if(state->encoder.force_palette) {
if(info.color.colortype != LCT_GREY && info.color.colortype != LCT_GREY_ALPHA &&
(auto_color.colortype == LCT_GREY || auto_color.colortype == LCT_GREY_ALPHA)) {
/*user speficially forced a PLTE palette, so cannot convert to grayscale types because
/*user specifically forced a PLTE palette, so cannot convert to grayscale types because
the PNG specification only allows writing a suggested palette in PLTE for truecolor types*/
allow_convert = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mlx_put_pixel.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "MLX42/MLX42_Int.h"

// BUG: Linux may experience a red hue instead due to endiannes
// BUG: Linux may experience a red hue instead due to endianness
void mlx_draw_pixel(uint8_t* pixel, uint32_t color)
{
*(pixel++) = (uint8_t)(color >> 24);
Expand Down
6 changes: 3 additions & 3 deletions src/textures/mlx_xpm42.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ static uint8_t mlx_parse_hex_channel(char* channel)
* @param line The line to parse.
* @param ctable The color hash table.
* @param s Size of the hash table
* @return True or false depending on if it sucessfully parsed the line.
* @return True or false depending on if it successfully parsed the line.
*/
static bool mlx_insert_xpm_entry(xpm_t* xpm, char* line, uint32_t* ctable, size_t s)
{
// NOTE: uintptr because windows likes to complain...
// Verify the length of the Pixel string by checking backwards for the first
// occurence of a space and then check the distance by comparing with cpp.
// occurrence of a space and then check the distance by comparing with cpp.
if (((uintptr_t)strrchr(line, ' ') - (uintptr_t)line) != (uint64_t)xpm->cpp)
return (false);
if (!isspace(line[xpm->cpp]) || line[xpm->cpp + 1] != '#' || !isalnum(line[xpm->cpp + 2]))
Expand All @@ -91,7 +91,7 @@ static bool mlx_insert_xpm_entry(xpm_t* xpm, char* line, uint32_t* ctable, size_
* @param file The filepath to the XPM42 file.
* @param ctable The color hash table.
* @param s Size of the hash table.
* @return True or false depending on if it sucessfully parsed the line.
* @return True or false depending on if it successfully parsed the line.
*/
static bool mlx_read_data(xpm_t* xpm, FILE* file, uint32_t* ctable, size_t s)
{
Expand Down

0 comments on commit 108fb9f

Please sign in to comment.