├── .hgignore ├── AlphaAnimType.h ├── Anim3D.cpp ├── Anim3D.h ├── AnimThing.cpp ├── AnimThing.h ├── Average.h ├── BJOY.CPP ├── BJOY.H ├── BLiT.vcproj ├── BLiT.vcxproj ├── BLiT.vcxproj.filters ├── BLiT3D.vcproj ├── BLiT3D.vcxproj ├── BLiT3D.vcxproj.filters ├── Blue Audio.vcproj ├── Blue Video.vcproj ├── Blue.vcproj ├── Blue.vcxproj ├── Blue.vcxproj.filters ├── BufQ.cpp ├── BufQ.h ├── CapFlag_Gskirts.h ├── CompileOptions.h ├── CtrlBuf.h ├── Cyan.vcproj ├── Cyan.vcxproj ├── DefaultPostal.ini ├── Econsite.h ├── Eskirts.h ├── GameSettings.cpp ├── GameSettings.h ├── Gconsite.h ├── Goal_Gskirts.h ├── Green.vcproj ├── Green.vcxproj ├── Green.vcxproj.filters ├── Hconsite.h ├── Hskirts.h ├── IdBank.cpp ├── IdBank.h ├── InputSettings.cpp ├── InputSettings.h ├── InputSettingsDlg.cpp ├── InputSettingsDlg.h ├── Japan Add On.vcproj ├── LICENSE ├── Log.cpp ├── Log.h ├── LogicList.txt ├── Mconsite.h ├── MemFileFest.cpp ├── MemFileFest.h ├── MenuSettings.cpp ├── MenuSettings.h ├── MenuTrans.cpp ├── MenuTrans.h ├── Mpskirts.h ├── Mskirts.h ├── NetBrowse.cpp ├── NetClient.cpp ├── NetDlg.cpp ├── NetDlg.h ├── NetInput.h ├── NetServer.cpp ├── Orange.vcproj ├── Orange.vcxproj ├── Orange.vcxproj.filters ├── Pconsite.h ├── Personatorium.cpp ├── Postal Common.vcproj ├── Postal Common.vcxproj ├── Postal Common.vcxproj.filters ├── Postal Overview.txt ├── Postal Plus Demo.txt ├── Postal Plus Demo.vcproj ├── Postal Plus MP.vcproj ├── Postal Plus.txt ├── Postal Plus.vcproj ├── Postal Plus.vcxproj ├── Postal Plus.vcxproj.filters ├── Postal Plus.vcxproj.user ├── Postal.sln ├── PostalAttrib.h ├── PostalPrefix.h ├── PostalPrefixD.h ├── PostalPrefixFrench.h ├── PostalPrefixFrenchD.h ├── PostalPrefixGerman.h ├── PostalPrefixGermanD.h ├── PostalPrefixUK.h ├── PostalPrefixUKD.h ├── PostalPrefixUS.h ├── PostalPrefixUSD.h ├── PowerUp.cpp ├── PowerUp.h ├── ProtoBSDIP.cpp ├── ProtoBSDIP.h ├── RSPiX.cpp ├── RSPiX ├── Inc │ ├── RSPiX.h │ └── RSPiXUnix.h └── Src │ ├── BLUE │ ├── Blue.h │ ├── System.h │ └── unix │ │ ├── Bdebug.cpp │ │ ├── Bdisp.cpp │ │ ├── Bjoy.cpp │ │ ├── Bkey.cpp │ │ ├── Bmain.cpp │ │ ├── Bmouse.cpp │ │ ├── Bsound.cpp │ │ ├── Btime.cpp │ │ ├── UnixBlue.h │ │ ├── UnixBlueKeys.h │ │ └── UnixSystem.h │ ├── CYAN │ ├── Unix │ │ ├── UnixCyan.h │ │ ├── uColors.cpp │ │ ├── uDialog.cpp │ │ └── uPath.cpp │ └── cyan.h │ ├── GREEN │ ├── 3D │ │ ├── pipeline.cpp │ │ ├── pipeline.h │ │ ├── render.cpp │ │ ├── render.h │ │ ├── types3d.cpp │ │ ├── types3d.h │ │ ├── user3d.h │ │ ├── zbuffer.cpp │ │ └── zbuffer.h │ ├── BLiT │ │ ├── BLIT.H │ │ ├── BLIT.cpp │ │ ├── BLITINIT.cpp │ │ ├── BLiT.doc │ │ ├── BLiTSprite.cpp │ │ ├── BLiTT.cpp │ │ ├── CFNT.cpp │ │ ├── Cfnt.h │ │ ├── ComicB.fnt │ │ ├── FSPR8.cpp │ │ ├── Fspr1.cpp │ │ ├── RPrint.cpp │ │ ├── RPrint.h │ │ ├── Rotate96.cpp │ │ ├── ScaleFlat.cpp │ │ ├── Times.fnt │ │ ├── _BlitInt.H │ │ ├── _ic.h │ │ ├── alphablit.cpp │ │ ├── alphablit.h │ │ ├── comic.fnt │ │ ├── line.cpp │ │ ├── mono.cpp │ │ ├── print.cpp │ │ ├── rotate.cpp │ │ ├── smash.fnt │ │ ├── system1.fnt │ │ └── text.cpp │ ├── Hot │ │ ├── hot.cpp │ │ └── hot.h │ ├── Image │ │ ├── IMAGE.TXT │ │ ├── IMAGEAFP.H │ │ ├── Image.cpp │ │ ├── Image.h │ │ ├── ImageFile.cpp │ │ ├── ImageFile.h │ │ ├── Imagecon.cpp │ │ ├── Imagecon.h │ │ ├── Imagetyp.h │ │ ├── PalFile.cpp │ │ ├── PalFile.h │ │ ├── SpecialTyp.h │ │ ├── pal.cpp │ │ └── pal.h │ ├── InputEvent │ │ ├── InputEvent.cpp │ │ └── InputEvent.h │ ├── Joy │ │ ├── Joy.cpp │ │ └── Joy.h │ ├── Mix │ │ ├── MixBuf.cpp │ │ ├── MixBuf.h │ │ ├── mix.cpp │ │ └── mix.h │ ├── RAMFlx │ │ ├── RAMMAIN.CPP │ │ ├── Ramflx.cpp │ │ ├── Ramflx.h │ │ └── Ramflxp.cpp │ ├── Sample │ │ ├── sample.cpp │ │ └── sample.h │ ├── Snd │ │ ├── snd.cpp │ │ └── snd.h │ ├── SndFx │ │ ├── SndFx.cpp │ │ └── SndFx.h │ ├── Task │ │ ├── task.cpp │ │ └── task.h │ └── Video │ │ └── Win95 │ │ ├── VIDEO.CPP │ │ ├── VIDEO.H │ │ ├── Video.mak │ │ ├── mssccprj.scc │ │ └── sampapp.cpp │ └── ORANGE │ ├── Attribute │ ├── attribute.cpp │ └── attribute.h │ ├── CDT │ ├── LIST.CPP │ ├── List.h │ ├── PQueue.h │ ├── QUEUE.CPP │ ├── QUEUE.H │ ├── advqueue.h │ ├── flist.h │ ├── fqueue.h │ ├── listbase.h │ ├── pixel.h │ ├── slist.h │ ├── smrtarry.h │ └── stack.h │ ├── Channel │ ├── channel.cpp │ └── channel.h │ ├── Chips │ ├── chip.cpp │ └── chip.h │ ├── Debug │ ├── profile.cpp │ └── profile.h │ ├── DirtRect │ ├── DirtRect.cpp │ └── DirtRect.h │ ├── DynaLink │ └── dynalink.h │ ├── File │ ├── file.cpp │ └── file.h │ ├── Flx │ ├── Flx.cpp │ ├── Flx.h │ ├── Flxp.cpp │ ├── MAIN.CPP │ └── SAMPMAIN.CPP │ ├── GUI │ ├── Frame.h │ ├── ListBox.cpp │ ├── ListBox.h │ ├── ListContents.cpp │ ├── ListContents.h │ ├── MultiBtn.cpp │ ├── MultiBtn.h │ ├── ProcessGui.cpp │ ├── ProcessGui.h │ ├── PushBtn.cpp │ ├── PushBtn.h │ ├── btn.cpp │ ├── btn.h │ ├── dlg.cpp │ ├── dlg.h │ ├── edit.cpp │ ├── edit.h │ ├── guiItem.cpp │ ├── guiItem.h │ ├── scrollbar.cpp │ ├── scrollbar.h │ ├── txt.cpp │ └── txt.h │ ├── GameLib │ ├── ANIMDATA.H │ ├── ANIMSPRT.H │ ├── ANIMSPRT.cpp │ ├── ATTRIB.H │ ├── ATTRIB.cpp │ ├── EVENT.CPP │ ├── EVENT.H │ ├── GRIP.H │ ├── PAL.H │ ├── Region.cpp │ ├── Region.h │ ├── SHAPES.cpp │ ├── SPRITE.H │ ├── SPRITE.cpp │ ├── Shapes.h │ ├── UNIV.H │ └── UNIV.cpp │ ├── IFF │ ├── iff.cpp │ └── iff.h │ ├── ImageTools │ ├── lasso.cpp │ └── lasso.h │ ├── Laymage │ ├── laymage.cpp │ └── laymage.h │ ├── MFC_Cntl │ ├── MFCool.cpp │ ├── MFCool.h │ ├── RSPXBlue.cpp │ └── RSPXBlue.h │ ├── MTask │ ├── mtask.cpp │ └── mtask.h │ ├── Meter │ ├── meter.cpp │ └── meter.h │ ├── MsgBox │ ├── MsgBox.cpp │ └── MsgBox.h │ ├── MultiGrid │ ├── MultiGrid.cpp │ ├── MultiGrid.h │ ├── MultiGridIndirect.cpp │ └── MultiGridIndirect.h │ ├── Parse │ ├── SimpleBatch.cpp │ ├── SimpleBatch.h │ └── testBatch.cpp │ ├── PlugIn │ ├── PlugIn.h │ ├── exe2dll.h │ └── plugin.cpp │ ├── Props │ └── Props.h │ ├── QuickMath │ ├── FixedPoint.cpp │ ├── FixedPoint.h │ ├── Fractions.h │ ├── QuickMath.cpp │ ├── QuickMath.h │ └── VectorMath.h │ ├── RString │ ├── rstring.cpp │ └── rstring.h │ ├── Stream │ ├── FileWin.h │ ├── RtVidc.cpp │ ├── dispatch.cpp │ ├── dispatch.h │ ├── filewin.cpp │ ├── filter.cpp │ ├── filter.h │ ├── res.cpp │ ├── res.h │ ├── resitem.cpp │ ├── resitem.h │ ├── rtflic.cpp │ ├── rtflic.h │ ├── rtplay.cpp │ ├── rtplay.h │ ├── rtsnd.cpp │ ├── rtsnd.h │ ├── rttime.h │ ├── rttypes.h │ └── rtvidc.h │ ├── color │ ├── colormatch.cpp │ ├── colormatch.h │ ├── dithermatch.cpp │ └── dithermatch.h │ └── str │ ├── str.cpp │ └── str.h ├── RSPiXPrefix.h ├── RSPiXPrefixD.h ├── SDL2 ├── include │ ├── SDL.h │ ├── SDL_assert.h │ ├── SDL_atomic.h │ ├── SDL_audio.h │ ├── SDL_bits.h │ ├── SDL_blendmode.h │ ├── SDL_clipboard.h │ ├── SDL_config.h │ ├── SDL_config.h.cmake │ ├── SDL_config.h.in │ ├── SDL_config_android.h │ ├── SDL_config_iphoneos.h │ ├── SDL_config_macosx.h │ ├── SDL_config_minimal.h │ ├── SDL_config_pandora.h │ ├── SDL_config_psp.h │ ├── SDL_config_windows.h │ ├── SDL_config_wiz.h │ ├── SDL_copying.h │ ├── SDL_cpuinfo.h │ ├── SDL_endian.h │ ├── SDL_error.h │ ├── SDL_events.h │ ├── SDL_gamecontroller.h │ ├── SDL_gesture.h │ ├── SDL_haptic.h │ ├── SDL_hints.h │ ├── SDL_joystick.h │ ├── SDL_keyboard.h │ ├── SDL_keycode.h │ ├── SDL_loadso.h │ ├── SDL_log.h │ ├── SDL_main.h │ ├── SDL_messagebox.h │ ├── SDL_mouse.h │ ├── SDL_mutex.h │ ├── SDL_name.h │ ├── SDL_opengl.h │ ├── SDL_opengles.h │ ├── SDL_opengles2.h │ ├── SDL_pixels.h │ ├── SDL_platform.h │ ├── SDL_power.h │ ├── SDL_quit.h │ ├── SDL_rect.h │ ├── SDL_render.h │ ├── SDL_revision.h │ ├── SDL_rwops.h │ ├── SDL_scancode.h │ ├── SDL_shape.h │ ├── SDL_stdinc.h │ ├── SDL_surface.h │ ├── SDL_system.h │ ├── SDL_syswm.h │ ├── SDL_test.h │ ├── SDL_test_assert.h │ ├── SDL_test_common.h │ ├── SDL_test_compare.h │ ├── SDL_test_crc32.h │ ├── SDL_test_font.h │ ├── SDL_test_fuzzer.h │ ├── SDL_test_harness.h │ ├── SDL_test_images.h │ ├── SDL_test_log.h │ ├── SDL_test_md5.h │ ├── SDL_test_random.h │ ├── SDL_thread.h │ ├── SDL_timer.h │ ├── SDL_touch.h │ ├── SDL_types.h │ ├── SDL_version.h │ ├── SDL_video.h │ ├── begin_code.h │ ├── close_code.h │ └── doxyfile └── libs │ ├── linux-x86 │ └── libSDL2-2.0.so.0 │ ├── macosx │ └── libSDL2-2.0.0.dylib │ └── win32 │ ├── SDL2.dll │ ├── SDL2.lib │ └── SDL2main.lib ├── SampleMaster.cpp ├── SampleMaster.h ├── SndRelay.cpp ├── SndRelay.h ├── SoundThing.cpp ├── SoundThing.h ├── StockPile.cpp ├── StockPile.h ├── Super Postal.vcproj ├── TexEdit.cpp ├── TexEdit.h ├── Thing3d.cpp ├── Thing3d.h ├── TriggerRegions.cpp ├── TriggerRegions.h ├── TriggerRgn.h ├── WishPiX.vcproj ├── WishPiX.vcxproj ├── WishPiX.vcxproj.filters ├── WishPiX ├── Menu │ ├── menu.cpp │ └── menu.h ├── Prefs │ ├── prefline.cpp │ ├── prefline.h │ ├── prefs.cpp │ └── prefs.h ├── ResourceManager │ ├── resmgr.cpp │ └── resmgr.h └── Spry │ ├── spry.cpp │ └── spry.h ├── aivars.cpp ├── alpha.cpp ├── alpha.h ├── alphablitforpostal.cpp ├── alphablitforpostal.h ├── ball.cpp ├── ball.h ├── band.cpp ├── band.h ├── barrel.cpp ├── barrel.h ├── bouy.cpp ├── bouy.h ├── bulletFest.cpp ├── bulletFest.h ├── camera.cpp ├── camera.h ├── character.cpp ├── character.h ├── chunk.cpp ├── chunk.h ├── collision.h ├── crawler.cpp ├── crawler.h ├── credits.cpp ├── credits.h ├── credits.txt ├── cutscene.cpp ├── cutscene.h ├── deathWad.cpp ├── deathWad.h ├── demon.cpp ├── demon.h ├── dispenser.cpp ├── dispenser.h ├── doofus.cpp ├── doofus.h ├── dude.cpp ├── dude.h ├── encrypt.cpp ├── encrypt.h ├── explode.cpp ├── explode.h ├── fire.cpp ├── fire.h ├── fireball.cpp ├── fireball.h ├── firebomb.cpp ├── firebomb.h ├── flag.cpp ├── flag.h ├── flagbase.cpp ├── flagbase.h ├── game.cpp ├── game.h ├── gameedit.cpp ├── gameedit.h ├── goaltimer.cpp ├── goaltimer.h ├── grenade.cpp ├── grenade.h ├── grip.cpp ├── grip.h ├── heatseeker.cpp ├── heatseeker.h ├── hood.cpp ├── hood.h ├── input.cpp ├── input.h ├── item3d.cpp ├── item3d.h ├── keys.cpp ├── keys.h ├── ladder.cpp ├── ladder.h ├── localize.cpp ├── localize.h ├── logtab.cpp ├── logtab.h ├── main.cpp ├── main.h ├── makefile ├── menus.cpp ├── menus.h ├── message.h ├── mine.cpp ├── mine.h ├── napalm.cpp ├── napalm.h ├── navnet.cpp ├── navnet.h ├── net.cpp ├── net.h ├── netbrowse.h ├── netclient.h ├── netmsgr.cpp ├── netmsgr.h ├── netserver.h ├── organ.cpp ├── organ.h ├── ostrich.cpp ├── ostrich.h ├── person.cpp ├── person.h ├── personatorium.h ├── play.cpp ├── play.h ├── postal_plus.ini ├── pylon.cpp ├── pylon.h ├── reality.h ├── realm.cpp ├── realm.h ├── res ├── Japan Add On.ico ├── Postal Plus.ico ├── Postal.rc ├── Super Postal.ico ├── cursor1.cur ├── eye.ico ├── guy.ico ├── mouth.ico ├── resource.h ├── rws.ico ├── sign.ico ├── skull.ico └── teeth.ico ├── rocket.cpp ├── rocket.h ├── scene.cpp ├── scene.h ├── score.cpp ├── score.h ├── sentry.cpp ├── sentry.h ├── settings.cpp ├── settings.h ├── smash.cpp ├── smash.h ├── socket.cpp ├── socket.h ├── sprites.h ├── thing.cpp ├── thing.h ├── title.cpp ├── title.h ├── toolbar.cpp ├── toolbar.h ├── trigger.cpp ├── trigger.h ├── update.cpp ├── update.h ├── warp.cpp ├── warp.h ├── weapon.cpp ├── weapon.h ├── yatime.cpp └── yatime.h /.hgignore: -------------------------------------------------------------------------------- 1 | syntax:glob 2 | bin 3 | Build 4 | *.plg 5 | *.ncb 6 | *.suo 7 | *.opt 8 | syntax: glob 9 | Backup/* 10 | testing/* 11 | ipch/* 12 | Backup1/* 13 | *sdf 14 | -------------------------------------------------------------------------------- /BLiT.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {8230ce26-0089-4b77-81cf-3a45a6003f5c} 6 | cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 7 | 8 | 9 | {cfea3f85-0d13-41a6-aa81-37685953689e} 10 | h;hpp;hxx;hm;inl;fi;fd 11 | 12 | 13 | {75f1b6f9-69c8-4bf7-a667-39badb5d5f1c} 14 | ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files 44 | 45 | 46 | Source Files 47 | 48 | 49 | Source Files 50 | 51 | 52 | Source Files 53 | 54 | 55 | 56 | 57 | Header Files 58 | 59 | 60 | Header Files 61 | 62 | 63 | Header Files 64 | 65 | 66 | Header Files 67 | 68 | 69 | -------------------------------------------------------------------------------- /BLiT3D.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {46b12d5d-9272-4201-b9ae-eab228bd0ee4} 6 | cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 7 | 8 | 9 | {fcbf418f-cfd3-4842-bfa5-7ab7942c9519} 10 | h;hpp;hxx;hm;inl;fi;fd 11 | 12 | 13 | {a7e0e8cc-3296-40c7-a006-4f9a0779d9b8} 14 | ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | -------------------------------------------------------------------------------- /Blue.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0497bc6e-3507-498f-af73-b5f0fab545e1} 6 | cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 7 | 8 | 9 | {cedeab3f-68f8-4371-9a2e-3486464deffc} 10 | h;hpp;hxx;hm;inl;fi;fd 11 | 12 | 13 | {1e0ed91a-b1a2-4498-abbe-917a8c52d953} 14 | ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | -------------------------------------------------------------------------------- /BufQ.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // BufQ.CPP 19 | // 20 | // History: 21 | // 05/24/97 JMI Started. 22 | // 23 | // 05/24/97 JMI Added UnGet(). 24 | // 25 | // 08/14/97 MJR Moved everything into this header so it would inline. 26 | // 27 | ////////////////////////////////////////////////////////////////////////////// 28 | 29 | #include "RSPiX.h" 30 | #include "BufQ.h" 31 | 32 | // Nothing to do here. It's all in the header for maximum inlining! 33 | 34 | 35 | // This was for testing the code efficiency 36 | #if 0 37 | void test(void); 38 | void test(void) 39 | { 40 | CBufQ buf; 41 | U8 val = 0; 42 | buf.Get(&val); 43 | buf.Put(val); 44 | } 45 | #endif 46 | 47 | /////////////////////////////////////////////////////////////////////////////// 48 | // EOF 49 | /////////////////////////////////////////////////////////////////////////////// 50 | -------------------------------------------------------------------------------- /DefaultPostal.ini: -------------------------------------------------------------------------------- 1 | ; Default POSTAL.INI file -- Other settings will be written to user's 2 | ; version or should not be in user's version 3 | ; (e.g., debug stuff). 4 | ; 5 | ; History: 6 | ; 01/??/97 MJR Started. 7 | ; 8 | ; 03/14/97 JMI Brought up to date. 9 | ; 10 | ; 03/24/97 JMI Added [Input], DegreesPerSecond, and UseMouse. 11 | ; 12 | ; 04/21/97 MJR Changed UseCurrentDeviceDimensions to 0. 13 | ; Changed LoadLoops to 1000. 14 | ; Added [World] and File. 15 | ; Cleaned up other stuff. 16 | ; 17 | ; 05/20/97 JMI Added the area at the end where things that should 18 | ; not be part of the release Postal.INI can be put. 19 | ; 20 | ; 06/09/97 JMI Added [Can] section and TakeSnapShots = 0. 21 | 22 | 23 | 24 | [Video] 25 | DeviceWidth = 640 26 | DeviceHeight = 480 27 | Type = GDI 28 | UseCurrentDeviceDimensions = 0 29 | ResizeWindows = 0 30 | 31 | [Audio] 32 | Type = WINMM 33 | DeviceBufTime = 200 34 | 35 | [Paths] 36 | CD=. 37 | HD=. 38 | VD=. 39 | ; Root path to files in the absence of their SAK. 40 | ;NoSakDir = . 41 | 42 | [Game] 43 | RecentDifficulty = 11 44 | RecentViolence = 11 45 | 46 | [Title] 47 | LoadLoops = 1000 48 | 49 | [Can] 50 | TakeSnapShots = 1 51 | 52 | [Input] 53 | DegreesPerSecond = 240.0 54 | UseMouse = 0 55 | 56 | [Realms] 57 | File = res\levels\realms.ini 58 | 59 | ; ----8<---Cut--->8---- Not to be included in the Release Postal.INI ----8<---Cut--->8---- 60 | 61 | [Debug] 62 | DisplayInfo = 0 63 | -------------------------------------------------------------------------------- /InputSettingsDlg.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // InputSettingsDlg.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | // History: 22 | // 07/03/97 JMI Started. 23 | // 24 | // 07/05/97 JMI Added protos for InputSettingsDlg_InitMenu() and 25 | // InputSettingsDlg_KillMenu(). 26 | // Removed protos for EditKeySettings() and EditMouseSetings(). 27 | // 28 | //////////////////////////////////////////////////////////////////////////////// 29 | #ifndef INPUTSETTINGSDLG_H 30 | #define INPUTSETTINGSDLG_H 31 | 32 | #include "RSPiX.h" 33 | 34 | 35 | ////////////////////////////////////////////////////////////////////////////// 36 | // Called to setup an input settings menu. 37 | ////////////////////////////////////////////////////////////////////////////// 38 | extern short InputSettingsDlg_InitMenu( // Returns 0 on success. 39 | Menu* pmenu); // In: Menu to setup. 40 | 41 | ////////////////////////////////////////////////////////////////////////////// 42 | // Called to clean up an input settings menu. 43 | ////////////////////////////////////////////////////////////////////////////// 44 | extern short InputSettingsDlg_KillMenu( // Returns 0 on success. 45 | Menu* pmenu); // In: Menu to clean up. 46 | 47 | ////////////////////////////////////////////////////////////////////////////// 48 | // Called when a choice is made or a selection is changed on an input 49 | // setttings menu. 50 | ////////////////////////////////////////////////////////////////////////////// 51 | void InputSettingsDlg_Choice( // Returns nothing. 52 | Menu* pmenuCurrent, // In: Current menu. 53 | short sMenuItem); // In: Menu item chosen or -1 if selection 54 | // change. 55 | 56 | ////////////////////////////////////////////////////////////////////////////// 57 | // Edit the input settings via menu. 58 | ////////////////////////////////////////////////////////////////////////////// 59 | extern short EditInputSettings(void); // Returns nothing. 60 | 61 | #endif // INPUTSETTINGSDLG_H 62 | //////////////////////////////////////////////////////////////////////////////// 63 | // EOF 64 | //////////////////////////////////////////////////////////////////////////////// 65 | -------------------------------------------------------------------------------- /Log.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // log.h 19 | // Project: Postal 20 | // 21 | // History:12/5/97 AJC Started. 22 | //////////////////////////////////////////////////////////////////////////////// 23 | #ifndef LOG_H 24 | #define LOG_H 25 | 26 | 27 | short OpenLogFile(); 28 | short CloseLogFile(); 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // WriteTimeStamp() 32 | // Write the network time log 33 | // global variables used: g_GameSettings 34 | //////////////////////////////////////////////////////////////////////////////// 35 | extern 36 | short WriteTimeStamp(char *pszCaller, // Name of calling routine 37 | char *pszCalleeName, // Name of player being sent or sending 38 | unsigned char ucMsgType, // Message type 39 | Net::SEQ seqStart, // Beginning sequent sent/received 40 | long sNum, // Number of seq's sent/received 41 | char bReceived, // a received or a sent message? TRUE if received 42 | U16 u16PackageID = 0); // Uniquely identifiable package id 43 | //////////////////////////////////////////////////////////////////////////////// 44 | // WriteInputData() 45 | // Write the network input data to network sync log 46 | // global variables used: g_GameSettings 47 | //////////////////////////////////////////////////////////////////////////////// 48 | extern short WriteInputData(U32 *input); 49 | 50 | 51 | #endif //LOG_H 52 | //////////////////////////////////////////////////////////////////////////////// 53 | // EOF 54 | //////////////////////////////////////////////////////////////////////////////// 55 | -------------------------------------------------------------------------------- /LogicList.txt: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // This file is designed to help in the implementation of logic tables. 3 | // Please update this as needed. Thanks! (This summarized aivars.cpp) 4 | ///////////////////////////////////////////////////////////////////////////////// 5 | // Last Updated: 05/27/97 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | GET_ACTION / SET_ACTION = {"Guard","Advance","Retreat","Engage","Popout","Run&Shoot","Hide" } 9 | TARGET_DIST = { "VeryClose", "Close", "Medium", "Far", "OffScreen" } 10 | POPOUT_AVAIL = { "false", "true" } 11 | RUNSHOOT_AVAIL = { "false", "true" } 12 | SAFETY_AVAIL = { "false", "true" } 13 | PYLON_AVAIL = { "none", "popout", "runshoot", "safety" } 14 | MY_HEALTH = { "low", "med", "high" } 15 | DUDE_HEALTH = {" dead", "low", "med", "high" } 16 | IS_TRIGGERED = { "false", "true" } 17 | USER1 = { "default" } 18 | RECENTLY_SHOT = { "false", "true" } 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /MemFileFest.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // MemFileFest.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | // History: 22 | // 09/12/97 JMI Started. 23 | // 24 | ////////////////////////////////////////////////////////////////////////////// 25 | // 26 | // Manages a group of memory resources that represent disk files. Currently 27 | // used for .RLM files to limit the usefulness of crippleware demos. 28 | // 29 | ////////////////////////////////////////////////////////////////////////////// 30 | 31 | #include "RSPiX.h" 32 | 33 | #include "CompileOptions.h" 34 | 35 | ////////////////////////////////////////////////////////////////////////////// 36 | // Typedefs. 37 | ////////////////////////////////////////////////////////////////////////////// 38 | 39 | typedef struct 40 | { 41 | char* pszResName; // Resource filename. 42 | U8* pau8Res; // Resource data. 43 | long lResSize; // Amount of resource data in bytes. 44 | } FATEntry; 45 | 46 | ////////////////////////////////////////////////////////////////////////////// 47 | // Protos. 48 | ////////////////////////////////////////////////////////////////////////////// 49 | #if defined(ENABLE_PLAY_SPECIFIC_REALMS_ONLY) 50 | 51 | ////////////////////////////////////////////////////////////////////////////// 52 | // Given a filename, open an RFile to the corresponding resource data. 53 | ////////////////////////////////////////////////////////////////////////////// 54 | extern short GetMemFileResource( // Returns 0 on successful open. 55 | const char* pszResName, // In: Res filename. 56 | RFile::Endian endian, // In: Endian nature for RFile. 57 | RFile* pfile); // In: File to open with. 58 | 59 | #endif // ENABLE_PLAY_SPECIFIC_REALMS_ONLY 60 | 61 | ////////////////////////////////////////////////////////////////////////////// 62 | // EOF 63 | ////////////////////////////////////////////////////////////////////////////// 64 | -------------------------------------------------------------------------------- /MenuSettings.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // MenuSettings.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | // History: 22 | // 06/11/97 JMI Started. 23 | // 24 | //////////////////////////////////////////////////////////////////////////////// 25 | #ifndef MENUSETTINGS_H 26 | #define MENUSETTINGS_H 27 | 28 | #include "RSPiX.h" 29 | #ifdef PATHS_IN_INCLUDES 30 | #include "WishPiX/Prefs/prefs.h" 31 | #else 32 | #include "prefs.h" 33 | #endif 34 | 35 | #include "settings.h" 36 | #include "localize.h" 37 | 38 | // Game settings 39 | class CMenuSettings : CSettings 40 | { 41 | public: 42 | 43 | public: 44 | // Set settings to default values 45 | CMenuSettings(void); 46 | 47 | // Destructor 48 | ~CMenuSettings(); 49 | 50 | // Read settings that are stored in preference file 51 | short LoadPrefs( 52 | RPrefs* pPrefs); 53 | 54 | // Write settings that are stored in preference file 55 | short SavePrefs( 56 | RPrefs* pPrefs); 57 | 58 | // Load settings that are stored in game file 59 | short LoadGame( 60 | RFile* pFile); 61 | 62 | // Save settings that are stored in game file 63 | short SaveGame( 64 | RFile* pFile); 65 | 66 | // Temporarily set settings for demo mode (file is for saving current settings) 67 | short PreDemo( 68 | RFile* pFile); 69 | 70 | // Restore settings to what they were prior to demo mode 71 | short PostDemo( 72 | RFile* pFile); 73 | }; 74 | 75 | #endif // MENUSETTINGS_H 76 | //////////////////////////////////////////////////////////////////////////////// 77 | // EOF 78 | //////////////////////////////////////////////////////////////////////////////// 79 | -------------------------------------------------------------------------------- /MenuTrans.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // MenuTrans.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | #ifndef MENUTRANS_H 23 | #define MENUTRANS_H 24 | 25 | 26 | //////////////////////////////////////////////////////////////////////////////// 27 | // 28 | //////////////////////////////////////////////////////////////////////////////// 29 | extern void StartMenuTrans( 30 | long lTotalTime); // In: Total time for effect (ms) 31 | 32 | 33 | //////////////////////////////////////////////////////////////////////////////// 34 | // 35 | //////////////////////////////////////////////////////////////////////////////// 36 | extern bool DoPreMenuTrans(void); 37 | extern bool DoPostMenuTrans(void); 38 | 39 | 40 | //////////////////////////////////////////////////////////////////////////////// 41 | // 42 | //////////////////////////////////////////////////////////////////////////////// 43 | void EndMenuTrans( 44 | bool bFinish); // In: true to finish effect, false to abort it 45 | 46 | 47 | #endif // MENUTRANS_H 48 | //////////////////////////////////////////////////////////////////////////////// 49 | // EOF 50 | //////////////////////////////////////////////////////////////////////////////// 51 | -------------------------------------------------------------------------------- /Postal Plus Demo.txt: -------------------------------------------------------------------------------- 1 | Postal Plus Demo 2 | ================ 3 | 4 | Postal Plus Demo is very similar to Postal Plus, except that it only 5 | comes with a single leve and does not include the editor or 6 | multiplayer support. 7 | 8 | Multiplayer was dropped from the demo because it was considiered highly 9 | unlikely that someone downloading this new demo (created in June 2001) 10 | will be able to find anyone else to play against. And multiplayer has 11 | traditionally been difficult to test because of all the different versions 12 | of the game already out there. And we didn't want to spend a lot of time 13 | on putting together this demo. Put it all together, and you get why 14 | we dropped it. 15 | 16 | 17 | Separate Assets 18 | --------------- 19 | 20 | The demo uses separate \res and \sak folders along with its own set of 21 | \make files. This is necessary because the full game's .sak files are 22 | too big for a downloadable demo. The demo's .sak files are smaller 23 | because they only include the files the demo actually uses. 24 | 25 | The root folder for the demo is \PostalPlus\Demo. 26 | 27 | 28 | Changes from Postal Plus 29 | ------------------------ 30 | 31 | Copied "Postal Plus.dsp" to "Postal Plus Demo.dsp". Renamed all 32 | cases of "Postal Plus" to "Postal Plus Demo" (except for 33 | "Postal Plus.ico", which will work fine for the demo.) 34 | 35 | Add Postal Plus Demo.dsp to the workspace. 36 | 37 | Copied "Postal Plus.ini" to "Postal Plus Demo.ini". Changed network 38 | path to point at demo's root folder. 39 | 40 | Created new "res\levels\Postal Plus Demo realms.ini" that includes 41 | just one single-player level and one gauntlet level. 42 | 43 | Cleaned up a bunch of macros in CompileSettings.h and added a few 44 | new ones. This changes applies to Postal Plus, too, but it shouldn't 45 | effect anything in that product. 46 | 47 | -------------------------------------------------------------------------------- /Postal Plus.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {659ac108-af58-4521-8a66-23e139b85f79} 6 | 7 | 8 | {130134f4-6370-4786-8f9e-2ed03e8fb9b0} 9 | 10 | 11 | 12 | 13 | Resource Files 14 | 15 | 16 | 17 | 18 | 19 | Resource Files 20 | 21 | 22 | Resource Files 23 | 24 | 25 | Resource Files 26 | 27 | 28 | Resource Files 29 | 30 | 31 | Resource Files 32 | 33 | 34 | Resource Files 35 | 36 | 37 | Resource Files 38 | 39 | 40 | Resource Files 41 | 42 | 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | Header Files 61 | 62 | 63 | Header Files 64 | 65 | 66 | Header Files 67 | 68 | 69 | Header Files 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /Postal Plus.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | .\Testing\PostalD.exe 5 | WindowsLocalDebugger 6 | $(SolutionDir)\Testing 7 | 8 | -------------------------------------------------------------------------------- /PostalPrefix.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This file is automatically included as part of every file in the project. 19 | // 20 | // Thie file sets includes the common settings and any settings that are 21 | // specific to NON-DEBUG mode. 22 | // 23 | //////////////////////////////////////////////////////////////////////////////// 24 | #ifndef POSTALPREFIX_H 25 | #define POSTALPREFIX_H 26 | 27 | // We normally want to include the precompiled header file, except when this 28 | // prefix file is being included by the file that actually generates the 29 | // precompiled header. Only that particular file will define this macro. 30 | #ifndef POSTAL_PRECOMPILING_NOW 31 | #include "PostalPrecomp" 32 | #endif 33 | 34 | // Include common settings 35 | #include "PostalPrefixCommon.h" 36 | 37 | // SmartHeap Stuff. Normally, we define these in debug mode and comment them out otherwise. 38 | #define NOSHMALLOC 39 | //#define MEM_DEBUG 40 | //#define DEFINE_NEW_MACRO 41 | 42 | // Define this for debug mode, comment it out otherwise. 43 | //#define _DEBUG 44 | 45 | 46 | #endif // POSTALPREFIX_H 47 | //////////////////////////////////////////////////////////////////////////////// 48 | // EOF 49 | //////////////////////////////////////////////////////////////////////////////// 50 | -------------------------------------------------------------------------------- /PostalPrefixD.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This file is automatically included as part of every file in the project. 19 | // 20 | // Thie file sets includes the common settings and any settings that are 21 | // specific to DEBUG mode. 22 | // 23 | //////////////////////////////////////////////////////////////////////////////// 24 | #ifndef POSTALPREFIXD_H 25 | #define POSTALPREFIXD_H 26 | 27 | // We normally want to include the precompiled header file, except when this 28 | // prefix file is being included by the file that actually generates the 29 | // precompiled header. Only that particular file will define this macro. 30 | #ifndef POSTAL_PRECOMPILING_NOW 31 | #include "PostalPrecompD" 32 | #endif 33 | 34 | // Include common settings 35 | #include "PostalPrefixCommon.h" 36 | 37 | // SmartHeap Stuff. Normally, we define these in debug mode and comment them out otherwise. 38 | #define NOSHMALLOC 39 | //#define MEM_DEBUG 40 | //#define DEFINE_NEW_MACRO 41 | 42 | // Define this for debug mode, comment it out otherwise. 43 | #define _DEBUG 44 | 45 | 46 | #endif // POSTALPREFIXD_H 47 | //////////////////////////////////////////////////////////////////////////////// 48 | // EOF 49 | //////////////////////////////////////////////////////////////////////////////// 50 | -------------------------------------------------------------------------------- /PostalPrefixFrench.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This special prefix file is just like the normal prefix file, except it 19 | // also sets the "locale" to a specific country. 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | 23 | // Use the normal prefix file 24 | #include "PostalPrefix.h" 25 | 26 | // Define the locale (US, UK, FRENCH, or GERMAN are currently supported) 27 | #define LOCALE FRENCH 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /PostalPrefixFrenchD.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This special prefix file is just like the normal prefix file, except it 19 | // also sets the "locale" to a specific country. 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | 23 | // Use the normal prefix file 24 | #include "PostalPrefixD.h" 25 | 26 | // Define the locale (US, UK, FRENCH, or GERMAN are currently supported) 27 | #define LOCALE FRENCH 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /PostalPrefixGerman.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This special prefix file is just like the normal prefix file, except it 19 | // also sets the "locale" to a specific country. 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | 23 | // Use the normal prefix file 24 | #include "PostalPrefix.h" 25 | 26 | // Define the locale (US, UK, FRENCH, or GERMAN are currently supported) 27 | #define LOCALE GERMAN 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /PostalPrefixGermanD.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This special prefix file is just like the normal prefix file, except it 19 | // also sets the "locale" to a specific country. 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | 23 | // Use the normal prefix file 24 | #include "PostalPrefixD.h" 25 | 26 | // Define the locale (US, UK, FRENCH, or GERMAN are currently supported) 27 | #define LOCALE GERMAN 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /PostalPrefixUK.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This special prefix file is just like the normal prefix file, except it 19 | // also sets the "locale" to a specific country. 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | 23 | // Use the normal prefix file 24 | #include "PostalPrefix.h" 25 | 26 | // Define the locale (US, UK, FRENCH, or GERMAN are currently supported) 27 | #define LOCALE UK 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /PostalPrefixUKD.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This special prefix file is just like the normal prefix file, except it 19 | // also sets the "locale" to a specific country. 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | 23 | // Use the normal prefix file 24 | #include "PostalPrefixD.h" 25 | 26 | // Define the locale (US, UK, FRENCH, or GERMAN are currently supported) 27 | #define LOCALE UK 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /PostalPrefixUS.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This special prefix file is just like the normal prefix file, except it 19 | // also sets the "locale" to a specific country. 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | 23 | // Use the normal prefix file 24 | #include "PostalPrefix.h" 25 | 26 | // Define the locale (US, UK, FRENCH, or GERMAN are currently supported) 27 | #define LOCALE US 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /PostalPrefixUSD.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This special prefix file is just like the normal prefix file, except it 19 | // also sets the "locale" to a specific country. 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | 23 | // Use the normal prefix file 24 | #include "PostalPrefixD.h" 25 | 26 | // Define the locale (US, UK, FRENCH, or GERMAN are currently supported) 27 | #define LOCALE US 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /ProtoBSDIP.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/ProtoBSDIP.cpp -------------------------------------------------------------------------------- /RSPiX.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // RSPiX.cpp 19 | // Project: Nostril (aka Postal) 20 | // 21 | // This module implements the precompiled header. 22 | // 23 | // History: 24 | // 01/26/97 JMI Started. 25 | // 26 | //////////////////////////////////////////////////////////////////////////////// 27 | // 28 | // Things included in this file will be in the precompiled header. 29 | // For a CPP to use the precompiled header it must: 30 | // 31 | // - All headers included here must be included in the CPP in the same 32 | // order they are here and must be the first includes in that CPP. 33 | // - Check the 'Use precompiled header file' option in the Settings|C/C++| 34 | // Precompiled Headers settings dialog with 'Through header:' set to RSPiX.h. 35 | // 36 | // 37 | // If your CPP does not like utilizing the precompiled header (i.e., it does 38 | // not include these headers or it does not include them first): 39 | // 40 | // - Check the 'Not using precompiled headers' option set in the Settings|C/C++| 41 | // Precompiled Headers settings dialog. 42 | // 43 | // 44 | // Reasons to use this precompiled header: 45 | // - On a P90/64M, using this precompiled header for Postal sped compile time 46 | // down to 1/4 that without it. 47 | // 48 | // Reasons to not use this precompiled header: 49 | // - Sometimes you may need to include another header before the ones included 50 | // here. For example , which, b/c of SmartHeap, must be included 51 | // before RSPiX.h. 52 | // - If you don't need to include the headers included here, you probably don't 53 | // need to precompile your headers. 54 | // 55 | //////////////////////////////////////////////////////////////////////////////// 56 | 57 | //////////////////////////////////////////////////////////////////////////////// 58 | // RSPiX includes. 59 | //////////////////////////////////////////////////////////////////////////////// 60 | 61 | #include "RSPiX.h" 62 | 63 | //////////////////////////////////////////////////////////////////////////////// 64 | // Postal includes. 65 | //////////////////////////////////////////////////////////////////////////////// 66 | 67 | //////////////////////////////////////////////////////////////////////////////// 68 | // EOF 69 | //////////////////////////////////////////////////////////////////////////////// 70 | -------------------------------------------------------------------------------- /RSPiX/Inc/RSPiX.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | /////////////////////////////////////////////////////////////////////////////// 19 | // 20 | // RSPiX.h 21 | // 22 | // History: 23 | // 07/19/96 JMI Started. 24 | // 25 | ////////////////////////////////////////////////////////////////////////////// 26 | // 27 | // This file decides what platform you are on and #includes the correct 28 | // RSPiX*.h. If you #include the platform specific RSPiX*.h instead of this 29 | // one, you will get a compile error. 30 | // 31 | ////////////////////////////////////////////////////////////////////////////// 32 | #ifndef RSPiX_H 33 | #define RSPiX_H 34 | 35 | #include "RSPiXUnix.h" 36 | 37 | #endif // RSPiX_H 38 | ////////////////////////////////////////////////////////////////////////////// 39 | // EOF 40 | ////////////////////////////////////////////////////////////////////////////// 41 | -------------------------------------------------------------------------------- /RSPiX/Src/BLUE/Blue.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | /////////////////////////////////////////////////////////////////////////////// 19 | // 20 | // Blue.h 21 | // 22 | // History: 23 | // 07/19/96 JMI Started. 24 | // 25 | // 06/03/97 JMI Added error messages. 26 | // 27 | ////////////////////////////////////////////////////////////////////////////// 28 | // 29 | // This file decides what platform you are on and #includes the correct 30 | // *Blue.h. If you #include the platform specific *Blue.h instead of this 31 | // one, you will get a compile error. 32 | // 33 | ////////////////////////////////////////////////////////////////////////////// 34 | #ifndef BLUE_H 35 | #define BLUE_H 36 | 37 | #include "unix/UnixBlue.h" 38 | 39 | ////////////////////////////////////////////////////////////////////////////// 40 | // Error messages. 41 | ////////////////////////////////////////////////////////////////////////////// 42 | 43 | // Base for all Blue error returns. 44 | #define BLU_ERR_BASE 0x1000 45 | 46 | // Blue error returns //////////////////////////////////////////////////////// 47 | 48 | // Audio ///////////////////////////////////////////////////////////////////// 49 | 50 | #define BLU_ERR_DEVICE_IN_USE (BLU_ERR_BASE + 1) // Device already in use. 51 | #define BLU_ERR_NO_DEVICE (BLU_ERR_BASE + 2) // Device (or driver for 52 | // device) not present. 53 | #define BLU_ERR_NOT_SUPPORTED (BLU_ERR_BASE + 3) // Format not supported. 54 | 55 | #endif // BLUE_H 56 | ////////////////////////////////////////////////////////////////////////////// 57 | // EOF 58 | ////////////////////////////////////////////////////////////////////////////// 59 | -------------------------------------------------------------------------------- /RSPiX/Src/BLUE/System.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | /////////////////////////////////////////////////////////////////////////////// 19 | // 20 | // System.h 21 | // 22 | // History: 23 | // 07/19/96 JMI Started. 24 | // 25 | ////////////////////////////////////////////////////////////////////////////// 26 | // 27 | // This file decides what platform you are on and #includes the correct 28 | // *System.h. If you #include the platform specific *System.h instead of this 29 | // one, you will get a compile error. 30 | // 31 | ////////////////////////////////////////////////////////////////////////////// 32 | #ifndef SYSTEM_H 33 | #define SYSTEM_H 34 | 35 | #include "BLUE/unix/UnixSystem.h" 36 | 37 | #endif // SYSTEM_H 38 | ////////////////////////////////////////////////////////////////////////////// 39 | // EOF 40 | ////////////////////////////////////////////////////////////////////////////// 41 | -------------------------------------------------------------------------------- /RSPiX/Src/CYAN/cyan.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | /////////////////////////////////////////////////////////////////////////////// 19 | // 20 | // Cyan.h 21 | // 22 | // History: 23 | // 06/21/96 JMI Started file. 24 | // 25 | /////////////////////////////////////////////////////////////////////////////// 26 | // This header chooses which cyan header to include. 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef CYAN_H 30 | #define CYAN_H 31 | 32 | #include "Unix/UnixCyan.h" 33 | 34 | #endif // CYAN_H 35 | 36 | /////////////////////////////////////////////////////////////////////////////// 37 | // EOF 38 | /////////////////////////////////////////////////////////////////////////////// 39 | -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/3D/render.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This is the actual 3d engine. It is resposible for triangle rendering with effects. 19 | // It understands NOTHING of higher level structures -> that is controlled in 20 | // pipeline.h, which brings all the low level containers together into a 21 | // low level engine 22 | // 23 | 24 | #ifndef RENDER_H 25 | #define RENDER_H 26 | //================================================== 27 | #include "Blue.h" 28 | #ifdef PATHS_IN_INCLUDES 29 | #include "GREEN/BLiT/BLIT.H" // for rspLine 30 | #include "GREEN/3D/zbuffer.h" // for rspLine 31 | #include "ORANGE/color/colormatch.h" 32 | #include "ORANGE/QuickMath/VectorMath.h" 33 | #include "ORANGE/QuickMath/FixedPoint.h" 34 | #else 35 | #include "BLIT.H" // for rspLine 36 | #include "zbuffer.h" // for rspLine 37 | #include "colormatch.h" 38 | #include "vectormath.h" 39 | #include "fixedpoint.h" 40 | #endif 41 | //================================================== 42 | 43 | // all render effects on! 44 | // Offset pFog to line up with the location of the object. 45 | // Note that a unique fog table is needed for each 46 | // triangle color! 47 | // 48 | extern void DrawTri_ZColorFog(UCHAR* pDst,long lDstP, 49 | RP3d* p1,RP3d* p2,RP3d* p3, 50 | RZBuffer* pZB,UCHAR* pFog, 51 | short sOffsetX = 0, // In: 2D offset for pZB. 52 | short sOffsetY = 0); // In: 2D offset for pZB. 53 | 54 | //================================================== 55 | // For debugging: 56 | extern void DrawTri_wire(RImage* pimDst,short sX,short sY, 57 | RP3d* p1,RP3d* p2,RP3d* p3,UCHAR ucColor); 58 | 59 | extern void DrawTri_ZColor(UCHAR* pDst,long lDstP, 60 | RP3d* p1,RP3d* p2,RP3d* p3, 61 | RZBuffer* pZB,UCHAR pFlatColor, 62 | short sOffsetX = 0, // In: 2D offset for pZB. 63 | short sOffsetY = 0); // In: 2D offset for pZB. 64 | //================================================== 65 | //================================================== 66 | // FLAT SHADED! 67 | // sX and sY are additional offsets into pimDst 68 | // There is NO Z_BUFFER here! It is JUST a polygon drawer 69 | // 70 | extern void DrawTri(UCHAR* pDstOffset,long lDstP, 71 | RP3d* p1,RP3d* p2,RP3d* p3, 72 | UCHAR ucFlatColor); 73 | 74 | //================================================== 75 | #endif 76 | -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/3D/user3d.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This is a quick include macro to get the user all 19 | // headers he needs to work with 3d stuff: 20 | 21 | // 3d stuff: 22 | #include "System.h" 23 | #ifdef PATHS_IN_INCLUDES 24 | #include "ORANGE/QuickMath/VectorMath.h" 25 | #include "GREEN/3D/types3d.h" 26 | #include "GREEN/3D/zbuffer.h" 27 | #include "GREEN/3D/render.h" 28 | #include "GREEN/3D/pipeline.h" 29 | #else 30 | #include "vectormath.h" 31 | #include "types3d.h" 32 | #include "zbuffer.h" 33 | #include "render.h" 34 | #include "pipeline.h" 35 | #endif 36 | -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/3D/zbuffer.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // deals with general manipulation and use of signed 16-bit z-buffers (0 = center) 19 | #ifndef ZBUFFER_H 20 | #define ZBUFFER_H 21 | //================================================== 22 | #include "Blue.h" 23 | #ifdef PATHS_IN_INCLUDES 24 | #include "ORANGE/QuickMath/FixedPoint.h" // for RFixedS32 25 | #include "ORANGE/color/colormatch.h" // for RFixedS32 26 | #else 27 | #include "FixedPoint.h" // for RFixedS32 28 | #include "ColorMatch.h" // for RFixedS32 29 | #endif 30 | //================================================== 31 | // Note that z-buffer assumes that positive z is 32 | // towards the viewer. 33 | //================================================== 34 | const short ZB_MIN_Z = -32768; 35 | 36 | class RZBuffer // a 16-bit signed z-buffer 37 | { 38 | public: 39 | short m_sW; 40 | short m_sH; 41 | long m_lP; // pitch in WORDS! (Not a real pitch!) 42 | short* m_pBuf; // for now, don't have great need for alignment! 43 | //---------------------------------------------- 44 | void Init(); 45 | RZBuffer(); 46 | RZBuffer(short sW,short sH); 47 | short Create(short sW,short sH); 48 | ~RZBuffer(); 49 | short Destroy(); 50 | //---------------------------------------------- 51 | void Clear(short sVal = ZB_MIN_Z); 52 | //---------------------------------------------- 53 | // debugging stuff 54 | short* GetZPtr(short sX,short sY){return (m_pBuf + sX + m_lP*sY);} 55 | void TestHeight(RImage* pimDst,short sDepth, 56 | short sX,short sY,short sW,short sH); 57 | void Dump(RImage* pimDst,short sX,short sY,short sW,short sH,UCHAR* pZCol); 58 | }; 59 | 60 | 61 | 62 | 63 | //================================================== 64 | //================================================== 65 | //================================================== 66 | 67 | //================================================== 68 | #endif 69 | -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/BLiT.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/RSPiX/Src/GREEN/BLiT/BLiT.doc -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/Cfnt.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | #ifndef CFNT_H 19 | #define CFNT_H 20 | //==================== 21 | #ifdef PATHS_IN_INCLUDES 22 | #include "GREEN/BLiT/BLIT.H" 23 | #include "GREEN/BLiT/_BlitInt.H" 24 | #else 25 | #include "BLIT.H" 26 | #include "_BlitInt.H" 27 | #endif 28 | //==================== 29 | 30 | // This class is used to hold the information for 31 | // a font. Actual printing 32 | // is done at a higher level by RPrint. 33 | // It will support kerning information. 34 | // Cell dimensions are in pixels. 35 | // Fonts are stored in a singly linked list, largest first. 36 | 37 | class RFont 38 | { 39 | public: 40 | //--------------- 41 | RFont(); 42 | ~RFont(); 43 | void EraseAll(); 44 | //--------------- 45 | //--------------- 46 | class RFontSet 47 | { 48 | public: 49 | //--------------- 50 | RFontSet(); 51 | ~RFontSet(); // free associated images... 52 | //--------------- 53 | 54 | RImage** m_ppimCharacters; // FSPR1 has all kerning info inside 55 | short m_sCellHeight; 56 | short m_sMaxWidth; 57 | RFontSet* m_pNext; 58 | }; 59 | //--------------- USER STUFF 60 | short Save(char* pszFileName); 61 | short Save(RFile* pcf); 62 | short Load(char* pszFileName); 63 | short Load(RFile* pcf); 64 | //--------------- UTILITY STUFF 65 | 66 | short Add(char* pszFileName); 67 | short Add(RFile* pcf); 68 | short AddLetter(RImage* pimLetter, // if FSPR1, don't need other arguements 69 | short sASCII=-1,short sKernL=0,short sKernR=0); 70 | // pdScale will be <= 1.0 71 | RFontSet* FindSize(short sCellH,double *pdScale); 72 | 73 | short DeleteSet(RFontSet* pRemove); // will NOT delete the last FontSet! 74 | //--------------- 75 | short m_sMaxCellHeight; 76 | short m_sMaxCellWidth; 77 | short m_sNumberOfScales; 78 | RFontSet* m_pFontSets; 79 | }; 80 | 81 | 82 | //==================== 83 | #endif 84 | -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/ComicB.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/RSPiX/Src/GREEN/BLiT/ComicB.fnt -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/Times.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/RSPiX/Src/GREEN/BLiT/Times.fnt -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/_BlitInt.H: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This is designed to handle all the non-user particulars amoung the BLiT source: 19 | #ifndef _BLITINT_H 20 | #define _BLITINT_H 21 | 22 | //============================== INTERNAL STUFF ================================== 23 | enum { BUF_MEMORY = 1,BUF_VRAM,BUF_VRAM2,BUF_WIN }; 24 | 25 | extern short gsScreenLocked; 26 | extern short gsBufferLocked; 27 | 28 | // This list of Image types needs to always be kept as up to date as humanly possible: 29 | // It is only intended for use in debug mode. It returns 0 if it is NOT the desired type, 30 | // one if it IS the desired type: 31 | // (Although long and tedious, we MUST validate supported types rather than invalidate 32 | // unsupported types.) 33 | 34 | // NOTE: These represent ONLY compressed types BLiT can access. Use ImageIsUncompressed 35 | // otherwise. 36 | // 37 | inline short ImageIsCompressed(ULONG ulType) // an image type 38 | { 39 | short sRet = 0; // 0 if it is NOT a supported compressed type, else 1! 40 | 41 | switch(ulType) 42 | { 43 | case RImage::FSPR1: 44 | case RImage::FSPR8: 45 | case RImage::FSPR16: 46 | case RImage::FSPR32: 47 | sRet = 1; 48 | } 49 | return sRet; 50 | } 51 | 52 | // NOTE: These represent ONLY uncompressed types BLiT can access. 53 | // 54 | inline short ImageIsUncompressed(ULONG ulType) // an image type 55 | { 56 | short sRet = 0; // 0 if it is NOT a supported uncompressed type, else 1! 57 | 58 | switch(ulType) 59 | { 60 | case RImage::ROTBUF: 61 | case RImage::BMP8: 62 | case RImage::SYSTEM8: 63 | case RImage::SCREEN8_555: 64 | case RImage::SCREEN8_565: 65 | case RImage::SCREEN8_888: 66 | case RImage::BMP24: 67 | case RImage::SCREEN16_555: 68 | case RImage::SCREEN16_565: 69 | case RImage::SCREEN24_RGB: 70 | case RImage::SCREEN32_ARGB: 71 | case RImage::IMAGE_STUB: // careful with this one 72 | sRet = 1; 73 | } 74 | return sRet; 75 | } 76 | 77 | /* 78 | // Not a complete descriptor -> just replaces the pData of an uncompressed buffer. 79 | class CCompressedMono // only a 96-bit header! 80 | { 81 | public: 82 | USHORT usASCII; // = ascii value 83 | USHORT usSourceType; // uncompressed Image pre-compressed type 84 | UCHAR* pCode; // It's all in one buffer for this one 85 | ULONG ulSize; // Size of compressed buffer 86 | 87 | CCompressedMono() 88 | { 89 | usASCII = usSourceType = 0; 90 | pCode = NULL; 91 | ulSize = 0; 92 | } 93 | 94 | ~CCompressedMono() 95 | { 96 | if (pCode) free(pCode); 97 | } 98 | 99 | }; 100 | */ 101 | 102 | extern void _rspBLiT(UCHAR ucColor,RImage* pimSrc,RImage* pimDst, 103 | short sDstX,short sDstY); 104 | 105 | //========================= 106 | #endif -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/_ic.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | I AM ARCHAIC - INCLUDE ORANGE/QUICKMATH/FIXEDPOINT.H instead! 19 | 20 | // This is an internal BLiT header. Don't get confused by it - it's not up to user level yet. 21 | #ifndef ic_h 22 | #define ic_h 23 | 24 | #include "System.h" 25 | 26 | //========================== Here are some fraction inlines... 27 | 28 | // add two fractions of identical denominators... 29 | // both fraction MUST be PROPER! 30 | // 31 | inline void Add(u16Frac& pDst,u16Frac& pAdd,short sDen) 32 | { 33 | pDst.delta += pAdd.delta; 34 | if ( (pDst.frac += pAdd.frac) >= sDen) 35 | { 36 | pDst.delta++; // ONLY adding proper fractions 37 | pDst.frac -= sDen; 38 | } 39 | } 40 | 41 | // Creates a proper fraction from an improper one: 42 | // The sizes MUST be appropriate! 43 | // 44 | inline void MakeProper(u16Frac& pDst,USHORT usNum,USHORT usDen) 45 | { 46 | pDst.delta = usNum / usDen; 47 | pDst.frac = usNum % usDen; 48 | //pDst.frac = usNum - pDst.delta * usDen;// overflow problem 49 | } 50 | 51 | // Creates an array of 256 fractions, uch that 0 is 0, 52 | // 1 is tha base fraction, and 255 is 255 * the base fraction. 53 | // Both must be unsigned! (uses calloc) 54 | // 55 | inline u16Frac* u16fStrafe256(USHORT usNum,USHORT usDen) 56 | { 57 | u16Frac* pu16fNew = (u16Frac*) calloc(256,sizeof(u16Frac)); 58 | u16Frac u16fInc; 59 | MakeProper(u16fInc,usNum,usDen); // the 2 part delta 60 | 61 | ULONG ulNumInc = 0; 62 | for (short i = 1; i < 256 ; i++) 63 | { 64 | pu16fNew[i].delta = pu16fNew[i-1].delta + u16fInc.delta; 65 | pu16fNew[i].frac = pu16fNew[i-1].frac + u16fInc.frac; 66 | if (pu16fNew[i].frac >= usDen) 67 | { 68 | pu16fNew[i].frac -= usDen; 69 | pu16fNew[i].delta++; // unsigned positive increment only! 70 | } 71 | } 72 | 73 | return pu16fNew; 74 | } 75 | 76 | //=========================== 77 | #endif 78 | -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/comic.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/RSPiX/Src/GREEN/BLiT/comic.fnt -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/line.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This function should draw 2d and 3d lines, and just keep getting better. 19 | #include 20 | #include "System.h" 21 | #ifdef PATHS_IN_INCLUDES 22 | #include "GREEN/BLiT/BLIT.H" 23 | //#include 24 | //#include "numbers.h" // allow 25 | //#include "_QuickTrig.h" 26 | //#include "_line.h" 27 | #include "ORANGE/QuickMath/QuickMath.h" 28 | #include "ORANGE/QuickMath/FixedPoint.h" 29 | #include "ORANGE/QuickMath/Fractions.h" 30 | #else 31 | #include "BLIT.H" 32 | //#include 33 | //#include "numbers.h" // allow 34 | //#include "_QuickTrig.h" 35 | //#include "_line.h" 36 | #include "QuickMath.h" 37 | #include "FixedPoint.h" 38 | #include "Fractions.h" 39 | #endif 40 | 41 | #ifdef MOBILE //Arm RAND_MAX is a full int, code expecting a short!! 42 | #define RAND_MAX 0x7fff 43 | #endif 44 | 45 | // Here's a very quick rip off! 46 | // I don't even know if it's 2 way consistent! 47 | // (It sure doesn't clip!) 48 | // VERY cheezy implementation! For drawing, should do IC stuff inline with pDst 49 | // 50 | void rspLine(UCHAR ucColor,RImage* pimDst,short sX1,short sY1,short sX2,short sY2,const RRect* prClip) 51 | { 52 | /* 53 | #ifdef _DEBUG 54 | if ((sX1 < 0) || (sY1 < 0) || (sX2 >= pimDst->lWidth) || (sY2 >= pimDst->lHeight)) 55 | { 56 | TRACE("line: Error... Clipped line!\n"); 57 | return; 58 | } 59 | #endif 60 | */ 61 | 62 | // use the cheap 3D technique with signed fractions: 63 | short sDelX = sX2 - sX1; // signed 64 | short sDelY = sY2 - sY1; // signed 65 | short sDelZ = MAX(ABS(sDelX),ABS(sDelY)); // a slow trick for now... 66 | if (sDelZ == 0) // a single point 67 | { 68 | rspClipPlot(ucColor,pimDst,sX1,sY1,prClip); 69 | return; 70 | } 71 | 72 | RFracS16 frIncX,frIncY; 73 | rspfrDiv(frIncX,sDelX,sDelZ); // Magnitude < 1 74 | rspfrDiv(frIncY,sDelY,sDelZ); // Magnitude < 1 75 | 76 | RFracS16 frX,frY; 77 | 78 | frX.mod = sX1; frY.mod = sY1; 79 | frX.frac = frY.frac = (sDelZ >> 1); // for pixel rounding 80 | 81 | for (short i=0;i < sDelZ;i++) 82 | { 83 | rspClipPlot(ucColor,pimDst,frX.mod,frY.mod,prClip); 84 | rspfrAdd(frX,frIncX,sDelZ); 85 | rspfrAdd(frY,frIncY,sDelZ); 86 | } 87 | } 88 | 89 | // returns a short random number between 0 and N-1 90 | // 91 | short rspRand(short sMax) 92 | { 93 | return (short)((rand() * sMax) / RAND_MAX); 94 | 95 | } 96 | 97 | -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/smash.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/RSPiX/Src/GREEN/BLiT/smash.fnt -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/BLiT/system1.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/RSPiX/Src/GREEN/BLiT/system1.fnt -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/Image/IMAGEAFP.H: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // IMAGEAFP.H 19 | // 20 | // Created on 10/17/95 BRH 21 | // Implemented on 10/17/95 BRH 22 | // 23 | // 10/17/95 BRH Split this from imagetyp.h to avoid multiple 24 | // inclusion of the array of function pointers. 25 | // 26 | // 10/26/95 BRH Added ConvertToSCREEN24_RGB to support one of the 27 | // more standard windows screen formats. 28 | // 29 | // When adding a convert function: 30 | // ------------------------------ 31 | // Make sure you add a enumerated type to imagetyp.h, preferably 32 | // just before END_OF_TYPES and then add your convert function to 33 | // the afpConvert array in the proper place. Your convert function 34 | // will be indexed by your image type, for example image type BMP8 35 | // = 1 in the enumerated type list and so afpConvert[1] = 36 | // ConvertToBMP8. Then you can add your function prototype to 37 | // imagecon.h and the implementation to imagecon.cpp, or you can 38 | // put your convert function in your own files. In that case you 39 | // will need to #include your .h file in this header file. 40 | // 41 | ////////////////////////////////////////////////////////////////////// 42 | 43 | #ifndef IMAGEAFP_H 44 | #define IMAGEAFP_H 45 | 46 | #include "imagecon.h" 47 | 48 | typedef short (*CONVFUNC)(CImage* pImage); 49 | 50 | // These are "convert to..." functions which should first check the current image type 51 | // to see if it can convert from the current type to the specified type 52 | CONVFUNC afpConvert[255] = 53 | { 54 | ConvertNoSupport, 55 | ConvertToBMP8, 56 | ConvertToSystem, 57 | ConvertToSCREEN8_555, 58 | ConvertToSCREEN8_565, 59 | ConvertToSCREEN8_888, 60 | ConvertToBMP24, 61 | ConvertToSCREEN16_555, 62 | ConvertToSCREEN16_565, 63 | ConvertToSCREEN24_RGB, 64 | ConvertToSCREEN32_ARGB, 65 | ConvertToBKD8 66 | 67 | }; 68 | 69 | #endif //IMAGEAFP_H 70 | -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/Image/Imagecon.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/RSPiX/Src/GREEN/Image/Imagecon.cpp -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/Joy/Joy.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | /////////////////////////////////////////////////////////////////////////////// 19 | // This is a public header file. It is to be included by applications that use 20 | // the WinBlue Library. 21 | /////////////////////////////////////////////////////////////////////////////// 22 | #ifndef JOY_H 23 | #define JOY_H 24 | 25 | /////////////////////////////////////////////////////////////////////////////// 26 | // Headers. 27 | /////////////////////////////////////////////////////////////////////////////// 28 | #include "common/bjoy.h" 29 | 30 | /////////////////////////////////////////////////////////////////////////////// 31 | // Typedefs. 32 | /////////////////////////////////////////////////////////////////////////////// 33 | 34 | /////////////////////////////////////////////////////////////////////////////// 35 | // Macros. 36 | /////////////////////////////////////////////////////////////////////////////// 37 | 38 | /////////////////////////////////////////////////////////////////////////////// 39 | // Prototypes. 40 | /////////////////////////////////////////////////////////////////////////////// 41 | 42 | // Sets the ucKey as the key representing usState on sJoy joystick. 43 | // Returns 0 on success. 44 | extern short Joy_SetKey(short sJoy, UCHAR ucKey, USHORT usState); 45 | 46 | // Updates joystick sJoy's current state and makes the current state the 47 | // previous. 48 | // Returns 0 on success. 49 | extern short Joy_Update(short sJoy); 50 | 51 | // Puts the coordinates of joystick sJoy's position in your longs. 52 | // Returns nothing. 53 | extern void Joy_GetPos(short sJoy, long *px, long *py, long *pz); 54 | 55 | // Puts the coordinates of the previous joystick sJoy's position in your longs. 56 | // Returns nothing. 57 | extern void Joy_GetPrevPos(short sJoy, long *px, long *py, long *pz); 58 | 59 | // Returns the current joystick sJoy's state. 60 | extern USHORT Joy_GetState(short sJoy); 61 | 62 | // Places the current joystick sJoy's state. 63 | extern void Joy_GetState(short sJoy, PJOYSTATE pjs); 64 | 65 | // Returns the previous joystick sJoy's state. 66 | extern USHORT Joy_GetPrevState(short sJoy); 67 | 68 | // Places the previous joystick sJoy's state. 69 | extern void Joy_GetPrevState(short sJoy, PJOYSTATE pjs); 70 | 71 | #endif // JOY_H 72 | ////////////////////////////////////////////////////////////////////////////// 73 | // EOF 74 | ////////////////////////////////////////////////////////////////////////////// 75 | -------------------------------------------------------------------------------- /RSPiX/Src/GREEN/Video/Win95/mssccprj.scc: -------------------------------------------------------------------------------- 1 | SCC = This is a Source Code Control file 2 | 3 | [Video.mak] 4 | SCC_Aux_Path = "\\narnia\archive\vss" 5 | SCC_Project_Name = "$/Projects/Postal/Meister Plus/RSPiX/Src/GREEN/Video/Win95", EPOBAAAA 6 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/CDT/LIST.CPP: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // LIST.CPP 19 | // 20 | // History: 21 | // 06/23/94 JMI Started. 22 | // 23 | // 06/14/95 JMI Converted to a template in attempt to make this class 24 | // more useful. This particular file becomes unnecessary 25 | // at this point. Do not bother including this CPP file 26 | // in your project (the entirity of this template class 27 | // is implemented in the .H file). 28 | // 29 | // 30 | ////////////////////////////////////////////////////////////////////////////// 31 | // 32 | // This module provides dynamic linked list services. 33 | // 34 | ////////////////////////////////////////////////////////////////////////////// 35 | 36 | 37 | ////////////////////////////////////////////////////////////////////////////// 38 | // EOF 39 | ////////////////////////////////////////////////////////////////////////////// 40 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/CDT/advqueue.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | ////////////////////////////////////////////////////////////////////////////// 19 | // 20 | // advqueue.h 21 | // 22 | // History: 23 | // 01/08/96 JMI Started. 24 | // 25 | // 10/30/96 JMI Changed: 26 | // Old label: New label: 27 | // ========= ========= 28 | // CAdvQueue RAdvQueue 29 | // CQueue RQueue 30 | // 31 | ////////////////////////////////////////////////////////////////////////////// 32 | // 33 | // This adds some functionality to the generic queue template in 34 | // orange/cdt/queue.h. 35 | // 36 | ////////////////////////////////////////////////////////////////////////////// 37 | #ifndef ADVQUEUE_H 38 | #define ADVQUEUE_H 39 | 40 | #include "queue.h" 41 | 42 | template class RAdvQueue : public RQueue 43 | { 44 | public: 45 | // Default constructor. 46 | RAdvQueue() { } 47 | // Destructor. 48 | ~RAdvQueue() { } 49 | 50 | public: // Querries. 51 | // Gets the nth element in the queue from the head. 52 | T* Get(short n) 53 | { 54 | n = (n > m_sHead) ? (sSize + (m_sHead - n)) : (m_sHead - n); 55 | return m_aptQ + n; 56 | } 57 | 58 | // Same as Get. Just kind of silly. 59 | T* operator [](short n) 60 | { 61 | return Get(n); 62 | } 63 | 64 | }; 65 | 66 | #endif // ADVQUEUE_H 67 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/CDT/pixel.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | #ifndef PIXEL_H 19 | #define PIXEL_H 20 | 21 | 22 | class CPixel 23 | { 24 | public: 25 | CPixel() 26 | { Init(); } 27 | CPixel(short sBitsPerPixel) 28 | { ASSERT(sBitsPerPixel % 8 == 0); m_sSize = sBitsPerPixel / 8; Init(); } 29 | 30 | void Init(void) 31 | { for (short i = 0; i < sizeof(m_au8); i++) m_au8[i] = 0; } 32 | 33 | U8 GetU8Val(void) 34 | { return m_au8[0]; } 35 | U16 GetU16Val(void) 36 | { return *((U16*)m_au8); } 37 | U32 GetU24Val(void) 38 | { return *((U32*)m_au8); } 39 | U32 GetU32Val(void) 40 | { return *((U32*)m_au8); } 41 | 42 | void SetVal(U8 val) 43 | { memcpy(m_au8, &val, sizeof(val)); } 44 | void SetVal(U16 val) 45 | { memcpy(m_au8, &val, sizeof(val)); } 46 | void SetVal24(U32 val) 47 | { memcpy(m_au8, &val, 3); } 48 | void SetVal(U32 val) 49 | { memcpy(m_au8, &val, sizeof(val)); } 50 | 51 | void SetVal(UCHAR* puc) 52 | { memcpy(m_au8, puc, m_sSize); } 53 | 54 | int operator <(CPixel &pixel) 55 | { return (GetU32Val() < pixel.GetU32Val()); } 56 | 57 | int operator >(CPixel &pixel) 58 | { return (GetU32Val() > pixel.GetU32Val()); } 59 | 60 | int operator ==(CPixel &pixel) 61 | { 62 | if (memcmp(m_au8, pixel.m_au8, MIN(m_sSize, pixel.m_sSize)) == 0) 63 | return TRUE; 64 | else 65 | return FALSE; 66 | } 67 | 68 | public: 69 | U8 m_au8[sizeof(U32)]; 70 | short m_sSize; 71 | }; 72 | 73 | #endif // PIXEL_H 74 | /////////////////////////////////////////////////////////////////////////////// 75 | // EOF 76 | /////////////////////////////////////////////////////////////////////////////// 77 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/CDT/smrtarry.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | #ifndef SMRTDATA_H 19 | #define SMRTDATA_H 20 | 21 | ////////////////////////////////////////////////////////////////////////////// 22 | // Headers. 23 | ////////////////////////////////////////////////////////////////////////////// 24 | #include "bdebug.h" 25 | 26 | ////////////////////////////////////////////////////////////////////////////// 27 | // Macros. 28 | ////////////////////////////////////////////////////////////////////////////// 29 | 30 | #ifdef _DEBUG 31 | //////////////// DEBUG VERSION /////////////////////////////////////////////// 32 | // This sucks b/c it makes a explicitly an array of n as a constant. 33 | #define GETSMART(a, T, n) CSmrtArry a; 34 | #else // ndef _DEBUG 35 | //////////////// RELEASE VERSION ///////////////////////////////////////////// 36 | #define GETSMART(a, T, n) T a[n]; 37 | #endif // def _DEBUG 38 | 39 | ////////////////////////////////////////////////////////////////////////////// 40 | // Typedefs. 41 | ////////////////////////////////////////////////////////////////////////////// 42 | 43 | template class CSmrtArry 44 | { 45 | public: // Construction/Destruction. 46 | 47 | ////////////////////////////////////////////////////////////////////////////// 48 | 49 | public: // Methods. 50 | // Subscript. 51 | T& operator [](long lIndex) 52 | { 53 | ASSERT(lIndex >= 0 && lIndex < lSize); 54 | return m_t[lIndex]; 55 | } 56 | 57 | // Add with index as second operand. 58 | T* operator+(long lIndex) 59 | { 60 | ASSERT(lIndex >= 0 && lIndex < lSize); 61 | return m_t + lIndex; 62 | } 63 | 64 | // Pointer dereference. 65 | T& operator*(void) 66 | { 67 | ASSERT(lSize > 0); 68 | return *m_t; 69 | } 70 | 71 | // Cast. 72 | operator T*(void) 73 | { 74 | return m_t; 75 | } 76 | 77 | ////////////////////////////////////////////////////////////////////////////// 78 | 79 | public: // Querries. 80 | 81 | ////////////////////////////////////////////////////////////////////////////// 82 | 83 | protected: // Internal typedefs. 84 | 85 | ////////////////////////////////////////////////////////////////////////////// 86 | 87 | protected: // Internal functions. 88 | 89 | 90 | ////////////////////////////////////////////////////////////////////////////// 91 | 92 | public: // Member variables. 93 | 94 | protected: // Member variables. 95 | T m_t[lSize]; // This is the actual data. 96 | 97 | }; 98 | 99 | #endif // SMRTDATA_H 100 | ////////////////////////////////////////////////////////////////////////////// 101 | // EOF 102 | ////////////////////////////////////////////////////////////////////////////// 103 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/Channel/channel.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | //////////////////////////////////////////////////////////////////////////////// 19 | // 20 | // channel.cpp 21 | // Project: RSPiX 22 | // 23 | // This module impliments the channel-related classes. 24 | // 25 | // History: 26 | // 02/01/97 MJR Started. 27 | // 28 | // 06/27/97 JMI #if 0'ed out RChannelSet which does not specify the 29 | // template arguments to its base class RChannel. 30 | // 31 | // 07/13/97 MJR Moved RChannelSet stuff out to a separate file that isn't 32 | // even part of RSPiX yet. 33 | // Moved a bunch of stuff from channel.h into here. 34 | // 35 | //////////////////////////////////////////////////////////////////////////////// 36 | 37 | #include "channel.h" 38 | 39 | 40 | // Usefull test code to make sure it will really compile. If templated stuff 41 | // isn't actually instantiated, the compiler will miss many (or all) errors. 42 | RChannel test; 43 | RChannel test2(RChannel_ArrayOfPtrs); 44 | 45 | 46 | //////////////////////////////////////////////////////////////////////////////// 47 | // EOF 48 | //////////////////////////////////////////////////////////////////////////////// 49 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/GameLib/ATTRIB.H: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | //***************************************************************************** 19 | // 20 | // ATTRIB.H 21 | // 22 | //***************************************************************************** 23 | 24 | #ifndef attrib_h 25 | #define attrib_h 26 | 27 | #define ATTRIBUTE_MASK 0xffc0 28 | #define CONTOUR_MASK 0x006f 29 | 30 | typedef struct tag_CONTOUR 31 | { 32 | WORD block[16]; 33 | } CONTOUR; 34 | 35 | typedef struct tag_ATTRIB 36 | { 37 | short s; 38 | } ATTRIB; 39 | 40 | 41 | class CAttribute 42 | { 43 | protected: 44 | 45 | WORD* m_pAttribMap; //Pointer to attribute map 46 | CONTOUR* m_pAttribCont; 47 | short m_sMapWidth; 48 | 49 | public: 50 | CAttribute(); 51 | ~CAttribute(); 52 | 53 | void Reset(); 54 | void FromBlock(); 55 | void ToBlock(); 56 | void PutBlock(); 57 | void GetReward(); 58 | BOOL GetPointAttrib(short sX, short sY, WORD* wAttribute); 59 | short GetPointSurface(short sX, short sY); 60 | 61 | }; 62 | 63 | #endif //attrib_h 64 | 65 | //***************************************************************************** 66 | // EOF 67 | //***************************************************************************** 68 | 69 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/GameLib/GRIP.H: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | //***************************************************************************** 19 | // 20 | // GRIP.H 21 | // 22 | //***************************************************************************** 23 | 24 | #ifndef grip_h 25 | #define grip_h 26 | 27 | #define GRIP_DISPLAY_H 320 28 | #define GRIP_DISPLAY_W 640 29 | 30 | 31 | 32 | #endif //grip_h 33 | 34 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/GameLib/PAL.H: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | //***************************************************************************** 19 | // 20 | // PALETTE.H 21 | // 22 | //***************************************************************************** 23 | 24 | #ifndef _PALETTE_H 25 | #define _PALETTE_H 26 | 27 | // This is just a temporary definition of the PALETTE struct. It may or 28 | // may not look like this. 29 | 30 | #define PALETTE_MAXCOLORS 127 31 | 32 | typedef struct tag_PALETTE 33 | { 34 | // RGBQUAD rgbColors[PALETTE_MAXCOLORS]; 35 | int rgbColors[PALETTE_MAXCOLORS]; 36 | } PALETTE; 37 | 38 | #endif //_PALETTE_H 39 | 40 | //***************************************************************************** 41 | // EOF 42 | //***************************************************************************** 43 | 44 | 45 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/GameLib/SHAPES.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | ////////////////////////////////////////////////////////////////////////////// 19 | // 20 | // shapes.cpp 21 | // 22 | // 23 | // History: 24 | // 12/08/95 BRH Started. 25 | // 12/11/95 BRH Added Ray constructor that takes two points and 26 | // calculates the unit vector for the ray. 27 | // 28 | // 11/04/96 JMI Changed: 29 | // Old label: New label: 30 | // ========= ========= 31 | // C2DRay R2DRay 32 | // C3DRay R3dRay 33 | // 34 | ////////////////////////////////////////////////////////////////////////////// 35 | 36 | #include "Shapes.h" 37 | 38 | ////////////////////////////////////////////////////////////////////////////// 39 | // 40 | // Constructor 41 | // 42 | // Description: 43 | // Takes two points and calculates the unit vector for the ray 44 | // 45 | // Parameters: 46 | // lX1 = x coordinate of originating point 47 | // lY2 = y coordinate of originating point 48 | // lX2 = x coordinate in direction of ray 49 | // lY2 = y coordinate in direction of ray 50 | // 51 | // Returns: 52 | // none 53 | // 54 | ////////////////////////////////////////////////////////////////////////////// 55 | 56 | R2DRay::R2DRay(long lX1, long lY1, long lX2, long lY2) 57 | { 58 | X = lX1; 59 | Y = lY1; 60 | 61 | fXVect = (float) lX2 - lX1; 62 | fYVect = (float) lY2 - lY1; 63 | 64 | if (fXVect > fYVect) 65 | { 66 | fYVect /= fXVect; 67 | fXVect = (float) 1.0; //dx /= dx; 68 | } 69 | else 70 | { 71 | fXVect /= fYVect; 72 | fYVect = (float) 1.0; //dy /= dy; 73 | } 74 | } 75 | 76 | R3DRay::R3DRay(long lX1, long lY1, long lZ1, long lX2, long lY2, long lZ2) 77 | { 78 | X = lX1; 79 | Y = lY1; 80 | Z = lZ1; 81 | 82 | fXVect = (float) lX2 - lX1; 83 | fYVect = (float) lY2 - lY1; 84 | fZVect = (float) lZ2 - lZ1; 85 | 86 | if (fXVect > fYVect && fXVect > fZVect) 87 | { 88 | fYVect /= fXVect; 89 | fZVect /= fXVect; 90 | fXVect = (float) 1.0; // fXVect /= fXVect; 91 | } 92 | else 93 | if (fYVect > fXVect && fYVect > fZVect) 94 | { 95 | fXVect /= fYVect; 96 | fZVect /= fYVect; 97 | fYVect = (float) 1.0; // fYVect /= fYVect; 98 | } 99 | else 100 | { 101 | fXVect /= fZVect; 102 | fYVect /= fZVect; 103 | fZVect = (float) 1.0; // fZVect /= fZVect; 104 | } 105 | } 106 | 107 | ////////////////////////////////////////////////////////////////////////////// 108 | // EOF 109 | ////////////////////////////////////////////////////////////////////////////// 110 | 111 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/MFC_Cntl/MFCool.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | #ifndef MFCOOL_H 19 | #define MFCOOL_H 20 | 21 | /////////////////////////////////////////////////////////////////////////////// 22 | // Includes. 23 | /////////////////////////////////////////////////////////////////////////////// 24 | 25 | /////////////////////////////////////////////////////////////////////////////// 26 | // Macros. 27 | /////////////////////////////////////////////////////////////////////////////// 28 | 29 | /////////////////////////////////////////////////////////////////////////////// 30 | // Typedefs. 31 | /////////////////////////////////////////////////////////////////////////////// 32 | 33 | /////////////////////////////////////////////////////////////////////////////// 34 | // Protos. 35 | /////////////////////////////////////////////////////////////////////////////// 36 | // Associates all icon style buttons that are children of pdlg with the icon 37 | // specified by the window text of that button. 38 | // Returns 0 on success. 39 | extern short Iconize(CDialog* pdlg); 40 | 41 | // Store position of this window in the module's INI. 42 | // Returns 0 on success. 43 | extern short StorePosition(CWnd* pwnd); 44 | 45 | // Restore position of this window from the module's INI. No change if no 46 | // settings stored. 47 | // Returns 0 on success. 48 | extern short RestorePosition(CWnd* pwnd); 49 | 50 | /////////////////////////////////////////////////////////////////////////////// 51 | // EOF 52 | /////////////////////////////////////////////////////////////////////////////// 53 | #endif // MFCOOL_H 54 | -------------------------------------------------------------------------------- /RSPiX/Src/ORANGE/Parse/testBatch.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | #include "simplebatch.h" 19 | 20 | main() 21 | { 22 | RBatch ftest("testBatch.in"); 23 | ftest.configure(" \t,","~"); 24 | 25 | while (ftest.GetLine() != EOF) 26 | { 27 | // Dump info: 28 | TRACE("Line %ld has %hd tokens:\n",ftest.m_lCurrentLine,ftest.m_sNumTokens); 29 | for (short i=0;i 19 | #include "QuickMath.h" 20 | #include "FixedPoint.h" 21 | 22 | RFixedS32 fpSINQ[csNumRotSteps],fpCOSQ[csNumRotSteps]; 23 | 24 | void InitTrigFP() // fixed point 25 | { 26 | short i; 27 | double rad; 28 | 29 | const double cdStepsToRad = 30 | rspPI * 2.0 / double(csNumRotSteps); 31 | 32 | for (i=0;i 19 | #include "QuickMath.h" 20 | #include "FixedPoint.h" 21 | 22 | double SINQ[csNumRotSteps],COSQ[csNumRotSteps]; 23 | float fSINQ[csNumRotSteps],fCOSQ[csNumRotSteps]; 24 | short ATANQ[60]; 25 | short SQRTQ[MAX_FAST_SQRT]; 26 | 27 | short rspATan(short sDeltaY,short sDeltaX) 28 | { 29 | short sDelX,sDelY,sDeg; // absolute versions 30 | 31 | if (sDeltaX < 0) sDelX = -sDeltaX; 32 | else sDelX = sDeltaX; 33 | 34 | if (sDeltaY < 0) sDelY = -sDeltaY; 35 | else sDelY = sDeltaY; 36 | 37 | if (sDelY <= sDelX) 38 | if (sDelX != 0) 39 | sDeg = ATANQ[ 40 | long(0.5 + (rspRadToDeg * sDelY) / sDelX)]; 41 | else 42 | sDeg = 90; 43 | else 44 | if (sDelY) sDeg = 90 - ATANQ[ 45 | long(0.5 + (rspRadToDeg * sDelX) / sDelY)]; 46 | else sDeg = 90; 47 | 48 | // Keep in bounds 49 | if (sDeltaX < 0) sDeg = 180 - sDeg; 50 | if (sDeltaY < 0) sDeg = 360 - sDeg; 51 | if (sDeg == 360) sDeg = 0; 52 | 53 | return sDeg; 54 | } 55 | 56 | short rspATan(double dVal) 57 | { 58 | short sDeg; // absolute versions 59 | double dAbsVal; 60 | 61 | if (dVal < 0) dAbsVal = -dVal; 62 | else dAbsVal = dVal; 63 | 64 | if (dAbsVal <= 1.0) 65 | sDeg = ATANQ[ 66 | long(0.5 + rspRadToDeg * dAbsVal)]; 67 | else 68 | sDeg = 90 - ATANQ[ 69 | long(0.5 + rspRadToDeg / dAbsVal)]; 70 | 71 | // Keep in bounds 72 | if (dVal < 0.0) sDeg = 360 - sDeg; 73 | if (sDeg == 360) sDeg = 0; 74 | 75 | return sDeg; 76 | } 77 | 78 | void InitTrig() 79 | { 80 | short i; 81 | double rad; 82 | 83 | const double cdStepsToRad = 84 | rspPI * 2.0 / double(csNumRotSteps); 85 | 86 | for (i=0;i 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_bits.h 24 | * 25 | * Functions for fiddling with bits and bitmasks. 26 | */ 27 | 28 | #ifndef _SDL_bits_h 29 | #define _SDL_bits_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 | /** 40 | * \file SDL_bits.h 41 | */ 42 | 43 | /** 44 | * Get the index of the most significant bit. Result is undefined when called 45 | * with 0. This operation can also be stated as "count leading zeroes" and 46 | * "log base 2". 47 | * 48 | * \return Index of the most significant bit. 49 | */ 50 | SDL_FORCE_INLINE Sint8 51 | SDL_MostSignificantBitIndex32(Uint32 x) 52 | { 53 | #if defined(__GNUC__) && __GNUC__ >= 4 54 | /* Count Leading Zeroes builtin in GCC. 55 | * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html 56 | */ 57 | return 31 - __builtin_clz(x); 58 | #else 59 | /* Based off of Bit Twiddling Hacks by Sean Eron Anderson 60 | * , released in the public domain. 61 | * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog 62 | */ 63 | const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; 64 | const Uint8 S[] = {1, 2, 4, 8, 16}; 65 | 66 | Uint8 msbIndex = 0; 67 | int i; 68 | 69 | for (i = 4; i >= 0; i--) 70 | { 71 | if (x & b[i]) 72 | { 73 | x >>= S[i]; 74 | msbIndex |= S[i]; 75 | } 76 | } 77 | 78 | return msbIndex; 79 | #endif 80 | } 81 | 82 | /* Ends C function definitions when using C++ */ 83 | #ifdef __cplusplus 84 | } 85 | #endif 86 | #include "close_code.h" 87 | 88 | #endif /* _SDL_bits_h */ 89 | 90 | /* vi: set ts=4 sw=4 expandtab: */ 91 | -------------------------------------------------------------------------------- /SDL2/include/SDL_blendmode.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_blendmode.h 24 | * 25 | * Header file declaring the SDL_BlendMode enumeration 26 | */ 27 | 28 | #ifndef _SDL_blendmode_h 29 | #define _SDL_blendmode_h 30 | 31 | #include "begin_code.h" 32 | /* Set up for C function definitions, even when using C++ */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /** 38 | * \brief The blend mode used in SDL_RenderCopy() and drawing operations. 39 | */ 40 | typedef enum 41 | { 42 | SDL_BLENDMODE_NONE = 0x00000000, /**< no blending 43 | dstRGBA = srcRGBA */ 44 | SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending 45 | dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) 46 | dstA = srcA + (dstA * (1-srcA)) */ 47 | SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending 48 | dstRGB = (srcRGB * srcA) + dstRGB 49 | dstA = dstA */ 50 | SDL_BLENDMODE_MOD = 0x00000004 /**< color modulate 51 | dstRGB = srcRGB * dstRGB 52 | dstA = dstA */ 53 | } SDL_BlendMode; 54 | 55 | /* Ends C function definitions when using C++ */ 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #include "close_code.h" 60 | 61 | #endif /* _SDL_video_h */ 62 | 63 | /* vi: set ts=4 sw=4 expandtab: */ 64 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/include/SDL_config_minimal.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_minimal_h 23 | #define _SDL_config_minimal_h 24 | 25 | #include "SDL_platform.h" 26 | 27 | /** 28 | * \file SDL_config_minimal.h 29 | * 30 | * This is the minimal configuration that can be used to build SDL. 31 | */ 32 | 33 | #define HAVE_STDARG_H 1 34 | #define HAVE_STDDEF_H 1 35 | 36 | /* Most everything except Visual Studio 2008 and earlier has stdint.h now */ 37 | #if defined(_MSC_VER) && (_MSC_VER < 1600) 38 | /* Here are some reasonable defaults */ 39 | typedef unsigned int size_t; 40 | typedef signed char int8_t; 41 | typedef unsigned char uint8_t; 42 | typedef signed short int16_t; 43 | typedef unsigned short uint16_t; 44 | typedef signed int int32_t; 45 | typedef unsigned int uint32_t; 46 | typedef signed long long int64_t; 47 | typedef unsigned long long uint64_t; 48 | typedef unsigned long uintptr_t; 49 | #else 50 | #define HAVE_STDINT_H 1 51 | #endif /* Visual Studio 2008 */ 52 | 53 | #ifdef __GNUC__ 54 | #define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1 55 | #endif 56 | 57 | /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ 58 | #define SDL_AUDIO_DRIVER_DUMMY 1 59 | 60 | /* Enable the stub joystick driver (src/joystick/dummy/\*.c) */ 61 | #define SDL_JOYSTICK_DISABLED 1 62 | 63 | /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ 64 | #define SDL_HAPTIC_DISABLED 1 65 | 66 | /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ 67 | #define SDL_LOADSO_DISABLED 1 68 | 69 | /* Enable the stub thread support (src/thread/generic/\*.c) */ 70 | #define SDL_THREADS_DISABLED 1 71 | 72 | /* Enable the stub timer support (src/timer/dummy/\*.c) */ 73 | #define SDL_TIMERS_DISABLED 1 74 | 75 | /* Enable the dummy video driver (src/video/dummy/\*.c) */ 76 | #define SDL_VIDEO_DRIVER_DUMMY 1 77 | 78 | #endif /* _SDL_config_minimal_h */ 79 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/include/SDL_error.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_error.h 24 | * 25 | * Simple error message routines for SDL. 26 | */ 27 | 28 | #ifndef _SDL_error_h 29 | #define _SDL_error_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 | /* Public functions */ 40 | /* SDL_SetError() unconditionally returns -1. */ 41 | extern DECLSPEC int SDLCALL SDL_SetError(const char *fmt, ...); 42 | extern DECLSPEC const char *SDLCALL SDL_GetError(void); 43 | extern DECLSPEC void SDLCALL SDL_ClearError(void); 44 | 45 | /** 46 | * \name Internal error functions 47 | * 48 | * \internal 49 | * Private error reporting function - used internally. 50 | */ 51 | /*@{*/ 52 | #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) 53 | #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) 54 | #define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) 55 | typedef enum 56 | { 57 | SDL_ENOMEM, 58 | SDL_EFREAD, 59 | SDL_EFWRITE, 60 | SDL_EFSEEK, 61 | SDL_UNSUPPORTED, 62 | SDL_LASTERROR 63 | } SDL_errorcode; 64 | /* SDL_Error() unconditionally returns -1. */ 65 | extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code); 66 | /*@}*//*Internal error functions*/ 67 | 68 | /* Ends C function definitions when using C++ */ 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | #include "close_code.h" 73 | 74 | #endif /* _SDL_error_h */ 75 | 76 | /* vi: set ts=4 sw=4 expandtab: */ 77 | -------------------------------------------------------------------------------- /SDL2/include/SDL_gesture.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_gesture.h 24 | * 25 | * Include file for SDL gesture event handling. 26 | */ 27 | 28 | #ifndef _SDL_gesture_h 29 | #define _SDL_gesture_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "SDL_touch.h" 36 | 37 | 38 | #include "begin_code.h" 39 | /* Set up for C function definitions, even when using C++ */ 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef Sint64 SDL_GestureID; 45 | 46 | /* Function prototypes */ 47 | 48 | /** 49 | * \brief Begin Recording a gesture on the specified touch, or all touches (-1) 50 | * 51 | * 52 | */ 53 | extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); 54 | 55 | 56 | /** 57 | * \brief Save all currently loaded Dollar Gesture templates 58 | * 59 | * 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *src); 62 | 63 | /** 64 | * \brief Save a currently loaded Dollar Gesture template 65 | * 66 | * 67 | */ 68 | extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *src); 69 | 70 | 71 | /** 72 | * \brief Load Dollar Gesture templates from a file 73 | * 74 | * 75 | */ 76 | extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src); 77 | 78 | 79 | /* Ends C function definitions when using C++ */ 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #include "close_code.h" 84 | 85 | #endif /* _SDL_gesture_h */ 86 | 87 | /* vi: set ts=4 sw=4 expandtab: */ 88 | -------------------------------------------------------------------------------- /SDL2/include/SDL_loadso.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_loadso.h 24 | * 25 | * System dependent library loading routines 26 | * 27 | * Some things to keep in mind: 28 | * \li These functions only work on C function names. Other languages may 29 | * have name mangling and intrinsic language support that varies from 30 | * compiler to compiler. 31 | * \li Make sure you declare your function pointers with the same calling 32 | * convention as the actual library function. Your code will crash 33 | * mysteriously if you do not do this. 34 | * \li Avoid namespace collisions. If you load a symbol from the library, 35 | * it is not defined whether or not it goes into the global symbol 36 | * namespace for the application. If it does and it conflicts with 37 | * symbols in your code or other shared libraries, you will not get 38 | * the results you expect. :) 39 | */ 40 | 41 | #ifndef _SDL_loadso_h 42 | #define _SDL_loadso_h 43 | 44 | #include "SDL_stdinc.h" 45 | #include "SDL_error.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /** 54 | * This function dynamically loads a shared object and returns a pointer 55 | * to the object handle (or NULL if there was an error). 56 | * The 'sofile' parameter is a system dependent name of the object file. 57 | */ 58 | extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile); 59 | 60 | /** 61 | * Given an object handle, this function looks up the address of the 62 | * named function in the shared object and returns it. This address 63 | * is no longer valid after calling SDL_UnloadObject(). 64 | */ 65 | extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, 66 | const char *name); 67 | 68 | /** 69 | * Unload a shared object from memory. 70 | */ 71 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 72 | 73 | /* Ends C function definitions when using C++ */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | #include "close_code.h" 78 | 79 | #endif /* _SDL_loadso_h */ 80 | 81 | /* vi: set ts=4 sw=4 expandtab: */ 82 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/include/SDL_power.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_power_h 23 | #define _SDL_power_h 24 | 25 | /** 26 | * \file SDL_power.h 27 | * 28 | * Header for the SDL power management routines. 29 | */ 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 | /** 40 | * \brief The basic state for the system's power supply. 41 | */ 42 | typedef enum 43 | { 44 | SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ 45 | SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ 46 | SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ 47 | SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ 48 | SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ 49 | } SDL_PowerState; 50 | 51 | 52 | /** 53 | * \brief Get the current power supply details. 54 | * 55 | * \param secs Seconds of battery life left. You can pass a NULL here if 56 | * you don't care. Will return -1 if we can't determine a 57 | * value, or we're not running on a battery. 58 | * 59 | * \param pct Percentage of battery life left, between 0 and 100. You can 60 | * pass a NULL here if you don't care. Will return -1 if we 61 | * can't determine a value, or we're not running on a battery. 62 | * 63 | * \return The state of the battery (if any). 64 | */ 65 | extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); 66 | 67 | /* Ends C function definitions when using C++ */ 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | #include "close_code.h" 72 | 73 | #endif /* _SDL_power_h */ 74 | 75 | /* vi: set ts=4 sw=4 expandtab: */ 76 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/include/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-0:aaaaaaaaaaah" 2 | #define SDL_REVISION_NUMBER 0 3 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/include/SDL_test_assert.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_assert.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 | * Assert API for test code and test cases 33 | * 34 | */ 35 | 36 | #ifndef _SDL_test_assert_h 37 | #define _SDL_test_assert_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 Fails the assert. 47 | */ 48 | #define ASSERT_FAIL 0 49 | 50 | /** 51 | * \brief Passes the assert. 52 | */ 53 | #define ASSERT_PASS 1 54 | 55 | /** 56 | * \brief Assert that logs and break execution flow on failures. 57 | * 58 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 59 | * \param assertDescription Message to log with the assert describing it. 60 | */ 61 | void SDLTest_Assert(int assertCondition, const char *assertDescription, ...); 62 | 63 | /** 64 | * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters. 65 | * 66 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 67 | * \param assertDescription Message to log with the assert describing it. 68 | * 69 | * \returns Returns the assertCondition so it can be used to externally to break execution flow if desired. 70 | */ 71 | int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...); 72 | 73 | /** 74 | * \brief Explicitely pass without checking an assertion condition. Updates assertion counter. 75 | * 76 | * \param assertDescription Message to log with the assert describing it. 77 | */ 78 | void SDLTest_AssertPass(const char *assertDescription, ...); 79 | 80 | /** 81 | * \brief Resets the assert summary counters to zero. 82 | */ 83 | void SDLTest_ResetAssertSummary(); 84 | 85 | /** 86 | * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. 87 | */ 88 | void SDLTest_LogAssertSummary(); 89 | 90 | 91 | /** 92 | * \brief Converts the current assert summary state to a test result. 93 | * 94 | * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT 95 | */ 96 | int SDLTest_AssertSummaryToTestResult(); 97 | 98 | #ifdef __cplusplus 99 | } 100 | #endif 101 | #include "close_code.h" 102 | 103 | #endif /* _SDL_test_assert_h */ 104 | 105 | /* vi: set ts=4 sw=4 expandtab: */ 106 | -------------------------------------------------------------------------------- /SDL2/include/SDL_test_compare.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_compare.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 | Defines comparison functions (i.e. for surfaces). 33 | 34 | */ 35 | 36 | #ifndef _SDL_test_compare_h 37 | #define _SDL_test_compare_h 38 | 39 | #include "SDL.h" 40 | 41 | #include "SDL_test_images.h" 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /** 50 | * \brief Compares a surface and with reference image data for equality 51 | * 52 | * \param surface Surface used in comparison 53 | * \param referenceSurface Test Surface used in comparison 54 | * \param allowable_error Allowable difference (squared) in blending accuracy. 55 | * 56 | * \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. 57 | */ 58 | int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); 59 | 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* _SDL_test_compare_h */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/include/SDL_test_images.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_images.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 | Defines some images for tests. 33 | 34 | */ 35 | 36 | #ifndef _SDL_test_images_h 37 | #define _SDL_test_images_h 38 | 39 | #include "SDL.h" 40 | 41 | #include "begin_code.h" 42 | /* Set up for C function definitions, even when using C++ */ 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /** 48 | *Type for test images. 49 | */ 50 | typedef struct SDLTest_SurfaceImage_s { 51 | int width; 52 | int height; 53 | unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ 54 | const char *pixel_data; 55 | } SDLTest_SurfaceImage_t; 56 | 57 | /* Test images */ 58 | SDL_Surface *SDLTest_ImageBlit(); 59 | SDL_Surface *SDLTest_ImageBlitColor(); 60 | SDL_Surface *SDLTest_ImageBlitAlpha(); 61 | SDL_Surface *SDLTest_ImageBlitBlendAdd(); 62 | SDL_Surface *SDLTest_ImageBlitBlend(); 63 | SDL_Surface *SDLTest_ImageBlitBlendMod(); 64 | SDL_Surface *SDLTest_ImageBlitBlendNone(); 65 | SDL_Surface *SDLTest_ImageBlitBlendAll(); 66 | SDL_Surface *SDLTest_ImageFace(); 67 | SDL_Surface *SDLTest_ImagePrimitives(); 68 | SDL_Surface *SDLTest_ImagePrimitivesBlend(); 69 | 70 | /* Ends C function definitions when using C++ */ 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | #include "close_code.h" 75 | 76 | #endif /* _SDL_test_images_h */ 77 | 78 | /* vi: set ts=4 sw=4 expandtab: */ 79 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/include/SDL_touch.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_touch.h 24 | * 25 | * Include file for SDL touch event handling. 26 | */ 27 | 28 | #ifndef _SDL_touch_h 29 | #define _SDL_touch_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "begin_code.h" 36 | /* Set up for C function definitions, even when using C++ */ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | typedef Sint64 SDL_TouchID; 42 | typedef Sint64 SDL_FingerID; 43 | 44 | typedef struct SDL_Finger 45 | { 46 | SDL_FingerID id; 47 | float x; 48 | float y; 49 | float pressure; 50 | } SDL_Finger; 51 | 52 | /* Used as the device ID for mouse events simulated with touch input */ 53 | #define SDL_TOUCH_MOUSEID ((Uint32)-1) 54 | 55 | 56 | /* Function prototypes */ 57 | 58 | /** 59 | * \brief Get the number of registered touch devices. 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); 62 | 63 | /** 64 | * \brief Get the touch ID with the given index, or 0 if the index is invalid. 65 | */ 66 | extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); 67 | 68 | /** 69 | * \brief Get the number of active fingers for a given touch device. 70 | */ 71 | extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); 72 | 73 | /** 74 | * \brief Get the finger object of the given touch, with the given index. 75 | */ 76 | extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); 77 | 78 | /* Ends C function definitions when using C++ */ 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #include "close_code.h" 83 | 84 | #endif /* _SDL_touch_h */ 85 | 86 | /* vi: set ts=4 sw=4 expandtab: */ 87 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/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 | -------------------------------------------------------------------------------- /SDL2/libs/linux-x86/libSDL2-2.0.so.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/SDL2/libs/linux-x86/libSDL2-2.0.so.0 -------------------------------------------------------------------------------- /SDL2/libs/macosx/libSDL2-2.0.0.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/SDL2/libs/macosx/libSDL2-2.0.0.dylib -------------------------------------------------------------------------------- /SDL2/libs/win32/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/SDL2/libs/win32/SDL2.dll -------------------------------------------------------------------------------- /SDL2/libs/win32/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/SDL2/libs/win32/SDL2.lib -------------------------------------------------------------------------------- /SDL2/libs/win32/SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/SDL2/libs/win32/SDL2main.lib -------------------------------------------------------------------------------- /TriggerRegions.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // region.h 19 | // Project: Postal 20 | // 21 | // This module impliments the CSmashatorium, which handles things smashing 22 | // together (also known as collision detection). 23 | // 24 | // History: 25 | // 02/18/97 MJR Started. 26 | // 27 | //////////////////////////////////////////////////////////////////////////////// 28 | #ifndef TRIGGER_REGIONS_H 29 | #define TRIGGER_REGIONS_H 30 | 31 | #include "RSPiX.h" 32 | #include "TriggerRgn.h" 33 | #ifdef PATHS_IN_INCLUDES 34 | #include "ORANGE/MultiGrid/MultiGridIndirect.h" 35 | #else 36 | #include "multigridindirect.h" 37 | #endif 38 | #include "realm.h" 39 | 40 | // See the cpp file for usage details... 41 | 42 | extern RMultiGridIndirect* CreateRegionMap(short sWidth,short sHeight,short sMaxPlanes, 43 | short sTileW,short sTileH); 44 | 45 | extern short StrafeAddRegion(RMultiGridIndirect* pMGI,TriggerRgn regions[256]); 46 | 47 | extern short CompressMap(RMultiGridIndirect* pMGI,short sTileW,short sTileH); 48 | 49 | // Have main guys alert pylons to their presence. 50 | extern void SpewTriggers(CRealm* pRealm, USHORT usDudeUID,short sX,short sZ); 51 | 52 | 53 | //////////////////////////////////////////////////////////////////////////////// 54 | // EOF 55 | //////////////////////////////////////////////////////////////////////////////// 56 | #endif 57 | -------------------------------------------------------------------------------- /WishPiX.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {40e0e79e-b586-45c2-8695-56a69340eb8d} 6 | cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 7 | 8 | 9 | {ac0c5d47-88bd-496e-b389-8b6903959ded} 10 | h;hpp;hxx;hm;inl;fi;fd 11 | 12 | 13 | {fb97a68f-8eb1-440c-af0f-b90e4bdbf941} 14 | ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | -------------------------------------------------------------------------------- /WishPiX/Prefs/prefline.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // prefline.h 19 | // 20 | // 12/11/96 JPW RPrefsLine created to contain ini file lines, information 21 | // on the type of lines, and to help in processing of lines. 22 | // 12/16/96 JPW Fixed so it will work with the STL stuff that comes with 23 | // MSVC 4.1 or newer. Also fixed a few psz parameters that 24 | // should have been const's. 25 | // 26 | // 03/28/97 JMI Fixed so this'll work with MSVC 4.2. 27 | // 28 | // 05/17/97 JMI Fixed so this'll work with MSVC 5.0 (removed rhetorical 29 | // RPrefsLine:: namespace name. 30 | // 31 | // 06/29/97 MJR Replaced STL vector with an RSP list. STL is an evil 32 | // entity that should be banished from the face of the earth. 33 | // Whoever suggested we use it should be shot. (Good thing 34 | // I'm the president -- it's against the rules to shoot me.) 35 | // 36 | //////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef PREFLINE_H 39 | #define PREFLINE_H 40 | 41 | #include "Blue.h" 42 | #ifdef PATHS_IN_INCLUDES 43 | #include "ORANGE/CDT/flist.h" 44 | #else 45 | #include "flist.h" 46 | #endif 47 | 48 | class RPrefsLine; 49 | 50 | typedef RFList RPrefsLineList; 51 | 52 | 53 | class RPrefsLine 54 | { 55 | public: 56 | typedef enum ePrefsLineType 57 | { 58 | Comment, 59 | Section, 60 | Variable 61 | }; 62 | 63 | private: 64 | ePrefsLineType m_Type; // Type of line read from ini file 65 | char *m_pszLine; // Line read from ini file 66 | 67 | public: 68 | // Constructor. 69 | RPrefsLine (ePrefsLineType Type, const char *pszLine); 70 | 71 | // Destructor 72 | ~RPrefsLine (); 73 | 74 | // Get a constant pointer to the Line of text. 75 | const char* GetLine (void); 76 | 77 | // Get type of line. 78 | RPrefsLine::ePrefsLineType GetType(); 79 | 80 | // Get the section name 81 | short GetSectionName(char *pszSection); 82 | 83 | // Get the variable name 84 | short GetVariableName(char *pszVariable); 85 | 86 | // Get the value of the variable 87 | short GetVariableValue(char *pszValue); 88 | 89 | // Set the value of the variable 90 | short SetVariableValue(const char *pszValue); 91 | }; 92 | 93 | 94 | #endif//PREFLINE_H -------------------------------------------------------------------------------- /WishPiX/Spry/spry.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // spry.h 19 | // 20 | //////////////////////////////////////////////////////////////////////////////// 21 | #ifndef SPRY_H 22 | #define SPRY_H 23 | 24 | #include "System.h" 25 | #ifdef PATHS_IN_INCLUDES 26 | #include "ORANGE/CDT/flist.h" 27 | #include "ORANGE/GameLib/SPRITE.H" 28 | #else 29 | #include "flist.h" 30 | #include "sprite.h" 31 | #endif 32 | 33 | 34 | class RSpry 35 | { 36 | //--------------------------------------------------------------------------- 37 | // Types, enums, etc. 38 | //--------------------------------------------------------------------------- 39 | 40 | // This is accessed externally in hood.cpp. --ryan. 41 | //private: 42 | public: 43 | // Typedef for list of RSprite's 44 | typedef RFList ListOfSprites; 45 | 46 | // Miscellaneous enums 47 | enum 48 | { 49 | FileID = 0x59525053, 50 | FileVersion = 1 51 | }; 52 | 53 | //--------------------------------------------------------------------------- 54 | // Member variables 55 | //--------------------------------------------------------------------------- 56 | public: 57 | ListOfSprites m_listSprites; 58 | 59 | //--------------------------------------------------------------------------- 60 | // Member functions 61 | //--------------------------------------------------------------------------- 62 | public: 63 | // Default (and only) constructor 64 | RSpry(); 65 | 66 | // Destructor 67 | ~RSpry(); 68 | 69 | // Clear 70 | short Clear(void); 71 | 72 | // Load from specified file 73 | short Load( 74 | char* pszFile); 75 | 76 | // Load from already-open file 77 | short Load( 78 | RFile* pFile); 79 | 80 | // Save to specified file 81 | short Save( 82 | char* pszFile); 83 | 84 | // Save to already-open file 85 | short Save( 86 | RFile* pFile); 87 | 88 | // Convert to specified RImage type 89 | short Convert( 90 | RImage::Type type); 91 | }; 92 | 93 | 94 | #endif //SPRY_H 95 | //////////////////////////////////////////////////////////////////////////////// 96 | // EOF 97 | //////////////////////////////////////////////////////////////////////////////// 98 | -------------------------------------------------------------------------------- /alphablitforpostal.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // alphaBLiTforPostal.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | // This module deals with the high-level aspects alpha blitting or something. 22 | // 23 | // History: 24 | // 01/??/97 JRD Started. 25 | // 26 | // 02/13/97 JMI Now g_alphaBlit takes parms for the alphable mask image 27 | // and the MultiAlpha table. 28 | // 29 | //////////////////////////////////////////////////////////////////////////////// 30 | 31 | #ifndef ALPHA_BLIT_FOR_POSTAL_H 32 | #define ALPHA_BLIT_FOR_POSTAL_H 33 | //================================= 34 | 35 | // This draws source to destination with clipping only if NEITHER are zero! 36 | extern void rspMaskBlit(RImage* pimSrc,RImage* pimDst,short sDstX,short sDstY); 37 | 38 | // Takes a BMP8 and converts it to a mask of 0 and ucVal 39 | extern void rspCopyAsMask(RImage* pimSrc,RImage* pimDst,UCHAR ucVal); 40 | 41 | extern void g_alphaBlit( 42 | RImage* pimSrc, // Source image. (wall) 43 | RImage* pimDst, // Destination image. 44 | RImage* pimMask, // Mask of alphable area. 45 | RMultiAlpha* pma, // Table of alphas or something. 46 | short sAlphaX, // Source coordinate in pimSrc to put alphamask. 47 | short sAlphaY, // Source coordinate in pimSrc to put alphamask. 48 | short sDstX, // Destination coordinate in pimDst for pimSrc(0,0). 49 | short sDstY, // Destination coordinate in pimDst for pimSrc(0,0). 50 | RRect &rDstClip); // Rectangle to clip Dst to. 51 | 52 | 53 | 54 | 55 | //================================= 56 | #endif 57 | -------------------------------------------------------------------------------- /crawler.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // crawler.cpp 19 | // Project: Crawler Test 20 | // 21 | // History: 22 | // 04/19/97 MJR Started. 23 | // 24 | //////////////////////////////////////////////////////////////////////////////// 25 | 26 | #include "RSPiX.h" 27 | #include "crawler.h" 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /credits.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // credits.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | // History: 22 | // 12/04/96 MJR Started. 23 | // 24 | // 08/11/97 JRD Transforming this module into a device for scolling text 25 | // which is intended to be used both by credits and by story. 26 | // It wil operate similar to cutscene in that all of it's 27 | // assets and memory usage is assumed temporary. It will still 28 | // use the shell sak for assets. 29 | // 30 | //////////////////////////////////////////////////////////////////////////////// 31 | #ifndef CREDITS_H 32 | #define CREDITS_H 33 | #include "SampleMaster.h" 34 | 35 | 36 | // Display the credits, returns SUCCESS or FAILURE 37 | extern short Credits(SampleMasterID* pMusic = NULL, 38 | char* pszBackground = NULL, 39 | char* pszCredits = NULL); 40 | 41 | // For general usage 42 | extern short ScrollPage(char* pszBackground,char* pszScrollScript, 43 | double dScrollRate = 0.0,RRect *prWindow = NULL); 44 | 45 | 46 | 47 | 48 | #endif //CREDITS_H 49 | //////////////////////////////////////////////////////////////////////////////// 50 | // EOF 51 | //////////////////////////////////////////////////////////////////////////////// 52 | -------------------------------------------------------------------------------- /encrypt.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // This is the header file for Encrypt.cpp 19 | ////////////////////////////////////////////////////////////////////////////////////// 20 | #ifndef _ENCRYPT_H 21 | #define _ENCRYPT_H 22 | 23 | short Encrypt(char* szInputString,char* szOutputString,short sSourceLength); 24 | short Decrypt(char* szInputString,char* szOutputString,short sSourceLength); 25 | short Encrypt(char* szFileName,char* szIntputString); 26 | short Decrypt(char* szFileName,char* szOutputString); 27 | 28 | #endif 29 | ////////////////////////////////////////////////////////////////////////////////////// 30 | // EOF 31 | ////////////////////////////////////////////////////////////////////////////////////// 32 | -------------------------------------------------------------------------------- /grip.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // grip.cpp 19 | // Project: Nostril (aka Postal) 20 | // 21 | // This module impliments the CGrip class 22 | // 23 | // History: 24 | // 01/09/97 MJR Started. 25 | // 01/28/97 MJR Actually started filling in some usefull code. 26 | // 27 | //////////////////////////////////////////////////////////////////////////////// 28 | #define GRIP_CPP 29 | 30 | #include "RSPiX.h" 31 | #include "grip.h" 32 | 33 | 34 | //////////////////////////////////////////////////////////////////////////////// 35 | // Macros/types/etc. 36 | //////////////////////////////////////////////////////////////////////////////// 37 | 38 | 39 | //////////////////////////////////////////////////////////////////////////////// 40 | // Default (and only) constructor 41 | //////////////////////////////////////////////////////////////////////////////// 42 | CGrip::CGrip() 43 | { 44 | // Clear for testing/debugging 45 | m_pCamera = 0; 46 | } 47 | 48 | 49 | //////////////////////////////////////////////////////////////////////////////// 50 | // Destructor 51 | //////////////////////////////////////////////////////////////////////////////// 52 | CGrip::~CGrip() 53 | { 54 | } 55 | 56 | 57 | //////////////////////////////////////////////////////////////////////////////// 58 | // Set camera to control 59 | //////////////////////////////////////////////////////////////////////////////// 60 | void CGrip::SetCamera( 61 | CCamera* pCamera) // In: Camera to control 62 | { 63 | m_pCamera = pCamera; 64 | } 65 | 66 | 67 | //////////////////////////////////////////////////////////////////////////////// 68 | // Track specified target coordinates 69 | //////////////////////////////////////////////////////////////////////////////// 70 | //void CGrip::TrackTarget( 71 | // short sTargetX, // In: Target's x coord 72 | // short sTargetY) // In: Target's y coord 73 | // { 74 | // // For now, simply move camera to specified coordinates 75 | // ASSERT(m_pCamera != 0); 76 | // m_pCamera->SetViewPos(sTargetX, sTargetY); 77 | // } 78 | 79 | 80 | //////////////////////////////////////////////////////////////////////////////// 81 | // EOF 82 | //////////////////////////////////////////////////////////////////////////////// 83 | -------------------------------------------------------------------------------- /keys.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // keys.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | // History: 22 | // 03/31/97 JMI Started. 23 | // 24 | // 07/06/97 JMI Changed pu8ScanKey parm in KeyDescriptionToValue 25 | // call from a U8 to a short. 26 | // Also, changed g_apszButtonDescriptions to 27 | // g_apszMouseButtonDescriptions. 28 | // 29 | // 10/10/97 JMI Added g_apszJoyButtonDescriptions and 30 | // JoyButtonDescriptionToMask(). 31 | // 32 | //////////////////////////////////////////////////////////////////////////////// 33 | // 34 | // Key stuff. I'm not sure if this will ever amount to more than just the 35 | // descriptions. 36 | // 37 | //////////////////////////////////////////////////////////////////////////////// 38 | #ifndef KEYS_H 39 | #define KEYS_H 40 | 41 | // Array of key descriptors. 42 | extern char* g_apszKeyDescriptions[128]; 43 | 44 | // Array of button descriptors. 45 | extern char* g_apszMouseButtonDescriptions[8]; 46 | 47 | // Array of joy button descriptors. 48 | extern char* g_apszJoyButtonDescriptions[18]; 49 | 50 | // Given a string, returns the appropriate key code. 51 | extern short KeyDescriptionToValue( // Returns 0 on success. Returns non-zero, if 52 | // key not found. 53 | char* pszKeyDescriptor, // In: Description of key. 54 | U32* psScanKey); // Out: Key value. 55 | 56 | // Given a string, returns the appropriate button mask. 57 | extern short MouseButtonDescriptionToMask( // Returns 0 on success. Returns 58 | // non-zero, if description not 59 | // found. 60 | char* pszButtonDescriptor, // In: Description of button. 61 | U32* psButtonMask); // Out: Button mask. 62 | 63 | extern short JoyButtonDescriptionToMask( // Returns 0 on success. Returns 64 | // non-zero, if description not found. 65 | char* pszButtonDescriptor, // In: Description of button. 66 | U32* psButtonMask); // Out: Button mask. 67 | 68 | #endif // KEYS_H 69 | //////////////////////////////////////////////////////////////////////////////// 70 | // EOF 71 | //////////////////////////////////////////////////////////////////////////////// 72 | -------------------------------------------------------------------------------- /logtab.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // logtab.cpp 19 | // Project: Nostril (aka Postal) 20 | // 21 | // History: 22 | // 05/17/97 MJR Started. 23 | // 24 | //////////////////////////////////////////////////////////////////////////////// 25 | 26 | #include "RSPiX.h" 27 | #include "logtab.h" 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////// 31 | // EOF 32 | //////////////////////////////////////////////////////////////////////////////// 33 | -------------------------------------------------------------------------------- /main.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // main.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | // History: 22 | // 11/19/96 MJR Started. 23 | // 24 | // 01/31/97 BRH Changed MAIN_AUDIO_BUFTIME from 1000 to 100 to decrease 25 | // the sound effect latency. I tried 75 but the sound started 26 | // to break up. 27 | // 28 | // 02/21/97 JMI Changed MAIN_AUDIO_BUFTIME from 100 to 300 to decrease the 29 | // likelihood of audio drop-outs. 30 | // 31 | // 02/21/97 JMI Changed MAIN_AUDIO_BUFTIME back to 100 now that we have new 32 | // SB driver for NT. 33 | // 34 | // 02/21/97 JMI Changed MAIN_AUDIO_RATE to 11025 and MAIN_AUDIO_BITS to 16. 35 | // 36 | // 07/13/97 JMI Added MAIN_VANILLA_AUDIO_* macro overrides to MAIN_AUDIO_* 37 | // defaults. These should be used when the INI or default 38 | // audio mode fails. 39 | // 40 | //////////////////////////////////////////////////////////////////////////////// 41 | #ifndef MAIN_H 42 | #define MAIN_H 43 | 44 | extern int wideScreenWidth; 45 | 46 | #define MAIN_SCREEN_DEPTH 8 47 | #define MAIN_SCREEN_MIN_WIDTH 640 48 | #define MAIN_SCREEN_MIN_HEIGHT 480 49 | #define MAIN_SCREEN_PAGES 1 50 | #define MAIN_SCREEN_SCALING 0 51 | 52 | #define MAIN_WINDOW_WIDTH wideScreenWidth 53 | #define MAIN_WINDOW_HEIGHT 480 54 | 55 | // This is our default mode. 56 | #define MAIN_AUDIO_RATE 11025 57 | #define MAIN_AUDIO_BITS 16 58 | #define MAIN_AUDIO_CHANNELS 1 59 | #define MAIN_AUDIO_BUFTIME 100 60 | #define MAIN_AUDIO_MAXBUFTIME 2000 61 | 62 | // This is our vanilla mode which contains just a couple 63 | // overrides to the default mode. These should be used when the INI 64 | // or default audio specs fail. 65 | #define MAIN_VANILLA_AUDIO_RATE 22050 66 | #define MAIN_VANILLA_AUDIO_BITS 8 67 | 68 | #endif // MAIN_H 69 | //////////////////////////////////////////////////////////////////////////////// 70 | // EOF 71 | //////////////////////////////////////////////////////////////////////////////// 72 | -------------------------------------------------------------------------------- /net.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // net.cpp 19 | // Project: Nostril (aka Postal) 20 | // 21 | // History: 22 | // 08/18/97 MJR Created this to hold some generic stuff. 23 | // 24 | // 08/27/97 MJR Shortened text so it would fit in the text field. 25 | // 26 | //////////////////////////////////////////////////////////////////////////////// 27 | 28 | #include "RSPiX.h" 29 | #include "net.h" 30 | 31 | #ifdef WIN32 32 | #define NETNAMESPACE 33 | #else 34 | #define NETNAMESPACE Net:: 35 | #endif 36 | 37 | // Lookup tables associated with the CNetLimits::NetBandwidth enums. 38 | #ifdef WIN32 39 | namespace Net 40 | { 41 | #endif 42 | 43 | long NETNAMESPACE lBandwidthValues[Net::NumBandwidths] = 44 | { 45 | 1400, // Analog14_4 46 | 2400, // Analog28_8 47 | 2400, // Analog33_6 48 | 2400, // Analog57_6 49 | 5600, // ISDN1Channel 50 | 11200, // ISDN2Channel 51 | 800000, // LAN10Mb 52 | 1000000 // LAN100Mb 53 | }; 54 | 55 | char* NETNAMESPACE BandwidthText[Net::NumBandwidths] = 56 | { 57 | "14.4 Modem", // Analog14_4 58 | "28.8 Modem", // Analog28_8 59 | "33.6 Modem", // Analog33_6 60 | "57.6 Modem", // Analog57_6 61 | "ISDN, 1 Channel", // ISDN1Channel 62 | "ISDN, 2 Channels", // ISDN2Channel 63 | "10Mb LAN (or T1)", // LAN10Mb 64 | "100Mb LAN (or T3)" // LAN100Mb 65 | }; 66 | 67 | #ifdef WIN32 68 | } 69 | #endif 70 | 71 | 72 | //////////////////////////////////////////////////////////////////////////////// 73 | // EOF 74 | //////////////////////////////////////////////////////////////////////////////// 75 | -------------------------------------------------------------------------------- /organ.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // Organ.h 19 | // 20 | // History: 21 | // 08/17/97 JMI Started this header. 22 | // 23 | ////////////////////////////////////////////////////////////////////////////// 24 | // 25 | // Allows a player to play with his organ 26 | // 27 | ////////////////////////////////////////////////////////////////////////////// 28 | 29 | // Relying on paths working on Mac. 30 | #include "WishPiX/Menu/menu.h" 31 | 32 | // Choice callback from menu. 33 | extern bool Organ_MenuChoice( // Returns true to accept choice, false to deny. 34 | Menu* pmenuCurrent, // Current menu. 35 | short sMenuItem); // Item chosen. 36 | 37 | ////////////////////////////////////////////////////////////////////////////// 38 | // EOF 39 | ////////////////////////////////////////////////////////////////////////////// 40 | -------------------------------------------------------------------------------- /res/Japan Add On.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/Japan Add On.ico -------------------------------------------------------------------------------- /res/Postal Plus.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/Postal Plus.ico -------------------------------------------------------------------------------- /res/Postal.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Developer Studio generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | //#include "afxres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // English (U.S.) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 19 | #ifdef _WIN32 20 | //LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | #pragma code_page(1252) 22 | #endif //_WIN32 23 | 24 | #ifdef APSTUDIO_INVOKED 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // 27 | // TEXTINCLUDE 28 | // 29 | 30 | 1 TEXTINCLUDE DISCARDABLE 31 | BEGIN 32 | "resource.h\0" 33 | END 34 | 35 | 2 TEXTINCLUDE DISCARDABLE 36 | BEGIN 37 | "#include ""afxres.h""\r\n" 38 | "\0" 39 | END 40 | 41 | 3 TEXTINCLUDE DISCARDABLE 42 | BEGIN 43 | "\r\n" 44 | "\0" 45 | END 46 | 47 | #endif // APSTUDIO_INVOKED 48 | 49 | 50 | ///////////////////////////////////////////////////////////////////////////// 51 | // 52 | // Icon 53 | // 54 | 55 | // Icon with lowest ID value placed first to ensure application icon 56 | // remains consistent on all systems. 57 | #if defined(APSTUDIO_INVOKED) || defined(JAPAN_ADD_ON) 58 | #if defined(APSTUDIO_INVOKED) 59 | IDI_ICON3$(JAPAN_ADD_ON) ICON DISCARDABLE "Japan Add On.ico" 60 | #else 61 | IDI_ICON3 ICON DISCARDABLE "Japan Add On.ico" 62 | #endif 63 | #endif 64 | #if defined(APSTUDIO_INVOKED) || defined(SUPER_POSTAL) 65 | #if defined(APSTUDIO_INVOKED) 66 | IDI_ICON1$(SUPER_POSTAL) ICON DISCARDABLE "Super Postal.ico" 67 | #else 68 | IDI_ICON1 ICON DISCARDABLE "Super Postal.ico" 69 | #endif 70 | #endif 71 | #if defined(APSTUDIO_INVOKED) || defined(POSTAL_PLUS) 72 | #if defined(APSTUDIO_INVOKED) 73 | IDI_ICON2$(POSTAL_PLUS) ICON DISCARDABLE /*"Postal Plus.ico"*/ "guy.ico" 74 | #else 75 | IDI_ICON2 ICON DISCARDABLE /*"Postal Plus.ico"*/ "guy.ico" 76 | #endif 77 | #endif 78 | 79 | ///////////////////////////////////////////////////////////////////////////// 80 | // 81 | // Cursor 82 | // 83 | 84 | IDC_CURSOR1 CURSOR DISCARDABLE "cursor1.cur" 85 | #endif // English (U.S.) resources 86 | ///////////////////////////////////////////////////////////////////////////// 87 | 88 | 89 | 90 | #ifndef APSTUDIO_INVOKED 91 | ///////////////////////////////////////////////////////////////////////////// 92 | // 93 | // Generated from the TEXTINCLUDE 3 resource. 94 | // 95 | 96 | 97 | ///////////////////////////////////////////////////////////////////////////// 98 | #endif // not APSTUDIO_INVOKED 99 | 100 | -------------------------------------------------------------------------------- /res/Super Postal.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/Super Postal.ico -------------------------------------------------------------------------------- /res/cursor1.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/cursor1.cur -------------------------------------------------------------------------------- /res/eye.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/eye.ico -------------------------------------------------------------------------------- /res/guy.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/guy.ico -------------------------------------------------------------------------------- /res/mouth.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/mouth.ico -------------------------------------------------------------------------------- /res/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by Postal.rc 4 | // 5 | #define IDC_CURSOR1 2 6 | #define IDI_POSTAL 101 7 | #define IDI_ICON3 124 8 | #define IDI_ICON1 20000 9 | #define IDI_ICON2 20001 10 | 11 | // Next default values for new objects 12 | // 13 | #ifdef APSTUDIO_INVOKED 14 | #ifndef APSTUDIO_READONLY_SYMBOLS 15 | #define _APS_NEXT_RESOURCE_VALUE 125 16 | #define _APS_NEXT_COMMAND_VALUE 40001 17 | #define _APS_NEXT_CONTROL_VALUE 1000 18 | #define _APS_NEXT_SYMED_VALUE 101 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /res/rws.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/rws.ico -------------------------------------------------------------------------------- /res/sign.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/sign.ico -------------------------------------------------------------------------------- /res/skull.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/skull.ico -------------------------------------------------------------------------------- /res/teeth.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oniryck/POSTAL-1-Open-Source/63f33dbca8896e6925c16593f468649debb4907b/res/teeth.ico -------------------------------------------------------------------------------- /toolbar.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // toolbar.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | // This module augments the CDude class, which used to be soley responsible for 22 | // updating player and weapon status. It currently graphically manages the 23 | // toolbars and sound reactions. (Still need to add sounds) 24 | //////////////////////////////////////////////////////////////////////////////// 25 | // 26 | // History: 27 | // 28 | // 08/06/97 JRD Started. Set bars to load in the realm 29 | // 30 | // 08/08/97 JRD Changed methodology to a proprietary data format and abandoning 31 | // attempts of a one to one interface with postal. Tollbar will 32 | // update an internal map of the weapon states based on events 33 | // passed. 34 | // 35 | // 08/08/97 JRD Completely revamped and finalized the class structure. 36 | // Added the first hook to draw the entire bar. 37 | // Added aliased functions to reduce header dependencies. 38 | // 08/09/97 JRD Added all functionality except a hook to refresh on event. 39 | // 40 | // 08/25/97 JMI Moved gsStatus* here from score.cpp. 41 | // 42 | //////////////////////////////////////////////////////////////////////////////// 43 | #ifndef TOOL_BAR_H 44 | #define TOOL_BAR_H 45 | 46 | #include "RSPiX.h" 47 | #include "hood.h" 48 | 49 | // Because I do NOT yet want to be forced to put the entire clas in the header, I 50 | // am ALIASING the hooks to the toolbar so recompiles will be minimal: 51 | 52 | // This should be done everytime the hood's palette changes. 53 | extern short ToolBarInit(CHood* pHood); 54 | 55 | // This does a FULL regeneration of the toolbar and draws it in yout area. 56 | // It returns false if it isn't time to render. 57 | extern bool ToolBarRender( 58 | CHood* pHood, 59 | RImage* pimDst, 60 | short sDstX, 61 | short sDstY, 62 | CDude* pDude, 63 | bool bForceRender = false 64 | ); 65 | 66 | extern short gsStatusFontForeIndex; 67 | extern short gsStatusFontBackIndex; 68 | extern short gsStatusFontShadowIndex; 69 | 70 | extern short gsStatusFontForeDeadIndex; 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /update.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // update.cpp 19 | // Project: Nostril (aka Postal) 20 | // 21 | // This simple module contains the "update" function(s). 22 | // 23 | // History: 24 | // 01/13/96 MJR Started. 25 | // 26 | // 08/21/97 JMI Changed Update() to UpdateSystem() and added 27 | // UpdateDisplay()s (see proto for details). 28 | // 29 | // 08/22/97 JMI Removed UpdateDisplay()s. 30 | // 31 | // 08/31/97 JMI Removed RTask::Do() call and commented out RHot::Do() call. 32 | // 33 | //////////////////////////////////////////////////////////////////////////////// 34 | #define UPDATE_CPP 35 | 36 | #include "RSPiX.h" 37 | #include "update.h" 38 | 39 | 40 | //////////////////////////////////////////////////////////////////////////////// 41 | // Macros/types/etc. 42 | //////////////////////////////////////////////////////////////////////////////// 43 | 44 | //////////////////////////////////////////////////////////////////////////////// 45 | // Variables/data 46 | //////////////////////////////////////////////////////////////////////////////// 47 | 48 | 49 | //////////////////////////////////////////////////////////////////////////////// 50 | // Function prototypes 51 | //////////////////////////////////////////////////////////////////////////////// 52 | 53 | 54 | //////////////////////////////////////////////////////////////////////////////// 55 | // 56 | // This must be called periodically to keep input flowing, audio playing, etc. 57 | // 58 | //////////////////////////////////////////////////////////////////////////////// 59 | extern void UpdateSystem(void) 60 | { 61 | rspDoSystem(); 62 | 63 | // Do other stuff here. 64 | RMix::Do(); 65 | } 66 | 67 | //////////////////////////////////////////////////////////////////////////////// 68 | // EOF 69 | //////////////////////////////////////////////////////////////////////////////// 70 | -------------------------------------------------------------------------------- /update.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // update.h 19 | // Project: Nostril (aka Postal) 20 | // 21 | // History: 22 | // 01/13/96 MJR Started. 23 | // 24 | // 08/21/97 JMI Changed Update() to UpdateSystem() and added 25 | // UpdateDisplay()s (see proto for details). 26 | // 27 | // 08/22/97 JMI Removed UpdateDisplay()s. 28 | // 29 | //////////////////////////////////////////////////////////////////////////////// 30 | #ifndef UPDATE_H 31 | #define UPDATE_H 32 | 33 | //////////////////////////////////////////////////////////////////////////////// 34 | // Macros. 35 | //////////////////////////////////////////////////////////////////////////////// 36 | 37 | //////////////////////////////////////////////////////////////////////////////// 38 | // Prototypes. 39 | //////////////////////////////////////////////////////////////////////////////// 40 | 41 | // Update 42 | extern void UpdateSystem(void); 43 | 44 | #endif //UPDATE_H 45 | //////////////////////////////////////////////////////////////////////////////// 46 | // EOF 47 | //////////////////////////////////////////////////////////////////////////////// 48 | -------------------------------------------------------------------------------- /yatime.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2016 RWS Inc, All Rights Reserved 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of version 2 of the GNU General Public License as published by 7 | // the Free Software Foundation 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License along 15 | // with this program; if not, write to the Free Software Foundation, Inc., 16 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | // 18 | // yatime.cpp 19 | // Project: Nostril (aka Postal) 20 | // 21 | // This module impliments the CTime class, which manages game time. 22 | // 23 | // History: 24 | // 01/22/97 MJR Started. 25 | // 26 | // 07/14/97 MJR Renamed module to yatime.cpp/.h to avoid conflicts with 27 | // , which are only conflicts because the VC++ 28 | // compiler doesn't properly differentiate between #include's 29 | // using <> and "". 30 | // 31 | //////////////////////////////////////////////////////////////////////////////// 32 | #define YATIME_CPP 33 | 34 | #include "yatime.h" 35 | 36 | // CTime is currently implimented entirely in the header file. This file 37 | // exists in case any of that gets big enough that we don't want it inline'd 38 | // anymore! 39 | 40 | 41 | //////////////////////////////////////////////////////////////////////////////// 42 | // EOF 43 | //////////////////////////////////////////////////////////////////////////////// 44 | --------------------------------------------------------------------------------