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
04c7eeb6
Commit
04c7eeb6
authored
5 years ago
by
LJ Sonic
Browse files
Options
Downloads
Plain Diff
Merge branch 'deprecate-fixedrem' into 'next'
Deprecate FixedRem. See merge request
STJr/SRB2!952
parents
b13f2985
8b801921
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!985
Shaders next merge
,
!952
Deprecate FixedRem.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/lua_mathlib.c
+2
-1
2 additions, 1 deletion
src/lua_mathlib.c
src/m_fixed.h
+0
-12
0 additions, 12 deletions
src/m_fixed.h
src/tables.c
+1
-1
1 addition, 1 deletion
src/tables.c
with
3 additions
and
14 deletions
src/lua_mathlib.c
+
2
−
1
View file @
04c7eeb6
...
...
@@ -113,7 +113,8 @@ static int lib_fixeddiv(lua_State *L)
static
int
lib_fixedrem
(
lua_State
*
L
)
{
lua_pushfixed
(
L
,
FixedRem
(
luaL_checkfixed
(
L
,
1
),
luaL_checkfixed
(
L
,
2
)));
LUA_Deprecated
(
L
,
"FixedRem(a, b)"
,
"a % b"
);
lua_pushfixed
(
L
,
luaL_checkfixed
(
L
,
1
)
%
luaL_checkfixed
(
L
,
2
));
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
src/m_fixed.h
+
0
−
12
View file @
04c7eeb6
...
...
@@ -204,18 +204,6 @@ FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FixedDiv(fixed_t a, fixed_t b)
return
FixedDiv2
(
a
,
b
);
}
/** \brief The FixedRem function
\param x fixed_t number
\param y fixed_t number
\return remainder of dividing x by y
*/
FUNCMATH
FUNCINLINE
static
ATTRINLINE
fixed_t
FixedRem
(
fixed_t
x
,
fixed_t
y
)
{
return
x
%
y
;
}
/** \brief The FixedSqrt function
\param x fixed_t number
...
...
This diff is collapsed.
Click to expand it.
src/tables.c
+
1
−
1
View file @
04c7eeb6
...
...
@@ -72,7 +72,7 @@ static FUNCMATH angle_t AngleAdj(const fixed_t fa, const fixed_t wf,
const
angle_t
adj
=
0x77
;
const
boolean
fan
=
fa
<
0
;
const
fixed_t
sl
=
FixedDiv
(
fa
,
wf
*
2
);
const
fixed_t
lb
=
FixedRem
(
fa
,
wf
*
2
);
const
fixed_t
lb
=
fa
%
(
wf
*
2
);
const
fixed_t
lo
=
(
wf
*
2
)
-
lb
;
if
(
ra
==
0
)
...
...
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