mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
TextureBorderColor & cellFont problems fixed
* Fixed tabs/spaces problem in cellSysutil.h too. NOTE: The problem with cellFont (crash on line 604) has been fixed, but for a high price: There is now a huge memory leak when a NULL pointer is passed to cellFontRenderSurfaceInit.
This commit is contained in:
parent
fb38897b8f
commit
2601933bdc
@ -1150,10 +1150,6 @@ void GLGSRender::Flip()
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ONE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
if(m_set_texture_border_color)
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_BORDER_COLOR,(GLint)m_border_color);
|
||||
}
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
|
@ -241,6 +241,10 @@ public:
|
||||
|
||||
checkForGlError("GLTexture::Init() -> filters");
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, (tex.GetBorderColor() << 8) | (tex.GetBorderColor() >> 24));
|
||||
|
||||
checkForGlError("GLTexture::Init() -> border color");
|
||||
|
||||
//Unbind();
|
||||
|
||||
if(is_swizzled && format == CELL_GCM_TEXTURE_A8R8G8B8)
|
||||
|
@ -38,6 +38,9 @@ void RSXTexture::Init()
|
||||
|
||||
// Image Rect
|
||||
methodRegisters[NV4097_SET_TEXTURE_IMAGE_RECT + (m_index*32)] = (/*height*/1) | ((/*width*/1) << 16);
|
||||
|
||||
// Border Color
|
||||
methodRegisters[NV4097_SET_TEXTURE_BORDER_COLOR + (m_index*32)] = 0;
|
||||
}
|
||||
|
||||
u32 RSXTexture::GetOffset() const
|
||||
@ -195,6 +198,11 @@ u16 RSXTexture::GetHeight() const
|
||||
return ((methodRegisters[NV4097_SET_TEXTURE_IMAGE_RECT + (m_index*32)]) & 0xffff);
|
||||
}
|
||||
|
||||
u32 RSXTexture::GetBorderColor() const
|
||||
{
|
||||
return methodRegisters[NV4097_SET_TEXTURE_BORDER_COLOR + (m_index*32)];
|
||||
}
|
||||
|
||||
void RSXTexture::SetControl3(u16 depth, u32 pitch)
|
||||
{
|
||||
m_depth = depth;
|
||||
|
@ -58,5 +58,8 @@ public:
|
||||
u16 GetWidth() const;
|
||||
u16 GetHeight() const;
|
||||
|
||||
// Border Color
|
||||
u32 GetBorderColor() const;
|
||||
|
||||
void SetControl3(u16 depth, u32 pitch);
|
||||
};
|
||||
|
@ -322,12 +322,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
|
||||
}
|
||||
break;
|
||||
|
||||
case NV4097_SET_TEXTURE_BORDER_COLOR:
|
||||
case_16(NV4097_SET_TEXTURE_BORDER_COLOR,0x20):
|
||||
{
|
||||
m_set_texture_border_color = true;
|
||||
u32 tmp = ARGS(0);
|
||||
m_border_color=((tmp & 0x00FFFFFF)<<8)|((tmp & 0xFF000000)>>24);
|
||||
break;
|
||||
}
|
||||
|
||||
case NV4097_SET_SURFACE_FORMAT:
|
||||
|
@ -272,9 +272,6 @@ public:
|
||||
u8 m_blend_color_b;
|
||||
u8 m_blend_color_a;
|
||||
|
||||
bool m_set_texture_border_color;
|
||||
u32 m_border_color;
|
||||
|
||||
u8 m_clear_color_r;
|
||||
u8 m_clear_color_g;
|
||||
u8 m_clear_color_b;
|
||||
@ -403,7 +400,6 @@ protected:
|
||||
{
|
||||
m_set_alpha_test = false;
|
||||
m_set_blend = false;
|
||||
m_set_texture_border_color = false;
|
||||
m_set_depth_bounds_test = false;
|
||||
m_depth_test_enable = false;
|
||||
m_set_logic_op = false;
|
||||
@ -423,8 +419,6 @@ protected:
|
||||
m_clear_z = 0xffffff;
|
||||
m_clear_s = 0;
|
||||
|
||||
m_border_color = 0;
|
||||
|
||||
m_depth_bounds_min = 0.0;
|
||||
m_depth_bounds_max = 1.0;
|
||||
m_restart_index = 0xffffffff;
|
||||
@ -448,7 +442,6 @@ protected:
|
||||
void Reset()
|
||||
{
|
||||
m_set_color_mask = false;
|
||||
m_set_texture_border_color = false;
|
||||
m_set_clip = false;
|
||||
m_set_depth_func = false;
|
||||
m_set_depth_bounds = false;
|
||||
|
@ -459,6 +459,9 @@ void cellFontRenderSurfaceInit(mem_ptr_t<CellFontRenderSurface> surface, u32 buf
|
||||
surface->pixelSizeByte = pixelSizeByte;
|
||||
surface->width = w;
|
||||
surface->height = h;
|
||||
|
||||
if (!buffer_addr)
|
||||
surface->buffer_addr = Memory.Alloc(bufferWidthByte * h, 1); // TODO: Huge memory leak
|
||||
}
|
||||
|
||||
void cellFontRenderSurfaceSetScissor(mem_ptr_t<CellFontRenderSurface> surface, s32 x0, s32 y0, s32 w, s32 h)
|
||||
|
@ -4,54 +4,54 @@
|
||||
enum
|
||||
{
|
||||
// Integers
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_LANG = 0x0111,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN = 0x0112,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_DATE_FORMAT = 0x0114,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_TIME_FORMAT = 0x0115,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_TIMEZONE = 0x0116,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_SUMMERTIME = 0x0117,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL = 0x0121,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL0_RESTRICT = 0x0123,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_CURRENT_USER_HAS_NP_ACCOUNT = 0x0141,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_CAMERA_PLFREQ = 0x0151,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_PAD_RUMBLE = 0x0152,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_KEYBOARD_TYPE = 0x0153,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_JAPANESE_KEYBOARD_ENTRY_METHOD = 0x0154,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_CHINESE_KEYBOARD_ENTRY_METHOD = 0x0155,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_PAD_AUTOOFF = 0x0156,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_LANG = 0x0111,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN = 0x0112,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_DATE_FORMAT = 0x0114,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_TIME_FORMAT = 0x0115,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_TIMEZONE = 0x0116,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_SUMMERTIME = 0x0117,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL = 0x0121,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_GAME_PARENTAL_LEVEL0_RESTRICT = 0x0123,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_CURRENT_USER_HAS_NP_ACCOUNT = 0x0141,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_CAMERA_PLFREQ = 0x0151,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_PAD_RUMBLE = 0x0152,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_KEYBOARD_TYPE = 0x0153,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_JAPANESE_KEYBOARD_ENTRY_METHOD = 0x0154,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_CHINESE_KEYBOARD_ENTRY_METHOD = 0x0155,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_PAD_AUTOOFF = 0x0156,
|
||||
|
||||
// Strings
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_NICKNAME = 0x113,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_CURRENT_USERNAME = 0x131,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_NICKNAME = 0x113,
|
||||
CELL_SYSUTIL_SYSTEMPARAM_ID_CURRENT_USERNAME = 0x131,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_SYSUTIL_LANG_JAPANESE = 0,
|
||||
CELL_SYSUTIL_LANG_ENGLISH_US = 1,
|
||||
CELL_SYSUTIL_LANG_FRENCH = 2,
|
||||
CELL_SYSUTIL_LANG_SPANISH = 3,
|
||||
CELL_SYSUTIL_LANG_GERMAN = 4,
|
||||
CELL_SYSUTIL_LANG_ITALIAN = 5,
|
||||
CELL_SYSUTIL_LANG_DUTCH = 6,
|
||||
CELL_SYSUTIL_LANG_PORTUGUESE_PT = 7,
|
||||
CELL_SYSUTIL_LANG_RUSSIAN = 8,
|
||||
CELL_SYSUTIL_LANG_KOREAN = 9,
|
||||
CELL_SYSUTIL_LANG_CHINESE_T = 10,
|
||||
CELL_SYSUTIL_LANG_CHINESE_S = 11,
|
||||
CELL_SYSUTIL_LANG_FINNISH = 12,
|
||||
CELL_SYSUTIL_LANG_SWEDISH = 13,
|
||||
CELL_SYSUTIL_LANG_DANISH = 14,
|
||||
CELL_SYSUTIL_LANG_NORWEGIAN = 15,
|
||||
CELL_SYSUTIL_LANG_POLISH = 16,
|
||||
CELL_SYSUTIL_LANG_PORTUGUESE_BR = 17,
|
||||
CELL_SYSUTIL_LANG_ENGLISH_GB = 18,
|
||||
CELL_SYSUTIL_LANG_JAPANESE = 0,
|
||||
CELL_SYSUTIL_LANG_ENGLISH_US = 1,
|
||||
CELL_SYSUTIL_LANG_FRENCH = 2,
|
||||
CELL_SYSUTIL_LANG_SPANISH = 3,
|
||||
CELL_SYSUTIL_LANG_GERMAN = 4,
|
||||
CELL_SYSUTIL_LANG_ITALIAN = 5,
|
||||
CELL_SYSUTIL_LANG_DUTCH = 6,
|
||||
CELL_SYSUTIL_LANG_PORTUGUESE_PT = 7,
|
||||
CELL_SYSUTIL_LANG_RUSSIAN = 8,
|
||||
CELL_SYSUTIL_LANG_KOREAN = 9,
|
||||
CELL_SYSUTIL_LANG_CHINESE_T = 10,
|
||||
CELL_SYSUTIL_LANG_CHINESE_S = 11,
|
||||
CELL_SYSUTIL_LANG_FINNISH = 12,
|
||||
CELL_SYSUTIL_LANG_SWEDISH = 13,
|
||||
CELL_SYSUTIL_LANG_DANISH = 14,
|
||||
CELL_SYSUTIL_LANG_NORWEGIAN = 15,
|
||||
CELL_SYSUTIL_LANG_POLISH = 16,
|
||||
CELL_SYSUTIL_LANG_PORTUGUESE_BR = 17,
|
||||
CELL_SYSUTIL_LANG_ENGLISH_GB = 18,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_SYSUTIL_ENTER_BUTTON_ASSIGN_CIRCLE = 0,
|
||||
CELL_SYSUTIL_ENTER_BUTTON_ASSIGN_CROSS = 1,
|
||||
CELL_SYSUTIL_ENTER_BUTTON_ASSIGN_CROSS = 1,
|
||||
};
|
||||
|
||||
enum
|
||||
@ -69,74 +69,74 @@ enum
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_SYSUTIL_GAME_PARENTAL_OFF = 0,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL01 = 1,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL02 = 2,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL03 = 3,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL04 = 4,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL05 = 5,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL06 = 6,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL07 = 7,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL08 = 8,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL09 = 9,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL10 = 10,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL11 = 11,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_OFF = 0,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL01 = 1,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL02 = 2,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL03 = 3,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL04 = 4,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL05 = 5,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL06 = 6,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL07 = 7,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL08 = 8,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL09 = 9,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL10 = 10,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL11 = 11,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL0_RESTRICT_OFF = 0,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL0_RESTRICT_ON = 1,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL0_RESTRICT_OFF = 0,
|
||||
CELL_SYSUTIL_GAME_PARENTAL_LEVEL0_RESTRICT_ON = 1,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_SYSUTIL_CAMERA_PLFREQ_DISABLED = 0,
|
||||
CELL_SYSUTIL_CAMERA_PLFREQ_50HZ = 1,
|
||||
CELL_SYSUTIL_CAMERA_PLFREQ_60HZ = 2,
|
||||
CELL_SYSUTIL_CAMERA_PLFREQ_DEVCIE_DEPEND = 4,
|
||||
CELL_SYSUTIL_CAMERA_PLFREQ_DISABLED = 0,
|
||||
CELL_SYSUTIL_CAMERA_PLFREQ_50HZ = 1,
|
||||
CELL_SYSUTIL_CAMERA_PLFREQ_60HZ = 2,
|
||||
CELL_SYSUTIL_CAMERA_PLFREQ_DEVCIE_DEPEND = 4,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_SYSUTIL_PAD_RUMBLE_OFF = 0,
|
||||
CELL_SYSUTIL_PAD_RUMBLE_ON = 1,
|
||||
CELL_SYSUTIL_PAD_RUMBLE_OFF = 0,
|
||||
CELL_SYSUTIL_PAD_RUMBLE_ON = 1,
|
||||
};
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_MSGDIALOG_BUTTON_NONE = -1,
|
||||
CELL_MSGDIALOG_BUTTON_INVALID = 0,
|
||||
CELL_MSGDIALOG_BUTTON_OK = 1,
|
||||
CELL_MSGDIALOG_BUTTON_YES = 1,
|
||||
CELL_MSGDIALOG_BUTTON_NO = 2,
|
||||
CELL_MSGDIALOG_BUTTON_ESCAPE = 3,
|
||||
CELL_MSGDIALOG_BUTTON_NONE = -1,
|
||||
CELL_MSGDIALOG_BUTTON_INVALID = 0,
|
||||
CELL_MSGDIALOG_BUTTON_OK = 1,
|
||||
CELL_MSGDIALOG_BUTTON_YES = 1,
|
||||
CELL_MSGDIALOG_BUTTON_NO = 2,
|
||||
CELL_MSGDIALOG_BUTTON_ESCAPE = 3,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_SYSCACHE_RET_OK_CLEARED = 0,
|
||||
CELL_SYSCACHE_RET_OK_RELAYED = 1,
|
||||
CELL_SYSCACHE_RET_OK_CLEARED = 0,
|
||||
CELL_SYSCACHE_RET_OK_RELAYED = 1,
|
||||
|
||||
CELL_SYSCACHE_ID_SIZE = 32,
|
||||
CELL_SYSCACHE_PATH_MAX = 1055,
|
||||
CELL_SYSCACHE_ID_SIZE = 32,
|
||||
CELL_SYSCACHE_PATH_MAX = 1055,
|
||||
|
||||
CELL_SYSCACHE_ERROR_ACCESS_ERROR = 0x8002bc01, // I don't think we need this
|
||||
CELL_SYSCACHE_ERROR_INTERNAL = 0x8002bc02, // Not really useful, if we run out of HDD space sys_fs should handle that
|
||||
CELL_SYSCACHE_ERROR_ACCESS_ERROR = 0x8002bc01, // I don't think we need this
|
||||
CELL_SYSCACHE_ERROR_INTERNAL = 0x8002bc02, // Not really useful, if we run out of HDD space sys_fs should handle that
|
||||
|
||||
CELL_SYSCACHE_ERROR_PARAM = 0x8002bc03,
|
||||
CELL_SYSCACHE_ERROR_NOTMOUNTED = 0x8002bc04, // We don't really need to simulate the mounting, so this is probably useless
|
||||
CELL_SYSCACHE_ERROR_PARAM = 0x8002bc03,
|
||||
CELL_SYSCACHE_ERROR_NOTMOUNTED = 0x8002bc04, // We don't really need to simulate the mounting, so this is probably useless
|
||||
};
|
||||
|
||||
enum CellMsgDialogType
|
||||
{
|
||||
CELL_MSGDIALOG_DIALOG_TYPE_ERROR = 0x00000000,
|
||||
CELL_MSGDIALOG_DIALOG_TYPE_NORMAL = 0x00000001,
|
||||
CELL_MSGDIALOG_DIALOG_TYPE_ERROR = 0x00000000,
|
||||
CELL_MSGDIALOG_DIALOG_TYPE_NORMAL = 0x00000001,
|
||||
|
||||
CELL_MSGDIALOG_BUTTON_TYPE_NONE = 0x00000000,
|
||||
CELL_MSGDIALOG_BUTTON_TYPE_YESNO = 0x00000010,
|
||||
CELL_MSGDIALOG_BUTTON_TYPE_NONE = 0x00000000,
|
||||
CELL_MSGDIALOG_BUTTON_TYPE_YESNO = 0x00000010,
|
||||
|
||||
CELL_MSGDIALOG_DEFAULT_CURSOR_YES = 0x00000000,
|
||||
CELL_MSGDIALOG_DEFAULT_CURSOR_NO = 0x00000100,
|
||||
CELL_MSGDIALOG_DEFAULT_CURSOR_YES = 0x00000000,
|
||||
CELL_MSGDIALOG_DEFAULT_CURSOR_NO = 0x00000100,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user