Commit Graph

28 Commits

Author SHA1 Message Date
wagic.the.homebrew
e27cf56fa2 - Support for Zip Filesystem. It is now possible to zip the entire Res folder ("store" method preferred, zip so that the root of the zip has ai, player, etc...) in one single file for read only. Write access is done in another folder (hardcoded to be User/ for now, can be updated depending on platforms, etc...
-- zipFS has several limitations...
--- in a general way, seekg doesn't work... so getting a file's size needs to be done through JFileSystem.
--- getLine on files open with zipFS doesn't work so great. Not sure if it is a normal issue because files are open in binary or not... JFileSystem therefore offers a "readIntoString" function that needs to be used instead of the usual "getline" technique. However getLine can then be used on a stream connected to the string.

-- tested on Windows and PSP, I also made sure android still works, but haven't tested zip support on Android.
-- I tried to maintain backwards compatibility, but this might break on some platforms, if I broke some platforms and you can't find a way to fix them, please contact me and we'll figure something out
-- This removes wagic::ifstream. I didn't reimplement the securities that were involved in this, apologies for that. Might be useful to reimplement such securities in JFileSystem
-- I haven't tested options/profiles in a deep way, it is possible I broke that.
2011-08-21 09:04:59 +00:00
wrenczes@gmail.com
e82362d50a Missed a part of my psp side change for the ClearScreen change. Now the BeginScene call is consistent with the pc side, and calls clear. 2011-04-24 11:55:04 +00:00
wrenczes@gmail.com
be2a4ee4ec Mostly formatting cleanup, but a couple of openGL related fixes : don't call state change functions if their params haven't changed. In particular, we call ClearScreen() in several places in the code, but BeginScene() already does this. According to several openGL performance guides I skimmed through, if you call clear more than once per frame draw, performance will suffer.
This seems to help with issue r103 - on my win machine, it's substantially better; on psp, not quite as drastic, but it's still better than before.
2011-04-24 10:00:37 +00:00
wrenczes@gmail.com
f2cbd883a6 Apply LF line endings as an SVN property, this time on the JGE source files. 2011-01-28 06:03:52 +00:00
wrenczes@gmail.com
eac6d74ebd Added a couple of null guards against invalid quads / textures in the render() call, with JLOG calls to trace this out if we should hit one of these cases. (Reformatted tabbing in the function while I was there.) 2011-01-11 10:36:15 +00:00
wrenczes
39e6d4f2b5 Reworked some fixes submitted to us by ittobaal. Several fclose calls he suggested had no bearing (if fopen fails, calling fclose on a null pointer is pointless), but the (missing) array deletions were definitely valid bugs. The fix for CreateTexture() was a little loose, so I cleaned it up somewhat.
Issue: 566
2010-12-27 20:00:33 +00:00
wrenczes@gmail.com
2693f35506 Fixed the graphics whiteout bug I introduced when switching profiles. When Refresh() was being called on the texture, the bitmap wasn't been re-transferred back into the openGL context.
While debugging this, I noticed a separate issue:  when changing profiles, we'd actually call refresh twice.  Removed the spurious call, as reloading profiles doesn't need to concern itself with the image cache - that's already covered by the game options menu.

Also did some minor formatting / cleanup in the JGfx code for PSP - stubbed out a bunch of JLOG calls I had put in while debugging the PNG loading code.
2010-12-02 04:04:03 +00:00
wrenczes@gmail.com
8ad597f565 Fixed the swizzle functions for the PNG loading support in JGE. (This is a psp-only fix, it has no impact on the win build.)
This is the main fix for the situation where we try to load PNGs after the image cache has been saturated - instead of requiring 1 Meg as a temporary buffer to perform the swizzle operation on a full image (ie 512 * 512 texture size), these mods allow the swizzle to work in line with a temp buffer of  512 * 8 lines (ie 16K of memory).  I also fixed a case where the swizzle didn't operate correctly on PNGs that weren't an even multiplier height of 8 - we'd drop the remaining lines on the floor, creating garbage lines at the bottom of those images.
2010-11-10 23:50:26 +00:00
wrenczes@gmail.com
eea91e9a1a Two changes here:
1) Consolidated the Loggers so that we only have one in JGE.  Added a helper constructor/destructor to the JLogger class so that you can instantiate one at the top of a function, it'll trace out a 'start' and 'end' message when it goes in & out of scope.
2) Fixed the crash part of a bug I've been chasing down where, on the psp, after saturating the cache, the game dies when trying to reload the background PNG image of the deck menu. We still need to fix the root cause of the failure (not enough memory to allocate a temporary buffer for the swizzle operation), but at least the psp doesn't lock up anymore.  I've also left behind all the log traces I inserted into the LoadPNG code, since we'll probably need them again.
2010-11-10 02:24:39 +00:00
wagic.the.homebrew@gmail.com
5d907f5abe Erwan
- Added a possibility to put a file "Res.txt" instead of the folder "Res". The file Res.txt is a simple 1 line text file, telling where to find the Res folder, terminated by "/". For example: "../../wagic_res".
This addresses issue 428 . This could also help us in the future, to develop mods.
2010-11-07 09:26:29 +00:00
wrenczes@gmail.com
9c982475fe Some minor casting issues that trip up the 0.9.6 pspsdk when compiling. 2010-10-06 09:22:44 +00:00
wagic.the.homebrew@gmail.com
0149512412 Erwan
- fixed bugs introduced in revision 2034 (Giant Growth)
- Extended Story mode xml: much easier to write basic thing, font selection, possibility to position answers, answers now in correct order
- moved story in the menu because it is not major for now
2010-05-06 13:47:56 +00:00
wagic.the.homebrew@gmail.com
afc08b4b6e Erwan
- fix issue 92 (purple screen). Many thanks to Yeshua and Raphael!
- Switched valloc to vram, more recent and faster.
2009-12-07 11:54:59 +00:00
wagic.the.homebrew@gmail.com
ca6f507d0a Erwan
- putting valloc.c back in the project as some persons have problem using/finding the valloc library
2009-12-06 12:38:23 +00:00
wagic.the.homebrew@gmail.com
73661a58d7 Erwan
- [PSP] pressing START + TRIANGLE on the PSP will attempt to reset the GU. If/when you get the purple screen, try to press start+triangle in the main menu and let me know if it changes something
2009-12-04 03:44:47 +00:00
wagic.the.homebrew@gmail.com
e94bb52e35 Erwan
- adding some debugging stuff for the purple screen
2009-12-03 07:17:36 +00:00
wagic.the.homebrew@gmail.com
b2d0940c5b Erwan
-adding Yeshua's code to record some GU values after init
2009-12-01 12:52:56 +00:00
wagic.the.homebrew@gmail.com
888edfd5b8 Erwan
-more JGE cleanup
-removed calls to BindTexture that were made out of the Render methods. Please let me know if this has side effects (and let's discuss it in that case)
-Still no luck with the purple screen bug :(
2009-10-03 08:50:44 +00:00
wagic.the.homebrew@gmail.com
924574b0a1 Erwan
- Some cleanup in JGE
2009-10-02 14:33:05 +00:00
wagic.the.homebrew@gmail.com
ae93341a98 Erwan
- Stop calling the PNG Loading routine if not a .png file
2009-09-21 03:58:19 +00:00
wagic.the.homebrew@gmail.com
62f6b92332 Erwan
- Zip file support for card pictures
- TODO : linux, update JGFX.cpp for zip support
- TODO : make sure there is no leak in the PSP version
2009-05-10 11:10:53 +00:00
wagic.the.homebrew@gmail.com
c6b1027762 Erwan
- put Swizzling back!
2009-04-10 11:25:22 +00:00
wagic.the.homebrew@gmail.com
387c75e16d Erwan
-Improved JGE texture loading, improved Wagic cache
- Jge small changes in mp3 methods
2009-04-09 13:31:07 +00:00
jean.chalard
7c0c199175 J :
* Some resource path cleaning.
* A little bugfix.
2009-01-01 23:26:36 +00:00
jean.chalard
31a2202036 J :
* Fix a warning.
2008-11-21 12:43:20 +00:00
wagic.the.homebrew
37220f9e24 Erwan
- fixed a few warnings with the PSP compilation
- changed definition of DWORD to unsinged int rather than unsigned long for PSP
- fixed make 3xx. the call to "which" in the makefile still needs to be corrected with a DOS compatible call
2008-11-10 11:07:33 +00:00
jean.chalard
ddf04e14e8 J :
* Update for linux support.
2008-11-05 13:38:39 +00:00
wagic.the.homebrew
d45e3b101b 2008-11-02 09:50:16 +00:00