749
750
751
752
753
754
755
756
757
758
759
760
761
762
|
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
|
+
|
case 1 ... 8: fprintf(fp,"\\%c",c+'0'-1); break;
case 10: fprintf(fp,"\\n"); break;
case 11: fprintf(fp,"\\l"); break;
case 12: fprintf(fp,"\\c"); break;
case 14: fprintf(fp,"\\i"); isimg=1; break;
case 15: fprintf(fp,"\\b"); break;
case 16: fprintf(fp,"\\q"); break;
case 30: fprintf(fp,"\\d"); isimg=1; break;
case 31:
if(!*t) break;
fprintf(fp,"\\x%02X",*t++);
break;
case 32 ... 127:
if(c=='\\') {
if(isimg) isimg=0; else fputc(c,fp);
|
885
886
887
888
889
890
891
892
893
894
895
896
897
898
|
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
|
+
|
isimg=0;
*q++='\\';
} else {
switch(*p) {
case '0' ... '7': *q++=*p+1-'0'; break;
case 'b': *q++=15; break;
case 'c': *q++=12; break;
case 'd': *q++=30; isimg=1; break;
case 'i': *q++=14; isimg=1; break;
case 'l': *q++=11; break;
case 'n': *q++=10; break;
case 'q': *q++=16; break;
case 'x':
*q++=31;
*q=0;
|
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
|
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
|
-
+
|
draw_text(0,16," Title: ",0xF9,0xFF);
} else {
snprintf(buf,19," String %d: ",(int)(ps-levelstrings));
draw_text(0,16,buf,0xF9,0xFF);
}
draw_text(160,16,o?"OVR":"INS",0xF1,0xFE);
draw_text(0,0,"<Esc> Cancel <F1> Preview <F2> Save <\x18\x19\x1A\x1B> MoveCursor <^P> InsertChar <^Y> DelLine",0xF1,0xFB);
draw_text(0,8,"ALT+ <0-7> Color <B> Bar <C> Center <I> Image <L> Left <Q> Quiz",0xF1,0xFB);
draw_text(0,8,"ALT+ <0-7> Color <B> Bar <C> Center <D> Data <I> Image <L> Left <Q> Quiz",0xF1,0xFB);
draw_text(0,24,"\x10",0xF0,0xF1);
cp=0;
for(i=j=n=0;s[i] && n<63;) {
draw_text(0,(n+3)<<3,"\x10",0xF0,0xF1);
i+=draw_text_line(8,(n+3)<<3,s+i,r==n?c:-1,&cp);
if(j=(s[i]==10)) i++;
sz=li[++n]=i;
|
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
|
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
|
+
|
case SDLK_3: i=4; goto addch;
case SDLK_4: i=5; goto addch;
case SDLK_5: i=6; goto addch;
case SDLK_6: i=7; goto addch;
case SDLK_7: i=8; goto addch;
case SDLK_b: i=15; goto addch;
case SDLK_c: i=12; goto addch;
case SDLK_d: i=30; goto addch;
case SDLK_i: i=14; goto addch;
case SDLK_l: i=11; goto addch;
case SDLK_n: i=10; goto addch;
case SDLK_q: i=16; goto addch;
}
}
if(i<32) {
|