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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
d38ba4d8
Commit
d38ba4d8
authored
Sep 6, 2019
by
Lactozilla
Browse files
Options
Downloads
Patches
Plain Diff
define stuff idk
parent
02a7d8e0
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/hardware/hw_cache.c
+4
-0
4 additions, 0 deletions
src/hardware/hw_cache.c
src/r_data.c
+7
-0
7 additions, 0 deletions
src/r_data.c
src/r_plane.c
+5
-3
5 additions, 3 deletions
src/r_plane.c
with
16 additions
and
3 deletions
src/hardware/hw_cache.c
+
4
−
0
View file @
d38ba4d8
...
...
@@ -664,8 +664,10 @@ static void HWR_GenerateTexture(INT32 texnum, GLTexture_t *grtex)
{
size_t
lumplength
=
W_LumpLengthPwad
(
patch
->
wad
,
patch
->
lump
);
realpatch
=
W_CacheLumpNumPwad
(
patch
->
wad
,
patch
->
lump
,
PU_CACHE
);
#ifndef NO_PNG_LUMPS
if
(
R_IsLumpPNG
((
UINT8
*
)
realpatch
,
lumplength
))
realpatch
=
R_PNGToPatch
((
UINT8
*
)
realpatch
,
lumplength
);
#endif
HWR_DrawTexturePatchInCache
(
&
grtex
->
mipmap
,
blockwidth
,
blockheight
,
texture
,
patch
,
...
...
@@ -892,8 +894,10 @@ static void HWR_LoadPatchFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum)
{
patch_t
*
patch
=
(
patch_t
*
)
W_CacheLumpNum
(
flatlumpnum
,
PU_STATIC
);
size_t
lumplength
=
W_LumpLength
(
flatlumpnum
);
#ifndef NO_PNG_LUMPS
if
(
R_IsLumpPNG
((
UINT8
*
)
patch
,
lumplength
))
patch
=
R_PNGToPatch
((
UINT8
*
)
patch
,
lumplength
);
#endif
grMipmap
->
width
=
(
UINT16
)
SHORT
(
patch
->
width
);
grMipmap
->
height
=
(
UINT16
)
SHORT
(
patch
->
height
);
...
...
This diff is collapsed.
Click to expand it.
src/r_data.c
+
7
−
0
View file @
d38ba4d8
...
...
@@ -376,8 +376,10 @@ static UINT8 *R_GenerateTexture(size_t texnum)
lumpnum
=
patch
->
lump
;
lumplength
=
W_LumpLengthPwad
(
wadnum
,
lumpnum
);
realpatch
=
W_CacheLumpNumPwad
(
wadnum
,
lumpnum
,
PU_CACHE
);
#ifndef NO_PNG_LUMPS
if
(
R_IsLumpPNG
((
UINT8
*
)
realpatch
,
lumplength
))
realpatch
=
R_PNGToPatch
((
UINT8
*
)
realpatch
,
lumplength
);
#endif
// Check the patch for holes.
if
(
texture
->
width
>
SHORT
(
realpatch
->
width
)
||
texture
->
height
>
SHORT
(
realpatch
->
height
))
...
...
@@ -468,8 +470,10 @@ static UINT8 *R_GenerateTexture(size_t texnum)
lumpnum
=
patch
->
lump
;
lumplength
=
W_LumpLengthPwad
(
wadnum
,
lumpnum
);
realpatch
=
W_CacheLumpNumPwad
(
wadnum
,
lumpnum
,
PU_CACHE
);
#ifndef NO_PNG_LUMPS
if
(
R_IsLumpPNG
((
UINT8
*
)
realpatch
,
lumplength
))
realpatch
=
R_PNGToPatch
((
UINT8
*
)
realpatch
,
lumplength
);
#endif
x1
=
patch
->
originx
;
width
=
SHORT
(
realpatch
->
width
);
...
...
@@ -734,6 +738,8 @@ void R_LoadTextures(void)
// Set texture properties.
M_Memcpy
(
texture
->
name
,
W_CheckNameForNumPwad
(
wadnum
,
lumpnum
),
sizeof
(
texture
->
name
));
#ifndef NO_PNG_LUMPS
if
(
R_IsLumpPNG
((
UINT8
*
)
patchlump
,
lumplength
))
{
INT16
width
,
height
;
...
...
@@ -742,6 +748,7 @@ void R_LoadTextures(void)
texture
->
height
=
height
;
}
else
#endif
{
texture
->
width
=
SHORT
(
patchlump
->
width
);
texture
->
height
=
SHORT
(
patchlump
->
height
);
...
...
This diff is collapsed.
Click to expand it.
src/r_plane.c
+
5
−
3
View file @
d38ba4d8
...
...
@@ -963,12 +963,14 @@ void R_DrawSinglePlane(visplane_t *pl)
// Check if the flat is actually a wall texture.
if
(
levelflat
->
texturenum
!=
0
&&
levelflat
->
texturenum
!=
-
1
)
flat
=
R_GetPatchFlat
(
levelflat
,
true
,
false
);
// Maybe it's just a patch, then?
else
if
(
R_CheckIfPatch
(
levelflat
->
lumpnum
))
flat
=
R_GetPatchFlat
(
levelflat
,
false
,
false
);
#ifndef NO_PNG_LUMPS
// Maybe it's a PNG?!
else
if
(
R_IsLumpPNG
(
ds_source
,
size
))
flat
=
R_GetPatchFlat
(
levelflat
,
false
,
true
);
#endif
// Maybe it's just a patch, then?
else
if
(
R_CheckIfPatch
(
levelflat
->
lumpnum
))
flat
=
R_GetPatchFlat
(
levelflat
,
false
,
false
);
// It's a raw flat.
else
{
...
...
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