Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
f418c647
Commit
f418c647
authored
3 years ago
by
Eidolon
Browse files
Options
Downloads
Patches
Plain Diff
Add drawerlib deltaTime function
parent
4095ef59
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1783
Uncapped
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lua_hudlib.c
+9
-0
9 additions, 0 deletions
src/lua_hudlib.c
with
9 additions
and
0 deletions
src/lua_hudlib.c
+
9
−
0
View file @
f418c647
...
@@ -1201,6 +1201,14 @@ static int libd_getusertransflag(lua_State *L)
...
@@ -1201,6 +1201,14 @@ static int libd_getusertransflag(lua_State *L)
return
1
;
return
1
;
}
}
// Return the time elapsed for the previous frame, in tics.
static
int
libd_deltaTime
(
lua_State
*
L
)
{
HUDONLY
lua_pushfixed
(
L
,
renderdeltatics
);
return
1
;
}
static
luaL_Reg
lib_draw
[]
=
{
static
luaL_Reg
lib_draw
[]
=
{
// cache
// cache
{
"patchExists"
,
libd_patchExists
},
{
"patchExists"
,
libd_patchExists
},
...
@@ -1242,6 +1250,7 @@ static luaL_Reg lib_draw[] = {
...
@@ -1242,6 +1250,7 @@ static luaL_Reg lib_draw[] = {
{
"renderer"
,
libd_renderer
},
{
"renderer"
,
libd_renderer
},
{
"localTransFlag"
,
libd_getlocaltransflag
},
{
"localTransFlag"
,
libd_getlocaltransflag
},
{
"userTransFlag"
,
libd_getusertransflag
},
{
"userTransFlag"
,
libd_getusertransflag
},
{
"deltaTime"
,
libd_deltaTime
},
{
NULL
,
NULL
}
{
NULL
,
NULL
}
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment