Nightly update (ISO SHA-1 f3615ad)
This commit is contained in:
1 parent
b97fa7c00e
commit
aa53888517
20 files changed
+366
-235
No files matched your search
@@ -18,8 +18,8 @@ U0 LoadDocDefines()
|
||||
//$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/Adam/Opt/Boot/BootDVD.HC,DD_BOOT_HIGH_LOC_DVD"$
|
||||
|
||||
$TR-C,"LineRep"$
|
||||
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","120,563");
|
||||
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","82,013");
|
||||
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","120,690");
|
||||
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","82,062");
|
||||
$ID,-4$
|
||||
DefinePrint("DD_MP_VECT","%08X",MP_VECT_ADDR);
|
||||
DefinePrint("DD_MP_VECT_END","%08X",
|
||||
|
||||
@@ -157,7 +157,7 @@ U8 *idx=NULL,CDoc *doc=NULL)
|
||||
CHashGeneric *ptr;
|
||||
CWho *lst;
|
||||
I64 cnt,i,j,k,f=0;
|
||||
U8 buf[512],*st,*last_idx=StrNew(""),*cur_idx,*comment;
|
||||
U8 buf[512],*last_idx=StrNew(""),*cur_idx,*comment;
|
||||
Bool recurse,publics,map;
|
||||
CTask *task;
|
||||
|
||||
@@ -267,13 +267,11 @@ U8 *idx=NULL,CDoc *doc=NULL)
|
||||
|
||||
if (!idx) {
|
||||
if (ptr->type & HTT_DEFINE_STR) {
|
||||
st=MStrUtil(ptr(CHashDefineStr *)->data,SUF_SAFE_DOLLAR);
|
||||
j=ptr(CHashDefineStr *)->cnt;
|
||||
if (j==-1)
|
||||
StrPrint(buf,"%-10tQ ",st);
|
||||
StrPrint(buf,"%-10t$$Q ",ptr(CHashDefineStr *)->data);
|
||||
else
|
||||
StrPrint(buf,"%-10tQ %02X",st,j);
|
||||
Free(st);
|
||||
StrPrint(buf,"%-10t$$Q %02X",ptr(CHashDefineStr *)->data,j);
|
||||
} else if (ptr->type & HTT_GLBL_VAR)
|
||||
StrPrint(buf,"%010X ",ptr(CHashGlblVar *)->data_addr);
|
||||
else
|
||||
|
||||
@@ -51,6 +51,12 @@ public U8 *DocScanLine(CDoc *doc,CDocEntry *doc_e,
|
||||
i+=StrLen(src);
|
||||
} else if (doc_e2->type_u8==DOCT_TAB)
|
||||
i++;
|
||||
else if (doc_e2->type_u8==DOCT_SHIFTED_X ||
|
||||
doc_e2->type_u8==DOCT_SHIFTED_Y) {
|
||||
if (doc_e2->attr<0)
|
||||
i++;
|
||||
i+=6; //$$SY,3$$
|
||||
}
|
||||
doc_e2=doc_e2->next;
|
||||
}
|
||||
res=MAlloc(i+1);
|
||||
@@ -63,6 +69,19 @@ public U8 *DocScanLine(CDoc *doc,CDocEntry *doc_e,
|
||||
*dst++=*src++;
|
||||
} else if (doc_e->type_u8==DOCT_TAB)
|
||||
*dst++='\t';
|
||||
else if (doc_e->type_u8==DOCT_SHIFTED_Y) {
|
||||
*dst(U32 *)++='$$SY,';
|
||||
if (doc_e->attr<0)
|
||||
*dst++='-';
|
||||
*dst++='0'+AbsI64(doc_e->attr); //Supposedly -7 to 7 (single digit)
|
||||
*dst++='$$';
|
||||
} else if (doc_e->type_u8==DOCT_SHIFTED_X) {
|
||||
*dst(U32 *)++='$$SX,';
|
||||
if (doc_e->attr<0)
|
||||
*dst++='-';
|
||||
*dst++='0'+AbsI64(doc_e->attr); //Supposedly -7 to 7 (single digit)
|
||||
*dst++='$$';
|
||||
}
|
||||
if (doc_e==doc->cur_entry && cur_col)
|
||||
*cur_col=start-res+doc->cur_col;
|
||||
doc_e=doc_e->next;
|
||||
|
||||
@@ -858,19 +858,36 @@ public I64 GrPutChar(CDC *dc=gr.dc,I64 x,I64 y,U8 ch)
|
||||
|
||||
I64 GrPutS(CDC *dc=gr.dc,I64 x,I64 y,U8 *_s)
|
||||
{//Use $LK,"GrPrint",A="MN:GrPrint"$()
|
||||
I64 x0,ch,res;
|
||||
I64 x0,sx=0,sy=0,res;
|
||||
if (!_s) return 0;
|
||||
x0=x;
|
||||
res=0;
|
||||
while (ch=*_s++) {
|
||||
if (ch=='\n') {
|
||||
while (*_s) {
|
||||
if (*_s=='\n') {
|
||||
x=x0;
|
||||
y+=FONT_HEIGHT;
|
||||
} else if (ch=='\t')
|
||||
_s++;
|
||||
} else if (*_s=='\t') {
|
||||
x=x0+CeilU64(x-x0+FONT_WIDTH,8*FONT_WIDTH);
|
||||
else {
|
||||
res+=GrPutChar(dc,x,y,ch);
|
||||
_s++;
|
||||
} else if (*_s(U32 *)=='$$SY,') {
|
||||
if (_s[4]=='-') {
|
||||
_s++;
|
||||
sy='0'-_s[4];
|
||||
} else
|
||||
sy=_s[4]-'0';
|
||||
_s+=6;
|
||||
} else if (*_s(U32 *)=='$$SX,') {
|
||||
if (_s[4]=='-') {
|
||||
_s++;
|
||||
sx='0'-_s[4];
|
||||
} else
|
||||
sx=_s[4]-'0';
|
||||
_s+=6;
|
||||
} else {
|
||||
res+=GrPutChar(dc,x+sx,y+sy,*_s);
|
||||
x+=FONT_WIDTH;
|
||||
_s++;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
@@ -878,20 +895,36 @@ I64 GrPutS(CDC *dc=gr.dc,I64 x,I64 y,U8 *_s)
|
||||
|
||||
I64 GrVPutS(CDC *dc=gr.dc,I64 x,I64 y,U8 *_s)
|
||||
{//Vertical Text. Use $LK,"GrVPrint",A="MN:GrVPrint"$()
|
||||
I64 y0,res;
|
||||
I64 y0,sx=0,sy=0,res;
|
||||
U8 buf[2];
|
||||
if (!_s) return 0;
|
||||
y0=y;
|
||||
res=0;
|
||||
|
||||
buf[1]=0;
|
||||
while (*buf=*_s++) {
|
||||
if (*buf=='\n') {
|
||||
while (*_s) {
|
||||
if (*_s=='\n') {
|
||||
y=y0;
|
||||
x+=FONT_WIDTH;
|
||||
} else if (*buf=='\t')
|
||||
_s++;
|
||||
} else if (*_s=='\t') {
|
||||
y=y0+CeilU64(y-y0+FONT_HEIGHT,8*FONT_HEIGHT);
|
||||
else {
|
||||
_s++;
|
||||
} else if (*_s(U32 *)=='$$SY,') {
|
||||
if (_s[4]=='-') {
|
||||
_s++;
|
||||
sx='0'-_s[4];
|
||||
} else
|
||||
sx=_s[4]-'0';
|
||||
_s+=6;
|
||||
} else if (*_s(U32 *)=='$$SX,') {
|
||||
if (_s[4]=='-') {
|
||||
_s++;
|
||||
sy='0'-_s[4];
|
||||
} else
|
||||
sy=_s[4]-'0';
|
||||
_s+=6;
|
||||
} else {
|
||||
*buf=*_s++;
|
||||
res+=GrPutS(dc,x,y,buf);
|
||||
y+=FONT_HEIGHT;
|
||||
}
|
||||
|
||||
@@ -3,3 +3,6 @@ extern U8 *GrBitMap4ToBitMap8(U8 *dst,U8 *src,I64 src_size,I64 bkcolor);
|
||||
extern I64 GrBlot3(CDC *dc,I64 x1,I64 y1,I64 z1,CDC *img);
|
||||
extern I64 *Mat4x4New(I64 *src,CTask *mem_task=NULL);
|
||||
extern U8 *SpriteQue2Sprite(CSprite *head,I64 *_size=NULL);
|
||||
extern CSprite *SpriteSetSettings(CDC *dc=NULL,CSprite *head,I64 elem_num,
|
||||
I64 x=0,I64 y=0,CColorROPU32 *_color=NULL,I64 *_width=NULL,
|
||||
I64 *_xx=NULL,I64 *_yy=NULL);
|
||||
@@ -23,6 +23,7 @@ Cd(__DIR__);;
|
||||
#include "SpriteMesh"
|
||||
#include "SpriteBitMap"
|
||||
#include "SpriteCode"
|
||||
#include "SpriteSideBar"
|
||||
#include "SpriteEd"
|
||||
#include "SpriteMain"
|
||||
|
||||
|
||||
@@ -575,105 +575,6 @@ I64 SpriteQueSelAll(CSprite *head,Bool val=TRUE)
|
||||
return res;
|
||||
}
|
||||
|
||||
CSprite *SpriteSideBar2SpriteQue(CDoc *doc,CSprite *head,I64 *_cur_elem_num)
|
||||
{//For the side-bar
|
||||
CSprite *res=CAlloc(sizeof(CSprite)),*tmpg;
|
||||
CDocEntry *doc_e=doc->head.next;
|
||||
Bool found=FALSE;
|
||||
I64 num=0;
|
||||
QueInit(res);
|
||||
while (doc_e!=doc) {
|
||||
if (doc_e->type_u8==DOCT_MENU_VAL && doc_e->left_exp>=0) {
|
||||
tmpg=SpriteSetSettings(,head,doc_e->left_exp);
|
||||
if (tmpg!=head) {
|
||||
tmpg=MAllocIdent(tmpg);
|
||||
BEqu(&tmpg->type,SPf_SEL,Bt(&doc_e->type,DOCEt_SEL));
|
||||
if (*_cur_elem_num==doc_e->left_exp) {
|
||||
*_cur_elem_num=num;
|
||||
found=TRUE;
|
||||
}
|
||||
QueIns(tmpg,res->last);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
doc_e=doc_e->next;
|
||||
}
|
||||
if (!found)
|
||||
*_cur_elem_num=num;
|
||||
QueDel(head);
|
||||
Free(head);
|
||||
return res;
|
||||
}
|
||||
|
||||
U0 SpriteSideBarPickNew(CDoc *doc,CSprite *head,I64 old_num)
|
||||
{
|
||||
CSprite *tmpg;
|
||||
CDocEntry *doc_cur_e=NULL,*doc_e;
|
||||
I64 cur_elem_num=0;
|
||||
U8 *st;
|
||||
DocPrint(doc,"$$PURPLE$$$$TX+CX,\"Sprite SideBar\"$$\n"
|
||||
"$$LK+PU+CX,\"Click for Help\","
|
||||
"A=\"FI:::/Doc/SpriteSideBar.DD.Z\"$$\n\n");
|
||||
tmpg=head->next;
|
||||
while (tmpg!=head) {
|
||||
st=SpriteElem2Summary(tmpg);
|
||||
if (cur_elem_num==old_num) {
|
||||
DocPrint(doc,"$$LTRED$$");
|
||||
doc_e=doc_cur_e=DocPrint(doc,"$$MU-UL,\"%Q\",LE=%d$$\n",st,cur_elem_num++);
|
||||
} else {
|
||||
DocPrint(doc,"$$LTBLUE$$");
|
||||
doc_e=DocPrint(doc,"$$MU-UL,\"%$$Q\",LE=%d$$\n",st,cur_elem_num++);
|
||||
}
|
||||
BEqu(&doc_e->de_flags,DOCEf_SEL,Bt(&tmpg->type,&SPf_SEL));
|
||||
BEqu(&doc_e->type,DOCEt_SEL,Bt(&tmpg->type,SPf_SEL));
|
||||
Free(st);
|
||||
tmpg=tmpg->next;
|
||||
}
|
||||
if (cur_elem_num==old_num) {
|
||||
DocPrint(doc,"$$LTRED$$");
|
||||
doc_cur_e=DocPrint(doc,"$$MU-UL,\"END\",LE=%d$$\n",cur_elem_num);
|
||||
} else {
|
||||
DocPrint(doc,"$$LTBLUE$$");
|
||||
DocPrint(doc,"$$MU-UL,\"END\",LE=%d$$\n",cur_elem_num);
|
||||
}
|
||||
if (doc_cur_e)
|
||||
doc->cur_entry=doc_cur_e;
|
||||
}
|
||||
|
||||
U0 SpriteSideBarTask2(CTask *grand_parent)
|
||||
{
|
||||
I64 w,h;
|
||||
CTask *parent=Fs->parent_task,*pu_task;
|
||||
while (TRUE) {
|
||||
pu_task=grand_parent->popup_task;
|
||||
if (TaskValidate(pu_task)) {
|
||||
w=parent->win_right-parent->win_left;
|
||||
WinHorz(pu_task->win_right+2,pu_task->win_right+2+w,parent);
|
||||
h=parent->win_bottom-parent->win_top;
|
||||
WinVert(pu_task->win_top,pu_task->win_top+h,parent);
|
||||
}
|
||||
Refresh;
|
||||
}
|
||||
}
|
||||
|
||||
U0 SpriteSideBarTask(CTask *parent,CSprite **_head,I64 *_cur_elem_num)
|
||||
{
|
||||
CDocEntry *doc_e;
|
||||
CDoc *doc=DocPut;
|
||||
Spawn(&SpriteSideBarTask2,parent,"CSpriteTask",,Fs);
|
||||
doc->flags|=DOCF_SIZE_MIN|DOCF_FORM;
|
||||
while (TRUE) {
|
||||
SpriteSideBarPickNew(doc,*_head,*_cur_elem_num);
|
||||
DocHighlightCursor(,doc);
|
||||
View;
|
||||
doc_e=doc->cur_entry;
|
||||
if (doc_e->type_u8==DOCT_MENU_VAL)
|
||||
*_cur_elem_num=doc_e->left_exp;
|
||||
*_head=SpriteSideBar2SpriteQue(doc,*_head,_cur_elem_num);
|
||||
DocClear(doc);
|
||||
}
|
||||
}
|
||||
|
||||
Bool SpriteEdText(CSprite **_head,I64 *_cur_elem_num)
|
||||
{
|
||||
Bool res;
|
||||
|
||||
@@ -159,7 +159,7 @@ public U8 *SpriteElem2Summary(CSprite *tmpg)
|
||||
case SPT_TEXT:
|
||||
case SPT_TEXT_BOX:
|
||||
case SPT_TEXT_DIAMOND:
|
||||
CatPrint(buf," %d,%d:%-16tQ",tmpg->ps.x1,tmpg->ps.y1,tmpg->ps.st);
|
||||
CatPrint(buf," %d,%d:%-16t$$Q",tmpg->ps.x1,tmpg->ps.y1,tmpg->ps.st);
|
||||
break;
|
||||
case SPT_POLYLINE:
|
||||
case SPT_POLYPT:
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
#help_index "Graphics/Sprite;Sprites"
|
||||
|
||||
CSprite *SpriteSideBar2SpriteQue(CDoc *doc,CSprite *head,I64 *_cur_elem_num)
|
||||
{//For the side-bar
|
||||
CSprite *res=CAlloc(sizeof(CSprite)),*tmpg;
|
||||
CDocEntry *doc_e=doc->head.next;
|
||||
Bool found=FALSE;
|
||||
I64 num=0;
|
||||
QueInit(res);
|
||||
while (doc_e!=doc) {
|
||||
if (doc_e->type_u8==DOCT_MENU_VAL && doc_e->left_exp>=0) {
|
||||
tmpg=SpriteSetSettings(,head,doc_e->left_exp);
|
||||
if (tmpg!=head) {
|
||||
tmpg=MAllocIdent(tmpg);
|
||||
BEqu(&tmpg->type,SPf_SEL,Bt(&doc_e->type,DOCEt_SEL));
|
||||
if (*_cur_elem_num==doc_e->left_exp) {
|
||||
*_cur_elem_num=num;
|
||||
found=TRUE;
|
||||
}
|
||||
QueIns(tmpg,res->last);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
doc_e=doc_e->next;
|
||||
}
|
||||
if (!found)
|
||||
*_cur_elem_num=num;
|
||||
QueDel(head);
|
||||
Free(head);
|
||||
return res;
|
||||
}
|
||||
|
||||
U0 SpriteSideBarPickNew(CDoc *doc,CSprite *head,I64 old_num)
|
||||
{
|
||||
CSprite *tmpg;
|
||||
CDocEntry *doc_cur_e=NULL,*doc_e;
|
||||
I64 cur_elem_num=0;
|
||||
U8 *st;
|
||||
DocPrint(doc,"$$PURPLE$$$$TX+CX,\"Sprite SideBar\"$$\n"
|
||||
"$$LK+PU+CX,\"Click for Help\","
|
||||
"A=\"FI:::/Doc/SpriteSideBar.DD.Z\"$$\n\n");
|
||||
tmpg=head->next;
|
||||
while (tmpg!=head) {
|
||||
st=SpriteElem2Summary(tmpg);
|
||||
if (cur_elem_num==old_num)
|
||||
doc_cur_e=doc_e=
|
||||
DocPrint(doc,"$$LTRED$$$$MU-UL,\"%$$Q\",LE=%d$$\n",st,cur_elem_num++);
|
||||
else
|
||||
doc_e=DocPrint(doc,"$$LTBLUE$$$$MU-UL,\"%$$Q\",LE=%d$$\n",st,cur_elem_num++);
|
||||
BEqu(&doc_e->de_flags,DOCEf_SEL,Bt(&tmpg->type,&SPf_SEL));
|
||||
BEqu(&doc_e->type,DOCEt_SEL,Bt(&tmpg->type,SPf_SEL));
|
||||
Free(st);
|
||||
tmpg=tmpg->next;
|
||||
}
|
||||
if (cur_elem_num==old_num)
|
||||
doc_cur_e=DocPrint(doc,"$$LTRED$$$$MU-UL,\"END\",LE=%d$$\n",cur_elem_num);
|
||||
else
|
||||
DocPrint(doc,"$$LTBLUE$$$$MU-UL,\"END\",LE=%d$$\n",cur_elem_num);
|
||||
if (doc_cur_e)
|
||||
doc->cur_entry=doc_cur_e;
|
||||
}
|
||||
|
||||
U0 SpriteSideBarTask2(CTask *grand_parent)
|
||||
{
|
||||
I64 w,h;
|
||||
CTask *parent=Fs->parent_task,*pu_task;
|
||||
while (TRUE) {
|
||||
pu_task=grand_parent->popup_task;
|
||||
if (TaskValidate(pu_task)) {
|
||||
w=parent->win_right-parent->win_left;
|
||||
WinHorz(pu_task->win_right+2,pu_task->win_right+2+w,parent);
|
||||
h=parent->win_bottom-parent->win_top;
|
||||
WinVert(pu_task->win_top,pu_task->win_top+h,parent);
|
||||
}
|
||||
Refresh;
|
||||
}
|
||||
}
|
||||
|
||||
U0 SpriteSideBarTask(CTask *parent,CSprite **_head,I64 *_cur_elem_num)
|
||||
{
|
||||
CDocEntry *doc_e;
|
||||
CDoc *doc=DocPut;
|
||||
Spawn(&SpriteSideBarTask2,parent,"CSpriteTask",,Fs);
|
||||
doc->flags|=DOCF_SIZE_MIN|DOCF_FORM;
|
||||
while (TRUE) {
|
||||
SpriteSideBarPickNew(doc,*_head,*_cur_elem_num);
|
||||
DocHighlightCursor(,doc);
|
||||
View;
|
||||
doc_e=doc->cur_entry;
|
||||
if (doc_e->type_u8==DOCT_MENU_VAL)
|
||||
*_cur_elem_num=doc_e->left_exp;
|
||||
*_head=SpriteSideBar2SpriteQue(doc,*_head,_cur_elem_num);
|
||||
DocClear(doc);
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,6 @@ I64 DrvsSize()
|
||||
Bool MemRepTask(CTask *task,Bool override_validate=FALSE)
|
||||
{
|
||||
I64 i,j,k,m,n;
|
||||
U8 *st;
|
||||
CDoc *pdoc,*ddoc,*bdoc;
|
||||
CCmpCtrl *cc;
|
||||
CMathODE *o;
|
||||
@@ -100,10 +99,8 @@ Bool MemRepTask(CTask *task,Bool override_validate=FALSE)
|
||||
return FALSE;
|
||||
if (task==Fs)
|
||||
task->rsp=GetRSP;
|
||||
st=MStrUtil(task->task_title,SUF_REM_CTRL_CHARS|SUF_SAFE_DOLLAR);
|
||||
"$$BLACK$$%-27ts#%08X$$FG$$\n$$ID,2$$",st,task;
|
||||
Free(st);
|
||||
"Heap\t:%010X/%010X\n",TaskMemUsed(task,override_validate),
|
||||
"$$BLACK$$%-27t$$Q#%08X$$FG$$\n",task->task_title,task;
|
||||
"$$ID,2$$Heap\t:%010X/%010X\n",TaskMemUsed(task,override_validate),
|
||||
TaskMemAlloced(task,override_validate);
|
||||
|
||||
i=UnusedStk(task);
|
||||
|
||||
Reference in new issue
Block a user