Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wolf3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
wolf3d
Commits
aa014f57
Commit
aa014f57
authored
May 22, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed sprite clipping in BuildCompScale, and changed wall drawing to mac
version's
parent
16a98a20
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
11 deletions
+75
-11
TODO
src/TODO
+4
-6
version.h
src/version.h
+1
-1
wl_draw.c
src/wl_draw.c
+16
-0
wl_scale.c
src/wl_scale.c
+54
-4
No files found.
src/TODO
View file @
aa014f57
...
@@ -16,7 +16,7 @@ to/from just for reading, so only not-packed structures are used during
...
@@ -16,7 +16,7 @@ to/from just for reading, so only not-packed structures are used during
actual gameplay/etc.
actual gameplay/etc.
* is that memory intro screen needed anymore? probably not, although it
* is that memory intro screen needed anymore? probably not, although it
would be nice to show what version is loaded, but doom just printed text
would be nice to show what version is loaded, but doom just printed text
and the intro screen which came with wolf3d has copyrighted images
and the intro screen which came with wolf3d has copyrighted
/trademarked
images
maybe make a new intro screen...
maybe make a new intro screen...
* then, what about PG13? OH NO!!!! -- people would probably want the first
* then, what about PG13? OH NO!!!! -- people would probably want the first
two screens for nostalga
two screens for nostalga
...
@@ -25,10 +25,6 @@ work the same, let the input handler do it all instead
...
@@ -25,10 +25,6 @@ work the same, let the input handler do it all instead
i think its safe for now to go with the scancodes as being the "universal"
i think its safe for now to go with the scancodes as being the "universal"
key type, and for everything not scancode-based, have a function to
key type, and for everything not scancode-based, have a function to
translate
translate
* fix BuildCompScale so that the clipping code is not neccessary in
BuildCompScale, so you can remove if ((ny+ys) >= viewheight)) ...
else there are sprite drawing/clipping bugs that will cause it to draw
outside the viewarea (at least at the bottom), leaving artifacts
* remove GOODTIMES?
* remove GOODTIMES?
* Consider removing the SOD manual check
* Consider removing the SOD manual check
* perhaps rename UPLOAD
* perhaps rename UPLOAD
...
@@ -75,7 +71,7 @@ but palette fades will still need it! damnit
...
@@ -75,7 +71,7 @@ but palette fades will still need it! damnit
for every byte when transferring to the pixmap, palette fades require a
for every byte when transferring to the pixmap, palette fades require a
screen update
screen update
* make sure none of the code tries to handle gfx/sound data directly
* make sure none of the code tries to handle gfx/sound data directly
* GL_shared_texture_palette for opengl
* GL_
EXT_
shared_texture_palette for opengl
* if window looses focus, should it clear the keys ?
* if window looses focus, should it clear the keys ?
* clean up vi_xlib.c: fix vid mode changing, fix dga for non8bit modes and
* clean up vi_xlib.c: fix vid mode changing, fix dga for non8bit modes and
the nonpalette setting stuff... lots of if statements
the nonpalette setting stuff... lots of if statements
...
@@ -91,7 +87,9 @@ at a time
...
@@ -91,7 +87,9 @@ at a time
cleanups for c++
cleanups for c++
either that or use extern "C" { ... } in the header files
either that or use extern "C" { ... } in the header files
* change wl_scale to use mac wolf3d's version of scaling
* change wl_scale to use mac wolf3d's version of scaling
wall drawing is done, just needed to fix sprite code
* check in wolftools and add mac wolftools (currently the res dumping stuff)
* check in wolftools and add mac wolftools (currently the res dumping stuff)
* have vi_xlib.c compile without the extensions
Things to try:
Things to try:
* Any speed gain with comparing values in screen before writing?
* Any speed gain with comparing values in screen before writing?
...
...
src/version.h
View file @
aa014f57
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
/* SDM = 2 */
/* SDM = 2 */
/* SOD = 3 */
/* SOD = 3 */
#ifndef WMODE
#ifndef WMODE
#define WMODE
3
#define WMODE
1
#endif
#endif
#if WMODE == 0
#if WMODE == 0
...
...
src/wl_draw.c
View file @
aa014f57
...
@@ -227,6 +227,7 @@ int CalcHeight (void)
...
@@ -227,6 +227,7 @@ int CalcHeight (void)
unsigned
postx
;
unsigned
postx
;
#if 0
void ScalePost(byte *wall, int texture)
void ScalePost(byte *wall, int texture)
{
{
int height;
int height;
...
@@ -239,7 +240,22 @@ void ScalePost(byte *wall, int texture)
...
@@ -239,7 +240,22 @@ void ScalePost(byte *wall, int texture)
source = wall+texture;
source = wall+texture;
xBuildCompScale (height/2, source, postx);
xBuildCompScale (height/2, source, postx);
}
}
#endif
/* TODO: this is new ScalePost for new scaling routine */
void
ScalePost
(
byte
*
wall
,
int
texture
)
{
int
height
;
byte
*
source
;
height
=
(
wallheight
[
postx
]
&
0xfff8
)
>>
1
;
/* TODO: i can remove maxscaleshl2 now */
//if (height > maxscaleshl2)
// height = maxscaleshl2;
source
=
wall
+
texture
;
xBuildCompScale
(
height
/
2
,
source
,
postx
);
}
/*
/*
====================
====================
...
...
src/wl_scale.c
View file @
aa014f57
...
@@ -50,9 +50,13 @@ void BuildCompScale(int height)
...
@@ -50,9 +50,13 @@ void BuildCompScale(int height)
if
(
startpix
==
endpix
||
endpix
<
0
||
startpix
>=
viewheight
||
src
==
64
)
if
(
startpix
==
endpix
||
endpix
<
0
||
startpix
>=
viewheight
||
src
==
64
)
/* source pixel goes off screen */
/* source pixel goes off screen */
scaledata
[
height
].
desty
[
src
]
=
-
1
;
scaledata
[
height
].
desty
[
src
]
=
-
1
;
else
else
scaledata
[
height
].
desty
[
src
]
=
startpix
;
scaledata
[
height
].
desty
[
src
]
=
startpix
;
/* Clip if needed */
if
(
((
signed
)
scaledata
[
height
].
count
[
src
]
+
(
signed
)
scaledata
[
height
].
desty
[
src
])
>
viewheight
)
scaledata
[
height
].
count
[
src
]
=
viewheight
-
scaledata
[
height
].
desty
[
src
];
}
}
}
}
...
@@ -96,7 +100,7 @@ void SetupScaling(int maxscaleheight)
...
@@ -96,7 +100,7 @@ void SetupScaling(int maxscaleheight)
=
=
========================
========================
*/
*/
#if 0
void xBuildCompScale(int height, byte *source, int x)
void xBuildCompScale(int height, byte *source, int x)
{
{
...
@@ -136,7 +140,54 @@ void xBuildCompScale(int height, byte *source, int x)
...
@@ -136,7 +140,54 @@ void xBuildCompScale(int height, byte *source, int x)
}
}
}
}
#endif
/* TODO: this accesses gfxbuf directly! */
void
ScaledDraw
(
byte
*
gfx
,
int
scale
,
byte
*
vid
,
unsigned
long
tfrac
,
unsigned
long
tint
,
unsigned
long
delta
)
{
fixed
OldDelta
;
while
(
scale
--
)
{
*
vid
=
*
gfx
;
vid
+=
320
;
/* TODO: compiled in constant! */
OldDelta
=
delta
;
delta
+=
tfrac
;
gfx
+=
tint
;
if
(
OldDelta
>
delta
)
gfx
+=
1
;
}
}
void
xBuildCompScale
(
unsigned
int
height
,
byte
*
source
,
int
x
)
{
unsigned
long
TheFrac
;
unsigned
long
TheInt
;
unsigned
long
y
;
if
(
height
)
{
TheFrac
=
0x40000000UL
/
height
;
if
(
height
<
viewheight
)
{
y
=
yoffset
+
(
viewheight
-
height
)
/
2
;
TheInt
=
TheFrac
>>
24
;
TheFrac
<<=
8
;
ScaledDraw
(
source
,
height
,
gfxbuf
+
(
y
*
320
)
+
x
+
xoffset
,
TheFrac
,
TheInt
,
0
);
return
;
}
y
=
(
height
-
viewheight
)
/
2
;
y
*=
TheFrac
;
TheInt
=
TheFrac
>>
24
;
TheFrac
<<=
8
;
ScaledDraw
(
&
source
[
y
>>
24
],
viewheight
,
gfxbuf
+
(
yoffset
*
320
)
+
x
+
xoffset
,
TheFrac
,
TheInt
,
y
<<
8
);
}
}
/*
/*
=======================
=======================
...
@@ -175,7 +226,6 @@ void ScaleLine()
...
@@ -175,7 +226,6 @@ void ScaleLine()
color
=
*
pixels
++
;
color
=
*
pixels
++
;
if
(
ys
>=
0
)
{
if
(
ys
>=
0
)
{
for
(
ny
=
0
;
ny
<
scaledata
[
linescale
].
count
[
y
];
ny
++
)
{
for
(
ny
=
0
;
ny
<
scaledata
[
linescale
].
count
[
y
];
ny
++
)
{
if
(
(
ys
+
ny
)
>=
viewheight
)
break
;
/* TODO: fix BuildCompScale so this isn't necessary */
for
(
n
=
0
,
x
=
slinex
;
n
<
slinewidth
;
n
++
,
x
++
)
{
for
(
n
=
0
,
x
=
slinex
;
n
<
slinewidth
;
n
++
,
x
++
)
{
VL_Plot
(
x
+
xoffset
,
ys
+
ny
+
yoffset
,
color
);
VL_Plot
(
x
+
xoffset
,
ys
+
ny
+
yoffset
,
color
);
}
}
...
...
Write
Preview
Markdown
is supported
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