This commit is contained in:
CalcLoverHK 2024-03-17 21:27:31 +08:00
parent 271e07dfba
commit d6064a58ca
8 changed files with 59 additions and 33 deletions

View File

@ -335,24 +335,24 @@ void CB_Except( char*SRC ) {
//----------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
int CB_GetRGB( char *SRC, int mode ){ // GetRGB/HSV/HSL() -> ListAns
int c,d,r,g,b,m;
int h,s,v;
int base=MatBase;
int errorCheck=1;
int pipe=mode & 0xF0;
mode &= 0x0F;
d = CB_EvalInt( SRC );
if ( SRC[ExecPtr] == ',' ) {
c=SRC[++ExecPtr];
if ( ( c == 'N' ) || ( c == 'N' ) ) { ExecPtr++; errorCheck=0; }
}
if ( SRC[ExecPtr] == ')' ) ExecPtr++;
int c,d,r,g,b,m;
int h,s,v;
int base=MatBase;
int errorCheck=1;
int pipe=mode & 0xF0;
mode &= 0x0F;
d = CB_EvalInt( SRC );
if ( SRC[ExecPtr] == ',' ) {
c=SRC[++ExecPtr];
if ( ( c == 'N' ) || ( c == 'N' ) ) { ExecPtr++; errorCheck=0; }
}
if ( SRC[ExecPtr] == ')' ) ExecPtr++;
b = ((d&0x001F) << 3);
g = ((d&0x07E0) >> 3);
r = ((d&0xF800) >> 8);
b = ((d&0x001F) << 3);
g = ((d&0x07E0) >> 3);
r = ((d&0xF800) >> 8);
h=r; s=g; v=b;
h=r; s=g; v=b;
// if ( mode ) {
// if ( ( errorCheck ) && ( pipe==0 ) ) {
// if ( (d==0x003F) || (d==0x041F) || (d==0xF820) || (d==0xFC00) ) { if ( CannotSupportERROR( d ) ) return 0; } // Can not support error
@ -362,11 +362,11 @@ int CB_GetRGB( char *SRC, int mode ){ // GetRGB/HSV/HSL() -> ListAns
// }
dspflag=4; // List ans
NewMatListAns( 3, 1, base, 32 ); // List Ans[3]
m=base;
m=base;
WriteMatrix( CB_MatListAnsreg, m++, base, h ) ; //
WriteMatrix( CB_MatListAnsreg, m++, base, s ) ; //
WriteMatrix( CB_MatListAnsreg, m , base, v ) ; //
return d;
return d;
}
int CB_RGBlistsub( char *SRC, int*r, int*g, int*b ){

View File

@ -367,6 +367,10 @@ void GetGenuineCmdF1( unsigned int *code ){
switch ( CommandPage ) {
case 0: (*code)=0xF91C;return; // File
} break;
case CMD_SETUP_TVAR:
switch ( CommandPage ) {
case 0: (*code)=0xF788;return; // VarRange
} break;
default:
break;

View File

@ -357,6 +357,10 @@ void GetGenuineCmdF2( unsigned int *code ){
switch ( CommandPage ) {
case 0: (*code)=0xF909;return; // a+bi
} break;
case CMD_SETUP_TVAR:
switch ( CommandPage ) {
case 0: (*code)=0xF91D;return; // VarList
} break;
default:
break;

View File

@ -770,15 +770,15 @@ char* CB_GetOpStrSub( char *SRC ,int *maxlen, int c ) { // String -> buffer ret
dimA = GetStrYFnNo( SRC, reg, defaultGraphAryN, defaultGraphArySize );
switch ( c ) {
case 0xFFFFFFF0: // GraphY
buffer = (char *)ReadGraphY( dimA ); break;
buffer = ReadGraphY( dimA ); break;
case 0xFFFFFFF1: // Graphr
buffer = (char *)ReadGraphr( dimA ); break;
buffer = ReadGraphr( dimA ); break;
case 0xFFFFFFF2: // GraphXt
buffer = (char *)ReadGraphXt( dimA ); break;
buffer = ReadGraphXt( dimA ); break;
case 0xFFFFFFF3: // GraphYt
buffer = (char *)ReadGraphYt( dimA ); break;
buffer = ReadGraphYt( dimA ); break;
case 0xFFFFFFF4: // GraphX
buffer = (char *)ReadGraphX( dimA ); break;
buffer = ReadGraphX( dimA ); break;
default:
buffer = MatrixPtr( reg, dimA, 7 );
}
@ -1391,15 +1391,15 @@ char* CB_GraphStrSub( char *SRC ) { // defaultGraphAry
if ( ErrorNo ) return 0;
switch ( c ) {
case 0xFFFFFFF0: // GraphY
ptr = (char *)ReadGraphY( dimA ); break;
ptr = ReadGraphY( dimA ); break;
case 0xFFFFFFF1: // Graphr
ptr = (char *)ReadGraphr( dimA ); break;
ptr = ReadGraphr( dimA ); break;
case 0xFFFFFFF2: // GraphXt
ptr = (char *)ReadGraphXt( dimA ); break;
ptr = ReadGraphXt( dimA ); break;
case 0xFFFFFFF3: // GraphYt
ptr = (char *)ReadGraphYt( dimA ); break;
ptr = ReadGraphYt( dimA ); break;
case 0xFFFFFFF4: // GraphX
ptr = (char *)ReadGraphX( dimA ); break;
ptr = ReadGraphX( dimA ); break;
default:
ptr = MatrixPtr( defaultGraphAry, dimA, 7 );
}

View File

@ -46,6 +46,7 @@ void GetNewAry8( int reg, int aryN, int aryMax ) ;
int CheckQuotCR( char *SRC, int ptr ) ;
int CB_GetQuotOpcode(char *SRC, char *buffer, int Maxlen) ;
int GetStrYFnNo( char *SRC, int reg, int aryN, int aryMax ) ; // -> StringNo
char* GetStrYFnPtr( char *SRC, int reg, int aryN, int aryMax ) ;
char* GetStrYFnPtrSub( int reg, int dimA, int dimB ) ;
int CB_IsStr( char *SRC, int execptr ) ;
@ -106,9 +107,24 @@ int CB_Bin( char *SRC ); // Bin(
int CB_StrBase( char *SRC ); // StrBase( Str1,base1,base2 )->str2
int CB_StrRepl( char *SRC ); // StrRepl( Str1,Str2,Str3,n )->str4
int StrSplit( char *buffer, char *srcstr, int ptr, int maxlen ); // ptr:1- ->MatAns
int CB_StrSplit( char *SRC ) ; // StrStip( "123,4567,89","[n,]) -> MatAns[["1232]["4567"]["89"]]
char* CB_RecallString(int type ); // ----------- Recall String type: 0:string 1:fn 2:GraphY
int CB_StoreString(int type, char *clipbuffer ); // ----------- Store String type: 0:string 1:fn 2:GraphY
char* CB_SeeString(int type, int *select, char *clipbuffer ); // ----------- See String type: 0:string 1:fn 2:GraphY
//-----------------------------------------------------------------------------
void StoreGraphY( char *fstring, int FuncNo );
void StoreGraphr( char *fstring, int FuncNo );
void StoreGraphXt( char *fstring, int FuncNo );
void StoreGraphYt( char *fstring, int FuncNo );
void StoreGraphX( char *fstring, int FuncNo );
char* ReadGraphY( int FuncNo );
char* ReadGraphr( int FuncNo );
char* ReadGraphXt( int FuncNo );
char* ReadGraphYt( int FuncNo );
char* ReadGraphX( int FuncNo );

View File

@ -188,9 +188,9 @@ char* CB_SeeString(int type, int *select, char *clipbuffer ){ // ----------- See
Fkey_Icon( FKeyNo1, 69 ); // Fkey_dispR( FKeyNo1, "STORE");
Fkey_Icon( FKeyNo2, 70 ); // Fkey_dispR( FKeyNo2, "RECALL");
if ( type==1 ) Fkey_Icon( FKeyNo3, 240 ); // Fkey_dispR( FKeyNo3, " fn ");
Fkey_Icon( FKeyNo4, 241 ); // Fkey_dispN( FKeyNo4, " SEE");
if ( ReEnterSEE == 0 ) Fkey_Icon( FKeyNo5, 389 ); // Fkey_dispR( FKeyNo5,"EDIT");
// if ( ReEnterSEE == 0 ) Fkey_Icon( FKeyNo5, 42 ); // Fkey_dispN( FKeyNo5, "Edit");
// Fkey_Icon( FKeyNo4, 241 ); // Fkey_dispN( FKeyNo4, " SEE");
// if ( ReEnterSEE == 0 ) Fkey_Icon( FKeyNo5, 389 ); // Fkey_dispR( FKeyNo5,"EDIT");
if ( ReEnterSEE == 0 ) Fkey_Icon( FKeyNo4, 42 ); // Fkey_dispN( FKeyNo4, "Edit");
// Bdisp_PutDisp_DD();
@ -238,7 +238,7 @@ char* CB_SeeString(int type, int *select, char *clipbuffer ){ // ----------- See
cont=0;
break;
case KEY_CTRL_F5:
case KEY_CTRL_F4:
case KEY_CTRL_LEFT:
case KEY_CTRL_RIGHT:
if ( ReEnterSEE == 0 ) {

View File

@ -13,11 +13,12 @@ void Text(int y, int x, unsigned char*str);
extern int skip_count;
void DrawBusy(); // BusyInd=0: running indicator off, BusyInd=1: on
int Check_skip_count( void ) ;
void Bdisp_PutDisp_DD_DrawBusy();
void Bdisp_PutDisp_DD_DrawBusy_skip();
void Bdisp_PutDisp_DD_DrawBusy_through( char *SRC ) ;
void Bdisp_PutDisp_DD_DrawBusy_skip_through( char *SRC ) ;
void CB_PutDispDD( char*SRC );
//-----------------------------------------------------------------------------
int VWtoPXY(double x, double y, int *px, int *py); // ViewWwindow(x,y) -> pixel(x,y)

View File

@ -42,6 +42,7 @@ void HiddenRAM_freeProg( void *ptr );
void HiddenRAM_freeMat( int reg );
void HiddenRAM_MatAryInit(); // HiddenRAM Initialize
void HiddenRAM_MatAryStore(); // MatAry ptr -> HiddenRAM
void HiddenRAM_MatAryClear(); // MatAry ptr clear
int HiddenRAM_MatAryRestore(); // HiddenRAM -> MatAry ptr 1:ok
void HiddenRAM_ExtFontAryInit() ;