| 1081 | } |
| 1082 | |
| 1083 | bool CreateTextType(tceffect *tce, const char *text) { |
| 1084 | ASSERT(text); |
| 1085 | if (!text || text[0] == '\0') |
| 1086 | return false; |
| 1087 | tce->text_buffer = (char *)mem_malloc(strlen(text) + 10); |
| 1088 | if (!tce->text_buffer) |
| 1089 | return false; |
| 1090 | |
| 1091 | char *tempbuffer = (char *)mem_malloc(strlen(text) + 10); |
| 1092 | if (!tempbuffer) |
| 1093 | return false; |
| 1094 | strcpy(tempbuffer, text); |
| 1095 | |
| 1096 | // apply the word wrap |
| 1097 | textaux_WordWrap(tempbuffer, tce->text_buffer, tce->w, Game_fonts[tce->textinfo.font_index]); |
| 1098 | |
| 1099 | mem_free(tempbuffer); |
| 1100 | |
| 1101 | tce->textinfo.last_letter = 0; |
| 1102 | return true; |
| 1103 | } |
| 1104 | |
| 1105 | bool CreateBmpStatic(tceffect *tce, const char *filename) { |
| 1106 | ASSERT(filename); |
no test coverage detected