Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Jones
EDuke32
Commits
255793ff
Commit
255793ff
authored
Apr 04, 2020
by
Richard Gobeille
Browse files
Demote labeltype to uint8_t
parent
5b216e38
Changes
2
Hide whitespace changes
Inline
Side-by-side
source/duke3d/src/game.cpp
View file @
255793ff
...
...
@@ -5934,8 +5934,8 @@ static void G_CompileScripts(void)
int32_t
psm
=
pathsearchmode
;
label
=
(
char
*
)
&
sprite
[
0
];
// V8: 16384*44/64 = 11264 V7: 4096*44/64 = 2816
labelcode
=
(
int32_t
*
)
&
sector
[
0
];
// V8: 4096*40/4 = 40960 V7: 1024*40/4 = 10240
labeltype
=
(
int
32
_t
*
)
&
wall
[
0
];
// V8: 16384*32
/4
=
131072
V7: 8192*32/4 =
65536
labelcode
=
(
int32_t
*
)
&
sector
[
0
];
// V8: 4096*40/4 = 40960 V7: 1024*40/4 = 10240
labeltype
=
(
u
int
8
_t
*
)
&
wall
[
0
];
// V8: 16384*32 =
524288
V7: 8192*32/4 =
262144
#endif
if
(
g_scriptNamePtr
!=
NULL
)
...
...
@@ -5958,11 +5958,11 @@ static void G_CompileScripts(void)
auto
newlabel
=
(
char
*
)
Xmalloc
(
g_labelCnt
<<
6
);
auto
newlabelcode
=
(
int32_t
*
)
Xmalloc
(
g_labelCnt
*
sizeof
(
int32_t
));
auto
newlabeltype
=
(
int
32
_t
*
)
Xmalloc
(
g_labelCnt
*
sizeof
(
int
32
_t
));
auto
newlabeltype
=
(
u
int
8
_t
*
)
Xmalloc
(
g_labelCnt
*
sizeof
(
u
int
8
_t
));
Bmemcpy
(
newlabel
,
label
,
g_labelCnt
*
64
);
Bmemcpy
(
newlabelcode
,
labelcode
,
g_labelCnt
*
sizeof
(
int32_t
));
Bmemcpy
(
newlabeltype
,
labeltype
,
g_labelCnt
*
sizeof
(
int
32
_t
));
Bmemcpy
(
newlabeltype
,
labeltype
,
g_labelCnt
*
sizeof
(
u
int
8
_t
));
label
=
newlabel
;
labelcode
=
newlabelcode
;
...
...
source/duke3d/src/global.h
View file @
255793ff
...
...
@@ -127,7 +127,7 @@ G_EXTERN int16_t g_cyclers[MAXCYCLERS][6];
G_EXTERN
int16_t
g_mirrorSector
[
64
];
G_EXTERN
int16_t
g_mirrorWall
[
64
];
G_EXTERN
int32_t
*
labelcode
;
G_EXTERN
int
32
_t
*
labeltype
;
G_EXTERN
u
int
8
_t
*
labeltype
;
G_EXTERN
ClockTicks
lockclock
;
G_EXTERN
ClockTicks
ototalclock
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment