summaryrefslogtreecommitdiff
path: root/raylib.cfg
blob: 82150048088f53cea3c0ac805695583406b40be6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[n.global]
output = raylib

[n.prepare]
download-lin = "https://github.com/raysan5/raylib/releases/download/3.0.0/raylib-3.0.0-Linux-amd64.tar.gz"
execute-lin = "tar -C raylib --strip-components=1 -x -f raylib/raylib-3.0.0-Linux-amd64.tar.gz"

[n.include]
raylib/include

[raylib.h]
dynlib-lin = "lib/libraylib.so"

preprocess = true
defines = true

search.tracelogcallback = "typedef void (*TraceLogCallback)(int logType, const char *text, va_list args);"
prepend.tracelogcallback = "//"

search.settracelogcallback = "RLAPI void SetTraceLogCallback"
prepend.settracelogcallback = "//"

[raylib.nim]
search.libpath = "{.passC"
prepend.libpath = """
const dynlibraylibFullPath = sourcePath & "/" & dynlibraylib
"""

search.dy = "dynlib: dynlibraylib"
replace.dy = "dynlib: dynlibraylibFullPath"

search.music = "Music* = ptr MusicData"
prepend.music = """MusicData* = object
  """

search.bool = "_Bool"
replace.bool = "bool"

search.audiobuffer = "buffer*: ptr rAudioBuffer"
replace.audiobuffer = "buffer*: pointer"

append = """

template initColor*(rr, gg, bb, aa: int): Color =
    Color(r: rr.cuchar, g: gg.cuchar, b: bb.cuchar, a: aa.cuchar)

# Some Basic Colors
# NOTE: Custom raylib color palette for amazing visuals on WHITE background
const LIGHTGRAY*  = initColor( 200, 200, 200, 255 )   ##  Light Gray
const GRAY*       = initColor( 130, 130, 130, 255 )   ##  Gray
const DARKGRAY*   = initColor( 80, 80, 80, 255 )      ##  Dark Gray
const YELLOW*     = initColor( 253, 249, 0, 255 )     ##  Yellow
const GOLD*       = initColor( 255, 203, 0, 255 )     ##  Gold
const ORANGE*     = initColor( 255, 161, 0, 255 )     ##  Orange
const PINK*       = initColor( 255, 109, 194, 255 )   ##  Pink
const RED*        = initColor( 230, 41, 55, 255 )     ##  Red
const MAROON*     = initColor( 190, 33, 55, 255 )     ##  Maroon
const GREEN*      = initColor( 0, 228, 48, 255 )      ##  Green
const LIME*       = initColor( 0, 158, 47, 255 )      ##  Lime
const DARKGREEN*  = initColor( 0, 117, 44, 255 )      ##  Dark Green
const SKYBLUE*    = initColor( 102, 191, 255, 255 )   ##  Sky Blue
const BLUE*       = initColor( 0, 121, 241, 255 )     ##  Blue
const DARKBLUE*   = initColor( 0, 82, 172, 255 )      ##  Dark Blue
const PURPLE*     = initColor( 200, 122, 255, 255 )   ##  Purple
const VIOLET*     = initColor( 135, 60, 190, 255 )    ##  Violet
const DARKPURPLE* = initColor( 112, 31, 126, 255 )    ##  Dark Purple
const BEIGE*      = initColor( 211, 176, 131, 255 )   ##  Beige
const BROWN*      = initColor( 127, 106, 79, 255 )    ##  Brown
const DARKBROWN*  = initColor( 76, 63, 47, 255 )      ##  Dark Brown

const WHITE*      = initColor( 255, 255, 255, 255 )   ##  White
const BLACK*      = initColor( 0, 0, 0, 255 )         ##  Black
const BLANK*      = initColor( 0, 0, 0, 0 )           ##  Blank (Transparent)
const MAGENTA*    = initColor( 255, 0, 255, 255 )     ##  Magenta
const RAYWHITE*   = initColor( 245, 245, 245, 255 )   ##  My own White (raylib logo)

const LOC_MAP_DIFFUSE* = LOC_MAP_ALBEDO
const LOC_MAP_SPECULAR* = LOC_MAP_METALNESS

const MAP_DIFFUSE* = MAP_ALBEDO
const MAP_SPECULAR* = MAP_METALNESS

"""