(PS3) Add preliminary Freetype support for PS3

This commit is contained in:
TwinAphex51224 2012-09-27 18:16:06 +02:00
parent fdd78b08d3
commit 5fad20121f
5 changed files with 50 additions and 4 deletions

View File

@ -12,6 +12,7 @@ STRIPPING_ENABLE = 0
HAVE_RGL = 1 HAVE_RGL = 1
HAVE_RGL_NEW = 1 HAVE_RGL_NEW = 1
HAVE_LOGGER = 0 HAVE_LOGGER = 0
HAVE_FREETYPE = 0
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001 CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
CONTENT_ID = SSNE10000 CONTENT_ID = SSNE10000
@ -70,6 +71,14 @@ ifeq ($(HAVE_RGL_NEW), 1)
GL_LIBS += -lcgc_ps3 GL_LIBS += -lcgc_ps3
endif endif
ifeq ($(HAVE_FREETYPE), 1)
DEFINES += -DHAVE_FREETYPE
FONT_LIBS := -lfontFT_stub -lfreetype_stub
else
DEFINES += -DHAVE_LIBDBGFONT
FONT_LIBS := -ldbgfont
endif
ifeq ($(CELL_BUILD_TOOLS), SNC) ifeq ($(CELL_BUILD_TOOLS), SNC)
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
@ -83,7 +92,7 @@ ifneq($(system_platform), win)
endif endif
PPU_LDLIBS = -ldbgfont $(GL_LIBS) -lretroarch_ps3 -lretro_ps3 -lcgc -lgcm_cmd -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) -lretroarch_ps3 -lretro_ps3 -lcgc -lgcm_cmd -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_PSGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_CG_MENU -DHAVE_FILEBROWSER -DHAVE_HDD_CACHE_PARTITION -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RGL -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_PSGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_CG_MENU -DHAVE_FILEBROWSER -DHAVE_HDD_CACHE_PARTITION -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RGL -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)

View File

@ -9,6 +9,7 @@ CELL_PSGL_VERSION = ultra-opt
DEBUG = 0 DEBUG = 0
HAVE_RGL = 1 HAVE_RGL = 1
HAVE_LOGGER = 0 HAVE_LOGGER = 0
HAVE_FREETYPE = 0
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7" PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
PC_DEVELOPMENT_UDP_PORT = 3490 PC_DEVELOPMENT_UDP_PORT = 3490
@ -36,9 +37,12 @@ PPU_SRCS = console/griffin/griffin.c console/rzlib/rzlib.c
ifeq ($(HAVE_RGL), 1) ifeq ($(HAVE_RGL), 1)
DEFINES = -DHAVE_RGL DEFINES = -DHAVE_RGL
GL_LIBS := -lrgl_ps3 endif
ifeq ($(HAVE_FREETYPE), 1)
DEFINES += -DHAVE_FREETYPE
else else
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc DEFINES += -DHAVE_LIBDBGFONT
endif endif
ifeq ($(CELL_BUILD_TOOLS), SNC) ifeq ($(CELL_BUILD_TOOLS), SNC)

View File

@ -163,7 +163,11 @@ FONTS
============================================================ */ ============================================================ */
#if defined(HAVE_OPENGL) || defined(HAVE_D3D8) || defined(HAVE_D3D9) #if defined(HAVE_OPENGL) || defined(HAVE_D3D8) || defined(HAVE_D3D9)
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#if defined(HAVE_FREETYPE)
#include "../../gfx/fonts/freetype.c"
#include "../../gfx/fonts/fonts.c"
#elif defined(HAVE_LIBDBGFONT)
#include "../../gfx/fonts/ps3_libdbgfont.c" #include "../../gfx/fonts/ps3_libdbgfont.c"
#elif defined(_XBOX1) #elif defined(_XBOX1)
#include "../../gfx/fonts/xdk1_xfonts.c" #include "../../gfx/fonts/xdk1_xfonts.c"
@ -172,6 +176,7 @@ FONTS
#else #else
#include "../../gfx/fonts/null_fonts.c" #include "../../gfx/fonts/null_fonts.c"
#endif #endif
#endif #endif
/*============================================================ /*============================================================

View File

@ -316,3 +316,11 @@ void gl_render_msg(void *data, const char *msg)
#endif #endif
} }
void gl_render_msg_place(void *data, float x, float y, float scale, uint32_t color, const char *msg)
{
/* TODO: Currently a no-op - needs to be implemented for RMenu - text needs to be able to be positioned
arbitrarily
*/
(void)data;
}

View File

@ -234,6 +234,12 @@ int main(int argc, char *argv[])
#endif #endif
#ifdef HAVE_SYSMODULES #ifdef HAVE_SYSMODULES
#ifdef HAVE_FREETYPE
cellSysmoduleLoadModule(CELL_SYSMODULE_FREETYPE);
cellSysmoduleLoadModule(CELL_SYSMODULE_FONT);
#endif
cellSysmoduleLoadModule(CELL_SYSMODULE_IO); cellSysmoduleLoadModule(CELL_SYSMODULE_IO);
cellSysmoduleLoadModule(CELL_SYSMODULE_FS); cellSysmoduleLoadModule(CELL_SYSMODULE_FS);
#ifndef __PSL1GHT__ #ifndef __PSL1GHT__
@ -380,16 +386,30 @@ begin_shutdown:
#endif #endif
#if defined(HAVE_SYSMODULES) #if defined(HAVE_SYSMODULES)
/* Freetype font PRX */
#ifdef HAVE_FREETYPE
cellSysmoduleUnloadModule(CELL_SYSMODULE_FREETYPE);
cellSysmoduleUnloadModule(CELL_SYSMODULE_FONT);
#endif
/* screenshot PRX */
#ifndef __PSL1GHT__ #ifndef __PSL1GHT__
if(g_console.screenshots_enable) if(g_console.screenshots_enable)
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_SCREENSHOT); cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_SCREENSHOT);
#endif #endif
cellSysmoduleUnloadModule(CELL_SYSMODULE_JPGDEC); cellSysmoduleUnloadModule(CELL_SYSMODULE_JPGDEC);
cellSysmoduleUnloadModule(CELL_SYSMODULE_PNGDEC); cellSysmoduleUnloadModule(CELL_SYSMODULE_PNGDEC);
/* system game utility PRX */
#ifndef __PSL1GHT__ #ifndef __PSL1GHT__
cellSysmoduleUnloadModule(CELL_SYSMODULE_AVCONF_EXT); cellSysmoduleUnloadModule(CELL_SYSMODULE_AVCONF_EXT);
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_GAME); cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_GAME);
#endif #endif
#endif #endif
#ifdef HAVE_HDD_CACHE_PARTITION #ifdef HAVE_HDD_CACHE_PARTITION