mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
Ran autogen
This commit is contained in:
parent
555d10433b
commit
ecc33286ad
4 changed files with 361 additions and 319 deletions
|
@ -43,7 +43,7 @@ in_files = [
|
|||
|
||||
override_allowed_functions = {
|
||||
"src/audio/external.h": [ " play_", "fade" ],
|
||||
"src/game/camera.h": [ "set_.*camera_.*shake" ],
|
||||
"src/game/camera.h": [ "set_.*camera_.*shake", "set_camera_mode" ],
|
||||
"src/game/thread6.c": [ "queue_rumble_"],
|
||||
"src/pc/djui/djui_popup.h" : [ "create" ],
|
||||
"src/game/save_file.h": [ "save_file_get_" ],
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
<br />
|
||||
|
||||
- camera.h
|
||||
- [set_camera_mode](#set_camera_mode)
|
||||
- [set_camera_mode_fixed](#set_camera_mode_fixed)
|
||||
- [set_camera_pitch_shake](#set_camera_pitch_shake)
|
||||
- [set_camera_roll_shake](#set_camera_roll_shake)
|
||||
- [set_camera_shake_from_hit](#set_camera_shake_from_hit)
|
||||
- [set_camera_shake_from_point](#set_camera_shake_from_point)
|
||||
- [set_camera_yaw_shake](#set_camera_yaw_shake)
|
||||
- [set_environmental_camera_shake](#set_environmental_camera_shake)
|
||||
- [set_camera_mode](#set_camera_mode)
|
||||
|
||||
<br />
|
||||
|
||||
|
@ -455,15 +456,15 @@
|
|||
<br />
|
||||
|
||||
- smlua_obj_utils.h
|
||||
- [spawn_sync_object](#spawn_sync_object)
|
||||
- [obj_get_first](#obj_get_first)
|
||||
- [obj_get_first_with_behavior_id](#obj_get_first_with_behavior_id)
|
||||
- [obj_get_first_with_behavior_id_and_field_s32](#obj_get_first_with_behavior_id_and_field_s32)
|
||||
- [obj_get_first_with_behavior_id_and_field_f32](#obj_get_first_with_behavior_id_and_field_f32)
|
||||
- [obj_get_first_with_behavior_id_and_field_s32](#obj_get_first_with_behavior_id_and_field_s32)
|
||||
- [obj_get_next](#obj_get_next)
|
||||
- [obj_get_next_with_same_behavior_id](#obj_get_next_with_same_behavior_id)
|
||||
- [obj_get_next_with_same_behavior_id_and_field_s32](#obj_get_next_with_same_behavior_id_and_field_s32)
|
||||
- [obj_get_next_with_same_behavior_id_and_field_f32](#obj_get_next_with_same_behavior_id_and_field_f32)
|
||||
- [obj_get_next_with_same_behavior_id_and_field_s32](#obj_get_next_with_same_behavior_id_and_field_s32)
|
||||
- [spawn_sync_object](#spawn_sync_object)
|
||||
|
||||
<br />
|
||||
|
||||
|
@ -556,6 +557,51 @@
|
|||
<br />
|
||||
|
||||
|
||||
## [set_camera_mode](#set_camera_mode)
|
||||
|
||||
### Lua Example
|
||||
`set_camera_mode(c, mode, frames)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| c | [Camera](structs.md#Camera) |
|
||||
| mode | integer |
|
||||
| frames | integer |
|
||||
|
||||
### Returns
|
||||
- None
|
||||
|
||||
### C Prototype
|
||||
`void set_camera_mode(struct Camera *c, s16 mode, s16 frames);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [set_camera_mode_fixed](#set_camera_mode_fixed)
|
||||
|
||||
### Lua Example
|
||||
`local integerValue = set_camera_mode_fixed(c, x, y, z)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| c | [Camera](structs.md#Camera) |
|
||||
| x | integer |
|
||||
| y | integer |
|
||||
| z | integer |
|
||||
|
||||
### Returns
|
||||
- integer
|
||||
|
||||
### C Prototype
|
||||
`s32 set_camera_mode_fixed(struct Camera* c, s16 x, s16 y, s16 z);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [set_camera_pitch_shake](#set_camera_pitch_shake)
|
||||
|
||||
### Lua Example
|
||||
|
@ -685,28 +731,6 @@
|
|||
|
||||
<br />
|
||||
|
||||
## [set_camera_mode](#set_camera_mode)
|
||||
|
||||
### Lua Example
|
||||
`set_camera_mode(c, mode, frames)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| c | Camera |
|
||||
| mode | integer |
|
||||
| frames | integer |
|
||||
|
||||
### Returns
|
||||
- None
|
||||
|
||||
### C Prototype
|
||||
`void set_camera_mode(struct Camera *c, s16 mode, s16 frames);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
# functions from characters.h
|
||||
|
||||
|
@ -8061,6 +8085,174 @@
|
|||
<br />
|
||||
|
||||
|
||||
## [obj_get_first](#obj_get_first)
|
||||
|
||||
### Lua Example
|
||||
`local ObjectValue = obj_get_first(objList)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| objList | integer |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_first(enum ObjectList objList);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_first_with_behavior_id](#obj_get_first_with_behavior_id)
|
||||
|
||||
### Lua Example
|
||||
`local ObjectValue = obj_get_first_with_behavior_id(behaviorId)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| behaviorId | integer |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_first_with_behavior_id(enum BehaviorId behaviorId);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_first_with_behavior_id_and_field_f32](#obj_get_first_with_behavior_id_and_field_f32)
|
||||
|
||||
### Lua Example
|
||||
`local ObjectValue = obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| behaviorId | integer |
|
||||
| fieldIndex | integer |
|
||||
| value | number |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_first_with_behavior_id_and_field_f32(enum BehaviorId behaviorId, s32 fieldIndex, f32 value);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_first_with_behavior_id_and_field_s32](#obj_get_first_with_behavior_id_and_field_s32)
|
||||
|
||||
### Lua Example
|
||||
`local ObjectValue = obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| behaviorId | integer |
|
||||
| fieldIndex | integer |
|
||||
| value | integer |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_first_with_behavior_id_and_field_s32(enum BehaviorId behaviorId, s32 fieldIndex, s32 value);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_next](#obj_get_next)
|
||||
|
||||
### Lua Example
|
||||
`local ObjectValue = obj_get_next(o)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| o | [Object](structs.md#Object) |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_next(struct Object *o);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_next_with_same_behavior_id](#obj_get_next_with_same_behavior_id)
|
||||
|
||||
### Lua Example
|
||||
`local ObjectValue = obj_get_next_with_same_behavior_id(o)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| o | [Object](structs.md#Object) |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_next_with_same_behavior_id(struct Object *o);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_next_with_same_behavior_id_and_field_f32](#obj_get_next_with_same_behavior_id_and_field_f32)
|
||||
|
||||
### Lua Example
|
||||
`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| o | [Object](structs.md#Object) |
|
||||
| fieldIndex | integer |
|
||||
| value | number |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_next_with_same_behavior_id_and_field_f32(struct Object *o, s32 fieldIndex, f32 value);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_next_with_same_behavior_id_and_field_s32](#obj_get_next_with_same_behavior_id_and_field_s32)
|
||||
|
||||
### Lua Example
|
||||
`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| o | [Object](structs.md#Object) |
|
||||
| fieldIndex | integer |
|
||||
| value | integer |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_next_with_same_behavior_id_and_field_s32(struct Object *o, s32 fieldIndex, s32 value);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [spawn_sync_object](#spawn_sync_object)
|
||||
|
||||
### Lua Example
|
||||
|
@ -8086,174 +8278,6 @@
|
|||
|
||||
<br />
|
||||
|
||||
## [obj_get_first](#obj_get_first)
|
||||
|
||||
### Lua Example
|
||||
`local obj = obj_get_first(objList)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| objList | integer |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_first(enum ObjectList objList);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_first_with_behavior_id](#obj_get_first_with_behavior_id)
|
||||
|
||||
### Lua Example
|
||||
`local obj = obj_get_first_with_behavior_id(behaviorId)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| behaviorId | integer |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_first_with_behavior_id(enum BehaviorId behaviorId);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_first_with_behavior_id_and_field_s32](#obj_get_first_with_behavior_id_and_field_s32)
|
||||
|
||||
### Lua Example
|
||||
`local obj = obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| behaviorId | integer |
|
||||
| fieldIndex | integer |
|
||||
| value | integer |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_first_with_behavior_id_and_field_s32(enum BehaviorId behaviorId, s32 fieldIndex, s32 value);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_first_with_behavior_id_and_field_f32](#obj_get_first_with_behavior_id_and_field_f32)
|
||||
|
||||
### Lua Example
|
||||
`local obj = obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| behaviorId | integer |
|
||||
| fieldIndex | integer |
|
||||
| value | number |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_first_with_behavior_id_and_field_f32(enum BehaviorId behaviorId, s32 fieldIndex, f32 value);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_next](#obj_get_next)
|
||||
|
||||
### Lua Example
|
||||
`local obj = obj_get_next(o)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| o | Object |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_next(struct Object *o);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_next_with_same_behavior_id](#obj_get_next_with_same_behavior_id)
|
||||
|
||||
### Lua Example
|
||||
`local obj = obj_get_next_with_same_behavior_id(o)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| o | Object |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_next_with_same_behavior_id(struct Object *o);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_next_with_same_behavior_id_and_field_s32](#obj_get_next_with_same_behavior_id_and_field_s32)
|
||||
|
||||
### Lua Example
|
||||
`local obj = obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| o | Object |
|
||||
| fieldIndex | integer |
|
||||
| value | integer |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_next_with_same_behavior_id_and_field_s32(struct Object *o, s32 fieldIndex, s32 value);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [obj_get_next_with_same_behavior_id_and_field_f32](#obj_get_next_with_same_behavior_id_and_field_f32)
|
||||
|
||||
### Lua Example
|
||||
`local obj = obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value)`
|
||||
|
||||
### Parameters
|
||||
| Field | Type |
|
||||
| ----- | ---- |
|
||||
| o | Object |
|
||||
| fieldIndex | integer |
|
||||
| value | number |
|
||||
|
||||
### Returns
|
||||
[Object](structs.md#Object)
|
||||
|
||||
### C Prototype
|
||||
`struct Object *obj_get_next_with_same_behavior_id_and_field_f32(struct Object *o, s32 fieldIndex, f32 value);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
---
|
||||
# functions from sound_init.h
|
||||
|
||||
|
|
|
@ -2147,7 +2147,7 @@ char gSmluaConstants[] = ""
|
|||
"ACT_HOLDING_BOWSER = 0x00000391\n"
|
||||
"ACT_RELEASING_BOWSER = 0x00000392\n"
|
||||
"END_DEMO = (1 << 7)\n"
|
||||
"VALID_BUTTONS = (A_BUTTON | B_BUTTON | X_BUTTON | Y_BUTTON | Z_TRIG | START_BUTTON | U_JPAD | D_JPAD | L_JPAD | R_JPAD | L_TRIG | R_TRIG | U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS )\n"
|
||||
"VALID_BUTTONS = (A_BUTTON | B_BUTTON | Z_TRIG | START_BUTTON | U_JPAD | D_JPAD | L_JPAD | R_JPAD | L_TRIG | R_TRIG | X_BUTTON | Y_BUTTON | U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS )\n"
|
||||
"C_BUTTONS = (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS )\n"
|
||||
"HOOK_UPDATE = 0\n"
|
||||
"HOOK_MARIO_UPDATE = 1\n"
|
||||
|
|
|
@ -52,6 +52,38 @@ int smlua_func_get_id_from_behavior(lua_State* L) {
|
|||
// camera.h //
|
||||
//////////////
|
||||
|
||||
int smlua_func_set_camera_mode(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s16 mode = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s16 frames = smlua_to_integer(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
set_camera_mode(c, mode, frames);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_set_camera_mode_fixed(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
|
||||
|
||||
struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s16 x = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s16 y = smlua_to_integer(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s16 z = smlua_to_integer(L, 4);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
lua_pushinteger(L, set_camera_mode_fixed(c, x, y, z));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_set_camera_pitch_shake(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
|
@ -136,21 +168,6 @@ int smlua_func_set_environmental_camera_shake(lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_set_camera_mode(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
struct Camera* c = (struct Camera *) smlua_to_cobject(L, 1, LOT_CAMERA);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s16 mode = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s16 frames = smlua_to_integer(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
set_camera_mode(c, mode, frames);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//////////////////
|
||||
// characters.h //
|
||||
//////////////////
|
||||
|
@ -5301,6 +5318,110 @@ int smlua_func_save_file_get_total_star_count(lua_State* L) {
|
|||
// smlua_obj_utils.h //
|
||||
///////////////////////
|
||||
|
||||
int smlua_func_obj_get_first(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
int objList = smlua_to_integer(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_first(objList));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_first_with_behavior_id(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
int behaviorId = smlua_to_integer(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id(behaviorId));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_first_with_behavior_id_and_field_f32(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
int behaviorId = smlua_to_integer(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s32 fieldIndex = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
f32 value = smlua_to_number(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_first_with_behavior_id_and_field_s32(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
int behaviorId = smlua_to_integer(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s32 fieldIndex = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s32 value = smlua_to_integer(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_next(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_next(o));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_next_with_same_behavior_id(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id(o));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_next_with_same_behavior_id_and_field_f32(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s32 fieldIndex = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
f32 value = smlua_to_number(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_next_with_same_behavior_id_and_field_s32(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s32 fieldIndex = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
s32 value = smlua_to_integer(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_spawn_sync_object(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 6)) { return 0; }
|
||||
|
||||
|
@ -5322,110 +5443,6 @@ int smlua_func_spawn_sync_object(lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_first(lua_State *L) {
|
||||
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
int objList = smlua_to_integer(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_first(objList));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_first_with_behavior_id(lua_State *L) {
|
||||
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
int behaviorId = smlua_to_integer(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id(behaviorId));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_first_with_behavior_id_and_field_s32(lua_State *L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
int behaviorId = smlua_to_integer(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
int fieldIndex = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
int value = smlua_to_integer(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_first_with_behavior_id_and_field_f32(lua_State *L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
int behaviorId = smlua_to_integer(L, 1);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
int fieldIndex = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
float value = smlua_to_number(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_next(lua_State *L) {
|
||||
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
struct Object *o = (struct Object *) smlua_to_cobject(L, 1, LOT_OBJECT);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_next(o));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_next_with_same_behavior_id(lua_State *L) {
|
||||
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
|
||||
|
||||
struct Object *o = (struct Object *) smlua_to_cobject(L, 1, LOT_OBJECT);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id(o));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_next_with_same_behavior_id_and_field_s32(lua_State *L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
struct Object *o = (struct Object *) smlua_to_cobject(L, 1, LOT_OBJECT);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
int fieldIndex = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
int value = smlua_to_integer(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_obj_get_next_with_same_behavior_id_and_field_f32(lua_State *L) {
|
||||
if(!smlua_functions_valid_param_count(L, 3)) { return 0; }
|
||||
|
||||
struct Object *o = (struct Object *) smlua_to_cobject(L, 1, LOT_OBJECT);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
int fieldIndex = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
float value = smlua_to_number(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { return 0; }
|
||||
|
||||
smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//////////////////
|
||||
// sound_init.h //
|
||||
//////////////////
|
||||
|
@ -5825,13 +5842,14 @@ void smlua_bind_functions_autogen(void) {
|
|||
smlua_bind_function(L, "get_id_from_behavior", smlua_func_get_id_from_behavior);
|
||||
|
||||
// camera.h
|
||||
smlua_bind_function(L, "set_camera_mode", smlua_func_set_camera_mode);
|
||||
smlua_bind_function(L, "set_camera_mode_fixed", smlua_func_set_camera_mode_fixed);
|
||||
smlua_bind_function(L, "set_camera_pitch_shake", smlua_func_set_camera_pitch_shake);
|
||||
smlua_bind_function(L, "set_camera_roll_shake", smlua_func_set_camera_roll_shake);
|
||||
smlua_bind_function(L, "set_camera_shake_from_hit", smlua_func_set_camera_shake_from_hit);
|
||||
smlua_bind_function(L, "set_camera_shake_from_point", smlua_func_set_camera_shake_from_point);
|
||||
smlua_bind_function(L, "set_camera_yaw_shake", smlua_func_set_camera_yaw_shake);
|
||||
smlua_bind_function(L, "set_environmental_camera_shake", smlua_func_set_environmental_camera_shake);
|
||||
smlua_bind_function(L, "set_camera_mode", smlua_func_set_camera_mode);
|
||||
|
||||
// characters.h
|
||||
smlua_bind_function(L, "get_character", smlua_func_get_character);
|
||||
|
@ -6241,15 +6259,15 @@ void smlua_bind_functions_autogen(void) {
|
|||
smlua_bind_function(L, "save_file_get_total_star_count", smlua_func_save_file_get_total_star_count);
|
||||
|
||||
// smlua_obj_utils.h
|
||||
smlua_bind_function(L, "spawn_sync_object", smlua_func_spawn_sync_object);
|
||||
smlua_bind_function(L, "obj_get_first", smlua_func_obj_get_first);
|
||||
smlua_bind_function(L, "obj_get_first_with_behavior_id", smlua_func_obj_get_first_with_behavior_id);
|
||||
smlua_bind_function(L, "obj_get_first_with_behavior_id_and_field_s32", smlua_func_obj_get_first_with_behavior_id_and_field_s32);
|
||||
smlua_bind_function(L, "obj_get_first_with_behavior_id_and_field_f32", smlua_func_obj_get_first_with_behavior_id_and_field_f32);
|
||||
smlua_bind_function(L, "obj_get_first_with_behavior_id_and_field_s32", smlua_func_obj_get_first_with_behavior_id_and_field_s32);
|
||||
smlua_bind_function(L, "obj_get_next", smlua_func_obj_get_next);
|
||||
smlua_bind_function(L, "obj_get_next_with_same_behavior_id", smlua_func_obj_get_next_with_same_behavior_id);
|
||||
smlua_bind_function(L, "obj_get_next_with_same_behavior_id_and_field_s32", smlua_func_obj_get_next_with_same_behavior_id_and_field_s32);
|
||||
smlua_bind_function(L, "obj_get_next_with_same_behavior_id_and_field_f32", smlua_func_obj_get_next_with_same_behavior_id_and_field_f32);
|
||||
smlua_bind_function(L, "obj_get_next_with_same_behavior_id_and_field_s32", smlua_func_obj_get_next_with_same_behavior_id_and_field_s32);
|
||||
smlua_bind_function(L, "spawn_sync_object", smlua_func_spawn_sync_object);
|
||||
|
||||
// sound_init.h
|
||||
smlua_bind_function(L, "disable_background_sound", smlua_func_disable_background_sound);
|
||||
|
|
Loading…
Reference in a new issue