└── jge ├── JGE ├── Dependencies │ └── include │ │ ├── fmod.h │ │ ├── fmod_errors.h │ │ ├── fmoddyn.h │ │ ├── freetype │ │ ├── cache │ │ │ ├── ftccache.h │ │ │ ├── ftccmap.h │ │ │ ├── ftcglyph.h │ │ │ ├── ftcimage.h │ │ │ ├── ftcmanag.h │ │ │ ├── ftcmru.h │ │ │ └── ftcsbits.h │ │ ├── config │ │ │ ├── ftconfig.h │ │ │ ├── ftheader.h │ │ │ ├── ftmodule.h │ │ │ ├── ftoption.h │ │ │ └── ftstdlib.h │ │ ├── freetype.h │ │ ├── ftbbox.h │ │ ├── ftbdf.h │ │ ├── ftcache.h │ │ ├── ftchapters.h │ │ ├── fterrdef.h │ │ ├── fterrors.h │ │ ├── ftglyph.h │ │ ├── ftgzip.h │ │ ├── ftimage.h │ │ ├── ftincrem.h │ │ ├── ftlist.h │ │ ├── ftlzw.h │ │ ├── ftmac.h │ │ ├── ftmm.h │ │ ├── ftmodapi.h │ │ ├── ftmoderr.h │ │ ├── ftoutln.h │ │ ├── ftpfr.h │ │ ├── ftrender.h │ │ ├── ftsizes.h │ │ ├── ftsnames.h │ │ ├── ftstroke.h │ │ ├── ftsynth.h │ │ ├── ftsysio.h │ │ ├── ftsysmem.h │ │ ├── ftsystem.h │ │ ├── fttrigon.h │ │ ├── fttypes.h │ │ ├── ftwinfnt.h │ │ ├── ftxf86.h │ │ ├── internal │ │ │ ├── autohint.h │ │ │ ├── ftcalc.h │ │ │ ├── ftdebug.h │ │ │ ├── ftdriver.h │ │ │ ├── ftgloadr.h │ │ │ ├── ftmemory.h │ │ │ ├── ftobjs.h │ │ │ ├── ftrfork.h │ │ │ ├── ftserv.h │ │ │ ├── ftstream.h │ │ │ ├── fttrace.h │ │ │ ├── internal.h │ │ │ ├── pcftypes.h │ │ │ ├── psaux.h │ │ │ ├── pshints.h │ │ │ ├── services │ │ │ │ ├── svbdf.h │ │ │ │ ├── svgldict.h │ │ │ │ ├── svmm.h │ │ │ │ ├── svpfr.h │ │ │ │ ├── svpostnm.h │ │ │ │ ├── svpscmap.h │ │ │ │ ├── svpsinfo.h │ │ │ │ ├── svsfnt.h │ │ │ │ ├── svttcmap.h │ │ │ │ ├── svwinfnt.h │ │ │ │ └── svxf86nm.h │ │ │ ├── sfnt.h │ │ │ ├── t1types.h │ │ │ └── tttypes.h │ │ ├── t1tables.h │ │ ├── ttnameid.h │ │ ├── tttables.h │ │ ├── tttags.h │ │ └── ttunpat.h │ │ ├── freetype2 │ │ └── freetype │ │ │ ├── cache │ │ │ ├── ftccache.h │ │ │ ├── ftccmap.h │ │ │ ├── ftcglyph.h │ │ │ ├── ftcimage.h │ │ │ ├── ftcmanag.h │ │ │ ├── ftcmru.h │ │ │ └── ftcsbits.h │ │ │ ├── config │ │ │ ├── ftconfig.h │ │ │ ├── ftheader.h │ │ │ ├── ftmodule.h │ │ │ ├── ftoption.h │ │ │ └── ftstdlib.h │ │ │ ├── freetype.h │ │ │ ├── ftbbox.h │ │ │ ├── ftbdf.h │ │ │ ├── ftbitmap.h │ │ │ ├── ftcache.h │ │ │ ├── ftchapters.h │ │ │ ├── fterrdef.h │ │ │ ├── fterrors.h │ │ │ ├── ftglyph.h │ │ │ ├── ftgzip.h │ │ │ ├── ftimage.h │ │ │ ├── ftincrem.h │ │ │ ├── ftlist.h │ │ │ ├── ftlzw.h │ │ │ ├── ftmac.h │ │ │ ├── ftmm.h │ │ │ ├── ftmodapi.h │ │ │ ├── ftmoderr.h │ │ │ ├── ftotval.h │ │ │ ├── ftoutln.h │ │ │ ├── ftpfr.h │ │ │ ├── ftrender.h │ │ │ ├── ftsizes.h │ │ │ ├── ftsnames.h │ │ │ ├── ftstroke.h │ │ │ ├── ftsynth.h │ │ │ ├── ftsysio.h │ │ │ ├── ftsysmem.h │ │ │ ├── ftsystem.h │ │ │ ├── fttrigon.h │ │ │ ├── fttypes.h │ │ │ ├── ftwinfnt.h │ │ │ ├── ftxf86.h │ │ │ ├── internal │ │ │ ├── autohint.h │ │ │ ├── ftcalc.h │ │ │ ├── ftdebug.h │ │ │ ├── ftdriver.h │ │ │ ├── ftgloadr.h │ │ │ ├── ftmemory.h │ │ │ ├── ftobjs.h │ │ │ ├── ftrfork.h │ │ │ ├── ftserv.h │ │ │ ├── ftstream.h │ │ │ ├── fttrace.h │ │ │ ├── ftvalid.h │ │ │ ├── internal.h │ │ │ ├── pcftypes.h │ │ │ ├── psaux.h │ │ │ ├── pshints.h │ │ │ ├── sfnt.h │ │ │ ├── svbdf.h │ │ │ ├── svgldict.h │ │ │ ├── svmm.h │ │ │ ├── svotval.h │ │ │ ├── svpfr.h │ │ │ ├── svpostnm.h │ │ │ ├── svpscmap.h │ │ │ ├── svpsinfo.h │ │ │ ├── svsfnt.h │ │ │ ├── svttcmap.h │ │ │ ├── svwinfnt.h │ │ │ ├── svxf86nm.h │ │ │ ├── t1types.h │ │ │ └── tttypes.h │ │ │ ├── t1tables.h │ │ │ ├── ttnameid.h │ │ │ ├── tttables.h │ │ │ ├── tttags.h │ │ │ └── ttunpat.h │ │ ├── ft2build.h │ │ ├── gif_lib.h │ │ ├── jconfig.h │ │ ├── jerror.h │ │ ├── jmorecfg.h │ │ ├── jpeglib.h │ │ ├── libpng13 │ │ ├── png.h │ │ └── pngconf.h │ │ ├── png.h │ │ ├── pngconf.h │ │ ├── wincompat.h │ │ ├── zconf.h │ │ └── zlib.h ├── ExceptionHandler │ ├── README.txt │ └── prx │ │ ├── exception_asm.S │ │ ├── exports.exp │ │ ├── main.c │ │ └── makefile ├── JGE.sln ├── JGE.vcproj ├── LICENSE ├── Makefile ├── Makefile.1xx ├── Makefile.3ds ├── Makefile.3xx ├── Makefile.hge ├── Makefile.input ├── include │ ├── Encoding.h │ ├── JAnimator.h │ ├── JApp.h │ ├── JAssert.h │ ├── JAudio.h │ ├── JAudio3.h │ ├── JCooleyesMP3.h │ ├── JDistortionMesh.h │ ├── JFileSystem.h │ ├── JGBKFont.h │ ├── JGE.h │ ├── JGameLauncher.h │ ├── JGameObject.h │ ├── JGui.h │ ├── JInputSystem.h │ ├── JLBFont.h │ ├── JMD2Model.h │ ├── JMP3.h │ ├── JOBJModel.h │ ├── JParticle.h │ ├── JParticleEffect.h │ ├── JParticleEmitter.h │ ├── JParticleSystem.h │ ├── JRenderer.h │ ├── JResourceManager.h │ ├── JSoundSystem.h │ ├── JSoundSystem3.h │ ├── JSpline.h │ ├── JSprite.h │ ├── JTTFont.h │ ├── JTypes.h │ ├── New Text Document.txt │ ├── Vector2D.h │ ├── Vector3D.h │ ├── decoder_prx.h │ ├── hge │ │ ├── hgecolor.h │ │ ├── hgedistort.h │ │ ├── hgefont.h │ │ ├── hgeparticle.h │ │ ├── hgerect.h │ │ └── hgevector.h │ ├── psp │ │ ├── freetype2 │ │ │ └── freetype │ │ │ │ ├── cache │ │ │ │ ├── ftccache.h │ │ │ │ ├── ftccmap.h │ │ │ │ ├── ftcglyph.h │ │ │ │ ├── ftcimage.h │ │ │ │ ├── ftcmanag.h │ │ │ │ ├── ftcmru.h │ │ │ │ └── ftcsbits.h │ │ │ │ ├── config │ │ │ │ ├── ftconfig.h │ │ │ │ ├── ftheader.h │ │ │ │ ├── ftmodule.h │ │ │ │ ├── ftoption.h │ │ │ │ └── ftstdlib.h │ │ │ │ ├── freetype.h │ │ │ │ ├── ftbbox.h │ │ │ │ ├── ftbdf.h │ │ │ │ ├── ftbitmap.h │ │ │ │ ├── ftcache.h │ │ │ │ ├── ftchapters.h │ │ │ │ ├── fterrdef.h │ │ │ │ ├── fterrors.h │ │ │ │ ├── ftglyph.h │ │ │ │ ├── ftgzip.h │ │ │ │ ├── ftimage.h │ │ │ │ ├── ftincrem.h │ │ │ │ ├── ftlist.h │ │ │ │ ├── ftlzw.h │ │ │ │ ├── ftmac.h │ │ │ │ ├── ftmm.h │ │ │ │ ├── ftmodapi.h │ │ │ │ ├── ftmoderr.h │ │ │ │ ├── ftotval.h │ │ │ │ ├── ftoutln.h │ │ │ │ ├── ftpfr.h │ │ │ │ ├── ftrender.h │ │ │ │ ├── ftsizes.h │ │ │ │ ├── ftsnames.h │ │ │ │ ├── ftstroke.h │ │ │ │ ├── ftsynth.h │ │ │ │ ├── ftsysio.h │ │ │ │ ├── ftsysmem.h │ │ │ │ ├── ftsystem.h │ │ │ │ ├── fttrigon.h │ │ │ │ ├── fttypes.h │ │ │ │ ├── ftwinfnt.h │ │ │ │ ├── ftxf86.h │ │ │ │ ├── internal │ │ │ │ ├── autohint.h │ │ │ │ ├── ftcalc.h │ │ │ │ ├── ftdebug.h │ │ │ │ ├── ftdriver.h │ │ │ │ ├── ftgloadr.h │ │ │ │ ├── ftmemory.h │ │ │ │ ├── ftobjs.h │ │ │ │ ├── ftrfork.h │ │ │ │ ├── ftserv.h │ │ │ │ ├── ftstream.h │ │ │ │ ├── fttrace.h │ │ │ │ ├── ftvalid.h │ │ │ │ ├── internal.h │ │ │ │ ├── pcftypes.h │ │ │ │ ├── psaux.h │ │ │ │ ├── pshints.h │ │ │ │ ├── sfnt.h │ │ │ │ ├── svbdf.h │ │ │ │ ├── svgldict.h │ │ │ │ ├── svmm.h │ │ │ │ ├── svotval.h │ │ │ │ ├── svpfr.h │ │ │ │ ├── svpostnm.h │ │ │ │ ├── svpscmap.h │ │ │ │ ├── svpsinfo.h │ │ │ │ ├── svsfnt.h │ │ │ │ ├── svttcmap.h │ │ │ │ ├── svwinfnt.h │ │ │ │ ├── svxf86nm.h │ │ │ │ ├── t1types.h │ │ │ │ └── tttypes.h │ │ │ │ ├── t1tables.h │ │ │ │ ├── ttnameid.h │ │ │ │ ├── tttables.h │ │ │ │ ├── tttags.h │ │ │ │ └── ttunpat.h │ │ ├── ft2build.h │ │ ├── gif_lib.h │ │ ├── jconfig.h │ │ ├── jerror.h │ │ ├── jmorecfg.h │ │ ├── jpeglib.h │ │ ├── png.h │ │ ├── pngconf.h │ │ ├── zconf.h │ │ └── zlib.h │ ├── unzip │ │ ├── crypt.h │ │ ├── ioapi.h │ │ ├── iowin32.h │ │ ├── mztools.h │ │ ├── unzip.h │ │ └── zip.h │ └── vram.h ├── mk1xx.bat ├── mk3xx.bat ├── readme.txt └── src │ ├── 3ds │ ├── JRenderer_3DS.cpp │ ├── JSoundSystem_3DS.cpp │ └── main.cpp │ ├── Encoding.cpp │ ├── JAnimator.cpp │ ├── JApp.cpp │ ├── JDistortionMesh.cpp │ ├── JFileSystem.cpp │ ├── JGBKFont.cpp │ ├── JGE.cpp │ ├── JGameObject.cpp │ ├── JGui.cpp │ ├── JInputSystem.cpp │ ├── JLBFont.cpp │ ├── JMD2Model.cpp │ ├── JOBJModel.cpp │ ├── JParticle.cpp │ ├── JParticleEffect.cpp │ ├── JParticleEmitter.cpp │ ├── JParticleSystem.cpp │ ├── JResourceManager.cpp │ ├── JSpline.cpp │ ├── JSprite.cpp │ ├── JTTFont.cpp │ ├── Vector2D.cpp │ ├── hge │ ├── hgecolor.cpp │ ├── hgedistort.cpp │ ├── hgefont.cpp │ ├── hgeparticle.cpp │ ├── hgepmanager.cpp │ ├── hgerect.cpp │ └── hgevector.cpp │ ├── psp │ ├── JAudio.cpp │ ├── JAudio3.cpp │ ├── JCooleyesMP3.cpp │ ├── JGfx.cpp │ ├── JMP3.cpp │ ├── JSfx.cpp │ ├── JSfx3.cpp │ ├── decoder_prx.c │ ├── main.cpp │ └── vram.c │ ├── tinyxml │ ├── tinystr.cpp │ ├── tinystr.h │ ├── tinyxml.cpp │ ├── tinyxml.h │ ├── tinyxmlerror.cpp │ └── tinyxmlparser.cpp │ ├── unzip │ ├── ChangeLogUnzip │ ├── Makefile │ ├── crypt.h │ ├── ioapi.c │ ├── ioapi.h │ ├── mztools.c │ ├── mztools.h │ ├── unzip.c │ ├── unzip.h │ ├── win32 │ │ ├── iowin32.c │ │ ├── iowin32.h │ │ ├── miniunz.c │ │ └── minizip.c │ ├── zip.c │ └── zip.h │ └── win │ ├── JRenderer_Win.cpp │ ├── JSoundSystem_Win.cpp │ └── winmain.cpp └── Projects └── cspsp ├── LICENSE ├── Makefile ├── Makefile.1xx ├── Makefile.3ds ├── Makefile.3xx ├── PARAM.SFO ├── bin ├── data │ ├── animations.txt │ ├── config.txt │ ├── f3.dat │ ├── f3.png │ ├── f3backdrop.dat │ ├── f3backdrop.png │ ├── favorites.txt │ ├── guns.txt │ ├── idstorage.prx │ └── rapmet.prx └── gfx │ ├── ammo.png │ ├── bg.PNG │ ├── buyzone.png │ ├── controls.png │ ├── ctf.png │ ├── damageindicator.png │ ├── danzeff │ ├── keys.png │ ├── keys_c.png │ ├── keys_s.png │ ├── keys_s_c.png │ ├── nums.png │ ├── nums_c.png │ ├── nums_s.png │ └── nums_s_c.png │ ├── decals.PNG │ ├── dust.psi │ ├── explosion.psi │ ├── flash.psi │ ├── guns.PNG │ ├── gunsground.png │ ├── health.png │ ├── logo.png │ ├── muzzleflash.png │ ├── particles.png │ ├── players.png │ ├── playersdead.png │ ├── radar.png │ ├── scoreicons.png │ ├── smoke.psi │ └── splash.PNG ├── cspsp.sln ├── cspsp.vcproj ├── icon0.png ├── icon_3ds.png ├── idstorage.prx ├── mk1xx.bat ├── mk3xx.bat ├── rapmetprx ├── Makefile ├── exports.exp └── main.c └── src ├── AI.cpp ├── AI.h ├── AStar.cpp ├── AStar.h ├── Animation.cpp ├── Animation.h ├── Bullet.cpp ├── Bullet.h ├── BulletOnline.cpp ├── BulletOnline.h ├── BuyMenu.cpp ├── BuyMenu.h ├── Camera.cpp ├── Camera.h ├── Collision.cpp ├── Collision.h ├── Danzeff.cpp ├── Danzeff.h ├── Game.cpp ├── Game.h ├── GameApp.cpp ├── GameApp.h ├── GameLauncher.cpp ├── GameState.cpp ├── GameState.h ├── GameStateConnect.cpp ├── GameStateConnect.h ├── GameStateLoading.cpp ├── GameStateLoading.h ├── GameStateLobby.cpp ├── GameStateLobby.h ├── GameStateMenu.cpp ├── GameStateMenu.h ├── GameStateNewGame.cpp ├── GameStateNewGame.h ├── GameStateOnline.cpp ├── GameStateOnline.h ├── GameStateOptions.cpp ├── GameStateOptions.h ├── GameStatePlay.cpp ├── GameStatePlay.h ├── GameStateSplash.cpp ├── GameStateSplash.h ├── GameStateUpdate.cpp ├── GameStateUpdate.h ├── Globals.cpp ├── Globals.h ├── Grenade.cpp ├── Grenade.h ├── Grid.cpp ├── Grid.h ├── GunObject.cpp ├── GunObject.h ├── GunObjectOnline.cpp ├── GunObjectOnline.h ├── HttpManager.cpp ├── HttpManager.h ├── Hud.cpp ├── Hud.h ├── IdStorage.S ├── ListBox.cpp ├── ListBox.h ├── Menu.h ├── MenuItem.cpp ├── MenuItem.h ├── MeshEffect.h ├── Node.cpp ├── Node.h ├── Packet.cpp ├── Packet.h ├── Particle.cpp ├── Particle.h ├── ParticleEngine.cpp ├── ParticleEngine.h ├── Person.cpp ├── Person.h ├── PersonOnline.cpp ├── PersonOnline.h ├── SfxManager.cpp ├── SfxManager.h ├── TeamMenu.cpp ├── TeamMenu.h ├── TileMap.cpp ├── TileMap.h ├── UdpManager.cpp ├── UdpManager.h ├── Wlan.cpp ├── Wlan.h ├── gun2.h ├── idstorage.c ├── idstorage.exp ├── mcount.S ├── mp3player.h ├── old └── Gun2.cpp ├── psp ├── easyconnect.cpp ├── easyconnect.h ├── mp3player.c ├── prof.c └── prof.h └── rapmet.S /jge/JGE/Dependencies/include/fmod_errors.h: -------------------------------------------------------------------------------- 1 | #ifndef _FMOD_ERRORS_H 2 | #define _FMOD_ERRORS_H 3 | 4 | static char *FMOD_ErrorString(int errcode) 5 | { 6 | switch (errcode) 7 | { 8 | case FMOD_ERR_NONE: return "No errors"; 9 | case FMOD_ERR_BUSY: return "Cannot call this command after FSOUND_Init. Call FSOUND_Close first."; 10 | case FMOD_ERR_UNINITIALIZED: return "This command failed because FSOUND_Init was not called"; 11 | case FMOD_ERR_PLAY: return "Playing the sound failed."; 12 | case FMOD_ERR_INIT: return "Error initializing output device."; 13 | case FMOD_ERR_ALLOCATED: return "The output device is already in use and cannot be reused."; 14 | case FMOD_ERR_OUTPUT_FORMAT: return "Soundcard does not support the features needed for this soundsystem (16bit stereo output)"; 15 | case FMOD_ERR_COOPERATIVELEVEL: return "Error setting cooperative level for hardware."; 16 | case FMOD_ERR_CREATEBUFFER: return "Error creating hardware sound buffer."; 17 | case FMOD_ERR_FILE_NOTFOUND: return "File not found"; 18 | case FMOD_ERR_FILE_FORMAT: return "Unknown file format"; 19 | case FMOD_ERR_FILE_BAD: return "Error loading file"; 20 | case FMOD_ERR_MEMORY: return "Not enough memory "; 21 | case FMOD_ERR_VERSION: return "The version number of this file format is not supported"; 22 | case FMOD_ERR_INVALID_PARAM: return "An invalid parameter was passed to this function"; 23 | case FMOD_ERR_NO_EAX: return "Tried to use an EAX command on a non EAX enabled channel or output."; 24 | case FMOD_ERR_CHANNEL_ALLOC: return "Failed to allocate a new channel"; 25 | case FMOD_ERR_RECORD: return "Recording not supported on this device"; 26 | case FMOD_ERR_MEDIAPLAYER: return "Required Mediaplayer codec is not installed"; 27 | 28 | default : return "Unknown error"; 29 | }; 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | FT_USE_MODULE(autohint_module_class) 2 | FT_USE_MODULE(tt_driver_class) 3 | FT_USE_MODULE(t1_driver_class) 4 | FT_USE_MODULE(cff_driver_class) 5 | FT_USE_MODULE(t1cid_driver_class) 6 | FT_USE_MODULE(pcf_driver_class) 7 | FT_USE_MODULE(bdf_driver_class) 8 | FT_USE_MODULE(psaux_module_class) 9 | FT_USE_MODULE(psnames_module_class) 10 | FT_USE_MODULE(pshinter_module_class) 11 | FT_USE_MODULE(ft_raster1_renderer_class) 12 | FT_USE_MODULE(sfnt_module_class) 13 | FT_USE_MODULE(ft_smooth_renderer_class) 14 | FT_USE_MODULE(ft_smooth_lcd_renderer_class) 15 | FT_USE_MODULE(ft_smooth_lcdv_renderer_class) 16 | FT_USE_MODULE(t42_driver_class) 17 | FT_USE_MODULE(pfr_driver_class) 18 | FT_USE_MODULE(winfnt_driver_class) 19 | 20 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/ftstroke.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/Dependencies/include/freetype/ftstroke.h -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/ftwinfnt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/Dependencies/include/freetype/ftwinfnt.h -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/internal/pcftypes.h: -------------------------------------------------------------------------------- 1 | /* pcftypes.h 2 | 3 | FreeType font driver for pcf fonts 4 | 5 | Copyright (C) 2000, 2001, 2002 by 6 | Francesco Zappa Nardelli 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | */ 26 | 27 | 28 | #ifndef __PCFTYPES_H__ 29 | #define __PCFTYPES_H__ 30 | 31 | 32 | #include 33 | #include FT_FREETYPE_H 34 | 35 | 36 | FT_BEGIN_HEADER 37 | 38 | 39 | typedef struct PCF_Public_FaceRec_ 40 | { 41 | FT_FaceRec root; 42 | FT_StreamRec gzip_stream; 43 | FT_Stream gzip_source; 44 | 45 | char* charset_encoding; 46 | char* charset_registry; 47 | 48 | } PCF_Public_FaceRec, *PCF_Public_Face; 49 | 50 | 51 | FT_END_HEADER 52 | 53 | #endif /* __PCFTYPES_H__ */ 54 | 55 | 56 | /* END */ 57 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/internal/services/svbdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svbdf.h */ 4 | /* */ 5 | /* The FreeType BDF services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVBDF_H__ 20 | #define __SVBDF_H__ 21 | 22 | #include FT_BDF_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_BDF "bdf" 30 | 31 | typedef FT_Error 32 | (*FT_BDF_GetCharsetIdFunc)( FT_Face face, 33 | const char* *acharset_encoding, 34 | const char* *acharset_registry ); 35 | 36 | typedef FT_Error 37 | (*FT_BDF_GetPropertyFunc)( FT_Face face, 38 | const char* prop_name, 39 | BDF_PropertyRec *aproperty ); 40 | 41 | 42 | FT_DEFINE_SERVICE( BDF ) 43 | { 44 | FT_BDF_GetCharsetIdFunc get_charset_id; 45 | FT_BDF_GetPropertyFunc get_property; 46 | }; 47 | 48 | /* */ 49 | 50 | 51 | FT_END_HEADER 52 | 53 | 54 | #endif /* __SVBDF_H__ */ 55 | 56 | 57 | /* END */ 58 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/internal/services/svgldict.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgldict.h */ 4 | /* */ 5 | /* The FreeType glyph dictionary services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVGLDICT_H__ 20 | #define __SVGLDICT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A service used to retrieve glyph names, as well as to find the 30 | * index of a given glyph name in a font. 31 | * 32 | */ 33 | 34 | #define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" 35 | 36 | 37 | typedef FT_Error 38 | (*FT_GlyphDict_GetNameFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_Pointer buffer, 41 | FT_UInt buffer_max ); 42 | 43 | typedef FT_UInt 44 | (*FT_GlyphDict_NameIndexFunc)( FT_Face face, 45 | FT_String* glyph_name ); 46 | 47 | 48 | FT_DEFINE_SERVICE( GlyphDict ) 49 | { 50 | FT_GlyphDict_GetNameFunc get_name; 51 | FT_GlyphDict_NameIndexFunc name_index; /* optional */ 52 | }; 53 | 54 | /* */ 55 | 56 | 57 | FT_END_HEADER 58 | 59 | 60 | #endif /* __SVGLDICT_H__ */ 61 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/internal/services/svpostnm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpostnm.h */ 4 | /* */ 5 | /* The FreeType PostScript name services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPOSTNM_H__ 20 | #define __SVPOSTNM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | /* 28 | * A trivial service used to retrieve the PostScript name of a given 29 | * font when available. The `get_name' field should never be NULL. 30 | * 31 | * The correponding function can return NULL to indicate that the 32 | * PostScript name is not available. 33 | * 34 | * The name is owned by the face and will be destroyed with it. 35 | */ 36 | 37 | #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" 38 | 39 | 40 | typedef const char* 41 | (*FT_PsName_GetFunc)( FT_Face face ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsFontName ) 45 | { 46 | FT_PsName_GetFunc get_ps_font_name; 47 | }; 48 | 49 | /* */ 50 | 51 | 52 | FT_END_HEADER 53 | 54 | 55 | #endif /* __SVPOSTNM_H__ */ 56 | 57 | 58 | /* END */ 59 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/internal/services/svpsinfo.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpsinfo.h */ 4 | /* */ 5 | /* The FreeType PostScript info service (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPSINFO_H__ 20 | #define __SVPSINFO_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_INTERNAL_TYPE1_TYPES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info" 30 | 31 | 32 | typedef FT_Error 33 | (*PS_GetFontInfoFunc)( FT_Face face, 34 | PS_FontInfoRec* afont_info ); 35 | 36 | typedef FT_Int 37 | (*PS_HasGlyphNamesFunc)( FT_Face face ); 38 | 39 | 40 | FT_DEFINE_SERVICE( PsInfo ) 41 | { 42 | PS_GetFontInfoFunc ps_get_font_info; 43 | PS_HasGlyphNamesFunc ps_has_glyph_names; 44 | }; 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVPSINFO_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/internal/services/svsfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svsfnt.h */ 4 | /* */ 5 | /* The FreeType PostScript name services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVSFNT_H__ 20 | #define __SVSFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_TRUETYPE_TABLES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * SFNT table loading service. 31 | */ 32 | 33 | #define FT_SERVICE_ID_SFNT_TABLE "sfnt-table" 34 | 35 | 36 | /* 37 | * Used to implement FT_Load_Sfnt_Table(). 38 | */ 39 | typedef FT_Error 40 | (*FT_SFNT_TableLoadFunc)( FT_Face face, 41 | FT_ULong tag, 42 | FT_Long offset, 43 | FT_Byte* buffer, 44 | FT_ULong* length ); 45 | 46 | /* 47 | * Used to implement FT_Get_Sfnt_Table(). 48 | */ 49 | typedef void* 50 | (*FT_SFNT_TableGetFunc)( FT_Face face, 51 | FT_Sfnt_Tag tag ); 52 | 53 | 54 | FT_DEFINE_SERVICE( SFNT_Table ) 55 | { 56 | FT_SFNT_TableLoadFunc load_table; 57 | FT_SFNT_TableGetFunc get_table; 58 | }; 59 | 60 | /* */ 61 | 62 | 63 | FT_END_HEADER 64 | 65 | 66 | #endif /* __SVSFNT_H__ */ 67 | 68 | 69 | /* END */ 70 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/internal/services/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svwinfnt.h */ 4 | /* */ 5 | /* The FreeType Windows FNT/FONT service (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVWINFNT_H__ 20 | #define __SVWINFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_WINFONTS_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* __SVWINFNT_H__ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/internal/services/svxf86nm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svxf86nm.h */ 4 | /* */ 5 | /* The FreeType XFree86 services (specification only). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVXF86NM_H__ 20 | #define __SVXF86NM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data 31 | * is a simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" 35 | 36 | #define FT_XF86_FORMAT_TRUETYPE "TrueType" 37 | #define FT_XF86_FORMAT_TYPE_1 "Type 1" 38 | #define FT_XF86_FORMAT_BDF "BDF" 39 | #define FT_XF86_FORMAT_PCF "PCF" 40 | #define FT_XF86_FORMAT_TYPE_42 "Type 42" 41 | #define FT_XF86_FORMAT_CID "CID Type 1" 42 | #define FT_XF86_FORMAT_CFF "CFF" 43 | #define FT_XF86_FORMAT_PFR "PFR" 44 | #define FT_XF86_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVXF86NM_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* Written by Graham Asher */ 11 | /* */ 12 | /* This file is part of the FreeType project, and may only be used, */ 13 | /* modified, and distributed under the terms of the FreeType project */ 14 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /***************************************************************************/ 19 | 20 | 21 | #ifndef __TTUNPAT_H__ 22 | #define __TTUNPAT_H__ 23 | 24 | 25 | #include 26 | #include FT_FREETYPE_H 27 | 28 | #ifdef FREETYPE_H 29 | #error "freetype.h of FreeType 1 has been loaded!" 30 | #error "Please fix the directory search order for header files" 31 | #error "so that freetype.h of FreeType 2 is found first." 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | 38 | /*************************************************************************** 39 | * 40 | * @constant: 41 | * FT_PARAM_TAG_UNPATENTED_HINTING 42 | * 43 | * @description: 44 | * A constant used as the tag of an @FT_Parameter structure to indicate 45 | * that unpatented methods only should be used by the TrueType bytecode 46 | * interpreter for a typeface opened by FT_Open_Face. 47 | * 48 | */ 49 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 50 | 51 | /* */ 52 | 53 | FT_END_HEADER 54 | 55 | 56 | #endif /* __TTUNPAT_H__ */ 57 | 58 | 59 | /* END */ 60 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | FT_USE_MODULE(autofit_module_class) 2 | FT_USE_MODULE(tt_driver_class) 3 | FT_USE_MODULE(t1_driver_class) 4 | FT_USE_MODULE(cff_driver_class) 5 | FT_USE_MODULE(t1cid_driver_class) 6 | FT_USE_MODULE(pfr_driver_class) 7 | FT_USE_MODULE(t42_driver_class) 8 | FT_USE_MODULE(winfnt_driver_class) 9 | FT_USE_MODULE(pcf_driver_class) 10 | FT_USE_MODULE(psaux_module_class) 11 | FT_USE_MODULE(psnames_module_class) 12 | FT_USE_MODULE(pshinter_module_class) 13 | FT_USE_MODULE(ft_raster1_renderer_class) 14 | FT_USE_MODULE(sfnt_module_class) 15 | FT_USE_MODULE(ft_smooth_renderer_class) 16 | FT_USE_MODULE(ft_smooth_lcd_renderer_class) 17 | FT_USE_MODULE(ft_smooth_lcdv_renderer_class) 18 | FT_USE_MODULE(otv_module_class) 19 | FT_USE_MODULE(bdf_driver_class) 20 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/ftstroke.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/Dependencies/include/freetype2/freetype/ftstroke.h -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/ftwinfnt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/Dependencies/include/freetype2/freetype/ftwinfnt.h -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/internal/pcftypes.h: -------------------------------------------------------------------------------- 1 | /* pcftypes.h 2 | 3 | FreeType font driver for pcf fonts 4 | 5 | Copyright (C) 2000, 2001, 2002 by 6 | Francesco Zappa Nardelli 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | */ 26 | 27 | 28 | #ifndef __PCFTYPES_H__ 29 | #define __PCFTYPES_H__ 30 | 31 | 32 | #include 33 | #include FT_FREETYPE_H 34 | 35 | 36 | FT_BEGIN_HEADER 37 | 38 | 39 | typedef struct PCF_Public_FaceRec_ 40 | { 41 | FT_FaceRec root; 42 | FT_StreamRec gzip_stream; 43 | FT_Stream gzip_source; 44 | 45 | char* charset_encoding; 46 | char* charset_registry; 47 | 48 | } PCF_Public_FaceRec, *PCF_Public_Face; 49 | 50 | 51 | FT_END_HEADER 52 | 53 | #endif /* __PCFTYPES_H__ */ 54 | 55 | 56 | /* END */ 57 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/internal/svbdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svbdf.h */ 4 | /* */ 5 | /* The FreeType BDF services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVBDF_H__ 20 | #define __SVBDF_H__ 21 | 22 | #include FT_BDF_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_BDF "bdf" 30 | 31 | typedef FT_Error 32 | (*FT_BDF_GetCharsetIdFunc)( FT_Face face, 33 | const char* *acharset_encoding, 34 | const char* *acharset_registry ); 35 | 36 | typedef FT_Error 37 | (*FT_BDF_GetPropertyFunc)( FT_Face face, 38 | const char* prop_name, 39 | BDF_PropertyRec *aproperty ); 40 | 41 | 42 | FT_DEFINE_SERVICE( BDF ) 43 | { 44 | FT_BDF_GetCharsetIdFunc get_charset_id; 45 | FT_BDF_GetPropertyFunc get_property; 46 | }; 47 | 48 | /* */ 49 | 50 | 51 | FT_END_HEADER 52 | 53 | 54 | #endif /* __SVBDF_H__ */ 55 | 56 | 57 | /* END */ 58 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/internal/svgldict.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgldict.h */ 4 | /* */ 5 | /* The FreeType glyph dictionary services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVGLDICT_H__ 20 | #define __SVGLDICT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A service used to retrieve glyph names, as well as to find the 30 | * index of a given glyph name in a font. 31 | * 32 | */ 33 | 34 | #define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" 35 | 36 | 37 | typedef FT_Error 38 | (*FT_GlyphDict_GetNameFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_Pointer buffer, 41 | FT_UInt buffer_max ); 42 | 43 | typedef FT_UInt 44 | (*FT_GlyphDict_NameIndexFunc)( FT_Face face, 45 | FT_String* glyph_name ); 46 | 47 | 48 | FT_DEFINE_SERVICE( GlyphDict ) 49 | { 50 | FT_GlyphDict_GetNameFunc get_name; 51 | FT_GlyphDict_NameIndexFunc name_index; /* optional */ 52 | }; 53 | 54 | /* */ 55 | 56 | 57 | FT_END_HEADER 58 | 59 | 60 | #endif /* __SVGLDICT_H__ */ 61 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/internal/svotval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svotval.h */ 4 | /* */ 5 | /* The FreeType OpenType validation service (specification). */ 6 | /* */ 7 | /* Copyright 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVOTVAL_H__ 20 | #define __SVOTVAL_H__ 21 | 22 | 23 | FT_BEGIN_HEADER 24 | 25 | 26 | #define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" 27 | 28 | 29 | typedef FT_Error 30 | (*otv_validate_func)( FT_Face face, 31 | FT_UInt ot_flags, 32 | FT_Bytes *base, 33 | FT_Bytes *gdef, 34 | FT_Bytes *gpos, 35 | FT_Bytes *gsub, 36 | FT_Bytes *jstf ); 37 | 38 | 39 | FT_DEFINE_SERVICE( OTvalidate ) 40 | { 41 | otv_validate_func validate; 42 | }; 43 | 44 | /* */ 45 | 46 | 47 | FT_END_HEADER 48 | 49 | 50 | #endif /* __SVOTVAL_H__ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/internal/svpostnm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpostnm.h */ 4 | /* */ 5 | /* The FreeType PostScript name services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPOSTNM_H__ 20 | #define __SVPOSTNM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | /* 28 | * A trivial service used to retrieve the PostScript name of a given 29 | * font when available. The `get_name' field should never be NULL. 30 | * 31 | * The correponding function can return NULL to indicate that the 32 | * PostScript name is not available. 33 | * 34 | * The name is owned by the face and will be destroyed with it. 35 | */ 36 | 37 | #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" 38 | 39 | 40 | typedef const char* 41 | (*FT_PsName_GetFunc)( FT_Face face ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsFontName ) 45 | { 46 | FT_PsName_GetFunc get_ps_font_name; 47 | }; 48 | 49 | /* */ 50 | 51 | 52 | FT_END_HEADER 53 | 54 | 55 | #endif /* __SVPOSTNM_H__ */ 56 | 57 | 58 | /* END */ 59 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/internal/svpsinfo.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpsinfo.h */ 4 | /* */ 5 | /* The FreeType PostScript info service (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPSINFO_H__ 20 | #define __SVPSINFO_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_INTERNAL_TYPE1_TYPES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info" 30 | 31 | 32 | typedef FT_Error 33 | (*PS_GetFontInfoFunc)( FT_Face face, 34 | PS_FontInfoRec* afont_info ); 35 | 36 | typedef FT_Int 37 | (*PS_HasGlyphNamesFunc)( FT_Face face ); 38 | 39 | typedef FT_Error 40 | (*PS_GetFontPrivateFunc)( FT_Face face, 41 | PS_PrivateRec* afont_private ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsInfo ) 45 | { 46 | PS_GetFontInfoFunc ps_get_font_info; 47 | PS_HasGlyphNamesFunc ps_has_glyph_names; 48 | PS_GetFontPrivateFunc ps_get_font_private; 49 | }; 50 | 51 | /* */ 52 | 53 | 54 | FT_END_HEADER 55 | 56 | 57 | #endif /* __SVPSINFO_H__ */ 58 | 59 | 60 | /* END */ 61 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/internal/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svwinfnt.h */ 4 | /* */ 5 | /* The FreeType Windows FNT/FONT service (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVWINFNT_H__ 20 | #define __SVWINFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_WINFONTS_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* __SVWINFNT_H__ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/internal/svxf86nm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svxf86nm.h */ 4 | /* */ 5 | /* The FreeType XFree86 services (specification only). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVXF86NM_H__ 20 | #define __SVXF86NM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data 31 | * is a simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" 35 | 36 | #define FT_XF86_FORMAT_TRUETYPE "TrueType" 37 | #define FT_XF86_FORMAT_TYPE_1 "Type 1" 38 | #define FT_XF86_FORMAT_BDF "BDF" 39 | #define FT_XF86_FORMAT_PCF "PCF" 40 | #define FT_XF86_FORMAT_TYPE_42 "Type 42" 41 | #define FT_XF86_FORMAT_CID "CID Type 1" 42 | #define FT_XF86_FORMAT_CFF "CFF" 43 | #define FT_XF86_FORMAT_PFR "PFR" 44 | #define FT_XF86_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVXF86NM_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/freetype2/freetype/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* Written by Graham Asher */ 11 | /* */ 12 | /* This file is part of the FreeType project, and may only be used, */ 13 | /* modified, and distributed under the terms of the FreeType project */ 14 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /***************************************************************************/ 19 | 20 | 21 | #ifndef __TTUNPAT_H__ 22 | #define __TTUNPAT_H__ 23 | 24 | 25 | #include 26 | #include FT_FREETYPE_H 27 | 28 | #ifdef FREETYPE_H 29 | #error "freetype.h of FreeType 1 has been loaded!" 30 | #error "Please fix the directory search order for header files" 31 | #error "so that freetype.h of FreeType 2 is found first." 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | 38 | /*************************************************************************** 39 | * 40 | * @constant: 41 | * FT_PARAM_TAG_UNPATENTED_HINTING 42 | * 43 | * @description: 44 | * A constant used as the tag of an @FT_Parameter structure to indicate 45 | * that unpatented methods only should be used by the TrueType bytecode 46 | * interpreter for a typeface opened by FT_Open_Face. 47 | * 48 | */ 49 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 50 | 51 | /* */ 52 | 53 | FT_END_HEADER 54 | 55 | 56 | #endif /* __TTUNPAT_H__ */ 57 | 58 | 59 | /* END */ 60 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/ft2build.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ft2build.h */ 4 | /* */ 5 | /* FreeType 2 build and setup macros. */ 6 | /* (Generic version) */ 7 | /* */ 8 | /* Copyright 1996-2001 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | /*************************************************************************/ 21 | /* */ 22 | /* This file corresponds to the default "ft2build.h" file for */ 23 | /* FreeType 2. It uses the "freetype" include root. */ 24 | /* */ 25 | /* Note that specific platforms might use a different configuration. */ 26 | /* See builds/unix/ft2unix.h for an example. */ 27 | /* */ 28 | /*************************************************************************/ 29 | 30 | 31 | #ifndef __FT2_BUILD_GENERIC_H__ 32 | #define __FT2_BUILD_GENERIC_H__ 33 | 34 | #include 35 | 36 | #endif /* __FT2_BUILD_GENERIC_H__ */ 37 | 38 | 39 | /* END */ 40 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/jconfig.h: -------------------------------------------------------------------------------- 1 | /* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ 2 | /* see jconfig.doc for explanations */ 3 | 4 | #define HAVE_PROTOTYPES 5 | #define HAVE_UNSIGNED_CHAR 6 | #define HAVE_UNSIGNED_SHORT 7 | /* #define void char */ 8 | /* #define const */ 9 | #undef CHAR_IS_UNSIGNED 10 | #define HAVE_STDDEF_H 11 | #define HAVE_STDLIB_H 12 | #undef NEED_BSD_STRINGS 13 | #undef NEED_SYS_TYPES_H 14 | #undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ 15 | #undef NEED_SHORT_EXTERNAL_NAMES 16 | #undef INCOMPLETE_TYPES_BROKEN 17 | 18 | /* Define "boolean" as unsigned char, not int, per Windows custom */ 19 | #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ 20 | typedef unsigned char boolean; 21 | #endif 22 | #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ 23 | 24 | 25 | #ifdef JPEG_INTERNALS 26 | 27 | #undef RIGHT_SHIFT_IS_UNSIGNED 28 | 29 | #endif /* JPEG_INTERNALS */ 30 | 31 | #ifdef JPEG_CJPEG_DJPEG 32 | 33 | #define BMP_SUPPORTED /* BMP image file format */ 34 | #define GIF_SUPPORTED /* GIF image file format */ 35 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 36 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 37 | #define TARGA_SUPPORTED /* Targa image file format */ 38 | 39 | #define TWO_FILE_COMMANDLINE /* optional */ 40 | #define USE_SETMODE /* Microsoft has setmode() */ 41 | #undef NEED_SIGNAL_CATCHER 42 | #undef DONT_USE_B_MODE 43 | #undef PROGRESS_REPORT /* optional */ 44 | 45 | #endif /* JPEG_CJPEG_DJPEG */ 46 | -------------------------------------------------------------------------------- /jge/JGE/Dependencies/include/wincompat.h: -------------------------------------------------------------------------------- 1 | #if !defined(WINCOMPAT_INCLUDED) && !defined(PLATFORM_WINDOWS) && !defined(WIN32) && !defined(WINDOWS) && !defined(__WIN32__) 2 | #define WINCOMPAT_INCLUDED 3 | 4 | /** 5 | * 6 | * Author: Magnus Naeslund (mag@fbab.net, mag@bahnhof.se) 7 | * (c) 2000 Magnus Naeslund, all rights reserved 8 | * 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #ifndef TRUE 19 | #define TRUE 1 20 | #endif 21 | #ifndef FALSE 22 | #define FALSE 0 23 | #endif 24 | 25 | #define _kbhit kbhit 26 | #define stricmp strcasecmp 27 | #define strnicmp strncasecmp 28 | 29 | #define Sleep(x) usleep((x)*1000) 30 | 31 | static int inited=0; 32 | static struct termios ori; 33 | 34 | static void tcatexit(){ 35 | tcsetattr(0,0,&ori); 36 | } 37 | 38 | static void init_terminal(){ 39 | struct termios t; 40 | tcgetattr(0,&t); 41 | tcgetattr(0,&ori); 42 | t.c_lflag &= ~(ICANON); 43 | tcsetattr(0,0,&t); 44 | atexit(tcatexit); 45 | } 46 | 47 | static inline int kbhit(){ 48 | fd_set rfds; 49 | struct timeval tv; 50 | 51 | if (!inited){ 52 | inited=1; 53 | init_terminal(); 54 | } 55 | 56 | FD_ZERO(&rfds); 57 | FD_SET(0, &rfds); 58 | tv.tv_sec = 0; 59 | tv.tv_usec = 10*1000; 60 | return select(1, &rfds, NULL, NULL, &tv)>0; 61 | } 62 | 63 | static inline int getch(){ 64 | fd_set rfds; 65 | 66 | if (!inited){ 67 | inited=1; 68 | init_terminal(); 69 | } 70 | 71 | FD_ZERO(&rfds); 72 | FD_SET(0, &rfds); 73 | if (select(1, &rfds, NULL, NULL, NULL)>0) 74 | return getchar(); 75 | else{ 76 | printf("wincompat.h: select() on fd 0 failed\n"); 77 | return 0xDeadBeef; 78 | } 79 | } 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /jge/JGE/ExceptionHandler/README.txt: -------------------------------------------------------------------------------- 1 | Exception Handler for Kernel 3.71 2 | --------------------------------- 3 | All credits goes to crazyc (for the prx code) and SamuraiX (sample usage code) 4 | 5 | What is it? 6 | ----------- 7 | exception.prx is a prx that handle exception and can be used 8 | to show usefull information abuot a crash. 9 | 10 | 11 | How to build: 12 | ------------- 13 | To build exception.prx 14 | 15 | $cd prx 16 | $make 17 | 18 | To build the test program: 19 | $cd test 20 | $make 21 | 22 | 23 | How to use it: 24 | -------------- 25 | Include utility/exception.h in your main.c and init the handler with: 26 | 27 | initExceptionHandler(); 28 | 29 | Copy exception.prx in the same directory your EBOOT is. 30 | 31 | Please check the test program. ;) 32 | -------------------------------------------------------------------------------- /jge/JGE/ExceptionHandler/prx/exports.exp: -------------------------------------------------------------------------------- 1 | PSP_BEGIN_EXPORTS 2 | PSP_EXPORT_START(syslib, 0, 0x8000) 3 | PSP_EXPORT_FUNC_HASH(module_start) 4 | PSP_EXPORT_VAR_HASH(module_info) 5 | PSP_EXPORT_END 6 | 7 | PSP_END_EXPORTS 8 | -------------------------------------------------------------------------------- /jge/JGE/ExceptionHandler/prx/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | PSP_MODULE_INFO("exception", 0x1007, 1, 1); // better not unload 6 | 7 | PspDebugErrorHandler curr_handler; 8 | PspDebugRegBlock *exception_regs; 9 | 10 | void _pspDebugExceptionHandler(void); 11 | int sceKernelRegisterDefaultExceptionHandler(void *func); 12 | int sceKernelRegisterDefaultExceptionHandler371(void *func); 13 | 14 | int module_start(SceSize args, void *argp) 15 | { 16 | if(args != 8) return -1; 17 | curr_handler = (PspDebugErrorHandler)((int *)argp)[0]; 18 | exception_regs = (PspDebugRegBlock *)((int *)argp)[1]; 19 | if(!curr_handler || !exception_regs) return -1; 20 | 21 | if(sceKernelDevkitVersion() < 0x03070110) 22 | return sceKernelRegisterDefaultExceptionHandler((void *)_pspDebugExceptionHandler); 23 | else 24 | return sceKernelRegisterDefaultExceptionHandler371((void *)_pspDebugExceptionHandler); 25 | } 26 | -------------------------------------------------------------------------------- /jge/JGE/ExceptionHandler/prx/makefile: -------------------------------------------------------------------------------- 1 | TARGET = exception 2 | OBJS = main.o exception_asm.o 3 | 4 | # Define to build this as a prx (instead of a static elf) 5 | BUILD_PRX=1 6 | # Define the name of our custom exports (minus the .exp extension) 7 | PRX_EXPORTS=exports.exp 8 | 9 | USE_KERNEL_LIBC = 1 10 | USE_KERNEL_LIBS = 1 11 | 12 | INCDIR = 13 | CFLAGS = -Os -G0 -Wall -nostartfiles 14 | CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti 15 | ASFLAGS = $(CFLAGS) 16 | 17 | LIBDIR = 18 | 19 | PSPSDK=$(shell psp-config --pspsdk-path) 20 | include $(PSPSDK)/lib/build.mak 21 | -------------------------------------------------------------------------------- /jge/JGE/JGE.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 9.00 2 | # Visual Studio 2005 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JGE", "JGE.vcproj", "{89159C26-2282-404A-A194-103B0A49DF7B}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Release|Win32 = Release|Win32 9 | EndGlobalSection 10 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 11 | {89159C26-2282-404A-A194-103B0A49DF7B}.Debug|Win32.ActiveCfg = Debug|Win32 12 | {89159C26-2282-404A-A194-103B0A49DF7B}.Debug|Win32.Build.0 = Debug|Win32 13 | {89159C26-2282-404A-A194-103B0A49DF7B}.Release|Win32.ActiveCfg = Release|Win32 14 | {89159C26-2282-404A-A194-103B0A49DF7B}.Release|Win32.Build.0 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | EndGlobal 20 | -------------------------------------------------------------------------------- /jge/JGE/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2007, James Hui (a.k.a. Dr.Watson) 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 15 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 16 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 17 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 18 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 19 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 20 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 | -------------------------------------------------------------------------------- /jge/JGE/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | $(MAKE) -f Makefile.1xx install 3 | $(MAKE) -f Makefile.hge install 4 | $(MAKE) -f Makefile.input install 5 | 6 | 1xx: 7 | $(MAKE) -f Makefile.1xx install 8 | $(MAKE) -f Makefile.hge install 9 | $(MAKE) -f Makefile.input install 10 | 11 | 3xx: 12 | $(MAKE) -f Makefile.3xx install 13 | $(MAKE) -f Makefile.hge install 14 | $(MAKE) -f Makefile.input install 15 | 16 | clean: 17 | $(MAKE) -f Makefile.1xx clean 18 | $(MAKE) -f Makefile.3xx clean 19 | $(MAKE) -f Makefile.hge clean 20 | $(MAKE) -f Makefile.input clean 21 | -------------------------------------------------------------------------------- /jge/JGE/Makefile.1xx: -------------------------------------------------------------------------------- 1 | PSPSDK=$(shell psp-config --pspsdk-path) 2 | PSPDIR=$(shell psp-config --psp-prefix) 3 | TARGET_LIB = libjge100.a 4 | OBJS = src/JApp.o src/JGBKFont.o \ 5 | src/JGE.o src/JGfx.o src/JGui.o src/JLBFont.o src/JSfx.o \ 6 | src/JGameObject.o src/JSpline.o src/JAnimator.o \ 7 | src/JResourceManager.o \ 8 | src/JFileSystem.o \ 9 | src/JParticle.o src/JParticleEmitter.o src/JParticleEffect.o src/JParticleSystem.o \ 10 | src/unzip/ioapi.o src/unzip/mztools.o src/unzip/unzip.o \ 11 | src/JSprite.o src/Vector2D.o \ 12 | src/tinyxml/tinystr.o src/tinyxml/tinyxml.o \ 13 | src/tinyxml/tinyxmlparser.o src/tinyxml/tinyxmlerror.o \ 14 | src/main.o src/vram.o \ 15 | src/JAudio.o src/JCooleyesMP3.o \ 16 | src/decoder_prx.o \ 17 | src/Encoding.o src/JTTFont.o \ 18 | src/JMD2Model.o src/JOBJModel.o \ 19 | 20 | 21 | INCDIR = include/psp include/psp/freetype2 22 | LIBDIR = lib/psp 23 | 24 | CFLAGS = -O2 -G0 -Wall 25 | 26 | LIBS = -lgif -lfreetype -ljpeg -lpng -lz -lm -lmikmod -lmmio -lpsppower -lpspmpeg -lpspaudiocodec -lpspaudiolib -lpspaudio -lpspgum -lpspgu -lpsprtc -lm -lstdc++ 27 | 28 | include $(PSPSDK)/lib/build.mak 29 | 30 | install: $(TARGET_LIB) 31 | @cp libjge100.a lib/psp 32 | @echo "Done" 33 | -------------------------------------------------------------------------------- /jge/JGE/Makefile.3xx: -------------------------------------------------------------------------------- 1 | 2 | PSPSDK = $(shell psp-config --pspsdk-path) 3 | PSPLIBSDIR = $(PSPSDK)/.. 4 | 5 | TARGET_LIB = libjge300.a 6 | OBJS = src/JApp.o src/JGBKFont.o \ 7 | src/JGE.o src/JGfx.o src/JGui.o src/JLBFont.o src/JSfx.o \ 8 | src/JGameObject.o src/JSpline.o src/JAnimator.o \ 9 | src/JResourceManager.o \ 10 | src/JFileSystem.o \ 11 | src/JParticle.o src/JParticleEmitter.o src/JParticleEffect.o src/JParticleSystem.o \ 12 | src/unzip/ioapi.o src/unzip/mztools.o src/unzip/unzip.o \ 13 | src/JSprite.o src/Vector2D.o \ 14 | src/tinyxml/tinystr.o src/tinyxml/tinyxml.o \ 15 | src/tinyxml/tinyxmlparser.o src/tinyxml/tinyxmlerror.o \ 16 | src/main.o src/vram.o \ 17 | src/JAudio.o src/JCooleyesMP3.o\ 18 | src/decoder_prx.o \ 19 | src/Encoding.o src/JTTFont.o \ 20 | src/JMD2Model.o src/JOBJModel.o \ 21 | 22 | 23 | INCDIR = include/psp include/psp/freetype2 24 | LIBDIR = lib/psp 25 | 26 | CFLAGS = -O2 -G0 -Wall -DDEVHOOK -DPSPFW3XX 27 | 28 | LIBS = -lgif -lfreetype -ljpeg -lpng -lz -lm -lmikmod -lmmio -lpsppower -lpspmpeg -lpspaudiocodec -lpspaudiolib -lpspaudio -lpspgum -lpspgu -lpsprtc -lm -lstdc++ 29 | 30 | include $(PSPSDK)/lib/build.mak 31 | 32 | install: $(TARGET_LIB) 33 | @cp libjge300.a lib/psp 34 | @echo "Done" 35 | -------------------------------------------------------------------------------- /jge/JGE/Makefile.hge: -------------------------------------------------------------------------------- 1 | PSPSDK=$(shell psp-config --pspsdk-path) 2 | PSPDIR=$(shell psp-config --psp-prefix) 3 | TARGET_LIB = libhgetools.a 4 | OBJS = src/hge/hgecolor.o src/hge/hgeparticle.o \ 5 | src/hge/hgerect.o src/hge/hgevector.o \ 6 | src/hge/hgedistort.o src/hge/hgefont.o 7 | 8 | 9 | INCDIR = include/psp include/psp/freetype2 10 | LIBDIR = lib/psp 11 | 12 | CFLAGS = -O2 -G0 -Wall 13 | 14 | LIBS = -lgif -lfreetype -ljpeg -lpng -lz -lmikmod -lpsppower -lpspmpeg -lpspaudiocodec -lpspaudiolib -lpspaudio -lpspgum -lpspgu -lpsprtc -lm -lstdc++ 15 | 16 | include $(PSPSDK)/lib/build.mak 17 | 18 | install: $(TARGET_LIB) 19 | @cp libhgetools.a lib/psp 20 | @echo "Done" 21 | -------------------------------------------------------------------------------- /jge/JGE/Makefile.input: -------------------------------------------------------------------------------- 1 | PSPSDK=$(shell psp-config --pspsdk-path) 2 | PSPDIR=$(shell psp-config --psp-prefix) 3 | TARGET_LIB = libjinput.a 4 | OBJS = src/JInputSystem.o 5 | 6 | INCDIR = include/psp include/psp/freetype2 7 | LIBDIR = lib/psp 8 | 9 | CFLAGS = -O2 -G0 -Wall 10 | 11 | LIBS = -lgif -lfreetype -ljpeg -lpng -lz -lmikmod -lpsppower -lpspmpeg -lpspaudiocodec -lpspaudiolib -lpspaudio -lpspgum -lpspgu -lpsprtc -lm -lstdc++ 12 | 13 | include $(PSPSDK)/lib/build.mak 14 | 15 | install: $(TARGET_LIB) 16 | @cp libjinput.a lib/psp 17 | @echo "Done" 18 | -------------------------------------------------------------------------------- /jge/JGE/include/Encoding.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE++ is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // 9 | //------------------------------------------------------------------------------------- 10 | 11 | #ifndef _ENCODING_H 12 | #define _ENCODING_H 13 | 14 | #include "../../JGE/include/JGE.h" 15 | 16 | u16 charsets_gbk_to_ucs(const u8 * cjk); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /jge/JGE/include/JAssert.h: -------------------------------------------------------------------------------- 1 | #ifndef _JASSERT_H_ 2 | #define _JASSERT_H_ 3 | 4 | #include "JGE.h" 5 | 6 | #ifdef NDEBUG 7 | 8 | #define JASSERT(p) ((void)0) 9 | 10 | #else 11 | 12 | #ifdef WIN32 13 | #define JASSERT(e) if (!(e)) { JGE::GetInstance()->Assert(__FILE__, __LINE__); } 14 | //#define JASSERT(e) if (!(e)) { _asm { int 3 }; } 15 | 16 | #else 17 | #define JASSERT(e) if (!(e)) { JGE::GetInstance()->Assert(__FILE__, __LINE__); } 18 | 19 | #endif 20 | 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /jge/JGE/include/JCooleyesMP3.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // Copyright (c) 2007 Cooleyes 9 | // 10 | //------------------------------------------------------------------------------------- 11 | 12 | #ifndef _COOLEYES_MP3_ 13 | #define _COOLEYES_MP3_ 14 | 15 | 16 | #define FORCE_BUFFER_ALIGNMENT 17 | 18 | class JCooleyesMP3 19 | { 20 | public: 21 | JCooleyesMP3(); 22 | ~JCooleyesMP3(); 23 | 24 | bool Load(const char* filename); 25 | void Release(); 26 | bool Play(bool looping = false); 27 | void Stop(); 28 | void Resume(); 29 | void FeedAudioData(void* buf, unsigned int length/*, bool mixing = false*/); 30 | void Decode(); 31 | bool IsPlaying(); 32 | 33 | void InitBuffers(unsigned long *MP3CodecBuffer, short* decoderBuffer, short* decodedDataOutputBuffer); 34 | 35 | public: 36 | bool mPlaying; 37 | SceUID mp3_handle; 38 | u8* mFileBuffer; 39 | u8* mMP3FirstFramePointer; 40 | int mFileSize; 41 | int mUpdateCounter; 42 | u8* mCurrFramePointer; 43 | int mDataPointer; 44 | int mSamplesPending; 45 | bool mAllMP3DataProcessed; 46 | 47 | bool mLooping; 48 | 49 | u32 mSamplePerFrame; 50 | u32 mChannelCount; 51 | u32 mSampleRate; 52 | 53 | int mOutputBufferIndex; 54 | 55 | short *mDecoderBuffer; 56 | short *mDecodedDataOutputBuffer; 57 | unsigned long *mMP3CodecBuffer; 58 | 59 | }; 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /jge/JGE/include/JDistortionMesh.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE++ is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // 9 | // Note: Inspired by HGE's DistortionMesh. 10 | // 11 | //------------------------------------------------------------------------------------- 12 | 13 | #ifndef _JDISTORT_MESH_H 14 | #define _JDISTORT_MESH_H 15 | 16 | #include "JRenderer.h" 17 | 18 | class JDistortionMesh 19 | { 20 | public: 21 | JDistortionMesh(JTexture *tex, float x, float y, float width, float height, int cols, int rows); 22 | ~JDistortionMesh(); 23 | 24 | void Render(float x, float y); 25 | void SetColor(int col, int row, PIXEL_TYPE color); 26 | void SetDisplacement(int col, int row, float dx, float dy);//, int ref); 27 | 28 | private: 29 | 30 | static JRenderer *mRenderer; 31 | Vertex* mVertices; 32 | int mRows; 33 | int mCols; 34 | float mCellWidth; 35 | float mCellHeight; 36 | float mTexX; 37 | float mTexY; 38 | float mTexWidth; 39 | float mTexHeight; 40 | JTexture* mTexture; 41 | JQuad* mQuad; 42 | 43 | 44 | }; 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /jge/JGE/include/JGameLauncher.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // 9 | //------------------------------------------------------------------------------------- 10 | 11 | #ifndef _GAME_LAUNCHER_H_ 12 | #define _GAME_LAUNCHER_H_ 13 | 14 | 15 | #include "JApp.h" 16 | #include "JTypes.h" 17 | #include "JFileSystem.h" 18 | 19 | 20 | ////////////////////////////////////////////////////////////////////////// 21 | /// An interface for JGE to get the user defined JApp class. 22 | /// 23 | ////////////////////////////////////////////////////////////////////////// 24 | class JGameLauncher 25 | { 26 | public: 27 | 28 | ////////////////////////////////////////////////////////////////////////// 29 | /// Get user defined JApp instance. The function will be called when 30 | /// JGE starts. 31 | /// 32 | /// @return - User defined JApp instance. 33 | /// 34 | ////////////////////////////////////////////////////////////////////////// 35 | JApp* GetGameApp(); 36 | 37 | ////////////////////////////////////////////////////////////////////////// 38 | /// Get application name. Mainly for Windows build to setup the name 39 | /// on the title bar. 40 | /// 41 | /// @return - Application name. 42 | /// 43 | ////////////////////////////////////////////////////////////////////////// 44 | char *GetName(); 45 | 46 | ////////////////////////////////////////////////////////////////////////// 47 | /// Get initialization flags. 48 | /// 49 | /// @return - Initialization flags. 50 | /// 51 | ////////////////////////////////////////////////////////////////////////// 52 | u32 GetInitFlags(); 53 | 54 | }; 55 | 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /jge/JGE/include/JInputSystem.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/include/JInputSystem.h -------------------------------------------------------------------------------- /jge/JGE/include/JMP3.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // Copyright (c) 2008 Alexander Berl 9 | // Copyright (c) 2008 WilLoW :--) 10 | // 11 | //------------------------------------------------------------------------------------- 12 | 13 | #ifndef _JMP3_ 14 | #define _JMP3_ 15 | 16 | #include 17 | 18 | 19 | 20 | 21 | class JMP3 22 | { 23 | protected: 24 | static bool loadModules(); 25 | int m_volume; 26 | int m_samplesPlayed; 27 | int m_inBufferSize, m_outBufferSize; 28 | char m_inBuffer[16*1024] __attribute__((aligned(64))); // ? 29 | short m_outBuffer[16*(1152/2)] __attribute__((aligned(64))); //? 30 | int m_numChannels; 31 | int m_samplingRate; 32 | bool m_loop; 33 | int m_lastDecoded; 34 | int m_playTime; 35 | int GetID3TagSize(char *fname); 36 | public: 37 | int m_paused; 38 | int m_channel; 39 | int m_mp3Handle; 40 | int m_fileHandle; 41 | int m_fileSize; 42 | char m_fileName[256]; 43 | static JMP3* mInstance; 44 | JMP3(); 45 | ~JMP3(); 46 | static void init(); 47 | bool fillBuffers(); 48 | bool load(const std::string& filename, int inBufferSize = 16*1024, int outBufferSize = 16 * (1152/2)); 49 | bool unload(); 50 | bool update(); 51 | bool play(); 52 | bool pause(); 53 | bool setLoop(bool loop); 54 | int setVolume(int volume); 55 | int playTime() const; 56 | int playTimeMinutes(); 57 | int playTimeSeconds(); 58 | 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /jge/JGE/include/JOBJModel.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE++ is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // 9 | //------------------------------------------------------------------------------------- 10 | 11 | #ifndef _OBJMODEL_H 12 | #define _OBJMODEL_H 13 | 14 | #include 15 | 16 | using namespace std; 17 | 18 | #if defined(WIN32) || defined(_3DS) 19 | 20 | #else 21 | 22 | #include 23 | #include 24 | 25 | 26 | 27 | #endif 28 | 29 | 30 | #include "JGE.h" 31 | #include "Vector3D.h" 32 | 33 | class JTexture; 34 | 35 | ////////////////////////////////////////////////////////////////////////// 36 | /// Helper class to display Wavefront OBJ model. 37 | /// 38 | ////////////////////////////////////////////////////////////////////////// 39 | class JOBJModel 40 | { 41 | 42 | struct Face 43 | { 44 | int mVertCount; 45 | int mVertIdx[4]; 46 | int mTexIdx[4]; 47 | int mNormalIdx[4]; 48 | }; 49 | 50 | public: 51 | 52 | ////////////////////////////////////////////////////////////////////////// 53 | /// Constructor. 54 | ////////////////////////////////////////////////////////////////////////// 55 | JOBJModel(); 56 | 57 | ~JOBJModel(); 58 | 59 | int ReadLine(char *output, const char *buffer, int start, int size); 60 | 61 | ////////////////////////////////////////////////////////////////////////// 62 | /// Load OBJ model. 63 | /// 64 | /// @param modelName - Name of OBJ file. 65 | /// @param texturenName - Name of texture. 66 | /// 67 | ////////////////////////////////////////////////////////////////////////// 68 | bool Load(const char *modelName, const char *textureName); 69 | 70 | ////////////////////////////////////////////////////////////////////////// 71 | /// Render the model to screen. 72 | /// 73 | ////////////////////////////////////////////////////////////////////////// 74 | void Render(); 75 | 76 | private: 77 | int mPolycount; 78 | Vertex3D* mPolygons; 79 | JTexture* mTexture; 80 | }; 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /jge/JGE/include/JParticle.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE++ is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // 9 | //------------------------------------------------------------------------------------- 10 | 11 | #ifndef __PARTICLE_H__ 12 | #define __PARTICLE_H__ 13 | 14 | #include "JApp.h" 15 | #include "JRenderer.h" 16 | #include "Vector2D.h" 17 | 18 | 19 | #define MAX_KEYS 8 20 | 21 | class JParticleData 22 | { 23 | public: 24 | JParticleData(); 25 | void Init(); 26 | void Clear(); 27 | void AddKey(float keyTime, float keyValue); 28 | void Update(float dt); 29 | void SetScale(float scale); 30 | 31 | float mCurr; 32 | float mTarget; 33 | float mDelta; 34 | float mTimer; 35 | int mKeyCount; 36 | int mKeyIndex; 37 | float mKeyTime[MAX_KEYS]; 38 | float mKeyValue[MAX_KEYS]; 39 | 40 | float mScale; 41 | }; 42 | 43 | 44 | enum ParticleField 45 | { 46 | FIELD_SPEED, 47 | FIELD_SIZE, 48 | FIELD_ROTATION, 49 | FIELD_ALPHA, 50 | FIELD_RED, 51 | FIELD_GREEN, 52 | FIELD_BLUE, 53 | FIELD_RADIAL_ACCEL, 54 | FIELD_TANGENTIAL_ACCEL, 55 | FIELD_GRAVITY, 56 | FIELD_COUNT 57 | }; 58 | 59 | class JParticle 60 | { 61 | public: 62 | 63 | bool mActive; 64 | 65 | JParticle(); 66 | ~JParticle(); 67 | 68 | bool Update(float dt); 69 | void Render(); 70 | void Init(float lifeTime); 71 | 72 | void InitPosition(float ox, float oy, float xoffset, float yoffset); 73 | void SetPosition(float x, float y); 74 | void SetQuad(JQuad *quad); 75 | 76 | JParticleData* GetField(int index); 77 | JParticleData* GetDataPtr(); 78 | 79 | void Move(float x, float y); 80 | void SetVelocity(float x, float y); 81 | void SetSize(float size); 82 | 83 | 84 | private: 85 | static JRenderer* mRenderer; 86 | JQuad* mQuad; 87 | 88 | Vector2D mOrigin; 89 | Vector2D mPos; 90 | Vector2D mVelocity; 91 | 92 | //float mSpeed; 93 | float mSize; 94 | 95 | float mLifetime; 96 | 97 | JParticleData mData[FIELD_COUNT]; 98 | 99 | 100 | 101 | 102 | }; 103 | 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /jge/JGE/include/New Text Document.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/include/New Text Document.txt -------------------------------------------------------------------------------- /jge/JGE/include/Vector3D.h: -------------------------------------------------------------------------------- 1 | #ifndef __VECTOR3D_H_ 2 | #define __VECTOR3D_H_ 3 | 4 | #include 5 | 6 | 7 | /*************************** Macros and constants ***************************/ 8 | // returns a number ranging from -1.0 to 1.0 9 | #define FRAND (((float)rand()-(float)rand())/RAND_MAX) 10 | #define Clamp(x, min, max) x = (x 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | char *prx_static_init(); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /jge/JGE/include/hge/hgedistort.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Haaf's Game Engine 1.7 3 | ** Copyright (C) 2003-2007, Relish Games 4 | ** hge.relishgames.com 5 | ** 6 | ** hgeDistortionMesh helper class header 7 | */ 8 | 9 | 10 | #ifndef HGEDISTORT_H 11 | #define HGEDISTORT_H 12 | 13 | 14 | //#include "hge.h" 15 | #include "../JTypes.h" 16 | 17 | 18 | #define HGEDISP_NODE 0 19 | #define HGEDISP_TOPLEFT 1 20 | #define HGEDISP_CENTER 2 21 | 22 | class JTexture; 23 | class JQuad; 24 | 25 | /* 26 | ** HGE Distortion mesh class 27 | */ 28 | class hgeDistortionMesh 29 | { 30 | public: 31 | hgeDistortionMesh(int cols, int rows); 32 | hgeDistortionMesh(const hgeDistortionMesh &dm); 33 | ~hgeDistortionMesh(); 34 | 35 | hgeDistortionMesh& operator= (const hgeDistortionMesh &dm); 36 | 37 | void Render(float x, float y); 38 | void Clear(PIXEL_TYPE col=ARGB(0xFF,0xFF,0xFF,0xFF), float z=0.5f); 39 | 40 | void SetTexture(JTexture* tex); 41 | void SetTextureRect(float x, float y, float w, float h); 42 | void SetBlendMode(int blend); 43 | void SetZ(int col, int row, float z); 44 | void SetColor(int col, int row, PIXEL_TYPE color); 45 | void SetDisplacement(int col, int row, float dx, float dy, int ref); 46 | 47 | JTexture* GetTexture() const {return quad->mTex;} 48 | void GetTextureRect(float *x, float *y, float *w, float *h) const { *x=tx; *y=ty; *w=width; *h=height; } 49 | int GetBlendMode() const { return 0; } 50 | float GetZ(int col, int row) const; 51 | PIXEL_TYPE GetColor(int col, int row) const; 52 | void GetDisplacement(int col, int row, float *dx, float *dy, int ref) const; 53 | 54 | int GetRows() { return nRows; } 55 | int GetCols() { return nCols; } 56 | 57 | private: 58 | hgeDistortionMesh(); 59 | 60 | //static HGE *hge; 61 | 62 | Vertex *disp_array; 63 | int nRows, nCols; 64 | float cellw,cellh; 65 | float tx,ty,width,height; 66 | JQuad* quad; 67 | }; 68 | 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /jge/JGE/include/hge/hgefont.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Haaf's Game Engine 1.7 3 | ** Copyright (C) 2003-2007, Relish Games 4 | ** hge.relishgames.com 5 | ** 6 | ** hgeFont helper class header 7 | */ 8 | 9 | 10 | #ifndef HGEFONT_H 11 | #define HGEFONT_H 12 | 13 | #include "../JTypes.h" 14 | //#include "hge.h" 15 | //#include "hgesprite.h" 16 | 17 | 18 | #define HGETEXT_LEFT 0 19 | #define HGETEXT_RIGHT 1 20 | #define HGETEXT_CENTER 2 21 | #define HGETEXT_HORZMASK 0x03 22 | 23 | #define HGETEXT_TOP 0 24 | #define HGETEXT_BOTTOM 4 25 | #define HGETEXT_MIDDLE 8 26 | #define HGETEXT_VERTMASK 0x0C 27 | 28 | class JTexture; 29 | class JQuad; 30 | /* 31 | ** HGE Font class 32 | */ 33 | class hgeFont 34 | { 35 | public: 36 | hgeFont(const char *filename, bool bMipmap=false); 37 | ~hgeFont(); 38 | 39 | void Render(float x, float y, int align, const char *string); 40 | void printf(float x, float y, int align, const char *format, ...); 41 | void printfb(float x, float y, float w, float h, int align, const char *format, ...); 42 | 43 | void SetColor(PIXEL_TYPE col); 44 | void SetZ(float z); 45 | void SetBlendMode(int blend); 46 | void SetScale(float scale) {fScale=scale;} 47 | void SetProportion(float prop) { fProportion=prop; } 48 | void SetRotation(float rot) {fRot=rot;} 49 | void SetTracking(float tracking) {fTracking=tracking;} 50 | void SetSpacing(float spacing) {fSpacing=spacing;} 51 | 52 | PIXEL_TYPE GetColor() const {return dwCol;} 53 | float GetZ() const {return fZ;} 54 | int GetBlendMode() const {return nBlend;} 55 | float GetScale() const {return fScale;} 56 | float GetProportion() const { return fProportion; } 57 | float GetRotation() const {return fRot;} 58 | float GetTracking() const {return fTracking;} 59 | float GetSpacing() const {return fSpacing;} 60 | 61 | JQuad* GetSprite(char chr) const { return letters[(unsigned char)chr]; } 62 | float GetHeight() const { return fHeight; } 63 | float GetStringWidth(const char *string) const; 64 | 65 | private: 66 | hgeFont(); 67 | hgeFont(const hgeFont &fnt); 68 | hgeFont& operator= (const hgeFont &fnt); 69 | 70 | char* _get_line(char *file, char *line); 71 | 72 | //static HGE *hge; 73 | 74 | static char buffer[256]; 75 | 76 | JTexture* hTexture; 77 | JQuad* letters[256]; 78 | float pre[256]; 79 | float post[256]; 80 | float fHeight; 81 | float fScale; 82 | float fProportion; 83 | float fRot; 84 | float fTracking; 85 | float fSpacing; 86 | 87 | PIXEL_TYPE dwCol; 88 | float fZ; 89 | int nBlend; 90 | }; 91 | 92 | 93 | #endif 94 | -------------------------------------------------------------------------------- /jge/JGE/include/hge/hgerect.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Haaf's Game Engine 1.7 3 | ** Copyright (C) 2003-2007, Relish Games 4 | ** hge.relishgames.com 5 | ** 6 | ** hgeRect helper class 7 | */ 8 | 9 | 10 | #ifndef HGERECT_H 11 | #define HGERECT_H 12 | 13 | 14 | class hgeRect 15 | { 16 | public: 17 | float x1, y1, x2, y2; 18 | 19 | hgeRect(float _x1, float _y1, float _x2, float _y2) {x1=_x1; y1=_y1; x2=_x2; y2=_y2; bClean=false; } 20 | hgeRect() {bClean=true;} 21 | 22 | void Clear() {bClean=true;} 23 | bool IsClean() const {return bClean;} 24 | void Set(float _x1, float _y1, float _x2, float _y2) { x1=_x1; x2=_x2; y1=_y1; y2=_y2; bClean=false; } 25 | void SetRadius(float x, float y, float r) { x1=x-r; x2=x+r; y1=y-r; y2=y+r; bClean=false; } 26 | void Encapsulate(float x, float y); 27 | bool TestPoint(float x, float y) const; 28 | bool Intersect(const hgeRect *rect) const; 29 | 30 | private: 31 | bool bClean; 32 | }; 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /jge/JGE/include/hge/hgevector.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Haaf's Game Engine 1.7 3 | ** Copyright (C) 2003-2007, Relish Games 4 | ** hge.relishgames.com 5 | ** 6 | ** hgeVector helper class 7 | */ 8 | 9 | 10 | #ifndef HGEVECTOR_H 11 | #define HGEVECTOR_H 12 | 13 | 14 | //#include "hge.h" 15 | #include 16 | 17 | 18 | /* 19 | ** Fast 1.0/sqrtf(float) routine 20 | */ 21 | float InvSqrt(float x); 22 | 23 | class hgeVector 24 | { 25 | public: 26 | float x,y; 27 | 28 | hgeVector(float _x, float _y) { x=_x; y=_y; } 29 | hgeVector() { x=0; y=0; } 30 | 31 | hgeVector operator- () const { return hgeVector(-x, -y); } 32 | hgeVector operator- (const hgeVector &v) const { return hgeVector(x-v.x, y-v.y); } 33 | hgeVector operator+ (const hgeVector &v) const { return hgeVector(x+v.x, y+v.y); } 34 | hgeVector& operator-= (const hgeVector &v) { x-=v.x; y-=v.y; return *this; } 35 | hgeVector& operator+= (const hgeVector &v) { x+=v.x; y+=v.y; return *this; } 36 | bool operator== (const hgeVector &v) const { return (x==v.x && y==v.y); } 37 | bool operator!= (const hgeVector &v) const { return (x!=v.x || y!=v.y); } 38 | 39 | hgeVector operator/ (const float scalar) const { return hgeVector(x/scalar, y/scalar); } 40 | hgeVector operator* (const float scalar) const { return hgeVector(x*scalar, y*scalar); } 41 | hgeVector& operator*= (const float scalar) { x*=scalar; y*=scalar; return *this; } 42 | 43 | float Dot(const hgeVector *v) const { return x*v->x + y*v->y; } 44 | float Length() const { return sqrtf(Dot(this)); } 45 | float Angle(const hgeVector *v = 0) const; 46 | 47 | void Clamp(const float max) { if(Length() > max) { Normalize(); x *= max; y *= max; } } 48 | hgeVector* Normalize() { float rc=InvSqrt(Dot(this)); x*=rc; y*=rc; return this; } 49 | hgeVector* Rotate(float a); 50 | }; 51 | 52 | inline hgeVector operator* (const float s, const hgeVector &v) { return v*s; } 53 | inline float operator^ (const hgeVector &v, const hgeVector &u) { return v.Angle(&u); } 54 | inline float operator% (const hgeVector &v, const hgeVector &u) { return v.Dot(&u); } 55 | 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | FT_USE_MODULE(autofit_module_class) 2 | FT_USE_MODULE(tt_driver_class) 3 | FT_USE_MODULE(t1_driver_class) 4 | FT_USE_MODULE(cff_driver_class) 5 | FT_USE_MODULE(t1cid_driver_class) 6 | FT_USE_MODULE(pfr_driver_class) 7 | FT_USE_MODULE(t42_driver_class) 8 | FT_USE_MODULE(winfnt_driver_class) 9 | FT_USE_MODULE(pcf_driver_class) 10 | FT_USE_MODULE(psaux_module_class) 11 | FT_USE_MODULE(psnames_module_class) 12 | FT_USE_MODULE(pshinter_module_class) 13 | FT_USE_MODULE(ft_raster1_renderer_class) 14 | FT_USE_MODULE(sfnt_module_class) 15 | FT_USE_MODULE(ft_smooth_renderer_class) 16 | FT_USE_MODULE(ft_smooth_lcd_renderer_class) 17 | FT_USE_MODULE(ft_smooth_lcdv_renderer_class) 18 | FT_USE_MODULE(otv_module_class) 19 | FT_USE_MODULE(bdf_driver_class) 20 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/ftstroke.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/include/psp/freetype2/freetype/ftstroke.h -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/ftwinfnt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/include/psp/freetype2/freetype/ftwinfnt.h -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/internal/pcftypes.h: -------------------------------------------------------------------------------- 1 | /* pcftypes.h 2 | 3 | FreeType font driver for pcf fonts 4 | 5 | Copyright (C) 2000, 2001, 2002 by 6 | Francesco Zappa Nardelli 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | */ 26 | 27 | 28 | #ifndef __PCFTYPES_H__ 29 | #define __PCFTYPES_H__ 30 | 31 | 32 | #include 33 | #include FT_FREETYPE_H 34 | 35 | 36 | FT_BEGIN_HEADER 37 | 38 | 39 | typedef struct PCF_Public_FaceRec_ 40 | { 41 | FT_FaceRec root; 42 | FT_StreamRec gzip_stream; 43 | FT_Stream gzip_source; 44 | 45 | char* charset_encoding; 46 | char* charset_registry; 47 | 48 | } PCF_Public_FaceRec, *PCF_Public_Face; 49 | 50 | 51 | FT_END_HEADER 52 | 53 | #endif /* __PCFTYPES_H__ */ 54 | 55 | 56 | /* END */ 57 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/internal/svbdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svbdf.h */ 4 | /* */ 5 | /* The FreeType BDF services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVBDF_H__ 20 | #define __SVBDF_H__ 21 | 22 | #include FT_BDF_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_BDF "bdf" 30 | 31 | typedef FT_Error 32 | (*FT_BDF_GetCharsetIdFunc)( FT_Face face, 33 | const char* *acharset_encoding, 34 | const char* *acharset_registry ); 35 | 36 | typedef FT_Error 37 | (*FT_BDF_GetPropertyFunc)( FT_Face face, 38 | const char* prop_name, 39 | BDF_PropertyRec *aproperty ); 40 | 41 | 42 | FT_DEFINE_SERVICE( BDF ) 43 | { 44 | FT_BDF_GetCharsetIdFunc get_charset_id; 45 | FT_BDF_GetPropertyFunc get_property; 46 | }; 47 | 48 | /* */ 49 | 50 | 51 | FT_END_HEADER 52 | 53 | 54 | #endif /* __SVBDF_H__ */ 55 | 56 | 57 | /* END */ 58 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/internal/svgldict.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svgldict.h */ 4 | /* */ 5 | /* The FreeType glyph dictionary services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVGLDICT_H__ 20 | #define __SVGLDICT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A service used to retrieve glyph names, as well as to find the 30 | * index of a given glyph name in a font. 31 | * 32 | */ 33 | 34 | #define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" 35 | 36 | 37 | typedef FT_Error 38 | (*FT_GlyphDict_GetNameFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_Pointer buffer, 41 | FT_UInt buffer_max ); 42 | 43 | typedef FT_UInt 44 | (*FT_GlyphDict_NameIndexFunc)( FT_Face face, 45 | FT_String* glyph_name ); 46 | 47 | 48 | FT_DEFINE_SERVICE( GlyphDict ) 49 | { 50 | FT_GlyphDict_GetNameFunc get_name; 51 | FT_GlyphDict_NameIndexFunc name_index; /* optional */ 52 | }; 53 | 54 | /* */ 55 | 56 | 57 | FT_END_HEADER 58 | 59 | 60 | #endif /* __SVGLDICT_H__ */ 61 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/internal/svotval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svotval.h */ 4 | /* */ 5 | /* The FreeType OpenType validation service (specification). */ 6 | /* */ 7 | /* Copyright 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVOTVAL_H__ 20 | #define __SVOTVAL_H__ 21 | 22 | 23 | FT_BEGIN_HEADER 24 | 25 | 26 | #define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" 27 | 28 | 29 | typedef FT_Error 30 | (*otv_validate_func)( FT_Face face, 31 | FT_UInt ot_flags, 32 | FT_Bytes *base, 33 | FT_Bytes *gdef, 34 | FT_Bytes *gpos, 35 | FT_Bytes *gsub, 36 | FT_Bytes *jstf ); 37 | 38 | 39 | FT_DEFINE_SERVICE( OTvalidate ) 40 | { 41 | otv_validate_func validate; 42 | }; 43 | 44 | /* */ 45 | 46 | 47 | FT_END_HEADER 48 | 49 | 50 | #endif /* __SVOTVAL_H__ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/internal/svpostnm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpostnm.h */ 4 | /* */ 5 | /* The FreeType PostScript name services (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPOSTNM_H__ 20 | #define __SVPOSTNM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | /* 28 | * A trivial service used to retrieve the PostScript name of a given 29 | * font when available. The `get_name' field should never be NULL. 30 | * 31 | * The correponding function can return NULL to indicate that the 32 | * PostScript name is not available. 33 | * 34 | * The name is owned by the face and will be destroyed with it. 35 | */ 36 | 37 | #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" 38 | 39 | 40 | typedef const char* 41 | (*FT_PsName_GetFunc)( FT_Face face ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsFontName ) 45 | { 46 | FT_PsName_GetFunc get_ps_font_name; 47 | }; 48 | 49 | /* */ 50 | 51 | 52 | FT_END_HEADER 53 | 54 | 55 | #endif /* __SVPOSTNM_H__ */ 56 | 57 | 58 | /* END */ 59 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/internal/svpsinfo.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svpsinfo.h */ 4 | /* */ 5 | /* The FreeType PostScript info service (specification). */ 6 | /* */ 7 | /* Copyright 2003, 2004 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVPSINFO_H__ 20 | #define __SVPSINFO_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_INTERNAL_TYPE1_TYPES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info" 30 | 31 | 32 | typedef FT_Error 33 | (*PS_GetFontInfoFunc)( FT_Face face, 34 | PS_FontInfoRec* afont_info ); 35 | 36 | typedef FT_Int 37 | (*PS_HasGlyphNamesFunc)( FT_Face face ); 38 | 39 | typedef FT_Error 40 | (*PS_GetFontPrivateFunc)( FT_Face face, 41 | PS_PrivateRec* afont_private ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsInfo ) 45 | { 46 | PS_GetFontInfoFunc ps_get_font_info; 47 | PS_HasGlyphNamesFunc ps_has_glyph_names; 48 | PS_GetFontPrivateFunc ps_get_font_private; 49 | }; 50 | 51 | /* */ 52 | 53 | 54 | FT_END_HEADER 55 | 56 | 57 | #endif /* __SVPSINFO_H__ */ 58 | 59 | 60 | /* END */ 61 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/internal/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svwinfnt.h */ 4 | /* */ 5 | /* The FreeType Windows FNT/FONT service (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVWINFNT_H__ 20 | #define __SVWINFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_WINFONTS_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* __SVWINFNT_H__ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/internal/svxf86nm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svxf86nm.h */ 4 | /* */ 5 | /* The FreeType XFree86 services (specification only). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVXF86NM_H__ 20 | #define __SVXF86NM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data 31 | * is a simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" 35 | 36 | #define FT_XF86_FORMAT_TRUETYPE "TrueType" 37 | #define FT_XF86_FORMAT_TYPE_1 "Type 1" 38 | #define FT_XF86_FORMAT_BDF "BDF" 39 | #define FT_XF86_FORMAT_PCF "PCF" 40 | #define FT_XF86_FORMAT_TYPE_42 "Type 42" 41 | #define FT_XF86_FORMAT_CID "CID Type 1" 42 | #define FT_XF86_FORMAT_CFF "CFF" 43 | #define FT_XF86_FORMAT_PFR "PFR" 44 | #define FT_XF86_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVXF86NM_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/freetype2/freetype/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* Written by Graham Asher */ 11 | /* */ 12 | /* This file is part of the FreeType project, and may only be used, */ 13 | /* modified, and distributed under the terms of the FreeType project */ 14 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /***************************************************************************/ 19 | 20 | 21 | #ifndef __TTUNPAT_H__ 22 | #define __TTUNPAT_H__ 23 | 24 | 25 | #include 26 | #include FT_FREETYPE_H 27 | 28 | #ifdef FREETYPE_H 29 | #error "freetype.h of FreeType 1 has been loaded!" 30 | #error "Please fix the directory search order for header files" 31 | #error "so that freetype.h of FreeType 2 is found first." 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | 38 | /*************************************************************************** 39 | * 40 | * @constant: 41 | * FT_PARAM_TAG_UNPATENTED_HINTING 42 | * 43 | * @description: 44 | * A constant used as the tag of an @FT_Parameter structure to indicate 45 | * that unpatented methods only should be used by the TrueType bytecode 46 | * interpreter for a typeface opened by FT_Open_Face. 47 | * 48 | */ 49 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 50 | 51 | /* */ 52 | 53 | FT_END_HEADER 54 | 55 | 56 | #endif /* __TTUNPAT_H__ */ 57 | 58 | 59 | /* END */ 60 | -------------------------------------------------------------------------------- /jge/JGE/include/psp/jconfig.h: -------------------------------------------------------------------------------- 1 | /* JDCT_FLOAT is faster than JDCT_ISLOW and is almost as fast 2 | as JDCT_IFAST on the PSP, so make it the default */ 3 | #define JDCT_DEFAULT JDCT_FLOAT 4 | 5 | #define HAVE_PROTOTYPES 6 | #define HAVE_UNSIGNED_CHAR 7 | #define HAVE_UNSIGNED_SHORT 8 | #undef void 9 | #undef const 10 | #undef CHAR_IS_UNSIGNED 11 | #define HAVE_STDDEF_H 12 | #define HAVE_STDLIB_H 13 | #undef NEED_BSD_STRINGS 14 | #undef NEED_SYS_TYPES_H 15 | #undef NEED_FAR_POINTERS 16 | #undef NEED_SHORT_EXTERNAL_NAMES 17 | /* Define this if you get warnings about undefined structures. */ 18 | #undef INCOMPLETE_TYPES_BROKEN 19 | 20 | #ifdef JPEG_INTERNALS 21 | 22 | #undef RIGHT_SHIFT_IS_UNSIGNED 23 | #define INLINE __inline__ 24 | /* These are for configuring the JPEG memory manager. */ 25 | #undef DEFAULT_MAX_MEM 26 | #undef NO_MKTEMP 27 | 28 | #endif /* JPEG_INTERNALS */ 29 | -------------------------------------------------------------------------------- /jge/JGE/include/unzip/iowin32.h: -------------------------------------------------------------------------------- 1 | /* iowin32.h -- IO base function header for compress/uncompress .zip 2 | files using zlib + zip or unzip API 3 | This IO API version uses the Win32 API (for Microsoft Windows) 4 | 5 | Version 1.01e, February 12th, 2005 6 | 7 | Copyright (C) 1998-2005 Gilles Vollant 8 | */ 9 | 10 | #include 11 | 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /jge/JGE/include/unzip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /jge/JGE/include/vram.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Helper for use with the PSP Software Development Kit - http://www.pspdev.org 3 | * ----------------------------------------------------------------------- 4 | * Licensed under GPL 5 | * 6 | * vram.c - Standard C high performance VRAM allocation routines. 7 | * 8 | * Copyright (c) 2007 Alexander Berl 'Raphael' 9 | * http://wordpress.fx-world.org 10 | * 11 | * 12 | * This program is free software; you can redistribute it and/or modify 13 | * it under the terms of the GNU General Public License as published by 14 | * the Free Software Foundation; either version 2 of the License, or 15 | * (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | #ifndef vram_h__ 27 | #define vram_h__ 28 | 29 | #include 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | void* vrelptr( void *ptr ); // make a pointer relative to memory base address (ATTENTION: A NULL rel ptr is not illegal/invalid!) 36 | void* vabsptr( void *ptr ); // make a pointer absolute (default return type of valloc) 37 | 38 | void* valloc( size_t size ); 39 | void vfree( void* ptr ); 40 | size_t vmemavail(); 41 | size_t vlargestblock(); 42 | 43 | 44 | #ifdef _DEBUG 45 | // Debug printf (to stdout) a trace of the current Memblocks 46 | void __memwalk(); 47 | #endif 48 | 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif // ifdef vram_h__ 55 | -------------------------------------------------------------------------------- /jge/JGE/mk1xx.bat: -------------------------------------------------------------------------------- 1 | make clean 2 | make 1xx 3 | make clean 4 | pause 5 | -------------------------------------------------------------------------------- /jge/JGE/mk3xx.bat: -------------------------------------------------------------------------------- 1 | make clean 2 | make 3xx 3 | make clean 4 | pause 5 | -------------------------------------------------------------------------------- /jge/JGE/src/JApp.cpp: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE++ is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // 9 | //------------------------------------------------------------------------------------- 10 | 11 | #include "../include/JApp.h" 12 | #include "../include/JGE.h" 13 | 14 | 15 | JApp::JApp() 16 | { 17 | //mEngine = JGE::GetInstance(); 18 | //mEngine->SetApp(this); 19 | } 20 | 21 | 22 | JApp::~JApp() 23 | { 24 | } 25 | 26 | // 27 | // JGE* JApp::GetJGE() 28 | // { 29 | // return mEngine; 30 | // } 31 | -------------------------------------------------------------------------------- /jge/JGE/src/JInputSystem.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/src/JInputSystem.cpp -------------------------------------------------------------------------------- /jge/JGE/src/Vector2D.cpp: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE++ is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // 9 | //------------------------------------------------------------------------------------- 10 | 11 | 12 | #include "../include/Vector2D.h" 13 | 14 | 15 | float Vector2D::Length(void) const 16 | { 17 | return sqrtf(x*x + y*y); 18 | } 19 | 20 | float Vector2D::Normalize(void) 21 | { 22 | float fLength = Length(); 23 | 24 | if (fLength == 0.0f) 25 | return 0.0f; 26 | 27 | (*this) *= (1.0f / fLength); 28 | 29 | return fLength; 30 | } 31 | 32 | 33 | Vector2D Vector2D::Direction(void) const 34 | { 35 | Vector2D temp(*this); 36 | 37 | temp.Normalize(); 38 | 39 | return temp; 40 | } 41 | 42 | float Vector2D::Angle(const Vector2D& xE) 43 | { 44 | float dot = (*this) * xE; 45 | float cross = (*this) ^ xE; 46 | 47 | // angle between segments 48 | float angle = atan2f(cross, dot); 49 | 50 | return angle; 51 | } 52 | 53 | 54 | Vector2D& Vector2D::Rotate(float angle) 55 | { 56 | float tx = x; 57 | x = x * cosf(angle) - y * sinf(angle); 58 | y = tx * sinf(angle) + y * cosf(angle); 59 | 60 | return *this; 61 | } 62 | 63 | 64 | 65 | Vector2D& Vector2D::Rotate(const Vector2D& xCentre, float fAngle) 66 | { 67 | Vector2D D = *this - xCentre; 68 | D.Rotate(fAngle); 69 | 70 | *this = xCentre + D; 71 | 72 | return *this; 73 | } 74 | 75 | 76 | void Vector2D::Clamp(const Vector2D& min, const Vector2D& max) 77 | { 78 | x = (x < min.x)? min.x : (x > max.x)? max.x : x; 79 | x = (y < min.y)? min.y : (y > max.y)? max.y : y; 80 | } 81 | 82 | -------------------------------------------------------------------------------- /jge/JGE/src/hge/hgecolor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Haaf's Game Engine 1.7 3 | ** Copyright (C) 2003-2007, Relish Games 4 | ** hge.relishgames.com 5 | ** 6 | ** hgeColor*** helper classes implementation 7 | */ 8 | 9 | 10 | #include "../../include/hge/hgecolor.h" 11 | #include 12 | 13 | #ifndef min 14 | #define min(x, y) ((xy)?x:y) 19 | #endif 20 | 21 | void hgeColorHSV::SetHWColor(DWORD col) 22 | { 23 | float r, g, b; 24 | float minv, maxv, delta; 25 | float del_R, del_G, del_B; 26 | 27 | a = (col>>24) / 255.0f; 28 | r = ((col>>16) & 0xFF) / 255.0f; 29 | g = ((col>>8) & 0xFF) / 255.0f; 30 | b = (col & 0xFF) / 255.0f; 31 | 32 | minv = min(min(r, g), b); 33 | maxv = max(max(r, g), b); 34 | delta = maxv - minv; 35 | 36 | v = maxv; 37 | 38 | if (delta == 0) 39 | { 40 | h = 0; 41 | s = 0; 42 | } 43 | else 44 | { 45 | s = delta / maxv; 46 | del_R = (((maxv - r) / 6) + (delta / 2)) / delta; 47 | del_G = (((maxv - g) / 6) + (delta / 2)) / delta; 48 | del_B = (((maxv - b) / 6) + (delta / 2)) / delta; 49 | 50 | if (r == maxv) {h = del_B - del_G;} 51 | else if (g == maxv) {h = (1 / 3) + del_R - del_B;} 52 | else if (b == maxv) {h = (2 / 3) + del_G - del_R;} 53 | 54 | if (h < 0) h += 1; 55 | if (h > 1) h -= 1; 56 | } 57 | } 58 | 59 | DWORD hgeColorHSV::GetHWColor() const 60 | { 61 | float r, g, b; 62 | float xh, i, p1, p2, p3; 63 | 64 | if (s == 0) 65 | { 66 | r = v; 67 | g = v; 68 | b = v; 69 | } 70 | else 71 | { 72 | xh = h * 6; 73 | if(xh == 6) xh=0; 74 | i = floorf(xh); 75 | p1 = v * (1 - s); 76 | p2 = v * (1 - s * (xh - i)); 77 | p3 = v * (1 - s * (1 - (xh - i))); 78 | 79 | if (i == 0) {r = v; g = p3; b = p1;} 80 | else if (i == 1) {r = p2; g = v; b = p1;} 81 | else if (i == 2) {r = p1; g = v; b = p3;} 82 | else if (i == 3) {r = p1; g = p2; b = v; } 83 | else if (i == 4) {r = p3; g = p1; b = v; } 84 | else {r = v; g = p1; b = p2;} 85 | } 86 | 87 | return (ARGB((int)(a*255.0f), (int)(r*255.0f), (int)(g*255.0f), (int)(b*255.0f))); 88 | } 89 | 90 | -------------------------------------------------------------------------------- /jge/JGE/src/hge/hgepmanager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Haaf's Game Engine 1.7 3 | ** Copyright (C) 2003-2007, Relish Games 4 | ** hge.relishgames.com 5 | ** 6 | ** hgeParticleManager helper class implementation 7 | */ 8 | 9 | 10 | #include "../../include/hge/hgeparticle.h" 11 | 12 | 13 | hgeParticleManager::hgeParticleManager() 14 | { 15 | nPS=0; 16 | tX=tY=0.0f; 17 | } 18 | 19 | hgeParticleManager::~hgeParticleManager() 20 | { 21 | int i; 22 | for(i=0;iUpdate(dt); 31 | if(psList[i]->GetAge()==-2.0f && psList[i]->GetParticlesAlive()==0) 32 | { 33 | delete psList[i]; 34 | psList[i]=psList[nPS-1]; 35 | nPS--; 36 | i--; 37 | } 38 | } 39 | } 40 | 41 | void hgeParticleManager::Render() 42 | { 43 | int i; 44 | for(i=0;iRender(); 45 | } 46 | 47 | hgeParticleSystem* hgeParticleManager::SpawnPS(hgeParticleSystemInfo *psi, float x, float y) 48 | { 49 | if(nPS==MAX_PSYSTEMS) return 0; 50 | psList[nPS]=new hgeParticleSystem(psi); 51 | psList[nPS]->FireAt(x,y); 52 | psList[nPS]->Transpose(tX,tY); 53 | nPS++; 54 | return psList[nPS-1]; 55 | } 56 | 57 | bool hgeParticleManager::IsPSAlive(hgeParticleSystem *ps) const 58 | { 59 | int i; 60 | for(i=0;iTranspose(x,y); 68 | tX=x; tY=y; 69 | } 70 | 71 | void hgeParticleManager::KillPS(hgeParticleSystem *ps) 72 | { 73 | int i; 74 | for(i=0;i 12 | 13 | 14 | void hgeRect::Encapsulate(float x, float y) 15 | { 16 | if(bClean) 17 | { 18 | x1=x2=x; 19 | y1=y2=y; 20 | bClean=false; 21 | } 22 | else 23 | { 24 | if(xx2) x2=x; 26 | if(yy2) y2=y; 28 | } 29 | } 30 | 31 | bool hgeRect::TestPoint(float x, float y) const 32 | { 33 | if(x>=x1 && x=y1 && yx1 - rect->x2) < (x2 - x1 + rect->x2 - rect->x1)) 41 | if(fabs(y1 + y2 - rect->y1 - rect->y2) < (y2 - y1 + rect->y2 - rect->y1)) 42 | return true; 43 | 44 | return false; 45 | } 46 | -------------------------------------------------------------------------------- /jge/JGE/src/hge/hgevector.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Haaf's Game Engine 1.7 3 | ** Copyright (C) 2003-2007, Relish Games 4 | ** hge.relishgames.com 5 | ** 6 | ** hgeVector helper class implementation 7 | */ 8 | 9 | 10 | #include "../../include/hge/hgevector.h" 11 | 12 | float InvSqrt(float x) 13 | { 14 | union 15 | { 16 | int intPart; 17 | float floatPart; 18 | } convertor; 19 | 20 | convertor.floatPart = x; 21 | convertor.intPart = 0x5f3759df - (convertor.intPart >> 1); 22 | return convertor.floatPart*(1.5f - 0.4999f*x*convertor.floatPart*convertor.floatPart); 23 | } 24 | 25 | /* 26 | hgeVector *hgeVector::Normalize() 27 | { 28 | float lenRcp; 29 | 30 | lenRcp=sqrtf(Dot(this)); 31 | 32 | if(lenRcp) 33 | { 34 | lenRcp=1.0f/lenRcp; 35 | 36 | x*=lenRcp; 37 | y*=lenRcp; 38 | } 39 | 40 | return this; 41 | } 42 | */ 43 | 44 | float hgeVector::Angle(const hgeVector *v) const 45 | { 46 | if(v) 47 | { 48 | hgeVector s=*this, t=*v; 49 | 50 | s.Normalize(); t.Normalize(); 51 | return acosf(s.Dot(&t)); 52 | } 53 | else return atan2f(y, x); 54 | } 55 | 56 | hgeVector *hgeVector::Rotate(float a) 57 | { 58 | hgeVector v; 59 | 60 | v.x=x*cosf(a) - y*sinf(a); 61 | v.y=x*sinf(a) + y*cosf(a); 62 | 63 | x=v.x; y=v.y; 64 | 65 | return this; 66 | } 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /jge/JGE/src/psp/JAudio.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/src/psp/JAudio.cpp -------------------------------------------------------------------------------- /jge/JGE/src/psp/JAudio3.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/src/psp/JAudio3.cpp -------------------------------------------------------------------------------- /jge/JGE/src/tinyxml/tinystr.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/JGE/src/tinyxml/tinystr.cpp -------------------------------------------------------------------------------- /jge/JGE/src/tinyxml/tinyxmlerror.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | www.sourceforge.net/projects/tinyxml 3 | Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com) 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any 7 | damages arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any 10 | purpose, including commercial applications, and to alter it and 11 | redistribute it freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must 14 | not claim that you wrote the original software. If you use this 15 | software in a product, an acknowledgment in the product documentation 16 | would be appreciated but is not required. 17 | 18 | 2. Altered source versions must be plainly marked as such, and 19 | must not be misrepresented as being the original software. 20 | 21 | 3. This notice may not be removed or altered from any source 22 | distribution. 23 | */ 24 | 25 | #include "tinyxml.h" 26 | 27 | // The goal of the seperate error file is to make the first 28 | // step towards localization. tinyxml (currently) only supports 29 | // english error messages, but the could now be translated. 30 | // 31 | // It also cleans up the code a bit. 32 | // 33 | 34 | const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] = 35 | { 36 | "No error", 37 | "Error", 38 | "Failed to open file", 39 | "Memory allocation failed.", 40 | "Error parsing Element.", 41 | "Failed to read Element name", 42 | "Error reading Element value.", 43 | "Error reading Attributes.", 44 | "Error: empty tag.", 45 | "Error reading end tag.", 46 | "Error parsing Unknown.", 47 | "Error parsing Comment.", 48 | "Error parsing Declaration.", 49 | "Error document empty.", 50 | "Error null (0) or unexpected EOF found in input stream.", 51 | "Error parsing CDATA.", 52 | }; 53 | -------------------------------------------------------------------------------- /jge/JGE/src/unzip/ChangeLogUnzip: -------------------------------------------------------------------------------- 1 | Change in 1.01e (12 feb 05) 2 | - Fix in zipOpen2 for globalcomment (Rolf Kalbermatter) 3 | - Fix possible memory leak in unzip.c (Zoran Stevanovic) 4 | 5 | Change in 1.01b (20 may 04) 6 | - Integrate patch from Debian package (submited by Mark Brown) 7 | - Add tools mztools from Xavier Roche 8 | 9 | Change in 1.01 (8 may 04) 10 | - fix buffer overrun risk in unzip.c (Xavier Roche) 11 | - fix a minor buffer insecurity in minizip.c (Mike Whittaker) 12 | 13 | Change in 1.00: (10 sept 03) 14 | - rename to 1.00 15 | - cosmetic code change 16 | 17 | Change in 0.22: (19 May 03) 18 | - crypting support (unless you define NOCRYPT) 19 | - append file in existing zipfile 20 | 21 | Change in 0.21: (10 Mar 03) 22 | - bug fixes 23 | 24 | Change in 0.17: (27 Jan 02) 25 | - bug fixes 26 | 27 | Change in 0.16: (19 Jan 02) 28 | - Support of ioapi for virtualize zip file access 29 | 30 | Change in 0.15: (19 Mar 98) 31 | - fix memory leak in minizip.c 32 | 33 | Change in 0.14: (10 Mar 98) 34 | - fix bugs in minizip.c sample for zipping big file 35 | - fix problem in month in date handling 36 | - fix bug in unzlocal_GetCurrentFileInfoInternal in unzip.c for 37 | comment handling 38 | 39 | Change in 0.13: (6 Mar 98) 40 | - fix bugs in zip.c 41 | - add real minizip sample 42 | 43 | Change in 0.12: (4 Mar 98) 44 | - add zip.c and zip.h for creates .zip file 45 | - fix change_file_date in miniunz.c for Unix (Jean-loup Gailly) 46 | - fix miniunz.c for file without specific record for directory 47 | 48 | Change in 0.11: (3 Mar 98) 49 | - fix bug in unzGetCurrentFileInfo for get extra field and comment 50 | - enhance miniunz sample, remove the bad unztst.c sample 51 | 52 | Change in 0.10: (2 Mar 98) 53 | - fix bug in unzReadCurrentFile 54 | - rename unzip* to unz* function and structure 55 | - remove Windows-like hungary notation variable name 56 | - modify some structure in unzip.h 57 | - add somes comment in source 58 | - remove unzipGetcCurrentFile function 59 | - replace ZUNZEXPORT by ZEXPORT 60 | - add unzGetLocalExtrafield for get the local extrafield info 61 | - add a new sample, miniunz.c 62 | 63 | Change in 0.4: (25 Feb 98) 64 | - suppress the type unzipFileInZip. 65 | Only on file in the zipfile can be open at the same time 66 | - fix somes typo in code 67 | - added tm_unz structure in unzip_file_info (date/time in readable format) 68 | -------------------------------------------------------------------------------- /jge/JGE/src/unzip/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-O -I../.. 3 | 4 | UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a 5 | ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a 6 | 7 | .c.o: 8 | $(CC) -c $(CFLAGS) $*.c 9 | 10 | all: miniunz minizip 11 | 12 | miniunz: $(UNZ_OBJS) 13 | $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) 14 | 15 | minizip: $(ZIP_OBJS) 16 | $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) 17 | 18 | test: miniunz minizip 19 | ./minizip test readme.txt 20 | ./miniunz -l test.zip 21 | mv readme.txt readme.old 22 | ./miniunz test.zip 23 | 24 | clean: 25 | /bin/rm -f *.o *~ minizip miniunz 26 | -------------------------------------------------------------------------------- /jge/JGE/src/unzip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /jge/JGE/src/unzip/win32/iowin32.h: -------------------------------------------------------------------------------- 1 | /* iowin32.h -- IO base function header for compress/uncompress .zip 2 | files using zlib + zip or unzip API 3 | This IO API version uses the Win32 API (for Microsoft Windows) 4 | 5 | Version 1.01e, February 12th, 2005 6 | 7 | Copyright (C) 1998-2005 Gilles Vollant 8 | */ 9 | 10 | #include 11 | 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2007, James Hui (a.k.a. Dr.Watson) 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 15 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 16 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 17 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 18 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 19 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 20 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | $(MAKE) -f Makefile.1xx SCEkxploit 3 | 4 | 1xx: 5 | $(MAKE) -f Makefile.1xx SCEkxploit 6 | 7 | 3xx: 8 | $(MAKE) -f Makefile.3xx 9 | 10 | clean: 11 | $(MAKE) -f Makefile.1xx clean 12 | $(MAKE) -f Makefile.3xx clean 13 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/Makefile.1xx: -------------------------------------------------------------------------------- 1 | TARGET = cspsp 2 | OBJS = src/GameApp.o src/GameLauncher.o src/Person.o src/TileMap.o src/Bullet.o src/AI.o src/ParticleEngine.o src/Particle.o src/MenuItem.o src/GunObject.o src/SfxManager.o src/Node.o src/BuyMenu.o src/TeamMenu.o src/Hud.o src/Camera.o src/Wlan.o src/Globals.o src/Packet.o src/UdpManager.o src/Game.o src/PersonOnline.o src/Collision.o src/GunObjectOnline.o src/Danzeff.o src/BulletOnline.o src/GameState.o src/mp3player.o src/Grenade.o src/Grid.o src/AStar.o 3 | 4 | 5 | CFLAGS = -O2 -G0 -Wall -DDEVHOOK -g 6 | CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti 7 | ASFLAGS = $(CXXFLAGS) 8 | 9 | INCDIR = ../../JGE/include ../../JGE/include/psp ../../JGE/include/psp/freetype2 ../../JGE/src 10 | LIBDIR = ../../JGE/lib/psp 11 | LDFLAGS = 12 | LIBS = -lhgetools -ljge100 -lfreetype -ljpeg -lgif -lpng -lz -lm -lmad -lmikmod -lmmio -lpsppower -lpspmpeg -lpspaudiocodec -lpspaudiolib -lpspaudio -lpspgum -lpspgu -lpsprtc -lstdc++ -lpspwlan 13 | 14 | EXTRA_TARGETS = EBOOT.PBP 15 | PSP_EBOOT_TITLE = CSPSP 16 | PSP_EBOOT_ICON = icon.png 17 | 18 | PSPSDK=$(shell psp-config --pspsdk-path) 19 | include $(PSPSDK)/lib/build.mak 20 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/Makefile.3xx: -------------------------------------------------------------------------------- 1 | TARGET = cspsp 2 | OBJS = src/IdStorage.o src/GameState.o src/mp3player.o src/GameApp.o src/GameLauncher.o \ 3 | src/GameStateConnect.o src/GameStateLoading.o src/GameStateLobby.o src/GameStateMenu.o \ 4 | src/GameStateNewGame.o src/GameStateOnline.o src/GameStateOptions.o src/GameStatePlay.o \ 5 | src/GameStateSplash.o src/GameStateUpdate.o \ 6 | src/Person.o src/AI.o src/TileMap.o src/Bullet.o src/ParticleEngine.o src/Particle.o src/MenuItem.o src/GunObject.o src/SfxManager.o src/Node.o src/BuyMenu.o src/TeamMenu.o src/Hud.o src/Camera.o src/Wlan.o src/Globals.o src/Packet.o src/UdpManager.o src/Game.o src/PersonOnline.o src/Collision.o src/GunObjectOnline.o src/Danzeff.o src/BulletOnline.o src/Grenade.o src/Grid.o src/AStar.o src/Animation.o src/HttpManager.o \ 7 | src/ListBox.o src/rapmet.o \ 8 | # src/prof.o src/mcount.o 9 | 10 | BUILD_PRX = 1 11 | PSP_FW_VERSION=371 12 | 13 | CFLAGS = -O2 -G0 -Wall -DDEVHOOK -DPSPFW3XX -g -Wno-write-strings 14 | #-pg 15 | CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti 16 | ASFLAGS = $(CXXFLAGS) 17 | 18 | INCDIR = ../../JGE/include ../../JGE/include/psp ../../JGE/include/psp/freetype2 19 | LIBDIR = ../../JGE/lib/psp 20 | LDFLAGS = 21 | LIBS = -lhgetools -ljge300 -lfreetype -ljpeg -lgif -lpng -lz -lm -lmad -lmikmod -lmmio -lpsppower -lpspmpeg -lpspaudiocodec -lpspaudiolib -lpspaudio -lpspgum -lpspgu -lpsprtc -lstdc++ -lpspwlan -lpspopenpsid 22 | 23 | EXTRA_TARGETS = EBOOT.PBP 24 | PSP_EBOOT_TITLE = CSPSP 25 | PSP_EBOOT_ICON = icon.png 26 | 27 | PSPSDK=$(shell psp-config --pspsdk-path) 28 | include $(PSPSDK)/lib/build.mak 29 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/PARAM.SFO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/PARAM.SFO -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/animations.txt: -------------------------------------------------------------------------------- 1 | PRIMARY { 2 | 150 30 15 -60 10 50 0 3 | } 4 | PRIMARY_FIRE { 5 | 50 40 25 -60 0 65 0 6 | 800 30 15 -60 10 50 0 7 | } 8 | PRIMARY_RELOAD { 9 | 100 5 25 -50 -20 30 -30 10 | 100 5 20 -55 -30 70 -50 11 | 100 5 25 -60 10 100 -50 12 | 100 5 25 -60 10 100 -50 13 | 100 5 20 -60 -30 70 -50 14 | 50 10 25 -60 -10 60 -50 15 | 100 5 25 -60 -10 60 -50 16 | 100 5 25 -60 -30 60 -50 17 | 100 40 25 -60 0 45 0 18 | 100 30 15 -60 10 50 0 19 | } 20 | SECONDARY { 21 | 150 5 -10 -40 20 50 0 22 | } 23 | SECONDARY_FIRE { 24 | 100 15 -10 -40 10 60 0 25 | 900 20 0 -50 10 80 0 26 | } 27 | SECONDARY_RELOAD { 28 | 100 -10 0 -50 -20 30 -30 29 | 100 -10 10 -55 -30 70 -50 30 | 100 -10 10 -60 10 100 -60 31 | 100 -10 10 -60 10 100 -60 32 | 100 -10 5 -60 -30 70 -60 33 | 50 -5 10 -60 10 50 -60 34 | 100 -10 10 -60 -10 60 -60 35 | 100 -10 10 -60 -30 60 -60 36 | 100 5 -10 -40 20 50 0 37 | } 38 | KNIFE { 39 | 150 0 20 -40 -10 10 -100 40 | } 41 | KNIFE_SLASH { 42 | 100 -15 -30 -50 -25 10 -110 43 | 100 -30 -30 -50 -40 20 -110 44 | 50 -35 -30 -30 -50 20 -70 45 | 100 -40 20 20 -65 20 -40 46 | 100 -40 20 20 -80 20 -40 47 | 550 0 20 -40 -10 10 -100 48 | } 49 | GRENADE { 50 | 150 0 20 -30 -20 30 60 51 | } 52 | GRENADE_PULLBACK { 53 | 200 45 120 -10 0 20 60 54 | } -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/config.txt: -------------------------------------------------------------------------------- 1 | movement = relative 2 | 3 | music = off 4 | 5 | ff = on 6 | 7 | menu = analog 8 | 9 | name = test 10 | 11 | map = Circle 12 | 13 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/f3.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/data/f3.dat -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/f3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/data/f3.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/f3backdrop.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/data/f3backdrop.dat -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/f3backdrop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/data/f3backdrop.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/favorites.txt: -------------------------------------------------------------------------------- 1 | 2 | 76.174.46.4:42692 3 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/guns.txt: -------------------------------------------------------------------------------- 1 | 28 2 | 0 40 300 0.0 0 0 0 1.2 0.0 0.0 0 2 KNIFE 3 | 1 10 100 0.30 20 4 2100 1.15 1.0 0.0 400 1 GLOCK 4 | 2 15 100 0.20 12 6 1900 1.15 1.0 0.0 500 1 USP 5 | 3 20 100 0.30 13 5 2000 1.15 1.0 0.0 600 1 P228 6 | 4 30 100 0.40 7 6 1600 1.15 1.0 0.0 650 1 DEAGLE 7 | 5 15 100 0.10 20 6 2200 1.15 1.0 0.0 750 1 FIVESEVEN 8 | 6 15 100 0.30 30 5 3800 1.15 1.0 0.0 1000 1 ELITE 9 | 7 18 1100 0.65 8 5 4000 1.0 1.0 0.0 1700 0 M3 10 | 8 18 250 0.50 7 5 2500 1.0 1.0 0.0 3000 0 XM1014 11 | 9 11 85 0.55 30 5 1600 1.05 1.0 0.0 1250 0 TMP 12 | 10 11 85 0.55 30 4 1850 1.05 1.0 0.0 1700 0 MAC10 13 | 11 15 90 0.40 30 5 1700 1.05 1.0 0.0 1500 0 MP5 14 | 12 20 100 0.35 25 5 1900 1.05 1.0 0.0 1400 0 UMP 15 | 13 12 70 0.40 50 3 1900 1.05 1.0 0.0 2350 0 P90 16 | 14 20 65 0.40 25 4 2000 1.0 1.0 0.0 2250 0 FAMAS 17 | 15 25 90 0.40 35 4 1900 1.0 1.0 0.0 2000 0 GALIL 18 | 16 70 1200 0.30 10 10 1500 1.2 2.0 0.30 2750 0 SCOUT 19 | 17 25 100 0.25 30 4 2100 1.0 1.0 0.0 3100 0 M4A1 20 | 18 30 100 0.35 30 4 2100 1.0 1.0 0.0 2500 0 AK47 21 | 19 25 95 0.30 30 4 2500 1.0 1.0 0.0 3500 0 AUG 22 | 20 25 95 0.30 30 4 2400 1.0 1.0 0.0 3500 0 SG552 23 | 21 70 250 0.60 30 4 2200 0.9 2.0 0.15 4200 0 SG550 24 | 22 70 300 0.60 20 5 3200 0.9 2.0 0.15 5000 0 G3SG1 25 | 23 100 1400 0.60 10 4 2300 0.85 2.0 0.15 4750 0 AWP 26 | 24 20 95 0.55 100 2 4200 0.85 1.0 0.0 5750 0 M249 27 | 25 0 1000 0.0 1 1 0 1.15 0.0 0.0 200 3 FLASHBANG 28 | 26 100 1000 0.0 1 1 0 1.15 0.0 0.0 300 3 HE-GRENADE 29 | 27 0 1000 0.0 1 1 0 1.15 0.0 0.0 300 3 SMOKE-GRENADE 30 | 31 | 32 | 33 | 34 | quad damage delay spread clip #ofclips reloaddelay walkingspeed bulletspeed viewangle money type name -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/idstorage.prx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/data/idstorage.prx -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/data/rapmet.prx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/data/rapmet.prx -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/ammo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/ammo.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/bg.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/bg.PNG -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/buyzone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/buyzone.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/controls.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/ctf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/ctf.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/damageindicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/damageindicator.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/danzeff/keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/danzeff/keys.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/danzeff/keys_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/danzeff/keys_c.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/danzeff/keys_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/danzeff/keys_s.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/danzeff/keys_s_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/danzeff/keys_s_c.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/danzeff/nums.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/danzeff/nums.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/danzeff/nums_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/danzeff/nums_c.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/danzeff/nums_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/danzeff/nums_s.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/danzeff/nums_s_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/danzeff/nums_s_c.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/decals.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/decals.PNG -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/dust.psi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/dust.psi -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/explosion.psi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/explosion.psi -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/flash.psi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/flash.psi -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/guns.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/guns.PNG -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/gunsground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/gunsground.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/health.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/logo.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/muzzleflash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/muzzleflash.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/particles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/particles.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/players.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/players.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/playersdead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/playersdead.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/radar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/radar.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/scoreicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/scoreicons.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/smoke.psi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/smoke.psi -------------------------------------------------------------------------------- /jge/Projects/cspsp/bin/gfx/splash.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/bin/gfx/splash.PNG -------------------------------------------------------------------------------- /jge/Projects/cspsp/cspsp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual C++ Express 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cspsp", "cspsp.vcproj", "{53024371-2293-4D40-8ECF-FCB470B50DA1}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JGE", "..\..\JGE\JGE.vcproj", "{89159C26-2282-404A-A194-103B0A49DF7B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {53024371-2293-4D40-8ECF-FCB470B50DA1}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {53024371-2293-4D40-8ECF-FCB470B50DA1}.Debug|Win32.Build.0 = Debug|Win32 16 | {53024371-2293-4D40-8ECF-FCB470B50DA1}.Release|Win32.ActiveCfg = Release|Win32 17 | {53024371-2293-4D40-8ECF-FCB470B50DA1}.Release|Win32.Build.0 = Release|Win32 18 | {89159C26-2282-404A-A194-103B0A49DF7B}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {89159C26-2282-404A-A194-103B0A49DF7B}.Debug|Win32.Build.0 = Debug|Win32 20 | {89159C26-2282-404A-A194-103B0A49DF7B}.Release|Win32.ActiveCfg = Release|Win32 21 | {89159C26-2282-404A-A194-103B0A49DF7B}.Release|Win32.Build.0 = Release|Win32 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/icon0.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/icon_3ds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/icon_3ds.png -------------------------------------------------------------------------------- /jge/Projects/cspsp/idstorage.prx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/machinamentum/CS3DS/4b1339a04b28dbf30bb32bafb8ae90ea34463e4b/jge/Projects/cspsp/idstorage.prx -------------------------------------------------------------------------------- /jge/Projects/cspsp/mk1xx.bat: -------------------------------------------------------------------------------- 1 | make clean 2 | make 1xx 3 | make clean 4 | pause 5 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/mk3xx.bat: -------------------------------------------------------------------------------- 1 | make clean 2 | make 3xx 3 | pause 4 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/rapmetprx/Makefile: -------------------------------------------------------------------------------- 1 | release: all 2 | psp-build-exports -s exports.exp 3 | 4 | TARGET = rapmet 5 | OBJS = main.o 6 | 7 | # Define to build this as a prx (instead of a static elf) 8 | BUILD_PRX=1 9 | # Define the name of our custom exports (minus the .exp extension) 10 | PRX_EXPORTS=exports.exp 11 | 12 | USE_PSPSDK_LIBC = 1 13 | 14 | INCDIR = 15 | CFLAGS = -Os -G0 -Wall 16 | CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti 17 | ASFLAGS = $(CFLAGS) 18 | 19 | LIBDIR = 20 | LDFLAGS = -mno-crt0 -nostartfiles 21 | 22 | PSPSDK=$(shell psp-config --pspsdk-path) 23 | include $(PSPSDK)/lib/build.mak 24 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/rapmetprx/exports.exp: -------------------------------------------------------------------------------- 1 | # Define the exports for the prx 2 | PSP_BEGIN_EXPORTS 3 | 4 | # These four lines are mandatory (although you can add other functions like module_stop) 5 | # syslib is a psynonym for the single mandatory export. 6 | PSP_EXPORT_START(syslib, 0, 0x8000) 7 | PSP_EXPORT_FUNC_HASH(module_start) 8 | PSP_EXPORT_VAR_HASH(module_info) 9 | PSP_EXPORT_END 10 | 11 | PSP_EXPORT_START(rapmet, 0, 0x4001) 12 | PSP_EXPORT_FUNC(CheckTempAR) 13 | PSP_EXPORT_END 14 | 15 | PSP_END_EXPORTS 16 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/rapmetprx/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * PSP Software Development Kit - http://www.pspdev.org 3 | * ----------------------------------------------------------------------- 4 | * Licensed under the BSD license, see LICENSE in PSPSDK root for details. 5 | * 6 | * main.c - Simple PRX example. 7 | * 8 | * Copyright (c) 2005 James Forshaw 9 | * 10 | * $Id: main.c 1531 2005-12-07 18:27:12Z tyranid $ 11 | */ 12 | #include 13 | #include 14 | #include 15 | 16 | PSP_MODULE_INFO("rapmet", 0x1000, 1, 1); 17 | 18 | int CheckTempAR() { 19 | //FILE *file = fopen("modlist.txt","w"); 20 | 21 | SceModule* mod = sceKernelFindModuleByName("TempAR"); 22 | if (mod) { 23 | return 1; 24 | /*SceUID modid = mod->modid; 25 | SceKernelModuleInfo info; 26 | memset(&info, 0, sizeof(info)); 27 | info.size = sizeof(info); 28 | int ret = sceKernelQueryModuleInfo(modid, &info); 29 | if(ret >= 0) { 30 | printf("found tempar, killing\n"); 31 | printf("UID: 0x%08X Attr: %04X - Name: %s\n", modid, info.attribute, info.name); 32 | }*/ 33 | } 34 | else { 35 | return -1; 36 | } 37 | 38 | /*SceUID ids[100]; 39 | int ret; 40 | int count; 41 | int i; 42 | 43 | memset(ids, 0, 100 * sizeof(SceUID)); 44 | ret = sceKernelGetModuleIdList(ids, 100 * sizeof(SceUID), &count); 45 | if(ret >= 0) { 46 | printf("\n", count); 47 | for(i = 0; i < count; i++) { 48 | //print_modinfo(ids[i]); 49 | 50 | SceKernelModuleInfo info; 51 | char szString2[256] = ""; 52 | memset(&info, 0, sizeof(info)); 53 | info.size = sizeof(info); 54 | ret = sceKernelQueryModuleInfo(ids[i], &info); 55 | if(ret >= 0) { 56 | if (stricmp(info.name,"tempar") == 0) { 57 | printf("found tempar, killing\n"); 58 | printf("UID: 0x%08X Attr: %04X - Name: %s\n", ids[i], info.attribute, info.name); 59 | 60 | } 61 | 62 | //sprintf(szString2, &info.name); 63 | //fputs(info.name, file); 64 | } 65 | } 66 | }*/ 67 | //fclose(file); 68 | } 69 | 70 | int module_start(SceSize args, void *argp) 71 | { 72 | return 0; 73 | } 74 | 75 | int module_stop() 76 | { 77 | return 0; 78 | } 79 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/AI.h: -------------------------------------------------------------------------------- 1 | #ifndef _AI_H_ 2 | #define _AI_H_ 3 | 4 | #include "Person.h" 5 | #include "TileMap.h" 6 | #include "Collision.h" 7 | #include "AStar.h" 8 | #include "Grid.h" 9 | 10 | #define NONE -1 11 | #define T 0 12 | #define CT 1 13 | 14 | #define AI_IDLE 0 15 | #define AI_RANDOM 1 16 | #define AI_SEARCHING 2 17 | #define AI_ATTACKING 3 18 | #define AI_FLASHED 4 19 | //------------------------------------------------------------------------------------------------ 20 | class AI : public Person 21 | { 22 | private: 23 | float mPathTime; 24 | float mMoveTime; 25 | float mFireTime; 26 | float mNewAngle; 27 | int mAIState; 28 | float mAIStateTime; 29 | Person* mTarget; 30 | std::vector mPath; 31 | 32 | float mFaceTargetX; 33 | float mFaceTargetY; 34 | float mMoveTargetX; 35 | float mMoveTargetY; 36 | bool mCanSeeEnemy; 37 | 38 | float mStuckTimer; 39 | Gun *mBuyGun; 40 | 41 | void SetAIState(int state); 42 | Person* GetClosestPerson(); 43 | protected: 44 | 45 | public: 46 | AStar* mAStar; 47 | Grid* mGrid; 48 | Gun (*mGameGuns)[28]; 49 | //std::vector* mCollisionPoints; 50 | 51 | AI(JQuad* quads[], JQuad* deadquad, std::vector* bullets, std::vector* guns, std::vector nodes, int team, char* name, int movementstyle); 52 | ~AI(); 53 | 54 | void Update(float dt); 55 | void Render(float x, float y); 56 | void Reset(); 57 | 58 | }; 59 | #endif 60 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/AStar.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASTAR_H_ 2 | #define _ASTAR_H_ 3 | 4 | #ifdef WIN32 5 | #include 6 | #else 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "Node.h" 13 | #include "TileMap.h" 14 | #include "Person.h" 15 | #include "Collision.h" 16 | #include "Grid.h" 17 | 18 | struct SortByF 19 | { 20 | bool operator()(Node* first, Node* second) 21 | { 22 | if (first->F > second->F) { 23 | return true; 24 | } 25 | else if (first->F == second->F) { 26 | if (first->H > second->H) { 27 | return true; 28 | } 29 | } 30 | return false; 31 | } 32 | }; 33 | //------------------------------------------------------------------------------------------------ 34 | class AStar 35 | { 36 | private: 37 | std::vector mNodes; 38 | 39 | int GetG(Node* node, Node* parent, int randomfactor); 40 | int GetHeuristic(Node* start, Node* end); 41 | 42 | //TileMap* mMap; 43 | 44 | protected: 45 | 46 | public: 47 | 48 | AStar(); 49 | ~AStar(); 50 | 51 | std::vector GetPath(Node* start, Node* end, int randomfactor = 1); 52 | 53 | Node* GetClosestNode(Person* person); 54 | 55 | void Rebuild(std::vector* nodes, Grid* mGrid); 56 | 57 | }; 58 | #endif 59 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/Animation.h: -------------------------------------------------------------------------------- 1 | #ifndef __ANIMATION_H__ 2 | #define __ANIMATION_H__ 3 | 4 | #include 5 | #include "JGE.h" 6 | 7 | struct KeyFrame { 8 | float angles[6]; 9 | float duration; 10 | }; 11 | struct KeyFrameAnim { 12 | char mName[64]; 13 | std::vector mKeyFrames; 14 | }; 15 | 16 | class Animation 17 | { 18 | private: 19 | KeyFrameAnim* mKeyFrameAnim; 20 | float mTimer; 21 | int mIndex; 22 | float mSpeed; 23 | bool mLoop; 24 | 25 | public: 26 | bool mIsPlaying; 27 | 28 | Animation(KeyFrameAnim* mKeyFrameAnim, bool isplaying = true, bool loop = true); 29 | ~Animation(); 30 | 31 | void Update(float dt, KeyFrame& frame); 32 | //void UpdateReset(std::vector* joints); 33 | 34 | void Add(KeyFrame keyframe); 35 | void Reset(); 36 | void SetSpeed(float speed); 37 | void Play(); 38 | int GetIndex(); 39 | 40 | KeyFrame* GetKeyFrame(int index); 41 | 42 | static KeyFrameAnim* LoadKeyFrames(char* name); 43 | }; 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/Bullet.h: -------------------------------------------------------------------------------- 1 | #ifndef _BULLET_H_ 2 | #define _BULLET_H_ 3 | 4 | #ifdef WIN32 5 | #include 6 | #else 7 | #include 8 | #endif 9 | #include "JRenderer.h" 10 | #include "GunObject.h" 11 | 12 | #define TYPE_BULLET 0 13 | #define TYPE_GRENADE 1 14 | #define BULLET_DEAD 5 15 | 16 | //------------------------------------------------------------------------------------------------ 17 | class Person; 18 | 19 | class Bullet 20 | { 21 | private: 22 | float limit(float a, float b, int c); 23 | 24 | protected: 25 | static JRenderer* mRenderer; 26 | bool mIsFirstUpdate; 27 | 28 | public: 29 | float cosAngle; 30 | float sinAngle; 31 | 32 | float mX; 33 | float mY; 34 | float pX; 35 | float pY; 36 | float mStartX; 37 | float mStartY; 38 | float mEndX; 39 | float mEndY; 40 | float mAngle; 41 | float mSpeed; 42 | int mDamage; 43 | int mState; 44 | Person* mParent; 45 | Gun* mParentGun; 46 | int mId; 47 | int mType; 48 | 49 | Bullet(float x, float y, float px, float py, float angle, float speed, int damage, Person *parent); 50 | virtual ~Bullet(); 51 | 52 | virtual void Update(float dt); 53 | virtual void Render(float x, float y); 54 | void SetAngle(float angle); 55 | void Reset(float x, float y, float px, float py, float angle, float speed, int damage, Person *parent); 56 | 57 | }; 58 | 59 | inline float Bullet::limit(float a, float b, int c) { 60 | return (a*c > b*c) ? a:b; 61 | } 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/BulletOnline.h: -------------------------------------------------------------------------------- 1 | #ifndef _BULLETONLINE_H_ 2 | #define _BULLETONLINE_H_ 3 | 4 | #include "Bullet.h" 5 | //------------------------------------------------------------------------------------------------ 6 | 7 | class BulletOnline : public Bullet 8 | { 9 | private: 10 | 11 | protected: 12 | 13 | public: 14 | float mSX; 15 | float mSY; 16 | 17 | BulletOnline(float x, float y, float px, float py, float angle, float speed, int damage, Person *parent); 18 | ~BulletOnline(); 19 | 20 | virtual void Update(float dt); 21 | virtual void Render(float x, float y); 22 | 23 | void AddLatency(float latency); 24 | 25 | }; 26 | #endif 27 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/BuyMenu.h: -------------------------------------------------------------------------------- 1 | #ifndef _BUYMENU_H_ 2 | #define _BUYMENU_H_ 3 | 4 | #include "JGE.h" 5 | #include "JRenderer.h" 6 | #include "JGui.h" 7 | #include "MenuItem.h" 8 | #include "Person.h" 9 | #include "GunObject.h" 10 | #include "SfxManager.h" 11 | #include "Menu.h" 12 | 13 | #define MAIN 0 14 | #define PISTOLS 1 15 | #define SHOTGUNS 2 16 | #define SMG 3 17 | #define RIFLES 4 18 | #define MACHINEGUNS 5 19 | #define EQUIPMENT 6 20 | #define PRIMARYAMMO 7 21 | #define SECONDARYAMMO 8 22 | 23 | 24 | //------------------------------------------------------------------------------------------------ 25 | class BuyMenu 26 | { 27 | private: 28 | static JGE* mEngine; 29 | static JRenderer* mRenderer; 30 | 31 | Category mCategories[2][EQUIPMENT+1]; 32 | int mCategoryIndex; 33 | int mSelectedIndex; 34 | 35 | Person* mPlayer; 36 | int mChoice; 37 | Gun mGuns[28]; 38 | 39 | float angle; 40 | 41 | protected: 42 | 43 | public: 44 | bool mIsActive; 45 | bool mIsSelected; 46 | bool* cross; 47 | JSample* mPickUpSound; 48 | bool mIsOldStyle; 49 | 50 | BuyMenu(Person* player, Gun guns[]); 51 | ~BuyMenu(); 52 | 53 | void Update(float dt); 54 | void Render(); 55 | void Enable(); 56 | void Disable(); 57 | int GetChoice(); 58 | //virtual void ButtonPressed(int controllerId, int controlId); 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/Camera.h: -------------------------------------------------------------------------------- 1 | #ifndef __CAMERA_H__ 2 | #define __CAMERA_H__ 3 | 4 | #include "JGE.h" 5 | #include "Collision.h" 6 | 7 | #ifdef WIN32 8 | #include 9 | #else 10 | #include 11 | #endif 12 | 13 | class Camera 14 | { 15 | private: 16 | 17 | 18 | public: 19 | float mX; 20 | float mY; 21 | float mTX; 22 | float mTY; 23 | float mA; 24 | float mMinX; 25 | float mMinY; 26 | float mMaxX; 27 | float mMaxY; 28 | 29 | float mShakeX; 30 | float mShakeY; 31 | int mShakeMagnitude; 32 | float mShakeTime; 33 | float mShakeTimeTotal; 34 | float mShakeFreqX; 35 | float mShakeFreqY; 36 | 37 | bool mRecoilState; 38 | float mRecoilAngleCos; 39 | float mRecoilAngleSin; 40 | float mRecoilMagnitude; 41 | float mRecoilMagnitudeTotal; 42 | float mRecoilTime; 43 | float mRecoilTimeTotal; 44 | 45 | Camera(float x, float y, float minx = 0, float miny = 0, float maxx = 400, float maxy = 240); 46 | ~Camera(); 47 | 48 | void Update(float dt); 49 | float GetX(); 50 | float GetY(); 51 | void SetTX(float tx); 52 | void SetTY(float ty); 53 | void SetTPos(float tx, float ty); 54 | void SetBounds(float minx, float miny, float maxx, float maxy); 55 | void Shake(int magnitude, float time); 56 | void Recoil(float angle, float magnitude, float time); 57 | }; 58 | 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/Collision.h: -------------------------------------------------------------------------------- 1 | #ifndef _COLLISION_H_ 2 | #define _COLLISION_H_ 3 | 4 | 5 | #include "JGE.h" 6 | #include "Person.h" 7 | #include 8 | 9 | #ifdef WIN32 10 | #include 11 | #else 12 | #include 13 | #endif 14 | 15 | #define max2(a,b) (((a) > (b)) ? (a) : (b)) 16 | #define min2(a,b) (((a) < (b)) ? (a) : (b)) 17 | 18 | #define EPSILON 0.000001f 19 | 20 | struct Line 21 | { 22 | float x1; 23 | float y1; 24 | float x2; 25 | float y2; 26 | 27 | Line(float _x1, float _y1, float _x2, float _y2): x1(_x1), y1(_y1), x2(_x2), y2(_y2) {} 28 | Line(Vector2D _p1, Vector2D _p2): x1(_p1.x), y1(_p1.y), x2(_p2.x), y2(_p2.y) {} 29 | }; 30 | 31 | struct Circle 32 | { 33 | public: 34 | float x; 35 | float y; 36 | float radius; 37 | 38 | Circle(float _x, float _y, float _radius): x(_x), y(_y), radius(_radius) {} 39 | Circle(Vector2D _p, float _radius): x(_p.x), y(_p.y), radius(_radius) {} 40 | }; 41 | 42 | struct Shape 43 | { 44 | public: 45 | std::vector points; 46 | 47 | Shape(std::vector _points): points(_points) {} 48 | }; 49 | 50 | 51 | 52 | void ClosestPointLine(float px, float py, Line &line, Vector2D &point); //http://www.gamedev.net/community/forums/topic.asp?topic_id=398748 53 | bool LineLineIntersect(Line &line1, Line &line2, Vector2D &intersectpoint, bool returni = false); //http://www.faqs.org/faqs/graphics/algorithms-faq/ - http://www.gamedev.net/community/forums/topic.asp?topic_id=324883 54 | bool LineCircleIntersect(Line &line, Circle &circle, Vector2D &d, float &l, bool returndl = false); //somewhere on gamedev 55 | bool LineCircleIntersect2(Line &line, Circle &circle, Vector2D &d, float &t); 56 | /*void PersonConstraintColl(Person* person, Constraint* c, float dt, bool changeTheta = true); 57 | void PersonBodyColl(Person* person, Body* body, float dt, bool changeTheta = true); 58 | void BodyBodyColl(Body* body1, Body* body2, float dt); 59 | void ParticleBodyColl(Particle* p, std::vector constraints, bool considerMass = true, float relaxation1 = 0.8f, float relaxation2 = 0.8f);*/ 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameApp.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE++ is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // 9 | //------------------------------------------------------------------------------------- 10 | 11 | #ifndef _GAMEAPP_H_ 12 | #define _GAMEAPP_H_ 13 | 14 | #include 15 | #include "JGE.h" 16 | #include "JRenderer.h" 17 | #include "JLBFont.h" 18 | #include "GameState.h" 19 | #include "Globals.h" 20 | 21 | #ifdef WIN32 22 | #include 23 | #else 24 | #include "mp3player.h" 25 | 26 | /*extern "C" { 27 | extern void gprof_cleanup(); 28 | }*/ 29 | #endif 30 | 31 | class GameState; 32 | 33 | #define VERSION 1.92f 34 | #define NETVERSION 9 35 | 36 | #define MAX_STATE 10 37 | 38 | class GameApp: public JApp 39 | { 40 | private: 41 | static JRenderer* mRenderer; 42 | 43 | GameState* mCurrentState; 44 | GameState* mNextState; 45 | GameState* mGameStates[MAX_STATE]; 46 | 47 | public: 48 | GameApp(); 49 | virtual ~GameApp(); 50 | virtual void Create(); 51 | virtual void Destroy(); 52 | virtual void Update(); 53 | virtual void Render(); 54 | virtual void RenderBottom(); 55 | virtual void Pause(); 56 | virtual void Resume(); 57 | 58 | void LoadGameStates(); 59 | void SetNextState(int state); 60 | }; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameLauncher.cpp: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // JGE++ is a hardware accelerated 2D game SDK for PSP/Windows. 4 | // 5 | // Licensed under the BSD license, see LICENSE in JGE root for details. 6 | // 7 | // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) 8 | // 9 | //------------------------------------------------------------------------------------- 10 | 11 | #include 12 | 13 | #include "GameApp.h" 14 | 15 | 16 | //------------------------------------------------------------------------------------- 17 | JApp* JGameLauncher::GetGameApp() 18 | { 19 | return new GameApp(); 20 | }; 21 | 22 | 23 | //------------------------------------------------------------------------------------- 24 | char *JGameLauncher::GetName() 25 | { 26 | return "template_desc"; 27 | } 28 | 29 | 30 | //------------------------------------------------------------------------------------- 31 | u32 JGameLauncher::GetInitFlags() 32 | { 33 | return JINIT_FLAG_ENABLE3D; 34 | } 35 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameState.cpp: -------------------------------------------------------------------------------- 1 | #include "GameState.h" 2 | 3 | GameState::GameState(GameApp* parent) 4 | { 5 | mParent = parent; 6 | mEngine = JGE::GetInstance(); 7 | mRenderer = JRenderer::GetInstance(); 8 | mSoundSystem = JSoundSystem::GetInstance(); 9 | } 10 | 11 | 12 | GameState::~GameState() 13 | { 14 | } 15 | 16 | void GameState::Create() { 17 | } 18 | 19 | void GameState::Destroy() { 20 | } 21 | 22 | void GameState::Start() { 23 | } 24 | 25 | void GameState::End() { 26 | } 27 | 28 | void GameState::Update(float dt) { 29 | } 30 | 31 | void GameState::Render() { 32 | } 33 | 34 | void GameState::RenderBottom() { 35 | } -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameState.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // This is part of StarBugz, a Space Invader clone developed with JGE++. 4 | // 5 | // Version: 0.0.1 (Prototype) 6 | // 7 | // Released Date: 5th December 2005 8 | // 9 | // Copyright (C) 2005 James Hui (a.k.a. Dr.Watson) 10 | // 11 | // This program is free software; you can redistribute it and/or modify it 12 | // under the terms of the GNU General Public License as published by the Free 13 | // Software Foundation; either version 2 of the License, or (at your option) any 14 | // later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, but WITHOUT 17 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 19 | // 20 | // You should have received a copy of the GNU General Public License along with 21 | // this program; if not, write to the Free Software Foundation, Inc., 59 Temple 22 | // Place, Suite 330, Boston, MA 02111-1307 USA 23 | // 24 | // Bugs and comments can be forwarded to jhkhui@yahoo.com. 25 | // 26 | //------------------------------------------------------------------------------------- 27 | 28 | #ifndef _GAME_STATE_H_ 29 | #define _GAME_STATE_H_ 30 | 31 | #include "GameApp.h" 32 | #include "JGE.h" 33 | #include "JRenderer.h" 34 | #include "JSoundSystem.h" 35 | 36 | #define FADING_SPEED 0.35f 37 | 38 | enum _gameSates 39 | { 40 | GAME_STATE_SPLASH, 41 | GAME_STATE_LOADING, 42 | GAME_STATE_MENU, 43 | GAME_STATE_OPTIONS, 44 | GAME_STATE_UPDATE, 45 | GAME_STATE_NEW_GAME, 46 | GAME_STATE_PLAY, 47 | GAME_STATE_CONNECT, 48 | GAME_STATE_LOBBY, 49 | GAME_STATE_ONLINE 50 | }; 51 | 52 | 53 | class GameApp; 54 | 55 | class GameState 56 | { 57 | protected: 58 | GameApp* mParent; 59 | JGE* mEngine; 60 | JRenderer* mRenderer; 61 | JSoundSystem* mSoundSystem; 62 | 63 | public: 64 | GameState(GameApp* parent); 65 | virtual ~GameState(); 66 | 67 | virtual void Create(); 68 | virtual void Destroy(); 69 | 70 | virtual void Start(); 71 | virtual void End(); 72 | 73 | virtual void Update(float dt); 74 | virtual void Render(); 75 | virtual void RenderBottom(); 76 | }; 77 | 78 | 79 | #endif 80 | 81 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameStateLoading.h: -------------------------------------------------------------------------------- 1 | #ifndef _GAME_STATE_LOADING_H_ 2 | #define _GAME_STATE_LOADING_H_ 3 | 4 | 5 | #include "GameState.h" 6 | #include "Game.h" 7 | 8 | class GameStateLoading: public GameState 9 | { 10 | private: 11 | int mStage; 12 | 13 | 14 | public: 15 | GameStateLoading(GameApp* parent); 16 | ~GameStateLoading(); 17 | 18 | void Start(); 19 | void End(); 20 | void Update(float dt); 21 | void Render(); 22 | void RenderBottom(); 23 | 24 | int Load(int stage); 25 | }; 26 | 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameStateNewGame.h: -------------------------------------------------------------------------------- 1 | #ifndef _GAME_STATE_NEW_GAME_H_ 2 | #define _GAME_STATE_NEW_GAME_H_ 3 | 4 | #include 5 | #include 6 | #include "GameState.h" 7 | #include "MenuItem.h" 8 | #include "ListBox.h" 9 | #if defined(WIN32) || defined(_3DS) 10 | 11 | #ifdef _3DS 12 | #define stricmp strcasecmp 13 | #define strnicmp strncasecmp 14 | #define strcmpi strcasecmp 15 | #include 16 | #include 17 | #endif 18 | 19 | #else 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #endif 27 | 28 | class MapItem : public ListItem 29 | { 30 | public: 31 | char name[256]; 32 | bool match; 33 | MapItem(char *name) { 34 | strcpy(this->name, name); 35 | match = false; 36 | } 37 | ~MapItem() {} 38 | 39 | void Render(float x, float y, bool selected) { 40 | JRenderer *renderer = JRenderer::GetInstance(); 41 | if (match && !selected) { 42 | renderer->FillRect(0,y,SCREEN_WIDTH,25,ARGB(100,0,128,255)); 43 | } 44 | gFont->DrawShadowedString(name,x,y+3); 45 | } 46 | static bool Compare(ListItem* first, ListItem* second) { 47 | MapItem *a = (MapItem*)first; 48 | MapItem *b = (MapItem*)second; 49 | return (strcmpi(a->name,b->name) <= 0); 50 | } 51 | }; 52 | 53 | 54 | class GameStateNewGame: public GameState 55 | 56 | { 57 | private: 58 | ListBox *mMapsListBox; 59 | 60 | char mSearchString[256]; 61 | bool mMatch; 62 | int mMatchIndex; 63 | 64 | public: 65 | GameStateNewGame(GameApp* parent); 66 | ~GameStateNewGame(); 67 | 68 | void Create(); 69 | void Destroy(); 70 | void Start(); 71 | void End(); 72 | void Update(float dt); 73 | void Render(); 74 | void RenderBottom(); 75 | 76 | }; 77 | 78 | 79 | #endif 80 | 81 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameStateOptions.h: -------------------------------------------------------------------------------- 1 | #ifndef _GAME_STATE_OPTIONS_H_ 2 | #define _GAME_STATE_OPTIONS_H_ 3 | 4 | #include "JGui.h" 5 | #include "GameState.h" 6 | #include "MenuItem.h" 7 | #include 8 | 9 | #if defined(WIN32) || defined(_3DS) 10 | 11 | #ifdef _3DS 12 | #define stricmp strcasecmp 13 | #define strnicmp strncasecmp 14 | #define strcmpi strcasecmp 15 | #endif 16 | 17 | #else 18 | #include 19 | #endif 20 | 21 | #define OPTIONS 0 22 | #define CONTROLS 1 23 | 24 | #define NUMCONFIGS 6 25 | 26 | #define RELATIVE1 0 27 | #define ABSOLUTE1 1 28 | 29 | #define ON 0 30 | #define OFF 1 31 | 32 | #define ANALOG 0 33 | #define DIRPAD 1 34 | 35 | #define SAVE 6 36 | #define CANCEL 7 37 | 38 | class GameStateOptions: public GameState, 39 | public JGuiListener 40 | { 41 | private: 42 | JGuiController* mGuiControllers[NUMCONFIGS]; 43 | char mConfigs[NUMCONFIGS][256]; 44 | char mConfigInfo[NUMCONFIGS][256]; 45 | 46 | int mState; 47 | int index; 48 | bool main; 49 | int movementstyle; 50 | int music; 51 | int friendlyfire; 52 | int menustyle; 53 | char name[16]; 54 | char* tempname; 55 | JTexture* mControlsTex; 56 | JQuad* mControlsQuad; 57 | 58 | float mInfoX; 59 | 60 | public: 61 | GameStateOptions(GameApp* parent); 62 | ~GameStateOptions(); 63 | 64 | void Create(); 65 | void Destroy(); 66 | void Start(); 67 | void End(); 68 | void Update(float dt); 69 | void Render(); 70 | void RenderBottom(); 71 | 72 | void ButtonPressed(int controllerId, int controlId); 73 | 74 | void Save(); 75 | }; 76 | 77 | 78 | #endif 79 | 80 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameStatePlay.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef _GAME_STATE_PLAY_H_ 4 | #define _GAME_STATE_PLAY_H_ 5 | 6 | #include "GameState.h" 7 | #include "GameApp.h" 8 | #include 9 | #include 10 | #include "Person.h" 11 | #include "AI.h" 12 | #include "TileMap.h" 13 | #include "ParticleEngine.h" 14 | #include "SfxManager.h" 15 | #include "Bullet.h" 16 | #include "GunObject.h" 17 | #include "BuyMenu.h" 18 | #include "Camera.h" 19 | #include "Hud.h" 20 | #include "Game.h" 21 | #include "Collision.h" 22 | #include "AStar.h" 23 | 24 | #ifdef WIN32 25 | #else 26 | #include "mp3player.h" 27 | #endif 28 | 29 | class GameStatePlay: public Game, 30 | public JGuiListener 31 | 32 | { 33 | 34 | private: 35 | 36 | AStar* mAStar; 37 | /*float mRoundTimer; 38 | float mRoundEndTimer; 39 | int mRoundState; 40 | float mTimer; 41 | float mSwitchTimer; 42 | int mNumRemainingCTs; 43 | int mNumRemainingTs; 44 | unsigned int mSpecIndex; 45 | int mSpecState; 46 | bool mSpecDead; 47 | float mSpecX; 48 | float mSpecY;*/ 49 | 50 | //JTexture* mGunTextures; 51 | 52 | int mNumGuns; 53 | 54 | //Person* mSpec; 55 | 56 | //vector::iterator mBulletIterator; 57 | 58 | JMusic* mMusic; 59 | //JGuiController* mGuiController; 60 | 61 | //bool cross; 62 | //int mWinner; 63 | 64 | public: 65 | GameStatePlay(GameApp* parent); 66 | ~GameStatePlay(); 67 | 68 | void Create(); 69 | void Destroy(); 70 | void Start(); 71 | void End(); 72 | void Update(float dt); 73 | void Render(); 74 | void RenderBottom(); 75 | 76 | void CheckInput(float dt); 77 | void CheckCollisions(); 78 | void NewGame(); 79 | void ResetRound(); 80 | void Explode(Grenade* grenade); 81 | void StopInput(); 82 | 83 | void ButtonPressed(int controllerId, int controlId); 84 | 85 | }; 86 | 87 | 88 | #endif 89 | 90 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameStateSplash.cpp: -------------------------------------------------------------------------------- 1 | #include "GameStateSplash.h" 2 | GameStateSplash::GameStateSplash(GameApp* parent): GameState(parent) {} 3 | GameStateSplash::~GameStateSplash() {} 4 | 5 | void GameStateSplash::Create() 6 | { 7 | //mSplashTex = mRenderer->LoadTexture("gfx/splash.png", true); 8 | //mSplashQuad = new JQuad(mSplashTex, 0.0f, 0.0f, 480.0f, 272.0f); 9 | } 10 | 11 | void GameStateSplash::Destroy() 12 | { 13 | //SAFE_DELETE(mSplashQuad); 14 | 15 | //SAFE_DELETE(mSplashTex); 16 | } 17 | 18 | 19 | void GameStateSplash::Start() 20 | { 21 | mMode = 0; 22 | mAlpha = 0.0f; 23 | 24 | mRenderer->EnableVSync(true); 25 | } 26 | 27 | 28 | void GameStateSplash::End() 29 | { 30 | mRenderer->EnableVSync(false); 31 | } 32 | 33 | 34 | void GameStateSplash::Update(float dt) 35 | { 36 | mParent->SetNextState(GAME_STATE_LOADING); 37 | return; 38 | /**if (mEngine->GetButtonState(PSP_CTRL_CROSS) || mEngine->GetButtonState(PSP_CTRL_CIRCLE) ) // skip everything... 39 | { 40 | mParent->SetNextState(GAME_STATE_LOADING); 41 | return; 42 | }**/ 43 | 44 | if (mMode==0) 45 | { 46 | mAlpha += FADING_SPEED*dt; 47 | if (mAlpha > 255.0f) 48 | { 49 | mAlpha = 255.0f; 50 | mMode = 1; 51 | mTimer = 0.0f; 52 | } 53 | } 54 | else if (mMode==1) 55 | { 56 | mParent->LoadGameStates(); 57 | mMode = 2; 58 | /*mTimer += dt; 59 | if (mTimer > SPLASH_DELAY) 60 | mMode = 2;*/ 61 | } 62 | else if (mMode==2) 63 | { 64 | mAlpha -= FADING_SPEED*dt; 65 | if (mAlpha < 0.0f) 66 | { 67 | mAlpha = 0.0f; 68 | mParent->SetNextState(GAME_STATE_LOADING); 69 | } 70 | 71 | } 72 | } 73 | 74 | 75 | void GameStateSplash::Render() 76 | { 77 | return; 78 | mRenderer->ClearScreen(ARGB(0,0,0,0)); 79 | 80 | int alpha = (int)mAlpha; 81 | 82 | //mSplashQuad->SetColor(ARGB(alpha,255,255,255)); 83 | //float x, y, width, height; 84 | //mSplashQuad->GetTextureRect(&x, &y, &width, &height); 85 | //mRenderer->RenderQuad(mSplashQuad, 0, 0); 86 | 87 | // pspDebugScreenSetXY(2, 0); 88 | // pspDebugScreenPrintf("fps:%4.2f %4.2f %d", mParent->Timer_GetFPS(), mAlpha, mMode); 89 | 90 | } 91 | 92 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameStateSplash.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------------- 2 | // 3 | // This is part of StarBugz, a Space Invader clone developed with JGE++. 4 | // 5 | // Version: 0.0.1 (Prototype) 6 | // 7 | // Released Date: 5th December 2005 8 | // 9 | // Copyright (C) 2005 James Hui (a.k.a. Dr.Watson) 10 | // 11 | // This program is free software; you can redistribute it and/or modify it 12 | // under the terms of the GNU General Public License as published by the Free 13 | // Software Foundation; either version 2 of the License, or (at your option) any 14 | // later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, but WITHOUT 17 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 19 | // 20 | // You should have received a copy of the GNU General Public License along with 21 | // this program; if not, write to the Free Software Foundation, Inc., 59 Temple 22 | // Place, Suite 330, Boston, MA 02111-1307 USA 23 | // 24 | // Bugs and comments can be forwarded to jhkhui@yahoo.com. 25 | // 26 | //------------------------------------------------------------------------------------- 27 | 28 | #ifndef _GAME_STATES_SPLASH_H_ 29 | #define _GAME_STATES_SPLASH_H_ 30 | 31 | #include "GameState.h" 32 | 33 | 34 | #define SPLASH_DELAY 1500.0f 35 | 36 | class GameStateSplash: public GameState 37 | { 38 | private: 39 | JTexture* mSplashTex; 40 | JQuad* mSplashQuad; 41 | 42 | int mMode; 43 | float mAlpha; 44 | float mTimer; 45 | 46 | public: 47 | GameStateSplash(GameApp* parent); 48 | ~GameStateSplash(); 49 | 50 | void Create(); 51 | void Destroy(); 52 | void Start(); 53 | void End(); 54 | void Update(float dt); 55 | void Render(); 56 | 57 | }; 58 | 59 | 60 | #endif 61 | 62 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GameStateUpdate.h: -------------------------------------------------------------------------------- 1 | #ifndef _GAME_STATE_UPDATE_H_ 2 | #define _GAME_STATE_UPDATE_H_ 3 | 4 | #include "JGui.h" 5 | #include "GameState.h" 6 | #include "MenuItem.h" 7 | #include 8 | #include "Wlan.h" 9 | #include "ListBox.h" 10 | 11 | #define TRUE 1 12 | #define FALSE 0 13 | #define STAGE_GETVERSIONS 0 14 | #define STAGE_GETFILES 1 15 | #define STAGE_GETTEXT 2 16 | #define STAGE_TEXT 3 17 | #define STAGE_UPDATE 4 18 | #define STAGE_UPDATEFINISH 5 19 | #define STAGE_UPDATEFAIL 6 20 | #define STAGE_RETURN 7 21 | 22 | #ifdef _3DS 23 | #define stricmp strcasecmp 24 | #define strnicmp strncasecmp 25 | #define strcmpi strcasecmp 26 | #endif 27 | 28 | 29 | class GameStateUpdate: public GameState 30 | { 31 | private: 32 | int mStage; 33 | 34 | //Socket* socket; 35 | bool mHasRequestedFile; 36 | 37 | std::vector mVersions; 38 | std::vector mFiles; 39 | int mVersionIndex; 40 | int mFileIndex; 41 | int mFileSize; 42 | int mFileAmount; 43 | 44 | float mTimer; 45 | ListBox *mTextBox; 46 | 47 | public: 48 | GameStateUpdate(GameApp* parent); 49 | ~GameStateUpdate(); 50 | 51 | void Create(); 52 | void Destroy(); 53 | void Start(); 54 | void End(); 55 | void Update(float dt); 56 | void Render(); 57 | }; 58 | 59 | 60 | #endif 61 | 62 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/Grenade.cpp: -------------------------------------------------------------------------------- 1 | #include "Grenade.h" 2 | 3 | //------------------------------------------------------------------------------------------------ 4 | Grenade::Grenade(float x, float y, float px, float py, float angle, float speed, Person *parent, int type) : Bullet(x,y,px,py,angle,speed,0,parent) 5 | { 6 | mType = TYPE_GRENADE; 7 | mGrenadeType = type; 8 | mTimer = 1500.0f; 9 | mSpinAngle = 0.0f; 10 | } 11 | 12 | //------------------------------------------------------------------------------------------------ 13 | Grenade::~Grenade() 14 | { 15 | } 16 | 17 | 18 | //------------------------------------------------------------------------------------------------ 19 | void Grenade::Update(float dt) 20 | { 21 | Bullet::Update(dt); 22 | mTimer -= dt; 23 | if (mTimer < 0.0f) { 24 | mState = BULLET_DEAD; 25 | } 26 | mSpinAngle += 0.01f*dt; 27 | } 28 | 29 | 30 | 31 | //------------------------------------------------------------------------------------------------ 32 | void Grenade::Render(float x, float y) 33 | { 34 | float offsetX = (x-SCREEN_WIDTH_2); 35 | float offsetY = (y-SCREEN_HEIGHT_2); 36 | 37 | mRenderer->RenderQuad(mParentGun->mGroundQuad,mX-offsetX,mY-offsetY,mSpinAngle); 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/Grenade.h: -------------------------------------------------------------------------------- 1 | #ifndef _GRENADE_H_ 2 | #define _GRENADE_H_ 3 | 4 | #include "Bullet.h" 5 | 6 | #define FLASH 0 7 | #define HE 1 8 | #define SMOKE 2 9 | //------------------------------------------------------------------------------------------------ 10 | 11 | class Grenade : public Bullet 12 | { 13 | private: 14 | 15 | protected: 16 | float mSpinAngle; 17 | 18 | public: 19 | float mTimer; 20 | int mGrenadeType; 21 | 22 | Grenade(float x, float y, float px, float py, float angle, float speed, Person *parent, int type); 23 | ~Grenade(); 24 | 25 | void Update(float dt); 26 | void Render(float x, float y); 27 | 28 | }; 29 | #endif 30 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/Grid.h: -------------------------------------------------------------------------------- 1 | #ifndef _GRID_H_ 2 | #define _GRID_H_ 3 | 4 | #include 5 | #include "Person.h" 6 | #include "GunObject.h" 7 | #include "Person.h" 8 | #include "TileMap.h" 9 | #include "Collision.h" 10 | 11 | struct Cell { 12 | std::vector mCollisionLines; 13 | std::vector mPeople; 14 | std::vector mGunObjects; 15 | std::vector mBullets; 16 | }; 17 | 18 | //------------------------------------------------------------------------------------------------ 19 | class Grid 20 | { 21 | private: 22 | 23 | protected: 24 | 25 | public: 26 | int mCellSize; 27 | int mWidth; 28 | int mHeight; 29 | float mConversion; 30 | std::vector mCells; 31 | 32 | Grid(); 33 | ~Grid(); 34 | void ClearCells(bool lines = false); 35 | void AddPerson(Person* person, int cell); 36 | void AddGunObject(GunObject* gunobject, int cell); 37 | void AddBullet(Bullet* bullet, int cell); 38 | void AddCollisionLine(CollisionLine* line, int cell); 39 | 40 | void HashPerson(Person* person); 41 | void HashGunObject(GunObject* gunobject); 42 | void HashBullet(Bullet* bullet); 43 | void HashCollisionLine(CollisionLine* line); 44 | 45 | int Hash(float x, float y); 46 | int Hash(float t); 47 | 48 | void Rebuild(float maxX, float maxY, int cellsize); 49 | 50 | bool LineOfSight(float x1, float y1, float x2, float y2, bool bullets = true, bool people = false); 51 | }; 52 | 53 | 54 | //------------------------------------------------------------------------------------------------ 55 | inline int Grid::Hash(float x, float y) 56 | { 57 | int cx = (int)(x*mConversion); 58 | if (cx >= mWidth) cx = mWidth-1; 59 | int index = ((int)(y*mConversion))*mWidth + cx; 60 | 61 | return index; 62 | } 63 | 64 | //------------------------------------------------------------------------------------------------ 65 | inline int Grid::Hash(float t) 66 | { 67 | return (int)(t*mConversion); 68 | } 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GunObject.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "GunObject.h" 3 | 4 | JRenderer* GunObject::mRenderer = NULL; 5 | 6 | //------------------------------------------------------------------------------------------------ 7 | GunObject::GunObject(Gun *gun, int clipammo, int remainingammo) 8 | { 9 | mRenderer = JRenderer::GetInstance(); 10 | mAngle = 0.0f; 11 | mRotation = 0.0f; 12 | mGun = gun; 13 | mClipAmmo = clipammo; 14 | mRemainingAmmo = remainingammo; 15 | mOnGround = true; 16 | mX = 0.0f; 17 | mY = 0.0f; 18 | mOldX = 0.0f; 19 | mOldY = 0.0f; 20 | mIsOnline = false; 21 | } 22 | 23 | //------------------------------------------------------------------------------------------------ 24 | GunObject::~GunObject() 25 | { 26 | 27 | } 28 | 29 | //------------------------------------------------------------------------------------------------ 30 | void GunObject::Update(float dt) 31 | { 32 | mOldX = mX; 33 | mOldY = mY; 34 | if (!mOnGround) { 35 | mSpeed -= 0.001f*dt; 36 | if (mSpeed < 0.0f) { 37 | mSpeed = 0.0f; 38 | mOnGround = true; 39 | } 40 | mX += mSpeed * cosf(mAngle) * dt; 41 | mY += mSpeed * sinf(mAngle) * dt; 42 | } 43 | } 44 | 45 | //------------------------------------------------------------------------------------------------ 46 | void GunObject::Render(float x, float y) 47 | { 48 | float xtemp = mX; 49 | float ytemp = mY; 50 | mX = mX - x + SCREEN_WIDTH_2; 51 | mY = mY - y + SCREEN_HEIGHT_2; 52 | mRenderer->RenderQuad(mGun->mGroundQuad, mX, mY, mRotation); 53 | mX = xtemp; 54 | mY = ytemp; 55 | } 56 | 57 | //------------------------------------------------------------------------------------------------ 58 | void GunObject::SetTotalRotation(float theta) 59 | { 60 | mRotation = theta-M_PI_2; 61 | mAngle = theta; 62 | } 63 | 64 | //------------------------------------------------------------------------------------------------ 65 | /**void GunObject::Reset() 66 | { 67 | if (mSpawned) { 68 | mClipAmmo = mGun->mClip; 69 | mRemainingAmmo = mGun->mClip*(mGun->mNumClips-1); 70 | mX = oldx; 71 | mY = oldy; 72 | } 73 | else { 74 | delete this; 75 | } 76 | }**/ 77 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GunObject.h: -------------------------------------------------------------------------------- 1 | #ifndef _GUNOBJECT_H_ 2 | #define _GUNOBJECT_H_ 3 | 4 | #include "JGE.h" 5 | #include "JRenderer.h" 6 | #include "JSoundSystem.h" 7 | #include 8 | 9 | struct Gun { 10 | JQuad* mHandQuad; 11 | JQuad* mGroundQuad; 12 | int mId; 13 | int mDelay; 14 | int mDamage; 15 | float mSpread; 16 | int mClip; 17 | int mNumClips; 18 | int mReloadDelay; 19 | float mSpeed; 20 | float mBulletSpeed; 21 | float mViewAngle; 22 | int mCost; 23 | int mType; 24 | char mName[15]; 25 | JSample* mFireSound; 26 | JSample* mReloadSound; 27 | JSample* mDryFireSound; 28 | 29 | int mAmmoBarWidth; 30 | }; 31 | 32 | //------------------------------------------------------------------------------------------------ 33 | 34 | class GunObject 35 | { 36 | private: 37 | static JRenderer* mRenderer; 38 | 39 | protected: 40 | 41 | public: 42 | float mAngle; 43 | float mSpeed; 44 | float mRotation; 45 | 46 | float mX; 47 | float mY; 48 | float mOldX; 49 | float mOldY; 50 | Gun *mGun; 51 | int mClipAmmo; 52 | int mRemainingAmmo; 53 | bool mOnGround; 54 | //bool mSpawned; 55 | 56 | bool mIsOnline; 57 | 58 | GunObject(Gun *gun, int clipammo, int remainingammo); 59 | virtual ~GunObject(); 60 | 61 | virtual void Update(float dt); 62 | void Render(float x, float y); 63 | 64 | void SetTotalRotation(float theta); 65 | //void Reset(); 66 | }; 67 | #endif 68 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GunObjectOnline.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "GunObjectOnline.h" 3 | 4 | //------------------------------------------------------------------------------------------------ 5 | GunObjectOnline::GunObjectOnline(Gun *gun, int clipammo, int remainingammo): GunObject(gun, clipammo, remainingammo) 6 | { 7 | mSX = 0; 8 | mSY = 0; 9 | mSAngle = 0.0f; 10 | mIsOnline = true; 11 | } 12 | 13 | //------------------------------------------------------------------------------------------------ 14 | GunObjectOnline::~GunObjectOnline() 15 | { 16 | 17 | } 18 | 19 | //------------------------------------------------------------------------------------------------ 20 | void GunObjectOnline::Update(float dt) 21 | { 22 | GunObject::Update(dt); 23 | 24 | mAngle = mSAngle; 25 | 26 | if (!mOnGround) { 27 | mSX += mSpeed * cosf(mAngle) * dt; 28 | mSY += mSpeed * sinf(mAngle) * dt; 29 | } 30 | 31 | //if (!mOnGround) { 32 | if (fabs(mSX-mX) > 40) { 33 | mX = mSX; 34 | } 35 | else if (fabs(mSX-mX) > 16) { 36 | mX += (mSX-mX)*0.005f*dt; 37 | } 38 | else { 39 | //mX += (mSX-mX)*0.2f; 40 | } 41 | 42 | if (fabs(mSY-mY) > 40) { 43 | mY = mSY; 44 | } 45 | else if (fabs(mSY-mY) > 16) { 46 | mY += (mSY-mY)*0.005f*dt; 47 | } 48 | else { 49 | //mY += (mSY-mY)*0.2f; 50 | } 51 | 52 | //} 53 | 54 | 55 | } -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/GunObjectOnline.h: -------------------------------------------------------------------------------- 1 | #ifndef _GunObjectOnline_H_ 2 | #define _GunObjectOnline_H_ 3 | 4 | #include "GunObject.h" 5 | 6 | //------------------------------------------------------------------------------------------------ 7 | 8 | class GunObjectOnline : public GunObject 9 | { 10 | private: 11 | 12 | protected: 13 | 14 | public: 15 | int mId; 16 | float mSX; 17 | float mSY; 18 | float mSAngle; 19 | 20 | GunObjectOnline(Gun *gun, int clipammo, int remainingammo); 21 | ~GunObjectOnline(); 22 | 23 | void Update(float dt); 24 | }; 25 | #endif 26 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/HttpManager.h: -------------------------------------------------------------------------------- 1 | #ifndef _HTTPMANAGER_H_ 2 | #define _HTTPMANAGER_H_ 3 | 4 | #include "Wlan.h" 5 | #include 6 | #include 7 | #include 8 | 9 | #define CONTENT_UNKNOWN 0 10 | #define CONTENT_CHUNKED 1 11 | #define CONTENT_NORMAL 2 12 | 13 | #define REQUEST_GET 0 14 | #define REQUEST_POST 1 15 | struct Request 16 | { 17 | int type; 18 | char page[4096]; 19 | char data[4096]; 20 | }; 21 | 22 | struct Response 23 | { 24 | char buffer[8192]; 25 | int size; 26 | }; 27 | 28 | //------------------------------------------------------------------------------------------------ 29 | class HttpManager 30 | { 31 | private: 32 | char mHostText[128]; 33 | char mBuffer[8192]; 34 | 35 | std::deque mRequests; 36 | std::deque mResponses; 37 | Socket* mSocket; 38 | float mTimer; 39 | float mReconnectTimer; 40 | char mHost[128]; 41 | int mPort; 42 | int mContentSize; 43 | int mBufferSize; 44 | int mContentType; 45 | bool ReadHTTP(char* string, int n); 46 | 47 | public: 48 | HttpManager(); 49 | ~HttpManager(); 50 | 51 | void Connect(char* host, char* hosttext, int port); 52 | void Reconnect(); 53 | void Disconnect(); 54 | void SendRequest(char* page, char* data="", int type=REQUEST_GET); 55 | int GetResponse(char* buffer); 56 | int GetContentSize(); 57 | bool ResponseReady(); 58 | void ClearRequests(); 59 | 60 | void Update(float dt); 61 | }; 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/Hud.h: -------------------------------------------------------------------------------- 1 | #ifndef __HUD_H__ 2 | #define __HUD_H__ 3 | 4 | #include 5 | #include "JRenderer.h" 6 | #include "JLBFont.h" 7 | #include "Person.h" 8 | #include "PersonOnline.h" 9 | 10 | #define SERVER -2 11 | #define NONE -1 12 | #define T 0 13 | #define CT 1 14 | #define MESSAGEEVENT 0 15 | #define CHATEVENT 1 16 | 17 | struct ChatEvent { 18 | char name[32]; 19 | char string[127]; 20 | int team; 21 | bool isDead; 22 | bool isTeamOnly; 23 | }; 24 | 25 | struct MessageEvent { 26 | int type; 27 | union { 28 | char string[127]; 29 | ChatEvent chatevent; 30 | }; 31 | }; 32 | 33 | struct KillEvent { 34 | char attackername[32]; 35 | int attackerteam; 36 | char victimname[32]; 37 | int victimteam; 38 | JQuad* weapon; 39 | }; 40 | 41 | struct DamageIndicator { 42 | float angle; 43 | float timer; 44 | }; 45 | 46 | class Hud 47 | { 48 | private: 49 | static JRenderer* mRenderer; 50 | std::vector mKillEvents; 51 | std::vector mMessageEvents; 52 | float mKillEventTimer; 53 | float mMessageEventTimer; 54 | int mMessageEventCounter; 55 | char mMessage[127]; 56 | float mMessageTimer; 57 | 58 | Person *mEventPerson; 59 | int mEventType; 60 | float mEventTime; 61 | char mEventText[127]; 62 | 63 | 64 | std::vector mDamageIndicators; 65 | 66 | public: 67 | 68 | Person *mPlayer; 69 | bool mIsOnline; 70 | int *mGameType; 71 | 72 | Hud(); 73 | ~Hud(); 74 | 75 | void Update(float dt); 76 | void Render(); 77 | 78 | void AddKillEvent(Person* attacker, JQuad* weapon, Person* victim); 79 | 80 | void AddFlagEvent(Person* person, int action); 81 | 82 | void AddMessageEvent(char* string); 83 | 84 | void AddChatEvent(char* name, char* string, int team, bool isdead, bool isteamonly); 85 | 86 | void SetMessage(char* message); 87 | 88 | void AddDamageIndicator(float angle); 89 | 90 | void Reset(); 91 | 92 | }; 93 | 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/IdStorage.S: -------------------------------------------------------------------------------- 1 | .set noreorder 2 | 3 | #include "pspstub.s" 4 | 5 | STUB_START "IdStorage",0x40090000,0x00040005 6 | STUB_FUNC 0xBE861F44,ReadKey 7 | STUB_FUNC 0x5E4510CC,WriteKey 8 | STUB_FUNC 0x971C5683,CreateKey 9 | STUB_FUNC 0x3E808F59,DeleteKey 10 | STUB_END 11 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/ListBox.h: -------------------------------------------------------------------------------- 1 | #ifndef _LISTBOX_H_ 2 | #define _LISTBOX_H_ 3 | 4 | #include 5 | #include 6 | #include "JGE.h" 7 | #include "JRenderer.h" 8 | #include "Globals.h" 9 | //------------------------------------------------------------------------------------------------ 10 | 11 | #define TYPE_LIST 0 12 | #define TYPE_TEXT 1 13 | 14 | class ListItem 15 | { 16 | public: 17 | ListItem() {} 18 | virtual ~ListItem() {} 19 | 20 | virtual void Render(float x, float y, bool selected = false) {} 21 | }; 22 | 23 | class TextItem : public ListItem 24 | { 25 | public: 26 | char *text; 27 | TextItem(char *text) { 28 | this->text = text; 29 | } 30 | ~TextItem() { 31 | delete text; 32 | } 33 | 34 | void Render(float x, float y, bool selected = false) { 35 | gFont->DrawShadowedString(text,x,y+5); 36 | } 37 | }; 38 | 39 | class ListBox 40 | { 41 | private: 42 | static JGE* mEngine; 43 | static JRenderer* mRenderer; 44 | 45 | public: 46 | int mType; 47 | 48 | std::vector mItems; 49 | int mItemIndex; 50 | int mScrollIndex; 51 | 52 | float mX; 53 | float mY; 54 | int mWidth; 55 | int mHeight; 56 | 57 | int mItemHeight; 58 | int mItemsPerPage; 59 | 60 | ListBox(int x, int y, int width, int height, int itemHeight, int itemsPerPage, int type = TYPE_LIST); 61 | ~ListBox(); 62 | 63 | void Update(float dt); 64 | void Render(); 65 | 66 | void AddItem(ListItem *item); 67 | void RemoveItem(ListItem *item); 68 | void Sort(bool (*compare)(ListItem*, ListItem*)); 69 | void SetIndices(int itemIndex, int scrollIndex); 70 | 71 | void Clear(); 72 | bool IsEmpty(); 73 | 74 | ListItem *GetItem(); 75 | 76 | void AddText(char *text); 77 | 78 | }; 79 | #endif 80 | -------------------------------------------------------------------------------- /jge/Projects/cspsp/src/Menu.h: -------------------------------------------------------------------------------- 1 | #ifndef _MENU_H_ 2 | #define _MENU_H_ 3 | 4 | struct Button { 5 | Button(int _id, char* _name) { 6 | id = _id; 7 | strcpy(name,_name); 8 | }; 9 | int id; 10 | char name[256]; 11 | }; 12 | struct Category { 13 | int id; 14 | std::vector