Sacha
cd20288d99
Fix some compiler warnings.
2014-07-17 00:49:58 +10:00
Henrik Rydgard
d6b51d4dfa
Reduce some excessive logging
2014-06-09 19:40:05 +02:00
Unknown W. Brackets
917af7b571
Fix some memory leaks in sceFont.
...
Which were highlighted quite well by tests.
2014-03-30 12:55:40 -07:00
Unknown W. Brackets
0af153efb4
Avoid a crash with a huge user memory font size.
...
Fixes tests.
2014-03-29 19:39:10 -07:00
Unknown W. Brackets
c0392e10be
Properly fail loading state when fonts don't match.
...
It should fail later anyway, but this will prevent crashes just in case.
2014-03-23 13:03:33 -07:00
Unknown W. Brackets
68affb4a54
Reduce log level of some tested sceFont funcs.
2014-03-15 17:23:08 -07:00
Unknown W. Brackets
05ab192c9c
Reduce includes in Core/HLE/.
...
Especially templates.
2014-03-15 11:22:19 -07:00
lioncash
b9886942a7
Fix some vertical alignments in misc Core source files.
2014-03-03 11:16:53 -05:00
Unknown W. Brackets
1b5e54abb4
Fix nearest size check in optimum, cleanup.
2014-03-01 02:23:56 -08:00
Unknown W. Brackets
58e29062a5
Improve error checking in sceFontGetNumFontList().
2014-03-01 01:54:15 -08:00
Unknown W. Brackets
160d5e3279
Fix sceFontGetFontList() error codes.
2014-03-01 01:47:35 -08:00
Unknown W. Brackets
140982223a
Correct sceFontGetFontInfoByIndexNumber().
...
It just gets font style info, pretty simple.
2014-03-01 01:30:43 -08:00
Unknown W. Brackets
0e39b6fe36
Fix results of sceFontGetFontInfo() for user fonts.
2014-03-01 01:30:25 -08:00
Unknown W. Brackets
131cbc073c
Implement sceFontGetShadowInfo().
2014-03-01 00:18:19 -08:00
Unknown W. Brackets
29d2e81676
Cleanup errors in sceFontGet*ImageRect().
2014-02-28 23:04:34 -08:00
Unknown W. Brackets
96a93d9bae
Fix error handling in sceFontPointToPixelH()/etc.
2014-02-28 22:05:37 -08:00
Unknown W. Brackets
57e64547b3
Fix sceFontSetResolution() error codes.
2014-02-28 21:52:34 -08:00
Unknown W. Brackets
67fcdc0f4a
Reflect font altCharCode in psp mem for tests.
...
Makes it easier to be sure it's working right. Not completely impossible
a game will check it... but hopefully not.
2014-02-28 21:31:02 -08:00
Unknown W. Brackets
692cffffd1
Use the correct default for font altCharCode.
2014-02-28 21:20:06 -08:00
Unknown W. Brackets
46370e2860
Implement sceFontGetShadowGlyphImage().
...
Not sure if any games actually use it, though...
2014-02-28 20:57:18 -08:00
Unknown W. Brackets
4a1c9645e8
Get rid of Memory::GetStruct(), use PSPPointer.
2014-02-27 00:28:57 -08:00
Unknown W. Brackets
ab6b998710
Correct clipping in sceFontGetCharGlyphImage_Clip.
...
It was not clipping completely, and didn't handle negative clip w/h.
Also, reduce to debug log (seems to work fine now and has been working
fine in most games.)
2014-02-27 00:19:40 -08:00
Unknown W. Brackets
e0258bf347
Match sceFindFont*() behavior much more accurately.
...
Per tests. Fixes bad font selection in Fieldrunners.
2014-02-25 08:16:10 -08:00
Unknown W. Brackets
db4e4c1c32
Improve sceFontFindFont() errors.
2014-02-25 00:43:24 -08:00
Unknown W. Brackets
0e1dd5cb33
Improve error codes in sceFontFindOptimumFont().
2014-02-24 23:42:22 -08:00
Unknown W. Brackets
7298133c9a
Allow open fonts in a few more calls.
...
It turns out if you open the same internal font twice, they both work
until you close both of them (it's reference counted, but the font handles
are different.)
Anyway, these funcs seem to crash on a PSP when used with a non-open font
so there's not a ton of risk here.
2014-02-23 11:48:31 -08:00
Unknown W. Brackets
e0d8fc5596
Pass in the font open mode for easier tracking.
...
Mostly concerned about handlers actually doing something...
2014-02-22 23:04:46 -08:00
Unknown W. Brackets
603c1dd614
Improve error codes in sceFontOpen*().
...
Fixes some unlikely cases of crashes as well. I think there are leaks
here...
2014-02-22 20:35:58 -08:00
Unknown W. Brackets
6c34439e03
Populate the native font lib struct.
...
For now, this makes things a lot easier to compare (getting as much info
as possible out of these structs.)
2014-02-22 15:34:07 -08:00
Unknown W. Brackets
7ff6a2d738
Return an error on font allocation failure.
...
Some game might actually expect this code, you never know...
2014-02-22 15:34:07 -08:00
Unknown W. Brackets
ba1f862c85
Allocate the right amount of font memory.
...
But it should be in multiple blocks...
2014-02-22 15:34:06 -08:00
Unknown W. Brackets
afb188956f
Cleanup sceFontNewLib() parameter handling.
...
It should error out without alloc/free funcs, and cap numFonts to 9, per
tests. Most games pass these and use numFonts = 4.
2014-02-22 15:34:06 -08:00
kaienfr
d6a71355d7
Load game's user font file (.pgf) from game's image.
...
Especially support some chinese psp games which use their own fonts zh_gb.pgf from image.
2014-02-12 11:05:03 +01:00
Henrik Rydgård
79ff2f0ba8
Start untangling our include mess a little.
2013-12-29 23:34:45 +01:00
Lioncash
19dee283f2
Access font after the null check in sceFontGetCharImageRect, not before.
2013-12-27 11:42:14 -05:00
Unknown W. Brackets
916768d938
Kill the "packagedFont" hack, correctly fixed now.
2013-12-10 23:19:25 -08:00
Unknown W. Brackets
0636a65ad9
Use ReadEntireFile() a few more places.
...
This fixes one or two minor memory leaks.
2013-12-08 12:02:37 -08:00
Unknown W. Brackets
8f6315e375
Support replacement chars in sceFontGetCharInfo().
2013-11-16 23:32:13 -08:00
raven02
98cbd90178
Regression font alignment fix
2013-11-02 20:31:39 +08:00
Unknown W. Brackets
1d14915d87
Fix a string pointer comparison.
2013-10-30 08:14:43 -07:00
raven02
92042e6b55
Apply offset by 1px to our provided PSP fonts
2013-10-27 10:02:13 +08:00
Unknown W. Brackets
87781736c4
Use ms0:/PSP/flash0/font/ as an override for fonts.
...
This won't work for games that use flash0:/ directly, but if they just use
the default fonts (which is common), it will work fine.
2013-10-12 16:13:11 -07:00
Unknown W. Brackets
50e9e45d65
Check version in each DoState() func.
...
They bail on PointerWrap error or bad version.
2013-09-14 20:23:03 -07:00
Henrik Rydgard
8c88dff5a4
More log categories, use them (and existing ones). Improve log config.
2013-09-07 22:02:55 +02:00
Henrik Rydgard
cb076d1e6f
Update some log levels in sceFont
2013-08-16 16:49:52 +02:00
Unknown W. Brackets
0b5bdeb1d3
Fix some compile failures under big endian.
2013-07-28 21:04:17 -07:00
Unknown W. Brackets
5e87d6e45d
Add _le typedefs to font handling stuff.
2013-07-25 08:04:36 -07:00
Unknown W. Brackets
ded3fb5e12
Add reporting to a bunch of unimpl functions.
...
Also some comment/logging fixes along the way.
2013-05-19 22:12:37 -07:00
Unknown W. Brackets
7dade9416c
Correctly call alloc/free font callbacks.
2013-05-10 22:06:50 -07:00
Unknown W. Brackets
7741376a38
Check a potential crash in sceFontOpen().
2013-05-05 21:29:41 -07:00