• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 96  文章 - 255  trackbacks - 0
            <2010年6月>
            303112345
            6789101112
            13141516171819
            20212223242526
            27282930123
            45678910

            E-mail:zbln426@163.com QQ:85132383 長期尋找對戰略游戲感興趣的合作伙伴。

            常用鏈接

            留言簿(21)

            隨筆分類

            隨筆檔案

            SDL相關網站

            我的個人網頁

            我的小游戲

            資源下載

            搜索

            •  

            積分與排名

            • 積分 - 494276
            • 排名 - 39

            最新評論

            閱讀排行榜

            評論排行榜

            Windows only. Linux needn't.

            //UVi Soft ( 2008 )
            //Long Fei ( lf426 ), E-mail: zbln426@163.com
            //Laboratory of ZaiBieLiunNian
            //http://www.shnenglu.com/lf426/

            //FileName: SDL_render_Chinese.h
            //For Windows only

            #ifndef RENDER_CHINESE_H
            #define RENDER_CHINESE_H

            #include 
            "gb2312_to_Unicode.h"
            #include 
            "SDL/SDL_ttf.h"

            SDL_Surface
            * myTTF_RenderString_Blended(TTF_Font* font, const std::string& str, SDL_Color fg);
            SDL_Surface
            * myTTF_RenderString_Solid(TTF_Font* font, const std::string& str, SDL_Color fg);
            SDL_Surface
            * myTTF_RenderString_Shaded(TTF_Font* font, const std::string& str, SDL_Color fg, SDL_Color bg);

            #endif

            //UVi Soft ( 2008 )
            //Long Fei ( lf426 ), E-mail: zbln426@163.com
            //Laboratory of ZaiBieLiunNian
            //http://www.shnenglu.com/lf426/

            //FileName: SDL_render_Chinese.cpp
            //For Windows only

            #include 
            "SDL_render_Chinese.h"

            SDL_Surface
            * myTTF_RenderString_Blended(TTF_Font* font, const std::string& str, SDL_Color fg)
            {
                SDL_Surface
            * textbuf;
                
            //Get Unicode
                std::vector<Uint16> unicodeUnit;
                
            if ( getUnicode(str, unicodeUnit) == false )
                    
            return 0;
                
            int arraySize = unicodeUnit.size();
                Uint16
            * perOne = new Uint16[arraySize+1];
                
            for ( int i = 0; i < arraySize; i++ )
                    perOne[i] 
            = unicodeUnit[i];
                perOne[arraySize] 
            = 0;

                
                
            //Render the new text
                textbuf = TTF_RenderUNICODE_Blended(font, perOne, fg);

                
            //Free the text buffer and return
                delete [] perOne;
                
            return textbuf;
            }

            SDL_Surface
            * myTTF_RenderString_Solid(TTF_Font* font, const std::string& str, SDL_Color fg)
            {
                SDL_Surface
            * textbuf;
                
            //Get Unicode
                std::vector<Uint16> unicodeUnit;
                
            if ( getUnicode(str, unicodeUnit) == false )
                    
            return 0;
                
            int arraySize = unicodeUnit.size();
                Uint16
            * perOne = new Uint16[arraySize+1];
                
            for ( int i = 0; i < arraySize; i++ )
                    perOne[i] 
            = unicodeUnit[i];
                perOne[arraySize] 
            = 0;

                
                
            //Render the new text
                textbuf = TTF_RenderUNICODE_Solid(font, perOne, fg);

                
            //Free the text buffer and return
                delete [] perOne;
                
            return textbuf;
            }

            SDL_Surface
            * myTTF_RenderString_Shaded(TTF_Font* font, const std::string& str, SDL_Color fg, SDL_Color bg)
            {
                SDL_Surface
            * textbuf;
                
            //Get Unicode
                std::vector<Uint16> unicodeUnit;
                
            if ( getUnicode(str, unicodeUnit) == false )
                    
            return 0;
                
            int arraySize = unicodeUnit.size();
                Uint16
            * perOne = new Uint16[arraySize+1];
                
            for ( int i = 0; i < arraySize; i++ )
                    perOne[i] 
            = unicodeUnit[i];
                perOne[arraySize] 
            = 0;

                
                
            //Render the new text
                textbuf = TTF_RenderUNICODE_Shaded(font, perOne, fg, bg);

                
            //Free the text buffer and return
                delete [] perOne;
                
            return textbuf;
            }

            lib: iconv.lib
                 SDL_ttf.lib
                 SDL.lib, SDLmain.lib

            dll: iconv.dll
                 SDL_ttf.dll, libfreetype-6.dll, zlib1.dll
                 SDL.dll

            last update: 2008-05-12
            posted on 2008-04-14 13:24 lf426 閱讀(1533) 評論(0)  編輯 收藏 引用 所屬分類: mySDL_GameEngine
            国产成人无码精品久久久性色 | 久久亚洲精品成人无码网站| 午夜福利91久久福利| 欧美亚洲另类久久综合婷婷 | 久久国产精品一国产精品金尊| 色8久久人人97超碰香蕉987| 久久久精品一区二区三区| 中文字幕精品无码久久久久久3D日动漫| 亚洲午夜无码AV毛片久久| 99久久99这里只有免费费精品| 品成人欧美大片久久国产欧美 | www久久久天天com| 久久受www免费人成_看片中文| 亚洲国产精久久久久久久| 人妻无码αv中文字幕久久琪琪布| 久久香蕉国产线看观看乱码| 性高湖久久久久久久久| 久久九九久精品国产| 性高湖久久久久久久久| 久久99精品久久久久婷婷| 91久久香蕉国产熟女线看| 久久99国产乱子伦精品免费| 亚洲а∨天堂久久精品9966| 久久99国产乱子伦精品免费| 亚洲精品国产自在久久| 久久国产香蕉一区精品| 久久er99热精品一区二区| 久久人与动人物a级毛片| 97久久精品人人澡人人爽| 久久久婷婷五月亚洲97号色| 热RE99久久精品国产66热| 久久久久一本毛久久久| 久久亚洲AV成人无码国产| 99久久国产主播综合精品| 色欲av伊人久久大香线蕉影院| 中文字幕精品久久| 亚洲国产二区三区久久| 99久久99久久精品国产片| 99精品国产综合久久久久五月天| 久久综合九色综合欧美就去吻| 精品久久久久久无码人妻热|