49
49
tilenr = c - ' ' + FONT_ASCII_UPPERCASE;
51
51
tilenr = c - 'a' + FONT_ASCII_LOWERCASE;
52
fn_texture_blit_to_sdl_surface(
52
fn_texture_clone_to_texture(
53
53
fn_environment_get_tile(env, tilenr),
59
59
/* --------------------------------------------------------------- */
61
61
void fn_text_print(
64
64
fn_environment_t * env,
73
memcpy(&dstrect, r, sizeof(SDL_Rect));
73
dstrect = fn_geometry_clone(r);
75
dstrect = fn_geometry_new(0, 0, 0, 0);
78
77
Uint8 pixelsize = fn_environment_get_pixelsize(env);
79
dstrect.w = pixelsize * FN_FONT_WIDTH;
80
dstrect.h = pixelsize * FN_FONT_HEIGHT;
79
fn_geometry_set_width(dstrect, pixelsize * FN_FONT_WIDTH);
80
fn_geometry_set_height(dstrect, pixelsize * FN_FONT_HEIGHT);
82
82
end = text + strlen(text);
84
84
for (walker = text; walker < end; walker++) {
85
85
if (*walker == '\n') {
87
dstrect.y += pixelsize * FN_FONT_HEIGHT;
86
fn_geometry_set_x(dstrect, fn_geometry_get_x(r));
87
gint y = fn_geometry_get_y(dstrect);
88
fn_geometry_set_y(dstrect, y + pixelsize * FN_FONT_HEIGHT);
89
fn_text_printletter(target,
93
dstrect.x += pixelsize * FN_FONT_WIDTH;
95
gint x = fn_geometry_get_x(dstrect);
96
fn_geometry_set_x(dstrect, x + pixelsize * FN_FONT_WIDTH);
99
g_object_unref(dstrect);
98
102
/* --------------------------------------------------------------- */