Skip to content

Commit e3f1d16

Browse files
committed
Fix BoneInfo definition
1 parent 1331917 commit e3f1d16

5 files changed

Lines changed: 20 additions & 12 deletions

File tree

examples/raygui/raygui_basic_window.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const screenHeight = 450
1717
let showMessageBox = false
1818
let backgroundColor = r.RAYWHITE
1919

20-
r.InitWindow(screenWidth, screenHeight, 'raylib [core] example - basic window')
20+
r.InitWindow(screenWidth, screenHeight, 'raylib [raygui] example - basic window')
2121

2222
r.SetTargetFPS(60)
2323

src/generated/node-raylib.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,13 @@ inline Transform TransformFromValue(const Napi::CallbackInfo& info, int index) {
263263
};
264264
}
265265

266+
inline BoneInfo BoneInfoFromValue(const Napi::CallbackInfo& info, int index) {
267+
return {
268+
pointerFromValue(info, index + 0),
269+
charFromValue(info, index + 1)
270+
};
271+
}
272+
266273
inline Model ModelFromValue(const Napi::CallbackInfo& info, int index) {
267274
return {
268275
MatrixFromValue(info, index + 0),
@@ -531,6 +538,13 @@ inline Napi::Value ToValue(Napi::Env env, Transform obj) {
531538
return out;
532539
}
533540

541+
inline Napi::Value ToValue(Napi::Env env, BoneInfo obj) {
542+
Napi::Object out = Napi::Object::New(env);
543+
out.Set("name", ToValue(env, obj.name));
544+
out.Set("parent", ToValue(env, obj.parent));
545+
return out;
546+
}
547+
534548
inline Napi::Value ToValue(Napi::Env env, Model obj) {
535549
Napi::Object out = Napi::Object::New(env);
536550
out.Set("transform", ToValue(env, obj.transform));

src/generated/node-raylib.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ declare module "raylib" {
256256
/** Bone, skeletal animation bone */
257257
export interface BoneInfo {
258258
/** Bone name */
259-
name: char[32]
259+
name: string
260260
/** Bone parent */
261261
parent: string
262262
}

tools/generate.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,24 @@ const path = require('path')
66

77
// use this to keep from wrapping things
88
const blocklist = [
9-
// error: invalid conversion from ‘void (*)(int, const char*, ...)’ to ‘void (*)()’ [-fpermissive]
9+
// Error: invalid conversion from ‘void (*)(int, const char*, ...)’ to ‘void (*)()’ [-fpermissive]
1010
'TraceLog',
1111
'TextFormat',
1212

13-
// edge case: need additional wrapping to function
13+
// Edge case: need additional wrapping to function
1414
'SetShaderValue',
1515
'SetShaderValueV',
1616

17-
// DataCallback types not implemented in JSON?
17+
// Callbacks: Not supported yet
1818
'SetTraceLogCallback',
1919
'SetLoadFileDataCallback',
2020
'SetSaveFileDataCallback',
2121
'SetLoadFileTextCallback',
2222
'SetSaveFileTextCallback',
2323

24-
// these appear to not be defined, even though they are in JSON
25-
'SetWindowOpacity',
26-
'GetRenderWidth',
27-
'GetRenderHeight',
28-
'ExportFontAsCode',
29-
3024
// Structs
3125
// @todo Verify Structs that have array properties
3226
'VrStereoConfig', // Matrix[2], float[2]
33-
'BoneInfo', // char[32]
3427
'VrDeviceInfo', // float[4]
3528
'Material', // float[4]
3629

tools/generate_templates/ArgumentTypeConversion.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ function ArgumentTypeConversion (arg) {
55
if (arg === 'char') { return 'string' }
66
if (arg === 'char *') { return 'string' }
77
if (arg === 'const char *') { return 'string' }
8+
if (arg === 'char[32]') { return 'string' }
89

910
if (arg === 'int') { return 'number' }
1011
if (arg === 'float') { return 'number' }

0 commit comments

Comments
 (0)