Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Main
Synchronet
Commits
60e40400
Commit
60e40400
authored
5 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
The cterm_screen no longer has separate arrays for foreground and background.
Also, the vmem is an array of struct vmem_cell.
parent
715a7f83
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/conio/ciolib.c
+0
-15
0 additions, 15 deletions
src/conio/ciolib.c
src/conio/ciolib.h
+9
-11
9 additions, 11 deletions
src/conio/ciolib.h
with
9 additions
and
26 deletions
src/conio/ciolib.c
+
0
−
15
View file @
60e40400
...
...
@@ -1842,19 +1842,6 @@ CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void)
free
(
ret
);
return
NULL
;
}
ret
->
foreground
=
malloc
(
ret
->
text_info
.
screenwidth
*
ret
->
text_info
.
screenheight
*
sizeof
(
ret
->
foreground
[
0
]));
if
(
ret
->
foreground
==
NULL
)
{
free
(
ret
->
vmem
);
free
(
ret
);
return
NULL
;
}
ret
->
background
=
malloc
(
ret
->
text_info
.
screenwidth
*
ret
->
text_info
.
screenheight
*
sizeof
(
ret
->
background
[
0
]));
if
(
ret
->
background
==
NULL
)
{
free
(
ret
->
foreground
);
free
(
ret
->
vmem
);
free
(
ret
);
return
NULL
;
}
if
(
vmode
!=
-
1
)
{
ret
->
pixels
=
ciolib_getpixels
(
0
,
0
,
vparams
[
vmode
].
charwidth
*
vparams
[
vmode
].
cols
-
1
,
vparams
[
vmode
].
charheight
*
vparams
[
vmode
].
rows
-
1
);
...
...
@@ -1875,8 +1862,6 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_freescreen(struct ciolib_screen *scrn)
return
;
ciolib_freepixels
(
scrn
->
pixels
);
FREE_AND_NULL
(
scrn
->
background
);
FREE_AND_NULL
(
scrn
->
foreground
);
FREE_AND_NULL
(
scrn
->
vmem
);
free
(
scrn
);
}
...
...
This diff is collapsed.
Click to expand it.
src/conio/ciolib.h
+
9
−
11
View file @
60e40400
...
...
@@ -258,26 +258,24 @@ struct ciolib_pixels {
uint32_t
height
;
};
struct
vmem_cell
{
uint8_t
legacy_attr
;
uint8_t
ch
;
uint8_t
font
;
uint32_t
fg
;
// RGB 00RRGGBB High bit indicates palette colour
uint32_t
bg
;
// RGB 00RRGGBB High bit indicates palette colour
};
struct
ciolib_screen
{
uint32_t
fg_colour
;
uint32_t
bg_colour
;
int
flags
;
int
fonts
[
5
];
struct
ciolib_pixels
*
pixels
;
void
*
vmem
;
uint32_t
*
foreground
;
uint32_t
*
background
;
struct
vmem_cell
*
vmem
;
struct
text_info
text_info
;
};
struct
vmem_cell
{
uint8_t
legacy_attr
;
uint8_t
ch
;
uint8_t
font
;
uint32_t
fg
;
// RGB 00RRGGBB High bit indicates palette colour
uint32_t
bg
;
// RGB 00RRGGBB High bit indicates palette colour
};
#define CONIO_FIRST_FREE_FONT 43
typedef
struct
{
...
...
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