Skip to content

Commit

Permalink
try to remove patch
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m committed Oct 24, 2024
1 parent 95d2f95 commit 0ddb83a
Show file tree
Hide file tree
Showing 21 changed files with 248 additions and 1,499 deletions.
1,261 changes: 0 additions & 1,261 deletions mangle_names.patch

This file was deleted.

81 changes: 41 additions & 40 deletions src/raylib.nim

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions src/raylib/external/jar_xm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2373,23 +2373,23 @@ void jar_xm_debug(jar_xm_context_t *ctx) {
int x = 0, y = 0;

// DEBUG VARIABLES
y += size; rlDrawText(TextFormat("CUR TBL = %i", ctx->current_table_index), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("CUR PAT = %i", ctx->module.pattern_table[ctx->current_table_index]), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("POS JMP = %d", ctx->position_jump), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("JMP DST = %i", ctx->jump_dest), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("PTN BRK = %d", ctx->pattern_break), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("CUR ROW = %i", ctx->current_row), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("JMP ROW = %i", ctx->jump_row), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("ROW LCT = %i", ctx->row_loop_count), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("LCT = %i", ctx->loop_count), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("MAX LCT = %i", ctx->max_loop_count), x, y, size, WHITE);
y += size; DrawText(TextFormat("CUR TBL = %i", ctx->current_table_index), x, y, size, WHITE);
y += size; DrawText(TextFormat("CUR PAT = %i", ctx->module.pattern_table[ctx->current_table_index]), x, y, size, WHITE);
y += size; DrawText(TextFormat("POS JMP = %d", ctx->position_jump), x, y, size, WHITE);
y += size; DrawText(TextFormat("JMP DST = %i", ctx->jump_dest), x, y, size, WHITE);
y += size; DrawText(TextFormat("PTN BRK = %d", ctx->pattern_break), x, y, size, WHITE);
y += size; DrawText(TextFormat("CUR ROW = %i", ctx->current_row), x, y, size, WHITE);
y += size; DrawText(TextFormat("JMP ROW = %i", ctx->jump_row), x, y, size, WHITE);
y += size; DrawText(TextFormat("ROW LCT = %i", ctx->row_loop_count), x, y, size, WHITE);
y += size; DrawText(TextFormat("LCT = %i", ctx->loop_count), x, y, size, WHITE);
y += size; DrawText(TextFormat("MAX LCT = %i", ctx->max_loop_count), x, y, size, WHITE);
x = size * 12; y = 0;

y += size; rlDrawText(TextFormat("CUR TCK = %i", ctx->current_tick), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("XTR TCK = %i", ctx->extra_ticks), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("TCK/ROW = %i", ctx->tempo), x, y, size, ORANGE);
y += size; rlDrawText(TextFormat("SPL TCK = %f", ctx->remaining_samples_in_tick), x, y, size, WHITE);
y += size; rlDrawText(TextFormat("GEN SPL = %i", ctx->generated_samples), x, y, size, WHITE);
y += size; DrawText(TextFormat("CUR TCK = %i", ctx->current_tick), x, y, size, WHITE);
y += size; DrawText(TextFormat("XTR TCK = %i", ctx->extra_ticks), x, y, size, WHITE);
y += size; DrawText(TextFormat("TCK/ROW = %i", ctx->tempo), x, y, size, ORANGE);
y += size; DrawText(TextFormat("SPL TCK = %f", ctx->remaining_samples_in_tick), x, y, size, WHITE);
y += size; DrawText(TextFormat("GEN SPL = %i", ctx->generated_samples), x, y, size, WHITE);
y += size * 7;

x = 0;
Expand All @@ -2404,13 +2404,13 @@ void jar_xm_debug(jar_xm_context_t *ctx) {
};
};
if (i == ctx->current_table_index) {
// rlDrawText(TextFormat("%02X", ctx->current_tick), i * size * 2, y - size, size, WHITE);
// DrawText(TextFormat("%02X", ctx->current_tick), i * size * 2, y - size, size, WHITE);
DrawRectangle(i * size * 2, y, size * 2, size, RED);
rlDrawText(TextFormat("%02X", ctx->current_row), i * size * 2, y - size, size, YELLOW);
DrawText(TextFormat("%02X", ctx->current_row), i * size * 2, y - size, size, YELLOW);
} else {
DrawRectangle(i * size * 2, y, size * 2, size, ORANGE);
};
rlDrawText(TextFormat("%02X", ctx->module.pattern_table[i]), i * size * 2, y, size, WHITE);
DrawText(TextFormat("%02X", ctx->module.pattern_table[i]), i * size * 2, y, size, WHITE);
};
y += size;

