Compare commits
2 Commits
d58c4d0846
...
35d9c0c9aa
Author | SHA1 | Date |
---|---|---|
CalcLoverHK | 35d9c0c9aa | |
CalcLoverHK | 3ee6d5c50b |
|
@ -33,32 +33,23 @@ unsigned char *p_ext_asc_mini;
|
|||
unsigned char *p_ext_kana_gaiji;
|
||||
unsigned char *p_ext_kana_gaiji_mini;
|
||||
|
||||
/**
|
||||
* Subsidiary function to display an extended and/or external character.
|
||||
*
|
||||
* @param px x-pixel coordinate of the character
|
||||
* @param py y-pixel coordinate of the character
|
||||
* @param c hex code of the character (single or multi-byte)
|
||||
* @param modify `IMB_WRITEMODIFY` macro (dispbios.h)
|
||||
* @return Stores the character bitmap data to VRAM.
|
||||
*/
|
||||
void KPrintCharSub( int px, int py, unsigned char *c, int modify ) {
|
||||
DISPGRAPH kfont;
|
||||
GRAPHDATA kfont_info;
|
||||
|
||||
int char1 = c[0], char2 = c[1];
|
||||
|
||||
/* displays the ASCII (ANK) characters in the corresponding external bitmap */
|
||||
/* displays an external ASCII (ANK) character */
|
||||
if ( ( g_ext_asc ) && ( 0x20 <= char1 ) && ( char1 <= 0x7E ) ) {
|
||||
kfont_info.pBitmap = p_ext_asc + (char1-0x20)*8;
|
||||
} else
|
||||
|
||||
/* displays characters ranging from `E741` to `E77E` */
|
||||
/* displays a character in the range `E741` to `E77E` */
|
||||
if ( ( char1 == 0xE7 ) && ( 0x41 <= char2 ) && ( char2 <= 0x7E ) ) {
|
||||
kfont_info.pBitmap = font_e7[char2-0x40];
|
||||
} else
|
||||
|
||||
/* displays Katakana/Gaiji characters from*/
|
||||
/* displays a Katakana/Gaiji character in the range `FF80` to `FFE2` */
|
||||
if ( ( char1 == 0xFF ) && ( 0x80 <= char2 ) && ( char2 <= 0xE2 ) ) {
|
||||
|
||||
/* takes the index value */
|
||||
|
|
|
@ -82,6 +82,17 @@ void KPrintChar( int px, int py, unsigned char *c);
|
|||
/* Shortcut function to print an extended/external character in a reverse display. */
|
||||
void KPrintRevChar( int px, int py, unsigned char *c);
|
||||
|
||||
/**
|
||||
* Subsidiary function to display an extended and/or external character.
|
||||
*
|
||||
* @param px x-pixel coordinate of the character
|
||||
* @param py y-pixel coordinate of the character
|
||||
* @param c hex code of the character (single or multi-byte)
|
||||
* @param modify `IMB_WRITEMODIFY` macro (dispbios.h)
|
||||
* @return Stores the character bitmap data to VRAM.
|
||||
*/
|
||||
void KPrintCharSub( int px, int py, unsigned char *c, int modify );
|
||||
|
||||
/**
|
||||
* Main function to display a mini character.
|
||||
*
|
||||
|
|
|
@ -284,27 +284,27 @@ void CB_PrintRev_ext( int x, int y, const unsigned char *str, int extflag ){
|
|||
}
|
||||
}
|
||||
|
||||
int CB_PrintC2( int px, int py, unsigned char *str, int extflag ){ // extflag 0x1000:fx6*8fontmode 0x100:ExtAnkChar
|
||||
int i;
|
||||
i=KPrintCharSub( px, py, str, MINI_OVER | extflag );
|
||||
return i;
|
||||
}
|
||||
void CB_Prints2( int px, int py, unsigned char *str, int extflag ){
|
||||
int i;
|
||||
while ( *str ) {
|
||||
i=CB_PrintC2( px, py, str, extflag );
|
||||
str += OpcodeLen2( (char*)str );
|
||||
px += i;
|
||||
if ( px>378 ) break;
|
||||
}
|
||||
}
|
||||
void CB_Prints_ext( int x, int y, unsigned char *str, int extflag ){
|
||||
unsigned int c=*str;
|
||||
int i;
|
||||
int px,py;
|
||||
px=(x-1)*18; py=(y-1)*24;
|
||||
CB_Prints2( px, py, str, extflag );
|
||||
}
|
||||
// int CB_PrintC2( int px, int py, unsigned char *str, int extflag ){ // extflag 0x1000:fx6*8fontmode 0x100:ExtAnkChar
|
||||
// int i;
|
||||
// i=KPrintCharSub( px, py, str, MINI_OVER | extflag );
|
||||
// return i;
|
||||
// }
|
||||
// void CB_Prints2( int px, int py, unsigned char *str, int extflag ){
|
||||
// int i;
|
||||
// while ( *str ) {
|
||||
// i=CB_PrintC2( px, py, str, extflag );
|
||||
// str += OpcodeLen2( (char*)str );
|
||||
// px += i;
|
||||
// if ( px>378 ) break;
|
||||
// }
|
||||
// }
|
||||
// void CB_Prints_ext( int x, int y, unsigned char *str, int extflag ){
|
||||
// unsigned int c=*str;
|
||||
// int i;
|
||||
// int px,py;
|
||||
// px=(x-1)*18; py=(y-1)*24;
|
||||
// CB_Prints2( px, py, str, extflag );
|
||||
// }
|
||||
|
||||
void CB_PrintC( int x, int y,const unsigned char *c ){
|
||||
CB_PrintC_ext( x, y, c, 0 );
|
||||
|
|
Loading…
Reference in New Issue