void YGS2kKanjiFontFinalize() { #if USE_GL_KANJI #elif USE_SDLKANJI if ( s_pKanjiFont[0] ) { Kanji_CloseFont(s_pKanjiFont[0]); } if ( s_pKanjiFont[1] ) { Kanji_CloseFont(s_pKanjiFont[1]); } if ( s_pKanjiFont[2] ) { Kanji_CloseFont(s_pKanjiFont[2]); } #elif USE_PNGKANJI for ( int i = 0 ; i < YGS_KANJIFONT_MAX ; i ++ ) { if ( s_pKanjiSurface[i] ) { SDL_FreeSurface(s_pKanjiSurface[i]); } } #endif }
static VALUE Font_close(VALUE self) { KFont* kfont; kfont = Get_KFont(self); if (kfont->font) Kanji_CloseFont(kfont->font); kfont->font = NULL; return Qnil; }
static void Font_free(KFont* kfont) { if (kfont->font) Kanji_CloseFont(kfont->font); free(kfont); }