Expand All @@ -2421,10 +2421,10 @@ void jar_xm_debug(jar_xm_context_t *ctx) {
x += 2 * size;
for(uint8_t i = 0; i < ctx->module.num_channels; i++) {
DrawRectangle(x, y, 8 * size, size, PURPLE);
rlDrawText("N", x, y, size, YELLOW);
rlDrawText("I", x + size * 2, y, size, YELLOW);
rlDrawText("V", x + size * 4, y, size, YELLOW);
rlDrawText("FX", x + size * 6, y, size, YELLOW);
DrawText("N", x, y, size, YELLOW);
DrawText("I", x + size * 2, y, size, YELLOW);
DrawText("V", x + size * 4, y, size, YELLOW);
DrawText("FX", x + size * 6, y, size, YELLOW);
x += 9 * size;
};
x += size;
Expand All @@ -2433,7 +2433,7 @@ void jar_xm_debug(jar_xm_context_t *ctx) {
x = 0;
if (j >=0 && j < (cur->num_rows)) {
DrawRectangle(x, y, size * 2, size, BROWN);
rlDrawText(TextFormat("%02X",j), x, y, size, WHITE);
DrawText(TextFormat("%02X",j), x, y, size, WHITE);
x += 2 * size;
for(uint8_t i = 0; i < ctx->module.num_channels; i++) {
if (j==(ctx->current_row)) {
Expand All @@ -2443,20 +2443,20 @@ void jar_xm_debug(jar_xm_context_t *ctx) {
};
jar_xm_pattern_slot_t *s = cur->slots + j * ctx->module.num_channels + i;
// jar_xm_channel_context_t *ch = ctx->channels + i;
if (s->note > 0) {rlDrawText(TextFormat("%s%s", xm_note_chr(s->note), xm_octave_chr(s->note) ), x, y, size, WHITE);} else {rlDrawText("...", x, y, size, GRAY);};
if (s->note > 0) {DrawText(TextFormat("%s%s", xm_note_chr(s->note), xm_octave_chr(s->note) ), x, y, size, WHITE);} else {DrawText("...", x, y, size, GRAY);};
if (s->instrument > 0) {
rlDrawText(TextFormat("%02X", s->instrument), x + size * 2, y, size, WHITE);
DrawText(TextFormat("%02X", s->instrument), x + size * 2, y, size, WHITE);
if (s->volume_column == 0) {
rlDrawText(TextFormat("%02X", 64), x + size * 4, y, size, YELLOW);
DrawText(TextFormat("%02X", 64), x + size * 4, y, size, YELLOW);
};
} else {
rlDrawText("..", x + size * 2, y, size, GRAY);
DrawText("..", x + size * 2, y, size, GRAY);
if (s->volume_column == 0) {
rlDrawText("..", x + size * 4, y, size, GRAY);
DrawText("..", x + size * 4, y, size, GRAY);
};
};
if (s->volume_column > 0) {rlDrawText(TextFormat("%02X", (s->volume_column - 16)), x + size * 4, y, size, WHITE);};
if (s->effect_type > 0 || s->effect_param > 0) {rlDrawText(TextFormat("%s%02X", xm_effect_chr(s->effect_type), s->effect_param), x + size * 6, y, size, WHITE);};
if (s->volume_column > 0) {DrawText(TextFormat("%02X", (s->volume_column - 16)), x + size * 4, y, size, WHITE);};
if (s->effect_type > 0 || s->effect_param > 0) {DrawText(TextFormat("%s%02X", xm_effect_chr(s->effect_type), s->effect_param), x + size * 6, y, size, WHITE);};
x += 9 * size;
};
};
Expand Down
3 changes: 3 additions & 0 deletions src/raylib/naylib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define NOGDI
#define NOUSER
#include "raylib.h"
10 changes: 5 additions & 5 deletions src/raylib/platforms/rcore_android.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ const char *GetClipboardText(void)
}

// Show mouse cursor
void rlShowCursor(void)
void ShowCursor(void)
{
CORE.Input.Mouse.cursorHidden = false;
}
Expand Down Expand Up @@ -1004,24 +1004,24 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd)
#if defined(SUPPORT_MODULE_RSHAPES)
// Set font white rectangle for shapes drawing, so shapes and text can be batched together
// WARNING: rshapes module is required, if not available, default internal white rectangle is used
rlRectangle rec = GetFontDefault().recs[95];
Rectangle rec = GetFontDefault().recs[95];
if (CORE.Window.flags & FLAG_MSAA_4X_HINT)
{
// NOTE: We try to maxime rec padding to avoid pixel bleeding on MSAA filtering
SetShapesTexture(GetFontDefault().texture, (rlRectangle){ rec.x + 2, rec.y + 2, 1, 1 });
SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 2, rec.y + 2, 1, 1 });
}
else
{
// NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding
SetShapesTexture(GetFontDefault().texture, (rlRectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
}
#endif
#else
#if defined(SUPPORT_MODULE_RSHAPES)
// Set default texture and rectangle to be used for shapes drawing
// NOTE: rlgl default texture is a 1x1 pixel UNCOMPRESSED_R8G8B8A8
Texture2D texture = { rlGetTextureIdDefault(), 1, 1, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
SetShapesTexture(texture, (rlRectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes
SetShapesTexture(texture, (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/raylib/platforms/rcore_desktop_glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ const char *GetClipboardText(void)
}

// Show mouse cursor
void rlShowCursor(void)
void ShowCursor(void)
{
glfwSetInputMode(platform.handle, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
CORE.Input.Mouse.cursorHidden = false;
Expand Down
2 changes: 1 addition & 1 deletion src/raylib/platforms/rcore_desktop_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ const char *GetClipboardText(void)
}

// Show mouse cursor
void rlShowCursor(void)
void ShowCursor(void)
{
SDL_ShowCursor(SDL_ENABLE);

Expand Down
4 changes: 2 additions & 2 deletions src/raylib/platforms/rcore_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ typedef struct {
char currentButtonStateEvdev[MAX_MOUSE_BUTTONS]; // Holds the new mouse state for the next polling event to grab
bool cursorRelative; // Relative cursor mode
int mouseFd; // File descriptor for the evdev mouse/touch/gestures
rlRectangle absRange; // Range of values for absolute pointing devices (touchscreens)
Rectangle absRange; // Range of values for absolute pointing devices (touchscreens)
int touchSlot; // Hold the touch slot number of the currently being sent multitouch block

// Gamepad data
Expand Down Expand Up @@ -510,7 +510,7 @@ const char *GetClipboardText(void)
}

// Show mouse cursor
void rlShowCursor(void)
void ShowCursor(void)
{
CORE.Input.Mouse.cursorHidden = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/raylib/platforms/rcore_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ const char *GetClipboardText(void)
}

// Show mouse cursor
void rlShowCursor(void)
void ShowCursor(void)
{
CORE.Input.Mouse.cursorHidden = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/raylib/platforms/rcore_web.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ const char *GetClipboardText(void)
}

// Show mouse cursor
void rlShowCursor(void)
void ShowCursor(void)
{
if (CORE.Input.Mouse.cursorHidden)
{
Expand Down
Loading

0 comments on commit 0ddb83a

Please sign in to comment.