1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-04 04:50:22 +00:00

Merge pull request #401 from SteveMcNeill/main

Add Support for optional paramter for an image handle to CLS
This commit is contained in:
Steve McNeill 2023-10-22 17:40:43 -04:00 committed by GitHub
commit e82f53c79d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 5 deletions

View file

@ -1195,6 +1195,7 @@ void validatepage(int32);
void sub__dest(int32);
void sub__source(int32);
int32 func__printwidth(qbs *, int32, int32);
void sub_clsDest(int32, uint32, int32, int32);
void sub_cls(int32, uint32, int32);
void qbs_print(qbs *, int32);
int32 func__copyimage(int32 i, int32 mode, int32 passed);
@ -14684,6 +14685,17 @@ error:
}
void qbg_sub_locate(int32 row, int32 column, int32 cursor, int32 start, int32 stop, int32 passed);
void sub_clsDest(int32 method, uint32 use_color, int32 dest, int32 passed) {
int32 tempDest;
if (passed & 4) {
tempDest = func__dest(); // get the old dest
sub__dest(dest); //set the new dest
}
sub_cls(method, use_color, passed & 3); //call this regardless if we change the dest or not, just strip out that value first.
if (passed & 4) {sub__dest(tempDest);} //restore the old dest
}
void sub_cls(int32 method, uint32 use_color, int32 passed) {
if (new_error)
return;

View file

@ -430,6 +430,7 @@ extern void qbg_sub_window(float x1, float y1, float x2, float y2,
extern void qbg_sub_view_print(int32 topline, int32 bottomline, int32 passed);
extern void qbg_sub_view(int32 x1, int32 y1, int32 x2, int32 y2,
int32 fillcolor, int32 bordercolor, int32 passed);
extern void sub_clsDest(int32 method, uint32 use_color, int32 dest, int32 passed);
extern void sub_cls(int32 method, uint32 use_color, int32 passed);
extern void qbg_sub_locate(int32 row, int32 column, int32 cursor, int32 start,
int32 stop, int32 passed);

View file

@ -2833,11 +2833,11 @@ regid
clearid
id.n = "Cls"
id.subfunc = 2
id.callname = "sub_cls"
id.args = 2
id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER)
id.specialformat = "[?][,?]"
id.hr_syntax = "CLS [method%] [, bgColor&]"
id.callname = "sub_clsDest"
id.args = 3
id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(ULONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
id.specialformat = "[?][,[?][,?]]"
id.hr_syntax = "CLS [method%] [, bgColor&] [, dest&]"
regid
clearid