-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
29 lines (22 loc) · 1.14 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "bn_core.h"
#include "bn_math.h"
#include "bn_sprite_ptr.h"
#include "bn_sprite_text_generator.h"
#include "common_variable_8x16_sprite_font.h"
#include "common_cn_variable_16x16_sprite_font.h"
#include "common_jp_variable_16x16_sprite_font.h"
#define MAX_SPRITES 32
int main()
{
bn::core::init();
bn::sprite_text_generator *text_en_generator = new bn::sprite_text_generator(common::variable_8x16_sprite_font);
bn::vector<bn::sprite_ptr, MAX_SPRITES> text_en_sprites = text_en_generator->generate<MAX_SPRITES>(-120, -64, "This is an English text.");
bn::sprite_text_generator *text_cn_generator = new bn::sprite_text_generator(common::cn::variable_16x16_sprite_font);
bn::vector<bn::sprite_ptr, MAX_SPRITES> text_cn_sprites = text_cn_generator->generate<MAX_SPRITES>(-120, -48, "这是一段中文文本。");
bn::sprite_text_generator *text_jp_generator = new bn::sprite_text_generator(common::jp::variable_16x16_sprite_font);
bn::vector<bn::sprite_ptr, MAX_SPRITES> text_jp_sprites = text_jp_generator->generate<MAX_SPRITES>(-120, -32, "日本語文字列です!");
while(true)
{
bn::core::update();
}
}