mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-04-18 05:38:36 +01:00
30fps -> 60fps
This commit is contained in:
parent
7b475b0f90
commit
00fc2b3c19
16 changed files with 18 additions and 17 deletions
src
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -5,7 +5,7 @@
|
|||
U32 text[TEXT_ROWS][TEXT_COLS];
|
||||
|
||||
U0 DrawIt(CTask *task,CDC *)
|
||||
{ //$LK,"gr.text_base",A="MN:CGrGlobals"$ gets clear 30fps, so we must use our own permanent text array.
|
||||
{ //$LK,"gr.text_base",A="MN:CGrGlobals"$ gets clear 60fps, so we must use our own permanent text array.
|
||||
MemCopy(gr.text_base+TEXT_COLS,text,(TEXT_ROWS-1)*TEXT_COLS*sizeof(U32));
|
||||
|
||||
// You can copy it this way, if you like:
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -33,7 +33,7 @@ U0 SunMoon()
|
|||
gr.dc->dither_probability_u16=2*i; //U16 can be [0,65535]
|
||||
GrFloodFill(gr.dc,x-0.75*radius,y);
|
||||
|
||||
Refresh; //Typically 30 fps
|
||||
Refresh; //Typically 60 fps
|
||||
DCFill;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,3 +83,4 @@ U0 MPAdd()
|
|||
}
|
||||
|
||||
MPAdd;
|
||||
|
Binary file not shown.
|
@ -32,7 +32,7 @@ A three bttn mouse is like a leg you cannot put weight on. ZenithOS just does h
|
|||
|
||||
* Least (greatest) common denominator hardware support. Mostly, one driver for each device class. I can't be in the business of different drivers. Compatibility is the greatest challenge for PC operating systems. Disk code does not use interrupts, avoiding compatibility risks. $FG,2$PS/2$FG$ keyboard/mouse is used instead of $FG,2$USB$FG$, also more compatible.
|
||||
|
||||
* $FG,2$640x480$FG$ 16 colors. Updates whole screen at $FG,2$30 fps$FG$, optimized for full screen games where $FG,2$InvalidRectangle$FG$s are counter-productive.
|
||||
* $FG,2$640x480$FG$ 16 colors. Updates whole screen at $FG,2$60 fps$FG$, optimized for full screen games where $FG,2$InvalidRectangle$FG$s are counter-productive.
|
||||
|
||||
* One font, 8x8. Text and graphic layers done in software with text normally on an 8x8 grid. It can run in Text mode if graphic initialization fails.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$WW,1$$LK,"gr.text_base",A="MN:CGrGlobals"$ must be updated 30fps in your Fs->draw_it() callback. You probably want $LK,"GrPrint",A="MN:GrPrint"$() or just $LK,"Print",A="MN:Print"$(). The $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.DD"$ code takes care of plotting text to $LK,"gr.text_base",A="MN:CGrGlobals"$.
|
||||
$WW,1$$LK,"gr.text_base",A="MN:CGrGlobals"$ must be updated 60fps in your Fs->draw_it() callback. You probably want $LK,"GrPrint",A="MN:GrPrint"$() or just $LK,"Print",A="MN:Print"$(). The $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.DD"$ code takes care of plotting text to $LK,"gr.text_base",A="MN:CGrGlobals"$.
|
||||
|
||||
Bits 0-7 8-Bit ASCII Screen Code
|
||||
Bits 8-11 Foreground $LK,"color",A="MN:BLACK"$
|
||||
|
|
BIN
src/Kernel.BIN.C
BIN
src/Kernel.BIN.C
Binary file not shown.
Binary file not shown.
|
@ -191,7 +191,7 @@ public I64 DocMax(I64 i=I64_MAX)
|
|||
|
||||
#help_index "DolDoc/Task;StdOut/Task"
|
||||
U0 DocUpdateTaskDocs(CTask *task)
|
||||
{//This is called from $LK,"GrUpdateTaskWin",A="MN:GrUpdateTaskWin"$() by the winmgr at 30fps.
|
||||
{//This is called from $LK,"GrUpdateTaskWin",A="MN:GrUpdateTaskWin"$() by the winmgr at 60fps.
|
||||
CDoc *doc;
|
||||
CD3I64 saved_scroll;
|
||||
if (task->border_src==BDS_CUR_DRIVE && task->cur_dv)
|
||||
|
|
|
@ -5,7 +5,7 @@ asm {
|
|||
//************************************
|
||||
_TEXT_CHAR::
|
||||
//Bool TextChar(CTask *task,Bool allow_border=FALSE,I64 x,I64 y,I64 d);
|
||||
//Must be called 30fps in Fs->draw_it() callback.
|
||||
//Must be called 60fps in Fs->draw_it() callback.
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
MOV RCX,U64 SF_ARG1[RBP]
|
||||
|
@ -83,7 +83,7 @@ _TEXT_CHAR::
|
|||
//************************************
|
||||
_TEXT_LEN_STR::
|
||||
//Bool TextLenStr(CTask *task,I64 x,I64 y,I64 len,I64 attr,U8 *s)
|
||||
//Must be called 30fps in Fs->draw_it() callback.
|
||||
//Must be called 60fps in Fs->draw_it() callback.
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
PUSH RSI
|
||||
|
@ -159,7 +159,7 @@ _TEXT_LEN_STR::
|
|||
//************************************
|
||||
_TEXT_LEN_ATTR_STR::
|
||||
//Bool TextLenAttrStr(CTask *task,I64 x,I64 y,I64 len,U32 *_attr)
|
||||
//Must be called 30fps in Fs->draw_it() callback.
|
||||
//Must be called 60fps in Fs->draw_it() callback.
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
PUSH RSI
|
||||
|
@ -234,7 +234,7 @@ _TEXT_LEN_ATTR_STR::
|
|||
RET1 40
|
||||
//************************************
|
||||
_TEXT_LEN_ATTR:://Bool TextLenAttr(CTask *task,I64 x,I64 y,I64 len,I64 attr)
|
||||
//Must be called 30fps in Fs->draw_it() callback.
|
||||
//Must be called 60fps in Fs->draw_it() callback.
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
PUSH RSI
|
||||
|
@ -310,16 +310,16 @@ _TEXT_LEN_ATTR:://Bool TextLenAttr(CTask *task,I64 x,I64 y,I64 len,I64 attr)
|
|||
RET1 40
|
||||
}
|
||||
public _extern _TEXT_CHAR Bool TextChar(CTask *task,Bool allow_border=FALSE,
|
||||
I64 x,I64 y,I64 d); //Plot char. 30fps in Fs->draw_it() callback.
|
||||
I64 x,I64 y,I64 d); //Plot char. 60fps in Fs->draw_it() callback.
|
||||
public _extern _TEXT_LEN_STR Bool TextLenStr(CTask *task,I64 x,I64 y,I64 len,
|
||||
I64 attr,U8 *s); //Plot str with len. 30fps in Fs->draw_it() callback.
|
||||
I64 attr,U8 *s); //Plot str with len. 60fps in Fs->draw_it() callback.
|
||||
public _extern _TEXT_LEN_ATTR_STR Bool TextLenAttrStr(CTask *task,I64 x,I64 y,
|
||||
I64 len,U32 *_attr); //Plot attr str with len. 30fps in Fs->draw_it() callback.
|
||||
I64 len,U32 *_attr); //Plot attr str with len. 60fps in Fs->draw_it() callback.
|
||||
public _extern _TEXT_LEN_ATTR Bool TextLenAttr(CTask *task,I64 x,I64 y,I64 len,
|
||||
I64 attr); //Plot attrs with len. 30fps in Fs->draw_it() callback.
|
||||
I64 attr); //Plot attrs with len. 60fps in Fs->draw_it() callback.
|
||||
|
||||
public U0 TextPrint(CTask *task,I64 x,I64 y,I64 attr,U8 *format,...)
|
||||
{//Plot chars. 30fps in Fs->draw_it() callback.
|
||||
{//Plot chars. 60fps in Fs->draw_it() callback.
|
||||
//You probably want $LK,"GrPrint",A="MN:GrPrint"$() or just $LK,"Print",A="MN:Print"$().
|
||||
U8 *buf=StrPrintJoin(NULL,format,argc,argv);
|
||||
TextLenStr(task,x,y,StrLen(buf),attr<<8,buf);
|
||||
|
@ -328,7 +328,7 @@ public U0 TextPrint(CTask *task,I64 x,I64 y,I64 attr,U8 *format,...)
|
|||
|
||||
public U0 TextBorder(CTask *task=NULL,
|
||||
I64 l,I64 r,I64 t,I64 b,I64 attr,Bool solid)
|
||||
{//Plot border square. 30fps in Fs->draw_it() callback.
|
||||
{//Plot border square. 60fps in Fs->draw_it() callback.
|
||||
//Draws window borders or DolDoc text bttn borders.
|
||||
//Set task=sys_winmgr_task for no clipping.
|
||||
I64 i;
|
||||
|
@ -349,7 +349,7 @@ public U0 TextBorder(CTask *task=NULL,
|
|||
}
|
||||
|
||||
public U0 TextRect(I64 l,I64 r,I64 t,I64 b,I64 d)
|
||||
{//Fill text rect. 30fps in Fs->draw_it() callback.
|
||||
{//Fill text rect. 60fps in Fs->draw_it() callback.
|
||||
I64 y,w;
|
||||
if (l>r || t>b) return;
|
||||
if (t<0) t=0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#help_index "Windows;Task/Delay"
|
||||
|
||||
public U0 Refresh(I64 count=1,Bool force=FALSE)
|
||||
{//Wait for 30fps WinMgr to start & finish screen refresh.
|
||||
{//Wait for 60fps WinMgr to start & finish screen refresh.
|
||||
//0,FALSE Count Sync to WinMgr.
|
||||
//0,TRUE Pump Messages.
|
||||
//1 Count Wait and Pump Messages.
|
||||
|
|
Loading…
Reference in a new issue