mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-22 11:25:08 +00:00
Window's CONSOLE support has been extended so that: CSRLIN support added. POS(0) support added. LOCATE support added. (Works with optional parameters.) COLOR support added. SCREEN support added to get both character and color information of any point on the console. tab() glitch fixed. (Which could cause an endless loop when printing with comma spaced text/numbers.) _WIDTH support added. _HEIGHT support added. WIDTH support added, with 2 new parameters added so we can set the buffer width and buffer height also. CLS support semi-added. (Doesn't accept colored backgrounds; it clears the screen black. I'm getting tired of working up console stuff which I probably won't ever use myself...) SLEEP support added. END support added so we now end with any keypress and not just enter. _CONSOLEINPUT added, so we can tell the difference in mouse and keyboard input. _CINP(toggle) support added, which allows us to get single character keystrokes from the console. _CONSOLEFONT FontName, FontSize support added, which allows us to change the font and font size we use for the console. _CONSOLECURSOR _SHOW|_HIDE, cursorsize support added, which allows us to show or hide the cursor in the console, and to change its size (from 0 to 100), as desired. New keyboard commands added: _CAPSLOCK -- returns 1 if caps lock is on, 0 if it isn't. _NUMLOCK -- as above, but for num lock _SCROLLOCK -- as above, but for scroll lock _TOGGLE_CAPSLOCK -- toggles the caps lock state for us. _TOGGLE_NUMLOCK -- same, but for num lock _TOGGLE_SCROLLOCK -- same, but for scroll lock
198 lines
8 KiB
Text
198 lines
8 KiB
Text
qbs*oldstr5121=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_STRING_TITLESTR->tmp||_SUB_IDEMESSAGEBOX_STRING_TITLESTR->fixed||_SUB_IDEMESSAGEBOX_STRING_TITLESTR->readonly){
|
|
oldstr5121=_SUB_IDEMESSAGEBOX_STRING_TITLESTR;
|
|
if (oldstr5121->cmem_descriptor){
|
|
_SUB_IDEMESSAGEBOX_STRING_TITLESTR=qbs_new_cmem(oldstr5121->len,0);
|
|
}else{
|
|
_SUB_IDEMESSAGEBOX_STRING_TITLESTR=qbs_new(oldstr5121->len,0);
|
|
}
|
|
memcpy(_SUB_IDEMESSAGEBOX_STRING_TITLESTR->chr,oldstr5121->chr,oldstr5121->len);
|
|
}
|
|
qbs*oldstr5122=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_STRING_MESSAGESTR->tmp||_SUB_IDEMESSAGEBOX_STRING_MESSAGESTR->fixed||_SUB_IDEMESSAGEBOX_STRING_MESSAGESTR->readonly){
|
|
oldstr5122=_SUB_IDEMESSAGEBOX_STRING_MESSAGESTR;
|
|
if (oldstr5122->cmem_descriptor){
|
|
_SUB_IDEMESSAGEBOX_STRING_MESSAGESTR=qbs_new_cmem(oldstr5122->len,0);
|
|
}else{
|
|
_SUB_IDEMESSAGEBOX_STRING_MESSAGESTR=qbs_new(oldstr5122->len,0);
|
|
}
|
|
memcpy(_SUB_IDEMESSAGEBOX_STRING_MESSAGESTR->chr,oldstr5122->chr,oldstr5122->len);
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_FOCUS=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_FOCUS==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_FOCUS=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_FOCUS=0;
|
|
}
|
|
void *_SUB_IDEMESSAGEBOX_UDT_P=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_UDT_P==NULL){
|
|
_SUB_IDEMESSAGEBOX_UDT_P=(void*)mem_static_malloc(20);
|
|
memset(_SUB_IDEMESSAGEBOX_UDT_P,0,20);
|
|
}
|
|
ptrszint *_SUB_IDEMESSAGEBOX_ARRAY_UDT_O=NULL;
|
|
if (!_SUB_IDEMESSAGEBOX_ARRAY_UDT_O){
|
|
_SUB_IDEMESSAGEBOX_ARRAY_UDT_O=(ptrszint*)mem_static_malloc(9*ptrsz);
|
|
new_mem_lock();
|
|
mem_lock_tmp->type=4;
|
|
((ptrszint*)_SUB_IDEMESSAGEBOX_ARRAY_UDT_O)[8]=(ptrszint)mem_lock_tmp;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_UDT_O[2]=0;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_UDT_O[4]=2147483647;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_UDT_O[5]=0;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_UDT_O[6]=0;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_UDT_O[0]=(ptrszint)nothingvalue;
|
|
}
|
|
qbs *_SUB_IDEMESSAGEBOX_STRING1_SEP=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_STRING1_SEP==NULL){
|
|
_SUB_IDEMESSAGEBOX_STRING1_SEP=qbs_new_fixed((uint8*)mem_static_malloc(1),1,0);
|
|
memset(_SUB_IDEMESSAGEBOX_STRING1_SEP->chr,0,1);
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_MESSAGELINES=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_MESSAGELINES==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_MESSAGELINES=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_MESSAGELINES=0;
|
|
}
|
|
ptrszint *_SUB_IDEMESSAGEBOX_ARRAY_STRING_FULLMESSAGE=NULL;
|
|
if (!_SUB_IDEMESSAGEBOX_ARRAY_STRING_FULLMESSAGE){
|
|
_SUB_IDEMESSAGEBOX_ARRAY_STRING_FULLMESSAGE=(ptrszint*)mem_static_malloc(9*ptrsz);
|
|
new_mem_lock();
|
|
mem_lock_tmp->type=4;
|
|
((ptrszint*)_SUB_IDEMESSAGEBOX_ARRAY_STRING_FULLMESSAGE)[8]=(ptrszint)mem_lock_tmp;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_STRING_FULLMESSAGE[2]=0;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_STRING_FULLMESSAGE[4]=2147483647;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_STRING_FULLMESSAGE[5]=0;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_STRING_FULLMESSAGE[6]=0;
|
|
_SUB_IDEMESSAGEBOX_ARRAY_STRING_FULLMESSAGE[0]=(ptrszint)¬hingstring;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_PREVSCAN=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_PREVSCAN==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_PREVSCAN=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_PREVSCAN=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_NEXTSCAN=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_NEXTSCAN==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_NEXTSCAN=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_NEXTSCAN=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_TW=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_TW==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_TW=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_TW=0;
|
|
}
|
|
byte_element_struct *byte_element_5124=NULL;
|
|
if (!byte_element_5124){
|
|
if ((mem_static_pointer+=12)<mem_static_limit) byte_element_5124=(byte_element_struct*)(mem_static_pointer-12); else byte_element_5124=(byte_element_struct*)mem_static_malloc(12);
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_W=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_W==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_W=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_W=0;
|
|
}
|
|
byte_element_struct *byte_element_5125=NULL;
|
|
if (!byte_element_5125){
|
|
if ((mem_static_pointer+=12)<mem_static_limit) byte_element_5125=(byte_element_struct*)(mem_static_pointer-12); else byte_element_5125=(byte_element_struct*)mem_static_malloc(12);
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_I=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_I==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_I=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_I=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_W2=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_W2==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_W2=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_W2=0;
|
|
}
|
|
byte_element_struct *byte_element_5126=NULL;
|
|
if (!byte_element_5126){
|
|
if ((mem_static_pointer+=12)<mem_static_limit) byte_element_5126=(byte_element_struct*)(mem_static_pointer-12); else byte_element_5126=(byte_element_struct*)mem_static_malloc(12);
|
|
}
|
|
int32 pass5127;
|
|
int64 fornext_value5129;
|
|
int64 fornext_finalvalue5129;
|
|
int64 fornext_step5129;
|
|
uint8 fornext_step_negative5129;
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_F=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_F==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_F=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_F=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_CX=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_CX==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_CX=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_CX=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_CY=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_CY==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_CY=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_CY=0;
|
|
}
|
|
int64 fornext_value5132;
|
|
int64 fornext_finalvalue5132;
|
|
int64 fornext_step5132;
|
|
uint8 fornext_step_negative5132;
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_LASTFOCUS=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_LASTFOCUS==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_LASTFOCUS=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_LASTFOCUS=0;
|
|
}
|
|
int64 fornext_value5134;
|
|
int64 fornext_finalvalue5134;
|
|
int64 fornext_step5134;
|
|
uint8 fornext_step_negative5134;
|
|
byte_element_struct *byte_element_5135=NULL;
|
|
if (!byte_element_5135){
|
|
if ((mem_static_pointer+=12)<mem_static_limit) byte_element_5135=(byte_element_struct*)(mem_static_pointer-12); else byte_element_5135=(byte_element_struct*)mem_static_malloc(12);
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_CHANGE=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_CHANGE==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_CHANGE=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_CHANGE=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_MOUSEDOWN=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_MOUSEDOWN==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_MOUSEDOWN=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_MOUSEDOWN=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_MOUSEUP=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_MOUSEUP==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_MOUSEUP=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_MOUSEUP=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_ALT=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_ALT==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_ALT=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_ALT=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_OLDALT=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_OLDALT==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_OLDALT=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_OLDALT=0;
|
|
}
|
|
qbs *_SUB_IDEMESSAGEBOX_STRING_ALTLETTER=NULL;
|
|
if (!_SUB_IDEMESSAGEBOX_STRING_ALTLETTER)_SUB_IDEMESSAGEBOX_STRING_ALTLETTER=qbs_new(0,0);
|
|
byte_element_struct *byte_element_5138=NULL;
|
|
if (!byte_element_5138){
|
|
if ((mem_static_pointer+=12)<mem_static_limit) byte_element_5138=(byte_element_struct*)(mem_static_pointer-12); else byte_element_5138=(byte_element_struct*)mem_static_malloc(12);
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_K=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_K==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_K=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_K=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_INFO=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_INFO==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_INFO=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_INFO=0;
|
|
}
|
|
int64 fornext_value5140;
|
|
int64 fornext_finalvalue5140;
|
|
int64 fornext_step5140;
|
|
uint8 fornext_step_negative5140;
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_T=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_T==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_T=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_T=0;
|
|
}
|
|
int32 *_SUB_IDEMESSAGEBOX_LONG_FOCUSOFFSET=NULL;
|
|
if(_SUB_IDEMESSAGEBOX_LONG_FOCUSOFFSET==NULL){
|
|
_SUB_IDEMESSAGEBOX_LONG_FOCUSOFFSET=(int32*)mem_static_malloc(4);
|
|
*_SUB_IDEMESSAGEBOX_LONG_FOCUSOFFSET=0;
|
|
}
|