mirror of
https://github.com/Not-Nik/raylib-zig.git
synced 2025-09-09 12:07:27 +00:00
Some more cleanup
This commit is contained in:
parent
5e275e93df
commit
fe637bb128
@ -3,7 +3,7 @@ import re
|
|||||||
"""
|
"""
|
||||||
Automatic utility for generating raylib function headers. Simply put
|
Automatic utility for generating raylib function headers. Simply put
|
||||||
raylib.h in the working directory of this script and execute.
|
raylib.h in the working directory of this script and execute.
|
||||||
Tested with raylib version 3.0.0
|
Tested with raylib version 3.7.0
|
||||||
"""
|
"""
|
||||||
|
|
||||||
C_TO_ZIG = {
|
C_TO_ZIG = {
|
||||||
@ -17,7 +17,7 @@ C_TO_ZIG = {
|
|||||||
"unsigned int": "c_uint",
|
"unsigned int": "c_uint",
|
||||||
}
|
}
|
||||||
|
|
||||||
# Some c types have a different size on different systems
|
# Some c types have a different sizes on different systems
|
||||||
# and zig knows that so we tell it to get the system specific size for us
|
# and zig knows that so we tell it to get the system specific size for us
|
||||||
def c_to_zig_type(c: str) -> str:
|
def c_to_zig_type(c: str) -> str:
|
||||||
c = c.replace("const ", "")
|
c = c.replace("const ", "")
|
||||||
@ -58,9 +58,6 @@ def fix_enums(arg_name, arg_type, func_name):
|
|||||||
return arg_type
|
return arg_type
|
||||||
|
|
||||||
|
|
||||||
small_structs = ["Vector2", "Vector3", "Vector4", "Quaternion", "Color", "Rectangle", "Shader"]
|
|
||||||
|
|
||||||
|
|
||||||
def parse_header(header_name: str, output_file: str, prefix: str):
|
def parse_header(header_name: str, output_file: str, prefix: str):
|
||||||
header = open(header_name, mode="r")
|
header = open(header_name, mode="r")
|
||||||
zig_functions = []
|
zig_functions = []
|
||||||
|
@ -152,10 +152,6 @@ pub const Image = extern struct {
|
|||||||
return rl.GenImageCellular(width, height, tileSize);
|
return rl.GenImageCellular(width, height, tileSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn GetData(self: Image) [*c]Color {
|
|
||||||
return GetImageData(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn UseAsWindowIcon(self: Image) void {
|
pub fn UseAsWindowIcon(self: Image) void {
|
||||||
rl.SetWindowIcon(self);
|
rl.SetWindowIcon(self);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user