| 5212 | } |
| 5213 | |
| 5214 | Entity* TextSourceScript::createScriptEntityInMapGen(int x, int y, const char* text) |
| 5215 | { |
| 5216 | Entity* scriptEntity = newEntity(132, 1, map.entities, nullptr); // text script |
| 5217 | setSpriteAttributes(scriptEntity, nullptr, nullptr); |
| 5218 | scriptEntity->x = x * 16.0; |
| 5219 | scriptEntity->y = y * 16.0; |
| 5220 | scriptEntity->textSourceDelay = 1; |
| 5221 | |
| 5222 | if ( text ) |
| 5223 | { |
| 5224 | addScriptToTextSource(*scriptEntity, text); |
| 5225 | } |
| 5226 | |
| 5227 | return scriptEntity; |
| 5228 | } |
| 5229 | |
| 5230 | void TextSourceScript::addScriptToTextSource(Entity& src, const char* text) |
| 5231 | { |
no test coverage detected