TempleOSCD_140715.ISO
This commit is contained in:
1 parent
7ef616a20e
commit
64f679eeb9
1095 files changed
+24814
-221011
No files matched your search
+29
-29
@@ -1,17 +1,17 @@
|
||||
//After making a font, you can save it as a binary
|
||||
//file with:
|
||||
// FileWrite("filename.BIN.Z",gr_font,256*FONT_HEIGHT);
|
||||
//You can load it with:
|
||||
// U8 *myfont=FileRead("filename.BIN");
|
||||
// gr_font=myfont; //preserve gr_font if you want to go back.
|
||||
/*After making a font, you can save it as a binary
|
||||
file with:
|
||||
FileWrite("filename.BIN.Z",text.font,256*FONT_HEIGHT);
|
||||
You can load it with:
|
||||
U8 *myfont=FileRead("filename.BIN");
|
||||
text.font=myfont; //preserve text.font if you want to go back.
|
||||
|
||||
//If you want to change the system font permanently,
|
||||
//save to a file with this font editor program
|
||||
//and cut and paste the code into $LK,"::/Kernel/Font8x8.CPP"$.
|
||||
//You will need to recompile Kernel by calling $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$().
|
||||
If you want to change the system font permanently,
|
||||
save to a file with this font editor program
|
||||
and cut and paste the code into $LK,"::/Kernel/Font8x8.CPP"$.
|
||||
You will need to recompile Kernel by calling $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$().
|
||||
|
||||
//See $LK,"::/Demo/ExtendedChars.CPP"$ and
|
||||
//$LK,"::/Demo/ScreenCodes.CPP"$.
|
||||
See $LK,"::/Demo/ExtendedChars.CPP"$ and $LK,"::/Demo/ScreenCodes.CPP"$.
|
||||
*/
|
||||
|
||||
#define BLOW_UP_CHAR_X (18*FONT_WIDTH)
|
||||
#define BLOW_UP_CHAR_Y (2*FONT_HEIGHT)
|
||||
@@ -31,13 +31,13 @@ U0 DrawIt(CTask *task,CDC *dc)
|
||||
c=(YELLOW<<4+BLUE)<<8 + k++;
|
||||
} else
|
||||
c=(BLUE<<4+WHITE)<<8 + k++;
|
||||
PlotWinU8(task,c,j,i);
|
||||
TextChar(task,,j,i,c);
|
||||
}
|
||||
|
||||
k=0;
|
||||
for (i=0;i<FONT_HEIGHT;i++)
|
||||
for (j=0;j<FONT_WIDTH;j++) {
|
||||
if (Bt(&gr_font[FONT_HEIGHT*cur_ch],k++))
|
||||
if (Bt(&text.font[FONT_HEIGHT*cur_ch],k++))
|
||||
dc->color=YELLOW;
|
||||
else
|
||||
dc->color=BLUE;
|
||||
@@ -54,7 +54,7 @@ U0 FESave(Bool pmt)
|
||||
I64 i,j,k=0;
|
||||
for (i=0;i<256;i++) {
|
||||
for (j=0;j<FONT_HEIGHT;j++)
|
||||
DocPrint(doc,"0x%02X,",gr_font[k++]);
|
||||
DocPrint(doc,"0x%02X,",text.font[k++]);
|
||||
if (Bt(chars_bitmap_safe_dollar,i))
|
||||
DocPrint(doc,"//%c",i);
|
||||
else if (i=='$$')
|
||||
@@ -69,7 +69,7 @@ U0 FESave(Bool pmt)
|
||||
|
||||
U0 FontEd()
|
||||
{
|
||||
I64 msg_code,p1,p2,k;
|
||||
I64 msg_code,a1,a2,k;
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
MenuPush(
|
||||
"File {"
|
||||
@@ -85,11 +85,11 @@ U0 FontEd()
|
||||
try {
|
||||
Fs->draw_it=&DrawIt;
|
||||
while (TRUE) {
|
||||
switch (msg_code=GetMsg(&p1,&p2,1<<MSG_KEY_DOWN|1<<MSG_IP_L_DOWN|1<<MSG_IP_R_DOWN|1<<MSG_IP_MOVE)) {
|
||||
switch (msg_code=GetMsg(&a1,&a2,1<<MSG_KEY_DOWN|1<<MSG_IP_L_DOWN|1<<MSG_IP_R_DOWN|1<<MSG_IP_MOVE)) {
|
||||
case MSG_KEY_DOWN:
|
||||
switch (p1) {
|
||||
switch (a1) {
|
||||
case 0:
|
||||
switch (p2.u8[0]) {
|
||||
switch (a2.u8[0]) {
|
||||
case SC_CURSOR_LEFT:
|
||||
cur_ch--;
|
||||
break;
|
||||
@@ -114,24 +114,24 @@ U0 FontEd()
|
||||
case CH_SHIFT_ESC:
|
||||
goto fe_done;
|
||||
default:
|
||||
cur_ch=p1;
|
||||
cur_ch=a1;
|
||||
}
|
||||
break;
|
||||
case MSG_IP_L_DOWN:
|
||||
case MSG_IP_R_DOWN:
|
||||
if (0<=p1<FONT_WIDTH*16 &&
|
||||
0<=p2<FONT_HEIGHT*16) {
|
||||
cur_ch=(p2/FONT_HEIGHT)*16+p1/FONT_WIDTH;
|
||||
if (0<=a1<FONT_WIDTH*16 &&
|
||||
0<=a2<FONT_HEIGHT*16) {
|
||||
cur_ch=(a2/FONT_HEIGHT)*16+a1/FONT_WIDTH;
|
||||
break;
|
||||
} //fall through
|
||||
case MSG_IP_MOVE:
|
||||
k=((p2-BLOW_UP_CHAR_Y)/FONT_HEIGHT)*FONT_WIDTH+
|
||||
(p1-BLOW_UP_CHAR_X)/FONT_WIDTH;
|
||||
k=((a2-BLOW_UP_CHAR_Y)/FONT_HEIGHT)*FONT_WIDTH+
|
||||
(a1-BLOW_UP_CHAR_X)/FONT_WIDTH;
|
||||
if (0<=k<FONT_WIDTH*FONT_HEIGHT) {
|
||||
if (ip_lb||msg_code==MSG_IP_L_DOWN)
|
||||
Bts(&gr_font[FONT_HEIGHT*cur_ch],k);
|
||||
if (ip_rb||msg_code==MSG_IP_R_DOWN)
|
||||
Btr(&gr_font[FONT_HEIGHT*cur_ch],k);
|
||||
if (ip.lb||msg_code==MSG_IP_L_DOWN)
|
||||
Bts(&text.font[FONT_HEIGHT*cur_ch],k);
|
||||
if (ip.rb||msg_code==MSG_IP_R_DOWN)
|
||||
Btr(&text.font[FONT_HEIGHT*cur_ch],k);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user