38 AscSprite *sprite = (AscSprite*) node; |
38 AscSprite *sprite = (AscSprite*) node; |
39 AscText *text = (AscText*) node; |
39 AscText *text = (AscText*) node; |
40 |
40 |
41 // Render text onto a surface |
41 // Render text onto a surface |
42 TTF_Font *font = asc_font_load(text->font); |
42 TTF_Font *font = asc_font_load(text->font); |
|
43 if (font == NULL) return; |
43 static int alignments[] = { |
44 static int alignments[] = { |
44 TTF_WRAPPED_ALIGN_LEFT, |
45 TTF_WRAPPED_ALIGN_LEFT, |
45 TTF_WRAPPED_ALIGN_CENTER, |
46 TTF_WRAPPED_ALIGN_CENTER, |
46 TTF_WRAPPED_ALIGN_RIGHT |
47 TTF_WRAPPED_ALIGN_RIGHT |
47 }; |
48 }; |