Initial commit. Not even a game yet :P
[cToan.git] / tests / fontsurface / main.cpp
blob3635b376839d818ad8c65fdbc19cc0e1409be042
1 #include "SDLWrap_SDLEngine.hpp"
2 #include "SDLWrap_Display.hpp"
3 #include "SDLWrap_Font.hpp"
4 #include "SDLWrap_FontSurface.hpp"
5 #include "SDLWrap_Color.hpp"
6 #include "boost/shared_ptr.hpp"
7 #include <iostream>
8 using namespace SDLWrap;
10 int
11 main()
13 SDLEngine engine(SDLEngine::EVERYTHING);
14 Display screen(640, 480, 0, Display::SWSURFACE);
15 Font_SPtr philosopher(new Font("philosopher.ttf", 22));
16 Color aquablue(0, 192, 192);
17 FontSurface some_text("Finally xD", philosopher, aquablue);
18 some_text.RenderTextSolid();
19 some_text.Blit(screen);
20 screen.Flip();
21 SDL_Delay(2000);
22 std::cout << "shared_ptr::refcount=" << philosopher.use_count() << '\n';
23 return 6;