├── code ├── dnAPI_globals.c ├── mode_detect_win32.c ├── wintools.h ├── mactools.h ├── base64.h ├── sdl2_compat.cpp ├── crash.h ├── mode_detect_osx.m ├── glguard.h ├── log.h ├── rocket │ ├── PluginUtils.h │ ├── ShellSystemInterface.cpp │ ├── PluginUtils.cpp │ ├── FrameAnimationDecoratorInstancer.h │ ├── FrameAnimationDecorator.h │ ├── FrameAnimationDectoratorInstancer.cpp │ ├── ShellOpenGL.h │ ├── ShellSystemInterface.h │ ├── PythonInterface.h │ └── FrameAnimationDecorator.cpp ├── dnMouseInput.h ├── base64_test.c ├── glguard.cpp ├── gui.h ├── dn_system.h ├── helpers.h ├── playvpx │ └── playvpx.h └── log.cpp ├── thirdparty ├── frameworks │ ├── ogg.framework │ │ ├── Versions │ │ │ ├── Current │ │ │ └── A │ │ │ │ ├── ogg │ │ │ │ └── Resources │ │ │ │ ├── English.lproj │ │ │ │ └── InfoPlist.strings │ │ │ │ └── Info.plist │ │ ├── ogg │ │ ├── Headers │ │ └── Resources │ └── vorbis.framework │ │ ├── Versions │ │ ├── Current │ │ └── A │ │ │ ├── vorbis │ │ │ └── Resources │ │ │ ├── English.lproj │ │ │ └── InfoPlist.strings │ │ │ └── Info.plist │ │ ├── vorbis │ │ ├── Headers │ │ └── Resources ├── include │ ├── SDL_revision.h │ ├── vorbis │ │ └── Makefile.am │ ├── ogg │ │ ├── Makefile.am │ │ ├── config_types.h │ │ └── config_types.h.in │ ├── SDL_name.h │ ├── smpeg │ │ ├── gtv.h │ │ ├── glmovie.h │ │ ├── MPEGlist.h │ │ └── MPEGerror.h │ ├── vpx │ │ ├── vpx_codec_impl_bottom.h │ │ ├── vpx_codec_impl_top.h │ │ ├── vpx_integer.h │ │ └── vp8e.h │ ├── SDL_copying.h │ ├── SDL_getenv.h │ ├── SDL_byteorder.h │ ├── SDL_types.h │ ├── SDL_opengles.h │ ├── SDL_opengles2.h │ ├── Rocket │ │ ├── Core.h │ │ ├── Controls.h │ │ ├── Debugger.h │ │ ├── Core │ │ │ ├── Python │ │ │ │ ├── Header.h │ │ │ │ └── Python.h │ │ │ ├── Font.h │ │ │ ├── Header.h │ │ │ ├── Vertex.h │ │ │ ├── ScriptInterface.h │ │ │ ├── ElementInstancerGeneric.inl │ │ │ ├── Dictionary.inl │ │ │ ├── EventListener.h │ │ │ └── TypeConverter.h │ │ ├── Controls │ │ │ ├── Header.h │ │ │ ├── ElementDataGridExpandButton.h │ │ │ ├── ElementDataGridCell.h │ │ │ └── Clipboard.h │ │ └── Debugger │ │ │ └── Header.h │ ├── close_code.h │ ├── SDL_config.h.default │ ├── SDL_config.h.generated │ ├── SDL_config.h │ ├── SDL_test_log.h │ ├── SDL_test_font.h │ ├── SDL_active.h │ ├── SDL_test.h │ ├── SDL_clipboard.h │ └── SDL_quit.h └── dxsdk │ └── include │ ├── dxsdkver.h │ ├── D3DX10.h │ ├── D3DX11.h │ └── d3dx9.h ├── jfbuild ├── kplib.c ├── lzwnew.h ├── common_build.h ├── crc32.h ├── sdlayer.h ├── hightile_priv.h ├── kplib.h ├── common_build.c ├── scriptfile.h ├── md4.h ├── mmulti.h ├── polymost_priv.h ├── cache1d.h ├── osd.h ├── polymosttexcache.h └── editor.h ├── duke3d ├── duke3d.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcuserdata │ │ │ └── termit.xcuserdatad │ │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── duke3d.xccheckout │ └── xcuserdata │ │ └── termit.xcuserdatad │ │ ├── xcschemes │ │ └── xcschememanagement.plist │ │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist └── duke3d-Info.plist ├── gameroot └── data │ ├── keyprompt.rml │ ├── start.rml │ ├── pointer.rml │ ├── yesno.rml │ ├── confirmation.rcss │ ├── menubg.rml │ ├── menubg_1.rml │ ├── menubg_2.rml │ ├── menubg_3.rml │ ├── videoconfirm.rml │ ├── skillep.rcss │ ├── skill_3.rml │ ├── episodes.rml │ ├── skill.rml │ ├── mouse.rml │ ├── mainmenu_1.rml │ ├── mainmenu_2.rml │ ├── mainmenu_3.rml │ ├── options.rml │ ├── savegame.rml │ ├── ingamemenu.rml │ ├── loadgame.rml │ ├── mainmenu.rml │ ├── scrollbar.rcss │ ├── sound.rml │ ├── conf.rcss │ ├── video.rml │ ├── saveload.rcss │ └── menu.rcss ├── jfduke3d ├── osdcmds.h ├── grpscan.h ├── osdfuncs.h ├── GameListSource.game.h ├── startwin.game.h ├── _rts.h ├── winbits.c ├── sounds.h ├── develop.h ├── rts.h └── testcd.c ├── jfaudiolib ├── dsound_oggplayer.h ├── asssys.h ├── dsound_oggplayer.cpp ├── asssys.c ├── cd.h ├── pitch.h ├── driver_winmm.h ├── sndcards.h ├── driver_sdl.h ├── midifuncs.h ├── driver_directsound.h ├── driver_coreaudio.h ├── driver_nosound.h └── standard.h ├── duke3d.sln └── jfmact ├── mathutil.h ├── develop.h ├── mouse.c ├── mouse.h └── util_lib.h /code/dnAPI_globals.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/frameworks/ogg.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /thirdparty/frameworks/vorbis.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /thirdparty/frameworks/ogg.framework/ogg: -------------------------------------------------------------------------------- 1 | Versions/Current/ogg -------------------------------------------------------------------------------- /thirdparty/frameworks/ogg.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /thirdparty/frameworks/vorbis.framework/vorbis: -------------------------------------------------------------------------------- 1 | Versions/Current/vorbis -------------------------------------------------------------------------------- /thirdparty/frameworks/ogg.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /thirdparty/frameworks/vorbis.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /thirdparty/frameworks/vorbis.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /jfbuild/kplib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TermiT/duke3d-megaton/HEAD/jfbuild/kplib.c -------------------------------------------------------------------------------- /code/mode_detect_win32.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "SDL.h" 3 | #include "SDL_syswm.h" 4 | 5 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-7890:c031abe0b287" 2 | #define SDL_REVISION_NUMBER 7890 3 | -------------------------------------------------------------------------------- /thirdparty/frameworks/ogg.framework/Versions/A/ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TermiT/duke3d-megaton/HEAD/thirdparty/frameworks/ogg.framework/Versions/A/ogg -------------------------------------------------------------------------------- /thirdparty/frameworks/vorbis.framework/Versions/A/vorbis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TermiT/duke3d-megaton/HEAD/thirdparty/frameworks/vorbis.framework/Versions/A/vorbis -------------------------------------------------------------------------------- /jfbuild/lzwnew.h: -------------------------------------------------------------------------------- 1 | long lzwcompress (unsigned char *ucompbuf, long ucompleng, unsigned char *compbuf); 2 | long lzwuncompress (unsigned char *compbuf, long compleng, unsigned char *ucompbuf, long ucompleng); 3 | -------------------------------------------------------------------------------- /thirdparty/include/vorbis/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | vorbisincludedir = $(includedir)/vorbis 4 | 5 | vorbisinclude_HEADERS = codec.h vorbisfile.h vorbisenc.h 6 | 7 | 8 | -------------------------------------------------------------------------------- /thirdparty/frameworks/ogg.framework/Versions/A/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TermiT/duke3d-megaton/HEAD/thirdparty/frameworks/ogg.framework/Versions/A/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /thirdparty/include/ogg/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | oggincludedir = $(includedir)/ogg 4 | 5 | ogginclude_HEADERS = ogg.h os_types.h 6 | nodist_ogginclude_HEADERS = config_types.h 7 | -------------------------------------------------------------------------------- /thirdparty/frameworks/vorbis.framework/Versions/A/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TermiT/duke3d-megaton/HEAD/thirdparty/frameworks/vorbis.framework/Versions/A/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /duke3d/duke3d.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /duke3d/duke3d.xcodeproj/project.xcworkspace/xcuserdata/termit.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TermiT/duke3d-megaton/HEAD/duke3d/duke3d.xcodeproj/project.xcworkspace/xcuserdata/termit.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /thirdparty/include/SDL_name.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _SDLname_h_ 3 | #define _SDLname_h_ 4 | 5 | #if defined(__STDC__) || defined(__cplusplus) 6 | #define NeedFunctionPrototypes 1 7 | #endif 8 | 9 | #define SDL_NAME(X) SDL_##X 10 | 11 | #endif /* _SDLname_h_ */ 12 | -------------------------------------------------------------------------------- /gameroot/data/keyprompt.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
PRESS KEY
10 |
11 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /code/wintools.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Sergei Shubin 3 | // 4 | 5 | #ifndef WINTOOLS_H 6 | #define WINTOOLS_H 7 | 8 | int Win32_ShowErrorMessage(const char *caption, const char *message); 9 | 10 | void Win32_InitQPC(); 11 | double Win32_GetQPC(); 12 | 13 | #endif /* WINTOOLS_H */ 14 | -------------------------------------------------------------------------------- /gameroot/data/start.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
PRESS ENTER
10 |
11 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /code/mactools.h: -------------------------------------------------------------------------------- 1 | // 2 | // mactools.h 3 | // duke3d 4 | // 5 | // Created by termit on 1/22/13. 6 | // Copyright (c) 2013 General Arcade. All rights reserved. 7 | // 8 | 9 | const char* Sys_GetResourceDir(void); 10 | void Sys_ShowAlert(const char * text); 11 | void Sys_StoreData(const char *filepath, const char *data); -------------------------------------------------------------------------------- /code/base64.h: -------------------------------------------------------------------------------- 1 | #ifndef BASE64_H 2 | #define BASE64_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | char* base64_encode( const void* binaryData, int len, int *flen ); 9 | unsigned char* base64_decode( const char* ascii, int len, int *flen ); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /jfduke3d/osdcmds.h: -------------------------------------------------------------------------------- 1 | #ifndef __osdcmds_h__ 2 | #define __osdcmds_h__ 3 | 4 | struct osdcmd_cheatsinfo { 5 | int cheatnum; // -1 = none, else = see cheats() 6 | int volume,level; 7 | }; 8 | 9 | extern struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat; 10 | 11 | int registerosdcommands(void); 12 | 13 | #endif // __osdcmds_h__ 14 | 15 | -------------------------------------------------------------------------------- /jfaudiolib/dsound_oggplayer.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int DSOP_Init(void *lpDS); 6 | int DSOP_Open(const char *filename); 7 | void DSOP_Play(int loop); 8 | void DSOP_Stop(); 9 | void DSOP_Update(); 10 | int DSOP_IsPlaying(); 11 | void DSOP_Shutdown(); 12 | void DSOP_SetVolume(float volume); 13 | -------------------------------------------------------------------------------- /jfduke3d/grpscan.h: -------------------------------------------------------------------------------- 1 | #ifndef __grpscan_h__ 2 | #define __grpscan_h__ 3 | 4 | // List of internally-known GRP files 5 | #define numgrpfiles 7 6 | struct grpfile { 7 | const char *name; 8 | int crcval; 9 | int size; 10 | int game; 11 | struct grpfile *next; 12 | }; 13 | 14 | int ScanGroups(void); 15 | void FreeGroups(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /jfbuild/common_build.h: -------------------------------------------------------------------------------- 1 | // 2 | // common_build.h 3 | // sw 4 | // 5 | // Created by Gennadiy Potapov on 23/7/13. 6 | // Copyright (c) 2013 General Arcade. All rights reserved. 7 | // 8 | 9 | #ifndef sw_common_build_h 10 | #define sw_common_build_h 11 | 12 | #include "compat.h" 13 | 14 | int32_t check_file_exist(const char *fn); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /gameroot/data/pointer.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /code/sdl2_compat.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern "C" 5 | size_t __strlcat_chk( char *dest, const char *src, size_t size, size_t destSize ) { 6 | return strlcat( dest, src, destSize ); 7 | } 8 | 9 | extern "C" 10 | size_t __strlcpy_chk( char *dest, const char *src, size_t size, size_t destSize ) { 11 | return strlcpy( dest, src, size ); 12 | } 13 | -------------------------------------------------------------------------------- /jfduke3d/osdfuncs.h: -------------------------------------------------------------------------------- 1 | void GAME_drawosdchar(int x, int y, char ch, int shade, int pal); 2 | void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal); 3 | void GAME_drawosdcursor(int x, int y, int type, int lastkeypress); 4 | int GAME_getcolumnwidth(int w); 5 | int GAME_getrowheight(int w); 6 | void GAME_clearbackground(int c, int r); 7 | void GAME_onshowosd(int shown); 8 | 9 | -------------------------------------------------------------------------------- /code/crash.h: -------------------------------------------------------------------------------- 1 | // 2 | // crash.h 3 | // Duke Nukem 3D Megaton Edition 4 | // 5 | // Created by serge on 26/08/14. 6 | // Copyright (c) 2014 generalarcade. All rights reserved. 7 | // 8 | 9 | #ifndef crash_h 10 | #define crash_h 11 | 12 | #if defined( __cplusplus ) 13 | extern "C" { 14 | #endif 15 | void CrashHandler_Init(); 16 | void CrashHandler_Free(); 17 | #if defined( __cplusplus ) 18 | } 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /gameroot/data/yesno.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
Question
12 | 13 |
14 |
YES
15 |
NO
16 |
17 | 18 | 19 |
20 | -------------------------------------------------------------------------------- /code/mode_detect_osx.m: -------------------------------------------------------------------------------- 1 | // 2 | // mode_detect_osx.m 3 | // duke3d 4 | // 5 | // Created by serge on 27/2/13. 6 | // Copyright (c) 2013 General Arcade. All rights reserved. 7 | // 8 | 9 | #include 10 | #import 11 | 12 | void dnGetScreenSize(int *width, int *height) { 13 | NSRect screenRect = [[NSScreen mainScreen] frame]; 14 | *width = (int) screenRect.size.width; 15 | *height = (int) screenRect.size.height; 16 | } 17 | -------------------------------------------------------------------------------- /duke3d/duke3d.xcodeproj/project.xcworkspace/xcuserdata/termit.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jfbuild/crc32.h: -------------------------------------------------------------------------------- 1 | #ifndef __crc32_h__ 2 | #define __crc32_h__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void initcrc32table(void); 9 | 10 | unsigned long crc32once(unsigned char *blk, unsigned long len); 11 | 12 | void crc32init(unsigned long *crcvar); 13 | void crc32block(unsigned long *crcvar, unsigned char *blk, unsigned long len); 14 | unsigned long crc32finish(unsigned long *crcvar); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /thirdparty/include/smpeg/gtv.h: -------------------------------------------------------------------------------- 1 | #ifndef GTV_H 2 | #define GTV_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "smpeg.h" 13 | 14 | #define FILENAME_BUFFER_SIZE 256 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | /* Nothing here presently. */ 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /gameroot/data/confirmation.rcss: -------------------------------------------------------------------------------- 1 | #question { 2 | display: block; 3 | position: absolute; 4 | left: 340px; 5 | width: 1240px; 6 | top: 350px; 7 | color: rgb(235,156,9); 8 | font-size: 60px; 9 | text-align: center; 10 | } 11 | 12 | div.game-menu { 13 | display: block; 14 | position: absolute; 15 | width: 200px; 16 | height: 800px; 17 | left: 835px; 18 | top: 450px; 19 | } 20 | 21 | body { 22 | background:rgba(0,0,0,220); 23 | } 24 | -------------------------------------------------------------------------------- /gameroot/data/menubg.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gameroot/data/menubg_1.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gameroot/data/menubg_2.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gameroot/data/menubg_3.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /code/glguard.h: -------------------------------------------------------------------------------- 1 | // Sergei Shubin 2 | 3 | #ifndef GLGUARD_H 4 | #define GLGUARD_H 5 | 6 | #include "glbuild.h" 7 | 8 | #ifdef __cplusplus 9 | 10 | #include "ShellRenderInterfaceOpenGL.h" 11 | 12 | void InitGLGuard(ShellRenderInterfaceOpenGL *render_interface); 13 | 14 | extern "C" { 15 | 16 | #endif 17 | 18 | void APIENTRY g_glGenTextures(GLsizei n, GLuint *textures); 19 | void APIENTRY g_glDeleteTextures(GLsizei n, const GLuint *textures); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif /* GLDUARD_H */ 26 | -------------------------------------------------------------------------------- /gameroot/data/videoconfirm.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
Keep this mode?
12 | 13 |
14 |
YES
15 |
NO
16 |
17 | 18 | 19 |
20 | -------------------------------------------------------------------------------- /thirdparty/include/smpeg/glmovie.h: -------------------------------------------------------------------------------- 1 | #ifndef _GLMOVIE_H_ 2 | #define _GLMOVIE_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | GLenum glmovie_init( GLuint, GLuint ); 13 | void glmovie_quit( void ); 14 | void glmovie_draw( GLubyte* ); 15 | void glmovie_resize( GLuint, GLuint ); 16 | GLuint glmovie_next_power_of_2( GLuint seed ); 17 | GLboolean glmovie_is_power_of_2( GLuint value ); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /code/log.h: -------------------------------------------------------------------------------- 1 | // 2 | // log.h 3 | // duke3d 4 | // 5 | // Created by serge on 30.08.2014. 6 | // Copyright (c) 2014 General Arcade. All rights reserved. 7 | // 8 | 9 | #ifndef duke3d_log_h 10 | #define duke3d_log_h 11 | 12 | #if defined( __cplusplus ) 13 | extern "C" { 14 | #endif 15 | 16 | void Log_Open( void ); 17 | const char *Log_GetPath( void ); 18 | void Log_Printf( const char *format, ... ); 19 | void Log_Puts( const char *string ); 20 | void Log_Close( void ); 21 | 22 | #if defined( __cplusplus ) 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /jfbuild/sdlayer.h: -------------------------------------------------------------------------------- 1 | // SDL interface layer 2 | // for the Build Engine 3 | // by Jonathon Fowler (jf@jonof.id.au) 4 | 5 | #ifndef __build_interface_layer__ 6 | #define __build_interface_layer__ SDL 7 | 8 | #include "baselayer.h" 9 | 10 | struct sdlappicon { 11 | int width,height; 12 | unsigned int *pixels; 13 | unsigned char *mask; 14 | }; 15 | 16 | 17 | #else 18 | #if (__build_interface_layer__ != SDL) 19 | #error "Already using the " __build_interface_layer__ ". Can't now use SDL." 20 | #endif 21 | #endif // __build_interface_layer__ 22 | 23 | -------------------------------------------------------------------------------- /gameroot/data/skillep.rcss: -------------------------------------------------------------------------------- 1 | div.game-menu { 2 | width: 800px; 3 | height: 800px; 4 | left: 560px; 5 | top: 400px; 6 | } 7 | div.game-menu div { 8 | font-size: 46pt; 9 | } 10 | 11 | title { 12 | display: block; 13 | position: absolute; 14 | left: 240px; 15 | width: 1440px; 16 | bottom: 804px; 17 | text-align: center; 18 | font-size: 66pt; 19 | color: rgb(235,156,9); 20 | } 21 | -------------------------------------------------------------------------------- /thirdparty/dxsdk/include/dxsdkver.h: -------------------------------------------------------------------------------- 1 | /*==========================================================================; 2 | * 3 | * 4 | * File: dxsdkver.h 5 | * Content: DirectX SDK Version Include File 6 | * 7 | ****************************************************************************/ 8 | 9 | #ifndef _DXSDKVER_H_ 10 | #define _DXSDKVER_H_ 11 | 12 | #define _DXSDK_PRODUCT_MAJOR 9 13 | #define _DXSDK_PRODUCT_MINOR 29 14 | #define _DXSDK_BUILD_MAJOR 1962 15 | #define _DXSDK_BUILD_MINOR 0 16 | 17 | #endif // _DXSDKVER_H_ 18 | 19 | -------------------------------------------------------------------------------- /code/rocket/PluginUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Sergei Shubin 3 | // 4 | 5 | #ifndef PLUGIN_UTILS_H 6 | #define PLUGIN_UTILS_H 7 | 8 | #include 9 | #include 10 | 11 | void SetElementUserData(Rocket::Core::Element *element, void *user_data, const Rocket::Core::String& key); 12 | void* GetElementUserData(Rocket::Core::Element *element, const Rocket::Core::String& key); 13 | 14 | void ShowElement(Rocket::Core::Element *element, bool visible, const Rocket::Core::String& display_mode = "inline"); 15 | 16 | #endif /* PLUGIN_UTILS_H */ 17 | -------------------------------------------------------------------------------- /code/dnMouseInput.h: -------------------------------------------------------------------------------- 1 | #ifndef DN_MOUSE_INPUT 2 | #define DN_MOUSE_INPUT 3 | 4 | #if defined( __cplusplus ) 5 | extern "C" { 6 | #endif 7 | 8 | enum { 9 | DN_MOUSE_RAW = 0, 10 | DN_MOUSE_SDL = 1, 11 | }; 12 | 13 | void dnSetMouseInputMode( int mode ); 14 | int dnGetMouseInputMode( void ); 15 | void dnGetMouseInput( int *dx, int *dy, int peek ); 16 | void dnUpdateMouseInput( void ); 17 | void dnInitMouseInput( void ); 18 | void dnShutdownMouseInput( void ); 19 | int dnGetNumberOfMouseInputDevices( void ); 20 | 21 | #if defined( __cplusplus ) 22 | } 23 | #endif 24 | 25 | #endif /* DN_MOUSE_INPUT */ 26 | -------------------------------------------------------------------------------- /jfduke3d/GameListSource.game.h: -------------------------------------------------------------------------------- 1 | /* 2 | * GameListSource.game.h 3 | * duke3d 4 | * 5 | * Created by Jonathon Fowler on 24/07/09. 6 | * Copyright 2009 __MyCompanyName__. All rights reserved. 7 | * 8 | */ 9 | 10 | @interface GameListSource : NSObject 11 | { 12 | NSMutableArray *list; 13 | } 14 | - (id)init; 15 | - (void)dealloc; 16 | - (GrpFile*)grpAtIndex:(int)index; 17 | - (int)findIndexForGrpname:(NSString*)grpname; 18 | - (id)tableView:(NSTableView *)aTableView 19 | objectValueForTableColumn:(NSTableColumn *)aTableColumn 20 | row:(int)rowIndex; 21 | - (int)numberOfRowsInTableView:(NSTableView *)aTableView; 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /thirdparty/include/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H 1 6 | #define INCLUDE_STDINT_H 1 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef short ogg_int16_t; 20 | typedef unsigned short ogg_uint16_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef long long ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /gameroot/data/skill_3.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT SKILL 6 | 7 | 8 | 9 | 10 | DIFFICULTY 11 | 12 | 13 | 14 | 15 |
16 |
LOW TIDE
17 |
MAKING' WAVES
18 |
BIG KAHUNA
19 |
TSUNAMI
20 |
21 | 22 | 23 |
24 | -------------------------------------------------------------------------------- /gameroot/data/episodes.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT AN EPISODE 6 | 7 | 8 | 9 | 10 | EPISODE 11 | 12 | 13 | 14 | 15 |
16 |
L.A. MELTDOWN
17 |
LUNAR APOCALYPSE
18 |
SHRAPNEL CITY
19 |
THE BIRTH
20 |
21 | 22 | 23 |
24 | -------------------------------------------------------------------------------- /gameroot/data/skill.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SELECT SKILL 6 | 7 | 8 | 9 | 10 | DIFFICULTY 11 | 12 | 13 | 14 | 15 |
16 |
PIECE OF CAKE
17 |
LET'S ROCK
18 |
COME GET SOME
19 |
DAMN I'M GOOD
20 |
21 | 22 | 23 |
24 | -------------------------------------------------------------------------------- /thirdparty/include/ogg/config_types.h.in: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H @INCLUDE_INTTYPES_H@ 6 | #define INCLUDE_STDINT_H @INCLUDE_STDINT_H@ 7 | #define INCLUDE_SYS_TYPES_H @INCLUDE_SYS_TYPES_H@ 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef @SIZE16@ ogg_int16_t; 20 | typedef @USIZE16@ ogg_uint16_t; 21 | typedef @SIZE32@ ogg_int32_t; 22 | typedef @USIZE32@ ogg_uint32_t; 23 | typedef @SIZE64@ ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /code/rocket/ShellSystemInterface.cpp: -------------------------------------------------------------------------------- 1 | #include "ShellSystemInterface.h" 2 | #include 3 | #ifdef _WIN32 4 | #include 5 | #endif 6 | 7 | // Get the number of seconds elapsed since the start of the application 8 | float ShellSystemInterface::GetElapsedTime() { 9 | return 0.001*(float)SDL_GetTicks(); 10 | } 11 | 12 | // Log the specified message. 13 | // returns true to continue execution, false to break into the debugger. 14 | 15 | bool ShellSystemInterface::LogMessage(Rocket::Core::Log::Type type, const Rocket::Core::String& message) { 16 | #ifdef _WIN32 17 | OutputDebugStringA(message.CString()); 18 | OutputDebugStringA("\n"); 19 | #endif 20 | // printf("[ROCK] %s\n", message.CString()); 21 | return true; 22 | } 23 | -------------------------------------------------------------------------------- /thirdparty/include/vpx/vpx_codec_impl_bottom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | /* 13 | * This file is to be included at the bottom of the header files defining the 14 | * interface to individual codecs and contains matching blocks to those defined 15 | * in vpx_codec_impl_top.h 16 | */ 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /thirdparty/include/vpx/vpx_codec_impl_top.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | /* 13 | * This file is to be included at the top of the header files defining the 14 | * interface to individual codecs and contains various workarounds common 15 | * to all codec implementations. 16 | */ 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | -------------------------------------------------------------------------------- /jfduke3d/startwin.game.h: -------------------------------------------------------------------------------- 1 | // resource ids 2 | #define WIN_STARTWIN 1000 3 | #define WIN_STARTWINPAGE_CONFIG 2000 4 | #define WIN_STARTWINPAGE_GAME 3000 5 | #define WIN_STARTWIN_BITMAP 100 // banner bitmap 6 | #define WIN_STARTWIN_TABCTL 101 7 | #define WIN_STARTWIN_CANCEL IDCANCEL 8 | #define WIN_STARTWIN_START IDOK 9 | 10 | #define WIN_STARTWIN_MESSAGES 104 // output list box 11 | 12 | #define RSRC_ICON 100 13 | #define RSRC_BMP 200 14 | 15 | // config page 16 | #define IDCFULLSCREEN 100 17 | #define IDCVMODE 101 18 | #define IDCSOUNDQUAL 102 19 | //#define IDCMIDIDEV 103 20 | //#define IDCCDADEV 104 21 | #define IDCINPUTMOUSE 105 22 | #define IDCINPUTJOY 106 23 | #define IDCALWAYSSHOW 107 24 | 25 | // game page 26 | #define IDGDATA 100 27 | 28 | -------------------------------------------------------------------------------- /gameroot/data/mouse.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MOUSE SETUP 6 | 7 | 8 | 9 | 10 | MOUSE SETUP 11 | 12 |
13 | 14 | 15 |
16 | SENSITIVITY 17 | 18 |
19 | 20 | 21 |
22 | INVERT Y AXIS 23 | 24 | 25 | 26 | 27 |
28 | 29 |
30 | 31 |
32 | -------------------------------------------------------------------------------- /jfbuild/hightile_priv.h: -------------------------------------------------------------------------------- 1 | #ifndef HIGHTILE_PRIV_H 2 | #define HIGHTILE_PRIV_H 3 | 4 | enum { 5 | HICEFFECT_NONE = 0, 6 | HICEFFECT_GREYSCALE = 1, 7 | HICEFFECT_INVERT = 2, 8 | HICEFFECTMASK = 3, 9 | }; 10 | 11 | enum { 12 | HIC_NOCOMPRESS = 1, 13 | }; 14 | 15 | struct hicskybox_t { 16 | long ignore; 17 | char *face[6]; 18 | }; 19 | 20 | typedef struct hicreplc_t { 21 | struct hicreplc_t *next; 22 | char palnum, ignore, flags, filler; 23 | char *filename; 24 | float alphacut; 25 | struct hicskybox_t *skybox; 26 | short sizex; 27 | short sizey; 28 | } hicreplctyp; 29 | 30 | extern palette_t hictinting[MAXPALOOKUPS]; 31 | extern hicreplctyp *hicreplc[MAXTILES]; 32 | extern char hicfirstinit; 33 | 34 | hicreplctyp * hicfindsubst(long picnum, long palnum, long skybox); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /thirdparty/frameworks/ogg.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ogg 9 | CFBundleIdentifier 10 | com.yourcompany.yourcocoaframework 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ogg 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | 22 | 23 | -------------------------------------------------------------------------------- /jfbuild/kplib.h: -------------------------------------------------------------------------------- 1 | //High-level (easy) picture loading function: 2 | extern void kpzload (const char *, long *, long *, long *, long *); 3 | //Low-level PNG/JPG functions: 4 | extern void kpgetdim (const char *, long, long *, long *); 5 | extern long kprender (const char *, long, long, long, long, long, long, long); 6 | 7 | //ZIP functions: 8 | extern long kzaddstack (const char *); 9 | extern void kzuninit (); 10 | extern long kzopen (const char *); 11 | extern long kzread (void *, long); 12 | extern long kzfilelength (); 13 | extern long kzseek (long, long); 14 | extern long kztell (); 15 | extern long kzgetc (); 16 | extern long kzeof (); 17 | extern void kzclose (); 18 | 19 | extern void kzfindfilestart (const char *); //pass wildcard string 20 | extern long kzfindfile (char *); //you alloc buf, returns 1:found,0:~found 21 | 22 | -------------------------------------------------------------------------------- /thirdparty/frameworks/vorbis.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | vorbis 9 | CFBundleIdentifier 10 | com.yourcompany.yourcocoaframework 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | vorbis 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | 22 | 23 | -------------------------------------------------------------------------------- /code/base64_test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "base64.h" 5 | 6 | void test(const char *string) { 7 | char *encoded, *decoded; 8 | int enc_len, dec_len; 9 | encoded = base64_encode((unsigned char*)string, strlen(string), &enc_len); /* don't care of memory leaks, it's just a test */ 10 | decoded = (char*)base64_decode(encoded, enc_len, &dec_len); 11 | if (dec_len != strlen(string)) { 12 | printf("length mismatch\n"); 13 | } else if (memcmp(string, decoded, dec_len)) { 14 | printf("data mismatch\n"); 15 | } else { 16 | printf("test ok for %s\n", string); 17 | } 18 | } 19 | 20 | int main(int argc, char *argv[]) { 21 | test("0123456789"); 22 | test("abcdefghijk"); 23 | test("lasndlkjedli2j3lknwq.d"); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /gameroot/data/mainmenu_1.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DUKE NUKEM 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
NEW GAME
16 |
OPTIONS
17 |
LOAD GAME
18 |
COMMUNITY HUB
19 |
CREDITS
20 |
QUIT GAME
21 |
22 | 23 | 24 | 25 | 26 |
27 | -------------------------------------------------------------------------------- /gameroot/data/mainmenu_2.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DUKE NUKEM 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
NEW GAME
16 |
OPTIONS
17 |
LOAD GAME
18 |
COMMUNITY HUB
19 |
CREDITS
20 |
QUIT GAME
21 |
22 | 23 | 24 | 25 | 26 |
27 | -------------------------------------------------------------------------------- /code/glguard.cpp: -------------------------------------------------------------------------------- 1 | #include "glguard.h" 2 | #include 3 | 4 | static 5 | ShellRenderInterfaceOpenGL *s_render_interface = NULL; 6 | 7 | void InitGLGuard(ShellRenderInterfaceOpenGL *render_interface) { 8 | s_render_interface = render_interface; 9 | } 10 | 11 | extern "C" 12 | void APIENTRY g_glGenTextures(GLsizei n, GLuint *textures) { 13 | } 14 | 15 | extern "C" 16 | void APIENTRY g_glDeleteTextures(GLsizei n, const GLuint *textures) { 17 | if (s_render_interface == NULL) { 18 | printf("[WARN] GL Guard is not initialized yet, but the game wants to delete textures\n"); 19 | } else { 20 | for (GLsizei i = 0; i < n; i++) { 21 | if (s_render_interface->HasTexture(textures[i])) { 22 | printf("[ERR ] GL Guard: attempt to delete texture belonging to ShellRenderInterface\n"); 23 | } 24 | } 25 | } 26 | glDeleteTextures(n, textures); 27 | } 28 | -------------------------------------------------------------------------------- /gameroot/data/mainmenu_3.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DUKE NUKEM 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
NEW GAME
16 |
OPTIONS
17 |
LOAD GAME
18 |
COMMUNITY HUB
19 |
CREDITS
20 |
QUIT GAME
21 |
22 | 23 | 24 | 25 | 26 |
27 | -------------------------------------------------------------------------------- /jfbuild/common_build.c: -------------------------------------------------------------------------------- 1 | // 2 | // common_build.c 3 | // sw 4 | // 5 | // Created by Gennadiy Potapov on 23/7/13. 6 | // Copyright (c) 2013 General Arcade. All rights reserved. 7 | // 8 | 9 | #include "common_build.h" 10 | #include "cache1d.h" 11 | 12 | 13 | int32_t check_file_exist(const char *fn) 14 | { 15 | int32_t opsm = pathsearchmode; 16 | char *tfn; 17 | 18 | pathsearchmode = 1; 19 | if (findfrompath(fn,&tfn) < 0) 20 | { 21 | char buf[BMAX_PATH]; 22 | 23 | Bstrcpy(buf,fn); 24 | kzfindfilestart(buf); 25 | if (!kzfindfile(buf)) 26 | { 27 | initprintf("Error: file \"%s\" does not exist\n",fn); 28 | pathsearchmode = opsm; 29 | return 1; 30 | } 31 | } 32 | else Bfree(tfn); 33 | pathsearchmode = opsm; 34 | 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /code/gui.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Sergei Shubin 3 | // 4 | 5 | #ifndef GUI_H 6 | #define GUI_H 7 | 8 | #include "SDL.h" 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void GUI_Init(int width, int height); 15 | void GUI_Shutdown(void); 16 | void GUI_Render(void); 17 | void GUI_PreModeChange(void); 18 | void GUI_PostModeChange(int width, int height); 19 | void GUI_Enable(int enabled); 20 | int GUI_IsEnabled(void); 21 | int GUI_InjectEvent(SDL_Event *ev); 22 | void GUI_TimePulse(void); 23 | void GUI_EnableMenuForCurrentFrame(void); 24 | void GUI_ShowSaveMenu(void); 25 | void GUI_ShowLoadMenu(void); 26 | void GUI_ShowHelpMenu(void); 27 | void GUI_ShowSoundMenu(void); 28 | void GUI_ShowVideoSettingsMenu(void); 29 | void GUI_ShowGameOptionsMenu(void); 30 | void GUI_ShowQuitConfirmation(void); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* GUI_H */ 37 | -------------------------------------------------------------------------------- /jfaudiolib/asssys.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Jonathon Fowler 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | #ifndef __ASSSYS_H 22 | #define __ASSSYS_H 23 | 24 | void ASS_Sleep(int msec); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /code/rocket/PluginUtils.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Sergei Shubin 3 | // 4 | 5 | #include "PluginUtils.h" 6 | 7 | void SetElementUserData(Rocket::Core::Element *element, void *user_data, const Rocket::Core::String& key) { 8 | char ptr_text[10]; 9 | sprintf(ptr_text, "%x", user_data); 10 | element->SetAttribute(key, ptr_text); 11 | } 12 | 13 | void* GetElementUserData(Rocket::Core::Element *element, const Rocket::Core::String& key) { 14 | void *result = NULL; 15 | if (element != NULL) { 16 | Rocket::Core::Variant *value = element->GetAttribute(key); 17 | if (value != NULL) { 18 | Rocket::Core::String strval; 19 | value->GetInto(strval); 20 | sscanf(strval.CString(), "%x", &result); 21 | } 22 | } 23 | return result; 24 | } 25 | 26 | void ShowElement(Rocket::Core::Element *element, bool visible, const Rocket::Core::String& display_mode) { 27 | element->SetProperty("display", visible ? display_mode : "none"); 28 | } 29 | -------------------------------------------------------------------------------- /duke3d/duke3d.xcodeproj/xcuserdata/termit.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | duke3d.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | duke3d_w_SDL.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 774FBA4F16ADBB6C0061B3B7 21 | 22 | primary 23 | 24 | 25 | 77CDCEB0169F1AAD00F7DCB6 26 | 27 | primary 28 | 29 | 30 | 957CD08119B9D718001F6D37 31 | 32 | primary 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /jfaudiolib/dsound_oggplayer.cpp: -------------------------------------------------------------------------------- 1 | #include "OggPlayer.h" 2 | 3 | static OggPlayer *oggPlayer = NULL; 4 | 5 | extern "C" { 6 | 7 | int DSOP_Init(void *lpDS) { 8 | oggPlayer = new OggPlayer(); 9 | if (oggPlayer != NULL) { 10 | oggPlayer->UseDirectSound((LPDIRECTSOUND8)lpDS); 11 | return 0; 12 | } 13 | return -1; 14 | } 15 | 16 | int DSOP_Open(const char *filename) { 17 | return oggPlayer->OpenOgg(filename) ? 0 : -1; 18 | } 19 | 20 | void DSOP_Play(int loop) { 21 | oggPlayer->Play(loop != 0); 22 | } 23 | 24 | void DSOP_Stop() { 25 | oggPlayer->Stop(); 26 | } 27 | 28 | void DSOP_Update() { 29 | if (oggPlayer != NULL) 30 | oggPlayer->Update(); 31 | } 32 | 33 | int DSOP_IsPlaying() { 34 | return oggPlayer->IsPlaying() ? 1 : 0; 35 | } 36 | 37 | void DSOP_Shutdown() { 38 | if (oggPlayer != NULL) { 39 | delete oggPlayer; 40 | oggPlayer = NULL; 41 | } 42 | } 43 | 44 | void DSOP_SetVolume(float volume) { 45 | if (oggPlayer != NULL) { 46 | oggPlayer->SetVolume(volume); 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | -------------------------------------------------------------------------------- /gameroot/data/options.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | OPTIONS 6 | 14 | 15 | 16 | 17 | 18 | OPTIONS 19 | 20 | 21 | 22 | 23 |
24 |
GAME OPTIONS
25 |
SOUND OPTIONS
26 |
VIDEO SETTINGS
27 |
KEYS SETUP
28 |
MOUSE SETUP
29 | 30 |
31 | 32 | 33 |
34 | -------------------------------------------------------------------------------- /jfbuild/scriptfile.h: -------------------------------------------------------------------------------- 1 | typedef struct { 2 | char *textbuf; 3 | unsigned int textlength; 4 | char *ltextptr; // pointer to start of the last token fetched (use this for line numbers) 5 | char *textptr; 6 | char *eof; 7 | char *filename; 8 | int linenum; 9 | long *lineoffs; 10 | } scriptfile; 11 | 12 | char *scriptfile_gettoken(scriptfile *sf); 13 | int scriptfile_getnumber(scriptfile *sf, int *num); 14 | int scriptfile_getdouble(scriptfile *sf, double *num); 15 | int scriptfile_getstring(scriptfile *sf, char **st); 16 | int scriptfile_getsymbol(scriptfile *sf, int *num); 17 | int scriptfile_getlinum(scriptfile *sf, char *ptr); 18 | int scriptfile_getbraces(scriptfile *sf, char **braceend); 19 | 20 | scriptfile *scriptfile_fromfile(char *fn); 21 | scriptfile *scriptfile_fromstring(char *string); 22 | void scriptfile_close(scriptfile *sf); 23 | int scriptfile_eof(scriptfile *sf); 24 | 25 | int scriptfile_getsymbolvalue(char *name, int *val); 26 | int scriptfile_addsymbolvalue(char *name, int val); 27 | void scriptfile_clearsymbols(void); 28 | -------------------------------------------------------------------------------- /thirdparty/include/smpeg/MPEGlist.h: -------------------------------------------------------------------------------- 1 | /* bufferlist.h */ 2 | 3 | /* A class for buffering the I/O and allow multiple streams to read the data 4 | asynchronously */ 5 | 6 | #ifndef _MPEGLIST_H_ 7 | #define _MPEGLIST_H_ 8 | 9 | #include "SDL.h" 10 | 11 | class MPEGlist { 12 | public: 13 | MPEGlist(); 14 | ~MPEGlist(); 15 | 16 | /* Get to the next free buffer or allocate a new one if none is free */ 17 | MPEGlist * Alloc(Uint32 Buffer_Size); 18 | 19 | /* Lock current buffer */ 20 | void Lock(); 21 | 22 | /* Unlock current buffer */ 23 | void Unlock(); 24 | 25 | /* Get the buffer */ 26 | inline void * Buffer() { return(data); }; 27 | 28 | inline Uint32 Size() { return(size); }; 29 | 30 | inline MPEGlist * Next() { return(next); }; 31 | 32 | inline MPEGlist * Prev() { return(prev); }; 33 | 34 | inline Uint32 IsLocked() { return(lock); }; 35 | 36 | double TimeStamp; 37 | 38 | private: 39 | class MPEGlist * next; 40 | class MPEGlist * prev; 41 | Uint32 lock; 42 | Uint8 * data; 43 | Uint32 size; 44 | }; 45 | #endif 46 | -------------------------------------------------------------------------------- /code/dn_system.h: -------------------------------------------------------------------------------- 1 | // 2 | // dn_system.h 3 | // duke3d 4 | // 5 | // Created by Gennadiy Potapov on 16/8/13. 6 | // Copyright (c) 2013 General Arcade. All rights reserved. 7 | // 8 | 9 | #ifndef duke3d_dn_system_h 10 | #define duke3d_dn_system_h 11 | 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | int Sys_Init(int argc, char *argv[]); 18 | const char* Sys_GetResourceDir(void); 19 | void Sys_ShowAlert(const char * text); 20 | void Sys_StoreData(const char *filepath, const char *data); 21 | void Sys_InitTimer(); 22 | void Sys_UninitTimer(); 23 | double Sys_GetTicks(); 24 | void Sys_ThrottleFPS(int max_fps); 25 | void Sys_GetScreenSize(int *width, int *height); 26 | void Sys_CenterWindow(int width, int height); 27 | void Sys_OutputDebugString(const char *string); 28 | 29 | #ifdef __APPLE__ 30 | int Sys_IsSnowLeopard(); 31 | #endif 32 | 33 | #ifdef _WIN32 34 | void* win_gethwnd(); 35 | #endif 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /gameroot/data/savegame.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SAVE GAME 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
EMPTY
14 |
EMPTY
15 |
EMPTY
16 |
EMPTY
17 |
EMPTY
18 |
EMPTY
19 |
EMPTY
20 |
EMPTY
21 |
EMPTY
22 |
EMPTY
23 |
24 | 25 |
26 |
27 | 28 |
29 |
level
30 |
skill
31 |
episode
32 |
33 | 34 | 35 |
36 | -------------------------------------------------------------------------------- /gameroot/data/ingamemenu.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GAME MENU 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | 18 |
19 |
RESUME
20 |
OPTIONS
21 |
SAVE GAME
22 |
LOAD GAME
23 |
COMMUNITY HUB
24 |
QUIT TO TITLE
25 |
QUIT GAME
26 |
27 | 28 | 29 |
30 | -------------------------------------------------------------------------------- /gameroot/data/loadgame.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LOAD GAME 6 | 7 | 8 | 9 | 10 | LOAD GAME 11 | 12 | 13 | 14 |
15 |
EMPTY
16 |
EMPTY
17 |
EMPTY
18 |
EMPTY
19 |
EMPTY
20 |
EMPTY
21 |
EMPTY
22 |
EMPTY
23 |
EMPTY
24 |
EMPTY
25 |
26 | 27 |
28 |
29 | 30 |
31 |
level
32 |
skill
33 |
episode
34 |
35 | 36 | 37 |
38 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_getenv.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_getenv.h 24 | * @deprecated Use SDL_stdinc.h instead 25 | */ 26 | 27 | /* DEPRECATED */ 28 | #include "SDL_stdinc.h" 29 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_byteorder.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file SDL_byteorder.h 25 | * @deprecated Use SDL_endian.h instead 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_endian.h" 30 | -------------------------------------------------------------------------------- /gameroot/data/mainmenu.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DUKE NUKEM 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
NEW GAME
19 |
OPTIONS
20 |
LOAD GAME
21 |
COMMUNITY HUB
22 |
CREDITS
23 |
QUIT GAME
24 |
25 | 26 | 27 | 28 | 29 |
30 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /gameroot/data/scrollbar.rcss: -------------------------------------------------------------------------------- 1 | scrollbarvertical 2 | { 3 | -margin-top: -6px; 4 | -margin-bottom: -6px; 5 | -margin-right: -11px; 6 | margin-left: 30px; 7 | width: 40px; 8 | } 9 | 10 | scrollbarvertical slidertrack 11 | { 12 | background-decorator: tiled-vertical; 13 | background-top-image: assets/scrollbarrail.tga 0px 0px 40px 7px; 14 | background-center-image: assets/scrollbarrail.tga stretch 0px 7px 40px 10px; 15 | background-bottom-image: assets/scrollbarrail.tga 0px 11px 40px 17px; 16 | } 17 | 18 | scrollbarvertical sliderbar 19 | { 20 | -margin-left: 4px; 21 | width: 40px; 22 | min-height: 46px; 23 | max-height: 100px; 24 | 25 | background-decorator: tiled-vertical; 26 | background-top-image: assets/scrollbargrip.tga 0px 0x 40px 7px; 27 | background-center-image: assets/scrollbargrip.tga stretch 0px 7px 40px 12px; 28 | background-bottom-image: assets/scrollbargrip.tga 0px 13px 40px 20px; 29 | } 30 | 31 | scrollbarvertical sliderarrowdec 32 | { 33 | display: none; 34 | width: 27px; 35 | height: 2px; 36 | } 37 | 38 | scrollbarvertical sliderarrowinc 39 | { 40 | display: none; 41 | width: 27px; 42 | height: 2px; 43 | } 44 | -------------------------------------------------------------------------------- /code/rocket/FrameAnimationDecoratorInstancer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Sergei Shubin 3 | // 4 | 5 | #ifndef FRAME_ANIMATION_DECORATOR_INSTANCER_H 6 | #define FRAME_ANIMATION_DECORATOR_INSTANCER_H 7 | 8 | #include 9 | 10 | class FrameAnimationDecoratorInstancer: public Rocket::Core::DecoratorInstancer { 11 | public: 12 | // Instances a decorator given the property tag and attributes from the RCSS file. 13 | // @param[in] name The type of decorator desired. 14 | // @param[in] properties All RCSS properties associated with the decorator. 15 | // @return The decorator if it was instanced successful, NULL if an error occured. 16 | virtual Rocket::Core::Decorator* InstanceDecorator(const Rocket::Core::String& name, const Rocket::Core::PropertyDictionary& properties); 17 | // Releases the given decorator. 18 | // @param[in] decorator Decorator to release. 19 | virtual void ReleaseDecorator(Rocket::Core::Decorator* decorator); 20 | 21 | // Releases the instancer. 22 | virtual void Release(); 23 | 24 | FrameAnimationDecoratorInstancer(); 25 | virtual ~FrameAnimationDecoratorInstancer(); 26 | }; 27 | 28 | #endif /* FRAME_ANIMATION_DECORATOR_INSTANCER_H */ 29 | -------------------------------------------------------------------------------- /code/helpers.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Sergei Shubin 3 | // 4 | 5 | #ifndef HELPERS_H 6 | #define HELPERS_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | 12 | template 13 | t clamp(t v, t min, t max); 14 | 15 | template 16 | t2 lerp(t1 a, t1 b, t2 k); 17 | 18 | struct rgb { 19 | double r; // percent 20 | double g; // percent 21 | double b; // percent 22 | rgb():r(0),g(0),b(0){} 23 | rgb(double r, double g, double b):r(r),g(g),b(b){} 24 | rgb(int r, int g, int b):r(r/255.0),g(g/255.0),b(b/255.0){} 25 | }; 26 | 27 | rgb rgb_interp(rgb a, rgb b, float k); 28 | rgb rgb_lerp(rgb a, rgb b, float k); 29 | 30 | extern "C" { 31 | #endif 32 | 33 | int clampi(int v, int min, int max); 34 | unsigned int clampui(unsigned int v, unsigned int min, unsigned int max); 35 | float clampf(float v, float min, float max); 36 | double clampd(double v, double min, double max); 37 | const char* va(const char *format, ...); 38 | void crc32file(FILE *f, unsigned long *result); 39 | char *str_replace (const char *string, const char *substr, const char *replacement); 40 | long get_modified_time(const char * path); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* HELPERS_H */ 47 | -------------------------------------------------------------------------------- /jfaudiolib/asssys.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Jonathon Fowler 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | #include "asssys.h" 22 | 23 | #ifdef _WIN32 24 | # define WIN32_LEAN_AND_MEAN 25 | # include 26 | #else 27 | # include 28 | # include 29 | # include 30 | #endif 31 | 32 | void ASS_Sleep(int msec) 33 | { 34 | #ifdef _WIN32 35 | Sleep(msec); 36 | #else 37 | struct timeval tv; 38 | 39 | tv.tv_sec = msec / 1000; 40 | tv.tv_usec = (msec % 1000) * 1000; 41 | select(0, NULL, NULL, NULL, &tv); 42 | #endif 43 | } 44 | -------------------------------------------------------------------------------- /jfaudiolib/cd.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Jonathon Fowler 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | #ifndef __CD_H 22 | #define __CD_H 23 | 24 | enum { 25 | CD_Error = -1, 26 | CD_Ok, 27 | CD_InvalidCard, 28 | CD_DriverError 29 | }; 30 | 31 | int CD_GetError(void); 32 | const char * CD_ErrorString(int code); 33 | int CD_Init(int SoundCard); 34 | void CD_Shutdown(void); 35 | int CD_Play(int track, int loop); 36 | void CD_Stop(void); 37 | void CD_Pause(int pauseon); 38 | int CD_IsPlaying(void); 39 | void CD_SetVolume(int volume); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /duke3d/duke3d-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | icon 11 | CFBundleIdentifier 12 | com.generalarcade.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSApplicationCategoryType 26 | public.app-category.action-games 27 | LSMinimumSystemVersion 28 | ${MACOSX_DEPLOYMENT_TARGET} 29 | NSHumanReadableCopyright 30 | Copyright © 2013 General Arcade. All rights reserved. 31 | NSMainNibFile 32 | MainMenu 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /duke3d.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "duke3d", "duke3d\duke3d.vcproj", "{0B353432-DE88-43AD-A116-DCCDB763C7D8}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug_CMENU|Win32 = Debug_CMENU|Win32 9 | Debug_NOSTEAM|Win32 = Debug_NOSTEAM|Win32 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {0B353432-DE88-43AD-A116-DCCDB763C7D8}.Debug_CMENU|Win32.ActiveCfg = Debug_CMENU|Win32 15 | {0B353432-DE88-43AD-A116-DCCDB763C7D8}.Debug_CMENU|Win32.Build.0 = Debug_CMENU|Win32 16 | {0B353432-DE88-43AD-A116-DCCDB763C7D8}.Debug_NOSTEAM|Win32.ActiveCfg = Debug_NOSTEAM|Win32 17 | {0B353432-DE88-43AD-A116-DCCDB763C7D8}.Debug_NOSTEAM|Win32.Build.0 = Debug_NOSTEAM|Win32 18 | {0B353432-DE88-43AD-A116-DCCDB763C7D8}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {0B353432-DE88-43AD-A116-DCCDB763C7D8}.Debug|Win32.Build.0 = Debug|Win32 20 | {0B353432-DE88-43AD-A116-DCCDB763C7D8}.Release|Win32.ActiveCfg = Release|Win32 21 | {0B353432-DE88-43AD-A116-DCCDB763C7D8}.Release|Win32.Build.0 = Release|Win32 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 26 | */ 27 | 28 | #ifdef __IPHONEOS__ 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 26 | */ 27 | 28 | #ifdef __IPHONEOS__ 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /code/playvpx/playvpx.h: -------------------------------------------------------------------------------- 1 | #ifndef PLAYVPX_H 2 | #define PLAYVPX_H 3 | 4 | #define PLAYVPX_SDL 5 | 6 | #ifdef __APPLE__ 7 | #include 8 | #endif 9 | #ifdef _WIN32 10 | #define APIENTRY __stdcall 11 | #define WINGDIAPI 12 | #define CALLBACK __stdcall 13 | #include 14 | #include 15 | #endif 16 | #ifdef __linux__ 17 | #include 18 | #include 19 | #endif 20 | 21 | #ifdef PLAYVPX_CUZCODE 22 | #include "cuz_opengl.h" 23 | #endif 24 | 25 | #define VPX_CODEC_DISABLE_COMPAT 1 26 | #include "vpx/vpx_decoder.h" 27 | #include "vpx/vp8dx.h" 28 | #define IVF_FILE_HDR_SZ (32) 29 | #define IVF_FRAME_HDR_SZ (12) 30 | 31 | #include 32 | 33 | struct Vpxdata { 34 | int is_init; 35 | char fname[512]; 36 | int state; 37 | unsigned char *pixels; 38 | GLuint texture; 39 | 40 | FILE *infile; 41 | vpx_codec_ctx_t codec; 42 | int flags, frame_cnt; 43 | unsigned char file_hdr[IVF_FILE_HDR_SZ]; 44 | unsigned char frame_hdr[IVF_FRAME_HDR_SZ]; 45 | unsigned char frame[256*1024]; 46 | vpx_codec_err_t res; 47 | 48 | int frame_sz; 49 | vpx_codec_iter_t iter; 50 | vpx_image_t *img; 51 | 52 | }; 53 | 54 | void playvpx_init(Vpxdata *data, const char *_fname) ; 55 | 56 | bool playvpx_loop(Vpxdata *data) ; 57 | 58 | int playvpx_get_texture(Vpxdata *data) ; 59 | 60 | void playvpx_deinit(Vpxdata *data) ; 61 | 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCORE_H 29 | #define ROCKETCORE_H 30 | 31 | #include 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /jfaudiolib/pitch.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: PITCH.H 22 | 23 | author: James R. Dose 24 | date: June 14, 1994 25 | 26 | Public header for PITCH.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __PITCH_H 32 | #define __PITCH_H 33 | 34 | enum PITCH_ERRORS 35 | { 36 | PITCH_Warning = -2, 37 | PITCH_Error = -1, 38 | PITCH_Ok = 0, 39 | }; 40 | 41 | //void PITCH_Init( void ); 42 | unsigned long PITCH_GetScale( int pitchoffset ); 43 | void PITCH_UnlockMemory( void ); 44 | int PITCH_LockMemory( void ); 45 | #endif 46 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Controls.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCONTROLS_H 29 | #define ROCKETCONTROLS_H 30 | 31 | #include 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Debugger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETDEBUGGER_H 29 | #define ROCKETDEBUGGER_H 30 | 31 | #include 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /jfaudiolib/driver_winmm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Jonathon Fowler 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | int WinMMDrv_GetError(void); 22 | const char *WinMMDrv_ErrorString( int ErrorNumber ); 23 | 24 | int WinMMDrv_CD_Init(void); 25 | void WinMMDrv_CD_Shutdown(void); 26 | int WinMMDrv_CD_Play(int track, int loop); 27 | void WinMMDrv_CD_Stop(void); 28 | void WinMMDrv_CD_Pause(int pauseon); 29 | int WinMMDrv_CD_IsPlaying(void); 30 | void WinMMDrv_CD_SetVolume(int volume); 31 | 32 | int WinMMDrv_MIDI_Init(midifuncs *); 33 | void WinMMDrv_MIDI_Shutdown(void); 34 | int WinMMDrv_MIDI_StartPlayback(void (*service)(void)); 35 | void WinMMDrv_MIDI_HaltPlayback(void); 36 | void WinMMDrv_MIDI_SetTempo(int tempo, int division); 37 | void WinMMDrv_MIDI_Lock(void); 38 | void WinMMDrv_MIDI_Unlock(void); 39 | 40 | -------------------------------------------------------------------------------- /thirdparty/include/vpx/vpx_integer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VPX_INTEGER_H 13 | #define VPX_INTEGER_H 14 | 15 | /* get ptrdiff_t, size_t, wchar_t, NULL */ 16 | #include 17 | 18 | #if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES) 19 | typedef signed char int8_t; 20 | typedef signed short int16_t; 21 | typedef signed int int32_t; 22 | 23 | typedef unsigned char uint8_t; 24 | typedef unsigned short uint16_t; 25 | typedef unsigned int uint32_t; 26 | 27 | #if (defined(_MSC_VER) && (_MSC_VER < 1600)) 28 | typedef signed __int64 int64_t; 29 | typedef unsigned __int64 uint64_t; 30 | #endif 31 | 32 | #ifndef _UINTPTR_T_DEFINED 33 | typedef size_t uintptr_t; 34 | #endif 35 | 36 | #else 37 | 38 | /* Most platforms have the C99 standard integer types. */ 39 | 40 | #if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) 41 | #define __STDC_FORMAT_MACROS 42 | #endif 43 | #include 44 | 45 | #endif 46 | 47 | /* VS2010 defines stdint.h, but not inttypes.h */ 48 | #if defined(_MSC_VER) 49 | #define PRId64 "I64d" 50 | #else 51 | #include 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /jfaudiolib/sndcards.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: SNDCARDS.H 22 | 23 | author: James R. Dose 24 | date: March 31, 1994 25 | 26 | Contains enumerated type definitions for sound cards. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __SNDCARDS_H 32 | #define __SNDCARDS_H 33 | 34 | #define ASS_VERSION_STRING "JonoF 20090718" 35 | 36 | typedef enum 37 | { 38 | ASS_NoSound, 39 | ASS_SDL, 40 | ASS_CoreAudio, 41 | ASS_DirectSound, 42 | ASS_WinMM, 43 | ASS_FluidSynth, 44 | ASS_ALSA, 45 | ASS_NumSoundCards, 46 | ASS_AutoDetect = -2 47 | } soundcardnames; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /gameroot/data/sound.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | SOUNDS 15 | 16 | 17 | 18 | 19 | SOUND 20 | 21 |
22 | 23 |
24 | VOLUME 25 | 26 |
27 | 28 | 29 |
30 | SOUND FX 31 | 32 | 33 | 34 | 35 |
36 | 37 |
38 | MUSIC 39 | 40 | 41 | 42 | 43 |
44 | 45 | 46 | 50 | 51 |
52 | DUKE TALK 53 | 54 | 55 | 56 | 57 |
58 | 59 |
60 | 61 |
62 | -------------------------------------------------------------------------------- /thirdparty/include/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #undef _begin_code_h 30 | 31 | /* Reset structure packing at previous byte alignment */ 32 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) 33 | #ifdef __BORLANDC__ 34 | #pragma nopackwarning 35 | #endif 36 | #pragma pack(pop) 37 | #endif /* Compiler needs structure packing set */ 38 | -------------------------------------------------------------------------------- /jfaudiolib/driver_sdl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Jonathon Fowler 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | 22 | int SDLDrv_GetError(void); 23 | const char *SDLDrv_ErrorString( int ErrorNumber ); 24 | 25 | int SDLDrv_PCM_Init(int * mixrate, int * numchannels, int * samplebits, void * initdata); 26 | void SDLDrv_PCM_Shutdown(void); 27 | int SDLDrv_PCM_BeginPlayback(char *BufferStart, int BufferSize, 28 | int NumDivisions, void ( *CallBackFunc )( void ) ); 29 | void SDLDrv_PCM_StopPlayback(void); 30 | void SDLDrv_PCM_Lock(void); 31 | void SDLDrv_PCM_Unlock(void); 32 | 33 | int SDLDrv_CD_Init(void); 34 | void SDLDrv_CD_Shutdown(void); 35 | int SDLDrv_CD_Play(int track, int loop); 36 | void SDLDrv_CD_Stop(void); 37 | void SDLDrv_CD_Pause(int pauseon); 38 | int SDLDrv_CD_IsPlaying(void); 39 | void SDLDrv_CD_SetVolume(int volume); 40 | 41 | -------------------------------------------------------------------------------- /code/log.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // log.cpp 3 | // duke3d 4 | // 5 | // Created by serge on 30.08.2014. 6 | // Copyright (c) 2014 General Arcade. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #if defined( _WIN32 ) 14 | #define WIN32_LEAN_AND_MEAN 15 | #include 16 | #endif 17 | 18 | #include "log.h" 19 | 20 | static FILE *log = NULL; 21 | 22 | const char* Log_GetPath( void ) { 23 | static char path[1024] = { 0 }; 24 | if ( path[0] != 0 ) { 25 | return path; 26 | } 27 | #if defined( _WIN32 ) 28 | GetTempPathA( sizeof( path ), path ); 29 | #elif defined( __APPLE__ ) 30 | strcpy( path, "/tmp/" ); 31 | #elif defined( __linux ) 32 | strcpy( path, "/tmp/" ); 33 | #endif 34 | strcat( path, "duke.log" ); 35 | return path; 36 | }; 37 | 38 | void Log_Open( void ) { 39 | if ( log != NULL ) { 40 | Log_Close(); 41 | } 42 | const char *logPath = Log_GetPath(); 43 | log = fopen( logPath, "wb+" ); 44 | Log_Printf( "Started new log file\n" ); 45 | } 46 | 47 | void Log_Printf( const char *format, ... ) { 48 | static char buffer[2048]; 49 | va_list argptr; 50 | va_start( argptr, format ); 51 | vsprintf( buffer, format, argptr ); 52 | va_end( argptr ); 53 | Log_Puts( buffer ); 54 | } 55 | 56 | void Log_Puts( const char *string ) { 57 | if ( log != NULL ) { 58 | fputs( string, log ); 59 | } 60 | #if defined( _WIN32 ) 61 | OutputDebugStringA( string ); 62 | #else 63 | puts( string ); 64 | #endif 65 | } 66 | 67 | void Log_Close( void ) { 68 | if ( log != NULL ) { 69 | fclose( log ); 70 | log = NULL; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /jfaudiolib/midifuncs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #ifndef __MIDIFUNCS_H 21 | #define __MIDIFUNCS_H 22 | 23 | typedef struct 24 | { 25 | void ( *NoteOff )( int channel, int key, int velocity ); 26 | void ( *NoteOn )( int channel, int key, int velocity ); 27 | void ( *PolyAftertouch )( int channel, int key, int pressure ); 28 | void ( *ControlChange )( int channel, int number, int value ); 29 | void ( *ProgramChange )( int channel, int program ); 30 | void ( *ChannelAftertouch )( int channel, int pressure ); 31 | void ( *PitchBend )( int channel, int lsb, int msb ); 32 | void ( *ReleasePatches )( void ); 33 | void ( *LoadPatch )( int number ); 34 | void ( *SetVolume )( int volume ); 35 | int ( *GetVolume )( void ); 36 | void ( *SysEx )( const unsigned char * data, int length ); 37 | } midifuncs; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /jfbuild/md4.h: -------------------------------------------------------------------------------- 1 | /* MD4.H - header file for MD4C.C 2 | Modified from original version published in RFC1320 by 3 | Jonathon Fowler (jf@jonof.id.au) 4 | */ 5 | 6 | /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 7 | rights reserved. 8 | 9 | License to copy and use this software is granted provided that it 10 | is identified as the "RSA Data Security, Inc. MD4 Message-Digest 11 | Algorithm" in all material mentioning or referencing this software 12 | or this function. 13 | 14 | License is also granted to make and use derivative works provided 15 | that such works are identified as "derived from the RSA Data 16 | Security, Inc. MD4 Message-Digest Algorithm" in all material 17 | mentioning or referencing the derived work. 18 | 19 | RSA Data Security, Inc. makes no representations concerning either 20 | the merchantability of this software or the suitability of this 21 | software for any particular purpose. It is provided "as is" 22 | without express or implied warranty of any kind. 23 | 24 | These notices must be retained in any copies of any part of this 25 | documentation and/or software. 26 | */ 27 | 28 | /* MD4 context. */ 29 | typedef struct { 30 | unsigned long state[4]; /* state (ABCD) */ 31 | unsigned long count[2]; /* number of bits, modulo 2^64 (lsb first) */ 32 | unsigned char buffer[64]; /* input buffer */ 33 | } MD4_CTX; 34 | 35 | void md4once(unsigned char *block, unsigned int len, unsigned char digest[16]); 36 | void md4init(MD4_CTX *); 37 | void md4block(MD4_CTX *, unsigned char *, unsigned int); 38 | void md4finish(unsigned char [16], MD4_CTX *); 39 | -------------------------------------------------------------------------------- /duke3d/duke3d.xcodeproj/xcuserdata/termit.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /jfmact/mathutil.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | extern int32 FindDistance2D(int32 dx, int32 dy); 34 | extern int32 FindDistance3D(int32 dx, int32 dy, int32 dz); 35 | extern int32 FindDistance3D_HP(int32 dx, int32 dy, int32 dz); 36 | extern int32 ArcTangentAppx(int32 dx, int32 dy); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /code/rocket/FrameAnimationDecorator.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Sergei Shubin 3 | // 4 | 5 | #ifndef FRAME_ANIMATION_DECORATOR_H 6 | #define FRAME_ANIMATION_DECORATOR_H 7 | 8 | #include 9 | 10 | class FrameAnimationDecorator: public Rocket::Core::Decorator { 11 | public: 12 | virtual ~FrameAnimationDecorator(); 13 | 14 | bool Initialise(const Rocket::Core::String& image_source, const Rocket::Core::String& image_path, int num_frames, int frame_width, float frame_delay, bool reverse = false); 15 | 16 | /// Called on a decorator to generate any required per-element data for a newly decorated element. 17 | /// @param element[in] The newly decorated element. 18 | /// @return A handle to a decorator-defined data handle, or NULL if none is needed for the element. 19 | virtual Rocket::Core::DecoratorDataHandle GenerateElementData(Rocket::Core::Element *element); 20 | /// Called to release element data generated by this decorator. 21 | /// @param element_data[in] The element data handle to release. 22 | virtual void ReleaseElementData(Rocket::Core::DecoratorDataHandle element_data); 23 | 24 | /// Called to render the decorator on an element. 25 | /// @param element[in] The element to render the decorator on. 26 | /// @param element_data[in] The handle to the data generated by the decorator for the element. 27 | virtual void RenderElement(Rocket::Core::Element *element, Rocket::Core::DecoratorDataHandle element_data); 28 | private: 29 | int m_texture; 30 | int m_num_frames; 31 | int m_frame_width; 32 | float m_frame_delay; 33 | float m_init_time; 34 | bool m_reverse; 35 | }; 36 | 37 | #endif /* FRAME_ANIMATION_DECORATOR_H */ 38 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_config.h.default: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_config_h 24 | #define _SDL_config_h 25 | 26 | #include "SDL_platform.h" 27 | 28 | /* Add any platform that doesn't build using the configure system */ 29 | #if defined(__DREAMCAST__) 30 | #include "SDL_config_dreamcast.h" 31 | #elif defined(__MACOS__) 32 | #include "SDL_config_macos.h" 33 | #elif defined(__MACOSX__) 34 | #include "SDL_config_macosx.h" 35 | #elif defined(__SYMBIAN32__) 36 | #include "SDL_config_symbian.h" /* must be before win32! */ 37 | #elif defined(__WIN32__) 38 | #include "SDL_config_win32.h" 39 | #elif defined(__OS2__) 40 | #include "SDL_config_os2.h" 41 | #else 42 | #include "SDL_config_minimal.h" 43 | #endif /* platform config */ 44 | 45 | #endif /* _SDL_config_h */ 46 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_config.h.generated: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_config_h 24 | #define _SDL_config_h 25 | 26 | #include "SDL_platform.h" 27 | 28 | /* Add any platform that doesn't build using the configure system */ 29 | #if defined(__DREAMCAST__) 30 | #include "SDL_config_dreamcast.h" 31 | #elif defined(__MACOS__) 32 | #include "SDL_config_macos.h" 33 | #elif defined(__MACOSX__) 34 | #include "SDL_config_macosx.h" 35 | #elif defined(__SYMBIAN32__) 36 | #include "SDL_config_symbian.h" /* must be before win32! */ 37 | #elif defined(__WIN32__) 38 | #include "SDL_config_win32.h" 39 | #elif defined(__OS2__) 40 | #include "SDL_config_os2.h" 41 | #else 42 | #include "SDL_config_minimal.h" 43 | #endif /* platform config */ 44 | 45 | #endif /* _SDL_config_h */ 46 | -------------------------------------------------------------------------------- /duke3d/duke3d.xcodeproj/project.xcworkspace/xcshareddata/duke3d.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | AD015D90-3391-475E-A0E6-499BBAB7D1F0 9 | IDESourceControlProjectName 10 | duke3d 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | E8A0F3818E7F6BCCDC05C969CEA247AE255E66E5 14 | bitbucket.org:shubin/duke3d.git 15 | 16 | IDESourceControlProjectPath 17 | duke3d/duke3d.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | E8A0F3818E7F6BCCDC05C969CEA247AE255E66E5 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | bitbucket.org:shubin/duke3d.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | E8A0F3818E7F6BCCDC05C969CEA247AE255E66E5 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | E8A0F3818E7F6BCCDC05C969CEA247AE255E66E5 36 | IDESourceControlWCCName 37 | duke3d 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /jfaudiolib/driver_directsound.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Jonathon Fowler 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | int DirectSoundDrv_GetError(void); 22 | const char *DirectSoundDrv_ErrorString( int ErrorNumber ); 23 | 24 | int DirectSoundDrv_PCM_Init(int * mixrate, int * numchannels, int * samplebits, void * initdata); 25 | void DirectSoundDrv_PCM_Shutdown(void); 26 | int DirectSoundDrv_PCM_BeginPlayback(char *BufferStart, int BufferSize, 27 | int NumDivisions, void ( *CallBackFunc )( void ) ); 28 | void DirectSoundDrv_PCM_StopPlayback(void); 29 | void DirectSoundDrv_PCM_Lock(void); 30 | void DirectSoundDrv_PCM_Unlock(void); 31 | 32 | int DirectSoundDrv_CD_Init(void); 33 | void DirectSoundDrv_CD_Shutdown(void); 34 | int DirectSoundDrv_CD_Play(int track, int loop); 35 | void DirectSoundDrv_CD_Stop(void); 36 | void DirectSoundDrv_CD_Pause(int pauseon); 37 | int DirectSoundDrv_CD_IsPlaying(void); 38 | void DirectSoundDrv_CD_SetVolume(int volume); 39 | -------------------------------------------------------------------------------- /jfbuild/mmulti.h: -------------------------------------------------------------------------------- 1 | // mmulti.h 2 | 3 | #ifndef __mmulti_h__ 4 | #define __mmulti_h__ 5 | 6 | #include "csteam.h" 7 | 8 | #define MAXMULTIPLAYERS 16 9 | 10 | extern long myconnectindex, numplayers; 11 | extern long connecthead, connectpoint2[MAXMULTIPLAYERS]; 12 | extern char syncstate; 13 | 14 | long initmultiplayers_steam(steam_id_t my_steam_id, int num_steam_players, steam_id_t *player_ids, int mode); 15 | 16 | long initmultiplayersparms(long argc, char **argv); 17 | long initmultiplayerscycle(void); 18 | 19 | void initmultiplayers(long argc, char **argv, char damultioption, char dacomrateoption, char dapriority); 20 | void setpackettimeout(long datimeoutcount, long daresendagaincount); 21 | void uninitmultiplayers(void); 22 | void sendlogon(void); 23 | void sendlogoff(void); 24 | long getoutputcirclesize(void); 25 | void setsocket(long newsocket); 26 | void sendpacket(long other, char *bufptr, long messleng); 27 | long getpacket(long *other, char *bufptr); 28 | void flushpackets(void); 29 | void genericmultifunction(long other, char *bufptr, long messleng, long command); 30 | long isvalidipaddress(char *st); 31 | 32 | int sendraw(long other, char *buffer, int size, int reliable); 33 | void oobmessage(long other, char *buffer, int size); 34 | 35 | /* megaton-specific things */ 36 | void checkping(); 37 | void netcleanup(); 38 | void checktimeout(); 39 | void dosendpackets (long other, int timeout); 40 | 41 | void resettimeout(); 42 | 43 | void kickplayer(long other); // arrange fake quit packet 44 | 45 | typedef enum { 46 | SC_TIMELIMIT = 1, 47 | SC_QUIT = 2, 48 | SC_KICKED = 3, 49 | } stopcode_t; 50 | 51 | void sendstop(char code); 52 | char *getstopmsg(int code); 53 | 54 | #endif // __mmulti_h__ 55 | -------------------------------------------------------------------------------- /jfaudiolib/driver_coreaudio.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Jonathon Fowler 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | int CoreAudioDrv_GetError(void); 22 | const char *CoreAudioDrv_ErrorString( int ErrorNumber ); 23 | 24 | int CoreAudioDrv_PCM_Init(int * mixrate, int * numchannels, int * samplebits, void * initdata); 25 | void CoreAudioDrv_PCM_Shutdown(void); 26 | int CoreAudioDrv_PCM_BeginPlayback(char *BufferStart, int BufferSize, 27 | int NumDivisions, void ( *CallBackFunc )( void ) ); 28 | void CoreAudioDrv_PCM_StopPlayback(void); 29 | void CoreAudioDrv_PCM_Lock(void); 30 | void CoreAudioDrv_PCM_Unlock(void); 31 | void CoreAudioDrv_PCM_ResumePlayback(void); 32 | 33 | int CoreAudioDrv_CD_Init(void); 34 | void CoreAudioDrv_CD_Shutdown(void); 35 | int CoreAudioDrv_CD_Play(int track, int loop); 36 | void CoreAudioDrv_CD_Stop(void); 37 | void CoreAudioDrv_CD_Pause(int pauseon); 38 | int CoreAudioDrv_CD_IsPlaying(void); 39 | void CoreAudioDrv_CD_SetVolume(int volume); 40 | -------------------------------------------------------------------------------- /jfbuild/polymost_priv.h: -------------------------------------------------------------------------------- 1 | #ifdef POLYMOST 2 | 3 | #define PI 3.14159265358979323 4 | 5 | enum { 6 | METH_SOLID = 0, 7 | METH_MASKED = 1, 8 | METH_TRANS = 2, 9 | METH_INTRANS = 3, 10 | 11 | METH_CLAMPED = 4, 12 | METH_LAYERS = 8, // when given to drawpoly, renders the additional layers 13 | }; 14 | 15 | typedef struct { unsigned char r, g, b, a; } coltype; 16 | 17 | extern long rendmode; 18 | extern float gtang; 19 | extern float glox1, gloy1; 20 | extern double gxyaspect, grhalfxdown10x; 21 | extern double gcosang, gsinang, gcosang2, gsinang2; 22 | extern double gchang, gshang, gctang, gstang; 23 | 24 | struct glfiltermodes { 25 | char *name; 26 | long min,mag; 27 | }; 28 | #define numglfiltermodes 6 29 | extern struct glfiltermodes glfiltermodes[numglfiltermodes]; 30 | 31 | extern long gltexcomprquality; // 0 = fast, 1 = slow and pretty, 2 = very slow and pretty 32 | extern long gltexmaxsize; // 0 means autodetection on first run 33 | extern long gltexmiplevel; // discards this many mipmap levels 34 | 35 | long polymost_texmayhavealpha (long dapicnum, long dapalnum); 36 | void polymost_texinvalidate (long dapicnum, long dapalnum, long dameth); 37 | void polymost_texinvalidateall (); 38 | void polymost_glinit(); 39 | void polymost_drawrooms (); 40 | void polymost_drawmaskwall (long damaskwallcnt); 41 | void polymost_drawsprite (long snum); 42 | void polymost_dorotatesprite (long sx, long sy, long z, short a, short picnum, 43 | signed char dashade, char dapalnum, char dastat, long cx1, long cy1, long cx2, long cy2, long uniqid); 44 | void polymost_fillpolygon (long npoints); 45 | long polymost_printext256(long xpos, long ypos, short col, short backcol, char *name, char fontsize); 46 | void polymost_initosdfuncs(void); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /code/rocket/FrameAnimationDectoratorInstancer.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Sergei Shubin 3 | // 4 | 5 | #include "FrameAnimationDecoratorInstancer.h" 6 | #include "FrameAnimationDecorator.h" 7 | #include 8 | 9 | Rocket::Core::Decorator* FrameAnimationDecoratorInstancer::InstanceDecorator(const Rocket::Core::String& name, const Rocket::Core::PropertyDictionary& properties) { 10 | const Rocket::Core::Property *image_source_property = properties.GetProperty("image-src"); 11 | const Rocket::Core::Property *num_frames_property = properties.GetProperty("num-frames"); 12 | const Rocket::Core::Property *delay_property = properties.GetProperty("delay"); 13 | 14 | Rocket::Core::String image_source = image_source_property->Get< Rocket::Core::String >(); 15 | int num_frames = num_frames_property->Get(); 16 | float delay = delay_property->Get(); 17 | 18 | FrameAnimationDecorator *decorator = new FrameAnimationDecorator(); 19 | if (decorator->Initialise(image_source, image_source_property->source, num_frames, 0, fabs(delay), delay < 0)) { 20 | return decorator; 21 | } 22 | decorator->RemoveReference(); 23 | ReleaseDecorator(decorator); 24 | return NULL; 25 | } 26 | 27 | void FrameAnimationDecoratorInstancer::ReleaseDecorator(Rocket::Core::Decorator* decorator) { 28 | delete decorator; 29 | } 30 | 31 | void FrameAnimationDecoratorInstancer::Release() { 32 | delete this; 33 | } 34 | 35 | FrameAnimationDecoratorInstancer::FrameAnimationDecoratorInstancer() { 36 | RegisterProperty("image-src", "").AddParser("string"); 37 | RegisterProperty("num-frames", "10").AddParser("number"); 38 | RegisterProperty("delay", "0.05").AddParser("number"); 39 | } 40 | 41 | FrameAnimationDecoratorInstancer::~FrameAnimationDecoratorInstancer() { 42 | } 43 | -------------------------------------------------------------------------------- /gameroot/data/conf.rcss: -------------------------------------------------------------------------------- 1 | div.game-menu { 2 | width: 1250px; 3 | height: 800px; 4 | left: 334px; 5 | top: 218px; 6 | } 7 | 8 | .game-menu div caption { 9 | display: block; 10 | position: absolute; 11 | width: 60%; 12 | } 13 | 14 | .game-menu div options { 15 | display: block; 16 | position: absolute; 17 | right: 0px; 18 | width: 400px; 19 | text-align: center; 20 | } 21 | 22 | .game-menu div range { 23 | display: block; 24 | position: absolute; 25 | right: 0px; 26 | width: 400px; 27 | text-align: center; 28 | } 29 | 30 | options option { 31 | color: rgb(235,156,9); 32 | } 33 | 34 | hdr { 35 | display:block; 36 | position:fixed; 37 | left:0px; 38 | width: 30px; 39 | } 40 | 41 | ftr { 42 | display:block; 43 | position:fixed; 44 | right:0px; 45 | top: 0px; 46 | width: 30px; 47 | } 48 | 49 | .game-menu div { 50 | text-align: left; 51 | height: 80px; 52 | } 53 | 54 | expander { 55 | min-width: 100px; 56 | min-height: 80pt; 57 | } 58 | 59 | title { 60 | display: block; 61 | position: absolute; 62 | font-size: 79; 63 | color: rgb(235,156,9); 64 | left: 334px; 65 | top: 63px; 66 | } 67 | 68 | input.range { 69 | width: 300px; 70 | height: 40px; 71 | } 72 | input.range sliderbar { 73 | width: 50px; 74 | height: 40px; 75 | background-decorator: image; 76 | background-image: assets/sliderbar.tga; 77 | } 78 | input.range slidertrack { 79 | background-decorator: tiled-horizontal; 80 | background-left-image: assets/slidertrack.tga 0px 0px 10px 40px; 81 | background-center-image: assets/slidertrack.tga stretch 10px 0px 30px 40px; 82 | background-bottom-image: assets/slidertrack.tga 30px 0px 40px 40px; 83 | } 84 | -------------------------------------------------------------------------------- /gameroot/data/video.rml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 | VIDEO SETTINGS 16 | 17 | 18 | 19 | 20 | VIDEO 21 | 22 |
23 | 24 |
25 | VIDEO MODE 26 | 27 |
28 |
29 | FULLSCREEN 30 | 31 | 32 | 33 | 34 |
35 |
36 | VSYNC 37 | 38 | 39 | 40 | 41 |
42 |
43 | MAX FPS 44 | 45 |
46 |
47 | TEXTURES 48 | 49 | 50 | 51 | 52 |
53 |
54 | BRIGHTNESS 55 | 56 |
57 | 60 |
61 | 62 | 63 |
64 | -------------------------------------------------------------------------------- /jfduke3d/_rts.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) 25 | */ 26 | //------------------------------------------------------------------------- 27 | 28 | #ifndef __rts_private__ 29 | #define __rts_private__ 30 | 31 | //=============== 32 | // TYPES 33 | //=============== 34 | 35 | typedef struct 36 | { 37 | char name[8]; 38 | int32 handle,position,size; 39 | } lumpinfo_t; 40 | 41 | typedef struct 42 | { 43 | char identification[4]; // should be IWAD 44 | int32 numlumps; 45 | int32 infotableofs; 46 | } wadinfo_t; 47 | 48 | typedef struct 49 | { 50 | int32 filepos; 51 | int32 size; 52 | char name[8]; 53 | } filelump_t; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /jfduke3d/winbits.c: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Duke Nukem Copyright (C) 1996, 2003 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Windows-specific hooks for JonoF's Duke3D port. 23 | */ 24 | //------------------------------------------------------------------------- 25 | 26 | #ifdef RENDERTYPEWIN 27 | 28 | #define WIN32_LEAN_AND_MEAN 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | #include "winlayer.h" 35 | 36 | 37 | // this replaces the Error() function in jmact/util_lib.c 38 | extern void Shutdown(void ); // game.c 39 | void Error(char *error, ...) 40 | { 41 | char buf[1000]; 42 | va_list va; 43 | 44 | Shutdown(); 45 | 46 | if (error) { 47 | va_start(va, error); 48 | vsprintf(buf, error, va); 49 | va_end(va); 50 | 51 | MessageBox((HWND)win_gethwnd(),buf,"Fatal Error",MB_OK|MB_TASKMODAL); 52 | } 53 | 54 | exit((error != NULL)); 55 | } 56 | 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /thirdparty/include/smpeg/MPEGerror.h: -------------------------------------------------------------------------------- 1 | /* 2 | SMPEG - SDL MPEG Player Library 3 | Copyright (C) 1999 Loki Entertainment Software 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* A class used for error reporting in the MPEG classes */ 21 | 22 | #ifndef _MPEGERROR_H_ 23 | #define _MPEGERROR_H_ 24 | 25 | #include 26 | #include 27 | 28 | class MPEGerror { 29 | public: 30 | MPEGerror() { 31 | ClearError(); 32 | } 33 | 34 | /* Set an error message */ 35 | void SetError(const char *fmt, ...) { 36 | va_list ap; 37 | 38 | va_start(ap, fmt); 39 | vsprintf(errbuf, fmt, ap); 40 | va_end(ap); 41 | error = errbuf; 42 | } 43 | 44 | /* Find out if an error occurred */ 45 | bool WasError(void) { 46 | return(error != NULL); 47 | } 48 | char *TheError(void) { 49 | return(error); 50 | } 51 | 52 | /* Clear any error message */ 53 | void ClearError(void) { 54 | error = NULL; 55 | } 56 | 57 | protected: 58 | char errbuf[512]; 59 | char *error; 60 | }; 61 | 62 | #endif /* _MPEGERROR_H_ */ 63 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/Python/Header.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCOREPYTHONHEADER_H 29 | #define ROCKETCOREPYTHONHEADER_H 30 | 31 | #include 32 | 33 | #if defined ROCKET_PLATFORM_WIN32 34 | #if defined RocketCorePython_EXPORTS 35 | #define ROCKETCOREPYTHON_API __declspec(dllexport) 36 | #else 37 | #define ROCKETCOREPYTHON_API __declspec(dllimport) 38 | #endif 39 | #else 40 | #define ROCKETCOREPYTHON_API __attribute__((visibility("default"))) 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef _SDL_config_h 23 | #define _SDL_config_h 24 | 25 | #include "SDL_platform.h" 26 | 27 | /** 28 | * \file SDL_config.h 29 | */ 30 | 31 | /* Add any platform that doesn't build using the configure system. */ 32 | #if defined(__WIN32__) 33 | #include "SDL_config_windows.h" 34 | #elif defined(__MACOSX__) 35 | #include "SDL_config_macosx.h" 36 | #elif defined(__IPHONEOS__) 37 | #include "SDL_config_iphoneos.h" 38 | #elif defined(__ANDROID__) 39 | #include "SDL_config_android.h" 40 | #elif defined(__PSP__) 41 | #include "SDL_config_psp.h" 42 | #else 43 | /* This is a minimal configuration just to get SDL running on new platforms */ 44 | #include "SDL_config_minimal.h" 45 | #endif /* platform config */ 46 | 47 | #ifdef USING_GENERATED_CONFIG_H 48 | #error Wrong SDL_config.h, check your include path? 49 | #endif 50 | 51 | #endif /* _SDL_config_h */ 52 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/Font.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCOREFONT_H 29 | #define ROCKETCOREFONT_H 30 | 31 | namespace Rocket { 32 | namespace Core { 33 | 34 | namespace Font 35 | { 36 | enum Style 37 | { 38 | STYLE_NORMAL = 0, 39 | STYLE_ITALIC = 1, 40 | NUM_STYLES = 2 41 | }; 42 | 43 | enum Weight 44 | { 45 | WEIGHT_NORMAL = 0, 46 | WEIGHT_BOLD = 1, 47 | NUM_WEIGHTS = 2 48 | }; 49 | 50 | enum Line 51 | { 52 | UNDERLINE = 0, 53 | OVERLINE = 1, 54 | STRIKE_THROUGH = 2 55 | }; 56 | }; 57 | 58 | } 59 | } 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/Header.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCOREHEADER_H 29 | #define ROCKETCOREHEADER_H 30 | 31 | #include 32 | 33 | #if !defined STATIC_LIB 34 | #if defined ROCKET_PLATFORM_WIN32 35 | #if defined RocketCore_EXPORTS 36 | #define ROCKETCORE_API __declspec(dllexport) 37 | #else 38 | #define ROCKETCORE_API __declspec(dllimport) 39 | #endif 40 | #else 41 | #define ROCKETCORE_API __attribute__((visibility("default"))) 42 | #endif 43 | #else 44 | #define ROCKETCORE_API 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Controls/Header.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCONTROLSHEADER_H 29 | #define ROCKETCONTROLSHEADER_H 30 | 31 | #include 32 | 33 | #if !defined STATIC_LIB 34 | #ifdef ROCKET_PLATFORM_WIN32 35 | #ifdef RocketControls_EXPORTS 36 | #define ROCKETCONTROLS_API __declspec(dllexport) 37 | #else 38 | #define ROCKETCONTROLS_API __declspec(dllimport) 39 | #endif 40 | #else 41 | #define ROCKETCONTROLS_API __attribute__((visibility("default"))) 42 | #endif 43 | #else 44 | #define ROCKETCONTROLS_API 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Debugger/Header.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETDEBUGGERHEADER_H 29 | #define ROCKETDEBUGGERHEADER_H 30 | 31 | #include 32 | 33 | #if !defined STATIC_LIB 34 | #ifdef ROCKET_PLATFORM_WIN32 35 | #ifdef RocketDebugger_EXPORTS 36 | #define ROCKETDEBUGGER_API __declspec(dllexport) 37 | #else 38 | #define ROCKETDEBUGGER_API __declspec(dllimport) 39 | #endif 40 | #else 41 | #define ROCKETDEBUGGER_API __attribute__((visibility("default"))) 42 | #endif 43 | #else 44 | #define ROCKETDEBUGGER_API 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /jfduke3d/sounds.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) 25 | */ 26 | //------------------------------------------------------------------------- 27 | 28 | //**************************************************************************** 29 | // 30 | // sounds.h 31 | // 32 | //**************************************************************************** 33 | 34 | #ifndef _sounds_public_ 35 | #define _sounds_public_ 36 | 37 | extern int32 FXDevice; 38 | extern int32 MusicDevice; 39 | extern int32 FXVolume; 40 | extern int32 MusicVolume; 41 | extern int32 NumVoices; 42 | extern int32 NumChannels; 43 | extern int32 NumBits; 44 | extern int32 MixRate; 45 | extern int32 ReverseStereo; 46 | 47 | void SoundStartup( void ); 48 | void SoundShutdown( void ); 49 | void MusicStartup( void ); 50 | void MusicShutdown( void ); 51 | void MusicPause( int onf ); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /code/rocket/ShellOpenGL.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETSHELLOPENGL_H 29 | #define ROCKETSHELLOPENGL_H 30 | 31 | #include 32 | 33 | #if defined ROCKET_PLATFORM_WIN32 34 | #define WIN32_LEAN_AND_MEAN 35 | #include 36 | #include 37 | #include 38 | #elif defined ROCKET_PLATFORM_MACOSX 39 | #include 40 | #include 41 | #include 42 | #elif defined ROCKET_PLATFORM_UNIX 43 | #include 44 | #include 45 | #include 46 | #endif 47 | 48 | #undef IN 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /gameroot/data/saveload.rcss: -------------------------------------------------------------------------------- 1 | cursor#cursor-left { 2 | width: 64px; 3 | height: 64px; 4 | } 5 | 6 | div.game-menu { 7 | psotion: abcolute; 8 | display: block; 9 | left: 334px; 10 | top: 231px; 11 | -background: blue; 12 | } 13 | 14 | .game-menu div { 15 | font-size: 46pt; 16 | text-align: left; 17 | padding-left: 40px; 18 | height: 66px; 19 | } 20 | 21 | .game-menu div.empty { 22 | color: rgb(128,128,128); 23 | } 24 | 25 | #thumbnail { 26 | position: absolute; 27 | display:block; 28 | left: 960px; 29 | top: 231px; 30 | width: 624; 31 | height: 390px; 32 | -background: black; 33 | padding: 3px; 34 | 35 | background-decorator: tiled-box; 36 | background-top-left-image: assets/thumbnailframe.tga 0px 0px 16px 16px; 37 | background-top-right-image: assets/thumbnailframe.tga 48px 0px 64px 16px; 38 | background-top-image: assets/thumbnailframe.tga stretch 16px 0px 48px 16px; 39 | background-bottom-left-image: assets/thumbnailframe.tga 0px 48px 16px 64px; 40 | background-bottom-right-image: assets/thumbnailframe.tga 48px 48px 64px 64px; 41 | background-bottom-image: assets/thumbnailframe.tga stretch 16px 48px 48px 64px; 42 | background-left-image: assets/thumbnailframe.tga stretch 0px 16px 16px 48px; 43 | background-center-image: assets/thumbnailframe.tga stretch 16px 16px 48px 48px; 44 | 45 | } 46 | 47 | #info { 48 | position: absolute; 49 | display: block; 50 | left: 960px; 51 | top: 636px; 52 | width: 624px; 53 | height: 390px; 54 | -background: green; 55 | } 56 | 57 | #info div { 58 | color: rgb(235,156,9); 59 | font-size: 33pt; 60 | display: block; 61 | height: 51px; 62 | text-align: center; 63 | } 64 | 65 | #thumbnail img { 66 | width: 100%; 67 | height: 100%; 68 | } 69 | 70 | title { 71 | display: block; 72 | position: absolute; 73 | font-size: 79; 74 | color: rgb(235,156,9); 75 | left: 334px; 76 | top: 63px; 77 | } 78 | -------------------------------------------------------------------------------- /gameroot/data/menu.rcss: -------------------------------------------------------------------------------- 1 | body { 2 | margin: auto; 3 | font-size: 20pt; 4 | font-family: DukeFont; 5 | width: 1920px; 6 | height: 1080px; 7 | } 8 | 9 | div.game-menu { 10 | display: block; 11 | position: absolute; 12 | width: 600px; 13 | height: 800px; 14 | left: 660px; 15 | top: 200px; 16 | -background-color: green; 17 | margin: 0px; 18 | padding: 0px; 19 | } 20 | 21 | .game-menu div { 22 | display: block; 23 | width: 100%; 24 | height: 80px; 25 | font-family: DukeFont; 26 | font-size: 46pt; 27 | color: rgb(235,156,9); 28 | text-align: center; 29 | margin: 0px; 30 | padding: 0px; 31 | -background-color: blue; 32 | 33 | outline-font-effect: outline; 34 | outline-width: 3px; 35 | outline-color: black; 36 | } 37 | 38 | div#options { 39 | -background-color: blue; 40 | } 41 | 42 | cursor#cursor-left { 43 | display: block; 44 | position: absolute; 45 | width: 64px; 46 | height: 64px; 47 | cursor-decorator: frame-animation; 48 | cursor-image-src: assets/cursor.tga; 49 | cursor-num-frames: 15; 50 | cursor-delay: -0.05; 51 | left: 0px; 52 | top: -4px; 53 | } 54 | 55 | cursor#cursor-right { 56 | display: block; 57 | position: absolute; 58 | width: 64px; 59 | height: 64px; 60 | cursor-decorator: frame-animation; 61 | cursor-image-src: assets/cursor.tga; 62 | cursor-num-frames: 15; 63 | cursor-delay: 0.05; 64 | left: 0px; 65 | top: -4px; 66 | } 67 | 68 | .header { 69 | width: 100%; 70 | margin-top: 100px; 71 | text-align: center; 72 | display: block; 73 | font-size: 100pt; 74 | -background-color: black; 75 | } 76 | 77 | .abspos { 78 | display:block; 79 | position: absolute; 80 | } 81 | 82 | .game-menu div.disabled { 83 | color: rgb(128,128,128); 84 | } 85 | 86 | #version-footer { 87 | text-align: center; 88 | font-size: 20; 89 | color: rgb(235,156,9); 90 | top:1040px; 91 | } 92 | 93 | 94 | -------------------------------------------------------------------------------- /jfaudiolib/driver_nosound.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Jonathon Fowler 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | 22 | int NoSoundDrv_GetError(void); 23 | const char *NoSoundDrv_ErrorString( int ErrorNumber ); 24 | 25 | int NoSoundDrv_PCM_Init(int * mixrate, int * numchannels, int * samplebits, void * initdata); 26 | void NoSoundDrv_PCM_Shutdown(void); 27 | int NoSoundDrv_PCM_BeginPlayback(char *BufferStart, int BufferSize, 28 | int NumDivisions, void ( *CallBackFunc )( void ) ); 29 | void NoSoundDrv_PCM_StopPlayback(void); 30 | void NoSoundDrv_PCM_Lock(void); 31 | void NoSoundDrv_PCM_Unlock(void); 32 | 33 | int NoSoundDrv_CD_Init(void); 34 | void NoSoundDrv_CD_Shutdown(void); 35 | int NoSoundDrv_CD_Play(int track, int loop); 36 | void NoSoundDrv_CD_Stop(void); 37 | void NoSoundDrv_CD_Pause(int pauseon); 38 | int NoSoundDrv_CD_IsPlaying(void); 39 | void NoSoundDrv_CD_SetVolume(int volume); 40 | 41 | int NoSoundDrv_MIDI_Init(midifuncs *); 42 | void NoSoundDrv_MIDI_Shutdown(void); 43 | int NoSoundDrv_MIDI_StartPlayback(void (*service)(void)); 44 | void NoSoundDrv_MIDI_HaltPlayback(void); 45 | unsigned int NoSoundDrv_MIDI_GetTick(void); 46 | void NoSoundDrv_MIDI_SetTempo(int tempo, int division); 47 | void NoSoundDrv_MIDI_Lock(void); 48 | void NoSoundDrv_MIDI_Unlock(void); 49 | 50 | -------------------------------------------------------------------------------- /code/rocket/ShellSystemInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETSHELLSYSTEMINTERFACE_H 29 | #define ROCKETSHELLSYSTEMINTERFACE_H 30 | 31 | #include 32 | 33 | /** 34 | A custom system interface for Rocket. This provides timing information. 35 | @author Lloyd Weehuizen 36 | */ 37 | 38 | class ShellSystemInterface : public Rocket::Core::SystemInterface 39 | { 40 | public: 41 | /// Get the number of seconds elapsed since the start of the application 42 | /// @returns Seconds elapsed 43 | virtual float GetElapsedTime(); 44 | virtual bool LogMessage(Rocket::Core::Log::Type type, const Rocket::Core::String& message); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/Vertex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCOREVERTEX_H 29 | #define ROCKETCOREVERTEX_H 30 | 31 | #include 32 | #include 33 | 34 | namespace Rocket { 35 | namespace Core { 36 | 37 | /** 38 | The element that makes up all geometry sent to the renderer. 39 | 40 | @author Peter Curry 41 | */ 42 | 43 | struct ROCKETCORE_API Vertex 44 | { 45 | /// Two-dimensional position of the vertex (usually in pixels). 46 | Vector2f position; 47 | /// RGBA-ordered 8-bit / channel colour. 48 | Colourb colour; 49 | /// Texture coordinate for any associated texture. 50 | Vector2f tex_coord; 51 | }; 52 | 53 | } 54 | } 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Controls/ElementDataGridExpandButton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCONTROLSELEMENTDATAGRIDEXPANDBUTTON_H 29 | #define ROCKETCONTROLSELEMENTDATAGRIDEXPANDBUTTON_H 30 | 31 | #include 32 | #include 33 | 34 | namespace Rocket { 35 | namespace Controls { 36 | 37 | /** 38 | @author Robert Curry 39 | */ 40 | 41 | class ROCKETCONTROLS_API ElementDataGridExpandButton : public Core::Element 42 | { 43 | public: 44 | ElementDataGridExpandButton(const Rocket::Core::String& tag); 45 | virtual ~ElementDataGridExpandButton(); 46 | 47 | protected: 48 | void ProcessEvent(Core::Event& event); 49 | }; 50 | 51 | } 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/ScriptInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCORESCRIPTINTERFACE_H 29 | #define ROCKETCORESCRIPTINTERFACE_H 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | namespace Rocket { 36 | namespace Core { 37 | 38 | /** 39 | Base class for all objects that hold a scriptable object. 40 | @author Peter Curry 41 | */ 42 | 43 | class ROCKETCORE_API ScriptInterface : public ReferenceCountable 44 | { 45 | public: 46 | virtual ~ScriptInterface() 47 | { 48 | } 49 | 50 | virtual ScriptObject GetScriptObject() const 51 | { 52 | return NULL; 53 | } 54 | }; 55 | 56 | } 57 | } 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/Python/Python.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCOREPYTHON_H 29 | #define ROCKETCOREPYTHON_H 30 | 31 | // RocketCore platform header for the ROCKET_PLATFORM_* define. 32 | #include 33 | 34 | // Python header includes 35 | #include 36 | 37 | #ifdef ROCKET_PLATFORM_WIN32 38 | #pragma warning(push) 39 | #pragma warning(disable: 4244) 40 | #endif 41 | 42 | // Prevent Boost from auto-linking with the wrong library. 43 | #define BOOST_ALL_NO_LIB 44 | #include 45 | // remap boost::python to python for easier access 46 | namespace python = boost::python; 47 | 48 | #ifdef ROCKET_PLATFORM_WIN32 49 | #pragma warning(pop) 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /code/rocket/PythonInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 PYTHONINTERFACE_H 29 | #define PYTHONINTERFACE_H 30 | 31 | #include 32 | #include 33 | 34 | /** 35 | Creates and maintains the python interface to Invaders. 36 | 37 | @author Lloyd Weehuizen 38 | */ 39 | 40 | class PythonInterface 41 | { 42 | public: 43 | static bool Initialise(const char* python_path); 44 | static void Shutdown(); 45 | 46 | /// Import a python module 47 | static bool Import(const Rocket::Core::String& name); 48 | 49 | /// Print out current errors 50 | static void PrintError(bool clear_error = false); 51 | 52 | private: 53 | PythonInterface(); 54 | ~PythonInterface(); 55 | }; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /jfduke3d/develop.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) 25 | */ 26 | //------------------------------------------------------------------------- 27 | 28 | #ifndef _develop_public 29 | #define _develop_public 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | #define DEVELOPMENT 0 35 | #define SHAREWARE 0 36 | #define LOCATIONINFO 1 37 | #define SOFTWAREERROR 1 38 | #define MEMORYCORRUPTIONTEST 1 39 | #define PRECACHETEST 0 40 | #define DATACORRUPTIONTEST 0 41 | #define RANDOMNUMBERTEST 0 42 | 43 | 44 | #if ( LOCATIONINFO == 1 ) 45 | 46 | #define funcstart() \ 47 | { \ 48 | SoftError( "funcstart : module '%s' at line %d.\n", __FILE__, __LINE__ );\ 49 | } 50 | 51 | #define funcend() \ 52 | { \ 53 | SoftError( " funcend : module '%s' at line %d.\n", __FILE__, __LINE__ );\ 54 | } 55 | 56 | #else 57 | 58 | #define funcstart() 59 | #define funcend() 60 | 61 | #endif 62 | 63 | #ifdef __cplusplus 64 | }; 65 | #endif 66 | #endif 67 | -------------------------------------------------------------------------------- /jfmact/develop.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) 25 | */ 26 | //------------------------------------------------------------------------- 27 | 28 | #ifndef _develop_public 29 | #define _develop_public 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | #define DEVELOPMENT 0 35 | #define SHAREWARE 0 36 | #define LOCATIONINFO 1 37 | #define SOFTWAREERROR 1 38 | #define MEMORYCORRUPTIONTEST 1 39 | #define PRECACHETEST 0 40 | #define DATACORRUPTIONTEST 0 41 | #define RANDOMNUMBERTEST 0 42 | 43 | 44 | #if ( LOCATIONINFO == 1 ) 45 | 46 | #define funcstart() \ 47 | { \ 48 | SoftError( "funcstart : module '%s' at line %d.\n", __FILE__, __LINE__ );\ 49 | } 50 | 51 | #define funcend() \ 52 | { \ 53 | SoftError( " funcend : module '%s' at line %d.\n", __FILE__, __LINE__ );\ 54 | } 55 | 56 | #else 57 | 58 | #define funcstart() 59 | #define funcend() 60 | 61 | #endif 62 | 63 | #ifdef __cplusplus 64 | }; 65 | #endif 66 | #endif 67 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/ElementInstancerGeneric.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 | template 29 | ElementInstancerGeneric::~ElementInstancerGeneric() 30 | { 31 | } 32 | 33 | // Instances an element given the tag name and attributes 34 | template 35 | Element* ElementInstancerGeneric::InstanceElement(Element* /*parent*/, const String& tag, const XMLAttributes& /*attributes*/) 36 | { 37 | return new T(tag); 38 | } 39 | 40 | 41 | 42 | // Releases the given element 43 | template 44 | void ElementInstancerGeneric::ReleaseElement(Element* element) 45 | { 46 | delete element; 47 | } 48 | 49 | 50 | 51 | // Release the instancer 52 | template 53 | void ElementInstancerGeneric::Release() 54 | { 55 | delete this; 56 | } 57 | -------------------------------------------------------------------------------- /jfaudiolib/standard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) 20 | */ 21 | /********************************************************************** 22 | module: STANDARD.H 23 | 24 | author: James R. Dose 25 | date: May 25, 1994 26 | 27 | Header containing standard definitions. 28 | 29 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 30 | **********************************************************************/ 31 | 32 | #ifndef __STANDARD_H 33 | #define __STANDARD_H 34 | 35 | typedef int boolean; 36 | typedef int errorcode; 37 | 38 | #ifndef TRUE 39 | #define TRUE ( 1 == 1 ) 40 | #define FALSE ( !TRUE ) 41 | #endif 42 | 43 | enum STANDARD_ERRORS 44 | { 45 | Warning = -2, 46 | FatalError = -1, 47 | Success = 0 48 | }; 49 | 50 | #define BITSET( data, bit ) \ 51 | ( ( ( data ) & ( bit ) ) == ( bit ) ) 52 | 53 | #define ARRAY_LENGTH( array ) \ 54 | ( sizeof( array ) / sizeof( ( array )[ 0 ] ) ) 55 | 56 | #define WITHIN_BOUNDS( array, index ) \ 57 | ( ( 0 <= ( index ) ) && ( ( index ) < ARRAY_LENGTH( array ) ) ) 58 | 59 | #define FOREVER for( ; ; ) 60 | 61 | #ifdef NDEBUG 62 | #define DEBUGGING 0 63 | #else 64 | #define DEBUGGING 1 65 | #endif 66 | 67 | #define DEBUG_CODE \ 68 | if ( DEBUGGING == 0 ) \ 69 | { \ 70 | } \ 71 | else 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /jfmact/mouse.c: -------------------------------------------------------------------------------- 1 | /* 2 | * mouse.c 3 | * MACT library -to- JonoF's Build Port Mouse Glue 4 | * 5 | * by Jonathon Fowler 6 | * 7 | * Since we don't have the source to the MACT library I've had to 8 | * concoct some magic to glue its idea of controllers into that of 9 | * my Build port. 10 | * 11 | */ 12 | //------------------------------------------------------------------------- 13 | /* 14 | Duke Nukem Copyright (C) 1996, 2003 3D Realms Entertainment 15 | 16 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 17 | 18 | Duke Nukem 3D is free software; you can redistribute it and/or 19 | modify it under the terms of the GNU General Public License 20 | as published by the Free Software Foundation; either version 2 21 | of the License, or (at your option) any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 26 | 27 | See the GNU General Public License for more details. 28 | 29 | You should have received a copy of the GNU General Public License 30 | along with this program; if not, write to the Free Software 31 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 32 | */ 33 | //------------------------------------------------------------------------- 34 | 35 | #include "types.h" 36 | #include "mouse.h" 37 | #include "baselayer.h" 38 | 39 | 40 | boolean MOUSE_Init( void ) 41 | { 42 | initmouse(); 43 | return ((inputdevices & 2) == 2); 44 | } 45 | 46 | 47 | void MOUSE_Shutdown( void ) 48 | { 49 | uninitmouse(); 50 | } 51 | 52 | 53 | void MOUSE_ShowCursor( void ) 54 | { 55 | } 56 | 57 | 58 | void MOUSE_HideCursor( void ) 59 | { 60 | } 61 | 62 | 63 | int32 MOUSE_GetButtons( void ) 64 | { 65 | int32 buttons; 66 | readmousebstatus(&buttons); 67 | return buttons; 68 | } 69 | 70 | 71 | int32 MOUSE_ClearButton( int32 b ) 72 | { 73 | return (mouseb &= ~b); 74 | } 75 | 76 | 77 | void MOUSE_GetPosition( int32*x, int32*y ) 78 | { 79 | } 80 | 81 | 82 | void MOUSE_GetDelta( int32*x, int32*y ) 83 | { 84 | readmousexy(x,y); 85 | } 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /jfmact/mouse.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) 25 | */ 26 | //------------------------------------------------------------------------- 27 | 28 | #ifndef __mouse_h 29 | #define __mouse_h 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | #define LEFT_MOUSE 1 35 | #define RIGHT_MOUSE 2 36 | #define MIDDLE_MOUSE 4 37 | #define THUMB_MOUSE 8 38 | #define WHEELDOWN_MOUSE 16 39 | #define WHEELUP_MOUSE 32 40 | #define LEFT_MOUSE_PRESSED( button ) ( ( ( button ) & LEFT_MOUSE ) != 0 ) 41 | #define RIGHT_MOUSE_PRESSED( button ) ( ( ( button ) & RIGHT_MOUSE ) != 0 ) 42 | #define MIDDLE_MOUSE_PRESSED( button ) ( ( ( button ) & MIDDLE_MOUSE ) != 0 ) 43 | 44 | boolean MOUSE_Init( void ); 45 | void MOUSE_Shutdown( void ); 46 | void MOUSE_ShowCursor( void ); 47 | void MOUSE_HideCursor( void ); 48 | int32 MOUSE_GetButtons( void ); 49 | int32 MOUSE_ClearButton( int32 b ); 50 | void MOUSE_GetPosition( int32*x, int32*y ); 51 | void MOUSE_GetDelta( int32*x, int32*y ); 52 | 53 | #ifdef __cplusplus 54 | }; 55 | #endif 56 | #endif /* __mouse_h */ 57 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_test_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_log.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Wrapper to log in the TEST category 33 | * 34 | */ 35 | 36 | #ifndef _SDL_test_log_h 37 | #define _SDL_test_log_h 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Prints given message with a timestamp in the TEST category and INFO priority. 47 | * 48 | * \param fmt Message to be logged 49 | */ 50 | void SDLTest_Log(const char *fmt, ...); 51 | 52 | /** 53 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority. 54 | * 55 | * \param fmt Message to be logged 56 | */ 57 | void SDLTest_LogError(const char *fmt, ...); 58 | 59 | /* Ends C function definitions when using C++ */ 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | #include "close_code.h" 64 | 65 | #endif /* _SDL_test_log_h */ 66 | 67 | /* vi: set ts=4 sw=4 expandtab: */ 68 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_test_font.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_font.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef _SDL_test_font_h 31 | #define _SDL_test_font_h 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | /** 42 | * \brief Draw a string in the currently set font. 43 | * 44 | * \param renderer The renderer to draw on. 45 | * \param x The X coordinate of the upper left corner of the string. 46 | * \param y The Y coordinate of the upper left corner of the string. 47 | * \param s The string to draw. 48 | * 49 | * \returns Returns 0 on success, -1 on failure. 50 | */ 51 | int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s); 52 | 53 | 54 | /* Ends C function definitions when using C++ */ 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | #include "close_code.h" 59 | 60 | #endif /* _SDL_test_font_h */ 61 | 62 | /* vi: set ts=4 sw=4 expandtab: */ 63 | -------------------------------------------------------------------------------- /jfbuild/cache1d.h: -------------------------------------------------------------------------------- 1 | // cache1d.h 2 | 3 | #ifndef __cache1d_h__ 4 | #define __cache1d_h__ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void initcache(long dacachestart, long dacachesize); 11 | void allocache(long *newhandle, long newbytes, char *newlockptr); 12 | void suckcache(long *suckptr); 13 | void agecache(void); 14 | 15 | extern int pathsearchmode; // 0 = gamefs mode (default), 1 = localfs mode (editor's mode) 16 | int addsearchpath(const char *p); 17 | int findfrompath(const char *fn, char **where); 18 | int openfrompath(const char *fn, int flags, int mode); 19 | BFILE *fopenfrompath(const char *fn, const char *mode); 20 | 21 | long initgroupfile(char *filename); 22 | void uninitsinglegroupfile(long grphandle); 23 | void uninitgroupfile(void); 24 | long kopen4load(char *filename, char searchfirst); // searchfirst: 0 = anywhere, 1 = first group, 2 = any group 25 | long kread(long handle, void *buffer, long leng); 26 | long klseek(long handle, long offset, long whence); 27 | long kfilelength(long handle); 28 | long ktell(long handle); 29 | void kclose(long handle); 30 | 31 | enum { 32 | CACHE1D_FIND_FILE = 1, 33 | CACHE1D_FIND_DIR = 2, 34 | CACHE1D_FIND_DRIVE = 4, 35 | 36 | CACHE1D_OPT_NOSTACK = 0x100, 37 | 38 | // the lower the number, the higher the priority 39 | CACHE1D_SOURCE_DRIVE = 0, 40 | CACHE1D_SOURCE_CURDIR = 1, 41 | CACHE1D_SOURCE_PATH = 2, // + path stack depth 42 | CACHE1D_SOURCE_ZIP = 0x7ffffffe, 43 | CACHE1D_SOURCE_GRP = 0x7fffffff, 44 | }; 45 | typedef struct _CACHE1D_FIND_REC { 46 | char *name; 47 | int type, source; 48 | struct _CACHE1D_FIND_REC *next, *prev, *usera, *userb; 49 | } CACHE1D_FIND_REC; 50 | void klistfree(CACHE1D_FIND_REC *rec); 51 | CACHE1D_FIND_REC *klistpath(const char *path, const char *mask, int type); 52 | 53 | int kdfread(void *buffer, bsize_t dasizeof, bsize_t count, long fil); 54 | int dfread(void *buffer, bsize_t dasizeof, bsize_t count, BFILE *fil); 55 | void kdfwrite(void *buffer, bsize_t dasizeof, bsize_t count, long fil); 56 | void dfwrite(void *buffer, bsize_t dasizeof, bsize_t count, BFILE *fil); 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif // __cache1d_h__ 63 | 64 | -------------------------------------------------------------------------------- /jfbuild/osd.h: -------------------------------------------------------------------------------- 1 | // On-screen display (ie. console) 2 | // for the Build Engine 3 | // by Jonathon Fowler (jf@jonof.id.au) 4 | 5 | #ifndef __osd_h__ 6 | #define __osd_h__ 7 | 8 | 9 | typedef struct { 10 | int numparms; 11 | const char *name; 12 | const char **parms; 13 | const char *raw; 14 | } osdfuncparm_t; 15 | 16 | #define OSDCMD_OK 0 17 | #define OSDCMD_SHOWHELP 1 18 | 19 | // initializes things 20 | void OSD_Init(void); 21 | 22 | // sets the file to echo output to 23 | void OSD_SetLogFile(char *fn); 24 | 25 | // sets the functions the OSD will call to interrogate the environment 26 | void OSD_SetFunctions( 27 | void (*drawchar)(int,int,char,int,int), 28 | void (*drawstr)(int,int,char*,int,int,int), 29 | void (*drawcursor)(int,int,int,int), 30 | int (*colwidth)(int), 31 | int (*rowheight)(int), 32 | void (*clearbg)(int,int), 33 | int (*gettime)(void), 34 | void (*onshow)(int) 35 | ); 36 | 37 | // sets the parameters for presenting the text 38 | void OSD_SetParameters( 39 | int promptshade, int promptpal, 40 | int editshade, int editpal, 41 | int textshade, int textpal 42 | ); 43 | 44 | // sets the scancode for the key which activates the onscreen display 45 | void OSD_CaptureKey(int sc); 46 | 47 | // handles keyboard input when capturing input. returns 0 if key was handled 48 | // or the scancode if it should be handled by the game. 49 | int OSD_HandleKey(int sc, int press); 50 | 51 | // handles the readjustment when screen resolution changes 52 | void OSD_ResizeDisplay(int w,int h); 53 | 54 | // shows or hides the onscreen display 55 | void OSD_ShowDisplay(int onf); 56 | 57 | // draw the osd to the screen 58 | void OSD_Draw(void); 59 | 60 | // just like printf 61 | void OSD_Printf(const char *fmt, ...); 62 | #define printOSD OSD_Printf 63 | 64 | // executes buffered commands 65 | void OSD_DispatchQueued(void); 66 | 67 | // executes a string 68 | int OSD_Dispatch(const char *cmd); 69 | 70 | // registers a function 71 | // name = name of the function 72 | // help = a short help string 73 | // func = the entry point to the function 74 | int OSD_RegisterFunction(const char *name, const char *help, int (*func)(const osdfuncparm_t*)); 75 | 76 | #endif // __osd_h__ 77 | 78 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_active.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file SDL_active.h 25 | * Include file for SDL application focus event handling 26 | */ 27 | 28 | #ifndef _SDL_active_h 29 | #define _SDL_active_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | #include "begin_code.h" 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** @name The available application states */ 41 | /*@{*/ 42 | #define SDL_APPMOUSEFOCUS 0x01 /**< The app has mouse coverage */ 43 | #define SDL_APPINPUTFOCUS 0x02 /**< The app has input focus */ 44 | #define SDL_APPACTIVE 0x04 /**< The application is active */ 45 | /*@}*/ 46 | 47 | /* Function prototypes */ 48 | /** 49 | * This function returns the current state of the application, which is a 50 | * bitwise combination of SDL_APPMOUSEFOCUS, SDL_APPINPUTFOCUS, and 51 | * SDL_APPACTIVE. If SDL_APPACTIVE is set, then the user is able to 52 | * see your application, otherwise it has been iconified or disabled. 53 | */ 54 | extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void); 55 | 56 | 57 | /* Ends C function definitions when using C++ */ 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | #include "close_code.h" 62 | 63 | #endif /* _SDL_active_h */ 64 | -------------------------------------------------------------------------------- /jfbuild/polymosttexcache.h: -------------------------------------------------------------------------------- 1 | #ifndef POLYMOSTTEXCACHE_H 2 | #define POLYMOSTTEXCACHE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | struct PTCacheTileMip_typ { 9 | int sizx, sizy; 10 | int length; 11 | unsigned char * data; 12 | }; 13 | typedef struct PTCacheTileMip_typ PTCacheTileMip; 14 | 15 | struct PTCacheTile_typ { 16 | char * filename; 17 | int effects; 18 | int flags; 19 | int format; // OpenGL format code 20 | int tsizx, tsizy; 21 | int nummipmaps; 22 | PTCacheTileMip mipmap[1]; 23 | }; 24 | typedef struct PTCacheTile_typ PTCacheTile; 25 | 26 | /** 27 | * Loads the cache index file into memory 28 | */ 29 | void PTCacheLoadIndex(void); 30 | 31 | /** 32 | * Unloads the cache index from memory 33 | */ 34 | void PTCacheUnloadIndex(void); 35 | 36 | /** 37 | * Loads a tile from the cache. 38 | * @param filename the filename 39 | * @param effects the effects bits 40 | * @param flags the flags bits 41 | * @return a PTCacheTile entry fully completed 42 | */ 43 | PTCacheTile * PTCacheLoadTile(const char * filename, int effects, int flags); 44 | 45 | /** 46 | * Checks to see if a tile exists in the cache. 47 | * @param filename the filename 48 | * @param effects the effects bits 49 | * @param flags the flags bits 50 | * @return !0 if it exists 51 | */ 52 | int PTCacheHasTile(const char * filename, int effects, int flags); 53 | 54 | /** 55 | * Disposes of the resources allocated for a PTCacheTile 56 | * @param tdef a PTCacheTile entry 57 | */ 58 | void PTCacheFreeTile(PTCacheTile * tdef); 59 | 60 | /** 61 | * Allocates the skeleton of a PTCacheTile entry for you to complete. 62 | * Memory for filenames and mipmap data should be allocated using malloc() 63 | * @param nummipmaps allocate mipmap entries for nummipmaps items 64 | * @return a PTCacheTile entry 65 | */ 66 | PTCacheTile * PTCacheAllocNewTile(int nummipmaps); 67 | 68 | /** 69 | * Stores a PTCacheTile into the cache. 70 | * @param tdef a PTCacheTile entry fully completed 71 | * @return !0 on success 72 | */ 73 | int PTCacheWriteTile(PTCacheTile * tdef); 74 | 75 | /** 76 | * Forces the cache to be rebuilt. 77 | */ 78 | void PTCacheForceRebuild(void); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /thirdparty/dxsdk/include/D3DX10.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx10.h 6 | // Content: D3DX10 utility library 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifdef __D3DX10_INTERNAL__ 11 | #error Incorrect D3DX10 header used 12 | #endif 13 | 14 | #ifndef __D3DX10_H__ 15 | #define __D3DX10_H__ 16 | 17 | 18 | // Defines 19 | #include 20 | #include 21 | 22 | #define D3DX10_DEFAULT ((UINT) -1) 23 | #define D3DX10_FROM_FILE ((UINT) -3) 24 | #define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT) -3) 25 | 26 | #ifndef D3DX10INLINE 27 | #ifdef _MSC_VER 28 | #if (_MSC_VER >= 1200) 29 | #define D3DX10INLINE __forceinline 30 | #else 31 | #define D3DX10INLINE __inline 32 | #endif 33 | #else 34 | #ifdef __cplusplus 35 | #define D3DX10INLINE inline 36 | #else 37 | #define D3DX10INLINE 38 | #endif 39 | #endif 40 | #endif 41 | 42 | 43 | 44 | // Includes 45 | #include "d3d10.h" 46 | #include "d3dx10.h" 47 | #include "d3dx10math.h" 48 | #include "d3dx10core.h" 49 | #include "d3dx10tex.h" 50 | #include "d3dx10mesh.h" 51 | #include "d3dx10async.h" 52 | 53 | 54 | // Errors 55 | #define _FACDD 0x876 56 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 57 | 58 | enum _D3DX10_ERR { 59 | D3DX10_ERR_CANNOT_MODIFY_INDEX_BUFFER = MAKE_DDHRESULT(2900), 60 | D3DX10_ERR_INVALID_MESH = MAKE_DDHRESULT(2901), 61 | D3DX10_ERR_CANNOT_ATTR_SORT = MAKE_DDHRESULT(2902), 62 | D3DX10_ERR_SKINNING_NOT_SUPPORTED = MAKE_DDHRESULT(2903), 63 | D3DX10_ERR_TOO_MANY_INFLUENCES = MAKE_DDHRESULT(2904), 64 | D3DX10_ERR_INVALID_DATA = MAKE_DDHRESULT(2905), 65 | D3DX10_ERR_LOADED_MESH_HAS_NO_DATA = MAKE_DDHRESULT(2906), 66 | D3DX10_ERR_DUPLICATE_NAMED_FRAGMENT = MAKE_DDHRESULT(2907), 67 | D3DX10_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), 68 | }; 69 | 70 | 71 | #endif //__D3DX10_H__ 72 | 73 | -------------------------------------------------------------------------------- /thirdparty/dxsdk/include/D3DX11.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx11.h 6 | // Content: D3DX11 utility library 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifdef __D3DX11_INTERNAL__ 11 | #error Incorrect D3DX11 header used 12 | #endif 13 | 14 | #ifndef __D3DX11_H__ 15 | #define __D3DX11_H__ 16 | 17 | 18 | // Defines 19 | #include 20 | #include 21 | 22 | #ifdef ALLOW_THROWING_NEW 23 | #include 24 | #endif 25 | 26 | #define D3DX11_DEFAULT ((UINT) -1) 27 | #define D3DX11_FROM_FILE ((UINT) -3) 28 | #define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT) -3) 29 | 30 | #ifndef D3DX11INLINE 31 | #ifdef _MSC_VER 32 | #if (_MSC_VER >= 1200) 33 | #define D3DX11INLINE __forceinline 34 | #else 35 | #define D3DX11INLINE __inline 36 | #endif 37 | #else 38 | #ifdef __cplusplus 39 | #define D3DX11INLINE inline 40 | #else 41 | #define D3DX11INLINE 42 | #endif 43 | #endif 44 | #endif 45 | 46 | 47 | 48 | // Includes 49 | #include "d3d11.h" 50 | #include "d3dx11.h" 51 | #include "d3dx11core.h" 52 | #include "d3dx11tex.h" 53 | #include "d3dx11async.h" 54 | 55 | 56 | // Errors 57 | #define _FACDD 0x876 58 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 59 | 60 | enum _D3DX11_ERR { 61 | D3DX11_ERR_CANNOT_MODIFY_INDEX_BUFFER = MAKE_DDHRESULT(2900), 62 | D3DX11_ERR_INVALID_MESH = MAKE_DDHRESULT(2901), 63 | D3DX11_ERR_CANNOT_ATTR_SORT = MAKE_DDHRESULT(2902), 64 | D3DX11_ERR_SKINNING_NOT_SUPPORTED = MAKE_DDHRESULT(2903), 65 | D3DX11_ERR_TOO_MANY_INFLUENCES = MAKE_DDHRESULT(2904), 66 | D3DX11_ERR_INVALID_DATA = MAKE_DDHRESULT(2905), 67 | D3DX11_ERR_LOADED_MESH_HAS_NO_DATA = MAKE_DDHRESULT(2906), 68 | D3DX11_ERR_DUPLICATE_NAMED_FRAGMENT = MAKE_DDHRESULT(2907), 69 | D3DX11_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908), 70 | }; 71 | 72 | 73 | #endif //__D3DX11_H__ 74 | 75 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Controls/ElementDataGridCell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCONTROLSELEMENTDATAGRIDCELL_H 29 | #define ROCKETCONTROLSELEMENTDATAGRIDCELL_H 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | namespace Rocket { 36 | namespace Controls { 37 | 38 | /** 39 | The class for cells inside a data table row. 40 | 41 | @author Robert Curry 42 | */ 43 | 44 | class ROCKETCONTROLS_API ElementDataGridCell : public Core::Element, public Core::EventListener 45 | { 46 | public: 47 | ElementDataGridCell(const Rocket::Core::String& tag); 48 | virtual ~ElementDataGridCell(); 49 | 50 | void Initialise(Core::Element* header); 51 | 52 | protected: 53 | virtual void ProcessEvent(Core::Event& event); 54 | 55 | private: 56 | Core::Element* header; 57 | }; 58 | 59 | } 60 | } 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef _SDL_test_h 31 | #define _SDL_test_h 32 | 33 | #include "SDL.h" 34 | #include "SDL_test_common.h" 35 | #include "SDL_test_font.h" 36 | #include "SDL_test_random.h" 37 | #include "SDL_test_fuzzer.h" 38 | #include "SDL_test_crc32.h" 39 | #include "SDL_test_md5.h" 40 | #include "SDL_test_log.h" 41 | #include "SDL_test_assert.h" 42 | #include "SDL_test_harness.h" 43 | #include "SDL_test_images.h" 44 | #include "SDL_test_compare.h" 45 | 46 | #include "begin_code.h" 47 | /* Set up for C function definitions, even when using C++ */ 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | /* Global definitions */ 53 | 54 | /* 55 | * Note: Maximum size of SDLTest log message is less than SDLs limit 56 | * to ensure we can fit additional information such as the timestamp. 57 | */ 58 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 59 | 60 | /* Ends C function definitions when using C++ */ 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | #include "close_code.h" 65 | 66 | #endif /* _SDL_test_h */ 67 | 68 | /* vi: set ts=4 sw=4 expandtab: */ 69 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_clipboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_clipboard.h 24 | * 25 | * Include file for SDL clipboard handling 26 | */ 27 | 28 | #ifndef _SDL_clipboard_h 29 | #define _SDL_clipboard_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | /** 42 | * \brief Put UTF-8 text into the clipboard 43 | * 44 | * \sa SDL_GetClipboardText() 45 | */ 46 | extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); 47 | 48 | /** 49 | * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free() 50 | * 51 | * \sa SDL_SetClipboardText() 52 | */ 53 | extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void); 54 | 55 | /** 56 | * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty 57 | * 58 | * \sa SDL_GetClipboardText() 59 | */ 60 | extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); 61 | 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* _SDL_clipboard_h */ 70 | 71 | /* vi: set ts=4 sw=4 expandtab: */ 72 | -------------------------------------------------------------------------------- /thirdparty/dxsdk/include/d3dx9.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | // 5 | // File: d3dx9.h 6 | // Content: D3DX utility library 7 | // 8 | ////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifdef __D3DX_INTERNAL__ 11 | #error Incorrect D3DX header used 12 | #endif 13 | 14 | #ifndef __D3DX9_H__ 15 | #define __D3DX9_H__ 16 | 17 | 18 | // Defines 19 | #include 20 | 21 | #define D3DX_DEFAULT ((UINT) -1) 22 | #define D3DX_DEFAULT_NONPOW2 ((UINT) -2) 23 | #define D3DX_DEFAULT_FLOAT FLT_MAX 24 | #define D3DX_FROM_FILE ((UINT) -3) 25 | #define D3DFMT_FROM_FILE ((D3DFORMAT) -3) 26 | 27 | #ifndef D3DXINLINE 28 | #ifdef _MSC_VER 29 | #if (_MSC_VER >= 1200) 30 | #define D3DXINLINE __forceinline 31 | #else 32 | #define D3DXINLINE __inline 33 | #endif 34 | #else 35 | #ifdef __cplusplus 36 | #define D3DXINLINE inline 37 | #else 38 | #define D3DXINLINE 39 | #endif 40 | #endif 41 | #endif 42 | 43 | 44 | 45 | // Includes 46 | #include "d3d9.h" 47 | #include "d3dx9math.h" 48 | #include "d3dx9core.h" 49 | #include "d3dx9xof.h" 50 | #include "d3dx9mesh.h" 51 | #include "d3dx9shader.h" 52 | #include "d3dx9effect.h" 53 | 54 | #include "d3dx9tex.h" 55 | #include "d3dx9shape.h" 56 | #include "d3dx9anim.h" 57 | 58 | 59 | 60 | // Errors 61 | #define _FACDD 0x876 62 | #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 63 | 64 | enum _D3DXERR { 65 | D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900), 66 | D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901), 67 | D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902), 68 | D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903), 69 | D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904), 70 | D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905), 71 | D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906), 72 | D3DXERR_DUPLICATENAMEDFRAGMENT = MAKE_DDHRESULT(2907), 73 | D3DXERR_CANNOTREMOVELASTITEM = MAKE_DDHRESULT(2908), 74 | }; 75 | 76 | 77 | #endif //__D3DX9_H__ 78 | 79 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/Dictionary.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 | template< typename T > 29 | inline void Dictionary::Set(const String& key, const T& value) 30 | { 31 | Set(key, Variant(value)); 32 | } 33 | 34 | template< typename T > 35 | inline T Dictionary::Get(const String& key, const T& default_value) const 36 | { 37 | T value; 38 | if (!GetInto(key, value)) 39 | return default_value; 40 | 41 | return value; 42 | } 43 | 44 | 45 | template 46 | inline bool Dictionary::GetInto(const String& key, T& value) const 47 | { 48 | Variant* variant = Get(key); 49 | if (!variant) 50 | return false; 51 | 52 | return variant->GetInto(value); 53 | } 54 | 55 | template 56 | inline bool Dictionary::Iterate(int &pos, String& key, T& value) const 57 | { 58 | Variant* variant; 59 | bool iterate = Iterate(pos, key, variant); 60 | if (iterate) 61 | variant->GetInto(value); 62 | return iterate; 63 | } 64 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Controls/Clipboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCONTROLSCLIPBOARD_H 29 | #define ROCKETCONTROLSCLIPBOARD_H 30 | 31 | #include 32 | 33 | namespace Rocket { 34 | namespace Controls { 35 | 36 | /** 37 | The clipboard temporarily stores text that is cut or copied from a text widget. 38 | 39 | @author Peter Curry 40 | */ 41 | 42 | class Clipboard 43 | { 44 | public: 45 | /// Get the current contents of the clipboard. 46 | static Rocket::Core::WString Get(); 47 | 48 | /// Set the contents of the clipboard. 49 | static void Set(const Rocket::Core::WString& content); 50 | 51 | #if defined ROCKET_PLATFORM_WIN32 52 | /// Set the window handle of the application. This shouldn't need to be called unless the host 53 | /// application opens multiple windows, or opens and closes windows, etc. 54 | static void SetHWND(void* hwnd); 55 | #endif 56 | }; 57 | 58 | } 59 | } 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/EventListener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCOREEVENTLISTENER_H 29 | #define ROCKETCOREEVENTLISTENER_H 30 | 31 | #include 32 | #include 33 | 34 | namespace Rocket { 35 | namespace Core { 36 | 37 | class Event; 38 | class Element; 39 | 40 | /** 41 | Abstract interface class for handling events. 42 | 43 | @author Lloyd Weehuizen 44 | */ 45 | 46 | class ROCKETCORE_API EventListener 47 | { 48 | public: 49 | virtual ~EventListener() {} 50 | 51 | /// Process the incoming Event 52 | virtual void ProcessEvent(Event& event) = 0; 53 | 54 | /// Called when the listener has been attached to a new Element 55 | virtual void OnAttach(Element* ROCKET_UNUSED(element)) 56 | { 57 | } 58 | 59 | /// Called when the listener has been detached from a Element 60 | virtual void OnDetach(Element* ROCKET_UNUSED(element)) 61 | { 62 | } 63 | }; 64 | 65 | } 66 | } 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /thirdparty/include/Rocket/Core/TypeConverter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This source file is part of libRocket, the HTML/CSS Interface Middleware 3 | * 4 | * For the latest information, see http://www.librocket.com 5 | * 6 | * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd 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 ROCKETCORETYPECONVERTER_H 29 | #define ROCKETCORETYPECONVERTER_H 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | namespace Rocket { 40 | namespace Core { 41 | 42 | /** 43 | Templatised TypeConverters with Template Specialisation. 44 | 45 | These converters convert from source types to destination types. 46 | They're mainly useful in things like dictionaries and serialisers. 47 | 48 | @author Lloyd Weehuizen 49 | */ 50 | 51 | template 52 | class TypeConverter 53 | { 54 | public: 55 | static bool Convert(const SourceType& src, DestType& dest); 56 | }; 57 | 58 | #include 59 | 60 | } 61 | } 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /thirdparty/include/vpx/vp8e.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | /* This file contains backwards compatibility stubs for applications using 13 | * the VP8 version 1.0 API. 14 | */ 15 | #ifndef VP8E_H 16 | #define VP8E_H 17 | #include "vpx_codec_impl_top.h" 18 | 19 | #if defined(VPX_CODEC_DISABLE_COMPAT) && VPX_CODEC_DISABLE_COMPAT 20 | #error "Backwards compatibility disabled: don't include vp8e.h" 21 | #endif 22 | 23 | #include "vp8cx.h" 24 | DECLSPEC_DEPRECATED extern vpx_codec_iface_t vpx_enc_vp8_algo DEPRECATED; 25 | 26 | 27 | enum 28 | { 29 | VP8E_SET_REFERENCE = VP8_SET_REFERENCE, 30 | VP8E_COPY_REFERENCE = VP8_COPY_REFERENCE, 31 | VP8E_SET_PREVIEWPP = VP8_SET_POSTPROC, 32 | VP8E_SET_FLUSHFLAG = 4, 33 | VP8E_SET_FRAMETYPE = 10, 34 | VP8E_SET_ENCODING_MODE = 12 35 | }; 36 | 37 | #define NORMAL_FRAME (0) 38 | #define KEY_FRAME (1) 39 | 40 | /* Change VP8E to VP8 to get the undeprecated version of these (defined in 41 | * vp8.h) 42 | */ 43 | VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_REFERENCE, vpx_ref_frame_t *) 44 | VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_COPY_REFERENCE, vpx_ref_frame_t *) 45 | VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_PREVIEWPP, vp8_postproc_cfg_t *) 46 | 47 | 48 | /* Flush is done by calling vpx_codec_encode with a NULL input image. */ 49 | VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_FLUSHFLAG, int) 50 | 51 | 52 | /* Frame type is set with a flag to vpx_codec_control. See VPX_EFLAG_FORCE_KF 53 | */ 54 | VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_FRAMETYPE, int) 55 | 56 | 57 | /* This control has been deprecated in favor of the duration parameter to 58 | * vpx_codec_encode(). Use the #VPX_DL_REALTIME, #VPX_DL_GOOD_QUALITY, 59 | * #VPX_DL_BEST_QUALITY constants to that parameter instead. 60 | */ 61 | VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ENCODING_MODE, vp8e_encoding_mode) 62 | #include "vpx_codec_impl_bottom.h" 63 | #endif 64 | -------------------------------------------------------------------------------- /jfbuild/editor.h: -------------------------------------------------------------------------------- 1 | // "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman 2 | // Ken Silverman's official web site: "http://www.advsys.net/ken" 3 | // See the included license file "BUILDLIC.TXT" for license info. 4 | 5 | #ifndef __editor_h__ 6 | #define __editor_h__ 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #define NUMBUILDKEYS 20 13 | 14 | extern long qsetmode; 15 | extern short searchsector, searchwall, searchstat; 16 | extern long zmode, kensplayerheight; 17 | extern short defaultspritecstat; 18 | 19 | extern short temppicnum, tempcstat, templotag, temphitag, tempextra; 20 | extern char tempshade, temppal, tempxrepeat, tempyrepeat; 21 | extern char somethingintab; 22 | 23 | extern char buildkeys[NUMBUILDKEYS]; 24 | 25 | extern long ydim16, xdimgame, ydimgame, bppgame, xdim2d, ydim2d, forcesetup; 26 | 27 | 28 | extern int ExtInit(void); 29 | extern void ExtUnInit(void); 30 | extern void ExtPreCheckKeys(void); 31 | #ifdef SUPERBUILD 32 | extern void ExtAnalyzeSprites(void); 33 | #endif 34 | extern void ExtCheckKeys(void); 35 | extern void ExtPreLoadMap(void); 36 | extern void ExtLoadMap(const char *mapname); 37 | extern void ExtPreSaveMap(void); 38 | extern void ExtSaveMap(const char *mapname); 39 | extern const char *ExtGetSectorCaption(short sectnum); 40 | extern const char *ExtGetWallCaption(short wallnum); 41 | extern const char *ExtGetSpriteCaption(short spritenum); 42 | extern void ExtShowSectorData(short sectnum); 43 | extern void ExtShowWallData(short wallnum); 44 | extern void ExtShowSpriteData(short spritenum); 45 | extern void ExtEditSectorData(short sectnum); 46 | extern void ExtEditWallData(short wallnum); 47 | extern void ExtEditSpriteData(short spritenum); 48 | 49 | 50 | int loadsetup(const char *fn); // from config.c 51 | int writesetup(const char *fn); // from config.c 52 | 53 | void editinput(void); 54 | void clearmidstatbar16(void); 55 | 56 | short getnumber256(char namestart[80], short num, long maxnumber, char sign); 57 | short getnumber16(char namestart[80], short num, long maxnumber, char sign); 58 | void printmessage256(char name[82]); 59 | void printmessage16(char name[82]); 60 | 61 | void getpoint(long searchxe, long searchye, long *x, long *y); 62 | long getpointhighlight(long xplc, long yplc); 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /jfmact/util_lib.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) 25 | */ 26 | //------------------------------------------------------------------------- 27 | 28 | //*************************************************************************** 29 | // 30 | // UTIL_LIB.C - various utils 31 | // 32 | //*************************************************************************** 33 | 34 | #ifndef _util_lib_public 35 | #define _util_lib_public 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | #if RENDERTYPEWIN 41 | #include "winlayer.h" 42 | #endif 43 | 44 | void RegisterShutdownFunction( void (* sh) (void) ); 45 | void Error (const char *error, ...); 46 | 47 | char CheckParm (char *check); 48 | 49 | void *SafeMalloc (int32 size); 50 | int32 SafeMallocSize (void * ptr); 51 | void SafeFree (void * ptr); 52 | void SafeRealloc (void ** ptr, int32 newsize); 53 | int32 ParseHex (char *hex); 54 | int32 ParseNum (char *str); 55 | int16 MotoShort (int16 l); 56 | int16 IntelShort (int16 l); 57 | int32 MotoLong (int32 l); 58 | int32 IntelLong (int32 l); 59 | 60 | void HeapSort(char * base, int32 nel, int32 width, int32 (*compare)(), void (*switcher)()); 61 | 62 | #ifdef __cplusplus 63 | }; 64 | #endif 65 | #endif 66 | -------------------------------------------------------------------------------- /code/rocket/FrameAnimationDecorator.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Sergei Shubin 3 | // 4 | 5 | #include "FrameAnimationDecorator.h" 6 | #include 7 | #include 8 | #include 9 | #include "ShellOpenGL.h" 10 | #include 11 | 12 | FrameAnimationDecorator::~FrameAnimationDecorator() { 13 | } 14 | 15 | bool FrameAnimationDecorator::Initialise(const Rocket::Core::String& image_source, const Rocket::Core::String& image_path, int num_frames, int frame_width, float frame_delay, bool reverse) { 16 | m_texture = LoadTexture(image_source, image_path); 17 | m_num_frames = num_frames; 18 | m_frame_width = frame_width; 19 | m_frame_delay = frame_delay; 20 | m_reverse = reverse; 21 | m_init_time = Rocket::Core::GetSystemInterface()->GetElapsedTime(); 22 | return m_texture != -1; 23 | } 24 | 25 | Rocket::Core::DecoratorDataHandle FrameAnimationDecorator::GenerateElementData(Rocket::Core::Element *element) { 26 | return NULL; 27 | } 28 | 29 | void FrameAnimationDecorator::ReleaseElementData(Rocket::Core::DecoratorDataHandle element_data) { 30 | } 31 | 32 | void FrameAnimationDecorator::RenderElement(Rocket::Core::Element *element, Rocket::Core::DecoratorDataHandle element_data) { 33 | Rocket::Core::Vector2f position = element->GetAbsoluteOffset(Rocket::Core::Box::PADDING); 34 | Rocket::Core::Vector2f size = element->GetBox().GetSize(Rocket::Core::Box::PADDING); 35 | 36 | float delta = Rocket::Core::GetSystemInterface()->GetElapsedTime() - m_init_time; 37 | int frame = ((int)ceilf(delta/m_frame_delay))%m_num_frames; 38 | if (m_reverse) { 39 | frame = m_num_frames-frame-1; 40 | } 41 | float frame_w = 1.0f / m_num_frames; 42 | float l = frame_w * frame; 43 | float r = l + frame_w; 44 | 45 | glEnable(GL_TEXTURE_2D); 46 | glBindTexture(GL_TEXTURE_2D, (GLuint) GetTexture(m_texture)->GetHandle(element->GetRenderInterface())); 47 | 48 | glColor4ub(255, 255, 255, 255); 49 | glBegin(GL_QUADS); 50 | 51 | glTexCoord2f(l, 0); 52 | glVertex2f(position.x, position.y); 53 | 54 | glTexCoord2f(l, 1); 55 | glVertex2f(position.x, position.y + size.y); 56 | 57 | glTexCoord2f(r, 1); 58 | glVertex2f(position.x + size.x, position.y + size.y); 59 | 60 | glTexCoord2f(r, 0); 61 | glVertex2f(position.x + size.x, position.y); 62 | 63 | glEnd(); 64 | } 65 | -------------------------------------------------------------------------------- /thirdparty/include/SDL_quit.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 Sam Lantinga 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 damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_quit.h 24 | * 25 | * Include file for SDL quit event handling. 26 | */ 27 | 28 | #ifndef _SDL_quit_h 29 | #define _SDL_quit_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | /** 35 | * \file SDL_quit.h 36 | * 37 | * An ::SDL_QUIT event is generated when the user tries to close the application 38 | * window. If it is ignored or filtered out, the window will remain open. 39 | * If it is not ignored or filtered, it is queued normally and the window 40 | * is allowed to close. When the window is closed, screen updates will 41 | * complete, but have no effect. 42 | * 43 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) 44 | * and SIGTERM (system termination request), if handlers do not already 45 | * exist, that generate ::SDL_QUIT events as well. There is no way 46 | * to determine the cause of an ::SDL_QUIT event, but setting a signal 47 | * handler in your application will override the default generation of 48 | * quit events for that signal. 49 | * 50 | * \sa SDL_Quit() 51 | */ 52 | 53 | /* There are no functions directly affecting the quit event */ 54 | 55 | #define SDL_QuitRequested() \ 56 | (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) 57 | 58 | #endif /* _SDL_quit_h */ 59 | -------------------------------------------------------------------------------- /jfduke3d/rts.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) 25 | */ 26 | //------------------------------------------------------------------------- 27 | 28 | //*************************************************************************** 29 | // 30 | // RTS.H 31 | // 32 | //*************************************************************************** 33 | 34 | #ifndef __rts_public__ 35 | #define __rts_public__ 36 | 37 | /* 38 | ==================== 39 | = 40 | = RTS_Init 41 | = 42 | = Files with a .rts extension are idlink files with multiple lumps 43 | = 44 | ==================== 45 | */ 46 | 47 | void RTS_Init (char *filename); 48 | /* 49 | ==================== 50 | = 51 | = RTS_NumSounds 52 | = 53 | ==================== 54 | */ 55 | 56 | int32 RTS_NumSounds (void); 57 | /* 58 | ==================== 59 | = 60 | = RTS_SoundLength 61 | = 62 | = Returns the buffer size needed to load the given lump 63 | = 64 | ==================== 65 | */ 66 | 67 | int32 RTS_SoundLength (int32 lump); 68 | /* 69 | ==================== 70 | = 71 | = RTS_GetSoundName 72 | = 73 | ==================== 74 | */ 75 | 76 | char * RTS_GetSoundName (int32 i); 77 | /* 78 | ==================== 79 | = 80 | = RTS_GetSound 81 | = 82 | ==================== 83 | */ 84 | void *RTS_GetSound (int32 lump); 85 | #endif 86 | -------------------------------------------------------------------------------- /jfduke3d/testcd.c: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Duke Nukem Copyright (C) 1996, 2003 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Replacement cd-auth routine by Jonathon Fowler. 23 | */ 24 | //------------------------------------------------------------------------- 25 | 26 | #if (defined(RENDERTYPEWIN) || defined(WIN32)) && !defined(NOCOPYPROTECT) 27 | #define WIN32_LEAN_AND_MEAN 28 | #include 29 | #include 30 | #include 31 | #include "compat.h" 32 | #include "baselayer.h" 33 | 34 | /* 35 | * Why even bother doing this? Because I can. Because it proves the futility 36 | * of it all. Because it's amusing. Who cares? 37 | */ 38 | 39 | char testcd( char *fn, long testsiz ) 40 | { 41 | DWORD driveletters; 42 | int i, fil, dalen; 43 | char name[32]="x:\\SUPPORT\\",driv[4]="x:\\"; 44 | 45 | strcat(name,fn); 46 | 47 | driveletters = GetLogicalDrives(); 48 | for (i=2; i<26; i++) { 49 | if (!(driveletters & (1ul<