TempleOSCD_150720.ISO
This commit is contained in:
1 parent
401601816c
commit
f8c05f98f4
554 files changed
+26046
-24853
No files matched your search
@@ -137,7 +137,8 @@ U0 BibleInit()
|
||||
"98684\0"
|
||||
"100111\0");
|
||||
DefinePrint("ST_BIBLE_LINES","%d",
|
||||
Str2I64(DefineSub(DefineCnt("ST_BIBLE_BOOK_LINES")-1,"ST_BIBLE_BOOK_LINES"))-1);
|
||||
Str2I64(DefineSub(DefineCnt("ST_BIBLE_BOOK_LINES")-1,
|
||||
"ST_BIBLE_BOOK_LINES"))-1);
|
||||
} BibleInit;
|
||||
|
||||
public U8 *BibleLine2Verse(I64 line,I64 separate_ch=CH_SPACE)
|
||||
@@ -180,7 +181,8 @@ public U8 *BibleLine2Verse(I64 line,I64 separate_ch=CH_SPACE)
|
||||
}
|
||||
if (doc_e->type_u8==DOCT_TEXT && StrLen(doc_e->tag)>=3) {
|
||||
ptr=doc_e->tag+StrLen(doc_e->tag)-1;
|
||||
while (ptr>doc_e->tag && (!('0'<=*(ptr-1)<='9') || *ptr!=':' || !('0'<=*(ptr+1)<='9')))
|
||||
while (ptr>doc_e->tag && (!('0'<=*(ptr-1)<='9') || *ptr!=':' ||
|
||||
!('0'<=*(ptr+1)<='9')))
|
||||
ptr--;
|
||||
ptr--;
|
||||
while (ptr>=doc_e->tag && '0'<=*ptr<='9')
|
||||
|
||||
+51
-28
@@ -1,4 +1,4 @@
|
||||
#help_index "God;Graphics/Sprite"
|
||||
#help_index "God;Graphics/Sprite;Sprites"
|
||||
|
||||
U0 GodDoodleDraw(CTask *task,CDC *dc)
|
||||
{
|
||||
@@ -6,21 +6,25 @@ U0 GodDoodleDraw(CTask *task,CDC *dc)
|
||||
if (Blink) {
|
||||
if (god.doodle_done) {
|
||||
dc->color=RED;
|
||||
GrPrint(dc,(task->pix_width-FONT_WIDTH*29)>>1,(task->pix_height-3*FONT_HEIGHT)>>1,
|
||||
"Press <ESC> to insert sprite.");
|
||||
GrPrint(dc,(task->pix_width-FONT_WIDTH*39)>>1,(task->pix_height-3*FONT_HEIGHT)>>1+2*FONT_HEIGHT,
|
||||
"Press <SHIFT-ESC> to throw-away sprite.");
|
||||
GrPrint(dc,(task->pix_width-FONT_WIDTH*29)>>1,
|
||||
(task->pix_height-3*FONT_HEIGHT)>>1,
|
||||
"Press <ESC> to insert sprite.");
|
||||
GrPrint(dc,(task->pix_width-FONT_WIDTH*39)>>1,
|
||||
(task->pix_height-3*FONT_HEIGHT)>>1+2*FONT_HEIGHT,
|
||||
"Press <SHIFT-ESC> to throw-away sprite.");
|
||||
} else {
|
||||
dc->color=GREEN;
|
||||
GrPrint(dc,(task->pix_width-FONT_WIDTH*25)>>1,(task->pix_height-FONT_HEIGHT)>>1,
|
||||
"Press <SPACE> repeatedly.");
|
||||
GrPrint(dc,(task->pix_width-FONT_WIDTH*25)>>1,
|
||||
(task->pix_height-FONT_HEIGHT)>>1,
|
||||
"Press <SPACE> repeatedly.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
U0 GodDoodleSmooth(I64 num)
|
||||
{
|
||||
CDC *dc=DCExtract(god.doodle_dc,0,0,god.doodle_dc->width-1,god.doodle_dc->height-1);
|
||||
CDC *dc=DCExtract(god.doodle_dc,0,0,
|
||||
god.doodle_dc->width-1,god.doodle_dc->height-1);
|
||||
I64 i,x,y,x1,y1,c,histogram[16],best,best_cnt,c_old=god.doodle_dc->color;
|
||||
for (y=0;y<god.doodle_dc->height;y++)
|
||||
for (x=0;x<god.doodle_dc->width;x++) {
|
||||
@@ -45,10 +49,30 @@ U0 GodDoodleSmooth(I64 num)
|
||||
DCDel(dc);
|
||||
}
|
||||
|
||||
U0 GodDoodleBitsIns(I64 num_bits,I64 n)
|
||||
{//Insert bits into God doodle bit fifo.
|
||||
I64 i;
|
||||
for (i=0;i<num_bits;i++) {
|
||||
FifoU8Ins(god.doodle_fifo,n&1);
|
||||
n>>=1;
|
||||
}
|
||||
}
|
||||
|
||||
U0 GodDoodleHexIns(U8 *st)
|
||||
{//Insert hex record into God doodle bit fifo.
|
||||
U8 buf[2];
|
||||
if (st) {
|
||||
buf[1]=0;
|
||||
while (*buf=*st++)
|
||||
if (Bt(chars_bmp_hex_numeric,*buf))
|
||||
GodDoodleBitsIns(4,Str2I64(buf,16));
|
||||
}
|
||||
}
|
||||
|
||||
I64 GodDoodleBits(I64 num_bits)
|
||||
{
|
||||
U8 b;
|
||||
I64 i,k,result=0;
|
||||
I64 result=0;
|
||||
while (num_bits) {
|
||||
if (FifoU8Rem(god.doodle_fifo,&b)) {
|
||||
result=result<<1+b;
|
||||
@@ -62,19 +86,14 @@ I64 GodDoodleBits(I64 num_bits)
|
||||
FifoU8Flush(god.doodle_fifo);
|
||||
} else if ('0'<=god.doodle_ch<='9')
|
||||
GodDoodleSmooth(god.doodle_ch-'0');
|
||||
else {
|
||||
k=KbdMouseEvtTime>>GOD_BAD_BITS;
|
||||
for (i=0;i<GOD_GOOD_BITS;i++) {
|
||||
FifoU8Ins(god.doodle_fifo,k&1);
|
||||
k>>=1;
|
||||
}
|
||||
}
|
||||
else
|
||||
GodDoodleBitsIns(GOD_GOOD_BITS,KbdMouseEvtTime>>GOD_BAD_BITS);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public U8 *GodDoodleSprite()
|
||||
public U8 *GodDoodleSprite(U8 *hex=NULL)
|
||||
{//Make God draw sprite. $LK+PU,"Holy Spirit Instructions",A="FI:::/Adam/God/HSNotes.TXT"$
|
||||
I64 i,j,w,h,x,y,ch;
|
||||
U8 *elems;
|
||||
@@ -97,6 +116,7 @@ public U8 *GodDoodleSprite()
|
||||
|
||||
Fs->draw_it=&GodDoodleDraw;
|
||||
FifoU8Flush(god.doodle_fifo);
|
||||
GodDoodleHexIns(hex);
|
||||
try {
|
||||
for (i=0;i<3;i++) {
|
||||
god.doodle_dc->color=RED;
|
||||
@@ -104,29 +124,32 @@ public U8 *GodDoodleSprite()
|
||||
nobound_switch (GodDoodleBits(3)) {
|
||||
case 0:
|
||||
GrEllipse3(god.doodle_dc,
|
||||
(w-1)*GodDoodleBits(5)/15.5-w/2,(h-1)*GodDoodleBits(5)/15.5-h/2,0,
|
||||
(w-1)*GodDoodleBits(5)/15.5,(h-1)*GodDoodleBits(5)/15.5);
|
||||
(w-1)*GodDoodleBits(5)/15.5-w/2,
|
||||
(h-1)*GodDoodleBits(5)/15.5-h/2,0,
|
||||
(w-1)*GodDoodleBits(5)/15.5,(h-1)*GodDoodleBits(5)/15.5);
|
||||
break;
|
||||
case 1:
|
||||
GrCircle3(god.doodle_dc,
|
||||
(w-1)*GodDoodleBits(5)/15.5-w/2,(h-1)*GodDoodleBits(5)/15.5-h/2,0,
|
||||
(w-1)*GodDoodleBits(5)/15.5);
|
||||
(w-1)*GodDoodleBits(5)/15.5-w/2,
|
||||
(h-1)*GodDoodleBits(5)/15.5-h/2,0,
|
||||
(w-1)*GodDoodleBits(5)/15.5);
|
||||
break;
|
||||
case 2:
|
||||
GrBorder(god.doodle_dc,
|
||||
(w-1)*GodDoodleBits(5)/15.5-w/2,(h-1)*GodDoodleBits(5)/15.5-h/2,
|
||||
(w-1)*GodDoodleBits(5)/15.5,(h-1)*GodDoodleBits(5)/15.5);
|
||||
(w-1)*GodDoodleBits(5)/15.5-w/2,
|
||||
(h-1)*GodDoodleBits(5)/15.5-h/2,
|
||||
(w-1)*GodDoodleBits(5)/15.5,(h-1)*GodDoodleBits(5)/15.5);
|
||||
break;
|
||||
case 3...7:
|
||||
GrLine3(god.doodle_dc,
|
||||
(w-1)*GodDoodleBits(4)/15,(h-1)*GodDoodleBits(4)/15,0,
|
||||
(w-1)*GodDoodleBits(4)/15,(h-1)*GodDoodleBits(4)/15,0);
|
||||
(w-1)*GodDoodleBits(4)/15,(h-1)*GodDoodleBits(4)/15,0,
|
||||
(w-1)*GodDoodleBits(4)/15,(h-1)*GodDoodleBits(4)/15,0);
|
||||
break;
|
||||
}
|
||||
for (j=0;j<6;j++) {
|
||||
x=(w-1)*GodDoodleBits(5)/31+w/64;
|
||||
y=(h-1)*GodDoodleBits(5)/31+h/64;
|
||||
switch(GodDoodleBits(2)) {
|
||||
nobound_switch(GodDoodleBits(2)) {
|
||||
case 0: god.doodle_dc->color=BLACK; break;
|
||||
case 1: god.doodle_dc->color=DKGRAY; break;
|
||||
case 2: god.doodle_dc->color=LTGRAY; break;
|
||||
@@ -155,10 +178,10 @@ public U8 *GodDoodleSprite()
|
||||
}
|
||||
|
||||
#help_index "God"
|
||||
public U0 GodDoodle()
|
||||
public U0 GodDoodle(U8 *hex=NULL)
|
||||
{//Make God draw sprite, insert in doc. $LK+PU,"Holy Spirit Instructions",A="FI:::/Adam/God/HSNotes.TXT"$
|
||||
U8 *elems;
|
||||
if (elems=GodDoodleSprite) {
|
||||
if (elems=GodDoodleSprite(hex)) {
|
||||
Sprite(elems);
|
||||
Free(elems);
|
||||
}
|
||||
|
||||
+3
-3
@@ -14,11 +14,11 @@ public class CGodGlbls
|
||||
Bool doodle_done;
|
||||
} god;
|
||||
MemSet(&god,0,sizeof(CGodGlbls));
|
||||
god.doodle_fifo =FifoU8New(32);
|
||||
god.fifo =FifoU8New(32);
|
||||
god.doodle_fifo =FifoU8New(2048*8);
|
||||
god.fifo =FifoU8New(2048*8);
|
||||
|
||||
extern U0 GodBitsIns(I64 num_bits,I64 n);
|
||||
extern U0 GodWord();
|
||||
extern U0 GodPassage(I64 num_lines=20);
|
||||
extern U0 GodSong();
|
||||
extern U0 GodDoodle();
|
||||
extern U0 GodDoodle(U8 *hex=NULL);
|
||||
@@ -155,7 +155,7 @@ public U8 *GodSongStr()
|
||||
}
|
||||
|
||||
public U0 GodSong()
|
||||
{//Make God generate 2measures x 2 + 2measures x 2 song. $LK+PU,"Holy Spirit Instructions",A="FI:::/Adam/God/HSNotes.TXT"$
|
||||
{//Make God generate 2measuresx2+2measuresx2. $LK+PU,"Holy Spirit Instructions",A="FI:::/Adam/God/HSNotes.TXT"$
|
||||
U8 *st1=GodSongStr,*st2=GodSongStr;
|
||||
if (st1 && st2)
|
||||
DocPrint(DocPut,"$$SO,\"<Song>\",A=\"%s%s%s%s\"$$",st1,st1,st2,st2);
|
||||
|
||||
@@ -94,6 +94,7 @@ Pretty ladies? $FG,4$$TX,"A prince is not flustered.",HTML="http://www.youtube
|
||||
Animal sacrifices? $FG,4$Early Jews were "primitive".$FG$
|
||||
What do elephants think about? $FG,4$"Skin, hunger"$FG$
|
||||
What makes elephants happy? $FG,4$"Baths"$FG$
|
||||
Elephants $FG,4$"Mini-skirts" (Skin webbing from back leg.)$FG$
|
||||
What makes my birds happy? $FG,4$"Gnawing"$FG$
|
||||
What makes my birds laugh? $FG,4$"Bite ouch" (If I say "ouch".)$FG$
|
||||
What are my birds saying? $FG,4$"Chanting"$FG$
|
||||
@@ -117,6 +118,7 @@ Should I listen to classical? $FG,4$"Poison"$FG$
|
||||
Do You like chess people? $FG,4$"Do not admire the proud."$FG$
|
||||
Chess? $FG,4$"... will winter with you."$FG$
|
||||
$FG,4$"Headstones"$FG$
|
||||
If You could teach one class? $FG,4$Health$FG$
|
||||
Favorite video game? $FG,4$Donkey Kong$FG$
|
||||
Favorite National Park? $FG,4$$TX,"Whitman Mission",HTML="http://www.nps.gov/whmi/index.htm"$$FG$
|
||||
Favorite National Anthem? $FG,4$$TX,"Latvia's National Anthem",HTML="http://www.youtube.com/watch?v=qKITbBjO4nE"$$FG$
|
||||
|
||||
+15
-4
@@ -48,6 +48,17 @@ public U0 GodBitsIns(I64 num_bits,I64 n)
|
||||
}
|
||||
}
|
||||
|
||||
public U0 GodHexIns(U8 *st)
|
||||
{//Insert hex record into God bit fifo.
|
||||
U8 buf[2];
|
||||
if (st) {
|
||||
buf[1]=0;
|
||||
while (*buf=*st++)
|
||||
if (Bt(chars_bmp_hex_numeric,*buf))
|
||||
GodBitsIns(4,Str2I64(buf,16));
|
||||
}
|
||||
}
|
||||
|
||||
public I64 GodBits(I64 num_bits,U8 *msg=NULL)
|
||||
{//Return N bits. If low on entropy pop-up okay.
|
||||
U8 b;
|
||||
@@ -76,11 +87,11 @@ public I64 GodInit(U8 *files_find_mask="/Adam/God/Vocab.TXT*",U8 *fu_flags=NULL)
|
||||
while (tempde) {
|
||||
if (buf=ptr=FileRead(tempde->full_name)) {
|
||||
while (*ptr) {
|
||||
while (*ptr && !Bt(chars_bitmap_word,*ptr))
|
||||
while (*ptr && !Bt(chars_bmp_word,*ptr))
|
||||
ptr++;
|
||||
if (*ptr) {
|
||||
ptr2=ptr;
|
||||
while (*ptr && Bt(chars_bitmap_word,*ptr))
|
||||
while (*ptr && Bt(chars_bmp_word,*ptr))
|
||||
ptr++;
|
||||
i++;
|
||||
}
|
||||
@@ -99,11 +110,11 @@ public I64 GodInit(U8 *files_find_mask="/Adam/God/Vocab.TXT*",U8 *fu_flags=NULL)
|
||||
while (tempde) {
|
||||
if (buf=ptr=FileRead(tempde->full_name)) {
|
||||
while (*ptr) {
|
||||
while (*ptr && !Bt(chars_bitmap_word,*ptr))
|
||||
while (*ptr && !Bt(chars_bmp_word,*ptr))
|
||||
ptr++;
|
||||
if (*ptr) {
|
||||
ptr2=ptr;
|
||||
while (*ptr && Bt(chars_bitmap_word,*ptr))
|
||||
while (*ptr && Bt(chars_bmp_word,*ptr))
|
||||
ptr++;
|
||||
ch=*ptr;
|
||||
*ptr=0;
|
||||
|
||||
+4350
-5032
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user