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
396db189
Commit
396db189
authored
2 years ago
by
Zwip-Zwap Zapony
Browse files
Options
Downloads
Patches
Plain Diff
Draw the input prompt while the console is moving
parent
435e1f6e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1878
Interpolate console animation, Make con_height update on the fly
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/console.c
+24
-24
24 additions, 24 deletions
src/console.c
with
24 additions
and
24 deletions
src/console.c
+
24
−
24
View file @
396db189
...
...
@@ -61,7 +61,7 @@ static boolean con_started = false; // console has been initialised
static
boolean
con_forcepic
=
true
;
// at startup toggle console translucency when first off
boolean
con_recalc
;
// set true when screen size has changed
static
tic_t
con_tick
;
// console ticker for
anim or
blinking prompt cursor
static
tic_t
con_tick
;
// console ticker for blinking prompt cursor
// con_scrollup should use time (currenttime - lasttime)..
static
boolean
consoletoggle
;
// true when console key pushed, ticker will handle
...
...
@@ -1824,41 +1824,41 @@ static void CON_DrawConsole(void)
}
// draw console text lines from top to bottom
if
(
con_curlines
<
minheight
)
return
;
i
=
con_cy
-
con_scrollup
;
if
(
con_curlines
>=
minheight
)
{
i
=
con_cy
-
con_scrollup
;
// skip the last empty line due to the cursor being at the start of a new line
i
--
;
// skip the last empty line due to the cursor being at the start of a new line
i
--
;
i
-=
(
con_curlines
-
minheight
)
/
charheight
;
i
-=
(
con_curlines
-
minheight
)
/
charheight
;
if
(
rendermode
==
render_none
)
return
;
if
(
rendermode
==
render_none
)
return
;
for
(
y
=
(
con_curlines
-
minheight
)
%
charheight
;
y
<=
con_curlines
-
minheight
;
y
+=
charheight
,
i
++
)
{
INT32
x
;
size_t
c
;
for
(
y
=
(
con_curlines
-
minheight
)
%
charheight
;
y
<=
con_curlines
-
minheight
;
y
+=
charheight
,
i
++
)
{
INT32
x
;
size_t
c
;
p
=
(
UINT8
*
)
&
con_buffer
[((
i
>
0
?
i
:
0
)
%
con_totallines
)
*
con_width
];
p
=
(
UINT8
*
)
&
con_buffer
[((
i
>
0
?
i
:
0
)
%
con_totallines
)
*
con_width
];
for
(
c
=
0
,
x
=
charwidth
;
c
<
con_width
;
c
++
,
x
+=
charwidth
,
p
++
)
{
while
(
*
p
&
0x80
)
for
(
c
=
0
,
x
=
charwidth
;
c
<
con_width
;
c
++
,
x
+=
charwidth
,
p
++
)
{
charflags
=
(
*
p
&
0x7f
)
<<
V_CHARCOLORSHIFT
;
p
++
;
c
++
;
while
(
*
p
&
0x80
)
{
charflags
=
(
*
p
&
0x7f
)
<<
V_CHARCOLORSHIFT
;
p
++
;
c
++
;
}
if
(
c
>=
con_width
)
break
;
V_DrawCharacter
(
x
,
y
,
(
INT32
)(
*
p
)
|
charflags
|
cv_constextsize
.
value
|
V_NOSCALESTART
,
true
);
}
if
(
c
>=
con_width
)
break
;
V_DrawCharacter
(
x
,
y
,
(
INT32
)(
*
p
)
|
charflags
|
cv_constextsize
.
value
|
V_NOSCALESTART
,
true
);
}
}
// draw prompt if enough place (not while game startup)
if
((
con_curlines
=
=
con_destlines
)
&&
(
con_curlines
>=
min
height
)
&&
!
con_startup
)
if
((
con_curlines
>
=
(
minheight
-
char
height
)
)
&&
!
con_startup
)
CON_DrawInput
();
}
...
...
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