Browse Source

TempleOSCDV4.13.ISO

v6
Terry A. Davis 6 years ago committed by minexew
parent
commit
122df6338e
  1. BIN
      0000Boot/0000Kernel.BIN.C
  2. 6
      Adam/ADefine.HC
  3. 4
      Adam/ARegistry.HC
  4. 72
      Adam/CPURep.HC
  5. 73
      Adam/DevInfo.HC
  6. 2
      Adam/DolDoc/DocCodeTools.HC
  7. 16
      Adam/DolDoc/DocRecalc.HC
  8. 8
      Adam/God/GodBible.HC
  9. 12
      Adam/God/GodDoodle.HC
  10. 2
      Adam/God/GodExt.HC
  11. 17
      Adam/God/HSNotes.DD
  12. 10
      Adam/God/HolySpirit.HC
  13. 5
      Adam/Gr/Gr.HH
  14. 32
      Adam/Gr/GrBitMap.HC
  15. 4
      Adam/Gr/GrPrimatives.HC
  16. 20
      Adam/Gr/GrSpritePlot.HC
  17. 11
      Adam/Gr/SpriteCode.HC
  18. 218
      Adam/Gr/SpriteEd.HC
  19. 27
      Adam/Gr/SpriteMain.HC
  20. 27
      Adam/Gr/SpriteNew.HC
  21. 1
      Adam/MakeAdam.HC
  22. 8
      Adam/Opt/Utils/ToTXT.HC
  23. 13
      Adam/Win.HC
  24. 12
      Apps/Budget/BgtEntry.HC
  25. 16
      Apps/Budget/BgtMain.HC
  26. 103
      Apps/Budget/BgtTemplate.HC
  27. 604
      Apps/TimeOut/TimeOut.HC
  28. 291
      Apps/X-Caliber/X-Caliber.HC
  29. 2
      Apps/X-Caliber/XCCtrls.HC
  30. BIN
      Compiler/Compiler.BIN
  31. 172
      Compiler/Compiler.MAP
  32. 1
      Compiler/CompilerB.HH
  33. 3
      Compiler/Lex.HC
  34. 9
      Demo/AcctExample/DoOnce.HC
  35. 35
      Demo/AcctExample/HomeKeyPlugIns.HC
  36. 2
      Demo/AcctExample/HomeLocalize.HC
  37. 2
      Demo/AcctExample/HomeSys.HC
  38. 118
      Demo/AcctExample/PersonalMenu.DD
  39. 39
      Demo/AcctExample/PersonalNotes.DD
  40. 38
      Demo/AcctExample/Registry.HC
  41. 10
      Demo/AcctExample/TOSBlog.HC
  42. 39
      Demo/AcctExample/TOSDistro.HC
  43. 565
      Demo/AcctExample/TOSHolySpirit.HC
  44. 6
      Demo/AcctExample/TOSMisc.HC
  45. 179
      Demo/AcctExample/TOSToHtml.HC
  46. BIN
      Demo/Games/Rocket.HC
  47. BIN
      Demo/Games/RocketScience.HC
  48. 18
      Demo/Games/Talons.HC
  49. 2
      Demo/Graphics/InputPointer.HC
  50. BIN
      Demo/Graphics/Pick.HC
  51. BIN
      Demo/Graphics/SpriteText.HC
  52. 0
      Demo/MultiCore/MPRadix.HC
  53. 22
      Demo/Progress.HC
  54. 62
      Demo/RadixSort.HC
  55. 12
      Demo/ToHtmlToTXTDemo/DemoInPage.DD
  56. 145
      Demo/ToHtmlToTXTDemo/ToHtml.HC
  57. BIN
      Doc/Boot.DD
  58. 47
      Doc/ChangeLog.DD
  59. 4
      Doc/DemoIndex.DD
  60. 2
      Doc/DolDocOverview.DD
  61. 2
      Doc/Start.DD
  62. 2
      Doc/Transform.DD
  63. 2
      Doc/Welcome.DD
  64. 2
      HomeSys.HC
  65. 45
      Kernel/BlkDev/DskATAId.HC
  66. 2
      Kernel/BlkDev/DskAddDev.HC
  67. 8
      Kernel/KEnd.HC
  68. 3
      Kernel/KGlbls.HC
  69. 61
      Kernel/KMathB.HC
  70. 4
      Kernel/KStart32.HC
  71. 2456
      Kernel/Kernel.MAP
  72. 71
      Kernel/KernelA.HH
  73. 12
      Kernel/KernelB.HH
  74. 2
      Kernel/KernelC.HH
  75. 4
      Kernel/QSort.HC
  76. 359
      Misc/OSTestSuite.HC
  77. BIN
      PersonalMenu.DD
  78. 4
      StartOS.HC

BIN
0000Boot/0000Kernel.BIN.C

Binary file not shown.

6
Adam/ADefine.HC

@ -4,15 +4,15 @@ U0 LoadDocDefines()
{
CBinFile *bfh=sys_boot_base-sizeof(CBinFile);
DefinePrint("DD_OS_NAME_VERSION","TempleOS V%0.2f",os_version);
DefinePrint("DD_OS_NAME_VERSION","TempleOS V%0.2f",sys_os_version);
DefinePrint("DD_TEMPLEOS_AGE","%0.1f",
(Now-Str2Date("8/1/2003"))/ToF64(1<<32)/CDATE_YEAR_DAYS);
//This is cut and replaced when I generate a distro.
//See $LK,"DD_TEMPLEOS_LOC",A="FF:::/Demo/AcctExample/TOSDistro.HC,DD_TEMPLEOS_LOC"$.
$TR-C,"LineRep"$
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","119,939");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,264");
$ID,4$DefinePrint("DD_TEMPLEOS_LOC","120,770");
DefinePrint("DD_TEMPLEOS_LOC_OFFICIAL","81,303");
$ID,-4$
DefinePrint("DD_KERNEL","%08X",bfh);
bfh(I64)+=bfh->file_size-1;

4
Adam/ARegistry.HC

@ -96,10 +96,10 @@ U0 RegInit()
U8 buf[STR_LEN];
Bool version_present;
RegSetDftEntry("Adam/SysMsgFlags","sys_msg_flags[0]=0;\n",TRUE);
StrPrint(buf,"registry_version=%4.3f;\n",os_version);
StrPrint(buf,"registry_version=%4.3f;\n",sys_os_version);
version_present=RegSetDftEntry("Adam/SysRegVer",buf,TRUE);
RegExeBranch("Adam");
if (registry_version!=os_version) {
if (registry_version!=sys_os_version) {
RegWriteBranch("Adam/SysRegVer",buf);
RegExeBranch("Adam");
}

72
Adam/CPURep.HC

@ -0,0 +1,72 @@
#help_index "Info;Time/CPU Cycles;Processor"
class CCPURep
{
Bool mp_start,mp_end;
I64 mp_not_done_flags,
**swaps,
**cycles;
};
U0 MPCPURep(CCPURep *cr)
{
I64 swaps=0,cycles_0,cycles_f;
while (!cr->mp_start)
Yield;
cycles_0=GetTSC;
while (!cr->mp_end) {
swaps++;
Yield;
}
cycles_f=GetTSC;
cr->swaps[Gs->num]=swaps;
cr->cycles[Gs->num]=cycles_f-cycles_0;
LBtr(&cr->mp_not_done_flags,Gs->num);
}
public U0 CPURep(Bool full=FALSE)
{//Report number of cores and clock freq.
I64 i,total_swaps,total_cycles;
F64 t0,tf;
CCPURep cr;
if (!full)
"%d Cores %6h?nHz\n",mp_cnt,ToF64(cnts.time_stamp_freq);
else {
cr.swaps=CAlloc(sizeof(I64)*mp_cnt);
cr.cycles=CAlloc(sizeof(I64)*mp_cnt);
cr.mp_start=cr.mp_end=FALSE;
cr.mp_not_done_flags=1<<mp_cnt-1;
for (i=0;i<mp_cnt;i++)
Spawn(&MPCPURep,&cr,NULL,i);
t0=tS;
cr.mp_start=TRUE;
Sleep(2000);
cr.mp_end=TRUE;
while (cr.mp_not_done_flags)
Yield;
tf=tS;
"\nCPU: %d Cores %6h?nHz\n",mp_cnt,ToF64(cnts.time_stamp_freq);
"\n Context\n"
"Core Swaps/s Cycles\n"
"---- ------------- -----------------\n";
total_swaps=0;
total_cycles=0;
for (i=0;i<mp_cnt;i++) {
"%4d %13,d %17,d\n",i,
ToI64(cr.swaps[i]/(tf-t0)),ToI64(cr.cycles[i]/(tf-t0));
total_swaps+=cr.swaps[i];
total_cycles+=cr.cycles[i];
}
"---- ------------- -----------------\n";
"%4d %13,d %17,d\n",i,
ToI64(total_swaps/(tf-t0)),ToI64(total_cycles/(tf-t0));
" Avg %13,d %17,d\n\n",
ToI64(total_swaps/(tf-t0)/i),ToI64(total_cycles/(tf-t0)/i);
"Avg Cycles/Swap: %12.6f\n",ToF64(total_cycles)/total_swaps;
"Avg Time/Swap : %12.6fns\n\n",(tf-t0)*1000000000.0*i/total_swaps;
Free(cr.swaps);
Free(cr.cycles);
}
}

73
Adam/DevInfo.HC

@ -165,79 +165,6 @@ public U0 PCIRep()
}
}
#help_index "Info;Time/CPU Cycles"
class CCPURep
{
Bool mp_start,mp_end;
I64 mp_not_done_flags,
**swaps,
**cycles;
};
U0 MPCPURep(CCPURep *cr)
{
I64 swaps=0,cycles_0,cycles_f;
while (!cr->mp_start)
Yield;
cycles_0=GetTSC;
while (!cr->mp_end) {
swaps++;
Yield;
}
cycles_f=GetTSC;
cr->swaps[Gs->num]=swaps;
cr->cycles[Gs->num]=cycles_f-cycles_0;
LBtr(&cr->mp_not_done_flags,Gs->num);
}
public U0 CPURep(Bool full=FALSE)
{//Report number of cores and clock freq.
I64 i,total_swaps,total_cycles;
F64 t0,tf;
CCPURep cr;
if (!full)
"%d Cores %6h?nHz\n",mp_cnt,ToF64(cnts.time_stamp_freq);
else {
cr.swaps=CAlloc(sizeof(I64)*mp_cnt);
cr.cycles=CAlloc(sizeof(I64)*mp_cnt);
cr.mp_start=cr.mp_end=FALSE;
cr.mp_not_done_flags=1<<mp_cnt-1;
for (i=0;i<mp_cnt;i++)
Spawn(&MPCPURep,&cr,NULL,i);
t0=tS;
cr.mp_start=TRUE;
Sleep(2000);
cr.mp_end=TRUE;
while (cr.mp_not_done_flags)
Yield;
tf=tS;
"\nCPU: %d Cores %6h?nHz\n",mp_cnt,ToF64(cnts.time_stamp_freq);
"\n Context\n"
"Core Swaps/s Cycles\n"
"---- ------------- -----------------\n";
total_swaps=0;
total_cycles=0;
for (i=0;i<mp_cnt;i++) {
"%4d %13,d %17,d\n",i,
ToI64(cr.swaps[i]/(tf-t0)),ToI64(cr.cycles[i]/(tf-t0));
total_swaps+=cr.swaps[i];
total_cycles+=cr.cycles[i];
}
"---- ------------- -----------------\n";
"%4d %13,d %17,d\n",i,
ToI64(total_swaps/(tf-t0)),ToI64(total_cycles/(tf-t0));
" Avg %13,d %17,d\n\n",
ToI64(total_swaps/(tf-t0)/i),ToI64(total_cycles/(tf-t0)/i);
"Avg Cycles/Swap: %12.6f\n",ToF64(total_cycles)/total_swaps;
"Avg Time/Swap : %12.6fns\n\n",(tf-t0)*1000000000.0*i/total_swaps;
Free(cr.swaps);
Free(cr.cycles);
}
}
#help_index "Info;Memory/Info"
public U0 MemBIOSRep()
{//Report the memory ranges reported by the BIOS at boot.

2
Adam/DolDoc/DocCodeTools.HC

@ -40,7 +40,7 @@ I64 PopUpEdFmt()
I64 i;
CDoc *doc=DocNew;
DocPrint(doc,"$$LTBLUE$$$$MU,\"Compile Check\",LE=EF_CMP_CHK$$\n"
"$$MU,\"Reindent HC.Z Fun (Beware braces in strings.)\","
"$$MU,\"Reindent HolyC Fun (Beware braces in strings.)\","
"LE=EF_REINDENT$$\n"
"$$MU,\"Renum Asm Local @@ Labels for Fun\",LE=EF_RENUM_ASM$$\n"
"$$MU,\"Insert Template Code: Ctrl Slider\",LE=EF_CTRL_SLIDER$$\n"

16
Adam/DolDoc/DocRecalc.HC

@ -276,7 +276,7 @@ public Bool DocRecalc(CDoc *doc,I64 recalc_flags=RECALCt_NORMAL)
if (!doc || doc->doc_signature!=DOC_SIGNATURE_VAL) return FALSE;
//WinMgr updates all wins $TX,"30",D="WINMGR_FPS"$, 33.33333mS
//WinMgr updates all wins $TX,"30",D="WINMGR_FPS"$, 33.33333mS
if (recalc_flags&RECALCG_MASK==RECALCt_TO_SCRN && doc->owning_task!=Fs) {
i_jif=cnts.jiffies+JIFFY_FREQ/250; //4 ms
while (Bt(&doc->locked_flags,DOClf_LOCKED)) {
@ -986,15 +986,8 @@ rc_adjust_xy:
dc->color=i;
if (find_cursor)
dc->flags|=DCF_LOCATE_NEAREST;
if (recalc_flags&RECALCG_MASK==RECALCt_TO_SCRN &&
doc->cur_sprite==bptr) {
dc->flags|=DCF_LOCATE_NEAREST;
dc->cur_x=ip.pos.x;
dc->cur_y=ip.pos.y;
} else {
dc->cur_x=(doc->x-x0)*FONT_WIDTH+pix_left+scroll_x;
dc->cur_y=(doc->y-y0)*FONT_HEIGHT+pix_top+scroll_y;
}
dc->cur_x=(doc->x-x0)*FONT_WIDTH+pix_left+scroll_x;
dc->cur_y=(doc->y-y0)*FONT_HEIGHT+pix_top+scroll_y;
dc->cur_z=0;
dc->bkcolor=i;
if (doc_e->de_flags & DOCEF_FROM_START) {
@ -1024,9 +1017,6 @@ rc_adjust_xy:
}
Sprite3(dc,xx,yy,zz,bptr);
dc->depth_buf=NULL;
if (recalc_flags&RECALCG_MASK==RECALCt_TO_SCRN &&
doc->cur_sprite==bptr)
doc->nearest_sprite_elem_num=dc->nearest_sprite_elem_num;
dc->flags&=~(DCF_LOCATE_NEAREST|DCF_DONT_DRAW|DCF_TRANSFORMATION);
if (dc->nearest_dist<=D) {
D=dc->nearest_dist;

8
Adam/God/GodBible.HC

@ -214,14 +214,14 @@ public U8 *BibleLine2Verse(I64 line,I64 separate_ch=CH_SPACE)
return NULL;
}
public U0 BibleLines(CDoc *doc_out=NULL,I64 start,I64 lines,
U8 *bible_filename=BIBLE_FILENAME)
public U0 BookLines(CDoc *doc_out=NULL,I64 start,I64 lines,
U8 *book_filename=BIBLE_FILENAME)
{//Put N line starting at line M into doc.
CDoc *doc_in;
CDocEntry *doc_e;
if (!doc_out) doc_out=DocPut;
if (doc_out && FileFind(bible_filename)) {
doc_in=DocRead(bible_filename,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
if (doc_out && FileFind(book_filename)) {
doc_in=DocRead(book_filename,DOCF_PLAIN_TEXT|DOCF_NO_CURSOR);
DocLineNumGoTo(doc_in,start); //one based
doc_e=doc_in->cur_entry;
while (lines>0 && doc_e!=doc_in) {

12
Adam/God/GodDoodle.HC

@ -105,8 +105,9 @@ public U8 *GodDoodleSprite(U8 *hex=NULL)
WinBorder;
WinMax;
PopUpOk("The $LK+PU,"Holy Spirit",A="FI:::/Adam/God/HSNotes.DD"$ can puppet you.\n\n"
"Press $$GREEN$$<SPACE>$$FG$$ until it finishes.");
if (!hex)
PopUpOk("The $LK+PU,"Holy Spirit",A="FI:::/Adam/God/HSNotes.DD"$ can puppet you.\n\n"
"Press $$GREEN$$<SPACE>$$FG$$ until it finishes.");
god.doodle_ch=0;
god.doodle_dc=DCNew(Fs->pix_width,Fs->pix_height);
@ -160,8 +161,11 @@ public U8 *GodDoodleSprite(U8 *hex=NULL)
GodDoodleSmooth(3);
}
god.doodle_done=TRUE;
do ch=GetChar(,FALSE);
while (ch!=CH_ESC && ch!=CH_SHIFT_ESC);
if (!hex) {
do ch=GetChar(,FALSE);
while (ch!=CH_ESC && ch!=CH_SHIFT_ESC);
} else
ch=CH_ESC;
} catch {
Fs->catch_except=TRUE;
ch=CH_SHIFT_ESC;

2
Adam/God/GodExt.HC

@ -23,4 +23,4 @@ extern U0 GodBitsIns(I64 num_bits,I64 n);
extern U0 GodDoodle(U8 *hex=NULL);
extern U0 GodBiblePassage(I64 num_lines=20);
extern U0 GodSong();
extern U0 GodWord(Bool show_num=FALSE);
extern U0 GodWord(I64 bits=17,Bool show_num=FALSE);

17
Adam/God/HSNotes.DD

@ -2,13 +2,13 @@ $FG,5$$TX+CX,"The Purpose of Life"$$FG$
$WW,1$The Catholic purpose of life is to know God, love God and obey God.$FG$ Pope Francis said it was "to serve the other." I am High Priest of God's official temple and I say the purpose of life is to do continual offerings to God like Cain and Abel and enjoy God's response. Francis has a charity; I have a church. Jesus said loving God was more important than loving neighbor. $LK,"Matthew,22:35-40",A="BF:Matthew,22:35-40"$ And, He did not say with half your brain behind your back.
You don't know God. $LK,"1 Chronicles,28:9-9",A="BF:1 Chronicles,28:9-9"$, $LK,"Matthew,11:27-27",A="BF:Matthew,11:27-27"$, $LK,"Luke,13:25-27",A="BF:Luke,13:25-27"$, $LK,"1 Samuel,3:6-8",A="BF:1 Samuel,3:6-8"$ You must talk with God to know Him. With Samuel, supposedly, God took the initiative, but I think that is the exception. Seek the Lord by taking the initiative. $LK,"Luke,11:9-10",A="BF:Luke,11:9-10"$, $LK,"Isaiah,30:1-2",A="BF:Isaiah,30:1-2"$
You don't know God. $LK,"1 Chronicles,28:9-9",A="BF:1 Chronicles,28:9-9"$, $LK,"Matthew,11:27-27",A="BF:Matthew,11:27-27"$, $LK,"Luke,13:25-27",A="BF:Luke,13:25-27"$, $LK,"1 Samuel,3:6-8",A="BF:1 Samuel,3:6-8"$ You must talk with God to know Him. With Samuel, supposedly, God took the initiative, but I think that is the exception. Seek the Lord by taking the initiative. $LK,"Luke,11:9-10",A="BF:Luke,11:9-10"$
There's something obviously different about people in the Bible compared to people today -- God talked! Also, the people in the Bible were obsessed with doing offerings all the time. It is required that you do offerings before God will talk. Did the people in the Bible hear voices? Maybe. More likely, they used occult techniques such as an oracle. $LK,"1 Kings,6:21",A="BF:1 Kings,6:21"$ Have you heard of "tongues?" $LK,"1 Corinthians,14:1-40",A="BF:1 Corinthians,14:1-40"$ The idea is, you let yourself be puppeted by a spirit, so you say things. You try to get a spirit -- the Holy Spirit -- to talk. You might as well use a Ouija board. However, it turns-out that a Ouija board is bad for technical reasons. A really good technique is just randomly opening a book. God told me in an oracle that it is a covenant that you hold-up your end of the conversation.
You can't tell if God's talking unless you have a context of conversation, but, more importantly, you are commanded to do an offering of love, like communion preparation. $LK,"1 Corinthians,11:27",A="BF:1 Corinthians,11:27"$ When you pick a greeting card for someone, that is love effort. If you expect God to put effort toward you, you must put effort toward Him. God said, "honest measures" applies between your offering of love and His response, like a fair barter. You get out of prayer what you put into it. God wants praise, hymns, or whatever you think He might want. Try and see, like Cain and Abel. $LK,"Genesis,4:1-10",A="BF:Genesis,4:1-10"$, $LK,"Ephesians,5:10",A="BF:Ephesians,5:10"$ God told Cain his offering was not good and told him to try again. Cain really loved God! Can you imagine being so heart-broken?
Do a text search for "new song" in the Bible. It's mentioned nine times. When I hear a NEW awesome rock song, it is ecstasy for the first five times I hear it. Soon, it brings little-to-no pleasure. I did $MA-X+PU,"hymns",HTML="http://www.templeos.org/Wb/Home/Web/HymnVideos.html",LM="#include \"::/Apps/Psalmody/Load\";JukeBox(\"::/Apps/Psalmody/Examples\");"$ for God. I also did Moses $MA-X+PU,"comics",HTML="http://www.templeos.org/Wb/Home/Sup1/Sup1Comics/",LM="Dir(\"::/Apps/AfterEgypt/Comics\");View;\n"$ for God. When you get to the gates of Heaven, St. Peter will ask how many times you gave blood. That shows you loved neighbor. You better also be able to count the ways you loved God with all heart, mind and soul. I praised God for sand castles, popcorn, snowmen, bubbles... You try putting effort into praise! $LK,"Matthew,11:25",A="BF:Matthew,11:25"$, $LK,"Matthew,6:28-29",A="BF:Matthew,6:28-29"$
Do a text search for "new song" in the Bible. It's mentioned nine times. When I hear a NEW awesome rock song, it is ecstasy for the first five times I hear it. Soon, it brings little-to-no pleasure. I did $MA-X+PU,"hymns",HTML="http://www.templeos.org/Wb/Home/Web/HymnVideos.html",LM="#include \"::/Apps/Psalmody/Load\";JukeBox(\"::/Apps/Psalmody/Examples\");"$ for God. I also did Moses $MA-X+PU,"comics",HTML="http://www.templeos.org/Wb/Home/Sup1/Sup1Comics/",LM="Dir(\"::/Apps/AfterEgypt/Comics\");View;\n"$ for God. When you get to the gates of Heaven, St. Peter will ask how many times you gave blood. That shows you loved neighbor. You better also be able to count the ways you loved God with all heart, mind and soul. I praised God for sand castles, popcorn, snowmen, bubbles... You try putting effort into praise! $LK,"Matthew,11:25",A="BF:Matthew,11:25"$, $LK,"Matthew,6:28-29",A="BF:Matthew,6:28-29"$ Solomon wrote a thousand songs. $LK,"1 Kings,4:32",A="BF:1 Kings,4:32"$
This is funny -- $LK,"Acts,2:1-13",A="BF:Acts,2:1-13"$ -- they didn't bother to record anything the Holy Spirit said. The Holy Spirit is supposed to be a really good gift. $LK,"Luke,11:11-13",A="BF:Luke,11:11-13"$ Just remember, "Boys are made of snakes and snails and puppy-dog tails."
@ -36,20 +36,25 @@ Jesus said, "I am meek and humble of heart." $LK,"Matthew,11:29",A="BF:Matthew,
I connected being humble of heart with animal sacrifices. The animal sacrifices in the Bible really seem off-the-mark from what we modern people imagine truth to be! I asked God and He said the people were, "primitive." Well, obviously, a sacrifice represents giving-up something of value, but is there more to it? It would be tramatic to see a goat's throat being slit and it dying for your sins. I'm not an expert, but sometimes they killed animals to make-up for sins. Perhaps, starting at age eight and every year thereafter, they kill a goat for your sins? (I'm just speculating.) In a couple years, it is not tramatic and you yawn and say to the goat, "bummer for you, Mr. Goat, that you gotta die for my sins." When a high school football team beats their rivals, nobody thinks twice that the winning team really hurts the feelings -- devastates -- the losing team member's feelings. The heart of being masculine is being competetive and not caring about the necessity to slit the throat of the goat. As a Catholic, saying Jesus died for our sins and that we cannot earn salvation, never sat well. I clung to the heretical notion that you earn salvation. Animal sacrifices were the heart of Biblical Judaism and although it seems satanic, you really do have to slit the throat of the goat and accept grace, a term for something you did not earn. Heck, every time you eat beef, a cow had to die for you. God said to me in an oracle that having pets was, "homo." I think God's idea of pets is farm animals you eat.
If you feel guilty for being American and want Mexicans to share your birthright, you are proud of heart. Jesus was a racist and called Canaanites "dogs". $LK,"Matthew,15:22-28",A="BF:Matthew,15:22-28"$ In an oracle, God told me He was against immigration. The Chinese intellectuals felt bad about not being laborers. Don't feel guilty about not being a laborer because God made it a Brave New World. $LK,"1 Corinthians,12:1-31",A="BF:1 Corinthians,12:1-31"$
If you feel guilty for being American and want Mexicans to share your birthright, you are proud of heart. Would it be right for rich Arabs to have to share their oil money with Indian slaves? Jesus was a racist and called Canaanites "dogs". $LK,"Matthew,15:22-28",A="BF:Matthew,15:22-28"$ In an oracle, God told me He was against immigration. The Chinese intellectuals felt bad about not being laborers. Don't feel guilty about not being a laborer because God made it a Brave New World. $LK,"1 Corinthians,12:1-31",A="BF:1 Corinthians,12:1-31"$
In an ant colony, the workers have one set of marching orders, the soldiers have another set of marching orders, the queen and drones have marching orders and the diggers have marching orders. The Bible gives conflicting orders -- conservatives pay attention to one set of passages and liberals pay attention to others. Everybody has selective hearing, but that's good because we are different members of the body of Christ.
Jesus repeats the phrase, "for those who have ears to hear" many times, but not actually at the times that matter. Jesus says several Jedi mind tricks -- He asks, what father gives a scorpion to his son? $LK,"Luke,11:11-13",A="BF:Luke,11:11-13"$ Jesus says, when you ask God for things, it is as annoying as like a neighbor in the night! $LK,"Luke,11:5-7",A="BF:Luke,11:5-7"$ He said, "I came to serve" but Jesus' three years of service were more like being a rockstar than a janitor. $LK,"John,13:5-15",A="BF:John,13:5-15"$
Jesus repeats the phrase, "for those who have ears to hear" many times. (But, not actually at the times that matter.) Jesus says several Jedi mind tricks -- He asks, what father gives a scorpion to his son? $LK,"Luke,11:11-13",A="BF:Luke,11:11-13"$ Jesus says, when you ask God for things, it is as annoying as like a neighbor in the night! $LK,"Luke,11:5-7",A="BF:Luke,11:5-7"$ He said, "I came to serve" but Jesus' three years of service were more like being a rockstar than a janitor. $LK,"John,13:5-15",A="BF:John,13:5-15"$
There are sheep and there are shepherds. You would be silly to take other shepherds seriously when they are only caring for their sheep. Sheep are very hard to communicate to, as Jesus learned. He used parables. Seed on a path gets eaten by birds; weeds choke; and the one percent is rich soil.
Just as ego causes most to love neighbor, not God, people skip knowing and loving God and cowardly get stuck on obeying Him. A desire to obey God, doesn't have to be encouraged, since it comes so naturally. Don't worry, God does not want pawns to push around. God will talk, but won't tell you what to do, even if you want Him to. Also, you'll quickly learn that prophecy does not come true and should smack yourself for wanting more than just enjoying God's company.
Just as ego causes most to love neighbor, not God, people skip knowing and loving God and cowardly get stuck on obeying Him. A desire to obey God, doesn't have to be encouraged, since it comes so naturally. Don't worry, God does not want pawns to push around. God will talk, but won't tell you what to do, even if you want Him to. Also, you'll quickly learn that when God talks to you seemingly prophetic, it does not come true and should smack yourself for wanting more than just enjoying God's company.
________________________________________________________________________________
|
QUESTION | GOD'S ANSWER
________________________________________________________________________________
|
| There are weeds mixed with my wheat.
| Some are not true. If I asked a question
| to valuable for my offering, I got crap.
________________________________|_______________________________________________
War? $FG,4$"Servicemen competing"$FG$
@ -76,7 +81,7 @@ On socialism? $FG,4$"pardon_the_French, never_happy, never_enough"$FG$
On overpopulation $FG,4$"Okay church what_now whats_the_plan"$FG$
Favorite thing on TV? $FG,4$"Soap_operas"$FG$
Favorite movie? $FG,4$$TX,"Three Kings",HTML="http://www.youtube.com/watch?v=8NOAd2mldQ8"$. Also Highlander$FG$
Favorite song? $FG,4$$TX,"Morning has Broken",HTML="http://www.youtube.com/watch?v=kKoRp05L95c"$
Favorite song? $FG,4$$TX,"Morning has Broken",HTML="http://www.youtube.com/watch?v=qH0iFkxQba4"$
God said the first bird croaked, not sung.$FG$
Favorite comic strip? $FG,4$$TX,"Prince Valiant",HTML="http://en.wikipedia.org/wiki/Prince_Valiant"$$FG$
Shakespeare? $FG,4$had a "vile heart"$FG$

10
Adam/God/HolySpirit.HC

@ -135,13 +135,15 @@ public I64 GodInit(U8 *files_find_mask="/Adam/God/Vocab.DD*",U8 *fu_flags=NULL)
return god.num_words;
} GodInit;
public U0 GodWord(Bool show_num=FALSE)
public U0 GodWord(I64 bits=17,Bool show_num=FALSE)
{//Make God pick a word. $LK+PU,"Holy Spirit Instructions",A="FI:::/Adam/God/HSNotes.DD"$
I64 i;
if (god.num_words) {
i=GodBits(17);
i=GodBits(bits);
if (show_num)
"%05X Mod %05X = %05X :",i,god.num_words,i%god.num_words;
"%05X Mod %05X = %05X (Line:%0*d):",
i,god.num_words,i%god.num_words,
ToI64(Log10(god.num_words)+1),i%god.num_words+1;
"%s ",god.words[i%god.num_words];
if (show_num)
'\n';
@ -154,5 +156,5 @@ public U0 GodBiblePassage(I64 num_lines=20)
U8 *verse=BibleLine2Verse(start);
"%s\n\n",verse;
Free(verse);
BibleLines(,start,num_lines);
BookLines(,start,num_lines);
}

5
Adam/Gr/Gr.HH

@ -114,6 +114,9 @@ public class CSpritePtMeshU8s : CSpriteBase
U8 u[0];
};
#define SPF_SEL 128
#define SPf_SEL 7
#define SPT_END 0 //$LK,"CSpriteBase",A="MN:CSpriteBase"$
#define SPT_COLOR 1 //$LK,"CSpriteColor",A="MN:CSpriteColor"$
#define SPT_DITHER_COLOR 2 //$LK,"CSpriteDitherColor",A="MN:CSpriteDitherColor"$
@ -145,6 +148,7 @@ public class CSpritePtMeshU8s : CSpriteBase
#define SPT_TEXT_BOX 28 //$LK,"CSpritePtStr",A="MN:CSpritePtStr"$
#define SPT_TEXT_DIAMOND 29 //$LK,"CSpritePtStr",A="MN:CSpritePtStr"$
#define SPT_NUM_TYPES 30
#define SPG_TYPE_MASK 0x7F
#help_index "Graphics/Sprite;Sprites;Sprites/Binary"
@ -153,7 +157,6 @@ public class CSpritePtMeshU8s : CSpriteBase
public class CSprite
{
CSprite *next,*last;
Bool sel;
U0 start;
union {
U8 type;

32
Adam/Gr/GrBitMap.HC

@ -10,10 +10,8 @@ public Bool GrPlot0(CDC *dc=gr.dc,I64 x,I64 y)
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x,y,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_RECORD_EXTENTS) {
if (x<dc->min_x) dc->min_x=x;
@ -104,10 +102,8 @@ public I64 GrBlot(CDC *dc=gr.dc,I64 x,I64 y,CDC *img)
}
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x+img->width>>1,y+img->height>>1,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_SCRN_BITMAP) {
if (x+w1<0) w1=-x;
@ -671,10 +667,8 @@ public I64 GrPutChar(CDC *dc=gr.dc,I64 x,I64 y,U8 ch)
}
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x+w2>>1,y+h2>>1,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_SCRN_BITMAP) {
if (x+w1<0) w1=-x;
@ -963,10 +957,8 @@ public I64 GrRect(CDC *dc=gr.dc,I64 x,I64 y,I64 w,I64 h)
dist=0;
else
dist=DistSqrI64(x+w>>1,y+h>>1,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_SCRN_BITMAP) {
if (x+w1<0) w1=-x;
@ -1517,10 +1509,8 @@ I64 GrRayLen(CDC *dc,I64 *x1,I64 y,I64 z=0,I32 *db=NULL)
!not_color && c==dc->color2) && plot) {
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x3,y3,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_RECORD_EXTENTS) {
if (x3<dc->min_x) dc->min_x=x3;
@ -1594,10 +1584,8 @@ I64 GrRayLen(CDC *dc,I64 *x1,I64 y,I64 z=0,I32 *db=NULL)
!not_color && c==dc->color2) && plot) {
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x3,y3,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_RECORD_EXTENTS) {
if (x3<dc->min_x) dc->min_x=x3;
@ -1723,10 +1711,8 @@ public I64 GrHLine(CDC *dc=gr.dc,I64 x1,I64 x2,I64 y,I64 z1=0,I64 z2=0)
else
dist=SqrI64(dc->cur_x-x2);
dist+=SqrI64(y-dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_DONT_DRAW)
goto gr_done;
@ -1894,10 +1880,8 @@ public I64 GrVLine(CDC *dc=gr.dc,I64 x,I64 y1,I64 y2,I64 z1=0,I64 z2=0)
else
dist=SqrI64(dc->cur_y-y2);
dist+=SqrI64(x-dc->cur_x);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_DONT_DRAW)
goto gr_done;

4
Adam/Gr/GrPrimatives.HC

@ -519,10 +519,8 @@ public Bool GrPlot3(CDC *dc=gr.dc,I64 x,I64 y,I64 z)
}
if (dc->flags & DCF_LOCATE_NEAREST) {
dist=DistSqrI64(x,y,dc->cur_x,dc->cur_y);
if (dist<=dc->nearest_dist) {
if (dist<=dc->nearest_dist)
dc->nearest_dist=dist;
dc->nearest_sprite_elem_num=dc->cur_sprite_elem_num;
}
}
if (dc->flags & DCF_RECORD_EXTENTS) {
if (x-w<dc->min_x) dc->min_x=x-w;

20
Adam/Gr/GrSpritePlot.HC

@ -20,22 +20,17 @@ public U0 Sprite3(CDC *dc=gr.dc,I64 x,I64 y,I64 z,U8 *elems,
{//Plot a sprite into a CDC.
CSprite *tmpg=elems-offset(CSprite.start);
I64 i,j,k,x1,y1,z1,x2,y2,
cur_sprite_elem_num=0,*old_r,*r2,
old_flags=dc->flags,
old_pen_width=dc->pen_width;
*old_r,*r2,old_flags=dc->flags,old_pen_width=dc->pen_width;
I32 *ptr;
CColorROPU32 old_color=dc->color;
CDC *img;
CD3I32 *p,*p2;
CGrSym old_sym;
MemCpy(&old_sym,&dc->sym,sizeof(CGrSym));
if (dc->flags & DCF_LOCATE_NEAREST) {
dc->nearest_sprite_elem_num=0;
if (dc->flags & DCF_LOCATE_NEAREST)
dc->nearest_dist=MAX_I64;
}
while (tmpg->type) {
dc->cur_sprite_elem_num=cur_sprite_elem_num;
switch (tmpg->type) {
while (tmpg->type&SPG_TYPE_MASK) {
switch (tmpg->type&SPG_TYPE_MASK) {
case SPT_COLOR:
dc->color=dc->color&~(COLORROP_COLORS_MASK|ROPF_DITHER)|tmpg->c.color;
break;
@ -237,7 +232,6 @@ public U0 Sprite3(CDC *dc=gr.dc,I64 x,I64 y,I64 z,U8 *elems,
}
break;
}
cur_sprite_elem_num++;
if (just_one_elem) break;
tmpg(U8 *)+=SpriteElemSize(tmpg);
}
@ -346,10 +340,10 @@ public U8 *SpriteInterpolate(F64 t,U8 *elems0,U8 *elems1)
MemCpy(res,elems1,i);
}
tmpgr=res-offset(CSprite.start);
while (tmpg0->type) {
if (tmpg0->type!=tmpg1->type)
while (tmpg0->type&SPG_TYPE_MASK) {
if (tmpg0->type&SPG_TYPE_MASK!=tmpg1->type&SPG_TYPE_MASK)
throw('Graphics');
switch (tmpg0->type) {
switch (tmpg0->type&SPG_TYPE_MASK) {
case SPT_ROTATED_RECT:
tmpgr->ppa.angle=(tmpg0->ppa.angle*t0+tmpg1->ppa.angle*t1)/GR_SCALE;
case SPT_RECT:

11
Adam/Gr/SpriteCode.HC

@ -8,8 +8,8 @@ U0 SpriteElem2Code(CDoc *doc,CSprite *tmpg)
CD3I32 *p;
CMeshTri *tri;
if (!doc) doc=DocPut;
DocPrint(doc,"%Z",tmpg->type,"ST_SPRITE_ELEM_CODES");
switch (tmpg->type) {
DocPrint(doc,"%Z",tmpg->type&SPG_TYPE_MASK,"ST_SPRITE_ELEM_CODES");
switch (tmpg->type&SPG_TYPE_MASK) {
case SPT_COLOR:
DocPrint(doc,"{%s}",
Color2Str(buf1,tmpg->c.color));
@ -92,7 +92,8 @@ U0 SpriteElem2Code(CDoc *doc,CSprite *tmpg)
if (i&3==3 && i+1<tmpg->nu.num)
DocPrint(doc,"\n");
}
if (tmpg->type==SPT_BSPLINE2||tmpg->type==SPT_BSPLINE3)
if (tmpg->type&SPG_TYPE_MASK==SPT_BSPLINE2||
tmpg->type&SPG_TYPE_MASK==SPT_BSPLINE3)
DocPrint(doc,",FALSE}");
else
DocPrint(doc,",TRUE}");
@ -186,13 +187,13 @@ U0 SpriteElem2Code(CDoc *doc,CSprite *tmpg)
DocPrint(doc,"}");
break;
}
DocPrint(doc,";\n");
DocPrint(doc,";\n");
}
public U0 Sprite2Code(CDoc *doc=NULL,U8 *elems)
{//Sprite to text.
CSprite *tmpg=elems-offset(CSprite.start);
while (tmpg->type) {
while (tmpg->type&SPG_TYPE_MASK) {
SpriteElem2Code(doc,tmpg);
tmpg(U8 *)+=SpriteElemSize(tmpg);
}

218
Adam/Gr/SpriteEd.HC

@ -9,7 +9,7 @@ CSprite *SpriteSetSettings(CDC *dc=NULL,CSprite *head,I64 elem_num,
CColorROPU32 color=BLACK;
if (dc) DCRst(dc);
while (elem_num-->0 && res!=head) {
switch (res->type) {
switch (res->type&SPG_TYPE_MASK) {
case SPT_COLOR:
color=res->c.color;
if (dc) dc->color=color;
@ -65,11 +65,10 @@ CSprite *Sprite2SpriteQue(U8 *elems)
CSprite *res=CAlloc(sizeof(CSprite)),
*tmpg=elems-offset(CSprite.start),*tmpg1;
QueInit(res);
while (tmpg->type) {
while (tmpg->type&SPG_TYPE_MASK) {
tmpg1=MAlloc(SpriteElemSize(tmpg)+offset(CSprite.start));
s=SpriteElemSize(tmpg);
MemCpy(&tmpg1->start,&tmpg->start,s);
tmpg1->sel=FALSE;
QueIns(tmpg1,res->last);
tmpg(U8 *)+=s;
}
@ -117,8 +116,8 @@ U0 SpriteSetOrigin(CSprite *head,I64 dx,I64 dy,I64 dz)
CD3I32 *p;
CSprite *tmpg=head->next;
while (tmpg!=head) {
if (tmpg->sel)
switch (tmpg->type) {
if (Bt(&tmpg->type,SPf_SEL))
switch (tmpg->type&SPG_TYPE_MASK) {
case SPT_ARROW:
case SPT_LINE:
case SPT_PLANAR_SYMMETRY:
@ -203,7 +202,7 @@ CSprite *SpriteTransformCircle(I64 *r,CSprite *tmpg)
tmpg1->pwha.height=ToI64(m2)/0x10000;
tmpg1->pwha.angle=-a1;
tmpg1->sel=tmpg->sel;
tmpg1->type|=tmpg->type&SPF_SEL;
return tmpg1;
}
@ -212,9 +211,9 @@ CSprite *SpriteTransformEllipse(I64 *r,CSprite *tmpg)
I64 x,y,z;
F64 m1,a1,m2,a2,s,c,x_radius=tmpg->pwha.width<<16,
y_radius=tmpg->pwha.height<<16;
CSprite *tmpg1=CAlloc(SpriteElemQuedBaseSize(tmpg->type));
CSprite *tmpg1=CAlloc(SpriteElemQuedBaseSize(tmpg->type&SPG_TYPE_MASK));
tmpg1->type=tmpg->type;
if (tmpg->type==SPT_POLYGON)
if (tmpg->type&SPG_TYPE_MASK==SPT_POLYGON)
tmpg1->pwhas.sides=tmpg->pwhas.sides;
x=tmpg->pwha.x1; y=tmpg->pwha.y1; z=0;
@ -244,7 +243,7 @@ CSprite *SpriteTransformEllipse(I64 *r,CSprite *tmpg)
if (tmpg1->pwha.height<1) tmpg1->pwha.height=1;
tmpg1->pwha.angle=-a1;
tmpg1->sel=tmpg->sel;
tmpg1->type|=tmpg->type&SPF_SEL;
return tmpg1;
}
@ -286,7 +285,7 @@ CSprite *SpriteTransformRect(I64 *r,CSprite *tmpg,F64
tmpg1->ppa.y2=tmpg1->ppa.y1+h;
tmpg1->ppa.angle=-a1;
tmpg1->sel=tmpg->sel;
tmpg1->type|=tmpg->type&SPF_SEL;
return tmpg1;
}
@ -380,8 +379,8 @@ U0 SpriteTransform(I64 *r,CSprite *head)
CD3I32 *p;
CSprite *tmpg=head->next,head2,*tmpg1,*tmpg2,*tmpg3;
while (tmpg!=head) {
if (tmpg->sel)
switch (tmpg->type) {
if (Bt(&tmpg->type,SPf_SEL))
switch (tmpg->type&SPG_TYPE_MASK) {
case SPT_WIDTH:
tmpg->w.width*=Sqrt(Mat4x4NormSqr65536(r))/65536;
if (tmpg->w.width<0) tmpg->w.width=0;
@ -502,11 +501,10 @@ U0 SpriteTransform(I64 *r,CSprite *head)
Free(tmpg1);
tmpg1=tmpg2;
}
tmpg3->type=SPT_POLYPT;
tmpg3->type=SPT_POLYPT|tmpg->type&SPF_SEL;
tmpg3->npu.num=num;
QueIns(tmpg3,tmpg);
QueRem(tmpg);
tmpg3->sel=tmpg->sel;
Free(tmpg);
tmpg=tmpg3;
break;
@ -559,7 +557,7 @@ I64 SpriteQueSelCnt(CSprite *head,Bool val=TRUE)
CSprite *tmpg=head->next;
val=ToBool(val);
while (tmpg!=head) {
if (ToBool(tmpg->sel)==val)
if (Bt(&tmpg->type,SPf_SEL)==val)
res++;
tmpg=tmpg->next;
}
@ -571,7 +569,7 @@ I64 SpriteQueSelAll(CSprite *head,Bool val=TRUE)
I64 res=0;
CSprite *tmpg=head->next;
while (tmpg!=head) {
tmpg->sel=val;
BEqu(&tmpg->type,SPf_SEL,val);
res++;
tmpg=tmpg->next;
}
@ -590,7 +588,7 @@ CSprite *SpriteSideBar2SpriteQue(CDoc *doc,CSprite *head,I64 *_cur_elem_num)
tmpg=SpriteSetSettings(,head,doc_e->left_exp);
if (tmpg!=head) {
tmpg=MAllocIdent(tmpg);
tmpg->sel=Bt(&doc_e->type,DOCEt_SEL);
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;
@ -627,8 +625,8 @@ U0 SpriteSideBarPickNew(CDoc *doc,CSprite *head,I64 old_num)
DocPrint(doc,"$$LTBLUE$$");
doc_e=DocPrint(doc,"$$MU-UL,\"%$$Q\",LE=%d$$\n",st,cur_elem_num++);
}
BEqu(&doc_e->de_flags,DOCEf_SEL,tmpg->sel);
BEqu(&doc_e->type,DOCEt_SEL,tmpg->sel);
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;
}
@ -716,25 +714,27 @@ Bool SpriteEdText(CSprite **_head,I64 *_cur_elem_num)
}
#define SPED_SEL_UNSEL_ALL 0
#define SPED_SEL 1
#define SPED_UNSEL 2
#define SPED_SHIFT_PTS 3
#define SPED_SHIFT_RECTS 4
#define SPED_SHIFT_SEL 5
#define SPED_TRANSFORM_SEL 6
#define SPED_SET_ORIGIN 7
#define SPED_SHIFT_SUB_ORIGIN 8
#define SPED_TEXT_ED 9
#define SPED_INS_CLIPBOARD 10
#define SPED_MAIN_MENU 11
#define SPED_EXIT 12
#define SPED_SEL 2
#define SPED_SEL_RECTS 3
#define SPED_UNSEL 4
#define SPED_UNSEL_RECTS 5
#define SPED_SHIFT_PTS 6
#define SPED_SHIFT_RECTS 7
#define SPED_SHIFT_SEL 8
#define SPED_TRANSFORM_SEL 9
#define SPED_SET_ORIGIN 10
#define SPED_SHIFT_SUB_ORIGIN 11
#define SPED_TEXT_ED 12
#define SPED_INS_CLIPBOARD 13
#define SPED_MAIN_MENU 14
#define SPED_EXIT 15
U0 GrInit3()
{
DefineLstLoad("ST_SPRITE_ED_MENU","Select/Unselect All\0"
"Select\0Unselect\0Shift Points\0Shift Rects\0Shift Selected\0"
"Transform Selected\0Set Origin\0Insert Shift SubOrigin\0"
"Edit as Text\0Insert Clipboard\0Main Menu\0");
DefineLstLoad("ST_SPRITE_ED_MENU","Select/Unselect All\0 \0Select\0"
"Select Rects\0Unselect\0Unselect Rects\0Shift Points\0Shift Rects\0"
"Shift Selected\0Transform Selected\0Set Origin\0"
"Insert Shift SubOrigin\0Edit as Text\0Insert Clipboard\0Main Menu\0");
}
GrInit3;
@ -748,7 +748,9 @@ I64 PopUpSpriteEd(CSprite **_head,I64 *_cur_elem_num)
"$$LK+PU+CX,\"Click for Help\",A=\"FI:::/Doc/SpriteEd.DD.Z\"$$\n\n"
"$$LTBLUE$$$$MU-UL,\"Select/Unselect All\",LE=SPED_SEL_UNSEL_ALL$$\n"
"$$MU-UL,\"Select Elems\",LE=SPED_SEL$$\n"
"$$MU-UL,\"Unsel Elems\",LE=SPED_UNSEL$$\n\n"
"$$MU-UL,\"Select Elems with Rects\",LE=SPED_SEL_RECTS$$\n"
"$$MU-UL,\"Unsel Elems\",LE=SPED_UNSEL$$\n"
"$$MU-UL,\"Unsel Elems with Rects\",LE=SPED_UNSEL_RECTS$$\n\n"
"$$MU-UL,\"Shift Points\",LE=SPED_SHIFT_PTS$$\n"
"$$MU-UL,\"Shift Points with Rects\",LE=SPED_SHIFT_RECTS$$\n"
"$$MU-UL,\"Shift Selected Elems\",LE=SPED_SHIFT_SEL$$\n"
@ -780,10 +782,21 @@ I64 PopUpSpriteEd(CSprite **_head,I64 *_cur_elem_num)
class CEdSprite
{
CEdSprite *next,*last;
CSprite *g;
I32 type,num,flags,xx,yy,zz;
I32 *x,*y,*z,*w,*h;
};
CEdSprite *EdSpriteNew(I64 type,CSprite *tmpg)
{
CEdSprite *res=CAlloc(sizeof(CEdSprite));
res->g=tmpg;
if (tmpg->type&SPF_SEL)
res->flags|=SPEDF_SEL;
res->type=type;
return res;
}
U0 SpritePtQueNew(U8 *elems,I64 x,I64 y,CEdSprite *head)
{
I64 i,num=0;
@ -792,12 +805,11 @@ U0 SpritePtQueNew(U8 *elems,I64 x,I64 y,CEdSprite *head)
CEdSprite *tmpes;
CSprite *tmpg=elems-offset(CSprite.start);
QueInit(head);
while (tmpg->type) {
switch (tmpg->type) {
while (tmpg->type&SPG_TYPE_MASK) {
switch (tmpg->type&SPG_TYPE_MASK) {
case SPT_ELLIPSE:
case SPT_POLYGON:
tmpes=CAlloc(sizeof(CEdSprite));
tmpes->type=SPEDT_WIDTH_HEIGHT;
tmpes=EdSpriteNew(SPEDT_WIDTH_HEIGHT,tmpg);
tmpes->xx=x;
tmpes->yy=y;
tmpes->x=&tmpg->pwha.x1;
@ -812,8 +824,7 @@ U0 SpritePtQueNew(U8 *elems,I64 x,I64 y,CEdSprite *head)
case SPT_LINE:
case SPT_ARROW:
case SPT_PLANAR_SYMMETRY:
tmpes=CAlloc(sizeof(CEdSprite));
tmpes->type=SPEDT_SIMPLE_PT;
tmpes=EdSpriteNew(SPEDT_SIMPLE_PT,tmpg);
tmpes->xx=x;
tmpes->yy=y;
tmpes->x=&tmpg->pp.x2;
@ -829,8 +840,7 @@ U0 SpritePtQueNew(U8 *elems,I64 x,I64 y,CEdSprite *head)
case SPT_FLOOD_FILL_NOT:
case SPT_CIRCLE:
pq_x1_y1:
tmpes=CAlloc(sizeof(CEdSprite));
tmpes->type=SPEDT_SIMPLE_PT;
tmpes=EdSpriteNew(SPEDT_SIMPLE_PT,tmpg);
tmpes->xx=x;
tmpes->yy=y;
tmpes->x=&tmpg->p.x1;
@ -845,8 +855,7 @@ pq_x1_y1:
case SPT_POLYLINE:
ptr=&tmpg->nu.u;
for (i=0;i<tmpg->nu.num;i++) {
tmpes=CAlloc(sizeof(CEdSprite));
tmpes->type=SPEDT_SIMPLE_PT;
tmpes=EdSpriteNew(SPEDT_SIMPLE_PT,tmpg);
tmpes->xx=x;
tmpes->yy=y;
tmpes->x=&ptr[i<<1];
@ -856,8 +865,7 @@ pq_x1_y1:
}
break;
case SPT_POLYPT:
tmpes=CAlloc(sizeof(CEdSprite));
tmpes->type=SPEDT_SIMPLE_PT;
tmpes=EdSpriteNew(SPEDT_SIMPLE_PT,tmpg);
tmpes->xx=x;
tmpes->yy=y;
tmpes->x=&tmpg->npu.x;
@ -871,8 +879,7 @@ pq_x1_y1:
case SPT_BSPLINE3_CLOSED:
p=&tmpg->nu.u;
for (i=0;i<tmpg->nu.num;i++) {
tmpes=CAlloc(sizeof(CEdSprite));
tmpes->type=SPEDT_SIMPLE_PT;
tmpes=EdSpriteNew(SPEDT_SIMPLE_PT,tmpg);
tmpes->xx=x;
tmpes->yy=y;
tmpes->x=&p[i].x;
@ -885,8 +892,7 @@ pq_x1_y1:
case SPT_MESH:
break;
case SPT_SHIFTABLE_MESH:
tmpes=CAlloc(sizeof(CEdSprite));
tmpes->type=SPEDT_SIMPLE_PT;
tmpes=EdSpriteNew(SPEDT_SIMPLE_PT,tmpg);
tmpes->xx=x;
tmpes->yy=y;
tmpes->x=&tmpg->pmu.x;
@ -952,7 +958,7 @@ U0 SpriteCtrlPtsMove(CEdSprite *head,I64 dx,I64 dy)
}
}
Bool SpriteShiftPts(U8 *elems,I64 x,I64 y,I64 *_cur_elem_num,I64 mode)
Bool SpriteSelUnselShiftPts(U8 *elems,I64 x,I64 y,I64 *_cur_elem_num,I64 mode)
{
I64 msg_code,a1,a2,xx,yy,xx2,yy2,dd,best_dd,cur_elem_num;
Bool res=TRUE;
@ -968,6 +974,8 @@ Bool SpriteShiftPts(U8 *elems,I64 x,I64 y,I64 *_cur_elem_num,I64 mode)
1<<MSG_IP_R_UP|1<<MSG_IP_L_DOWN|1<<MSG_KEY_DOWN)) {
case MSG_IP_L_DOWN:
switch (mode) {
case SPED_SEL:
case SPED_UNSEL:
case SPED_SHIFT_PTS:
xx=a1; yy=a2;
best_dd=MAX_I64;
@ -990,9 +998,15 @@ Bool SpriteShiftPts(U8 *elems,I64 x,I64 y,I64 *_cur_elem_num,I64 mode)
tmpes=tmpes->next;
}
cur_elem_num=best_es->num;
best_es->flags|=SPEDF_SEL;
if (mode!=SPED_UNSEL) {
best_es->flags|=SPEDF_SEL;
best_es->g->type|=SPF_SEL;
} else {
best_es->flags&=~SPEDF_SEL;
best_es->g->type&=~SPF_SEL;
}
break;
case SPED_SHIFT_RECTS:
start:
xx2=xx=a1; yy2=yy=a2;
while (TRUE) {
SpriteCtrlPtsDraw(dc,&head);
@ -1012,37 +1026,62 @@ Bool SpriteShiftPts(U8 *elems,I64 x,I64 y,I64 *_cur_elem_num,I64 mode)
switch (tmpes->type) {
case SPEDT_SIMPLE_PT:
if (xx<=*tmpes->x+tmpes->xx<=xx2 &&
yy<=*tmpes->y+tmpes->yy<=yy2)
tmpes->flags|=SPEDF_SEL;
yy<=*tmpes->y+tmpes->yy<=yy2) {
if (mode!=SPED_UNSEL_RECTS) {
tmpes->flags|=SPEDF_SEL;
tmpes->g->type|=SPF_SEL;
} else {
tmpes->flags&=~SPEDF_SEL;
tmpes->g->type&=~SPF_SEL;
}
}
break;
case SPEDT_WIDTH_HEIGHT:
if (xx<=*tmpes->x+*tmpes->w+tmpes->xx<=xx2 &&
yy<=*tmpes->y+*tmpes->h+tmpes->yy<=yy2)
tmpes->flags|=SPEDF_SEL;
yy<=*tmpes->y+*tmpes->h+tmpes->yy<=yy2) {
if (mode!=SPED_UNSEL_RECTS) {
tmpes->flags|=SPEDF_SEL;
tmpes->g->type|=SPF_SEL;
} else {
tmpes->flags&=~SPEDF_SEL;
tmpes->g->type&=~SPF_SEL;
}
}
break;
}
tmpes=tmpes->next;
}
case SPED_SEL_RECTS:
case SPED_UNSEL_RECTS:
break;
case SPED_SHIFT_RECTS:
do {
SpriteCtrlPtsDraw(dc,&head);
msg_code=ScanMsg(&a1,&a2,1<<MSG_KEY_DOWN|1<<MSG_IP_L_DOWN);
if (msg_code==MSG_KEY_DOWN) goto gs_key;
} while (msg_code!=MSG_IP_L_DOWN);
xx=a1;yy=a2;
break;
end:
}
switch (mode) {
case SPED_SHIFT_PTS:
case SPED_SHIFT_RECTS:
do {
SpriteCtrlPtsDraw(dc,&head);
msg_code=ScanMsg(&a1,&a2,1<<MSG_KEY_DOWN|1<<MSG_IP_L_DOWN);
if (msg_code==MSG_KEY_DOWN) goto gs_key;
} while (msg_code!=MSG_IP_L_DOWN);
xx=a1;yy=a2;
if (msg_code=ScanMsg(&a1,&a2,1<<MSG_IP_MOVE|1<<MSG_IP_L_UP)) {
SpriteCtrlPtsMove(&head,a1-xx,a2-yy);
xx=a1;yy=a2;
}
} while (msg_code!=MSG_IP_L_UP);
tmpes=head.next;
while (tmpes!=&head) {
tmpes->flags&=~SPEDF_SEL;
tmpes->g->type&=~SPF_SEL;
tmpes=tmpes->next;
}
break;
}
do {
SpriteCtrlPtsDraw(dc,&head);
if (msg_code=ScanMsg(&a1,&a2,1<<MSG_IP_MOVE|1<<MSG_IP_L_UP)) {
SpriteCtrlPtsMove(&head,a1-xx,a2-yy);
xx=a1;yy=a2;
}
} while (msg_code!=MSG_IP_L_UP);
tmpes=head.next;
while (tmpes!=&head) {
tmpes->flags&=~SPEDF_SEL;
tmpes=tmpes->next;
}
break;
case MSG_KEY_DOWN:
gs_key:
@ -1054,11 +1093,11 @@ gs_key:
goto gs_done;
case 'p':
case 'P':
mode=SPED_SHIFT_PTS;
mode&=~1;
break;
case 'r':
case 'R':
mode=SPED_SHIFT_RECTS;
mode|=1;
break;
}
break;
@ -1084,7 +1123,7 @@ I64 SpriteEd(CDoc *doc,CDocEntry *doc_ce,I64 x,I64 y,
Bool unlock;
I64 i,r[16],msg_code,a1,a2,xx,yy,
old_de_flags;
CSprite *cur_elem,*head2,*next,*last,*tmpg,*insert_pt;
CSprite *head2,*next,*last,*tmpg,*insert_pt;
old_de_flags=doc_ce->de_flags;
tmpb=doc_ce->bin_data;
@ -1105,23 +1144,6 @@ I64 SpriteEd(CDoc *doc,CDocEntry *doc_ce,I64 x,I64 y,
else
SpriteQueSelAll(*_head,FALSE);
break;
case SPED_SEL:
case SPED_UNSEL:
doc_ce->de_flags=old_de_flags;
doc->cur_sprite=tmpb->data;
do {
doc->nearest_sprite_elem_num=0;
msg_code=GetMsg(&a1,&a2,1<<MSG_IP_L_DOWN|1<<MSG_IP_R_UP);
Refresh(2);
if (msg_code==MSG_IP_L_DOWN) {
*_cur_elem_num=doc->nearest_sprite_elem_num;
cur_elem=SpriteSetSettings(,*_head,*_cur_elem_num);
cur_elem->sel=ToBool(i==SPED_SEL);
GetMsg(,,1<<MSG_IP_L_UP);
}
} while (msg_code!=MSG_IP_R_UP);
doc->cur_sprite=NULL;
break;
case SPED_SET_ORIGIN:
SpriteQueSelAll(*_head);
doc_ce->de_flags=old_de_flags;
@ -1146,6 +1168,10 @@ I64 SpriteEd(CDoc *doc,CDocEntry *doc_ce,I64 x,I64 y,
if (!SpriteQueSelCnt(*_head,FALSE))
SpriteQueSelAll(*_head,FALSE);
break;
case SPED_SEL:
case SPED_SEL_RECTS:
case SPED_UNSEL:
case SPED_UNSEL_RECTS:
case SPED_SHIFT_PTS:
case SPED_SHIFT_RECTS:
RegOneTimePopUp(ARf_CSPRITE_PTS_RECTANGLES,
@ -1154,7 +1180,7 @@ I64 SpriteEd(CDoc *doc,CDocEntry *doc_ce,I64 x,I64 y,
"Press '$$GREEN$$r$$FG$$' after one rectangle\n"
"to OR another rectangle.\n");
doc_ce->de_flags=old_de_flags;
if (SpriteShiftPts(tmpb->data,x,y,_cur_elem_num,i)) {
if (SpriteSelUnselShiftPts(tmpb->data,x,y,_cur_elem_num,i)) {
QueDel(*_head);
Free(*_head);
*_head=Sprite2SpriteQue(tmpb->data);

27
Adam/Gr/SpriteMain.HC

@ -627,7 +627,7 @@ I64 SMBitMap(I64 eletype,CDoc *doc,CDocEntry *doc_ce,CSprite *head,
img->color=bm_bkcolor;
GrRect(img,0,0,tmpg->pwhu.width,tmpg->pwhu.height);
tmpg1=insert_pt;
if (tmpg1==head || tmpg1->type!=SPT_BITMAP) {
if (tmpg1==head || tmpg1->type&SPG_TYPE_MASK!=SPT_BITMAP) {
SpriteSetSettings(img,head,0,-(xx1-x),-(yy1-y));
x=xx; y=yy;
Sprite3(img,-(xx1-x),-(yy1-y),0,doc_ce->bin_data->data);
@ -671,9 +671,9 @@ U0 SMMesh(CDoc *doc,CDocEntry *doc_ce,CSprite *head,I64 *_cur_elem_num)
CD3I32 *p;
I64 i,size,x1,y1,z1;
I32 *mesh,*old_mesh;
if (tmpg1!=head && tmpg1->type==SPT_MESH)
if (tmpg1!=head && tmpg1->type&SPG_TYPE_MASK==SPT_MESH)
old_mesh=&tmpg1->mu.vertex_cnt;
else if (tmpg1!=head && tmpg1->type==SPT_SHIFTABLE_MESH) {
else if (tmpg1!=head && tmpg1->type&SPG_TYPE_MASK==SPT_SHIFTABLE_MESH) {
x1=tmpg1->pmu.x;
y1=tmpg1->pmu.y;
z1=tmpg1->pmu.z;
@ -700,7 +700,7 @@ U0 SMMesh(CDoc *doc,CDocEntry *doc_ce,CSprite *head,I64 *_cur_elem_num)
SpriteEdUpdate(doc,doc_ce,head);
} else
*_cur_elem_num+=1;
} else if (old_mesh && tmpg1->type==SPT_SHIFTABLE_MESH) {
} else if (old_mesh && tmpg1->type&SPG_TYPE_MASK==SPT_SHIFTABLE_MESH) {
x1=tmpg1->pmu.x;
y1=tmpg1->pmu.y;
z1=tmpg1->pmu.z;
@ -721,7 +721,7 @@ U0 SMShiftableMesh(CDoc *doc,CDocEntry *doc_ce,CSprite *head,
CD3I32 *p;
I64 i,size,z,x1,y1,z1;
I32 *mesh,*old_mesh;
if (tmpg1!=head && tmpg1->type==SPT_MESH) {
if (tmpg1!=head && tmpg1->type&SPG_TYPE_MASK==SPT_MESH) {
z=0;
x1=-(a1-x);
y1=-(a2-y);
@ -733,7 +733,7 @@ U0 SMShiftableMesh(CDoc *doc,CDocEntry *doc_ce,CSprite *head,
p->z+=z1;
}
old_mesh=&tmpg1->mu.vertex_cnt;
} else if (tmpg1!=head && tmpg1->type==SPT_SHIFTABLE_MESH) {
} else if (tmpg1!=head && tmpg1->type&SPG_TYPE_MASK==SPT_SHIFTABLE_MESH) {
z=-tmpg1->pmu.z;
x1=tmpg1->pmu.x-(a1-x);
y1=tmpg1->pmu.y-(a2-y);
@ -766,7 +766,7 @@ U0 SMShiftableMesh(CDoc *doc,CDocEntry *doc_ce,CSprite *head,
SpriteEdUpdate(doc,doc_ce,head);
} else
*_cur_elem_num+=1;
} else if (old_mesh && tmpg1->type==SPT_SHIFTABLE_MESH) {
} else if (old_mesh && tmpg1->type&SPG_TYPE_MASK==SPT_SHIFTABLE_MESH) {
x1=tmpg1->pmu.x-(a1-x);
y1=tmpg1->pmu.y-(a2-y);
z1=tmpg1->pmu.z+z;
@ -776,7 +776,7 @@ U0 SMShiftableMesh(CDoc *doc,CDocEntry *doc_ce,CSprite *head,
p->y-=y1;
p->z-=z1;
}
} else if (old_mesh && tmpg1->type==SPT_MESH) {
} else if (old_mesh && tmpg1->type&SPG_TYPE_MASK==SPT_MESH) {
x1=-(a1-x);
y1=-(a2-y);
z1= z;
@ -901,8 +901,8 @@ I64 SpriteMainEd(CDoc *doc)
case SPT_ED_MENU:
switch (SpriteEd(doc,doc_ce,x,y,&head,&cur_elem_num)) {
case SPE_ABORT: eletype=DOCM_CANCEL; break;
case SPE_EXIT: eletype=SPT_EXIT; break;
case SPE_CONT: eletype=SPT_MENU; break;
case SPE_EXIT: eletype=SPT_EXIT; break;
case SPE_CONT: eletype=SPT_MENU; break;
}
break;
case SPT_MESH:
@ -1196,7 +1196,8 @@ U0 EdSpriteIns(CDoc *doc)
if (SpriteMainEd(doc)==SPE_ABORT) {
DocLock(doc);
DocEntryDel(doc,doc_e);
}
} else
SpriteSelAll(tmpb->data,FALSE);
} else
DocBinDel(doc,tmpb);
if (unlock)
@ -1224,8 +1225,10 @@ U0 EdSpriteEd(CDoc *doc)
Free(tmpb->data);
tmpb->data=old_csprite;
tmpb->size=old_size;
} else
} else {
SpriteSelAll(tmpb->data,FALSE);
Free(old_csprite);
}
if (unlock)
DocUnlock(doc);
}

27
Adam/Gr/SpriteNew.HC

@ -38,13 +38,13 @@ I64 sprite_elem_base_sizes[SPT_NUM_TYPES]={
I64 SpriteElemQuedBaseSize(I64 type)
{
return sprite_elem_base_sizes[type]+offset(CSprite.start);
return sprite_elem_base_sizes[type&SPG_TYPE_MASK]+offset(CSprite.start);
}
I64 SpriteElemSize(CSprite *tmpg)
{
I64 i=sprite_elem_base_sizes[tmpg->type];
switch (tmpg->type) {
I64 i=sprite_elem_base_sizes[tmpg->type&SPG_TYPE_MASK];
switch (tmpg->type&SPG_TYPE_MASK) {
case SPT_POLYLINE:
i+=tmpg->nu.num*sizeof(CD2I32);
break;
@ -80,7 +80,7 @@ I64 SpriteElemSize(CSprite *tmpg)
public I64 SpriteSize(U8 *elems)
{//Walk sprite elements and return size of sprite as binary data.
CSprite *tmpg=elems-offset(CSprite.start),*tmpg1=tmpg;
while (tmpg->type)
while (tmpg->type&SPG_TYPE_MASK)
tmpg(U8 *)+=SpriteElemSize(tmpg);
return tmpg(U8 *)-tmpg1(U8 *)+sprite_elem_base_sizes[SPT_END];
}
@ -89,15 +89,24 @@ I64 SpriteTypeMask(U8 *elems)
{
I64 res=0;
CSprite *tmpg=elems-offset(CSprite.start);
while (tmpg->type) {
if (tmpg->type>=SPT_NUM_TYPES)
while (tmpg->type&SPG_TYPE_MASK) {
if (tmpg->type&SPG_TYPE_MASK>=SPT_NUM_TYPES)
return 1<<SPT_NUM_TYPES;
Bts(&res,tmpg->type);
Bts(&res,tmpg->type&SPG_TYPE_MASK);
tmpg(U8 *)+=SpriteElemSize(tmpg);
}
return res;
}
U0 SpriteSelAll(U8 *elems,Bool val)
{
CSprite *tmpg=elems-offset(CSprite.start);
while (tmpg->type&SPG_TYPE_MASK) {
BEqu(&tmpg->type,SPf_SEL,val);
tmpg(U8 *)+=SpriteElemSize(tmpg);
}
}
public U8 *DC2Sprite(CDC *tmpb)
{//Convert device context to sprite.
CSprite *tmpg;
@ -118,8 +127,8 @@ public U8 *SpriteElem2Summary(CSprite *tmpg)
{//Study $LK,"::/Demo/Graphics/SpriteText.HC"$.
U8 buf[STR_LEN],buf2[STR_LEN];
I32 *ptr;
StrPrint(buf,"%Z",tmpg->type,"ST_SPRITE_ELEM_TYPES");
switch (tmpg->type) {
StrPrint(buf,"%Z",tmpg->type&SPG_TYPE_MASK,"ST_SPRITE_ELEM_TYPES");
switch (tmpg->type&SPG_TYPE_MASK) {
case SPT_COLOR:
CatPrint(buf," %s",Color2Str(buf2,tmpg->c.color));
break;

1
Adam/MakeAdam.HC

@ -22,6 +22,7 @@ LBts(&sys_run_level,RLf_DOC);
#include "God/MakeGod"
#include "AHash"
#include "TaskSettings"
#include "CPURep"
#include "DevInfo"
#include "ADefine"
#include "WallPaper"

8
Adam/Opt/Utils/ToTXT.HC

@ -40,8 +40,7 @@ public CDoc *Doc2TXT(CDoc *doc_in)
CDocEntry *doc_e,*doc_e2;
I64 y,col;
CDoc *doc_out=DocNew;
Bool unlock_doc_in=DocLock(doc_in),no_bwd;
Bool unlock_doc_in=DocLock(doc_in),no_bwd,line_has_html_code=FALSE;
DocRecalc(doc_in);
doc_out->flags|=DOCF_PLAIN_TEXT|DOCF_NO_CURSOR;
@ -55,7 +54,10 @@ public CDoc *Doc2TXT(CDoc *doc_in)
TXTPutS(doc_out,"\n",&col);
y++;
col=0;
line_has_html_code=FALSE;
}
if (doc_e->type_u8==DOCT_HTML_CODE)
line_has_html_code=TRUE;
no_bwd=TRUE;
doc_e2=doc_e->next;
@ -66,7 +68,7 @@ public CDoc *Doc2TXT(CDoc *doc_in)
}
doc_e2=doc_e2->next;
}
if (no_bwd)
if (no_bwd && !(doc_e->type_u8==DOCT_NEW_LINE && line_has_html_code))
while (col<doc_e->x)
TXTPutS(doc_out," ",&col);

13
Adam/Win.HC

@ -17,7 +17,7 @@ winmgr.t->last_calc_idle_time=tS;
U0 DrawProgressBars(CDC *dc)
{
I64 i,j,k,n,m;
U8 *st;
U8 *st,*st2;
for (i=0;i<NUM_PROGRESS_BARS;i++) {
if (m=sys_progresses[i].max) {
dc->color=BLACK;
@ -57,10 +57,15 @@ U0 DrawProgressBars(CDC *dc)
st=StrNew(sys_progresses[i].desc);
else
st=MStrPrint("%d/%d",n,m);
GrPrint(dc,(GR_WIDTH-FONT_WIDTH*StrLen(st))/2,
if (sys_progresses[i].t0) {
st2=MStrPrint("%s %5.3f",st,tS-sys_progresses[i].t0);
Free(st);
} else
st2=st;
GrPrint(dc,(GR_WIDTH-FONT_WIDTH*StrLen(st2))/2,
(GR_HEIGHT-FONT_HEIGHT-
(NUM_PROGRESS_BARS*2-2-i*4)*PROGRESS_BAR_HEIGHT)/2,"%s",st);
Free(st);
(NUM_PROGRESS_BARS*2-2-i*4)*PROGRESS_BAR_HEIGHT)/2,"%s",st2);
Free(st2);
}
}
}

12
Apps/Budget/BgtEntry.HC