mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
Merge pull request #1580 from MyaniPT/patch-1
Updates stblibs (stb_image and stb_truetype)
This commit is contained in:
commit
01ce1c31d1
9 changed files with 9204 additions and 6013 deletions
|
@ -2,7 +2,10 @@
|
|||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
// Defines STB_TRUETYPE_IMPLEMENTATION *once* before including stb_truetype.h (as noted in stb_truetype.h's comments)
|
||||
#define STB_TRUETYPE_IMPLEMENTATION
|
||||
#include "stblib/stb_truetype.h"
|
||||
|
||||
#include "Emu/FS/vfsFile.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());
|
||||
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;
|
||||
|
||||
for (u32 xpos = 0; xpos < (u32)width; xpos++)
|
||||
{
|
||||
if ((u32)x + xpos >= surface->width)
|
||||
if ((u32)x + xpos >= (u32)surface->width)
|
||||
break;
|
||||
|
||||
// TODO: There are some oddities in the position of the character in the final buffer
|
||||
|
|
|
@ -4,10 +4,8 @@
|
|||
#include "Emu/IdManager.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// STB_IMAGE_IMPLEMENTATION is already defined in stb_image.cpp
|
||||
#include "stblib/stb_image.h"
|
||||
}
|
||||
|
||||
#include "Emu/FS/VFS.h"
|
||||
#include "Emu/FS/vfsFileBase.h"
|
||||
|
|
|
@ -4,10 +4,8 @@
|
|||
#include "Emu/IdManager.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// STB_IMAGE_IMPLEMENTATION is already defined in stb_image.cpp
|
||||
#include "stblib/stb_image.h"
|
||||
}
|
||||
|
||||
#include "Emu/FS/VFS.h"
|
||||
#include "Emu/FS/vfsFileBase.h"
|
||||
|
|
|
@ -84,7 +84,6 @@
|
|||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\stblib\stb_image.c" />
|
||||
<ClCompile Include="..\Utilities\AutoPause.cpp" />
|
||||
<ClCompile Include="..\Utilities\config_context.cpp" />
|
||||
<ClCompile Include="..\Utilities\Log.cpp" />
|
||||
|
|
|
@ -1779,9 +1779,6 @@
|
|||
<ClInclude Include="..\stblib\stb_image.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\stblib\stb_image.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\RSX\Common\surface_store.h">
|
||||
<Filter>Emu\GPU\RSX\Common</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#pragma warning(push, 0)
|
||||
// Defines STB_IMAGE_IMPLEMENTATION *once* for stb_image.h includes (Should this be placed somewhere else?)
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "stblib/stb_image.h"
|
||||
#include "stblib/stb_image.c"
|
||||
#pragma warning(pop)
|
||||
}
|
||||
|
|
4401
stblib/stb_image.c
4401
stblib/stb_image.c
File diff suppressed because it is too large
Load diff
6719
stblib/stb_image.h
6719
stblib/stb_image.h
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue