mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-06 01:10:23 +00:00
Use LONG array instead of INTEGER
This commit is contained in:
parent
60a448fb54
commit
290081ddb6
|
@ -1388,7 +1388,7 @@ void sub__UPrintString(int32_t start_x, int32_t start_y, const qbs *text, int32_
|
|||
/// @brief Calculate the starting pixel positions of each chancter to an array. First one being zero.
|
||||
/// This also calculates the pixel position of the last + 1 character.
|
||||
/// @param text Text for which the data needs to be calculated. This can be unicode encoded
|
||||
/// @param arr A QB64 array. This should be codepoints + 1 long. If the array is shorter additional calculated data is ignored
|
||||
/// @param arr A QB64 LONG array. This should be codepoints + 1 long. If the array is shorter additional calculated data is ignored
|
||||
/// @param utf_encoding The UTF encoding of the text (0 = ASCII, 8 = UTF-8, 16 - UTF-16, 32 = UTF-32)
|
||||
/// @param qb64_fh A QB64 font handle (this can be a builtin font as well)
|
||||
/// @param passed Optional arguments flag
|
||||
|
@ -1458,8 +1458,8 @@ int32_t func__UCharPos(const qbs *text, void *arr, int32_t utf_encoding, int32_t
|
|||
if (!arr || !codepoints)
|
||||
return codepoints;
|
||||
|
||||
auto element = (uint16_t *)((byte_element_struct *)arr)->offset;
|
||||
auto elements = ((byte_element_struct *)arr)->length / sizeof(uint16_t);
|
||||
auto element = (uint32_t *)((byte_element_struct *)arr)->offset;
|
||||
auto elements = ((byte_element_struct *)arr)->length / sizeof(uint32_t);
|
||||
FontManager::Font *fnt = nullptr;
|
||||
FT_Pos monospaceWidth;
|
||||
|
||||
|
@ -1509,7 +1509,7 @@ int32_t func__UCharPos(const qbs *text, void *arr, int32_t utf_encoding, int32_t
|
|||
}
|
||||
|
||||
penX += glyph->advanceWidth; // add advance width
|
||||
previousGlyph = glyph; // save the current glyph pointer for use later
|
||||
previousGlyph = glyph; // save the current glyph pointer for use later
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16785,7 +16785,7 @@ FUNCTION evaluatefunc$ (a2$, args AS LONG, typ AS LONG)
|
|||
END IF
|
||||
|
||||
' Cannot be one of these
|
||||
IF (sourcetyp AND ISSTRING) OR (sourcetyp AND ISFLOAT) OR (sourcetyp AND ISOFFSET) OR (sourcetyp AND ISUDT) OR (sourcetyp AND 511) <> 16 THEN
|
||||
IF (sourcetyp AND ISSTRING) OR (sourcetyp AND ISFLOAT) OR (sourcetyp AND ISOFFSET) OR (sourcetyp AND ISUDT) OR (sourcetyp AND 511) <> 32 THEN
|
||||
Give_Error "Expected INTEGER array-name"
|
||||
EXIT FUNCTION
|
||||
END IF
|
||||
|
|
|
@ -1481,10 +1481,10 @@ id.Dependency = DEPENDENCY_LOADFONT
|
|||
id.subfunc = 1
|
||||
id.callname = "func__UCharPos"
|
||||
id.args = 4
|
||||
id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(-1) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
|
||||
id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(-1) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) ' arg 2 has special handling code in evaluatefunc()
|
||||
id.specialformat = "?[,[?][,[?][,?]]]"
|
||||
id.ret = LONGTYPE - ISPOINTER
|
||||
id.hr_syntax = "_UCHARPOS&(text$[, posArray%()][, utfEncoding&][, fontHandle&])"
|
||||
id.hr_syntax = "_UCHARPOS&(text$[, posArray&()][, utfEncoding&][, fontHandle&])"
|
||||
regid
|
||||
|
||||
'WORKING WITH COLORS
|
||||
|
|
Loading…
Reference in a new issue