Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
EDuke32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
92
Issues
92
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Richard Gobeille
EDuke32
Commits
1f0bc174
Commit
1f0bc174
authored
Sep 22, 2020
by
Richard Gobeille
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
engine: vec2_t linetype
parent
371ba609
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
source/build/include/clip.h
source/build/include/clip.h
+3
-2
source/build/src/clip.cpp
source/build/src/clip.cpp
+3
-4
No files found.
source/build/include/clip.h
View file @
1f0bc174
...
...
@@ -65,9 +65,10 @@ extern void engineInitClipMaps();
extern
void
engineSetClipMap
(
mapinfo_t
*
bak
,
mapinfo_t
*
newmap
);
#endif // HAVE_CLIPSHAPE_FEATURE
typedef
struct
typedef
struct
MAY_ALIAS
{
int32_t
x1
,
y1
,
x2
,
y2
;
union
{
struct
{
int32_t
x1
,
y1
;
};
vec2_t
p1
;
};
union
{
struct
{
int32_t
x2
,
y2
;
};
vec2_t
p2
;
};
}
linetype
;
extern
int16_t
clipsectorlist
[
MAXCLIPSECTORS
];
...
...
source/build/src/clip.cpp
View file @
1f0bc174
...
...
@@ -764,8 +764,7 @@ static void addclipline(int32_t dax1, int32_t day1, int32_t dax2, int32_t day2,
return
;
}
clipit
[
clipnum
].
x1
=
dax1
;
clipit
[
clipnum
].
y1
=
day1
;
clipit
[
clipnum
].
x2
=
dax2
;
clipit
[
clipnum
].
y2
=
day2
;
clipit
[
clipnum
]
=
{
{
dax1
,
day1
},
{
dax2
,
day2
}
};
clipobjectval
[
clipnum
]
=
daoval
;
uint32_t
const
mask
=
pow2char
[
clipnum
&
7
];
...
...
@@ -917,8 +916,8 @@ static inline int32_t cliptrace(vec2_t const pos, vec2_t * const goal)
for
(
native_t
z
=
clipnum
-
1
;
z
>=
0
;
z
--
)
{
vec2_t
const
p1
=
{
clipit
[
z
].
x1
,
clipit
[
z
].
y1
}
;
vec2_t
const
p2
=
{
clipit
[
z
].
x2
,
clipit
[
z
].
y2
}
;
vec2_t
const
p1
=
clipit
[
z
].
p1
;
vec2_t
const
p2
=
clipit
[
z
].
p2
;
vec2_t
const
area
=
{
p2
.
x
-
p1
.
x
,
p2
.
y
-
p1
.
y
};
int32_t
topu
=
area
.
x
*
(
pos
.
y
-
p1
.
y
)
-
(
pos
.
x
-
p1
.
x
)
*
area
.
y
;
...
...
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