Skip to content

Commit 8aa7b02

Browse files
committed
Made changes by @Zectbumo
1 parent 22d0e14 commit 8aa7b02

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/raylib.nim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ when defined(mingw):
1515
{.passC: "-I" & raylibDir.string.}
1616
{.passC: "-I" & string(raylibDir / Path"external/glfw/include").}
1717
{.passC: "-Wall -D_GNU_SOURCE -Wno-missing-braces -Werror=pointer-arith".}
18+
when not defined(vcc):
19+
{.passC: "-Wall -D_GNU_SOURCE -Wno-missing-braces -Werror=pointer-arith".}
1820
when defined(emscripten):
1921
{.passC: "-DPLATFORM_WEB".}
2022
when defined(GraphicsApiOpenGlEs3):
@@ -70,6 +72,7 @@ else:
7072

7173
when defined(windows):
7274
when defined(tcc): {.passL: "-lopengl32 -lgdi32 -lwinmm -lshell32".}
75+
elif defined(vcc): {.passL: "opengl32.lib gdi32.lib winmm.lib user32.lib shell32.lib".}
7376
else: {.passL: "-static-libgcc -lopengl32 -lgdi32 -lwinmm".}
7477

7578
elif defined(macosx):
@@ -1416,7 +1419,7 @@ proc drawTexture*(texture: Texture2D, source: Rectangle, position: Vector2, tint
14161419
## Draw a part of a texture defined by a rectangle
14171420
proc drawTexture*(texture: Texture2D, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: float32, tint: Color) {.importc: "DrawTexturePro", sideEffect.}
14181421
## Draw a part of a texture defined by a rectangle with 'pro' parameters
1419-
proc drawTextureNPatch*(texture: Texture2D, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: float32, tint: Color) {.importc: "DrawTextureNPatch", sideEffect.}
1422+
proc drawTexture*(texture: Texture2D, nPatchInfo: NPatchInfo, dest: Rectangle, origin: Vector2, rotation: float32, tint: Color) {.importc: "DrawTextureNPatch", sideEffect.}
14201423
## Draws a texture (or part of it) that stretches or shrinks nicely
14211424
func colorNormalize*(color: Color): Vector4 {.importc: "ColorNormalize".}
14221425
## Get Color normalized as float [0..1]

tools/wrapper/config/raylib.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ V
397397
Rec
398398
Ex
399399
Pro
400+
NPatch
400401

401402
[ FunctionOverloads ]
402403

@@ -430,6 +431,7 @@ DrawTextureV
430431
DrawTextureEx
431432
DrawTextureRec
432433
DrawTexturePro
434+
DrawTextureNPatch
433435
LoadFontEx
434436
DrawTextEx
435437
DrawTextPro

tools/wrapper/snippets/raylib_header.nim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ when defined(mingw):
1515
{.passC: "-I" & raylibDir.string.}
1616
{.passC: "-I" & string(raylibDir / Path"external/glfw/include").}
1717
{.passC: "-Wall -D_GNU_SOURCE -Wno-missing-braces -Werror=pointer-arith".}
18+
when not defined(vcc):
19+
{.passC: "-Wall -D_GNU_SOURCE -Wno-missing-braces -Werror=pointer-arith".}
1820
when defined(emscripten):
1921
{.passC: "-DPLATFORM_WEB".}
2022
when defined(GraphicsApiOpenGlEs3):
@@ -70,6 +72,7 @@ else:
7072

7173
when defined(windows):
7274
when defined(tcc): {.passL: "-lopengl32 -lgdi32 -lwinmm -lshell32".}
75+
elif defined(vcc): {.passL: "opengl32.lib gdi32.lib winmm.lib user32.lib shell32.lib".}
7376
else: {.passL: "-static-libgcc -lopengl32 -lgdi32 -lwinmm".}
7477

7578
elif defined(macosx):

0 commit comments

Comments
 (0)