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
e8e1f7ee
Commit
e8e1f7ee
authored
14 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Fix drawslow.
parent
7f2569b5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/load/graphic.js
+6
-40
6 additions, 40 deletions
exec/load/graphic.js
with
6 additions
and
40 deletions
exec/load/graphic.js
+
6
−
40
View file @
e8e1f7ee
...
...
@@ -66,7 +66,7 @@ function Graphic_gety()
}
return
y
;
}
function
Graphic_draw
(
xpos
,
ypos
,
width
,
height
,
xoff
,
yoff
)
function
Graphic_draw
(
xpos
,
ypos
,
width
,
height
,
xoff
,
yoff
,
delay
)
{
var
x
;
var
y
;
...
...
@@ -83,6 +83,8 @@ function Graphic_draw(xpos,ypos,width,height,xoff,yoff)
xoff
=
0
;
if
(
yoff
==
undefined
)
yoff
=
0
;
if
(
delay
==
undefined
)
delay
=
0
;
if
(
xoff
+
width
>
this
.
width
||
yoff
+
height
>
this
.
height
)
{
alert
(
"
Attempt to draw from outside of graphic:
"
+
xoff
+
"
:
"
+
yoff
+
"
"
+
width
+
"
x
"
+
height
+
"
"
+
this
.
width
+
"
x
"
+
this
.
height
);
return
(
false
)
...
...
@@ -102,6 +104,8 @@ function Graphic_draw(xpos,ypos,width,height,xoff,yoff)
if
(
ch
==
"
\r
"
||
ch
==
"
\n
"
||
!
ch
)
ch
=
this
.
ch
;
console
.
write
(
ch
);
if
(
delay
)
mswait
(
delay
);
}
}
}
...
...
@@ -109,45 +113,7 @@ function Graphic_draw(xpos,ypos,width,height,xoff,yoff)
}
function
Graphic_drawslow
(
xpos
,
ypos
,
width
,
height
,
xoff
,
yoff
)
{
var
x
;
var
y
;
if
(
xpos
==
undefined
)
xpos
=
1
;
if
(
ypos
==
undefined
)
ypos
=
1
;
if
(
width
==
undefined
)
width
=
this
.
width
;
if
(
height
==
undefined
)
height
=
this
.
height
;
if
(
xoff
==
undefined
)
xoff
=
0
;
if
(
yoff
==
undefined
)
yoff
=
0
;
if
(
xoff
+
width
>
this
.
width
||
yoff
+
height
>
this
.
height
)
{
alert
(
"
Attempt to draw from outside of graphic:
"
+
xoff
+
"
:
"
+
yoff
+
"
"
+
width
+
"
x
"
+
height
+
"
"
+
this
.
width
+
"
x
"
+
this
.
height
);
return
(
false
)
}
if
(
xpos
+
width
-
1
>
console
.
screen_columns
||
ypos
+
height
-
1
>
console
.
screen_rows
)
{
alert
(
"
Attempt to draw outside of screen
"
);
return
(
false
);
}
for
(
y
=
0
;
y
<
height
;
y
++
)
{
console
.
gotoxy
(
xpos
,
ypos
+
y
);
for
(
x
=
0
;
x
<
width
;
x
++
)
{
// Do not draw to the bottom left corner of the screen-would scroll
if
(
xpos
+
x
!=
console
.
screen_columns
||
ypos
+
y
!=
console
.
screen_rows
)
{
console
.
attributes
=
this
.
data
[
x
+
xoff
][
this
.
index
+
y
+
yoff
].
attr
;
var
ch
=
this
.
data
[
x
+
xoff
][
this
.
index
+
y
+
yoff
].
ch
;
if
(
ch
==
"
\r
"
||
ch
==
"
\n
"
||
!
ch
)
ch
=
this
.
ch
;
console
.
write
(
ch
);
}
mswait
(
2
);
}
}
return
(
true
);
this
.
draw
(
xpos
,
ypos
,
width
,
height
,
xoff
,
yoff
,
2
);
}
function
Graphic_drawfx
(
xpos
,
ypos
,
width
,
height
,
xoff
,
yoff
)
{
...
...
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