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
33b6fa93
Commit
33b6fa93
authored
Dec 09, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor code changes...
parent
d9136e3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
39 deletions
+13
-39
vi_xlib.c
src/vi_xlib.c
+3
-14
wl_def.h
src/wl_def.h
+0
-18
wl_draw.c
src/wl_draw.c
+10
-7
No files found.
src/vi_xlib.c
View file @
33b6fa93
...
...
@@ -293,9 +293,9 @@ void VL_Startup()
}
}
//
attr.colormap = cmap;
attr
.
colormap
=
cmap
;
attr
.
event_mask
=
KeyPressMask
|
KeyReleaseMask
|
ExposureMask
;
attrmask
=
/*CWColormap |*/
CWEventMask
;
attrmask
=
CWColormap
|
CWEventMask
;
if
(
fullscreen
||
dga
)
{
attrmask
|=
CWOverrideRedirect
;
...
...
@@ -309,7 +309,7 @@ void VL_Startup()
Quit
(
"Unable to create window!"
);
}
if
(
dga
)
{
if
(
fullscreen
||
dga
)
{
XMapWindow
(
dpy
,
win
);
XRaiseWindow
(
dpy
,
win
);
XGrabKeyboard
(
dpy
,
win
,
True
,
GrabModeAsync
,
GrabModeAsync
,
CurrentTime
);
...
...
@@ -543,17 +543,6 @@ void VW_UpdateScreen()
XPutImage
(
dpy
,
win
,
gc
,
img
,
0
,
0
,
0
,
0
,
320
,
200
);
}
/*
=============================================================================
PALETTE OPS
To avoid snow, do a WaitVBL BEFORE calling these
=============================================================================
*/
/*
=================
=
...
...
src/wl_def.h
View file @
33b6fa93
...
...
@@ -859,12 +859,6 @@ void PicturePause (void);
extern
long
lasttimecount
;
extern
long
frameon
;
extern
boolean
fizzlein
;
extern
unsigned
wallheight
[
MAXVIEWWIDTH
];
extern
fixed
tileglobal
;
extern
fixed
focallength
;
//
// derived constants
...
...
@@ -916,18 +910,6 @@ void DamageActor (objtype *ob, unsigned damage);
boolean
CheckLine
(
objtype
*
ob
);
boolean
CheckSight
(
objtype
*
ob
);
/*
=============================================================================
WL_SCALE DEFINITIONS
=============================================================================
*/
void
ScaleShape
(
int
xcenter
,
int
shapenum
,
unsigned
height
);
void
SimpleScaleShape
(
int
xcenter
,
int
shapenum
,
unsigned
height
);
/*
=============================================================================
...
...
src/wl_draw.c
View file @
33b6fa93
...
...
@@ -7,7 +7,7 @@
#define ACTORSIZE 0x4000
unsigned
wallheight
[
MAXVIEWWIDTH
];
static
unsigned
wallheight
[
MAXVIEWWIDTH
];
//
// refresh variables
...
...
@@ -44,6 +44,9 @@ static void AsmRefresh();
z; \
})
#endif
void
ScaleShape
(
int
xcenter
,
int
shapenum
,
unsigned
height
);
void
SimpleScaleShape
(
int
xcenter
,
int
shapenum
,
unsigned
height
);
/* ======================================================================== */
...
...
@@ -892,19 +895,19 @@ static int CalcHeight()
{
fixed
gxt
,
gyt
,
nx
,
gx
,
gy
;
gx
=
xintercept
-
viewx
;
gxt
=
FixedByFrac
(
gx
,
viewcos
);
gx
=
xintercept
-
viewx
;
gxt
=
FixedByFrac
(
gx
,
viewcos
);
gy
=
yintercept
-
viewy
;
gyt
=
FixedByFrac
(
gy
,
viewsin
);
gy
=
yintercept
-
viewy
;
gyt
=
FixedByFrac
(
gy
,
viewsin
);
nx
=
gxt
-
gyt
;
//
// calculate perspective ratio (heightnumerator/(nx>>8))
//
if
(
nx
<
MINDIST
)
nx
=
MINDIST
;
/* don't let divide overflow */
if
(
nx
<
MINDIST
)
nx
=
MINDIST
;
/* don't let divide overflow */
return
heightnumerator
/
(
nx
>>
8
);
}
...
...
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