Clarify textObjectAdd param

This commit is contained in:
Alexander Batalov 2023-01-05 04:06:18 +03:00
parent 66955f893a
commit 7496afa4f8
2 changed files with 6 additions and 6 deletions

View File

@ -153,7 +153,7 @@ void textObjectsSetLineDelay(double value)
// text_object_create
// 0x4B036C
int textObjectAdd(Object* object, char* string, int font, int color, int a5, Rect* rect)
int textObjectAdd(Object* object, char* string, int font, int color, int outlineColor, Rect* rect)
{
if (!gTextObjectsInitialized) {
return -1;
@ -214,7 +214,7 @@ int textObjectAdd(Object* object, char* string, int font, int color, int a5, Rec
textObject->height = (fontGetLineHeight() + 1) * textObject->linesCount;
if (a5 != -1) {
if (outlineColor != -1) {
textObject->width += 2;
textObject->height += 2;
}
@ -231,7 +231,7 @@ int textObjectAdd(Object* object, char* string, int font, int color, int a5, Rec
unsigned char* dest = textObject->data;
int skip = textObject->width * (fontGetLineHeight() + 1);
if (a5 != -1) {
if (outlineColor != -1) {
dest += textObject->width;
}
@ -253,8 +253,8 @@ int textObjectAdd(Object* object, char* string, int font, int color, int a5, Rec
dest += skip;
}
if (a5 != -1) {
bufferOutline(textObject->data, textObject->width, textObject->height, textObject->width, a5);
if (outlineColor != -1) {
bufferOutline(textObject->data, textObject->width, textObject->height, textObject->width, outlineColor);
}
if (object != NULL) {

View File

@ -13,7 +13,7 @@ void textObjectsDisable();
void textObjectsEnable();
void textObjectsSetBaseDelay(double value);
void textObjectsSetLineDelay(double value);
int textObjectAdd(Object* object, char* string, int font, int color, int a5, Rect* rect);
int textObjectAdd(Object* object, char* string, int font, int color, int outlineColor, Rect* rect);
void textObjectsRenderInRect(Rect* rect);
int textObjectsGetCount();
void textObjectsRemoveByOwner(Object* object);