mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-16 07:20:58 +00:00
Update stb_truetype from 0.7 to 1.09
Updates stb_truetype.h from 0.7 to 1.09 Fixes '>=' signed/unsigned mismatch at cellFont.cpp lines 328 and 333 by making both values unsigned (u32)
This commit is contained in:
parent
8cded28c45
commit
659f3d856a
2 changed files with 2654 additions and 1420 deletions
|
@ -2,7 +2,10 @@
|
||||||
#include "Emu/Memory/Memory.h"
|
#include "Emu/Memory/Memory.h"
|
||||||
#include "Emu/SysCalls/Modules.h"
|
#include "Emu/SysCalls/Modules.h"
|
||||||
|
|
||||||
|
// Defines STB_IMAGE_IMPLEMENTATION *once* before including stb_truetype.h (as said in stb_truetype.h's comments)
|
||||||
|
#define STB_TRUETYPE_IMPLEMENTATION
|
||||||
#include "stblib/stb_truetype.h"
|
#include "stblib/stb_truetype.h"
|
||||||
|
|
||||||
#include "Emu/FS/vfsFile.h"
|
#include "Emu/FS/vfsFile.h"
|
||||||
#include "cellFont.h"
|
#include "cellFont.h"
|
||||||
|
|
||||||
|
@ -325,12 +328,12 @@ s32 cellFontRenderCharGlyphImage(vm::ptr<CellFont> font, u32 code, vm::ptr<CellF
|
||||||
unsigned char* buffer = vm::_ptr<unsigned char>(surface->buffer.addr());
|
unsigned char* buffer = vm::_ptr<unsigned char>(surface->buffer.addr());
|
||||||
for (u32 ypos = 0; ypos < (u32)height; ypos++)
|
for (u32 ypos = 0; ypos < (u32)height; ypos++)
|
||||||
{
|
{
|
||||||
if ((u32)y + ypos + yoff + baseLineY >= surface->height)
|
if ((u32)y + ypos + yoff + baseLineY >= (u32)surface->height)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
for (u32 xpos = 0; xpos < (u32)width; xpos++)
|
for (u32 xpos = 0; xpos < (u32)width; xpos++)
|
||||||
{
|
{
|
||||||
if ((u32)x + xpos >= surface->width)
|
if ((u32)x + xpos >= (u32)surface->width)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// TODO: There are some oddities in the position of the character in the final buffer
|
// TODO: There are some oddities in the position of the character in the final buffer
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue