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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SteelT
SRB2
Commits
8f3855d0
Commit
8f3855d0
authored
5 years ago
by
Lactozilla
Browse files
Options
Downloads
Patches
Plain Diff
Don't stop the automap (just restart it instead.)
parent
dd8166ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/am_map.c
+16
-6
16 additions, 6 deletions
src/am_map.c
src/am_map.h
+3
-0
3 additions, 0 deletions
src/am_map.h
src/screen.c
+5
-2
5 additions, 2 deletions
src/screen.c
with
24 additions
and
8 deletions
src/am_map.c
+
16
−
6
View file @
8f3855d0
...
...
@@ -346,15 +346,21 @@ static void AM_initVariables(void)
}
//
// should be called at the start of every level
// right now, i figure it out myself
// Called when the screen size changed.
//
static
void
AM_
Level
Init
(
void
)
static
void
AM_
FrameBuffer
Init
(
void
)
{
f_x
=
f_y
=
0
;
f_w
=
vid
.
width
;
f_h
=
vid
.
height
;
}
//
// should be called at the start of every level
// right now, i figure it out myself
//
static
void
AM_LevelInit
(
void
)
{
AM_findMinMaxBoundaries
();
scale_mtof
=
FixedDiv
(
min_scale_mtof
*
10
,
7
*
FRACUNIT
);
if
(
scale_mtof
>
max_scale_mtof
)
...
...
@@ -376,7 +382,7 @@ void AM_Stop(void)
*
* \sa AM_Stop
*/
static
inline
void
AM_Start
(
void
)
void
AM_Start
(
void
)
{
static
INT32
lastlevel
=
-
1
;
...
...
@@ -385,8 +391,12 @@ static inline void AM_Start(void)
am_stopped
=
false
;
if
(
lastlevel
!=
gamemap
||
am_recalc
)
// screen size changed
{
AM_LevelInit
();
lastlevel
=
gamemap
;
AM_FrameBufferInit
();
if
(
lastlevel
!=
gamemap
)
{
AM_LevelInit
();
lastlevel
=
gamemap
;
}
am_recalc
=
false
;
}
AM_initVariables
();
...
...
This diff is collapsed.
Click to expand it.
src/am_map.h
+
3
−
0
View file @
8f3855d0
...
...
@@ -38,6 +38,9 @@ void AM_Ticker(void);
// Called by main loop, instead of view drawer if automap is active.
void
AM_Drawer
(
void
);
// Enables the automap.
void
AM_Start
(
void
);
// Called to force the automap to quit if the level is completed while it is up.
void
AM_Stop
(
void
);
...
...
This diff is collapsed.
Click to expand it.
src/screen.c
+
5
−
2
View file @
8f3855d0
...
...
@@ -360,10 +360,13 @@ void SCR_Recalc(void)
vid
.
fsmalldupy
=
vid
.
smalldupy
*
FRACUNIT
;
#endif
// toggle off automap because some screensize-dependent values will
// toggle off
(then back on) the
automap because some screensize-dependent values will
// be calculated next time the automap is activated.
if
(
automapactive
)
AM_Stop
();
{
am_recalc
=
true
;
AM_Start
();
}
// set the screen[x] ptrs on the new vidbuffers
V_Init
();
...
...
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