mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-27 04:21:42 +00:00
Merge b80b05526c into 8afe062be1
This commit is contained in:
commit
22f2c820f9
9 changed files with 60 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ in_files = [
|
|||
"src/pc/lua/utils/smlua_audio_utils.h",
|
||||
"src/game/paintings.h",
|
||||
"src/pc/djui/djui_types.h",
|
||||
"src/game/level_update.h",
|
||||
"src/game/first_person_cam.h",
|
||||
"src/game/player_palette.h",
|
||||
"src/engine/graph_node.h",
|
||||
|
|
@ -155,6 +156,7 @@ override_field_version_excludes = {
|
|||
override_allowed_structs = {
|
||||
"src/pc/network/network.h": [ "ServerSettings", "NametagsSettings" ],
|
||||
"src/pc/djui/djui_types.h": [ "DjuiColor" ],
|
||||
"src/game/level_update.h": [ "HudDisplay" ],
|
||||
"src/game/player_palette.h": [ "PlayerPalette" ],
|
||||
"src/game/ingame_menu.h" : [ "DialogEntry" ],
|
||||
"include/PR/gbi.h": [ "Gfx", "Vtx" ],
|
||||
|
|
|
|||
|
|
@ -97,6 +97,10 @@ gServerSettings = {}
|
|||
--- Struct containing the settings for Nametags
|
||||
gNametagsSettings = {}
|
||||
|
||||
--- @type HudDisplay
|
||||
--- Struct containing the flags for the hud display
|
||||
gHudDisplay = {}
|
||||
|
||||
-----------
|
||||
-- hooks --
|
||||
-----------
|
||||
|
|
@ -407,13 +411,13 @@ end
|
|||
--- @param command string
|
||||
--- @vararg integer | string | Gfx | Texture | Vtx Parameters for the command
|
||||
--- Sets a display list command on the display list given.
|
||||
---
|
||||
---
|
||||
--- If `command` includes parameter specifiers (subsequences beginning with `%`), the additional arguments
|
||||
--- following `command` are converted and inserted in `command` replacing their respective specifiers.
|
||||
---
|
||||
---
|
||||
--- The number of provided parameters must be equal to the number of specifiers in `command`,
|
||||
--- and the order of parameters must be the same as the specifiers.
|
||||
---
|
||||
---
|
||||
--- The following specifiers are allowed:
|
||||
--- - `%i` for an `integer` parameter
|
||||
--- - `%s` for a `string` parameter
|
||||
|
|
|
|||
|
|
@ -955,6 +955,15 @@
|
|||
--- @field public translation Vec3s
|
||||
--- @field public rotation Vec3s
|
||||
|
||||
--- @class HudDisplay
|
||||
--- @field public lives integer
|
||||
--- @field public coins integer
|
||||
--- @field public stars integer
|
||||
--- @field public wedges integer
|
||||
--- @field public keys integer
|
||||
--- @field public flags integer
|
||||
--- @field public timer integer
|
||||
|
||||
--- @class InstantWarp
|
||||
--- @field public id integer
|
||||
--- @field public area integer
|
||||
|
|
|
|||
|
|
@ -102,6 +102,13 @@ __**NOTE**__: The fields in this struct are not synced and are meant to be chang
|
|||
|
||||
<br />
|
||||
|
||||
## [gHudDisplay](#gHudDisplay)
|
||||
`gHudDisplay`'s fields are listed in [HudDisplay](structs.md#HudDisplay).
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [gLevelValues](#gLevelValues)
|
||||
`gLevelValues`'s fields are listed in [LevelValues](structs.md#LevelValues).
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
- [GraphNodeSwitchCase](#GraphNodeSwitchCase)
|
||||
- [GraphNodeTranslation](#GraphNodeTranslation)
|
||||
- [GraphNodeTranslationRotation](#GraphNodeTranslationRotation)
|
||||
- [HudDisplay](#HudDisplay)
|
||||
- [InstantWarp](#InstantWarp)
|
||||
- [LakituState](#LakituState)
|
||||
- [LevelValues](#LevelValues)
|
||||
|
|
@ -1426,6 +1427,22 @@
|
|||
|
||||
<br />
|
||||
|
||||
## [HudDisplay](#HudDisplay)
|
||||
|
||||
| Field | Type | Access |
|
||||
| ----- | ---- | ------ |
|
||||
| lives | `integer` | |
|
||||
| coins | `integer` | |
|
||||
| stars | `integer` | |
|
||||
| wedges | `integer` | |
|
||||
| keys | `integer` | |
|
||||
| flags | `integer` | |
|
||||
| timer | `integer` | |
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [InstantWarp](#InstantWarp)
|
||||
|
||||
| Field | Type | Access |
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ void play_warp_door_open_noise(void) {
|
|||
|
||||
void bhv_door_loop(void) {
|
||||
s32 sp1C = 0;
|
||||
|
||||
|
||||
if (o->oAction != 100) {
|
||||
while (D_8032F300[sp1C].flag != (u32)~0) {
|
||||
if (cur_obj_clear_interact_status_flag(D_8032F300[sp1C].flag)) {
|
||||
|
|
|
|||
|
|
@ -785,6 +785,8 @@ void smlua_cobject_init_globals(void) {
|
|||
EXPOSE_GLOBAL(LOT_SERVERSETTINGS, gServerSettings);
|
||||
|
||||
EXPOSE_GLOBAL(LOT_NAMETAGSSETTINGS, gNametagsSettings);
|
||||
|
||||
EXPOSE_GLOBAL(LOT_HUDDISPLAY, gHudDisplay);
|
||||
}
|
||||
|
||||
void smlua_cobject_init_per_file_globals(const char* path) {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include "src/pc/lua/utils/smlua_audio_utils.h"
|
||||
#include "src/game/paintings.h"
|
||||
#include "src/pc/djui/djui_types.h"
|
||||
#include "src/game/level_update.h"
|
||||
#include "src/game/first_person_cam.h"
|
||||
#include "src/game/player_palette.h"
|
||||
#include "src/engine/graph_node.h"
|
||||
|
|
@ -1228,6 +1229,17 @@ static struct LuaObjectField sGraphNodeTranslationRotationFields[LUA_GRAPH_NODE_
|
|||
{ "translation", LVT_COBJECT, offsetof(struct GraphNodeTranslationRotation, translation), true, LOT_VEC3S, 1, sizeof(Vec3s) },
|
||||
};
|
||||
|
||||
#define LUA_HUD_DISPLAY_FIELD_COUNT 7
|
||||
static struct LuaObjectField sHudDisplayFields[LUA_HUD_DISPLAY_FIELD_COUNT] = {
|
||||
{ "coins", LVT_S16, offsetof(struct HudDisplay, coins), false, LOT_NONE, 1, sizeof(s16) },
|
||||
{ "flags", LVT_S16, offsetof(struct HudDisplay, flags), false, LOT_NONE, 1, sizeof(s16) },
|
||||
{ "keys", LVT_S16, offsetof(struct HudDisplay, keys), false, LOT_NONE, 1, sizeof(s16) },
|
||||
{ "lives", LVT_S16, offsetof(struct HudDisplay, lives), false, LOT_NONE, 1, sizeof(s16) },
|
||||
{ "stars", LVT_S16, offsetof(struct HudDisplay, stars), false, LOT_NONE, 1, sizeof(s16) },
|
||||
{ "timer", LVT_U16, offsetof(struct HudDisplay, timer), false, LOT_NONE, 1, sizeof(u16) },
|
||||
{ "wedges", LVT_S16, offsetof(struct HudDisplay, wedges), false, LOT_NONE, 1, sizeof(s16) },
|
||||
};
|
||||
|
||||
#define LUA_INSTANT_WARP_FIELD_COUNT 3
|
||||
static struct LuaObjectField sInstantWarpFields[LUA_INSTANT_WARP_FIELD_COUNT] = {
|
||||
{ "area", LVT_U8, offsetof(struct InstantWarp, area), false, LOT_NONE, 1, sizeof(u8) },
|
||||
|
|
@ -2724,6 +2736,7 @@ struct LuaObjectTable sLuaObjectAutogenTable[LOT_AUTOGEN_MAX - LOT_AUTOGEN_MIN]
|
|||
{ LOT_GRAPHNODESWITCHCASE, sGraphNodeSwitchCaseFields, LUA_GRAPH_NODE_SWITCH_CASE_FIELD_COUNT },
|
||||
{ LOT_GRAPHNODETRANSLATION, sGraphNodeTranslationFields, LUA_GRAPH_NODE_TRANSLATION_FIELD_COUNT },
|
||||
{ LOT_GRAPHNODETRANSLATIONROTATION, sGraphNodeTranslationRotationFields, LUA_GRAPH_NODE_TRANSLATION_ROTATION_FIELD_COUNT },
|
||||
{ LOT_HUDDISPLAY, sHudDisplayFields, LUA_HUD_DISPLAY_FIELD_COUNT },
|
||||
{ LOT_INSTANTWARP, sInstantWarpFields, LUA_INSTANT_WARP_FIELD_COUNT },
|
||||
{ LOT_LAKITUSTATE, sLakituStateFields, LUA_LAKITU_STATE_FIELD_COUNT },
|
||||
{ LOT_LEVELVALUES, sLevelValuesFields, LUA_LEVEL_VALUES_FIELD_COUNT },
|
||||
|
|
@ -2829,6 +2842,7 @@ const char *sLuaLotNames[] = {
|
|||
[LOT_GRAPHNODESWITCHCASE] = "GraphNodeSwitchCase",
|
||||
[LOT_GRAPHNODETRANSLATION] = "GraphNodeTranslation",
|
||||
[LOT_GRAPHNODETRANSLATIONROTATION] = "GraphNodeTranslationRotation",
|
||||
[LOT_HUDDISPLAY] = "HudDisplay",
|
||||
[LOT_INSTANTWARP] = "InstantWarp",
|
||||
[LOT_LAKITUSTATE] = "LakituState",
|
||||
[LOT_LEVELVALUES] = "LevelValues",
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ enum LuaObjectAutogenType {
|
|||
LOT_GRAPHNODESWITCHCASE,
|
||||
LOT_GRAPHNODETRANSLATION,
|
||||
LOT_GRAPHNODETRANSLATIONROTATION,
|
||||
LOT_HUDDISPLAY,
|
||||
LOT_INSTANTWARP,
|
||||
LOT_LAKITUSTATE,
|
||||
LOT_LEVELVALUES,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue