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
f615b604
Commit
f615b604
authored
3 years ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Vectorize beziers
parent
e5e5c1ef
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Pipeline
#2104
passed
3 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/conio/ciolib.c
+3
-3
3 additions, 3 deletions
src/conio/ciolib.c
src/conio/ciolib.h
+2
-2
2 additions, 2 deletions
src/conio/ciolib.h
src/syncterm/ripper.c
+17
-8
17 additions, 8 deletions
src/syncterm/ripper.c
with
22 additions
and
13 deletions
src/conio/ciolib.c
+
3
−
3
View file @
f615b604
...
...
@@ -100,7 +100,7 @@ CIOLIBEXPORT void ciolib_wscroll(void);
CIOLIBEXPORT
void
ciolib_gotoxy
(
int
x
,
int
y
);
CIOLIBEXPORT
void
ciolib_clreol
(
void
);
CIOLIBEXPORT
void
ciolib_clrscr
(
void
);
CIOLIBEXPORT
int
ciolib_cputs
(
char
*
str
);
CIOLIBEXPORT
int
ciolib_cputs
(
const
char
*
str
);
CIOLIBEXPORT
int
ciolib_cprintf
(
const
char
*
fmat
,
...);
CIOLIBEXPORT
void
ciolib_textbackground
(
int
colour
);
CIOLIBEXPORT
void
ciolib_textcolor
(
int
colour
);
...
...
@@ -700,7 +700,7 @@ CIOLIBEXPORT char * ciolib_getpass(const char *prompt)
if
(
cio_api
.
getpass
)
return
(
cio_api
.
getpass
(
prompt
));
ciolib_cputs
(
(
char
*
)
prompt
);
ciolib_cputs
(
prompt
);
while
((
ch
=
ciolib_getch
())
!=
'\n'
)
{
switch
(
ch
)
{
case
0
:
/* Skip extended keys */
...
...
@@ -1052,7 +1052,7 @@ CIOLIBEXPORT int ciolib_cprintf(const char *fmat, ...)
/* The Borland version does not translate \n into \r\n... this does.
* Returns last character printed (!)
*/
CIOLIBEXPORT
int
ciolib_cputs
(
char
*
str
)
CIOLIBEXPORT
int
ciolib_cputs
(
const
char
*
str
)
{
int
pos
;
int
ret
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/conio/ciolib.h
+
2
−
2
View file @
f615b604
...
...
@@ -337,7 +337,7 @@ typedef struct {
void
(
*
delline
)
(
void
);
void
(
*
insline
)
(
void
);
int
(
*
cprintf
)
(
const
char
*
,...);
int
(
*
cputs
)
(
char
*
);
int
(
*
cputs
)
(
const
char
*
);
void
(
*
textbackground
)
(
int
);
void
(
*
textcolor
)
(
int
);
int
(
*
getmouse
)
(
struct
mouse_event
*
mevent
);
...
...
@@ -409,7 +409,7 @@ CIOLIBEXPORT void ciolib_wscroll(void);
CIOLIBEXPORT
void
ciolib_gotoxy
(
int
x
,
int
y
);
CIOLIBEXPORT
void
ciolib_clreol
(
void
);
CIOLIBEXPORT
void
ciolib_clrscr
(
void
);
CIOLIBEXPORT
int
ciolib_cputs
(
char
*
str
);
CIOLIBEXPORT
int
ciolib_cputs
(
const
char
*
str
);
CIOLIBEXPORT
int
ciolib_cprintf
(
const
char
*
fmat
,
...);
CIOLIBEXPORT
void
ciolib_textbackground
(
int
colour
);
CIOLIBEXPORT
void
ciolib_textcolor
(
int
colour
);
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/ripper.c
+
17
−
8
View file @
f615b604
...
...
@@ -7691,7 +7691,6 @@ static uint32_t
map_rip_color(int color)
{
uint32_t col = 0;
struct dac_colors *dac = NULL;
if (color < 16)
col = ega_colours[color];
...
...
@@ -7703,9 +7702,6 @@ map_rip_color(int color)
}
else
fprintf(stderr, "Unable to map %d\n", color);
if (dac) {
col = 0x80000000 | (dac->red << 16) | (dac->green << 8) | (dac->blue);
}
return col;
}
...
...
@@ -9872,6 +9868,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
int x, y;
char cache_path[MAX_PATH + 1];
FILE *icn;
int *targets;
args = parse_string(rawargs);
...
...
@@ -10512,7 +10509,12 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
arg1 = parse_mega(&args[16], 2);
x2 = xp[0];
y2 = yp[0];
targets = malloc((arg1 + 2) * 2 * sizeof(*targets));
i = 0;
targets[i++] = x2;
targets[i++] = y2;
// TODO: We should be able to parallelize this...
#pragma clang loop vectorize(enable)
for (arg2 = 1; arg2 < arg1; arg2++) {
double tf = ((double)arg2) / arg1;
double tr = ((double)(arg1 - arg2)) / arg1;
...
...
@@ -10526,11 +10528,18 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
y1 = trc * yp[0] + 3 * tftrs * yp[1] + 3 * tfstr * yp[2] + tfc * yp[3];
//x1 = tr * tr * tr * xp[0] + 3 * tf * tr * tr * xp[1] + 3 * tf * tf * tr * xp[2] + tf * tf * tf * xp[3];
//y1 = tr * tr * tr * yp[0] + 3 * tf * tr * tr * yp[1] + 3 * tf * tf * tr * yp[2] + tf * tf * tf * yp[3];
draw_line(x2, y2, x1, y1);
x2 = x1;
y2 = y1;
targets[i++] = x1;
targets[i++] = y1;
//draw_line(x2, y2, x1, y1);
//x2 = x1;
//y2 = y1;
}
targets[i++] = xp[3];
targets[i++] = yp[3];
for (j = 2; j < i; j += 2) {
draw_line(targets[j - 2], targets[j - 1], targets[j], targets[j + 1]);
}
draw_line(x1, y1, xp[3], yp[3]);
//
draw_line(x1, y1, xp[3], yp[3]);
break;
case 'a': // RIP_ONE_PALETTE !|a <color> <value>
/* This command changes one color in the 16-color palette. The color
...
...
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