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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
b7f9626f
Commit
b7f9626f
authored
3 years ago
by
MascaraSnake
Browse files
Options
Downloads
Plain Diff
Merge branch 'taglists-refactor' into udmf-full
parents
b05bcc46
3248556f
No related branches found
No related tags found
1 merge request
!1714
UDMF: The whole thing
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/sdl/Srb2SDL-vc10.vcxproj
+5
-0
5 additions, 0 deletions
src/sdl/Srb2SDL-vc10.vcxproj
src/sdl/Srb2SDL-vc10.vcxproj.filters
+35
-0
35 additions, 0 deletions
src/sdl/Srb2SDL-vc10.vcxproj.filters
src/taglist.c
+35
-3
35 additions, 3 deletions
src/taglist.c
src/taglist.h
+1
-0
1 addition, 0 deletions
src/taglist.h
with
76 additions
and
3 deletions
src/sdl/Srb2SDL-vc10.vcxproj
+
5
−
0
View file @
b7f9626f
...
@@ -245,6 +245,7 @@
...
@@ -245,6 +245,7 @@
<ClInclude
Include=
"..\i_sound.h"
/>
<ClInclude
Include=
"..\i_sound.h"
/>
<ClInclude
Include=
"..\i_system.h"
/>
<ClInclude
Include=
"..\i_system.h"
/>
<ClInclude
Include=
"..\i_tcp.h"
/>
<ClInclude
Include=
"..\i_tcp.h"
/>
<ClInclude
Include=
"..\i_threads.h"
/>
<ClInclude
Include=
"..\i_video.h"
/>
<ClInclude
Include=
"..\i_video.h"
/>
<ClInclude
Include=
"..\keys.h"
/>
<ClInclude
Include=
"..\keys.h"
/>
<ClInclude
Include=
"..\libdivide.h"
/>
<ClInclude
Include=
"..\libdivide.h"
/>
...
@@ -304,6 +305,7 @@
...
@@ -304,6 +305,7 @@
<ClInclude
Include=
"..\st_stuff.h"
/>
<ClInclude
Include=
"..\st_stuff.h"
/>
<ClInclude
Include=
"..\s_sound.h"
/>
<ClInclude
Include=
"..\s_sound.h"
/>
<ClInclude
Include=
"..\tables.h"
/>
<ClInclude
Include=
"..\tables.h"
/>
<ClInclude
Include=
"..\taglist.h"
/>
<ClInclude
Include=
"..\v_video.h"
/>
<ClInclude
Include=
"..\v_video.h"
/>
<ClInclude
Include=
"..\w_wad.h"
/>
<ClInclude
Include=
"..\w_wad.h"
/>
<ClInclude
Include=
"..\y_inter.h"
/>
<ClInclude
Include=
"..\y_inter.h"
/>
...
@@ -415,6 +417,7 @@
...
@@ -415,6 +417,7 @@
<ClCompile
Include=
"..\lua_polyobjlib.c"
/>
<ClCompile
Include=
"..\lua_polyobjlib.c"
/>
<ClCompile
Include=
"..\lua_script.c"
/>
<ClCompile
Include=
"..\lua_script.c"
/>
<ClCompile
Include=
"..\lua_skinlib.c"
/>
<ClCompile
Include=
"..\lua_skinlib.c"
/>
<ClCompile
Include=
"..\lua_taglib.c"
/>
<ClCompile
Include=
"..\lua_thinkerlib.c"
/>
<ClCompile
Include=
"..\lua_thinkerlib.c"
/>
<ClCompile
Include=
"..\lzf.c"
/>
<ClCompile
Include=
"..\lzf.c"
/>
<ClCompile
Include=
"..\md5.c"
/>
<ClCompile
Include=
"..\md5.c"
/>
...
@@ -475,10 +478,12 @@
...
@@ -475,10 +478,12 @@
<ClCompile
Include=
"..\r_things.c"
/>
<ClCompile
Include=
"..\r_things.c"
/>
<ClCompile
Include=
"..\screen.c"
/>
<ClCompile
Include=
"..\screen.c"
/>
<ClCompile
Include=
"..\sounds.c"
/>
<ClCompile
Include=
"..\sounds.c"
/>
<ClCompile
Include=
"..\strcasestr.c"
/>
<ClCompile
Include=
"..\string.c"
/>
<ClCompile
Include=
"..\string.c"
/>
<ClCompile
Include=
"..\st_stuff.c"
/>
<ClCompile
Include=
"..\st_stuff.c"
/>
<ClCompile
Include=
"..\s_sound.c"
/>
<ClCompile
Include=
"..\s_sound.c"
/>
<ClCompile
Include=
"..\tables.c"
/>
<ClCompile
Include=
"..\tables.c"
/>
<ClCompile
Include=
"..\taglist.c"
/>
<ClCompile
Include=
"..\t_facon.c"
>
<ClCompile
Include=
"..\t_facon.c"
>
<ExcludedFromBuild>
true
</ExcludedFromBuild>
<ExcludedFromBuild>
true
</ExcludedFromBuild>
</ClCompile>
</ClCompile>
...
...
This diff is collapsed.
Click to expand it.
src/sdl/Srb2SDL-vc10.vcxproj.filters
+
35
−
0
View file @
b7f9626f
...
@@ -135,6 +135,16 @@
...
@@ -135,6 +135,16 @@
<ClInclude
Include=
"..\dehacked.h"
>
<ClInclude
Include=
"..\dehacked.h"
>
<Filter>
D_Doom
</Filter>
<Filter>
D_Doom
</Filter>
</ClInclude>
</ClInclude>
<ClInclude
Include=
"..\deh_lua.h"
>
<Filter>
D_Doom
</Filter>
</ClInclude>
<ClInclude
Include=
"..\deh_soc.h"
>
<Filter>
D_Doom
</Filter>
</ClInclude>
<ClInclude
Include=
"..\deh_tables.h"
>
<Filter>
D_Doom
</Filter>
</ClInclude>
<ClInclude
Include=
"..\doomdata.h"
>
<ClInclude
Include=
"..\doomdata.h"
>
<Filter>
D_Doom
</Filter>
<Filter>
D_Doom
</Filter>
</ClInclude>
</ClInclude>
...
@@ -288,6 +298,9 @@
...
@@ -288,6 +298,9 @@
<ClInclude
Include=
"..\i_tcp.h"
>
<ClInclude
Include=
"..\i_tcp.h"
>
<Filter>
I_Interface
</Filter>
<Filter>
I_Interface
</Filter>
</ClInclude>
</ClInclude>
<ClInclude
Include=
"..\i_threads.h"
>
<Filter>
I_Interface
</Filter>
</ClInclude>
<ClInclude
Include=
"..\i_video.h"
>
<ClInclude
Include=
"..\i_video.h"
>
<Filter>
I_Interface
</Filter>
<Filter>
I_Interface
</Filter>
</ClInclude>
</ClInclude>
...
@@ -402,6 +415,9 @@
...
@@ -402,6 +415,9 @@
<ClInclude
Include=
"..\tables.h"
>
<ClInclude
Include=
"..\tables.h"
>
<Filter>
P_Play
</Filter>
<Filter>
P_Play
</Filter>
</ClInclude>
</ClInclude>
<ClInclude
Include=
"..\taglist.h"
>
<Filter>
P_Play
</Filter>
</ClInclude>
<ClInclude
Include=
"..\libdivide.h"
>
<ClInclude
Include=
"..\libdivide.h"
>
<Filter>
R_Rend
</Filter>
<Filter>
R_Rend
</Filter>
</ClInclude>
</ClInclude>
...
@@ -600,6 +616,16 @@
...
@@ -600,6 +616,16 @@
<ClCompile
Include=
"..\dehacked.c"
>
<ClCompile
Include=
"..\dehacked.c"
>
<Filter>
D_Doom
</Filter>
<Filter>
D_Doom
</Filter>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"..\deh_lua.c"
>
<Filter>
D_Doom
</Filter>
</ClCompile>
<ClCompile
Include=
"..\deh_soc.c"
>
<Filter>
D_Doom
</Filter>
</ClCompile>
<ClCompile
Include=
"..\deh_tables.c"
>
<Filter>
D_Doom
</Filter>
</ClCompile>
<ClCompile
Include=
"..\d_clisrv.c"
>
<ClCompile
Include=
"..\d_clisrv.c"
>
<Filter>
D_Doom
</Filter>
<Filter>
D_Doom
</Filter>
</ClCompile>
</ClCompile>
...
@@ -747,6 +773,9 @@
...
@@ -747,6 +773,9 @@
<ClCompile
Include=
"..\lua_skinlib.c"
>
<ClCompile
Include=
"..\lua_skinlib.c"
>
<Filter>
LUA
</Filter>
<Filter>
LUA
</Filter>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"..\lua_taglib.c"
>
<Filter>
LUA
</Filter>
</ClCompile>
<ClCompile
Include=
"..\lua_thinkerlib.c"
>
<ClCompile
Include=
"..\lua_thinkerlib.c"
>
<Filter>
LUA
</Filter>
<Filter>
LUA
</Filter>
</ClCompile>
</ClCompile>
...
@@ -792,6 +821,9 @@
...
@@ -792,6 +821,9 @@
<ClCompile
Include=
"..\string.c"
>
<ClCompile
Include=
"..\string.c"
>
<Filter>
M_Misc
</Filter>
<Filter>
M_Misc
</Filter>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"..\strcasestr.c"
>
<Filter>
M_Misc
</Filter>
</ClCompile>
<ClCompile
Include=
"..\comptime.c"
>
<ClCompile
Include=
"..\comptime.c"
>
<Filter>
O_Other
</Filter>
<Filter>
O_Other
</Filter>
</ClCompile>
</ClCompile>
...
@@ -852,6 +884,9 @@
...
@@ -852,6 +884,9 @@
<ClCompile
Include=
"..\tables.c"
>
<ClCompile
Include=
"..\tables.c"
>
<Filter>
P_Play
</Filter>
<Filter>
P_Play
</Filter>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"..\taglist.c"
>
<Filter>
P_Play
</Filter>
</ClCompile>
<ClCompile
Include=
"..\t_facon.c"
>
<ClCompile
Include=
"..\t_facon.c"
>
<Filter>
P_Play
</Filter>
<Filter>
P_Play
</Filter>
</ClCompile>
</ClCompile>
...
...
This diff is collapsed.
Click to expand it.
src/taglist.c
+
35
−
3
View file @
b7f9626f
...
@@ -210,6 +210,38 @@ void Taggroup_Add (taggroup_t *garray[], const mtag_t tag, size_t id)
...
@@ -210,6 +210,38 @@ void Taggroup_Add (taggroup_t *garray[], const mtag_t tag, size_t id)
group
->
elements
[
i
]
=
id
;
group
->
elements
[
i
]
=
id
;
}
}
static
void
Taggroup_Add_Init
(
taggroup_t
*
garray
[],
const
mtag_t
tag
,
size_t
id
)
{
taggroup_t
*
group
;
if
(
tag
==
MTAG_GLOBAL
)
return
;
group
=
garray
[(
UINT16
)
tag
];
if
(
!
in_bit_array
(
tags_available
,
tag
))
{
num_tags
++
;
set_bit_array
(
tags_available
,
tag
);
}
// Create group if empty.
if
(
!
group
)
group
=
garray
[(
UINT16
)
tag
]
=
Z_Calloc
(
sizeof
(
taggroup_t
),
PU_LEVEL
,
NULL
);
else
if
(
group
->
elements
[
group
->
count
-
1
]
==
id
)
return
;
// Don't add duplicates
group
->
count
++
;
if
(
group
->
count
>
group
->
capacity
)
{
group
->
capacity
=
2
*
group
->
count
;
group
->
elements
=
Z_Realloc
(
group
->
elements
,
group
->
capacity
*
sizeof
(
size_t
),
PU_LEVEL
,
NULL
);
}
group
->
elements
[
group
->
count
-
1
]
=
id
;
}
static
size_t
total_elements_with_tag
(
const
mtag_t
tag
)
static
size_t
total_elements_with_tag
(
const
mtag_t
tag
)
{
{
return
return
...
@@ -269,17 +301,17 @@ void Taggroup_Remove (taggroup_t *garray[], const mtag_t tag, size_t id)
...
@@ -269,17 +301,17 @@ void Taggroup_Remove (taggroup_t *garray[], const mtag_t tag, size_t id)
static
void
Taglist_AddToSectors
(
const
mtag_t
tag
,
const
size_t
itemid
)
static
void
Taglist_AddToSectors
(
const
mtag_t
tag
,
const
size_t
itemid
)
{
{
Taggroup_Add
(
tags_sectors
,
tag
,
itemid
);
Taggroup_Add
_Init
(
tags_sectors
,
tag
,
itemid
);
}
}
static
void
Taglist_AddToLines
(
const
mtag_t
tag
,
const
size_t
itemid
)
static
void
Taglist_AddToLines
(
const
mtag_t
tag
,
const
size_t
itemid
)
{
{
Taggroup_Add
(
tags_lines
,
tag
,
itemid
);
Taggroup_Add
_Init
(
tags_lines
,
tag
,
itemid
);
}
}
static
void
Taglist_AddToMapthings
(
const
mtag_t
tag
,
const
size_t
itemid
)
static
void
Taglist_AddToMapthings
(
const
mtag_t
tag
,
const
size_t
itemid
)
{
{
Taggroup_Add
(
tags_mapthings
,
tag
,
itemid
);
Taggroup_Add
_Init
(
tags_mapthings
,
tag
,
itemid
);
}
}
/// After all taglists have been built for each element (sectors, lines, things),
/// After all taglists have been built for each element (sectors, lines, things),
...
...
This diff is collapsed.
Click to expand it.
src/taglist.h
+
1
−
0
View file @
b7f9626f
...
@@ -44,6 +44,7 @@ typedef struct
...
@@ -44,6 +44,7 @@ typedef struct
{
{
size_t
*
elements
;
size_t
*
elements
;
size_t
count
;
size_t
count
;
size_t
capacity
;
}
taggroup_t
;
}
taggroup_t
;
extern
bitarray_t
tags_available
[];
extern
bitarray_t
tags_available
[];
...
...
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