├── AvP_vc ├── 3dc │ ├── AFONT.C │ ├── CD Tracks.txt │ ├── CREDITS.txt │ ├── ENGLISH.TXT │ ├── GENPARAM.TXT │ ├── KSHAPE.H │ ├── Kshape.c │ ├── Language.txt │ ├── MAP.C │ ├── MEM3DCPP.CPP │ ├── MODULE.C │ ├── MORPH.C │ ├── MSLHAND.C │ ├── MSLHAND.H │ ├── Maths.c │ ├── OBJECT.C │ ├── TABLES.C │ ├── VDB.C │ ├── avp.ico │ ├── avp.rc │ ├── avp │ │ ├── AI_Sight.c │ │ ├── AI_Sight.h │ │ ├── AVPVIEW.H │ │ ├── Avpview.c │ │ ├── BH_ALIEN.C │ │ ├── BH_ALIEN.H │ │ ├── BH_BINSW.C │ │ ├── BH_BINSW.H │ │ ├── BH_FAR.H │ │ ├── BH_FHUG.C │ │ ├── BH_FHUG.H │ │ ├── BH_GENER.C │ │ ├── BH_GENER.H │ │ ├── BH_LNKSW.C │ │ ├── BH_LNKSW.H │ │ ├── BH_MARIN.H │ │ ├── BH_NEAR.H │ │ ├── BH_PAQ.C │ │ ├── BH_PAQ.H │ │ ├── BH_PRED.H │ │ ├── BH_SWDOR.C │ │ ├── BH_SWDOR.H │ │ ├── BH_TYPES.C │ │ ├── BH_TYPES.H │ │ ├── BH_XENO.H │ │ ├── Bh_debri.c │ │ ├── Bh_marin.c │ │ ├── Bh_near.c │ │ ├── Bh_pred.c │ │ ├── Bh_xeno.c │ │ ├── BonusAbilities.c │ │ ├── BonusAbilities.h │ │ ├── CDTrackSelection.cpp │ │ ├── CDTrackSelection.h │ │ ├── COMP_SHP.C │ │ ├── COMP_SHP.H │ │ ├── CheatModes.c │ │ ├── ConsoleLog.cpp │ │ ├── ConsoleLog.hpp │ │ ├── DATABASE.C │ │ ├── DATABASE.H │ │ ├── DYNAMICS.H │ │ ├── DYNBLOCK.C │ │ ├── DYNBLOCK.H │ │ ├── DetailLevels.c │ │ ├── DetailLevels.h │ │ ├── Dynamics.c │ │ ├── EQUATES.H │ │ ├── EQUIPMNT.C │ │ ├── EQUIPMNT.H │ │ ├── GAMEDEF.H │ │ ├── Game.c │ │ ├── HModel.c │ │ ├── HUDDEFS.H │ │ ├── HUD_MAP.C │ │ ├── HUD_MAP.H │ │ ├── Hud.c │ │ ├── INVENTRY.H │ │ ├── Inventry.c │ │ ├── LANGUAGE.C │ │ ├── LANGUAGE.H │ │ ├── LIGHTING.C │ │ ├── LIGHTING.H │ │ ├── MACRO.H │ │ ├── MAPS.C │ │ ├── MessageHistory.c │ │ ├── PFARLOCS.C │ │ ├── PFARLOCS.H │ │ ├── PHEROMON.C │ │ ├── PHEROMON.H │ │ ├── PMOVE.H │ │ ├── PSND.H │ │ ├── PSNDPROJ.C │ │ ├── PSNDPROJ.H │ │ ├── PVISIBLE.C │ │ ├── PVISIBLE.H │ │ ├── Paintball.c │ │ ├── Paintball.h │ │ ├── Player.c │ │ ├── Pmove.c │ │ ├── Psnd.c │ │ ├── SMOVDATA.C │ │ ├── STRATDEF.C │ │ ├── STRATDEF.H │ │ ├── SecStats.c │ │ ├── TRIGGERS.C │ │ ├── TRIGGERS.H │ │ ├── WEAPONS.H │ │ ├── Weapons.c │ │ ├── avpitems.cpp │ │ ├── avpitems.hpp │ │ ├── avppages.cpp │ │ ├── avppages.hpp │ │ ├── bh_RubberDuck.c │ │ ├── bh_RubberDuck.h │ │ ├── bh_agun.c │ │ ├── bh_agun.h │ │ ├── bh_ais.c │ │ ├── bh_ais.h │ │ ├── bh_cable.c │ │ ├── bh_cable.h │ │ ├── bh_corpse.c │ │ ├── bh_corpse.h │ │ ├── bh_deathvol.c │ │ ├── bh_deathvol.h │ │ ├── bh_debri.h │ │ ├── bh_dummy.c │ │ ├── bh_dummy.h │ │ ├── bh_fan.c │ │ ├── bh_fan.h │ │ ├── bh_far.c │ │ ├── bh_ldoor.c │ │ ├── bh_ldoor.h │ │ ├── bh_lift.c │ │ ├── bh_lift.h │ │ ├── bh_light.c │ │ ├── bh_light.h │ │ ├── bh_ltfx.c │ │ ├── bh_ltfx.h │ │ ├── bh_mission.c │ │ ├── bh_mission.h │ │ ├── bh_pargen.c │ │ ├── bh_pargen.h │ │ ├── bh_plachier.c │ │ ├── bh_plachier.h │ │ ├── bh_plift.c │ │ ├── bh_plift.h │ │ ├── bh_queen.c │ │ ├── bh_queen.h │ │ ├── bh_selfdest.c │ │ ├── bh_selfdest.h │ │ ├── bh_snds.c │ │ ├── bh_snds.h │ │ ├── bh_spcl.c │ │ ├── bh_spcl.h │ │ ├── bh_track.c │ │ ├── bh_track.h │ │ ├── bh_videoscreen.c │ │ ├── bh_videoscreen.h │ │ ├── bh_waypt.c │ │ ├── bh_waypt.h │ │ ├── bh_weap.c │ │ ├── bh_weap.h │ │ ├── cconvars.cpp │ │ ├── comp_map.c │ │ ├── davehook.cpp │ │ ├── davehook.h │ │ ├── deaths.c │ │ ├── decal.c │ │ ├── decal.h │ │ ├── equiputl.cpp │ │ ├── equiputl.hpp │ │ ├── extents.c │ │ ├── extents.h │ │ ├── game_statistics.c │ │ ├── game_statistics.h │ │ ├── gamecmds.cpp │ │ ├── gameflow.c │ │ ├── gameflow.h │ │ ├── gamevars.cpp │ │ ├── hmodel.h │ │ ├── langenum.h │ │ ├── load_shp.c │ │ ├── load_shp.h │ │ ├── los.c │ │ ├── los.h │ │ ├── ltfx_exp.h │ │ ├── mempool.c │ │ ├── mempool.h │ │ ├── menudefs.h │ │ ├── menus.c │ │ ├── missions.cpp │ │ ├── missions.hpp │ │ ├── movement.c │ │ ├── mp_launch.c │ │ ├── particle.c │ │ ├── particle.h │ │ ├── projfont.h │ │ ├── projmenu.cpp │ │ ├── projmenu.hpp │ │ ├── projtext.h │ │ ├── savegame.c │ │ ├── savegame.h │ │ ├── scream.cpp │ │ ├── scream.h │ │ ├── sequnces.h │ │ ├── sfx.c │ │ ├── sfx.h │ │ ├── shapes │ │ │ └── CUBE.C │ │ ├── statpane.h │ │ ├── support │ │ │ ├── COORDSTR.CPP │ │ │ ├── COORDSTR.HPP │ │ │ ├── DAEMON.CPP │ │ │ ├── command.hpp │ │ │ ├── consbind.cpp │ │ │ ├── consbind.hpp │ │ │ ├── consbtch.cpp │ │ │ ├── consbtch.hpp │ │ │ ├── daemon.h │ │ │ ├── dcontext.hpp │ │ │ ├── expvar.hpp │ │ │ ├── indexfnt.cpp │ │ │ ├── indexfnt.hpp │ │ │ ├── ourbool.h │ │ │ ├── r2base.cpp │ │ │ ├── r2base.h │ │ │ ├── r2pos666.cpp │ │ │ ├── r2pos666.hpp │ │ │ ├── rebitems.cpp │ │ │ ├── rebitems.hpp │ │ │ ├── rebmenus.cpp │ │ │ ├── rebmenus.hpp │ │ │ ├── reflist.cpp │ │ │ ├── reflist.hpp │ │ │ ├── refobj.cpp │ │ │ ├── refobj.hpp │ │ │ ├── rentrntq.cpp │ │ │ ├── rentrntq.h │ │ │ ├── scstring.cpp │ │ │ ├── scstring.hpp │ │ │ ├── strtab.cpp │ │ │ ├── strtab.hpp │ │ │ ├── strutil.c │ │ │ ├── strutil.h │ │ │ ├── tallfont.cpp │ │ │ ├── tallfont.hpp │ │ │ ├── trig666.cpp │ │ │ ├── trig666.hpp │ │ │ ├── wrapstr.cpp │ │ │ └── wrapstr.hpp │ │ ├── targeting.c │ │ ├── targeting.h │ │ ├── track.c │ │ ├── track.h │ │ └── win95 │ │ │ ├── AVPCHUNK.CPP │ │ │ ├── AVPCHUNK.HPP │ │ │ ├── AvpReg.cpp │ │ │ ├── AvpReg.hpp │ │ │ ├── BMP2.H │ │ │ ├── CHEAT.C │ │ │ ├── CHEAT.H │ │ │ ├── Ddplat.cpp │ │ │ ├── DirectPlay.c │ │ │ ├── Dp_func.c │ │ │ ├── Dp_func.h │ │ │ ├── EAX.H │ │ │ ├── FFREAD.CPP │ │ │ ├── FFREAD.HPP │ │ │ ├── FFSTDIO.CPP │ │ │ ├── FFSTDIO.H │ │ │ ├── Frontend │ │ │ ├── AvP_EnvInfo.c │ │ │ ├── AvP_EnvInfo.h │ │ │ ├── AvP_Intro.cpp │ │ │ ├── AvP_MP_Config.cpp │ │ │ ├── AvP_MP_Config.h │ │ │ ├── AvP_MenuData.c │ │ │ ├── AvP_MenuGfx.cpp │ │ │ ├── AvP_MenuGfx.hpp │ │ │ ├── AvP_Menus.c │ │ │ ├── AvP_Menus.h │ │ │ ├── AvP_UserProfile.cpp │ │ │ └── AvP_UserProfile.h │ │ │ ├── GAMEPLAT.H │ │ │ ├── GammaControl.cpp │ │ │ ├── GammaControl.h │ │ │ ├── HEAP_TEM.HPP │ │ │ ├── HUDGFX.H │ │ │ ├── HUD_DATA.H │ │ │ ├── HUD_layout.h │ │ │ ├── Ia3d.h │ │ │ ├── KZSORT.C │ │ │ ├── KZSORT.H │ │ │ ├── LANGPLAT.C │ │ │ ├── MENUPLAT.CPP │ │ │ ├── MULTMENU.C │ │ │ ├── MULTMENU.H │ │ │ ├── MouseCentreing.cpp │ │ │ ├── NPCSETUP.CPP │ │ │ ├── NPCSETUP.H │ │ │ ├── OBJSETUP.HPP │ │ │ ├── Objsetup.cpp │ │ │ ├── PCMENUS.CPP │ │ │ ├── PCMENUS.H │ │ │ ├── PCPAUSE.C │ │ │ ├── PLATSUP.C │ │ │ ├── PLDGHOST.H │ │ │ ├── PROJLOAD.HPP │ │ │ ├── PSNDPLAT.H │ │ │ ├── PathChnk.cpp │ │ │ ├── PathChnk.hpp │ │ │ ├── Pldghost.c │ │ │ ├── Pldnet.c │ │ │ ├── Pldnet.h │ │ │ ├── Projload.cpp │ │ │ ├── Psndplat.c │ │ │ ├── SCRSHOT.CPP │ │ │ ├── SCRSHOT.HPP │ │ │ ├── STRACHNK.CPP │ │ │ ├── Strachnk.hpp │ │ │ ├── System.h │ │ │ ├── USR_IO.C │ │ │ ├── USR_IO.H │ │ │ ├── VISION.C │ │ │ ├── VISION.H │ │ │ ├── VMANPSET.H │ │ │ ├── chtcodes.cpp │ │ │ ├── d3d_hud.cpp │ │ │ ├── d3d_hud.h │ │ │ ├── d3d_render.cpp │ │ │ ├── d3d_render.h │ │ │ ├── datatype.h │ │ │ ├── dbdefs.h │ │ │ ├── dp_Sprh.h │ │ │ ├── dplayext.c │ │ │ ├── dplayext.h │ │ │ ├── dx_proj.cpp │ │ │ ├── endianio.c │ │ │ ├── endianio.h │ │ │ ├── font.h │ │ │ ├── gadgets │ │ │ ├── ahudgadg.cpp │ │ │ ├── ahudgadg.hpp │ │ │ ├── conscmnd.cpp │ │ │ ├── conscmnd.hpp │ │ │ ├── conssym.cpp │ │ │ ├── conssym.hpp │ │ │ ├── consvar.cpp │ │ │ ├── consvar.hpp │ │ │ ├── gadget.cpp │ │ │ ├── gadget.h │ │ │ ├── hudgadg.cpp │ │ │ ├── hudgadg.hpp │ │ │ ├── rootgadg.cpp │ │ │ ├── rootgadg.hpp │ │ │ ├── t_ingadg.cpp │ │ │ ├── t_ingadg.hpp │ │ │ ├── teletype.cpp │ │ │ ├── teletype.hpp │ │ │ ├── textexp.cpp │ │ │ ├── textexp.hpp │ │ │ ├── textin.cpp │ │ │ ├── textin.hpp │ │ │ ├── trepgadg.cpp │ │ │ └── trepgadg.hpp │ │ │ ├── gflwplat.c │ │ │ ├── hierplace.cpp │ │ │ ├── hierplace.hpp │ │ │ ├── intro.cpp │ │ │ ├── intro.hpp │ │ │ ├── iofocus.cpp │ │ │ ├── iofocus.h │ │ │ ├── jsndsup.cpp │ │ │ ├── jsndsup.h │ │ │ ├── menugfx.h │ │ │ ├── modcmds.cpp │ │ │ ├── modcmds.hpp │ │ │ ├── progress_bar.cpp │ │ │ ├── progress_bar.h │ │ │ ├── system.c │ │ │ ├── win_proj.cpp │ │ │ └── winmain.c │ ├── default.cfg │ ├── dialog.dll │ ├── dialog.lib │ ├── fontbr.pgm │ ├── frustrum.c │ ├── frustrum.h │ ├── ia3d.lib │ ├── include │ │ ├── 3dc.h │ │ ├── mem3dc.h │ │ ├── module.h │ │ ├── prototyp.h │ │ └── shape.h │ ├── mem3dc.c │ ├── movement.txt │ ├── plddpvc.dll │ ├── readme.txt │ ├── shpanim.c │ ├── sphere.c │ ├── sphere.h │ ├── version.c │ ├── version.h │ └── win95 │ │ ├── ANIMCHNK.CPP │ │ ├── ANIMCHNK.HPP │ │ ├── BMPNAMES.CPP │ │ ├── BMPNAMES.HPP │ │ ├── CD_player.c │ │ ├── CD_player.h │ │ ├── CHNKIMAG.CPP │ │ ├── CHNKIMAG.HPP │ │ ├── CHNKLOAD.H │ │ ├── CHNKLOAD.HPP │ │ ├── CHNKTEXI.CPP │ │ ├── CHNKTEXI.H │ │ ├── CHNKTYPE.CPP │ │ ├── CHNKTYPE.HPP │ │ ├── CHUNKPAL.CPP │ │ ├── CHUNKPAL.HPP │ │ ├── CL_INIT.CPP │ │ ├── CL_INIT.H │ │ ├── Chunk.cpp │ │ ├── Chunk.hpp │ │ ├── D3_IMAGE.CPP │ │ ├── D3_IMAGE.HPP │ │ ├── DB.H │ │ ├── DD_FUNC.CPP │ │ ├── DEBUGLOG.CPP │ │ ├── DEBUGLOG.H │ │ ├── DEBUGLOG.HPP │ │ ├── DXLOG.C │ │ ├── DXLOG.H │ │ ├── Di_func.cpp │ │ ├── DummyObjectChunk.cpp │ │ ├── DummyObjectChunk.hpp │ │ ├── ENUMCHNK.CPP │ │ ├── ENUMCHNK.HPP │ │ ├── ENUMSCH.CPP │ │ ├── ENUMSCH.HPP │ │ ├── ENVCHUNK.CPP │ │ ├── ENVCHUNK.HPP │ │ ├── GSPRCHNK.CPP │ │ ├── GSPRCHNK.HPP │ │ ├── Hash_tem.hpp │ │ ├── ILBM_ext.cpp │ │ ├── ILBM_ext.hpp │ │ ├── INLINE.H │ │ ├── KRENDER.H │ │ ├── Krender.c │ │ ├── LTCHUNK.CPP │ │ ├── LTCHUNK.HPP │ │ ├── MISHCHNK.CPP │ │ ├── MISHCHNK.HPP │ │ ├── MMX_MATH.H │ │ ├── Mmx_math.asm │ │ ├── OBCHUNK.CPP │ │ ├── OBCHUNK.HPP │ │ ├── OEChunk.cpp │ │ ├── OEChunk.h │ │ ├── OURASERT.H │ │ ├── OUR_MEM.C │ │ ├── PENTIME.H │ │ ├── SCANDRAW.ASM │ │ ├── SHPCHUNK.CPP │ │ ├── SHPCHUNK.HPP │ │ ├── SMSOPT.H │ │ ├── SNDCHUNK.CPP │ │ ├── SNDCHUNK.HPP │ │ ├── STRING.CPP │ │ ├── STRING.HPP │ │ ├── ShowCmds.h │ │ ├── Sprchunk.cpp │ │ ├── Sprchunk.hpp │ │ ├── TEXIO.C │ │ ├── TOOLCHNK.CPP │ │ ├── TOOLCHNK.HPP │ │ ├── TXIOCTRL.CPP │ │ ├── TXIOCTRL.H │ │ ├── VRAMTIME.C │ │ ├── VRAMTIME.H │ │ ├── VideoModes.cpp │ │ ├── VideoModes.h │ │ ├── ZMOUSE.H │ │ ├── Zsp.cpp │ │ ├── Zsp.hpp │ │ ├── advwin32.h │ │ ├── alt_tab.cpp │ │ ├── alt_tab.h │ │ ├── animobs.cpp │ │ ├── animobs.hpp │ │ ├── aw.h │ │ ├── awBmpLd.cpp │ │ ├── awIffLd.cpp │ │ ├── awPnmLd.cpp │ │ ├── awTexLd.cpp │ │ ├── awTexLd.h │ │ ├── awTexLd.hpp │ │ ├── bink.c │ │ ├── chnkload.cpp │ │ ├── d3_func.cpp │ │ ├── d3_func.h │ │ ├── d3dmacs.h │ │ ├── d3load.c │ │ ├── db.c │ │ ├── fail.c │ │ ├── fail.h │ │ ├── fragchnk.cpp │ │ ├── fragchnk.hpp │ │ ├── hierchnk.cpp │ │ ├── hierchnk.hpp │ │ ├── huffman.cpp │ │ ├── huffman.hpp │ │ ├── iff.cpp │ │ ├── iff.hpp │ │ ├── iff_ILBM.cpp │ │ ├── iff_ILBM.hpp │ │ ├── io.c │ │ ├── item.c │ │ ├── list_tem.cpp │ │ ├── list_tem.hpp │ │ ├── md5.c │ │ ├── md5.h │ │ ├── media.cpp │ │ ├── media.hpp │ │ ├── objedit.h │ │ ├── plat_shp.c │ │ ├── plat_shp.h │ │ ├── platform.h │ │ ├── plspecfn.c │ │ ├── shpanim.h │ │ ├── smacker.c │ │ ├── smacker.h │ │ ├── win_func.cpp │ │ ├── wpchunk.cpp │ │ ├── wpchunk.hpp │ │ └── zbuffer.c ├── AvP.dsp ├── AvP.dsw ├── AvP.opt ├── avp395.mk ├── avp395.wpj ├── avpprog.lk1 ├── avpprog.mk1 ├── avpprog.tgt └── wat_release │ └── avp.tgt └── License.txt /AvP_vc/3dc/CD Tracks.txt: -------------------------------------------------------------------------------- 1 | ;CD track list 2 | ;Only lines starting with a # are looked at. 3 | ;After the # a list of cd track numbers should be provided 4 | ;All track numbers for a give level must appear on one line 5 | ;Any symbol can be used to seperate the numbers (Other than ;) , I'm using commas. 6 | ;Anything coming after a semicolon is ignored 7 | 8 | 9 | 10 | 11 | ;Default tracks for each character. 12 | ;Used in multiplayer games , or if no tracks have been assigned 13 | ;to a level 14 | # 1,2,3,4,5 ;Marine 15 | # 6,7,8,9,10 ;Predator 16 | # 11,12,13,14,15 ;Alien 17 | 18 | ;Cd tracks assigned to each level 19 | 20 | ;Marine 21 | # 2 ; AVP_ENVIRONMENT_DERELICT, 22 | # 1 ; AVP_ENVIRONMENT_COLONY, 23 | # 4 ; AVP_ENVIRONMENT_INVASION, 24 | # 3 ; AVP_ENVIRONMENT_ORBITAL, 25 | # 5 ; AVP_ENVIRONMENT_TYRARGO, 26 | # 5 ; AVP_ENVIRONMENT_TYRARGOHANGAR, 27 | 28 | ;Predator 29 | # 7 ; AVP_ENVIRONMENT_WATERFALL, 30 | # 6 ; AVP_ENVIRONMENT_AREA52, 31 | # 8 ; AVP_ENVIRONMENT_VAULTS, 32 | # 10 ; AVP_ENVIRONMENT_FURY161, 33 | # 9 ; AVP_ENVIRONMENT_CAVERNS, 34 | # 9 ; AVP_ENVIRONMENT_CAVERNSEND, 35 | 36 | ;Alien 37 | # 11 ; AVP_ENVIRONMENT_FERARCO, 38 | # 12 ; AVP_ENVIRONMENT_TEMPLE, 39 | # 13 ; AVP_ENVIRONMENT_GATEWAY, 40 | # 14 ; AVP_ENVIRONMENT_ESCAPE, 41 | # 15 ; AVP_ENVIRONMENT_EARTHBOUND, 42 | 43 | ;Multiplayer part 1(ignored , but leave the same number of #'s) 44 | # ; 45 | # ; 46 | # ; 47 | # ; 48 | # ; 49 | 50 | ;Alien bonus 51 | # ; AVP_ENVIRONMENT_INVASION_A, 52 | # ; AVP_ENVIRONMENT_DERELICT_A, 53 | # ; AVP_ENVIRONMENT_TYRARGO_A, 54 | # ; AVP_ENVIRONMENT_FURY161_A, 55 | # ; AVP_ENVIRONMENT_CAVERNS_A, 56 | 57 | ;Predator bonus 58 | # ; AVP_ENVIRONMENT_INVASION_P, 59 | # ; AVP_ENVIRONMENT_TYRARGO_P, 60 | # ; AVP_ENVIRONMENT_TEMPLE_P, 61 | # ; AVP_ENVIRONMENT_ESCAPE_P, 62 | # ; AVP_ENVIRONMENT_EARTHBOUND_P, 63 | 64 | ;Marine bonus 65 | # ; AVP_ENVIRONMENT_WATERFALL_M, 66 | # ; AVP_ENVIRONMENT_VAULTS_M, 67 | # ; AVP_ENVIRONMENT_FERARCO_M, 68 | # ; AVP_ENVIRONMENT_TEMPLE_M, 69 | # ; AVP_ENVIRONMENT_GATEWAY_M, 70 | 71 | ;Multiplayer part 2(ignored , but leave the same number of #'s) 72 | # ; 73 | # ; 74 | # ; 75 | # ; 76 | # ; 77 | # ; 78 | -------------------------------------------------------------------------------- /AvP_vc/3dc/ENGLISH.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/ENGLISH.TXT -------------------------------------------------------------------------------- /AvP_vc/3dc/Language.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/Language.txt -------------------------------------------------------------------------------- /AvP_vc/3dc/MEM3DCPP.CPP: -------------------------------------------------------------------------------- 1 | #include "mem3dc.h" 2 | 3 | #if DBGMALLOC 4 | 5 | #if 1 6 | 7 | // try and turn C++ new/delete tracking on such that 8 | // we can do a malloc dump when the global objects 9 | // with associated memory allocated is recored, the 10 | // deallocation is recored, and then a malloc dump 11 | // is done 12 | 13 | // note that some global objects wont have their memory 14 | // allocations/deallocations in the constructor/destructor 15 | // tracked through record_malloc/record_free, but since 16 | // global objects are deconstructed in the reverse order 17 | // from construction, the deallocation type in the destructor 18 | // will correspond to the allocation type in the constructor 19 | 20 | int __cpp_new_recording = 0; 21 | 22 | class DebugObject 23 | { 24 | public: 25 | DebugObject(); 26 | ~DebugObject(); 27 | }; 28 | 29 | DebugObject::DebugObject() 30 | { 31 | __cpp_new_recording = 1; 32 | } 33 | 34 | DebugObject::~DebugObject() 35 | { 36 | __cpp_new_recording = 0; 37 | DumpMallocInfo(DUMPTOFILE); 38 | } 39 | 40 | static DebugObject dbo; 41 | 42 | #else 43 | 44 | int __cpp_new_recording = 1; 45 | 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /AvP_vc/3dc/MSLHAND.H: -------------------------------------------------------------------------------- 1 | #ifndef _included_mslhand_h_ 2 | #define _included_mslhand_h_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef enum MSL_Section 9 | { 10 | MSLS_COMPILEDIN, 11 | MSLS_CHARACTER, 12 | MSLS_ENVIRONMENT, 13 | 14 | MSLS_MAXSECTIONS 15 | 16 | } MSL_SECTION; 17 | 18 | #define MSL_OVERFLOW (-1) 19 | 20 | int GetNextMSLEntry(MSL_SECTION, unsigned int num_shapes, int auto_delete); 21 | 22 | void FlushMSLSection(MSL_SECTION); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif /* !_included_mslhand_h_ */ 29 | -------------------------------------------------------------------------------- /AvP_vc/3dc/Maths.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/Maths.c -------------------------------------------------------------------------------- /AvP_vc/3dc/avp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/avp.ico -------------------------------------------------------------------------------- /AvP_vc/3dc/avp.rc: -------------------------------------------------------------------------------- 1 | AVPICON ICON AvP.ICO -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/AI_Sight.h: -------------------------------------------------------------------------------- 1 | #define NPC_MAX_VIEWRANGE (50000) 2 | 3 | extern int NPCCanSeeTarget(STRATEGYBLOCK *sbptr, STRATEGYBLOCK *target, int viewRange); 4 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/AVPVIEW.H: -------------------------------------------------------------------------------- 1 | /* KJL 10:49:41 04/21/97 - avpview.h */ 2 | extern void AvpShowViews(void); 3 | extern void InitCameraValues(void); 4 | extern void LightSourcesInRangeOfObject(DISPLAYBLOCK *dptr); 5 | 6 | 7 | extern VIEWDESCRIPTORBLOCK *Global_VDB_Ptr; 8 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/BH_FAR.H: -------------------------------------------------------------------------------- 1 | 2 | /*------------------------Patrick 26/11/96----------------------------- 3 | Header file for FAR AI alien behaviour 4 | --------------------------------------------------------------------*/ 5 | 6 | #ifndef _bhfar_h_ 7 | #define _bhfar_h_ 1 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | 14 | /* enum for far alien target module status */ 15 | typedef enum fnpc_targetmodulestatus 16 | { 17 | NPCTM_NoEntryPoint, 18 | NPCTM_NormalRoom, 19 | NPCTM_AirDuct, 20 | NPCTM_LiftTeleport, 21 | NPCTM_ProxDoorOpen, 22 | NPCTM_ProxDoorNotOpen, 23 | NPCTM_LiftDoorOpen, 24 | NPCTM_LiftDoorNotOpen, 25 | NPCTM_SecurityDoorOpen, 26 | NPCTM_SecurityDoorNotOpen, 27 | 28 | 29 | } NPC_TARGETMODULESTATUS; 30 | 31 | /* prototypes */ 32 | extern void FarAlienBehaviour(STRATEGYBLOCK *sbPtr); 33 | extern void BuildFarModuleLocs(void); 34 | extern void KillFarModuleLocs(void); 35 | 36 | extern void LocateFarNPCInModule(STRATEGYBLOCK *sbPtr, MODULE *targetModule); 37 | extern void LocateFarNPCInAIModule(STRATEGYBLOCK *sbPtr, AIMODULE *targetModule); 38 | extern NPC_TARGETMODULESTATUS GetTargetAIModuleStatus(STRATEGYBLOCK *sbPtr, AIMODULE *targetModule, int alien); 39 | 40 | extern AIMODULE *FarNPC_GetTargetAIModuleForHunt(STRATEGYBLOCK *sbPtr,int alien); 41 | extern AIMODULE *FarNPC_GetTargetAIModuleForGlobalHunt(STRATEGYBLOCK *sbPtr); 42 | extern AIMODULE *FarNPC_GetTargetAIModuleForWander(STRATEGYBLOCK *sbPtr, AIMODULE *exception, int alien); 43 | extern AIMODULE *FarNPC_GetTargetAIModuleForRetreat(STRATEGYBLOCK *sbPtr); 44 | extern AIMODULE *FarNPC_GetTargetAIModuleForMarineRespond(STRATEGYBLOCK *sbPtr); 45 | extern void FarNpc_FlipAround(STRATEGYBLOCK *sbPtr); 46 | 47 | /* this define to help stop aliens coagulating in the environment */ 48 | #if SupportWindows95 49 | #define MAX_GENERATORNPCSPERMODULE 5 50 | #define MAX_VISIBLEGENERATORNPCS 8 //12 51 | #else 52 | /* PSX & Saturn*/ 53 | #define MAX_GENERATORNPCSPERMODULE 5 54 | #define MAX_VISIBLEGENERATORNPCS 6 55 | #endif 56 | 57 | 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/BH_NEAR.H: -------------------------------------------------------------------------------- 1 | 2 | extern void NearAlienBehaviour(STRATEGYBLOCK *sbPtr); 3 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/BH_SWDOR.H: -------------------------------------------------------------------------------- 1 | /*------------------------------Patrick 12/3/97----------------------------------- 2 | Header for Switch Operated Doors 3 | --------------------------------------------------------------------------------*/ 4 | 5 | typedef struct switch_door_behaviour_type 6 | { 7 | AVP_BEHAVIOUR_TYPE myBehaviourType; /* just for testing system integrity */ 8 | DOOR_STATES doorState; 9 | MORPHCTRL *morfControl; 10 | char linkedDoorName[SB_NAME_LENGTH]; 11 | STRATEGYBLOCK* linkedDoorPtr; 12 | int openTimer; 13 | unsigned int requestOpen :1; 14 | unsigned int requestClose :1; 15 | int SoundHandle; 16 | int doorType; // Used to determine door sound type 17 | 18 | } SWITCH_DOOR_BEHAV_BLOCK; 19 | 20 | typedef struct switch_door_tools_template 21 | { 22 | BOOL state; 23 | MREF myModule; 24 | int shapeOpen; 25 | int shapeClosed; 26 | char linkedDoorName[SB_NAME_LENGTH]; 27 | char nameID[SB_NAME_LENGTH]; 28 | } SWITCH_DOOR_TOOLS_TEMPLATE; 29 | 30 | #define DOOR_OPENSLOWSPEED (1<<16) 31 | #define DOOR_OPENFASTSPEED (1<<20) 32 | #define DOOR_CLOSESLOWSPEED (1<<17) 33 | #define DOOR_CLOSEFASTSPEED (1<<20) 34 | #define DOOR_FAROPENTIME (ONE_FIXED<<2) /* 4 seconds: DO NOT CHANGE THIS OR AI MAY NOT WORK*/ 35 | #define DOOR_OPENDISTANCE (5000) /* mm */ 36 | 37 | extern void InitialiseSwitchDoor(void* bhdata, STRATEGYBLOCK* sbptr); 38 | extern void SwitchDoorBehaviour(STRATEGYBLOCK* sbptr); 39 | extern void OpenDoor(MORPHCTRL *mctrl, int speed); 40 | extern void CloseDoor(MORPHCTRL *mctrl, int speed); 41 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/BonusAbilities.h: -------------------------------------------------------------------------------- 1 | /* KJL 12:09:35 10/09/98 - BonusAbilities.h */ 2 | 3 | /* KJL 12:09:43 10/09/98 - Grappling Hook */ 4 | extern void InitialiseGrapplingHook(void); 5 | extern void ActivateGrapplingHook(void); 6 | extern void HandleGrapplingHookForces(void); 7 | extern void RenderGrapplingHook(void); 8 | extern void DisengageGrapplingHook(void); 9 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/CDTrackSelection.h: -------------------------------------------------------------------------------- 1 | extern void LoadCDTrackList(); 2 | extern void CheckCDAndChooseTrackIfNeeded(); 3 | extern void ResetCDPlayForLevel(); 4 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/COMP_SHP.H: -------------------------------------------------------------------------------- 1 | 2 | extern SHAPEHEADER** mainshapelist; 3 | 4 | extern int start_of_loaded_shapes; 5 | 6 | extern SHAPEHEADER CUBE_header; 7 | extern SHAPEHEADER PRISM_header; 8 | extern SHAPEHEADER BOB_header; 9 | extern SHAPEHEADER ALIEN_header; 10 | extern SHAPEHEADER BLOODSPLASH_header; 11 | extern SHAPEHEADER BULLETRICOCHET_header; 12 | extern SHAPEHEADER EXPLOSION_header; 13 | extern SHAPEHEADER BOBCROUCH_header; 14 | extern SHAPEHEADER BOBLIE_header; 15 | extern SHAPEHEADER FLAME1_header; 16 | extern SHAPEHEADER FLAME2_header; 17 | extern SHAPEHEADER LGRENADE_header; 18 | 19 | typedef enum marineshapesenum 20 | { 21 | I_ShapeCube, 22 | I_ShapePrism, 23 | I_ShapeMarinePlayer, 24 | I_ShapePredatorPlayer, 25 | I_ShapeAlienPlayer, 26 | I_ShapeAlien, 27 | I_ShapeBloodSplash, 28 | I_ShapeBulletRicochet, 29 | I_ShapeExplosion, 30 | I_ShapeMarinePlayerCrouch, 31 | I_ShapeMarinePlayerLieDown, 32 | I_ShapeFlame1, 33 | I_ShapeFlame2, 34 | I_ShapeLGrenade, 35 | I_ShapePulseRifle, 36 | I_ShapeAAShotgun, 37 | I_ShapeCanisterGun, 38 | I_ShapeFThrower, 39 | I_ShapeSmartGun, 40 | I_ShapePig, 41 | I_ShapeLATW, 42 | I_ShapeParticle, 43 | I_ShapeRocket, 44 | I_ShapeGenerator, 45 | 46 | } MARINE_SHAPES_ENUM; 47 | 48 | 49 | extern int load_precompiled_shapes(void); 50 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/ConsoleLog.hpp: -------------------------------------------------------------------------------- 1 | /* KJL 10:19:41 30/03/98 - ConsoleLog.hpp 2 | 3 | This file handles the mirroring of the console text 4 | to a log file. 5 | 6 | */ 7 | #ifndef ConsoleLog_h_included 8 | #define ConsoleLog_h_included 9 | 10 | extern void OutputToConsoleLogfile(char *messagePtr); 11 | 12 | 13 | 14 | #ifdef __cplusplus 15 | extern "C" 16 | { 17 | #endif 18 | extern void OutputBugReportToConsoleLogfile(char *messagePtr); 19 | #ifdef __cplusplus 20 | }; 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/DATABASE.H: -------------------------------------------------------------------------------- 1 | 2 | #define NUM_SAVE_SLOTS 10 3 | 4 | enum DB_STATE_ID 5 | { 6 | DB_STATE_MAINMENU, 7 | DB_STATE_QUIT, 8 | DB_STATE_OPTIONS, 9 | DB_STATE_MISSION, 10 | DB_STATE_LOAD, 11 | DB_STATE_SAVE, 12 | DB_STATE_RESUME, 13 | DB_STATE_ACCESSDENIED, 14 | 15 | MAX_NO_OF_DB_STATES 16 | }; 17 | 18 | enum DB_MENUOPTION_ID 19 | { 20 | DB_MENUOPTION_RESUME, 21 | DB_MENUOPTION_OPTIONS, 22 | DB_MENUOPTION_MISSION, 23 | DB_MENUOPTION_LOAD, 24 | DB_MENUOPTION_SAVE, 25 | DB_MENUOPTION_QUIT, 26 | DB_MENUOPTION_YESQUIT, 27 | DB_MENUOPTION_NO, 28 | DB_MENUOPTION_MAINMENU, 29 | DB_MENUOPTION_GOBACK, 30 | DB_MENUOPTION_ACCESSDENIED, 31 | DB_MENUOPTION_SAVESLOT0, 32 | DB_MENUOPTION_SAVESLOT1, 33 | DB_MENUOPTION_SAVESLOT2, 34 | DB_MENUOPTION_SAVESLOT3, 35 | DB_MENUOPTION_SAVESLOT4, 36 | DB_MENUOPTION_SAVESLOT5, 37 | DB_MENUOPTION_SAVESLOT6, 38 | DB_MENUOPTION_SAVESLOT7, 39 | 40 | MAX_NO_OF_DB_MENUOPTIONS 41 | }; 42 | 43 | 44 | struct DatabaseInput 45 | { 46 | unsigned char RequestSelectItem :1; 47 | unsigned char RequestPreviousItem :1; 48 | unsigned char RequestNextItem :1; 49 | }; 50 | 51 | struct MenuOptionDescriptor 52 | { 53 | /* top-left coords */ 54 | int X; 55 | int Y; 56 | FONT_JUST justification; 57 | }; 58 | 59 | 60 | 61 | 62 | extern void AccessDatabase(int databaseID); 63 | 64 | /* KJL 15:43:16 04/11/97 - platform specific */ 65 | extern void PlatformSpecificEnteringDatabase(void); 66 | extern void PlatformSpecificExitingDatabase(void); 67 | 68 | extern void DrawDatabaseBackground(void); 69 | 70 | extern void UpdateDatabaseScreen(void); 71 | 72 | extern int DatabaseStateChange(); -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/DYNAMICS.H: -------------------------------------------------------------------------------- 1 | #ifndef _dynamics_h_ /* KJL 17:23:01 11/05/96 - is this your first time? */ 2 | #define _dynamics_h_ 1 3 | #include "particle.h" 4 | 5 | /*KJL************************************************************************ 6 | * DYNAMICS.H * 7 | * - this file contains prototypes for the functions in dynamics.c * 8 | * which can be called externally. * 9 | ************************************************************************KJL*/ 10 | 11 | 12 | /*KJL**************************************************************************************** 13 | * S T R U C T U R E S * 14 | ****************************************************************************************KJL*/ 15 | struct ColPolyTag 16 | { 17 | int NumberOfVertices; 18 | VECTORCH PolyPoint[4]; 19 | VECTORCH PolyNormal; 20 | DISPLAYBLOCK *ParentObject; 21 | }; 22 | 23 | 24 | /*KJL**************************************************************************************** 25 | * P H Y S I C A L C O N S T A N T S * 26 | ****************************************************************************************KJL*/ 27 | 28 | #define GRAVITY_STRENGTH 25000 29 | #define TIME_BEFORE_GRAVITY_KICKS_IN 16384 30 | 31 | #define MAXIMUM_STEP_HEIGHT 450 32 | #define MAX_ANG_VELOCITY 8192 33 | #define MAX_MOVES 4 34 | 35 | //16384 36 | 37 | /*KJL**************************************************************************************** 38 | * P R O T O T Y P E S * 39 | ****************************************************************************************KJL*/ 40 | extern void ObjectDynamics(void); 41 | extern void DynamicallyRotateObject(DYNAMICSBLOCK *dynPtr); 42 | 43 | 44 | /* externs to shape access fns (platform specific) */ 45 | extern int SetupPolygonAccess(DISPLAYBLOCK *objectPtr); 46 | extern void AccessNextPolygon(void); 47 | extern void GetPolygonVertices(struct ColPolyTag *polyPtr); 48 | extern void GetPolygonNormal(struct ColPolyTag *polyPtr); 49 | 50 | 51 | 52 | /* extra camera movement */ 53 | extern EULER HeadOrientation; 54 | 55 | extern int ParticleDynamics(PARTICLE *particlePtr, VECTORCH *obstacleNormalPtr, int *moduleIndexPtr); 56 | 57 | #endif /* end of preprocessor condition for file wrapping */ 58 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/DetailLevels.h: -------------------------------------------------------------------------------- 1 | #ifndef _detaillevels_h_ 2 | #define _detaillevels_h_ 1 3 | typedef struct 4 | { 5 | unsigned int MaximumAllowedNumberOfDecals; 6 | unsigned int AlienEnergyViewThreshold; 7 | unsigned int NumberOfSmokeParticlesFromLargeExplosion; 8 | unsigned int NumberOfSmokeParticlesFromSmallExplosion; 9 | 10 | unsigned int BloodCollidesWithEnvironment :1; 11 | unsigned int DrawLightCoronas :1; 12 | unsigned int DrawHierarchicalDecals :1; 13 | unsigned int ExplosionsDeformToEnvironment :1; 14 | unsigned int GhostFlameThrowerCollisions :1; 15 | 16 | } DETAIL_LEVELS; 17 | 18 | extern DETAIL_LEVELS LocalDetailLevels; 19 | typedef struct 20 | { 21 | int DecalNumber; 22 | int LightCoronas; 23 | int DecalsOnCharacters; 24 | int DeformableExplosions; 25 | int CharacterComplexity; 26 | int ParticleComplexity; 27 | 28 | } MENU_DETAIL_LEVEL_OPTIONS; 29 | 30 | extern MENU_DETAIL_LEVEL_OPTIONS MenuDetailLevelOptions; 31 | 32 | 33 | extern void SetToDefaultDetailLevels(void); 34 | extern void SetToMinimalDetailLevels(void); 35 | 36 | extern void SetDetailLevelsFromMenu(void); 37 | 38 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/Dynamics.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/avp/Dynamics.c -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/HUD_MAP.H: -------------------------------------------------------------------------------- 1 | /* KJL 11:14:25 04/25/97 - hud_map.h */ 2 | 3 | /* platform independent prototypes */ 4 | extern void InitHUDMap(void); 5 | extern void UpdateHUDMap(void); 6 | 7 | 8 | /* fns to change the map display */ 9 | extern void HUDMapOn(void); 10 | extern void HUDMapOff(void); 11 | extern void HUDMapZoomIn(void); 12 | extern void HUDMapZoomOut(void); 13 | extern void HUDMapSmaller(void); 14 | extern void HUDMapLarger(void); 15 | extern void HUDMapLeft(void); 16 | extern void HUDMapRight(void); 17 | extern void HUDMapUp(void); 18 | extern void HUDMapDown(void); 19 | extern void HUDMapWorldCentreLeft(void); 20 | extern void HUDMapWorldCentreRight(void); 21 | extern void HUDMapWorldCentreUp(void); 22 | extern void HUDMapWorldCentreDown(void); 23 | 24 | extern void HUDMapResetDefaults(void); 25 | extern void HUDMapRotateLeft(void); 26 | extern void HUDMapRotateRight(void); 27 | extern void HUDMapWorldForward(void); 28 | extern void HUDMapWorldBackward(void); 29 | extern void HUDMapWorldSlideLeft(void); 30 | extern void HUDMapWorldSlideRight(void); 31 | 32 | void HUDMapClamp(void); 33 | 34 | /* platform specific stuff */ 35 | enum MAP_COLOUR_ID 36 | { 37 | MAP_COLOUR_WHITE, 38 | MAP_COLOUR_GREY, 39 | MAP_COLOUR_RED 40 | }; 41 | 42 | extern void PlatformSpecificInitHUDMap(void); 43 | extern void PlatformSpecificEnteringHUDMap(void); 44 | extern void PlatformSpecificExitingHUDMap(void); 45 | /* This is called once from StartGame */ 46 | 47 | extern void DrawHUDMapLine(VECTOR2D *vertex1, VECTOR2D *vertex2, enum MAP_COLOUR_ID colourID); 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/INVENTRY.H: -------------------------------------------------------------------------------- 1 | /*KJL***************************************************** 2 | * INVENTRY.H - contains externs to the fns in INVENTRY.C * 3 | *****************************************************KJL*/ 4 | 5 | /*KJL**************************************************************************************** 6 | * P R O T O T Y P E S * 7 | ****************************************************************************************KJL*/ 8 | extern void InitialisePlayersInventory(PLAYER_STATUS *playerStatusPtr); 9 | extern void MaintainPlayersInventory(void); 10 | 11 | /*-------------------------------Patrick 11/3/97-------------------------------- 12 | Protoypes for a couple of little functions: see inventry.c for details... 13 | ------------------------------------------------------------------------------*/ 14 | extern void SetPlayerSecurityClearance(STRATEGYBLOCK *sbPtr, unsigned int securityLevel); 15 | extern int ReturnPlayerSecurityClearance(STRATEGYBLOCK *sbPtr, unsigned int securityLevel); 16 | 17 | 18 | 19 | //structure for starting equipment information loaded from rif files 20 | typedef struct player_starting_equipment 21 | { 22 | unsigned int marine_jetpack :1; 23 | 24 | unsigned int predator_pistol :1; 25 | unsigned int predator_plasmacaster :1; 26 | unsigned int predator_disc :1; 27 | unsigned int predator_medicomp :1; 28 | unsigned int predator_grappling_hook :1; 29 | int predator_num_spears; 30 | 31 | 32 | }PLAYER_STARTING_EQUIPMENT; 33 | 34 | extern PLAYER_STARTING_EQUIPMENT StartingEquipment; 35 | 36 | #define PISTOL_INFINITE_AMMO (netGameData.pistolInfiniteAmmo) 37 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/LANGUAGE.H: -------------------------------------------------------------------------------- 1 | #ifndef _language_h_ 2 | #define _language_h_ 1 3 | /* KJL 11:54:21 05/02/97 - language.h */ 4 | #include "langenum.h" 5 | 6 | #define ENGLISH_TEXT_FILENAME "ENGLISH.TXT" 7 | extern unsigned char *LanguageFilename[]; 8 | 9 | extern void InitTextStrings(void); 10 | /*KJL*************************************************************** 11 | * Initialization to be called ONCE right at the start of the game. * 12 | ***************************************************************KJL*/ 13 | 14 | extern void KillTextStrings(void); 15 | /*KJL******************************************************** 16 | * Free memory etc, to be called ONCE on exit from the game. * 17 | ********************************************************KJL*/ 18 | 19 | extern char *GetTextString(enum TEXTSTRING_ID stringID); 20 | /*KJL********************************************************** 21 | * This function returns a pointer to a null terminated string * 22 | * which is described by its enumeration value, as defined in * 23 | * the header file langenum.h. * 24 | **********************************************************KJL*/ 25 | 26 | 27 | 28 | extern char *LoadTextFile(char *filename); 29 | /*KJL***************************************************** 30 | * Platform specific function, which loads the named file * 31 | * and returns a pointer to the start of the file's data. * 32 | *****************************************************KJL*/ 33 | 34 | extern void UnloadTextFile(char *filename, char *bufferPtr); 35 | /*KJL********************************************************** 36 | * Platform specific function, which unloads the named file * 37 | * and frees the memory pointed to by the bufferPtr. You may * 38 | * not need the filename, but I'm passing it for completeness. * 39 | **********************************************************KJL*/ 40 | 41 | 42 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/LIGHTING.H: -------------------------------------------------------------------------------- 1 | enum LIGHTING_EFFECTS_ID 2 | { 3 | LFX_EXPLOSION, 4 | LFX_MUZZLEFLASH, 5 | LFX_PARTICLECANNON, 6 | LFX_ROCKETJET, 7 | LFX_FLARE, 8 | LFX_BIGEXPLOSION, 9 | LFX_XENO_FIRING, 10 | LFX_PLASMA_BOLT, 11 | LFX_OBJECTONFIRE, 12 | LFX_SPEARGUNBOLT 13 | }; 14 | 15 | /* explosions light an area which has a max 15m radius */ 16 | #define EXPLOSION_LIGHT_RANGE 15000 17 | //#define EXPLOSION_LIGHT_RANGE 30000 18 | 19 | extern void AddLightingEffectToObject(DISPLAYBLOCK *objectPtr, enum LIGHTING_EFFECTS_ID lfxID); 20 | extern void LightBlockDeallocation(void); 21 | 22 | 23 | 24 | enum LIGHTELEMENT_BEHAVIOUR_ID 25 | { 26 | LIGHTELEMENT_MOLTENMETAL, 27 | LIGHTELEMENT_PLASMACASTERHIT, 28 | LIGHTELEMENT_FROMFMV, 29 | LIGHTELEMENT_ROTATING, 30 | LIGHTELEMENT_EXPLOSION, 31 | LIGHTELEMENT_ELECTRICAL_EXPLOSION, 32 | LIGHTELEMENT_ELECTRICAL_SPARKS, 33 | LIGHTELEMENT_ALIEN_TEETH, 34 | LIGHTELEMENT_ALIEN_TEETH2, 35 | LIGHTELEMENT_PARGEN_FLAME, 36 | }; 37 | 38 | typedef struct 39 | { 40 | enum LIGHTELEMENT_BEHAVIOUR_ID BehaviourID; 41 | 42 | LIGHTBLOCK LightBlock; 43 | int LifeTime; 44 | 45 | } LIGHTELEMENT; 46 | 47 | 48 | void InitialiseLightElementSystem(void); 49 | void MakeLightElement(VECTORCH *positionPtr, enum LIGHTELEMENT_BEHAVIOUR_ID behaviourID); 50 | void HandleLightElementSystem(void); 51 | 52 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/MACRO.H: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Project specific inline macro support, 4 | currently platform specific by 5 | default 6 | 7 | */ 8 | 9 | 10 | #define GNU_ABS(x) (((x) < 0) ? -(x) : (x)) 11 | 12 | #define GNU_SIGN(x) (((x) < 0) ? -1 : +1) 13 | 14 | 15 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/MAPS.C: -------------------------------------------------------------------------------- 1 | /* 2 | this now contains only the map processing 3 | functions for the PC and saturn - compiled in maos 4 | have been moved to comp_map 5 | */ 6 | #include "3dc.h" 7 | #include "module.h" 8 | #include "inline.h" 9 | 10 | #include "stratdef.h" 11 | #include "gamedef.h" 12 | 13 | #define UseLocalAssert Yes 14 | 15 | #include "ourasert.h" 16 | 17 | 18 | /************ GLOBALS **********/ 19 | 20 | 21 | DISPLAYBLOCK *Player; 22 | 23 | 24 | /***************************************************************/ 25 | 26 | /* MAP TYPE PROCESSING FUNCTIONS*/ 27 | 28 | /**************************************************************/ 29 | /* 30 | The functions require a pointer to a display block. It uses "ObType" 31 | in the block to select the function. 32 | */ 33 | 34 | static void Process_Default_MapType(DISPLAYBLOCK *dblockptr); 35 | static void Process_Player_MapType(DISPLAYBLOCK *dblockptr); 36 | static void Process_PlayerShipCamera_MapType(DISPLAYBLOCK *dblockptr); 37 | static void Process_Sprite_MapType(DISPLAYBLOCK *dblockptr); 38 | static void Process_Term_MapType(DISPLAYBLOCK *dblockptr); 39 | 40 | 41 | void (*MapTypeFunctions[])(DISPLAYBLOCK *dblockptr) = 42 | { 43 | Process_Default_MapType, 44 | Process_Player_MapType, 45 | Process_PlayerShipCamera_MapType, /* Player ship camera */ 46 | Process_Sprite_MapType, 47 | Process_Term_MapType 48 | }; 49 | 50 | 51 | static void Process_Default_MapType(DISPLAYBLOCK *dptr) 52 | { 53 | dptr->ObLightType = LightType_PerVertex; 54 | dptr->ObFlags |= ObFlag_MultLSrc; 55 | } 56 | 57 | 58 | static void Process_Player_MapType(DISPLAYBLOCK *dptr) 59 | { 60 | Player = dptr; 61 | } 62 | 63 | 64 | static void Process_PlayerShipCamera_MapType(DISPLAYBLOCK *dptr) 65 | { 66 | } 67 | 68 | 69 | 70 | static void Process_Sprite_MapType(DISPLAYBLOCK *dblockptr) 71 | { 72 | } 73 | 74 | 75 | static void Process_Term_MapType(DISPLAYBLOCK *dptr) 76 | {} 77 | 78 | 79 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/PHEROMON.H: -------------------------------------------------------------------------------- 1 | /*-----------------------Patrick 14/11/96-------------------------- 2 | Header for AVP Pheromone system 3 | -----------------------------------------------------------------*/ 4 | 5 | #define SUPER_PHEROMONE_SYSTEM 1 6 | 7 | /* Global Data access to pheromone system */ 8 | 9 | extern unsigned int *PherPl_ReadBuf; 10 | extern unsigned int *PherPl_WriteBuf; 11 | #if SUPER_PHEROMONE_SYSTEM 12 | extern unsigned int *PherAls_ReadBuf; 13 | extern unsigned int *PherAls_WriteBuf; 14 | 15 | extern unsigned int *PherMars_ReadBuf; 16 | extern unsigned int *PherMars_WriteBuf; 17 | #endif 18 | extern unsigned char *PherAi_Buf; 19 | extern MODULE *playerPherModule; 20 | 21 | /* function prototypes */ 22 | void InitPheromoneSystem(void); 23 | void PlayerPheromoneSystem(void); 24 | void AiPheromoneSystem(void); 25 | void CleanUpPheromoneSystem(void); 26 | int AIModuleAdmitsPheromones(AIMODULE *targetModule); 27 | 28 | #if SUPER_PHEROMONE_SYSTEM 29 | void AddMarinePheromones(AIMODULE *targetModule); 30 | void MaintainMarineTargetZone(AIMODULE *targetModule); 31 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/PMOVE.H: -------------------------------------------------------------------------------- 1 | /*--------------Patrick 15/10/96 --------------------- 2 | Header File for Player Movement Stuff 3 | ---------------------------------------------------*/ 4 | 5 | 6 | #ifndef _pmove_h_ 7 | #define _pmove_h_ 1 8 | 9 | 10 | 11 | #ifdef __cplusplus 12 | 13 | extern "C" { 14 | 15 | #endif 16 | 17 | 18 | 19 | 20 | /*--------------Patrick 15/10/96 --------------------- 21 | Enumeration of player movement states 22 | Free movement indicates normal movement. 23 | Special Movement indicates that the player is 24 | executing a special move. 25 | Aborting indicates that a special move is 26 | prematurely terminating. 27 | ---------------------------------------------------*/ 28 | 29 | typedef enum player_mov_state 30 | { 31 | PMov_FreeMovement, 32 | PMov_SpecialMovement, 33 | PMov_AbortingSpecialMovement, 34 | }PLAYER_MOVEMENT_STATE; 35 | 36 | /*--------------Patrick 15/10/96 --------------------- 37 | Enumeration of special move types 38 | Special moves are flagged as belonging to a 39 | character type 40 | ---------------------------------------------------*/ 41 | 42 | 43 | /*--------------Patrick 31/10/96 --------------------- 44 | Enumeration of player's morphing states for crouching 45 | and lying down. 46 | ---------------------------------------------------*/ 47 | typedef enum player_morph_state 48 | { 49 | PMph_Standing, 50 | PMph_Crouching, 51 | PMph_Lying, 52 | PMph_StoC, 53 | PMph_CtoS, 54 | PMph_StoL, 55 | PMph_LtoS, 56 | 57 | }PLAYER_MORPH_STATE; 58 | 59 | 60 | 61 | 62 | /*--------------Patrick 1/11/96 --------------------- 63 | this define determines how crouching and lying down 64 | are implemented for the player. It can either be 65 | done by changing the shape, or by morphing.... 66 | Morphing is better, but doesn't work with the current 67 | collision system. 68 | ---------------------------------------------------*/ 69 | #define CrouchByMorphingPlayer 0 70 | 71 | 72 | /* Prototypes */ 73 | extern void InitPlayerMovementData(STRATEGYBLOCK* sbPtr); 74 | extern void PlayerBehaviour(STRATEGYBLOCK* sbptr); 75 | extern void ExecuteFreeMovement(STRATEGYBLOCK* sbPtr); 76 | 77 | 78 | #ifdef __cplusplus 79 | 80 | } 81 | 82 | #endif 83 | 84 | 85 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/Paintball.h: -------------------------------------------------------------------------------- 1 | /* KJL 16:20:56 30/09/98 - Paintball.h */ 2 | #ifndef _included_paintball_h_ /* Is this your first time? */ 3 | #define _included_paintball_h_ 1 4 | 5 | #include "Decal.h" 6 | 7 | typedef struct 8 | { 9 | DISPLAYBLOCK *TargetDispPtr; 10 | VECTORCH TargetPosition; 11 | VECTORCH TargetNormal; 12 | 13 | enum DECAL_ID CurrentDecalID; 14 | int CurrentDecalSubclass; 15 | int CurrentDecalSize; 16 | int CurrentDecalRotation; 17 | 18 | unsigned int IsOn :1; 19 | unsigned int DecalIsInverted :1; 20 | 21 | } PAINTBALLMODE; 22 | 23 | extern PAINTBALLMODE PaintBallMode; 24 | 25 | #define FIRST_PAINTBALL_DECAL (DECAL_SCORCHED) 26 | #define LAST_PAINTBALL_DECAL (DECAL_HUMAN_BLOOD) 27 | 28 | extern void TogglePaintBallMode(void); 29 | extern void PaintBallMode_DrawCurrentDecalAtTarget(void); 30 | extern void PaintBallMode_ChangeSelectedDecalID(int delta); 31 | extern void PaintBallMode_ChangeSize(int delta); 32 | extern void PaintBallMode_AddDecal(void); 33 | 34 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/TRIGGERS.H: -------------------------------------------------------------------------------- 1 | extern void OperateObjectInLineOfSight(void); 2 | extern BOOL AnythingInMyModule(MODULE* my_mod); -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_RubberDuck.h: -------------------------------------------------------------------------------- 1 | extern void CreateRubberDuckBot(void); 2 | extern void CreateRubberDuck(VECTORCH *positionPtr); 3 | extern void CreateRubberDucks(void); 4 | extern void RubberDuckBehaviour(STRATEGYBLOCK *sbPtr); 5 | 6 | extern void CreateFlamingDebris(VECTORCH *positionPtr, VECTORCH *dirPtr); 7 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_agun.h: -------------------------------------------------------------------------------- 1 | // RWH - the autogun code 2 | 3 | /* CDF 25/7/98 - Heaven help us. */ 4 | 5 | extern void AutoGunBehaveFun(STRATEGYBLOCK* ag_sbptr); 6 | extern void AutoGunBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); 7 | //extern void CreatePlayerAutogun(void); 8 | 9 | void MakeSentrygunNear(STRATEGYBLOCK *sbPtr); 10 | void MakeSentrygunFar(STRATEGYBLOCK *sbPtr); 11 | int AGunSight_FrustrumReject(VECTORCH *localOffset); 12 | void AGunIsDamaged(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple, int wounds,VECTORCH *incoming); 13 | 14 | typedef enum { 15 | I_disabled, 16 | I_tracking, 17 | I_inactive, 18 | }AG_STATE; 19 | 20 | typedef struct autogun_behaviour_block 21 | { 22 | AG_STATE behaviourState; 23 | int stateTimer; 24 | 25 | HMODELCONTROLLER HModelController; 26 | DELTA_CONTROLLER *gun_pan; 27 | DELTA_CONTROLLER *gun_tilt; 28 | 29 | STRATEGYBLOCK *Target; 30 | char Target_SBname[SB_NAME_LENGTH]; 31 | /* A level of indirection for better control. */ 32 | VECTORCH targetTrackPos; 33 | 34 | int Gun_Pan; 35 | int Gun_Tilt; 36 | DISPLAYBLOCK *GunFlash; 37 | 38 | int incidentFlag; 39 | int incidentTimer; 40 | 41 | int ammo; 42 | int roundsFired; 43 | int volleyFired; 44 | 45 | int soundHandle; 46 | int soundHandle2; 47 | int Firing; 48 | int WhirrSoundOn; 49 | int Drama; 50 | 51 | unsigned int createdByPlayer:1; 52 | unsigned int gunpandir :1; 53 | unsigned int guntiltdir :1; 54 | unsigned int IAmFar :1; 55 | 56 | unsigned int OnTarget :1; 57 | unsigned int OnTarget_LastFrame :1; 58 | 59 | char death_target_ID[SB_NAME_LENGTH]; 60 | STRATEGYBLOCK* death_target_sbptr; 61 | int death_target_request; 62 | 63 | }AUTOGUN_STATUS_BLOCK; 64 | 65 | 66 | typedef struct autogun_tools_template 67 | { 68 | VECTORCH position; 69 | EULER orientation; 70 | 71 | int ammo; 72 | int shapenum; 73 | int startInactive; 74 | 75 | char nameID[SB_NAME_LENGTH]; 76 | 77 | char death_target_ID[SB_NAME_LENGTH]; 78 | int death_target_request; 79 | 80 | }AUTOGUN_TOOLS_TEMPLATE; 81 | 82 | #define SGUN_PITCH_GIMBALL (1024) 83 | #define SGUN_PAN_GIMBALL (1024) 84 | #define AGUN_NEAR_VIEW_WIDTH 500 /* mm */ 85 | 86 | #define AGUN_ROF (30) 87 | #define AGUN_VOLLEYSIZE (15) 88 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_cable.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_cable_h 2 | #define _bh_cable_h 1 3 | 4 | #ifdef __cplusplus 5 | 6 | extern "C" { 7 | 8 | #endif 9 | 10 | extern void* PowerCableBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); 11 | extern void PowerCableBehaveFun(STRATEGYBLOCK* sbptr); 12 | 13 | 14 | #define CABLE_HEALTH_DISTANCE 2000 15 | 16 | typedef struct power_cable_behav_block 17 | { 18 | AVP_BEHAVIOUR_TYPE bhvr_type; 19 | 20 | char nameID[SB_NAME_LENGTH]; 21 | 22 | VECTORCH position; 23 | 24 | int max_charge; //health value in fixed point 25 | int current_charge; //ditto 26 | int recharge_rate; //recharge rate per second 27 | }POWER_CABLE_BEHAV_BLOCK; 28 | 29 | typedef struct power_cable_tools_template 30 | { 31 | char nameID[SB_NAME_LENGTH]; 32 | VECTORCH position; 33 | int max_charge; 34 | int current_charge; 35 | int recharge_rate; 36 | }POWER_CABLE_TOOLS_TEMPLATE; 37 | 38 | 39 | 40 | 41 | 42 | #ifdef __cplusplus 43 | 44 | }; 45 | 46 | #endif 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_corpse.h: -------------------------------------------------------------------------------- 1 | #ifndef bh_corpse_h_included 2 | #define bh_corpse_h_included 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #define CORPSE_SIGHTINGS 1 8 | 9 | typedef struct netcorpsedatablock { 10 | int timer; 11 | int validityTimer; 12 | int SoundHandle; /* Just in case. */ 13 | int SoundHandle2; 14 | int SoundHandle3; 15 | int SoundHandle4; 16 | HMODELCONTROLLER HModelController; 17 | 18 | AVP_BEHAVIOUR_TYPE Type; 19 | HITLOCATIONTABLE *hltable; 20 | int GibbFactor; 21 | DEATH_DATA *This_Death; 22 | /* If you're a predator... */ 23 | PRED_CLOAKSTATE CloakStatus; 24 | int CloakTimer; 25 | int destructTimer; 26 | /* If you're a marine... */ 27 | void (*WeaponMisfireFunction)(SECTION_DATA *, int *); 28 | SECTION_DATA *My_Gunflash_Section; 29 | SECTION *TemplateRoot; 30 | struct marine_weapon_data *My_Weapon; 31 | int weapon_variable; 32 | int Android; 33 | int ARealMarine; 34 | /* If you're an alien... */ 35 | int subtype; 36 | 37 | int Wounds; 38 | 39 | int DeathFiring :1; 40 | 41 | 42 | }NETCORPSEDATABLOCK; 43 | 44 | extern void Convert_Alien_To_Corpse(STRATEGYBLOCK *sbPtr,DEATH_DATA *this_death,DAMAGE_PROFILE* damage); 45 | extern void Convert_Predator_To_Corpse(STRATEGYBLOCK *sbPtr,DEATH_DATA *this_death); 46 | extern void Convert_Marine_To_Corpse(STRATEGYBLOCK *sbPtr,DEATH_DATA *this_death); 47 | extern void Convert_Xenoborg_To_Corpse(STRATEGYBLOCK *sbPtr,DEATH_DATA *this_death); 48 | extern void CorpseBehaveFun(STRATEGYBLOCK *sbPtr); 49 | extern void MakeCorpseNear(STRATEGYBLOCK *sbPtr); 50 | extern void MakeCorpseFar(STRATEGYBLOCK *sbPtr); 51 | extern void CorpseIsDamaged(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple, int wounds,SECTION_DATA *Section,VECTORCH *incoming); 52 | 53 | #define CORPSE_EXPIRY_TIME (ONE_FIXED*10) 54 | #define CORPSE_VALIDITY_TIME (ONE_FIXED>>2) 55 | #define ALIEN_DYINGTIME (ONE_FIXED*8) 56 | #define PRED_DIETIME (ONE_FIXED*16) 57 | #define MARINE_DYINGTIME (ONE_FIXED*16) 58 | #define XENO_DYINGTIME (ONE_FIXED*8) 59 | #define AGUN_DYINGTIME (ONE_FIXED*8) 60 | #define HDEBRIS_LIFETIME (ONE_FIXED*8) 61 | /* Was (ONE_FIXED*3)... */ 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_deathvol.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_deathvol_h 2 | #define _bh_deathvol_h 1 3 | 4 | #ifdef __cplusplus 5 | 6 | extern "C" { 7 | 8 | #endif 9 | 10 | extern void* DeathVolumeBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); 11 | extern void DeathVolumeBehaveFun(STRATEGYBLOCK* sbptr); 12 | 13 | 14 | typedef struct death_volume_behav_block 15 | { 16 | AVP_BEHAVIOUR_TYPE bhvr_type; 17 | VECTORCH volume_min; 18 | VECTORCH volume_max; 19 | unsigned int damage_per_second; //0 means infinite damage (a proper death volume - bwa ha ha.) 20 | unsigned int active :1; 21 | unsigned int collision_required :1; 22 | }DEATH_VOLUME_BEHAV_BLOCK; 23 | 24 | typedef struct death_volume_tools_template 25 | { 26 | char nameID[SB_NAME_LENGTH]; 27 | VECTORCH volume_min; 28 | VECTORCH volume_max; 29 | unsigned int damage_per_second; 30 | unsigned int active :1; 31 | unsigned int collision_required :1; 32 | }DEATH_VOLUME_TOOLS_TEMPLATE; 33 | 34 | 35 | 36 | 37 | 38 | #ifdef __cplusplus 39 | 40 | }; 41 | 42 | #endif 43 | 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_debri.h: -------------------------------------------------------------------------------- 1 | typedef struct OneShotAnimBehaviourType 2 | { 3 | int counter; 4 | TXACTRLBLK *tac_os; 5 | } ONESHOT_ANIM_BEHAV_BLOCK; 6 | 7 | typedef struct SmokeGenBehaviourType 8 | { 9 | int counter; 10 | int smokes; 11 | } SMOKEGEN_BEHAV_BLOCK; 12 | 13 | typedef struct HierarchicalDebrisBehaviourType { 14 | int counter; 15 | int smokes; 16 | int GibbFactor; 17 | int Android; 18 | HMODELCONTROLLER HModelController; 19 | 20 | /* behaviour type of parent object, e.g. I_BehaviourAlien */ 21 | AVP_BEHAVIOUR_TYPE Type; 22 | int SubType; 23 | 24 | /* Silly stuff for bouncing sounds. */ 25 | int bouncelastframe; 26 | enum soundindex Bounce_Sound; 27 | 28 | } HDEBRIS_BEHAV_BLOCK; 29 | 30 | // extern functions 31 | 32 | extern DISPLAYBLOCK *MakeDebris(AVP_BEHAVIOUR_TYPE bhvr, VECTORCH *positionPtr); 33 | extern DISPLAYBLOCK *MakeHierarchicalDebris(STRATEGYBLOCK *parent_sbPtr,SECTION_DATA *root, VECTORCH *positionPtr, MATRIXCH *orientation, int *wounds, int speed); 34 | extern void Pop_Section(STRATEGYBLOCK *sbPtr,SECTION_DATA *section_data, VECTORCH *blastcentre, int *wounds); 35 | extern void CreateShapeInstance(MODULEMAPBLOCK *mmbptr, char *shapeNamePtr); 36 | extern void OneShotBehaveFun(STRATEGYBLOCK* sptr); 37 | extern void OneShot_Anim_BehaveFun(STRATEGYBLOCK* sptr); 38 | extern void MakeFragments (STRATEGYBLOCK *sbptr); 39 | 40 | 41 | #define EXPLOSION_LIFETIME (ONE_FIXED/4) 42 | #define EXPLOSION_ANIM_SPEED (ONE_FIXED*16) 43 | #define EXPLOSION_LIGHTING_SCALE (ONE_FIXED*16/3) 44 | #if PSX || Saturn 45 | #define NO_OF_SPRITES_IN_BIG_EXPLOSION 5 46 | #else 47 | #define NO_OF_SPRITES_IN_BIG_EXPLOSION 10 48 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_dummy.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _bhdummy_h_ 3 | #define _bhdummy_h_ 1 4 | 5 | 6 | #ifdef __cplusplus 7 | 8 | extern "C" { 9 | 10 | #endif 11 | 12 | #include "bh_ais.h" 13 | 14 | typedef struct dummyStatusBlock { 15 | I_PLAYER_TYPE PlayerType; 16 | int incidentFlag; 17 | int incidentTimer; 18 | HMODELCONTROLLER HModelController; 19 | } DUMMY_STATUS_BLOCK; 20 | 21 | 22 | extern void MakeDummyNear(STRATEGYBLOCK *sbPtr); 23 | extern void MakeDummyFar(STRATEGYBLOCK *sbPtr); 24 | extern void DummyBehaviour(STRATEGYBLOCK *sbPtr); 25 | 26 | 27 | #ifdef __cplusplus 28 | 29 | } 30 | 31 | #endif 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_fan.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_fan_h_ 2 | #define _bh_fan_h_ 1 3 | 4 | 5 | #ifdef __cplusplus 6 | 7 | extern "C" { 8 | 9 | #endif 10 | 11 | void* FanBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); 12 | void FanBehaveFun(STRATEGYBLOCK* sbptr); 13 | 14 | 15 | 16 | typedef enum fan_states 17 | { 18 | fan_state_go, 19 | fan_state_stop, 20 | }FAN_STATE; 21 | 22 | 23 | typedef struct fan_behav_block 24 | { 25 | AVP_BEHAVIOUR_TYPE bhvr_type; 26 | 27 | FAN_STATE state; 28 | 29 | TRACK_CONTROLLER* track; 30 | 31 | int speed_up_mult; //one over time take to get to full speed 32 | int slow_down_mult; //one over time take to stop 33 | int speed_mult; //0 to one_fixed : current speed relative to full speed 34 | 35 | VECTORCH fan_wind_direction; //normalised vector 36 | int fan_wind_strength; //fixed point multiplier for fan at full speed 37 | 38 | int wind_speed;//fixed point multiplier , taking the fan's current speed into account 39 | 40 | }FAN_BEHAV_BLOCK; 41 | 42 | 43 | typedef struct fan_tools_template 44 | { 45 | char nameID[SB_NAME_LENGTH]; 46 | int shape_num; 47 | 48 | VECTORCH position; 49 | EULER orientation; 50 | 51 | int speed_up_mult; //one over time take to get to full speed 52 | int slow_down_mult; //one over time take to stop 53 | 54 | TRACK_CONTROLLER* track; 55 | 56 | VECTORCH fan_wind_direction; //normalised vector 57 | int fan_wind_strength; //fixed point multiplier 58 | }FAN_TOOLS_TEMPLATE; 59 | 60 | 61 | #ifdef __cplusplus 62 | 63 | }; 64 | 65 | #endif 66 | 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_ldoor.h: -------------------------------------------------------------------------------- 1 | /******************** LIFT DOORS ********************/ 2 | 3 | /* 4 | lift doors do not have to look at the environment for 5 | triggers. they wait for the controlling lift block to 6 | say open or closed. EXCEPT when the door is open it 7 | will not close if some other object is in its module 8 | */ 9 | 10 | 11 | typedef struct lift_door_behaviour_type 12 | { 13 | AVP_BEHAVIOUR_TYPE bhvr_type; 14 | DOOR_STATES door_state; 15 | MORPHCTRL *PDmctrl; 16 | 17 | DOOR_STATES request_state; 18 | 19 | int SoundHandle; 20 | 21 | /*---- Patrick 1/1/97 ----- 22 | added for far ai stratgies 23 | --------------------------*/ 24 | int door_opening_speed; 25 | int door_closing_speed; 26 | } LIFT_DOOR_BEHAV_BLOCK; 27 | 28 | 29 | typedef struct lift_door_tools_template 30 | { 31 | BOOL state; 32 | MREF my_module; 33 | int shape_open; 34 | int shape_closed; 35 | char nameID[SB_NAME_LENGTH]; 36 | 37 | int door_opening_speed; 38 | int door_closing_speed; 39 | } LIFT_DOOR_TOOLS_TEMPLATE; 40 | 41 | 42 | extern void* LiftDoorBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); 43 | extern void LiftDoorBehaveFun(STRATEGYBLOCK* sbptr); 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_ltfx.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_ltfx_h 2 | #define _bh_ltfx_h 1 3 | 4 | #include "ltfx_exp.h" 5 | 6 | 7 | typedef struct light_fx_behav_block 8 | { 9 | AVP_BEHAVIOUR_TYPE bhvr_type; 10 | 11 | LIGHT_FX_TYPE type; 12 | LIGHT_FX_STATE current_state; 13 | 14 | unsigned long fade_up_speed; 15 | unsigned long fade_down_speed; 16 | 17 | unsigned long post_fade_up_delay; 18 | unsigned long post_fade_down_delay; 19 | 20 | unsigned long fade_up_speed_multiplier; 21 | unsigned long fade_down_speed_multiplier; 22 | 23 | unsigned long post_fade_up_delay_multiplier; 24 | unsigned long post_fade_down_delay_multiplier; 25 | 26 | signed long multiplier; 27 | unsigned long timer; 28 | unsigned long timer2; 29 | 30 | signed long time_to_next_flicker_state; 31 | 32 | TXACTRLBLK *anim_control; 33 | } LIGHT_FX_BEHAV_BLOCK; 34 | 35 | typedef struct light_fx_tools_template 36 | { 37 | 38 | LightFXData light_data; 39 | 40 | char nameID[SB_NAME_LENGTH]; 41 | MREF my_module; 42 | 43 | } LIGHT_FX_TOOLS_TEMPLATE; 44 | 45 | void * LightFXBehaveInit (void * bhdata, STRATEGYBLOCK* sbptr); 46 | void LightFXBehaveFun (STRATEGYBLOCK* sbptr); 47 | 48 | 49 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_mission.h: -------------------------------------------------------------------------------- 1 | #ifndef bh_mission_h_ 2 | #define bh_mission_h 1 3 | 4 | 5 | void * MissionCompleteBehaveInit(void* bhdata,STRATEGYBLOCK* sbptr); 6 | void * MessageBehaveInit(void* bhdata,STRATEGYBLOCK* sbptr); 7 | extern void ResetMission(void* mission_objective); 8 | extern void PrintStringTableEntryInConsole(enum TEXTSTRING_ID string_id); 9 | extern void SendRequestToMessageStrategy(STRATEGYBLOCK* sbptr,BOOL state,int extended_data); 10 | extern void SendRequestToMissionStrategy(STRATEGYBLOCK* sbptr,BOOL state,int extended_data); 11 | 12 | 13 | //when this strategy receives a request state of 1 it notifies its attached mission that 14 | //it has been achieved 15 | 16 | typedef struct mission_complete_tools_template 17 | { 18 | void* mission_objective_ptr; 19 | char nameID [SB_NAME_LENGTH]; 20 | }MISSION_COMPLETE_TOOLS_TEMPLATE; 21 | 22 | typedef struct mission_complete_target 23 | { 24 | AVP_BEHAVIOUR_TYPE bhvr_type; 25 | void* mission_objective_ptr; 26 | 27 | }MISSION_COMPLETE_BEHAV_BLOCK; 28 | 29 | 30 | 31 | //this strategy displays its message upon receiving a request state of 1 32 | 33 | typedef struct message_tools_template 34 | { 35 | enum TEXTSTRING_ID string_no; 36 | char nameID [SB_NAME_LENGTH]; 37 | BOOL active; 38 | }MESSAGE_TOOLS_TEMPLATE; 39 | 40 | 41 | typedef struct message_behav_block 42 | { 43 | AVP_BEHAVIOUR_TYPE bhvr_type; 44 | enum TEXTSTRING_ID string_no; 45 | BOOL active; 46 | 47 | }MESSAGE_BEHAV_BLOCK; 48 | 49 | 50 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_pargen.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_pargen_h 2 | #define _bh_pargen_h 1 3 | 4 | #ifdef __cplusplus 5 | 6 | extern "C" { 7 | 8 | #endif 9 | #include "track.h" 10 | 11 | extern void* ParticleGeneratorBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); 12 | extern void ParticleGeneratorBehaveFun(STRATEGYBLOCK* sbptr); 13 | extern void SendRequestToParticleGenerator(STRATEGYBLOCK* sbptr,BOOL state,int extended_data); 14 | 15 | typedef enum particle_generator_type 16 | { 17 | PARGEN_TYPE_SPARK, 18 | PARGEN_TYPE_STEAM, 19 | PARGEN_TYPE_BLACKSMOKE, 20 | PARGEN_TYPE_FLAME, 21 | PARGEN_TYPE_LAST 22 | 23 | }PARTICLE_GENERATOR_TYPE; 24 | 25 | 26 | typedef struct particle_generator_behav_block 27 | { 28 | AVP_BEHAVIOUR_TYPE bhvr_type; 29 | 30 | VECTORCH position; 31 | MATRIXCH orientation; 32 | 33 | VECTORCH relative_position; //relative to parent object (if it exists) 34 | MATRIXCH relative_orientation; //relative to parent object (if it exists) 35 | 36 | PARTICLE_GENERATOR_TYPE type;//particle generator type 37 | 38 | TRACK_SOUND* sound; //not actually a track , but it will do 39 | 40 | STRATEGYBLOCK* parent_sbptr; 41 | 42 | int timer; //time left to next particle burst 43 | 44 | int frequency; //time between bursts 45 | int probability; //probability of particles (0 - 65536) 46 | int speed; //mm/second 47 | 48 | unsigned int active :1; //is generator currently active 49 | 50 | }PARTICLE_GENERATOR_BEHAV_BLOCK; 51 | 52 | typedef struct particle_generator_tools_template 53 | { 54 | char nameID[SB_NAME_LENGTH]; 55 | char parentID[SB_NAME_LENGTH]; 56 | VECTORCH position; 57 | MATRIXCH orientation; 58 | 59 | PARTICLE_GENERATOR_TYPE type;//particle generator type 60 | 61 | TRACK_SOUND* sound; //not actually a track , but it will do 62 | 63 | int frequency; //time between bursts 64 | int probability; //probability of particles (0 - 65536) 65 | int speed; //mm/second 66 | 67 | unsigned int active :1; 68 | }PARTICLE_GENERATOR_TOOLS_TEMPLATE; 69 | 70 | 71 | 72 | 73 | 74 | #ifdef __cplusplus 75 | 76 | }; 77 | 78 | #endif 79 | 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_plachier.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_plachier_h_ 2 | #define _bh_plachier_h_ 1 3 | 4 | #include "bh_track.h" //for the special_track_point structure 5 | 6 | #ifdef __cplusplus 7 | 8 | extern "C" { 9 | 10 | #endif 11 | 12 | 13 | typedef struct placed_hierarchy_sound 14 | { 15 | unsigned long inner_range; 16 | unsigned long outer_range; 17 | int max_volume; 18 | int pitch; 19 | 20 | struct loaded_sound const * sound_loaded; 21 | int activ_no; 22 | 23 | unsigned int loop:1; 24 | unsigned int playing:1; //sound should be playing (if in range) 25 | }PLACED_HIERARCHY_SOUND; 26 | 27 | typedef struct placed_hierarchy_sound_times 28 | { 29 | int start_time; 30 | int end_time; 31 | PLACED_HIERARCHY_SOUND* sound; 32 | }PLACED_HIERARCHY_SOUND_TIMES; 33 | 34 | typedef struct placed_hierarchy_sequence 35 | { 36 | int sequence_no; 37 | int sub_sequence_no; 38 | int time; 39 | unsigned int loop:1; 40 | 41 | int num_sound_times; 42 | PLACED_HIERARCHY_SOUND_TIMES* sound_times; 43 | }PLACED_HIERARCHY_SEQUENCE; 44 | 45 | 46 | typedef struct placed_hierarchy_behav_block 47 | { 48 | AVP_BEHAVIOUR_TYPE bhvr_type; 49 | 50 | HMODELCONTROLLER HModelController; 51 | 52 | PLACED_HIERARCHY_SEQUENCE* current_seq; 53 | int num_sequences; 54 | PLACED_HIERARCHY_SEQUENCE* sequences; 55 | 56 | VECTORCH* sound_location; 57 | 58 | int num_sounds; 59 | PLACED_HIERARCHY_SOUND* sounds; 60 | 61 | 62 | int num_special_track_points; 63 | SPECIAL_TRACK_POINT* special_track_points; 64 | 65 | }PLACED_HIERARCHY_BEHAV_BLOCK; 66 | 67 | 68 | typedef struct placed_hierarchy_tools_template 69 | { 70 | char nameID[SB_NAME_LENGTH]; 71 | 72 | VECTORCH position; 73 | EULER orientation; 74 | 75 | int num_sequences; 76 | PLACED_HIERARCHY_SEQUENCE* sequences; 77 | PLACED_HIERARCHY_SEQUENCE* first_sequence; 78 | BOOL playing; 79 | 80 | int num_sounds; 81 | PLACED_HIERARCHY_SOUND* sounds; 82 | 83 | int num_special_track_points; 84 | SPECIAL_TRACK_POINT* special_track_points; 85 | 86 | const char* file_name; 87 | const char* hier_name; 88 | }PLACED_HIERARCHY_TOOLS_TEMPLATE; 89 | 90 | extern void* PlacedHierarchyBehaveInit(void* bhdata,STRATEGYBLOCK* sbptr); 91 | void PlacedHierarchyBehaveFun(STRATEGYBLOCK* sbptr); 92 | void MakePlacedHierarchyNear(STRATEGYBLOCK* sbptr); 93 | void DeletePlacedHierarchy(PLACED_HIERARCHY_BEHAV_BLOCK*); 94 | void SendRequestToPlacedHierarchy(STRATEGYBLOCK* sbptr,BOOL state,int extended_data); 95 | 96 | 97 | #ifdef __cplusplus 98 | 99 | }; 100 | 101 | #endif 102 | 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_plift.h: -------------------------------------------------------------------------------- 1 | #include "track.h" 2 | /*------------------------------Patrick 14/3/97----------------------------------- 3 | Header for platform lift stuff 4 | --------------------------------------------------------------------------------*/ 5 | 6 | typedef enum platformlift_states 7 | { 8 | PLBS_AtRest, 9 | PLBS_Activating, 10 | PLBS_GoingUp, 11 | PLBS_GoingDown, 12 | } PLATFORMLIFT_STATES; 13 | 14 | typedef struct platformlift_behaviour_type 15 | { 16 | VECTORCH homePosition; 17 | int upHeight; 18 | int downHeight; 19 | int activationDelayTimer; 20 | PLATFORMLIFT_STATES state; 21 | 22 | TRACK_SOUND* sound; 23 | TRACK_SOUND* start_sound; 24 | TRACK_SOUND* end_sound; 25 | 26 | // A switch will set these flags on AssignSBNames 27 | 28 | BOOL Enabled; 29 | BOOL OneUse; //if set ,lift becomes disabled after changing position once 30 | 31 | int netMsgCount; 32 | 33 | } PLATFORMLIFT_BEHAVIOUR_BLOCK; 34 | 35 | typedef struct platformlift_tools_template 36 | { 37 | struct vectorch position; 38 | struct euler orientation; 39 | int shapeIndex; 40 | int travel; /* vertical distance from start position to end position (down = +ve) */ 41 | BOOL Enabled; 42 | BOOL OneUse; 43 | char nameID[SB_NAME_LENGTH]; 44 | 45 | TRACK_SOUND* sound; 46 | TRACK_SOUND* start_sound; 47 | TRACK_SOUND* end_sound; 48 | 49 | } PLATFORMLIFT_TOOLS_TEMPLATE; 50 | 51 | #define PLATFORMLIFT_SPEED 5000 /* mm/s */ 52 | #define PLATFORMLIFT_ACTIVATIONTIME ((ONE_FIXED*3)>>1) /* fixed point seconds */ 53 | #define PLATFORMLIFT_NUMNETMESSAGES 5 54 | 55 | void InitialisePlatformLift(void* bhdata, STRATEGYBLOCK *sbPtr); 56 | void PlatformLiftBehaviour(STRATEGYBLOCK *sbPtr); 57 | 58 | void ActivatePlatformLift(STRATEGYBLOCK *sbPtr); 59 | void SendPlatformLiftUp(STRATEGYBLOCK *sbPtr); 60 | void SendPlatformLiftDown(STRATEGYBLOCK *sbPtr); 61 | void StopPlatformLift(STRATEGYBLOCK *sbPtr); 62 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_selfdest.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_selfdest_h 2 | #define _bh_selfdest_h 1 3 | 4 | #ifdef __cplusplus 5 | 6 | extern "C" { 7 | 8 | #endif 9 | 10 | extern void* SelfDestructBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); 11 | extern void SelfDestructBehaveFun(STRATEGYBLOCK* sbptr); 12 | 13 | 14 | typedef struct self_destruct_behav_block 15 | { 16 | AVP_BEHAVIOUR_TYPE bhvr_type; 17 | int timer; //in fixed point seconds 18 | BOOL active; 19 | }SELF_DESTRUCT_BEHAV_BLOCK; 20 | 21 | typedef struct self_destruct_tools_template 22 | { 23 | char nameID[SB_NAME_LENGTH]; 24 | int timer; 25 | }SELF_DESTRUCT_TOOLS_TEMPLATE; 26 | 27 | 28 | 29 | 30 | 31 | #ifdef __cplusplus 32 | 33 | }; 34 | 35 | #endif 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_snds.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_snds_h 2 | #define _bh_snds_h 3 | 4 | #include "3dc.h" 5 | #include "inline.h" 6 | #include "module.h" 7 | 8 | #include "jsndsup.h" 9 | 10 | #ifdef __cplusplus 11 | 12 | extern "C" { 13 | 14 | #endif 15 | 16 | typedef struct sound_tools_template 17 | { 18 | VECTORCH position; 19 | 20 | unsigned long inner_range; 21 | unsigned long outer_range; 22 | 23 | unsigned long max_volume; 24 | unsigned long pitch; 25 | 26 | unsigned int playing :1; 27 | unsigned int loop :1; 28 | 29 | char * sound_name; 30 | LOADED_SOUND const * sound_loaded; 31 | 32 | } SOUND_TOOLS_TEMPLATE; 33 | 34 | 35 | typedef struct sound_behav_block 36 | { 37 | VECTORCH position; 38 | 39 | unsigned long inner_range; 40 | unsigned long outer_range; 41 | int max_volume; 42 | int pitch; 43 | 44 | int activ_no; 45 | 46 | char * wav_name; 47 | 48 | // sound management stuff 49 | 50 | LOADED_SOUND const * sound_loaded; 51 | 52 | BOOL sound_not_started; 53 | 54 | unsigned int playing :1; 55 | unsigned int loop :1; 56 | 57 | } SOUND_BEHAV_BLOCK; 58 | 59 | void * SoundBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); 60 | void SoundBehaveFun (STRATEGYBLOCK * ); 61 | void SoundBehaveDestroy (STRATEGYBLOCK * sbptr); 62 | 63 | void StartPlacedSoundPlaying(STRATEGYBLOCK* sbptr); 64 | void StopPlacedSoundPlaying(STRATEGYBLOCK* sbptr); 65 | 66 | 67 | #ifdef __cplusplus 68 | 69 | }; // end of extern "c" 70 | 71 | #endif 72 | 73 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_spcl.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_spcl_h 2 | #define _bh_spcl_h 1 3 | 4 | #include "3dc.h" 5 | #include "inline.h" 6 | #include "module.h" 7 | 8 | #include "stratdef.h" 9 | #include "gamedef.h" 10 | #include "bh_types.h" 11 | 12 | 13 | void * InitXenoMorphRoom (void * bhdata, STRATEGYBLOCK * sbptr); 14 | void XenoMorphRoomBehaviour (STRATEGYBLOCK * sbptr); 15 | 16 | 17 | typedef struct xeno_morph_room_tools_template 18 | { 19 | int MainShape; 20 | 21 | int ShutShape; 22 | int WallsOutShape; 23 | int ProbesInShape; 24 | 25 | MREF my_module; 26 | char nameID[SB_NAME_LENGTH]; 27 | 28 | char doorID[SB_NAME_LENGTH]; 29 | 30 | } XENO_MORPH_ROOM_TOOLS_TEMPLATE; 31 | 32 | typedef enum xeno_morph_room_state 33 | { 34 | XMRS_Idle, 35 | XMRS_SafetyChecks, 36 | XMRS_EnclosingPlayer, 37 | XMRS_WallsOut, 38 | XMRS_ProbesIn, 39 | XMRS_FadeToBlack, 40 | XMRS_Process, 41 | XMRS_Return, 42 | XMRS_ReleasePlayer, 43 | XMRS_Finished, 44 | 45 | } XENO_MORPH_ROOM_STATE; 46 | 47 | 48 | typedef struct xeno_morph_room_data 49 | { 50 | AVP_BEHAVIOUR_TYPE bhvr_type; 51 | TXACTRLBLK *tacb; 52 | 53 | MORPHCTRL *XMR_Mctrl; 54 | 55 | XENO_MORPH_ROOM_STATE XMR_State; 56 | 57 | int MainShape; 58 | int ShutShape; 59 | int WallsOutShape; 60 | int ProbesInShape; 61 | 62 | int timer; 63 | 64 | #if PSX 65 | struct polyheader ** pis_items_str; 66 | struct psx_texture ** pis_sht_str; 67 | #else 68 | int ** pis_items_str; 69 | int ** pis_sht_str; 70 | #endif 71 | 72 | char doorID[SB_NAME_LENGTH]; 73 | STRATEGYBLOCK* DoorToRoom; 74 | 75 | } XENO_MORPH_ROOM_DATA; 76 | 77 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_track.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_track_h_ 2 | #define _bh_track_h_ 1 3 | 4 | #include "track.h" 5 | 6 | #ifdef __cplusplus 7 | 8 | extern "C" { 9 | 10 | #endif 11 | 12 | extern void* TrackObjectBehaveInit(void* bhdata, STRATEGYBLOCK* sbptr); 13 | extern void TrackObjectBehaveFun(STRATEGYBLOCK* sbptr); 14 | extern void TrackObjectIsDamaged(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple); 15 | 16 | extern int TrackObjectGetSynchData(STRATEGYBLOCK* sbptr); 17 | extern void TrackObjectSetSynchData(STRATEGYBLOCK* sbptr,int status); 18 | 19 | typedef enum track_object_req_states 20 | { 21 | track_no_request, 22 | track_request_start, 23 | track_request_stop, 24 | track_request_startforward, 25 | track_request_startbackward, 26 | }TRACK_OBJECT_REQUEST_STATE; 27 | 28 | 29 | 30 | #ifndef TrackRequestFlag_ActiveForward 31 | #define TrackRequestFlag_ActiveForward 0x00000001 32 | #define TrackRequestFlag_ActiveBackward 0x00000002 33 | #define TrackRequestFlag_OppositeBackward 0x00000004 34 | #endif 35 | typedef struct track_point_target 36 | { 37 | 38 | char target_name [SB_NAME_LENGTH]; 39 | STRATEGYBLOCK * target_sbptr; 40 | int request; 41 | int flags; 42 | 43 | }TRACK_POINT_TARGET; 44 | 45 | typedef struct special_track_point 46 | { 47 | int track_point_no; 48 | int num_targets; 49 | 50 | TRACK_POINT_TARGET* targets; 51 | 52 | }SPECIAL_TRACK_POINT; 53 | 54 | typedef struct track_object_behav_block 55 | { 56 | AVP_BEHAVIOUR_TYPE bhvr_type; 57 | BOOL Indestructable; 58 | 59 | TRACK_CONTROLLER* to_track; 60 | 61 | TRACK_OBJECT_REQUEST_STATE request; 62 | 63 | TXACTRLBLK *to_tac;//for objects with anims on them 64 | 65 | int num_special_track_points; 66 | SPECIAL_TRACK_POINT* special_track_points; 67 | 68 | int destruct_target_request; 69 | char destruct_target_ID[SB_NAME_LENGTH]; 70 | STRATEGYBLOCK* destruct_target_sbptr; 71 | 72 | int TimeUntilNetSynchAllowed; 73 | }TRACK_OBJECT_BEHAV_BLOCK; 74 | 75 | 76 | typedef struct track_object_tools_template 77 | { 78 | char nameID[SB_NAME_LENGTH]; 79 | int shape_num; 80 | 81 | TRACK_CONTROLLER* track; 82 | 83 | VECTORCH position; 84 | EULER orientation; 85 | 86 | int num_special_track_points; 87 | SPECIAL_TRACK_POINT* special_track_points; 88 | 89 | 90 | int integrity; // 0-20 (>20 = indestructable) 91 | int destruct_target_request; 92 | char destruct_target_ID[SB_NAME_LENGTH]; 93 | 94 | }TRACK_OBJECT_TOOLS_TEMPLATE; 95 | 96 | 97 | #ifdef __cplusplus 98 | 99 | }; 100 | 101 | #endif 102 | 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_videoscreen.h: -------------------------------------------------------------------------------- 1 | #ifndef _bh_videoscreen_h 2 | #define _bh_videoscreen_h 3 | 4 | typedef struct video_screen_behav_block 5 | { 6 | AVP_BEHAVIOUR_TYPE bhvr_type; 7 | BOOL Indestructable; 8 | 9 | TXACTRLBLK *inan_tac;//for video screens with anims on them 10 | 11 | int destruct_target_request; 12 | char destruct_target_ID[SB_NAME_LENGTH]; 13 | STRATEGYBLOCK* destruct_target_sbptr; 14 | 15 | }VIDEO_SCREEN_BEHAV_BLOCK; 16 | 17 | 18 | typedef struct toolsdata_video_screen 19 | { 20 | struct vectorch position; 21 | struct euler orientation; 22 | int shapeIndex; 23 | char nameID[SB_NAME_LENGTH]; 24 | int integrity; // 0-20 (>20 = indestructable) 25 | 26 | int destruct_target_request; 27 | char destruct_target_ID[SB_NAME_LENGTH]; 28 | 29 | 30 | }TOOLS_DATA_VIDEO_SCREEN; 31 | 32 | void* InitVideoScreen(void* bhdata,STRATEGYBLOCK *sbPtr); 33 | void VideoScreenBehaviour(STRATEGYBLOCK *sbPtr); 34 | void VideoScreenIsDamaged(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple); 35 | 36 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/bh_waypt.h: -------------------------------------------------------------------------------- 1 | /***** bh_waypt.h *****/ 2 | 3 | /***** Waypoint system code... *****/ 4 | 5 | /***** CDF 27/10/97 *****/ 6 | 7 | struct strategyblock; 8 | 9 | typedef struct waypoint_link { 10 | 11 | int link_target_index; 12 | int link_flags; 13 | 14 | } WAYPOINT_LINK; 15 | 16 | #define linkflag_oneway 0x00000001 /* link is... get this... one way! */ 17 | #define linkflag_reversed_oneway 0x00000002 /* link is one way, only NOT this way. */ 18 | #define linkflag_alienonly 0x00000004 19 | #define linkflag_largetarget 0x00000008 20 | 21 | typedef struct waypoint_volume { 22 | 23 | VECTORCH centre; /* in MODULE space! */ 24 | VECTORCH max_extents; 25 | VECTORCH min_extents; 26 | int flags; 27 | int workspace:14; 28 | unsigned int contains_npc:1; 29 | unsigned int contains_target:1; 30 | int num_links; 31 | WAYPOINT_LINK *first_link; 32 | unsigned char weighting; 33 | 34 | } WAYPOINT_VOLUME; 35 | 36 | #define wayflag_cancrawl 0x00000001 37 | 38 | typedef struct waypoint_header { 39 | 40 | int num_waypoints; 41 | WAYPOINT_VOLUME *first_waypoint; 42 | 43 | } WAYPOINT_HEADER; 44 | 45 | typedef struct waypoint_route { 46 | 47 | int num_waypoints; 48 | WAYPOINT_VOLUME *start; 49 | WAYPOINT_VOLUME *second; 50 | WAYPOINT_VOLUME *last; 51 | WAYPOINT_LINK *first_link; 52 | 53 | } WAYPOINT_ROUTE; 54 | 55 | typedef struct waypoint_manager { 56 | 57 | WAYPOINT_VOLUME *current_container; 58 | WAYPOINT_VOLUME *current_target; 59 | WAYPOINT_LINK *current_link; 60 | VECTORCH current_target_point; 61 | 62 | } WAYPOINT_MANAGER; 63 | 64 | extern void InitWaypointSystem(int npctype); 65 | extern int NPCGetWaypointDirection(WAYPOINT_HEADER *waypoints, struct strategyblock *sbPtr, VECTORCH *velocityDirection, VECTORCH *targetPosition, WAYPOINT_MANAGER *manager); 66 | extern int AlienIsAllowedToAttack(struct strategyblock *sbPtr); 67 | extern int AlienIsEncouragedToCrawl(void); 68 | extern WAYPOINT_VOLUME *GetPositionValidity(struct module *conmod, VECTORCH *position, VECTORCH *suggestion); 69 | extern void InitWaypointManager(WAYPOINT_MANAGER *manager); 70 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/davehook.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | davehook.h 4 | 5 | 6 | Created 18/11/97 by DHM: 7 | Contains all the hooks for my code 8 | */ 9 | 10 | #ifndef _davehook 11 | #define _davehook 1 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /* Version settings *****************************************************/ 18 | 19 | /* Constants ***********************************************************/ 20 | 21 | /* Macros ***************************************************************/ 22 | 23 | /* Type definitions *****************************************************/ 24 | 25 | /* Exported globals *****************************************************/ 26 | 27 | /* Function prototypes **************************************************/ 28 | extern void DAVEHOOK_Init(void); 29 | extern void DAVEHOOK_UnInit(void); 30 | extern void DAVEHOOK_Maintain(void); 31 | 32 | extern void DAVEHOOK_ScreenModeChange_Setup(void); 33 | extern void DAVEHOOK_ScreenModeChange_Cleanup(void); 34 | 35 | 36 | 37 | 38 | /* End of the header ****************************************************/ 39 | 40 | 41 | #ifdef __cplusplus 42 | }; 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/equiputl.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | equiputl.hpp 4 | 5 | Created 8/1/98 by DHM: Utilies for dealing with equipment 6 | 7 | */ 8 | 9 | #ifndef _equiputl 10 | #define _equiputl 1 11 | 12 | #if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) ) 13 | #pragma once 14 | #endif 15 | 16 | 17 | #ifndef _equipmnt_h_ 18 | #include "equipmnt.h" 19 | #endif 20 | 21 | #ifndef _langenum_h_ 22 | #include "langenum.h" 23 | #endif 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Version settings *****************************************************/ 30 | 31 | /* Constants ***********************************************************/ 32 | 33 | /* Macros ***************************************************************/ 34 | 35 | /* Type definitions *****************************************************/ 36 | 37 | /* Exported globals *****************************************************/ 38 | 39 | /* Function prototypes **************************************************/ 40 | namespace EquipmentUtil 41 | { 42 | // Functions to get the ID for the text string "ROUNDS" and "MAGAZINES" 43 | // Mostly returns TEXTSTRING_ROUNDS and TEXTSTRING_MAGAZINES, 44 | // but some weapons have different strings 45 | 46 | enum TEXTSTRING_ID GetTextID_Rounds 47 | ( 48 | enum WEAPON_ID WeaponID 49 | ); 50 | 51 | enum TEXTSTRING_ID GetTextID_Magazines 52 | ( 53 | enum WEAPON_ID WeaponID 54 | ); 55 | 56 | }; 57 | 58 | 59 | 60 | /* End of the header ****************************************************/ 61 | 62 | 63 | #ifdef __cplusplus 64 | }; 65 | #endif 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/extents.c: -------------------------------------------------------------------------------- 1 | /* KJL 12:15:10 8/23/97 - extents.c 2 | * 3 | * This file contains the collision extents 4 | * data for the game characters. 5 | * 6 | */ 7 | #include "extents.h" 8 | 9 | COLLISION_EXTENTS CollisionExtents[MAX_NO_OF_COLLISION_EXTENTS] = 10 | { 11 | /* CE_MARINE */ 12 | {450,0, -1950, -1200}, 13 | 14 | /* CE_PREDATOR */ 15 | {450,0, -789-1309, -1309}, 16 | 17 | /* CE_ALIEN */ 18 | {450,0, -900-1133, -900}, 19 | 20 | /* CE_XENOBORG */ 21 | {450,0, -900-1133, -900}, 22 | 23 | /* CE_PREDATORALIEN */ 24 | {400,0, -851-1338, -851}, 25 | 26 | /* CE_FACEHUGGER */ 27 | {300,0, 27-329, 27}, 28 | 29 | /* CE_QUEEN */ 30 | {1300,0, -2867-1133, -867}, 31 | 32 | /* CE_CORPSE */ 33 | {700,0, -200, -200}, 34 | }; 35 | 36 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/extents.h: -------------------------------------------------------------------------------- 1 | /* KJL 12:15:10 8/23/97 - extents.h 2 | * 3 | * This file contains the collision extents 4 | * structures for the game characters. 5 | * 6 | */ 7 | 8 | enum COLLISION_EXTENTS_ID 9 | { 10 | CE_MARINE, 11 | 12 | CE_PREDATOR, 13 | 14 | CE_ALIEN, 15 | 16 | CE_XENOBORG, 17 | 18 | CE_PREDATORALIEN, 19 | 20 | CE_FACEHUGGER, 21 | 22 | CE_QUEEN, 23 | 24 | CE_CORPSE, 25 | 26 | MAX_NO_OF_COLLISION_EXTENTS 27 | }; 28 | 29 | 30 | typedef struct 31 | { 32 | /* radius of shape in XZ plane */ 33 | int CollisionRadius; 34 | 35 | /* height extents */ 36 | int Bottom; /* ie. max Y of the shape */ 37 | 38 | int StandingTop; 39 | int CrouchingTop; 40 | 41 | } COLLISION_EXTENTS; 42 | 43 | 44 | extern COLLISION_EXTENTS CollisionExtents[]; 45 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/load_shp.h: -------------------------------------------------------------------------------- 1 | 2 | typedef enum 3 | { 4 | I_Shape_BadGuy1 = 0, 5 | I_Shape_BadGuy2, 6 | I_Shape_BadGuy3, 7 | I_Shape_BadGuy4, 8 | I_Shape_BadGuy5, 9 | I_Shape_BadGuy6, 10 | I_Shape_BadGuy7, 11 | 12 | I_Shape_Grenade, 13 | I_Shape_Missile, 14 | I_Shape_Disc, 15 | I_Shape_Plasma, 16 | I_Shape_AutoGun, 17 | 18 | I_Shape_Explosion1, 19 | I_Shape_Explosion2, 20 | I_Shape_PlasmaGunExp, 21 | I_Shape_Ricochet, 22 | 23 | I_Shape_BloodSplash1, 24 | I_Shape_BloodSplash2, 25 | I_Shape_BloodSplash3, 26 | I_Shape_BloodSplash4, 27 | I_Shape_BloodSplash5, 28 | 29 | I_Num_Character_Shapes, 30 | 31 | }CHARACTER_SHAPES; 32 | 33 | 34 | extern void InitCharacterMSLReferences(); 35 | extern int GetMSLPosFromEnum(CHARACTER_SHAPES shape_enum); 36 | extern int GetLoadedShapeMSL(const char *); 37 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/ltfx_exp.h: -------------------------------------------------------------------------------- 1 | #ifndef _ltfx_exp_h 2 | #define _ltfx_exp_h 1 3 | 4 | #ifdef __cplusplus 5 | 6 | extern "C" 7 | { 8 | 9 | #endif 10 | 11 | typedef enum 12 | { 13 | 14 | LFX_RandomFlicker, 15 | LFX_Strobe, 16 | LFX_Switch, 17 | LFX_FlickySwitch, 18 | 19 | } LIGHT_FX_TYPE; 20 | 21 | typedef enum 22 | { 23 | 24 | LFXS_LightOn, 25 | LFXS_LightOff, 26 | LFXS_LightFadingUp, 27 | LFXS_LightFadingDown, 28 | LFXS_Flicking, 29 | LFXS_NotFlicking, 30 | 31 | } LIGHT_FX_STATE; 32 | 33 | typedef struct 34 | { 35 | 36 | unsigned long type; 37 | unsigned long init_state; 38 | 39 | unsigned long fade_up_speed; 40 | unsigned long fade_down_speed; 41 | 42 | unsigned long post_fade_up_delay; 43 | unsigned long post_fade_down_delay; 44 | 45 | } LightFXData; 46 | 47 | #ifdef __cplusplus 48 | 49 | }; 50 | 51 | #endif 52 | 53 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/mempool.c: -------------------------------------------------------------------------------- 1 | #include "ourasert.h" 2 | #include "mem3dc.h" 3 | #include "mempool.h" 4 | 5 | 6 | #if USE_LEVEL_MEMORY_POOL 7 | 8 | #define MAX_NUM_MEMORY_BLOCK 40 9 | #define MEMORY_BLOCK_SIZE (1024*1024) 10 | 11 | static char* MemoryBlocks[MAX_NUM_MEMORY_BLOCK]; 12 | static int CurrentMemoryBlock =-1; 13 | 14 | static char* MemoryPoolPtr=0; 15 | static unsigned int MemoryLeft=0; 16 | 17 | 18 | void* PoolAllocateMem(unsigned int amount) 19 | { 20 | char* retval; 21 | 22 | GLOBALASSERT(amount<=MEMORY_BLOCK_SIZE) 23 | 24 | if(amount>MemoryLeft) 25 | { 26 | CurrentMemoryBlock++; 27 | GLOBALASSERT(CurrentMemoryBlock 2 | #include 3 | #include "avpreg.hpp" 4 | 5 | extern "C" 6 | { 7 | char* AvpCDPath=0; 8 | extern char const * SecondTex_Directory; 9 | extern char * SecondSoundDir; 10 | 11 | void GetPathFromRegistry() 12 | { 13 | HKEY hKey; 14 | 15 | if(AvpCDPath) 16 | { 17 | delete AvpCDPath; 18 | AvpCDPath=0; 19 | } 20 | 21 | if 22 | ( 23 | ERROR_SUCCESS == RegOpenKeyEx 24 | ( 25 | HKEY_LOCAL_MACHINE, 26 | "Software\\Fox Interactive\\Aliens vs Predator\\1.00", 27 | REG_OPTION_NON_VOLATILE, 28 | KEY_ALL_ACCESS, 29 | &hKey 30 | ) 31 | ) 32 | { 33 | char szBuf[MAX_PATH+1]; 34 | DWORD dwType = REG_NONE; 35 | DWORD dwSize = sizeof szBuf; 36 | 37 | if 38 | ( 39 | ERROR_SUCCESS == RegQueryValueEx 40 | ( 41 | hKey, 42 | const_cast("Source Path"), 43 | 0, 44 | &dwType, 45 | reinterpret_cast(szBuf), 46 | &dwSize 47 | ) 48 | && REG_SZ == dwType 49 | ) 50 | { 51 | int length=strlen(szBuf); 52 | if(length) 53 | { 54 | AvpCDPath=new char[length+1]; 55 | strcpy(AvpCDPath,szBuf); 56 | } 57 | 58 | } 59 | 60 | RegCloseKey(hKey); 61 | } 62 | 63 | //now set second texture directory 64 | if(!SecondTex_Directory) 65 | { 66 | char* directory; 67 | if(AvpCDPath) 68 | { 69 | directory=new char[strlen(AvpCDPath)+10]; 70 | sprintf(directory,"%sGraphics",AvpCDPath); 71 | } 72 | else 73 | { 74 | directory=new char[40]; 75 | strcpy(directory,"\\\\nursey\\shadows\\avp\\textures"); 76 | } 77 | *(char**)&SecondTex_Directory=directory; 78 | } 79 | 80 | //and the second sound directory 81 | if(!SecondSoundDir) 82 | { 83 | char* directory; 84 | if(AvpCDPath) 85 | { 86 | directory=new char[strlen(AvpCDPath)+20]; 87 | sprintf(directory,"%ssound\\",AvpCDPath); 88 | } 89 | else 90 | { 91 | directory=new char[40]; 92 | strcpy(directory,"\\\\nursey\\shadows\\avp\\sound\\"); 93 | } 94 | SecondSoundDir=directory; 95 | } 96 | 97 | 98 | } 99 | 100 | }; -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/AvpReg.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _avpreg_h 2 | #define _avpreg_h 1 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | 10 | extern char* AvpCDPath; 11 | void GetPathFromRegistry(); 12 | 13 | 14 | #ifdef __cplusplus 15 | }; 16 | #endif 17 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/CHEAT.H: -------------------------------------------------------------------------------- 1 | extern void HandleCheatModes(void); 2 | extern void GiveAllWeaponsCheat(void); 3 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/Dp_func.h: -------------------------------------------------------------------------------- 1 | /*------------------------------Patrick 18/3/97------------------------ 2 | Header for setting up and handling direct play objects 3 | (This is mostly nicked from DHM's headhunter stuff) 4 | -----------------------------------------------------------------------*/ 5 | #ifndef dpfunc_h_included 6 | #define dpfunc_h_included 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | /* globals */ 12 | extern LPDIRECTPLAY4 glpDP; 13 | extern LPGUID glpGuid; 14 | 15 | extern DPNAME AVPDPplayerName; 16 | extern DPID AVPDPNetID; 17 | 18 | 19 | /* Constants */ 20 | #define MAX_SIZE_FORMAL_NAME 128+1 21 | #define MAX_SIZE_FRIENDLY_NAME 128+1 22 | 23 | 24 | HRESULT DPlayClose(void); 25 | HRESULT DPlayCreate(LPVOID lpCon); 26 | HRESULT DPlayCreatePlayer(LPDPID lppidID, LPTSTR lptszPlayerName, HANDLE hEvent, 27 | LPVOID lpData, DWORD dwDataSize); 28 | HRESULT DPlayCreateSession(LPTSTR lptszSessionName,int maxPlayers,int dwUser1,int dwUser2); 29 | HRESULT DPlayDestroyPlayer(DPID pid); 30 | HRESULT DPlayEnumPlayers(LPGUID lpSessionGuid, LPDPENUMPLAYERSCALLBACK2 lpEnumCallback, 31 | LPVOID lpContext, DWORD dwFlags); 32 | HRESULT DPlayEnumSessions(DWORD dwTimeout, LPDPENUMSESSIONSCALLBACK2 lpEnumCallback, 33 | LPVOID lpContext, DWORD dwFlags); 34 | HRESULT DPlayGetPlayerData(DPID pid, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags); 35 | HRESULT DPlayClose(void); 36 | HRESULT DPlayCreate(LPVOID lpCon); 37 | HRESULT DPlayCreatePlayer(LPDPID lppidID, LPTSTR lptszPlayerName, HANDLE hEvent, 38 | LPVOID lpData, DWORD dwDataSize); 39 | HRESULT DPlayDestroyPlayer(DPID pid); 40 | HRESULT DPlayEnumSessions(DWORD dwTimeout, LPDPENUMSESSIONSCALLBACK2 lpEnumCallback, 41 | LPVOID lpContext, DWORD dwFlags); 42 | HRESULT DPlayGetPlayerData(DPID pid, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags); 43 | HRESULT DPlayGetSessionDesc(void); 44 | BOOL IsDPlay(void); 45 | HRESULT DPlayOpenSession(LPGUID lpSessionGuid); 46 | HRESULT DPlayReceive(LPDPID lpidFrom, LPDPID lpidTo, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize); 47 | HRESULT DPlayRelease(void); 48 | HRESULT DPlaySend(DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize); 49 | HRESULT DPlaySetPlayerData(DPID pid, LPVOID lpData, DWORD dwSize, DWORD dwFlags); 50 | 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/FFSTDIO.H: -------------------------------------------------------------------------------- 1 | #ifndef _included_ffstdio_h_ 2 | #define _included_ffstdio_h_ 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #define FFF_EOF 0x0001 11 | #define FFF_ERR 0x0002 12 | #define FFF_ALOC 0x0004 13 | 14 | struct _FFile 15 | { 16 | void const * data_start; 17 | unsigned char const * data_ptr; 18 | size_t length; 19 | size_t pos; 20 | size_t remaining; 21 | int flag; 22 | }; 23 | typedef struct _FFile FFILE; 24 | typedef size_t ffpos_t; 25 | 26 | extern int ffInit(char const * infofilename, char const * ffpath); 27 | extern void ffKill(void); /* only need to call this to prevent misreported memory leaks */ 28 | 29 | /* only mode supported is "rb" */ 30 | extern int ffclearerr(FFILE * fp); 31 | extern int ffclose(FFILE * fp); 32 | extern int ffcloseall(void); 33 | extern int ffclose_almost_all(void); 34 | extern int ffeof(FFILE * fp); 35 | extern int fferror(FFILE * fp); 36 | extern int ffgetc(FFILE * fp); 37 | extern int ffgetpos(FFILE * fp, ffpos_t * pos); 38 | extern char * ffgets(char * s, int n, FFILE * fp); 39 | extern size_t fflook(void const * * ptr, size_t size, size_t n, FFILE * fp); 40 | extern size_t fflookb(void const * * ptr, size_t n, FFILE * fp); 41 | extern FFILE * ffopen(char const * filename, char const * mode); 42 | extern size_t ffread(void * ptr, size_t size, size_t n, FFILE * fp); 43 | extern size_t ffreadb(void * ptr, size_t n, FFILE * fp); 44 | extern int ffseek(FFILE * fp, long offset, int whence); 45 | extern int ffsetpos(FFILE * fp, ffpos_t const * pos); 46 | extern long fftell(FFILE * fp); 47 | 48 | /* this function is called by ffopen, but you can call it direct 49 | to get a pointer to memory where the contents of a file exist */ 50 | /* nb. the buffer remains valid until a call to ffcloseall */ 51 | extern void const * ffreadbuf(char const * filename, size_t * len); 52 | 53 | /* speedy macros */ 54 | #define ffclearerr(fp) ((fp)->flag &= ~(FFF_ERR|FFF_EOF)) 55 | #define ffeof(fp) ((fp)->flag & FFF_EOF) 56 | #define fferror(fp) ((fp)->flag & FFF_ERR) 57 | #define ffgetpos(fp,pos) (*(pos) = (fp)->pos,0) 58 | #define fftell(fp) ((fp)->pos) 59 | #define ffread(ptr,size,n,fp) ffreadb(ptr,(size)*(n),fp) 60 | #define fflook(ptr,size,n,fp) fflookb(ptr,(size)*(n),fp) 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif /* ! _included_ffstdio_h_ */ 67 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/Frontend/AvP_MP_Config.h: -------------------------------------------------------------------------------- 1 | #ifndef _included_AvP_MP_Config_h_ 2 | #define _included_AvP_MP_Config_h_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | BOOL BuildLoadMPConfigMenu(); 9 | void LoadMultiplayerConfigurationByIndex(int index); 10 | void LoadMultiplayerConfiguration(const char* name); 11 | void SaveMultiplayerConfiguration(const char* name); 12 | const char* GetMultiplayerConfigDescription(int index); 13 | void DeleteMultiplayerConfigurationByIndex(int index); 14 | 15 | 16 | BOOL BuildLoadIPAddressMenu(); 17 | void SaveIPAddress(const char* name,const char* address); 18 | void LoadIPAddress(const char* name); 19 | 20 | #define LOAD_NEW_MPCONFIG_ENTRIES (1) 21 | #define SAVE_NEW_MPCONFIG_ENTRIES (1) 22 | 23 | 24 | 25 | extern int NumCustomLevels; 26 | extern int NumMultiplayerLevels; 27 | extern int NumCoopLevels; 28 | 29 | //list of all multiplayer level names as they appear in the menus 30 | extern char** MultiplayerLevelNames; 31 | extern char** CoopLevelNames; 32 | 33 | extern void BuildMultiplayerLevelNameArray(); 34 | 35 | //returns local index of a custom level (if it is a custom level) 36 | int GetCustomMultiplayerLevelIndex(char* name,int gameType); 37 | //returns name of custom level (without stuff tacked on the end) 38 | char* GetCustomMultiplayerLevelName(int index,int gameType); 39 | 40 | int GetLocalMultiplayerLevelIndex(int index,char* customLevelName,int gameType); 41 | 42 | #ifdef __cplusplus 43 | }; 44 | #endif 45 | 46 | #endif // _included_AvP_MP_Config_h_ 47 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/GAMEPLAT.H: -------------------------------------------------------------------------------- 1 | /* 2 | This contains project platfrom specifc externs 3 | and prototypes. Only valid when we are calling one 4 | p\p function from another. 5 | */ 6 | 7 | 8 | 9 | extern void LoadRifFile(); 10 | 11 | 12 | 13 | /* record of the histance passed to winmain */ 14 | 15 | 16 | extern HINSTANCE AVP_HInstance; 17 | extern int AVP_NCmd; 18 | 19 | extern int AVP_ChangeDisplayMode 20 | ( 21 | HINSTANCE hInst, 22 | int nCmd, 23 | int NewVideoMode, 24 | int NewWindowMode, 25 | int NewZBufferMode, 26 | int NewRasterisationMode, 27 | int NewSoftwareScanDrawMode, 28 | int NewDXMemoryMode 29 | ); 30 | 31 | 32 | 33 | extern int WindowMode; 34 | extern int WindowRequestMode; 35 | extern int VideoRequestMode; 36 | extern int ZBufferRequestMode; 37 | extern int RasterisationRequestMode; 38 | extern int SoftwareScanDrawRequestMode; 39 | extern int DXMemoryRequestMode; 40 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/GammaControl.cpp: -------------------------------------------------------------------------------- 1 | extern "C" 2 | { 3 | 4 | #include "3dc.h" 5 | #include "module.h" 6 | #include "inline.h" 7 | #include "d3dmacs.h" 8 | #include "GammaControl.h" 9 | 10 | extern LPDIRECTDRAWSURFACE lpDDSPrimary; 11 | static int ActualGammaSetting; 12 | int RequestedGammaSetting; 13 | 14 | unsigned char GammaValues[256]; 15 | 16 | void InitialiseGammaSettings(int gamma) 17 | { 18 | ActualGammaSetting = gamma+1; 19 | RequestedGammaSetting = gamma; 20 | UpdateGammaSettings(); 21 | } 22 | #if 0 23 | void UpdateGammaSettings(void) 24 | { 25 | LPDIRECTDRAWGAMMACONTROL handle=NULL; 26 | DDGAMMARAMP gammaValues; 27 | 28 | if (RequestedGammaSetting==ActualGammaSetting) return; 29 | 30 | lpDDSPrimary->QueryInterface(IID_IDirectDrawGammaControl,(LPVOID*)&handle); 31 | if(!handle) 32 | { 33 | return; 34 | } 35 | // handle->GetGammaRamp(0,&gammaValues); 36 | for (int i=0; i<=255; i++) 37 | { 38 | int u = ((i*65536)/255); 39 | int m = MUL_FIXED(u,u); 40 | int l = MUL_FIXED(2*u,ONE_FIXED-u); 41 | 42 | int a; 43 | 44 | a = m/256+MUL_FIXED(RequestedGammaSetting,l); 45 | if (a<0) a=0; 46 | if (a>255) a=255; 47 | 48 | gammaValues.red[i]=a*256; 49 | gammaValues.green[i]=a*256; 50 | gammaValues.blue[i]=a*256; 51 | } 52 | 53 | HRESULT result = handle->SetGammaRamp(0,&gammaValues); 54 | 55 | RELEASE(handle); 56 | 57 | ActualGammaSetting=RequestedGammaSetting; 58 | 59 | } 60 | #else 61 | void UpdateGammaSettings(void) 62 | { 63 | LPDIRECTDRAWGAMMACONTROL handle=NULL; 64 | DDGAMMARAMP gammaValues; 65 | 66 | if (RequestedGammaSetting==ActualGammaSetting) return; 67 | 68 | for (int i=0; i<=255; i++) 69 | { 70 | int u = ((i*65536)/255); 71 | int m = MUL_FIXED(u,u); 72 | int l = MUL_FIXED(2*u,ONE_FIXED-u); 73 | 74 | int a; 75 | 76 | a = m+MUL_FIXED(RequestedGammaSetting*256,l); 77 | 78 | 79 | 80 | m = MUL_FIXED(a,a); 81 | l = MUL_FIXED(2*a,ONE_FIXED-a); 82 | 83 | a = m/256+MUL_FIXED(RequestedGammaSetting,l); 84 | 85 | if (a<0) a=0; 86 | if (a>255) a=255; 87 | 88 | GammaValues[i]=a; 89 | } 90 | 91 | ActualGammaSetting=RequestedGammaSetting; 92 | 93 | } 94 | #endif 95 | 96 | }; -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/GammaControl.h: -------------------------------------------------------------------------------- 1 | #ifndef _included_GammaControl_h_ 2 | #define _included_GammaControl_h_ 1 3 | 4 | extern void InitialiseGammaSettings(int gamma); 5 | extern void UpdateGammaSettings(void); 6 | extern int RequestedGammaSetting; 7 | 8 | 9 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/HUD_layout.h: -------------------------------------------------------------------------------- 1 | /* KJL 17:58:47 18/04/98 - layout defines */ 2 | 3 | #define HUD_FONT_WIDTH 15 4 | //5 5 | #define HUD_FONT_HEIGHT 15 6 | //8 7 | #define HUD_DIGITAL_NUMBERS_WIDTH 14 8 | #define HUD_DIGITAL_NUMBERS_HEIGHT 22 9 | 10 | #define HUDLayout_RightmostTextCentre -40 11 | 12 | #define HUDLayout_Health_TopY 10 13 | #define HUDLayout_Armour_TopY 60 14 | 15 | /* KJL 15:28:12 09/06/98 - the following are pixels from the bottom of the screen */ 16 | #define HUDLayout_Rounds_TopY 40 17 | #define HUDLayout_Magazines_TopY 90 18 | #define HUDLayout_AmmoDesc_TopY 115 19 | 20 | 21 | #define HUDLayout_Colour_BrightWhite 0xffffffff 22 | #define HUDLayout_Colour_MarineGreen ((255<<24)+(95<<16)+(179<<8)+(39)) 23 | #define HUDLayout_Colour_MarineRed ((255<<24)+(255<<16)) 24 | #define HUDLayout_Linespacing 16 25 | 26 | #ifdef __cplusplus 27 | extern "C" 28 | { 29 | #endif 30 | extern char AAFontWidths[]; 31 | #ifdef __cplusplus 32 | }; 33 | #endif 34 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/KZSORT.H: -------------------------------------------------------------------------------- 1 | /* If this is set to a non-zero value then kzsort.c hijacks the pipeline */ 2 | #define KZSORT_ON 1 3 | 4 | /* maximum number of modules likely to appear on-screen */ 5 | #define MAX_NUMBER_OF_VISIBLE_MODULES 400 6 | 7 | struct KItem 8 | { 9 | POLYHEADER *PolyPtr; 10 | 11 | int SortKey; 12 | }; 13 | 14 | struct KObject 15 | { 16 | DISPLAYBLOCK *DispPtr; 17 | 18 | int SortKey; 19 | 20 | int DrawBeforeEnvironment; 21 | }; 22 | 23 | /* render with new z-sort */ 24 | extern void KRenderItems(VIEWDESCRIPTORBLOCK *VDBPtr); 25 | 26 | /* generic item shape function */ 27 | extern void KShapeItemsInstr(SHAPEINSTR *shapeinstrptr); 28 | extern void OutputKItem(int *shapeitemptr); 29 | 30 | extern void RenderThisDisplayblock(DISPLAYBLOCK *dbPtr); 31 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/LANGPLAT.C: -------------------------------------------------------------------------------- 1 | #include "3dc.h" 2 | #include "inline.h" 3 | #include "language.h" 4 | /* KJL 12:07:26 05/02/97 - this will be buggered 5 | up if the enum in gamedef.h changes */ 6 | unsigned char *LanguageFilename[] = 7 | { 8 | ENGLISH_TEXT_FILENAME, /* I_English */ 9 | ENGLISH_TEXT_FILENAME, /* I_French */ 10 | ENGLISH_TEXT_FILENAME, /* I_Spanish */ 11 | ENGLISH_TEXT_FILENAME, /* I_German */ 12 | ENGLISH_TEXT_FILENAME, /* I_Italian */ 13 | ENGLISH_TEXT_FILENAME, /* I_Swedish */ 14 | }; 15 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/MouseCentreing.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | 7 | extern "C" 8 | { 9 | extern BOOL bActive; 10 | extern int WinLeftX, WinRightX, WinTopY, WinBotY; 11 | 12 | } 13 | 14 | static volatile int EndMouseThread=0; 15 | 16 | 17 | 18 | 19 | //thread continually moves the mouse cursor to the centre of the window 20 | //so you don't accidently click outside it. 21 | void MouseThread(void* ) 22 | { 23 | while(!EndMouseThread) 24 | { 25 | Sleep(10); 26 | 27 | if(!bActive) continue; 28 | 29 | SetCursorPos((WinLeftX+WinRightX)>>1,(WinTopY+WinBotY)>>1); 30 | 31 | 32 | } 33 | EndMouseThread=0; 34 | } 35 | 36 | 37 | 38 | extern "C" 39 | { 40 | 41 | 42 | void InitCentreMouseThread() 43 | { 44 | _beginthread(MouseThread,10000,0); 45 | } 46 | 47 | 48 | void FinishCentreMouseThread() 49 | { 50 | EndMouseThread=1; 51 | } 52 | 53 | 54 | 55 | }; 56 | 57 | 58 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/NPCSETUP.H: -------------------------------------------------------------------------------- 1 | #ifndef _included_npcsetup_h_ 2 | #define _included_npcsetup_h_ 3 | 4 | #include "chnkload.h" /* for RIFFHANDLE type */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* pass handle to environment rif */ 11 | void InitNPCs(RIFFHANDLE); 12 | 13 | /* unload them all after intance of game */ 14 | void EndNPCs(); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif /* ! _included_npcsetup_h_ */ 21 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/OBJSETUP.HPP: -------------------------------------------------------------------------------- 1 | #ifndef _objsetup_hpp_ 2 | #define _objsetup_hpp_ 3 | 4 | #include "envchunk.hpp" 5 | #include "obchunk.hpp" 6 | 7 | extern "C" { 8 | #include "3dc.h" 9 | void SetUpRunTimeLights (); 10 | void create_strategies_from_list(); 11 | void deallocate_behaviour_list(); 12 | }; 13 | 14 | void deal_with_module_object(Object_Chunk * ob, int shape1, int AnimationShape, int shape2, MODULE * mod); 15 | void deal_with_placed_object(Object_Chunk * ob, int shape1, int AnimationShape); 16 | void setup_generators (Environment_Data_Chunk * envd); 17 | void setup_particle_generators (Environment_Data_Chunk * envd); 18 | void setup_cables (Environment_Data_Chunk * envd); 19 | void DealWithExternalObjectStategies (Environment_Data_Chunk * envd); 20 | void Create_Xenoborg_Morph_Jobby(Object_Chunk * ob, int AnimationShape, MODULE * mod, MORPHCTRL * mc); 21 | void setup_sounds (Environment_Data_Chunk * envd); 22 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/PCPAUSE.C: -------------------------------------------------------------------------------- 1 | /*-----------------------------Patrick 14/5/97------------------------------ 2 | Source for PC game pause stuff 3 | --------------------------------------------------------------------------*/ 4 | #include "3dc.h" 5 | #include "inline.h" 6 | #include "module.h" 7 | #include "stratdef.h" 8 | #include "gamedef.h" 9 | #include "gameplat.h" 10 | #include "bh_types.h" 11 | #include "menudefs.h" 12 | #include "menugfx.h" 13 | #include "pcmenus.h" 14 | #include "usr_io.h" 15 | 16 | #define UseLocalAssert Yes 17 | #include "ourasert.h" 18 | 19 | extern void CheckForGamePause(void); 20 | extern void SaveGameToFile(void); 21 | extern void AccessDatabase(void); 22 | extern int ScanDrawMode; 23 | 24 | 25 | void DoPcPause(void) 26 | { 27 | ReadUserInput(); 28 | ReadPlayerGameInput(Player->ObStrategyBlock); 29 | 30 | if(AvP.Network!=I_No_Network) 31 | { 32 | // escape ends game for network play 33 | AvP.MainLoopRunning = 0; 34 | AvP.GameMode = I_GM_Playing; 35 | return; 36 | } 37 | 38 | 39 | CheckForGamePause(); 40 | 41 | #if 0 42 | FlushTextprintBuffer(); 43 | AvpShowViews(); 44 | 45 | /* KJL 11:25:33 7/29/97 - this needs to be changed if 46 | the HUD goes all 3D accelerator drawn */ 47 | if (ScanDrawMode != ScanDrawDirectDraw) 48 | { 49 | WriteEndCodeToExecuteBuffer(); 50 | UnlockExecuteBufferAndPrepareForUse(); 51 | ExecuteBuffer(); 52 | EndD3DScene(); 53 | } 54 | 55 | BLTPausedToScreen(); 56 | 57 | 58 | FlipBuffers(); 59 | #endif 60 | 61 | AccessDatabase(); 62 | 63 | ResetFrameCounter(); 64 | 65 | AvP.GameMode = I_GM_Playing; 66 | } 67 | 68 | static int pauseOk = 1; 69 | void CheckForGamePause(void) 70 | { 71 | /* check for pause key */ 72 | if(PlayerStatusPtr->Mvt_InputRequests.Flags.Rqst_PauseGame) 73 | { 74 | if(pauseOk) 75 | { 76 | /* switch state */ 77 | if(AvP.GameMode == I_GM_Playing) AvP.GameMode = I_GM_Paused; 78 | else if(AvP.GameMode == I_GM_Paused) AvP.GameMode = I_GM_Playing; 79 | pauseOk = 0; 80 | } 81 | } 82 | else pauseOk = 1; 83 | } -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/PathChnk.cpp: -------------------------------------------------------------------------------- 1 | #include "PathChnk.hpp" 2 | //macro for helping to force inclusion of chunks when using libraries 3 | FORCE_CHUNK_INCLUDE_IMPLEMENT(pathchnk) 4 | 5 | RIF_IMPLEMENT_DYNCREATE("AVPPATH2",AVP_Path_Chunk) 6 | 7 | AVP_Path_Chunk::AVP_Path_Chunk(Chunk_With_Children* parent) 8 | :Chunk(parent,"AVPPATH2") 9 | { 10 | PathLength=0; 11 | Path=0; 12 | PathID=0; 13 | PathName=0; 14 | flags=spare2=0; 15 | } 16 | 17 | AVP_Path_Chunk::AVP_Path_Chunk(Chunk_With_Children* parent,const char* data,size_t datasize) 18 | :Chunk(parent,"AVPPATH2") 19 | { 20 | int name_length=strlen(data); 21 | PathName=new char[name_length+1]; 22 | strcpy(PathName,data); 23 | data+=(name_length+4)&~3; 24 | 25 | PathID=*(int*)data; 26 | data+=4; 27 | flags=*(int*)data; 28 | data+=4; 29 | spare2=*(int*)data; 30 | data+=4; 31 | PathLength=*(int*)data; 32 | data+=4; 33 | 34 | if(PathLength) Path=new ChunkPathPoint[PathLength]; 35 | else Path=0; 36 | 37 | for(int i=0;i 0 attached 38 | sizes. The DLL will write the requested names to these buffers, truncating 39 | if necessary. Note that the size includes any zero termination character. 40 | */ 41 | 42 | 43 | 44 | /* Input fields to DLL */ 45 | HWND hWndMain; 46 | HINSTANCE hInst; 47 | 48 | LPTSTR lptszFormalPlayerName_In; 49 | LPTSTR lptszFriendlyPlayerName_In; 50 | /* 51 | Both of these are allowed to be NULL; 52 | if non-NULL they point to zero-terminated ANSI strings 53 | */ 54 | 55 | } ExchangedDataType; 56 | /* 57 | We pass a 4-byte pointer to one of these to the DLL; 58 | some are read as inputs, some written to as outputs. 59 | 60 | Assumes Watcom and Visual C++ access structures in the 61 | same way... 62 | */ 63 | 64 | 65 | /* Exported globals *****************************************************/ 66 | 67 | /* Function prototypes **************************************************/ 68 | extern WINAPI InvokeDavesDirectPlayDLL(ExchangedDataType* pExchangedData); 69 | 70 | 71 | #ifdef __cplusplus 72 | }; 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/endianio.c: -------------------------------------------------------------------------------- 1 | #include "endianio.h" 2 | 3 | BYTE GetByte(FILE *fp) 4 | { 5 | unsigned char c = fgetc(fp); 6 | return c; 7 | } 8 | 9 | WORD GetLittleWord(FILE *fp) 10 | { 11 | unsigned char c1 = fgetc(fp); 12 | unsigned char c2 = fgetc(fp); 13 | return c1 + (c2 << 8); 14 | } 15 | 16 | DWORD GetLittleDword(FILE *fp) 17 | { 18 | unsigned char c1 = fgetc(fp); 19 | unsigned char c2 = fgetc(fp); 20 | unsigned char c3 = fgetc(fp); 21 | unsigned char c4 = fgetc(fp); 22 | 23 | return c1 + (c2 + (c3 + (c4 << 8) << 8) << 8); 24 | } 25 | 26 | VOID PutByte(BYTE v, FILE *fp) 27 | { 28 | fputc(v, fp); 29 | } 30 | 31 | VOID PutLittleWord(WORD v, FILE *fp) 32 | { 33 | unsigned char c1 = v & 0xff; 34 | unsigned char c2 = (v >> 8) & 0xff; 35 | fputc(c1, fp); 36 | fputc(c2, fp); 37 | } 38 | 39 | VOID PutLittleDword(DWORD v, FILE *fp) 40 | { 41 | unsigned char c1 = v & 0xff; 42 | unsigned char c2 = (v >> 8) & 0xff; 43 | unsigned char c3 = (v >> 16) & 0xff; 44 | unsigned char c4 = (v >> 24) & 0xff; 45 | 46 | fputc(c1, fp); 47 | fputc(c2, fp); 48 | fputc(c3, fp); 49 | fputc(c4, fp); 50 | } 51 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/endianio.h: -------------------------------------------------------------------------------- 1 | #ifndef _included_endianio_h_ 2 | #define _included_endianio_h_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif /* __cplusplus */ 7 | 8 | #include 9 | 10 | #include "datatype.h" 11 | 12 | BYTE GetByte(FILE *fp); 13 | WORD GetLittleWord(FILE *fp); 14 | DWORD GetLittleDword(FILE *fp); 15 | 16 | VOID PutByte(BYTE v, FILE *fp); 17 | VOID PutLittleWord(WORD v, FILE *fp); 18 | VOID PutLittleDword(DWORD v, FILE *fp); 19 | 20 | #ifdef __cplusplus 21 | }; 22 | #endif /* __cplusplus */ 23 | 24 | #endif /* _included_endianio_h_ */ 25 | 26 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/gadgets/ahudgadg.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ahudgadg.hpp 4 | 5 | Alien HUD gadget; a concrete derived class of abstract class "HUDGadget" 6 | 7 | */ 8 | 9 | #ifndef _ahudgadg 10 | #define _ahudgadg 1 11 | 12 | #ifndef _hudgadg 13 | #include "hudgadg.hpp" 14 | #endif 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /* Version settings *****************************************************/ 22 | 23 | /* Constants ***********************************************************/ 24 | 25 | /* Macros ***************************************************************/ 26 | 27 | /* Type definitions *****************************************************/ 28 | #if UseGadgets 29 | class TextEntryGadget; // fully declared in TEXTIN.HPP 30 | 31 | class AlienHUDGadget : public HUDGadget 32 | { 33 | public: 34 | void Render 35 | ( 36 | const struct r2pos& R2Pos, 37 | const struct r2rect& R2Rect_Clip, 38 | int FixP_Alpha 39 | ); 40 | 41 | AlienHUDGadget(); 42 | ~AlienHUDGadget(); 43 | 44 | void AddTextReport 45 | ( 46 | SCString* pSCString_ToAdd 47 | // ultimately turn into an MCString 48 | ); 49 | void ClearTheTextReportQueue(void); 50 | 51 | #if EnableStatusPanels 52 | void RequestStatusPanel 53 | ( 54 | enum StatusPanelIndex I_StatusPanel 55 | ); 56 | 57 | void NoRequestedPanel(void); 58 | #endif 59 | 60 | void CharTyped 61 | ( 62 | char Ch 63 | // note that this _is _ a char 64 | ); 65 | void Key_Backspace(void); 66 | void Key_End(void); 67 | void Key_Home(void); 68 | void Key_Left(void); 69 | void Key_Up(void); 70 | void Key_Right(void); 71 | void Key_Down(void); 72 | void Key_Delete(void); 73 | void Key_Tab(void); 74 | 75 | void SetString(const char* text); 76 | 77 | void Jitter(int FixP_Magnitude); 78 | 79 | TextReportGadget* pTextReportGadg; 80 | private: 81 | // not allowed to be NULL 82 | 83 | TextEntryGadget* pTextEntryGadg; 84 | // not allowed to be NULL 85 | }; 86 | #endif // UseGadgets 87 | 88 | /* Exported globals *****************************************************/ 89 | 90 | /* Function prototypes **************************************************/ 91 | 92 | 93 | 94 | /* End of the header ****************************************************/ 95 | 96 | 97 | #ifdef __cplusplus 98 | }; 99 | #endif 100 | 101 | #endif 102 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/gadgets/conssym.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * DESCRIPTION: conssym.cpp 4 | * 5 | * AUTHOR: David Malcolm 6 | * 7 | * HISTORY: Created 26/1/98 8 | * 9 | *******************************************************************/ 10 | 11 | /* Includes ********************************************************/ 12 | #include "3dc.h" 13 | #include "conssym.hpp" 14 | 15 | #define UseLocalAssert Yes 16 | #include "ourasert.h" 17 | 18 | /* Version settings ************************************************/ 19 | 20 | /* Constants *******************************************************/ 21 | 22 | /* Macros **********************************************************/ 23 | 24 | /* Imported function prototypes ************************************/ 25 | 26 | /* Imported data ***************************************************/ 27 | #ifdef __cplusplus 28 | extern "C" 29 | { 30 | #endif 31 | #if 0 32 | extern OurBool DaveDebugOn; 33 | extern FDIEXTENSIONTAG FDIET_Dummy; 34 | extern IFEXTENSIONTAG IFET_Dummy; 35 | extern FDIQUAD FDIQuad_WholeScreen; 36 | extern FDIPOS FDIPos_Origin; 37 | extern FDIPOS FDIPos_ScreenCentre; 38 | extern IFOBJECTLOCATION IFObjLoc_Origin; 39 | extern UncompressedGlobalPlotAtomID UGPAID_StandardNull; 40 | extern IFCOLOUR IFColour_Dummy; 41 | extern IFVECTOR IFVec_Zero; 42 | #endif 43 | #ifdef __cplusplus 44 | }; 45 | #endif 46 | 47 | 48 | 49 | /* Exported globals ************************************************/ 50 | /*static*/ List ConsoleSymbol :: List_pConsoleSym; 51 | 52 | /* Internal type definitions ***************************************/ 53 | 54 | /* Internal function prototypes ************************************/ 55 | 56 | /* Internal globals ************************************************/ 57 | 58 | /* Exported function definitions ***********************************/ 59 | // class ConsoleSymbol 60 | // public: 61 | 62 | // protected: 63 | ConsoleSymbol :: ConsoleSymbol 64 | ( 65 | ProjChar* pProjCh_ToUse 66 | ) : pSCString_Symbol 67 | ( 68 | new SCString( pProjCh_ToUse ) 69 | // constructor for the SCString adds the required reference 70 | ) 71 | { 72 | List_pConsoleSym . add_entry 73 | ( 74 | this 75 | ); 76 | } 77 | 78 | ConsoleSymbol :: ~ConsoleSymbol() 79 | { 80 | pSCString_Symbol ->R_Release(); 81 | 82 | // remove from the list 83 | List_pConsoleSym . delete_entry 84 | ( 85 | this 86 | ); 87 | } 88 | 89 | 90 | 91 | 92 | /* Internal function definitions ***********************************/ 93 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/gadgets/conssym.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | conssym.hpp 4 | 5 | "Console symbols" - a base class for managing auto-completion of typing. 6 | 7 | Console commands and variables are derived from this class 8 | 9 | */ 10 | 11 | #ifndef _conssym_hpp 12 | #define _conssym_hpp 1 13 | 14 | #if ( defined( __WATCOMC__ ) || defined( _MSC_VER ) ) 15 | #pragma once 16 | #endif 17 | 18 | #ifndef _scstring 19 | #include "scstring.hpp" 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Version settings *****************************************************/ 27 | 28 | /* Constants ***********************************************************/ 29 | 30 | /* Macros ***************************************************************/ 31 | 32 | /* Type definitions *****************************************************/ 33 | class ConsoleSymbol 34 | { 35 | friend class TextInputState; 36 | /* WARNING! 37 | 38 | TextInputState objects can refer to the list of ConsoleSymbols 39 | in order to iterate through possible completion strings. For 40 | this reason, don't destroy ConsoleSymbol objects if TextInputState 41 | objects exist... 42 | (I believe I've asserted against all such possible failures) 43 | */ 44 | 45 | public: 46 | 47 | OurBool ThisIsACheat; 48 | protected: 49 | ConsoleSymbol 50 | ( 51 | ProjChar* pProjCh_ToUse 52 | ); 53 | virtual ~ConsoleSymbol(); 54 | 55 | SCString* pSCString_Symbol; 56 | 57 | 58 | public: 59 | SCString* GetpSCString(void) const 60 | { 61 | return pSCString_Symbol; 62 | } 63 | 64 | 65 | private: 66 | static List List_pConsoleSym; 67 | }; // suggested naming: "ConsoleSym" 68 | 69 | /* Exported globals *****************************************************/ 70 | 71 | /* Function prototypes **************************************************/ 72 | 73 | 74 | 75 | /* End of the header ****************************************************/ 76 | 77 | 78 | #ifdef __cplusplus 79 | }; 80 | #endif 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/gadgets/rootgadg.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | rootgadg.hpp 4 | 5 | */ 6 | 7 | #ifndef _rootgadg 8 | #define _rootgadg 1 9 | 10 | #ifndef _gadget 11 | #include "gadget.h" 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | /* Version settings *****************************************************/ 19 | 20 | /* Constants ***********************************************************/ 21 | 22 | /* Macros ***************************************************************/ 23 | 24 | /* Type definitions *****************************************************/ 25 | 26 | #if UseGadgets 27 | class HUDGadget; // fully declared in HUDGADG.HPP 28 | 29 | class RootGadget : public Gadget 30 | { 31 | friend void GADGET_Init(void); 32 | friend void GADGET_UnInit(void); 33 | // friend functions: these get permission in order to allow 34 | // construction/destruction 35 | 36 | public: 37 | void Render 38 | ( 39 | const struct r2pos& R2Pos, 40 | const struct r2rect& R2Rect_Clip, 41 | int FixP_Alpha 42 | ); 43 | 44 | static RootGadget* GetRoot(void); 45 | 46 | HUDGadget* GetHUD(void); 47 | 48 | void RefreshHUD(void); 49 | 50 | private: 51 | RootGadget(); 52 | ~RootGadget(); 53 | 54 | private: 55 | static RootGadget* pSingleton; 56 | 57 | HUDGadget* pHUDGadg; 58 | // allowed to be NULL if no head-up-display e.g. when not in a game 59 | 60 | }; 61 | 62 | // Inline methods: 63 | inline /*static*/ RootGadget* RootGadget::GetRoot(void) 64 | { 65 | return pSingleton; 66 | } 67 | inline HUDGadget* RootGadget::GetHUD(void) 68 | { 69 | return pHUDGadg; 70 | } 71 | #endif // UseGadgets 72 | 73 | /* Exported globals *****************************************************/ 74 | 75 | /* Function prototypes **************************************************/ 76 | 77 | 78 | 79 | /* End of the header ****************************************************/ 80 | 81 | 82 | #ifdef __cplusplus 83 | }; 84 | #endif 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/hierplace.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _hierplace_hpp 2 | #define _hierplace_hpp 1 3 | 4 | #include "chunk.hpp" 5 | #include "chnktype.hpp" 6 | 7 | class Placed_Hierarchy_Data_Chunk; 8 | 9 | class Placed_Hierarchy_Chunk : public Chunk_With_Children 10 | { 11 | public : 12 | 13 | Placed_Hierarchy_Chunk(Chunk_With_Children* parent,const char* _name,int _hierarchy_index,ChunkVectorInt& _location,ChunkQuat& _orientation); 14 | Placed_Hierarchy_Chunk(Chunk_With_Children * const parent,const char* ,const size_t); 15 | 16 | 17 | Placed_Hierarchy_Data_Chunk* get_data_chunk() 18 | { 19 | return (Placed_Hierarchy_Data_Chunk*)lookup_single_child("PLACHIDT"); 20 | } 21 | }; 22 | 23 | class Placed_Hierarchy_Data_Chunk : public Chunk 24 | { 25 | public : 26 | Placed_Hierarchy_Data_Chunk(Chunk_With_Children* parent,const char* , const size_t); 27 | Placed_Hierarchy_Data_Chunk(Chunk_With_Children* parent,const char* _name,int _hierarchy_index,ChunkVectorInt& _location,ChunkQuat& _orientation); 28 | ~Placed_Hierarchy_Data_Chunk(); 29 | 30 | void fill_data_block(char*); 31 | size_t size_chunk(); 32 | 33 | 34 | 35 | char* name; 36 | 37 | int hierarchy_index; 38 | 39 | ChunkVectorInt location; 40 | ChunkQuat orientation; 41 | 42 | ObjectID id; 43 | 44 | int num_extra_data; 45 | int* extra_data; 46 | 47 | 48 | }; 49 | 50 | struct Timed_Sound_Description 51 | { 52 | int sound_index; 53 | int start_time; //in ms 54 | int end_time; //in ms 55 | }; 56 | 57 | 58 | #define HierarchySequenceFlag_Loop 0x00000001 59 | #define HierarchySequenceFlag_InitialSequence 0x00000002 60 | #define HierarchySequenceFlag_Playing 0x00000004 61 | class Placed_Hierarchy_Sequence_Chunk : public Chunk 62 | { 63 | public: 64 | Placed_Hierarchy_Sequence_Chunk(Chunk_With_Children* parent,const char* , const size_t); 65 | Placed_Hierarchy_Sequence_Chunk(Chunk_With_Children* parent,int _index); 66 | ~Placed_Hierarchy_Sequence_Chunk(); 67 | 68 | void fill_data_block(char*); 69 | size_t size_chunk(); 70 | 71 | 72 | int index; 73 | int sequence; 74 | int sub_sequence; 75 | int time; //time to play sequence in ms 76 | int flags; 77 | 78 | int sound_list_size; 79 | Timed_Sound_Description* sound_list; 80 | 81 | 82 | int num_extra_data; 83 | int* extra_data; 84 | }; 85 | 86 | 87 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/intro.hpp: -------------------------------------------------------------------------------- 1 | extern void PlayIntroSequence(void); 2 | 3 | #ifdef __cplusplus 4 | extern "C" 5 | { 6 | #endif 7 | extern void WeWantAnIntro(void); 8 | #ifdef __cplusplus 9 | }; 10 | #endif 11 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/iofocus.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * DESCRIPTION: iofocus.cpp 4 | * 5 | * AUTHOR: David Malcolm 6 | * 7 | * HISTORY: Created 21/11/97 8 | * 9 | *******************************************************************/ 10 | 11 | /* Includes ********************************************************/ 12 | #include "3dc.h" 13 | #include "iofocus.h" 14 | #include "gadget.h" 15 | #include "avp_menus.h" 16 | #include "psnd.h" 17 | extern "C" 18 | { 19 | 20 | #define UseLocalAssert Yes 21 | #include "ourasert.h" 22 | 23 | /* Version settings ************************************************/ 24 | 25 | /* Constants *******************************************************/ 26 | 27 | /* Macros **********************************************************/ 28 | 29 | /* Imported function prototypes ************************************/ 30 | extern int InGameMenusAreRunning(void); 31 | 32 | /* Imported data ***************************************************/ 33 | 34 | 35 | /* Exported globals ************************************************/ 36 | 37 | /* Internal type definitions ***************************************/ 38 | 39 | /* Internal function prototypes ************************************/ 40 | 41 | /* Internal globals ************************************************/ 42 | static OurBool iofocus_AcceptTyping = No; 43 | 44 | /* Exported function definitions ***********************************/ 45 | OurBool IOFOCUS_AcceptControls(void) 46 | { 47 | return !iofocus_AcceptTyping; 48 | } 49 | 50 | OurBool IOFOCUS_AcceptTyping(void) 51 | { 52 | return iofocus_AcceptTyping; 53 | } 54 | 55 | void IOFOCUS_Toggle(void) 56 | { 57 | #if CONSOLE_DEBUGGING_COMMANDS_ACTIVATED||!(PREDATOR_DEMO||MARINE_DEMO||ALIEN_DEMO) 58 | if(InGameMenusAreRunning()) return;; 59 | 60 | iofocus_AcceptTyping = !iofocus_AcceptTyping; 61 | if (iofocus_AcceptTyping) 62 | { 63 | Sound_Play(SID_CONSOLE_ACTIVATES,NULL); 64 | } 65 | else 66 | { 67 | Sound_Play(SID_CONSOLE_DEACTIVATES,NULL); 68 | RemoveTheConsolePlease(); 69 | } 70 | #endif 71 | } 72 | 73 | 74 | /* Internal function definitions ***********************************/ 75 | 76 | }; -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/iofocus.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | iofocus.h 4 | 5 | Created 21/11/97 by DHM: is input focus set to normal controls, 6 | or to typing? 7 | */ 8 | 9 | #ifndef _iofocus 10 | #define _iofocus 1 11 | 12 | #ifndef _ourbool 13 | #include "ourbool.h" 14 | #endif 15 | 16 | #ifndef _gadget 17 | #include "gadget.h" 18 | #endif 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /* Version settings *****************************************************/ 25 | 26 | /* Constants ***********************************************************/ 27 | 28 | /* Macros ***************************************************************/ 29 | 30 | /* Type definitions *****************************************************/ 31 | 32 | /* Exported globals *****************************************************/ 33 | 34 | /* Function prototypes **************************************************/ 35 | #if UseGadgets 36 | extern OurBool IOFOCUS_AcceptControls(void); 37 | extern OurBool IOFOCUS_AcceptTyping(void); 38 | 39 | extern void IOFOCUS_Toggle(void); 40 | #else 41 | /* Otherwise: the functions collapse to macros: */ 42 | #define IOFOCUS_AcceptControls() (1) 43 | #define IOFOCUS_AcceptTyping() (0) 44 | 45 | #define IOFOCUS_Toggle() ((void) 0) 46 | #endif /* UseGadgets */ 47 | 48 | 49 | /* End of the header ****************************************************/ 50 | 51 | 52 | #ifdef __cplusplus 53 | }; 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/jsndsup.h: -------------------------------------------------------------------------------- 1 | #ifndef _jsndsup_h 2 | #define _jsndsup_h 1 3 | 4 | #include "3dc.h" 5 | #include "inline.h" 6 | #include "module.h" 7 | 8 | #ifdef __cplusplus 9 | 10 | extern "C" { 11 | 12 | #endif 13 | 14 | typedef struct loaded_sound 15 | { 16 | int sound_num; 17 | 18 | char * wavname; 19 | int num_attached; 20 | 21 | unsigned long permanent :1; 22 | 23 | } LOADED_SOUND; 24 | 25 | 26 | void LoseSound (LOADED_SOUND const * ls); 27 | LOADED_SOUND const * GetSound (char const * fname); 28 | 29 | #ifdef __cplusplus 30 | 31 | }; // end of extern "c" 32 | 33 | #endif 34 | 35 | 36 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/menugfx.h: -------------------------------------------------------------------------------- 1 | #ifndef _included_menugfx_h_ 2 | #define _included_menugfx_h_ 3 | 4 | #include "aw.h" 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | #include "langenum.h" 9 | // structures used for the menu code 10 | 11 | typedef struct menugraphic { 12 | char *filename; 13 | int image_number; 14 | LPDIRECTDRAWSURFACE image_ptr; 15 | AW_BACKUPTEXTUREHANDLE hBackup; 16 | short destx; 17 | short desty; 18 | short width; 19 | short height; 20 | 21 | } MENUGRAPHIC; 22 | 23 | /* JH 12/5/97 these were static in menuplat.cpp - but they're quite useful functions */ 24 | extern void LoadMenuGraphic(MENUGRAPHIC* menugraphptr); 25 | extern void BLTMenuToScreen(MENUGRAPHIC* menuptr); 26 | extern void ReleaseMenuGraphic(MENUGRAPHIC* mptr); 27 | 28 | typedef struct menu_graphic_item{ 29 | int id; 30 | MENUGRAPHIC On; 31 | MENUGRAPHIC Off; 32 | } MENU_GRAPHIC_ITEM; 33 | 34 | 35 | 36 | /* KJL 15:23:39 05/03/97 - new menu_text_item, which 37 | looks as much like the menu_font_item as possible 38 | while enabling me to add language internationalization */ 39 | typedef struct menu_text_item 40 | { 41 | int id; 42 | enum TEXTSTRING_ID StringID; 43 | char *SecondStringPtr; 44 | int X; 45 | int Y; 46 | } MENU_TEXT_ITEM; 47 | 48 | 49 | 50 | // OVERALL menus - this describes one menu screen 51 | 52 | typedef struct avp_menu 53 | { 54 | MENUGRAPHIC *backdrop; 55 | MENU_GRAPHIC_ITEM *menugitems; 56 | MENU_TEXT_ITEM *menufitems; 57 | int previous_selection; 58 | int default_selection; 59 | 60 | } AVP_MENU; 61 | 62 | 63 | #define BASEX 112 64 | #define BASEY 43 65 | 66 | 67 | extern AVP_MENU *Current_Menu; 68 | extern void ProcessGraphicForLoading(AVP_MENU *menu_to_load); 69 | extern void ProcessGraphicForUnloading(AVP_MENU *menu_to_load); 70 | 71 | extern void PlatformSpecificEnteringDatabase(void); 72 | extern void PlatformSpecificExitingDatabase(void); 73 | 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | 78 | #endif /* ! _included_menugfx_h_ */ 79 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/modcmds.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | modcmds.hpp 4 | 5 | */ 6 | 7 | #ifndef _modcmds 8 | #define _modcmds 1 9 | 10 | #ifndef MODULE_INCLUDED 11 | #include "module.h" 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | /* Version settings *****************************************************/ 19 | 20 | /* Constants ***********************************************************/ 21 | 22 | /* Macros ***************************************************************/ 23 | 24 | /* Type definitions *****************************************************/ 25 | 26 | /* Exported globals *****************************************************/ 27 | 28 | /* Function prototypes **************************************************/ 29 | namespace ModuleCommands 30 | { 31 | void ListModules(void); 32 | 33 | void TryToTeleport(char* UpperCasePotentialModuleName); 34 | 35 | MODULE* FindModule(char* UpperCasePotentialModuleName); 36 | // allowed to return NULL if no match 37 | 38 | void TeleportPlayerToModule(MODULE* pModule_Dst); 39 | }; 40 | 41 | 42 | 43 | /* End of the header ****************************************************/ 44 | 45 | 46 | #ifdef __cplusplus 47 | }; 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/progress_bar.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _progress_bar_h 3 | #define _progress_bar_h 4 | 5 | #ifdef __cplusplus 6 | extern "C" 7 | { 8 | #endif 9 | 10 | #define PBAR_HUD_START 0 11 | #define PBAR_LEVEL_START 1000 12 | #define PBAR_NPC_START 3000 13 | #define PBAR_LENGTH 5000 14 | 15 | #define PBAR_HUD_INTERVAL (PBAR_LEVEL_START) 16 | #define PBAR_LEVEL_INTERVAL (PBAR_NPC_START-PBAR_LEVEL_START) 17 | #define PBAR_NPC_INTERVAL (PBAR_LENGTH-PBAR_NPC_START) 18 | 19 | void Start_Progress_Bar(); 20 | void Set_Progress_Bar_Position(int pos); 21 | 22 | #ifdef __cplusplus 23 | }; 24 | #endif 25 | 26 | 27 | 28 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/avp/win95/winmain.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/avp/win95/winmain.c -------------------------------------------------------------------------------- /AvP_vc/3dc/default.cfg: -------------------------------------------------------------------------------- 1 | '(BD8%&$ 5:64wyON1T3QP[ef*'(BD8%&$ 5:64wyON13T/0Q2P[ef*'(BD8%&$ 5:64wyT3[ef* -------------------------------------------------------------------------------- /AvP_vc/3dc/dialog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/dialog.dll -------------------------------------------------------------------------------- /AvP_vc/3dc/dialog.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/dialog.lib -------------------------------------------------------------------------------- /AvP_vc/3dc/fontbr.pgm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/fontbr.pgm -------------------------------------------------------------------------------- /AvP_vc/3dc/frustrum.h: -------------------------------------------------------------------------------- 1 | #ifndef _frustrum_h_ /* Is this your first time? */ 2 | #define _frustrum_h_ 1 3 | 4 | #include "kshape.h" 5 | /* 6 | * KJL 15:13:43 7/17/97 - frustrum.h 7 | * 8 | * function prototypes & pointers for things connected 9 | * to the view frustrum and clipping 10 | * 11 | */ 12 | 13 | enum FrustrumType 14 | { 15 | FRUSTRUM_TYPE_NORMAL, 16 | FRUSTRUM_TYPE_WIDE 17 | }; 18 | 19 | extern void SetFrustrumType(enum FrustrumType frustrumType); 20 | 21 | /* GOURAUD POLYGON CLIPPING */ 22 | extern void GouraudPolygon_ClipWithZ(void); 23 | extern void (*GouraudPolygon_ClipWithNegativeX)(void); 24 | extern void (*GouraudPolygon_ClipWithPositiveY)(void); 25 | extern void (*GouraudPolygon_ClipWithNegativeY)(void); 26 | extern void (*GouraudPolygon_ClipWithPositiveX)(void); 27 | 28 | /* TEXTURED POLYGON CLIPPING */ 29 | extern void TexturedPolygon_ClipWithZ(void); 30 | extern void (*TexturedPolygon_ClipWithNegativeX)(void); 31 | extern void (*TexturedPolygon_ClipWithPositiveY)(void); 32 | extern void (*TexturedPolygon_ClipWithNegativeY)(void); 33 | extern void (*TexturedPolygon_ClipWithPositiveX)(void); 34 | 35 | /* GOURAUD TEXTURED POLYGON CLIPPING */ 36 | extern void GouraudTexturedPolygon_ClipWithZ(void); 37 | extern void (*GouraudTexturedPolygon_ClipWithNegativeX)(void); 38 | extern void (*GouraudTexturedPolygon_ClipWithPositiveY)(void); 39 | extern void (*GouraudTexturedPolygon_ClipWithNegativeY)(void); 40 | extern void (*GouraudTexturedPolygon_ClipWithPositiveX)(void); 41 | 42 | /* FRUSTRUM TESTS */ 43 | extern int PolygonWithinFrustrum(POLYHEADER *polyPtr); 44 | extern int PolygonShouldBeDrawn(POLYHEADER *polyPtr); 45 | extern int (*ObjectWithinFrustrum)(DISPLAYBLOCK *dbPtr); 46 | extern int (*ObjectCompletelyWithinFrustrum)(DISPLAYBLOCK *dbPtr); 47 | extern int (*VertexWithinFrustrum)(RENDERVERTEX *vertexPtr); 48 | extern void (*TestVerticesWithFrustrum)(void); 49 | 50 | extern int DecalWithinFrustrum(DECAL *decalPtr); 51 | extern int QuadWithinFrustrum(void); 52 | extern int TriangleWithinFrustrum(void); 53 | 54 | 55 | /* pass a pointer to a vertex to be tested; results are returned in an int, 56 | using the following defines */ 57 | #define INSIDE_FRUSTRUM_Z_PLANE 1 58 | #define INSIDE_FRUSTRUM_PX_PLANE 2 59 | #define INSIDE_FRUSTRUM_NX_PLANE 4 60 | #define INSIDE_FRUSTRUM_PY_PLANE 8 61 | #define INSIDE_FRUSTRUM_NY_PLANE 16 62 | #define INSIDE_FRUSTRUM 31 63 | 64 | extern char FrustrumFlagForVertex[maxrotpts]; 65 | 66 | #define USE_FOV_53 0 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /AvP_vc/3dc/ia3d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/ia3d.lib -------------------------------------------------------------------------------- /AvP_vc/3dc/include/3dc.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "system.h" 6 | #include "equates.h" 7 | #include "platform.h" 8 | #include "shape.h" 9 | #include "prototyp.h" 10 | -------------------------------------------------------------------------------- /AvP_vc/3dc/movement.txt: -------------------------------------------------------------------------------- 1 | Movement Speeds 2 | 3 | Feel free to experiment with the values. 4 | (10000 mm per second means the player 5 | can cover 100m in 10 seconds.) 6 | 7 | You MUST leave the # signs in front of the numbers; 8 | please do not change this file in any other way! 9 | 10 | 11 | * Alien Movement Values * 12 | 13 | Running speed, (mm per second) 14 | #18000 15 | Side-step speed, (mm per second) 16 | #18000 17 | Turning speed, (revolutions per second * 4096) 18 | #2000 19 | Jumping speed, (mm per second) 20 | #9000 21 | 22 | * Predator Movement Values * 23 | 24 | Running speed, (mm per second) 25 | #16000 26 | Side-step speed, (mm per second) 27 | #16000 28 | Turning speed, (revolutions per second * 4096) 29 | #2000 30 | Jumping speed, (mm per second) 31 | #9000 32 | 33 | 34 | * Marine Movement Values * 35 | 36 | Running speed, (mm per second) 37 | #15000 38 | Side-step speed, (mm per second) 39 | #15000 40 | Turning speed, (revolutions per second * 4096) 41 | #2000 42 | Jumping speed, (mm per second) 43 | #9000 44 | -------------------------------------------------------------------------------- /AvP_vc/3dc/plddpvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/3dc/plddpvc.dll -------------------------------------------------------------------------------- /AvP_vc/3dc/sphere.h: -------------------------------------------------------------------------------- 1 | #ifndef _included_sphere_h_ /* Is this your first time? */ 2 | #define _included_sphere_h_ 1 3 | 4 | 5 | typedef struct 6 | { 7 | int v[3]; 8 | } TRI_FACE; 9 | 10 | #define SPHERE_ORDER 6 11 | #define SPHERE_RADIUS ONE_FIXED 12 | #define SPHERE_FACES (8*SPHERE_ORDER*SPHERE_ORDER) 13 | #define SPHERE_VERTICES (4*SPHERE_ORDER*SPHERE_ORDER+2) 14 | #define SPHERE_TEXTURE_WRAP 4 15 | extern VECTORCH SphereVertex[]; 16 | extern VECTORCH SphereRotatedVertex[]; 17 | extern VECTORCH SphereAtmosRotatedVertex[]; 18 | extern int SphereAtmosU[]; 19 | extern int SphereAtmosV[]; 20 | extern TRI_FACE SphereFace[]; 21 | extern int SphereVertexHeight[]; 22 | 23 | typedef struct 24 | { 25 | VECTORCH Position[SPHERE_VERTICES]; 26 | VECTORCH Velocity[SPHERE_VERTICES]; 27 | int RipplePhase[SPHERE_VERTICES]; 28 | int BeenStopped[SPHERE_VERTICES]; 29 | 30 | int ExplosionPhase; 31 | int NumberVerticesMoving; 32 | int LifeTime; 33 | int UseCollisions; 34 | 35 | } VOLUMETRIC_EXPLOSION; 36 | 37 | extern void Generate_Sphere(void); 38 | 39 | 40 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/version.c: -------------------------------------------------------------------------------- 1 | /* KJL 16:41:33 29/03/98 - not the most complicated code I've ever written... */ 2 | #include "version.h" 3 | extern void NewOnScreenMessage(unsigned char *messagePtr); 4 | 5 | 6 | void GiveVersionDetails(void) 7 | { 8 | /* KJL 15:54:25 29/03/98 - give version details; this is not language localised since I thought that would be a little odd */ 9 | // NewOnScreenMessage("ALIENS VS PREDATOR - DEATHMATCH DEMO V1.0 - REBELLION DEVELOPMENTS 1998/11/28"); 10 | // NewOnScreenMessage("Aliens vs Predator - Alien Demo V1.3 - Rebellion Developments 1999/1/25"); 11 | // NewOnScreenMessage("Aliens vs Predator - \n Build 103 \n Rebellion Developments 1999/7/13 \n (European Release)"); 12 | // NewOnScreenMessage("Aliens vs Predator - \n Build 103 \n Rebellion Developments 1999/7/13 \n (American Release)"); 13 | NewOnScreenMessage("Aliens vs Predator - Gold\n Build 117 \n Rebellion Developments 2000/17/5 \n"); //10:50 14 | 15 | } 16 | -------------------------------------------------------------------------------- /AvP_vc/3dc/version.h: -------------------------------------------------------------------------------- 1 | /* KJL 15:56:24 29/03/98 - this function supplies a text 2 | description of the current build, and the build date. */ 3 | extern void GiveVersionDetails(void); -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/ANIMCHNK.HPP: -------------------------------------------------------------------------------- 1 | #ifndef _animchnk_hpp 2 | #define _animchnk_hpp 3 | #include "chunk.hpp" 4 | #include "Chnktype.hpp" 5 | 6 | struct TEXANIM; 7 | 8 | 9 | class Animation_Chunk : public Chunk 10 | { 11 | public : 12 | Animation_Chunk(Chunk_With_Children* parent,const char*,size_t); 13 | Animation_Chunk(Chunk_With_Children* parent); 14 | ~Animation_Chunk(); 15 | 16 | virtual BOOL output_chunk (HANDLE &hand); 17 | 18 | virtual size_t size_chunk(); 19 | 20 | virtual void fill_data_block(char* data_start); 21 | 22 | int NumPolys; //with animation in this shape 23 | TEXANIM** AnimList; 24 | 25 | }; 26 | 27 | #define txa_flag_nointerptofirst 0x80000000 28 | 29 | struct FrameList 30 | { 31 | ~FrameList(); 32 | FrameList(TEXANIM*); 33 | #if InterfaceEngine 34 | FrameList(TEXANIM* p,FrameList* templ); 35 | #endif 36 | FrameList(TEXANIM* p,FrameList* fl,int* conv); 37 | int Speed; 38 | int Flags; 39 | 40 | int NumFrames; 41 | int CurFrame; 42 | TEXANIM* parent; 43 | 44 | int* Textures; 45 | int* UVCoords; 46 | int spare1,spare2; 47 | 48 | 49 | #if InterfaceEngine 50 | void CopyToSID(int shape,int poly); 51 | void CopyFromSID(int shape,int poly); 52 | void AddFrame(); 53 | void RemoveFrame(); 54 | #endif 55 | }; 56 | 57 | #define AnimFlag_NotPlaying 0x00000001 58 | struct TEXANIM 59 | { 60 | TEXANIM(TEXANIM*); 61 | TEXANIM(); 62 | ~TEXANIM(); 63 | 64 | #if InterfaceEngine 65 | TEXANIM(int s,int p,int id); 66 | //construct a TEXANIM using templ as a template. 67 | TEXANIM(int s,int p,TEXANIM* templ); 68 | #endif 69 | int shape; 70 | int poly; 71 | int NumVerts; 72 | int ID; 73 | int NumSeq;//number of sequences 74 | int CurSeq; 75 | int AnimFlags; 76 | int Identifier; 77 | FrameList** Seq; 78 | 79 | #if InterfaceEngine 80 | void ChangeFrame(int newseq,int newframe); 81 | void AddSeq(); 82 | void RemoveSeq(); 83 | void CopySeq(int seq_num); 84 | #endif 85 | void CopyAnimData(TEXANIM* ta,int* conv); 86 | }; 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/CHNKIMAG.HPP: -------------------------------------------------------------------------------- 1 | #ifndef _included__chnkimag_hpp_ 2 | #define _included__chnkimag_hpp_ 3 | 4 | #error "This file is obsolete" 5 | 6 | #include 7 | 8 | #include "d3_image.hpp" 9 | #include "mishchnk.hpp" 10 | #include "bmpnames.hpp" 11 | 12 | extern "C" extern char projectsubdirectory[]; 13 | 14 | extern char const * GameTex_Directory; 15 | extern char const * GenTex_Directory; 16 | extern char const * FixTex_Directory; 17 | extern char const * ToolsTex_Directory; 18 | 19 | struct CL_RIFFImage : public CL_Image 20 | { 21 | public: 22 | static char const * game_mode; // game mode defines palette and set of graphics - can be null or "" for default 23 | 24 | CL_RIFFImage() : CL_Image() {} 25 | CL_RIFFImage(CL_Image const & base) : CL_Image(base) {} 26 | 27 | private: 28 | virtual CL_Error Locate(char const * iname, int const enum_id); 29 | 30 | void GetPath(ImageDescriptor const & idsc, Environment_Data_Chunk * envd, BMPN_Flags bflags); 31 | }; 32 | 33 | #endif // !_included__chnkimag_hpp_ 34 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/CL_INIT.CPP: -------------------------------------------------------------------------------- 1 | #include "cl_init.h" 2 | #include "system.h" // because the 3dc header files don't automatically include the ones they need 3 | #include "equates.h" // because the 3dc header files don't automatically include the ones they need 4 | #include "platform.h" // for VideoModeTypes 5 | #include "shape.h" // because the 3dc header files don't automatically include the ones they need 6 | #include "prototyp.h" // for SDB 7 | #include "d3_image.hpp" // for init functions 8 | 9 | extern "C" extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock; 10 | 11 | void CL_Init_All(void) 12 | { 13 | switch (VideoModeTypeScreen) 14 | { 15 | case VideoModeType_8: 16 | if (ScreenDescriptorBlock.SDB_Flags & SDB_Flag_TLTPalette) 17 | CL_Init_DirectDrawMode(CLV_8TLT); 18 | else 19 | CL_Init_DirectDrawMode(CLV_8); 20 | break; 21 | case VideoModeType_15: 22 | CL_Init_DirectDrawMode(CLV_15); 23 | break; 24 | case VideoModeType_24: 25 | CL_Init_DirectDrawMode(CLV_24); 26 | break; 27 | case VideoModeType_8T: 28 | CL_Init_DirectDrawMode(CLV_8T); 29 | break; 30 | } 31 | 32 | if (ScanDrawDirectDraw != ScanDrawMode) 33 | CL_Init_D3DMode(&(d3d.TextureFormat[d3d.CurrentTextureFormat].ddsd)); 34 | } 35 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/CL_INIT.H: -------------------------------------------------------------------------------- 1 | #ifndef _included_cl_init_h_ 2 | #define _included_cl_init_h_ 3 | 4 | #error "This file is obsolete" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #include "d3d.h" // required by d3_func.hpp 11 | #include "d3_func.h" // for D3DINFO definition 12 | 13 | extern int VideoModeTypeScreen; 14 | extern int ScanDrawMode; 15 | extern D3DINFO d3d; 16 | 17 | void CL_Init_All(void); 18 | 19 | #ifdef __cplusplus 20 | }; 21 | #endif 22 | 23 | #endif // !_included_cl_init_h_ -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/DEBUGLOG.H: -------------------------------------------------------------------------------- 1 | #ifndef _included_debuglog_h_ 2 | #define _included_debuglog_h_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | typedef struct LogFile LOGFILE; 11 | 12 | int vlfprintf(LOGFILE * lfp, char const * format, va_list args ); 13 | 14 | int lfprintf(LOGFILE * lfp, char const * format, ... ); 15 | 16 | int lfputs(LOGFILE * lfp, char const * str); 17 | 18 | LOGFILE * lfopen(char const * fname); 19 | 20 | void lfclose(LOGFILE * lfp); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif /* ! _included_debuglog_h_ */ 27 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/DXLOG.H: -------------------------------------------------------------------------------- 1 | #ifndef _included_dxlog_h_ 2 | #define _included_dxlog_h_ 3 | 4 | #include "system.h" 5 | #include "ddraw.h" 6 | #include "d3d.h" 7 | #include "d3drm.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #if debug 14 | 15 | void dx_err_log(HRESULT error, int line, char const * file); 16 | void dx_str_log(char const * str, int line, char const * file); 17 | void dx_line_log(int line, char const * file); 18 | void dx_strf_log(char const * fmt, ...); 19 | 20 | #define LOGDXERR(error) dx_err_log(error,__LINE__,__FILE__) 21 | #define LOGDXSTR(str) dx_str_log(str,__LINE__,__FILE__) 22 | #define LOGDXFMT(args) (dx_line_log(__LINE__,__FILE__),dx_strf_log args) 23 | 24 | #else 25 | 26 | #define LOGDXERR(error) (void)0 27 | #define LOGDXSTR(str) (void)0 28 | #define LOGDXFMT(args) (void)0 29 | 30 | #endif 31 | 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif /* ! _included_dxlog_h_ */ 38 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/DummyObjectChunk.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _DummyObjectChunk_hpp 3 | #define _DummyObjectChunk_hpp 1 4 | 5 | #include "chunk.hpp" 6 | #include "list_tem.hpp" 7 | #include "chnktype.hpp" 8 | 9 | class Dummy_Object_Data_Chunk; 10 | 11 | class Dummy_Object_Chunk : public Chunk_With_Children 12 | { 13 | public: 14 | 15 | Dummy_Object_Chunk(Chunk_With_Children* parent,const char* _name ,ChunkVectorInt& _location,ChunkVectorInt& min ,ChunkVectorInt& max ,ChunkQuat& orient); 16 | 17 | // constructor from buffer 18 | Dummy_Object_Chunk (Chunk_With_Children * const parent,const char *, size_t const); 19 | 20 | Dummy_Object_Data_Chunk * get_data_chunk();//gets data chunk (name and location) 21 | 22 | const char* get_text(); //get text attached to a dummy object 23 | void set_text(const char* text); //change the text attached to a dummy object 24 | 25 | }; 26 | 27 | //chunk containing name and location of dummy object 28 | class Dummy_Object_Data_Chunk : public Chunk 29 | { 30 | public : 31 | Dummy_Object_Data_Chunk(Dummy_Object_Chunk* parent,const char* _name ,ChunkVectorInt& _location,ChunkVectorInt& min ,ChunkVectorInt& max ,ChunkQuat& orient); 32 | Dummy_Object_Data_Chunk (Chunk_With_Children * parent, const char * data, size_t ); 33 | ~Dummy_Object_Data_Chunk(); 34 | 35 | 36 | /*------------------------** 37 | ** Main dummy object data ** 38 | **------------------------*/ 39 | char* name; 40 | 41 | ChunkVectorInt location; 42 | ChunkQuat orientation; 43 | 44 | ChunkVectorInt min_extents; 45 | ChunkVectorInt max_extents; 46 | /*------------------------** 47 | ** Main dummy object data ** 48 | **------------------------*/ 49 | 50 | size_t size_chunk(); 51 | void fill_data_block (char * data); 52 | 53 | private : 54 | 55 | friend class Dummy_Object_Chunk; 56 | 57 | }; 58 | 59 | 60 | //contains the 'user text' from 3dsmax 61 | class Dummy_Object_Text_Chunk : public Chunk 62 | { 63 | public : 64 | Dummy_Object_Text_Chunk(Dummy_Object_Chunk* parent,const char* _text); 65 | Dummy_Object_Text_Chunk(Chunk_With_Children * parent, const char * data, size_t ); 66 | ~Dummy_Object_Text_Chunk(); 67 | 68 | size_t size_chunk(); 69 | void fill_data_block (char * data); 70 | 71 | 72 | const char* get_text() {return text;} 73 | void set_text(const char* _text); 74 | 75 | private : 76 | char* text; 77 | 78 | }; 79 | 80 | 81 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/ENUMCHNK.HPP: -------------------------------------------------------------------------------- 1 | #ifndef _included_enumchnk_hpp_ 2 | #define _included_enumchnk_hpp_ 3 | 4 | #include "chunk.hpp" 5 | #include "mishchnk.hpp" 6 | 7 | class Enum_Header_Chunk; 8 | 9 | class Enum_Chunk : public Lockable_Chunk_With_Children 10 | { 11 | public: 12 | 13 | // empty constructor 14 | Enum_Chunk (Chunk_With_Children * parent); 15 | 16 | // constructor from buffer 17 | Enum_Chunk (Chunk_With_Children * const parent,const char *, size_t const); 18 | 19 | Enum_Header_Chunk * get_header(); 20 | 21 | // functions for the locking functionality 22 | 23 | BOOL file_equals (HANDLE &); 24 | const char * get_head_id(); 25 | void set_lock_user(char *); 26 | 27 | void post_input_processing(); 28 | 29 | private: 30 | 31 | friend class File_Chunk; 32 | friend class GodFather_Chunk; 33 | 34 | 35 | 36 | 37 | }; 38 | 39 | /////////////////////////////////////////////// 40 | 41 | class Enum_Header_Chunk : public Chunk 42 | { 43 | public: 44 | // constructor from buffer 45 | Enum_Header_Chunk (Chunk_With_Children * parent, const char * pdata, size_t psize); 46 | 47 | virtual size_t size_chunk () 48 | { 49 | chunk_size = 36; 50 | return chunk_size; 51 | } 52 | 53 | virtual BOOL output_chunk (HANDLE &); 54 | 55 | virtual void fill_data_block (char * data_start); 56 | 57 | void prepare_for_output(); 58 | 59 | private: 60 | 61 | friend class Enum_Chunk; 62 | friend class File_Chunk; 63 | 64 | int flags; 65 | 66 | int version_no; 67 | 68 | char lock_user[17]; 69 | 70 | 71 | // constructor from parent 72 | Enum_Header_Chunk (Enum_Chunk * parent) 73 | : Chunk (parent, "ENUMHEAD"), 74 | flags (0), version_no (0) 75 | {} 76 | 77 | }; 78 | 79 | 80 | 81 | 82 | #endif // _included_enumchnk_hpp_ -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/ENUMSCH.HPP: -------------------------------------------------------------------------------- 1 | #ifndef _included_enumsch_hpp_ 2 | #define _included_enumsch_hpp_ 3 | 4 | #include "chunk.hpp" 5 | 6 | class Enum_Constant 7 | { 8 | public: 9 | char * cname; 10 | int value; 11 | int reserved; 12 | 13 | Enum_Constant() : cname(0), value(0), reserved(0) {} 14 | 15 | ~Enum_Constant() 16 | { 17 | if (cname) delete[] cname; 18 | } 19 | 20 | Enum_Constant(char const * const _cname, int const _value); 21 | Enum_Constant(Enum_Constant const & ec2); 22 | 23 | Enum_Constant & operator = (Enum_Constant const & ec2); 24 | 25 | BOOL operator == (Enum_Constant const & ec2) const; 26 | BOOL operator != (Enum_Constant const & ec2) const; 27 | BOOL operator < (Enum_Constant const & ec2) const; 28 | 29 | private: 30 | 31 | friend class BMP_Enums_Chunk; 32 | 33 | // constructor from buffer 34 | Enum_Constant(char const * sdata); 35 | 36 | size_t size_chunk() const; 37 | 38 | void fill_data_block(char * data_start); 39 | }; 40 | 41 | 42 | class Enum_Const_List 43 | { 44 | public: 45 | List enums; 46 | 47 | virtual ~Enum_Const_List(){} 48 | #if cencon 49 | int lowest_free_index(void); 50 | void Sort_By_Name(void); 51 | #endif 52 | }; 53 | 54 | 55 | class BMP_Enums_Chunk : public Chunk, public Enum_Const_List 56 | { 57 | public: 58 | // constructor from buffer 59 | BMP_Enums_Chunk (Chunk_With_Children * const parent, char const * sdata, size_t const ssize); 60 | 61 | #if cencon 62 | // empty constructor 63 | BMP_Enums_Chunk (Chunk_With_Children * const parent) 64 | : Chunk(parent,"BMPENUMS") 65 | , ctype(0) 66 | , reserved1(0) 67 | , reserved2(0) 68 | {} 69 | #endif 70 | 71 | ~BMP_Enums_Chunk () 72 | { 73 | if (ctype) delete[] ctype; 74 | } 75 | 76 | virtual size_t size_chunk (); 77 | virtual void fill_data_block (char * data_start); 78 | 79 | char * ctype; 80 | int reserved1; 81 | int reserved2; 82 | // List enums; 83 | 84 | private: 85 | 86 | friend class Enum_Chunk; 87 | 88 | }; 89 | 90 | 91 | #endif // !_included_enumsch_hpp_ 92 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/GSPRCHNK.HPP: -------------------------------------------------------------------------------- 1 | #ifndef _included_gsprchnk_hpp_ 2 | #define _included_gsprchnk_hpp_ 3 | 4 | #include "chunk.hpp" 5 | #include "mishchnk.hpp" 6 | 7 | class AllSprites_Header_Chunk; 8 | 9 | class AllSprites_Chunk : public Lockable_Chunk_With_Children 10 | { 11 | public: 12 | 13 | // empty constructor 14 | AllSprites_Chunk (Chunk_With_Children * parent); 15 | // constructor from buffer 16 | AllSprites_Chunk (Chunk_With_Children * const parent,const char *, size_t const); 17 | 18 | AllSprites_Header_Chunk * get_header(); 19 | 20 | // functions for the locking functionality 21 | 22 | BOOL file_equals (HANDLE &); 23 | const char * get_head_id(); 24 | void set_lock_user(char *); 25 | 26 | void post_input_processing(); 27 | 28 | private: 29 | 30 | friend class File_Chunk; 31 | friend class GodFather_Chunk; 32 | 33 | 34 | 35 | 36 | }; 37 | 38 | /////////////////////////////////////////////// 39 | 40 | class AllSprites_Header_Chunk : public Chunk 41 | { 42 | public: 43 | // constructor from buffer 44 | AllSprites_Header_Chunk (Chunk_With_Children * parent, const char * pdata, size_t psize); 45 | 46 | virtual size_t size_chunk () 47 | { 48 | chunk_size = 36; 49 | return chunk_size; 50 | } 51 | 52 | virtual BOOL output_chunk (HANDLE &); 53 | 54 | virtual void fill_data_block (char * data_start); 55 | 56 | void prepare_for_output(); 57 | 58 | private: 59 | 60 | friend class AllSprites_Chunk; 61 | friend class File_Chunk; 62 | 63 | int flags; 64 | 65 | int version_no; 66 | 67 | char lock_user[17]; 68 | 69 | 70 | 71 | // constructor from parent 72 | AllSprites_Header_Chunk (AllSprites_Chunk * parent) 73 | : Chunk (parent, "ASPRHEAD"), 74 | flags (0), version_no (0) 75 | {} 76 | 77 | }; 78 | 79 | 80 | 81 | 82 | #endif // _included_gsprchnk_hpp_ -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/ILBM_ext.cpp: -------------------------------------------------------------------------------- 1 | #include "ILBM_ext.hpp" 2 | 3 | IFF_IMPLEMENT_DYNCREATE("ILBM","TRAN",IlbmTranChunk) 4 | IFF_IMPLEMENT_DYNCREATE("ILBM","ALPH",IlbmAlphChunk) 5 | IFF_IMPLEMENT_DYNCREATE("MIPM","CONT",MipmContChunk) 6 | IFF_IMPLEMENT_DYNCREATE("ILBM","S3TC",IlbmS3tcChunk) 7 | IFF_IMPLEMENT_DYNCREATE("MIPM","FLAG",MipmFlagChunk) 8 | 9 | namespace IFF 10 | { 11 | void IlbmTranChunk::Serialize(Archive * pArchv) 12 | { 13 | pArchv->Transfer(eTransType); 14 | pArchv->Transfer(xPos); 15 | pArchv->Transfer(yPos); 16 | pArchv->Transfer(rgb); 17 | } 18 | 19 | void IlbmAlphChunk::Serialize(Archive * pArchv) 20 | { 21 | pArchv->Transfer(width); 22 | pArchv->Transfer(height); 23 | pArchv->Transfer(nBitPlanes); 24 | pArchv->Transfer(eCompression); 25 | 26 | IlbmBodyChunk::Serialize(pArchv); 27 | } 28 | 29 | bool IlbmAlphChunk::GetHeaderInfo() const 30 | { 31 | IlbmBodyChunk::nWidth = width; 32 | IlbmBodyChunk::eCompression = eCompression; 33 | IlbmBodyChunk::nBitPlanes = nBitPlanes; 34 | return true; 35 | } 36 | 37 | void MipmContChunk::Serialize(Archive * pArchv) 38 | { 39 | pArchv->Transfer(nMipMaps); 40 | pArchv->Transfer(eFilter); 41 | } 42 | 43 | void MipmFlagChunk::Serialize(Archive * pArchv) 44 | { 45 | pArchv->Transfer(flags); 46 | } 47 | 48 | IlbmS3tcChunk::IlbmS3tcChunk() 49 | { 50 | m_idCk = "S3TC"; 51 | 52 | pData = NULL; 53 | dataSize = 0; 54 | } 55 | 56 | IlbmS3tcChunk::~IlbmS3tcChunk() 57 | { 58 | if(pData) delete [] pData; 59 | pData = NULL; 60 | } 61 | 62 | void IlbmS3tcChunk::Serialize(Archive * pArchv) 63 | { 64 | pArchv->Transfer(flags); 65 | pArchv->Transfer(fourCC); 66 | pArchv->Transfer(redWeight); 67 | pArchv->Transfer(blueWeight); 68 | pArchv->Transfer(greenWeight); 69 | pArchv->Transfer(width); 70 | pArchv->Transfer(height); 71 | 72 | pArchv->Transfer(dataSize); 73 | 74 | if (pArchv->m_bIsLoading) 75 | { 76 | if(pData) delete [] pData; 77 | pData = new UBYTE[dataSize]; 78 | } 79 | 80 | UBYTE *pDataPos = pData; 81 | for(unsigned i=0;iTransfer(*pDataPos++); 84 | } 85 | } 86 | 87 | } -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/KRENDER.H: -------------------------------------------------------------------------------- 1 | /* If this define is set to a non-zero value then the new scandraws will be used */ 2 | #define KRENDER_ON 1 3 | 4 | /* prototypes of the replacement scandraw functions */ 5 | extern void KR_ScanDraw_Item_2dTexturePolygon_VideoModeType_8(int *itemptr); 6 | extern void KR_ScanDraw_Item_Gouraud2dTexturePolygon_VideoModeType_8(int *itemptr); 7 | extern void KR_ScanDraw_Item_Gouraud3dTexturePolygon_Linear_S_VideoModeType_8(int *itemptr); 8 | extern void MotionTrackerRotateBlit(void); 9 | extern void MotionTrackerRotateBlit8(void); 10 | 11 | 12 | /*KJL***************************************************** 13 | * Palette fading; a value of 65536 corresponds to normal * 14 | * palette, 0 is completely other (eg. all white). * 15 | *****************************************************KJL*/ 16 | extern void SetPaletteFadeLevel(int fadeLevel); 17 | extern void FadeBetweenPalettes(unsigned char *palPtr, int fadeLevel); 18 | extern void FadePaletteToWhite(unsigned char *palPtr,int fadeLevel); 19 | 20 | /*KJL********************************************* 21 | * Fill the screen with black & flip then repeat. * 22 | *********************************************KJL*/ 23 | extern void BlankScreen(void); 24 | 25 | 26 | /* KJL 16:06:24 04/04/97 - To choose between laced and full screen modes */ 27 | extern int KRenderDrawMode; 28 | 29 | 30 | 31 | 32 | 33 | 34 | extern void KDraw_Item_GouraudPolygon(int *itemptr); 35 | extern void KDraw_Item_2dTexturePolygon(int *itemptr); 36 | extern void KDraw_Item_Gouraud2dTexturePolygon(int *itemptr); 37 | extern void KDraw_Item_Gouraud3dTexturePolygon(int *itemptr); 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | extern void MakeViewingWindowSmaller(void); 51 | extern void MakeViewingWindowLarger(void); 52 | 53 | /* routines to draw a star filled sky */ 54 | extern void CreateStarArray(void); 55 | extern void DrawStarfilledSky(void); -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/OEChunk.h: -------------------------------------------------------------------------------- 1 | #ifndef _oechunk_h_ 2 | #define _oechunk_h_ 1 3 | 4 | #include "Chunk.hpp" 5 | #include "obchunk.hpp" 6 | 7 | #if objedit 8 | #include "Template.hpp" 9 | #endif 10 | //#if engine 11 | //#define VECTOR VECTORCH 12 | //#endif 13 | 14 | #if engine 15 | #else 16 | struct VECTORCH 17 | { 18 | int vx, vy, vz; 19 | }; 20 | #endif 21 | 22 | struct ChunkMapBlock 23 | { 24 | char TemplateName[20]; 25 | char TemplateNotes[100]; 26 | int MapType; 27 | int MapShape; 28 | int MapFlags; 29 | int MapFlags2; 30 | int MapFlags3; 31 | int MapCType; 32 | int MapCGameType; 33 | int MapCStrategyS; 34 | int MapCStrategyL; 35 | int MapInteriorType; 36 | int MapLightType; 37 | int MapMass; 38 | VECTORCH MapNewtonV; 39 | VECTORCH MapOrigin; 40 | int MapViewType; 41 | 42 | int MapVDBData; 43 | int SimShapeList; 44 | 45 | 46 | 47 | }; 48 | 49 | class Map_Block_Chunk : public Chunk 50 | { 51 | public: 52 | virtual size_t size_chunk() 53 | { 54 | return (chunk_size=216); 55 | } 56 | virtual BOOL output_chunk (HANDLE &); 57 | 58 | virtual void fill_data_block (char * data_start); 59 | 60 | ChunkMapBlock map_data; 61 | friend class Object_Project_Data_Chunk; 62 | 63 | Map_Block_Chunk (Object_Project_Data_Chunk * parent) 64 | :Chunk(parent,"MAPBLOCK") 65 | {} 66 | 67 | //constructor from buffer 68 | Map_Block_Chunk (Chunk_With_Children * parent,const char* data,size_t); 69 | }; 70 | 71 | struct ChunkStrategy 72 | { 73 | char StrategyName[20]; 74 | char StrategyNotes[100]; 75 | int Strategy; 76 | }; 77 | 78 | class Strategy_Chunk : public Chunk 79 | { 80 | public : 81 | virtual size_t size_chunk() 82 | { 83 | return (chunk_size=136); 84 | } 85 | virtual BOOL output_chunk (HANDLE &); 86 | 87 | virtual void fill_data_block (char * data_start); 88 | 89 | ChunkStrategy strategy_data; 90 | friend class Object_Project_Data_Chunk; 91 | 92 | Strategy_Chunk(Object_Project_Data_Chunk *parent) 93 | :Chunk(parent,"STRATEGY") 94 | {} 95 | 96 | //constructor from buffer 97 | Strategy_Chunk (Chunk_With_Children * parent,const char* data,size_t); 98 | }; 99 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/OUR_MEM.C: -------------------------------------------------------------------------------- 1 | #include "3dc.h" 2 | 3 | #include 4 | 5 | #define UseLocalAssert No 6 | 7 | #include "ourasert.h" 8 | 9 | #if debug 10 | int alloc_cnt = 0; 11 | int deall_cnt = 0; 12 | #endif 13 | 14 | void *AllocMem(size_t __size); 15 | void DeallocMem(void *__ptr); 16 | 17 | /* Note: Never use AllocMem directly ! */ 18 | /* Instead use AllocateMem() which is a */ 19 | /* macro defined in mem3dc.h that allows */ 20 | /* for debugging info. */ 21 | 22 | void *AllocMem(size_t __size) 23 | { 24 | GLOBALASSERT(__size>0); 25 | #if debug 26 | alloc_cnt++; 27 | #endif 28 | 29 | return malloc(__size); 30 | }; 31 | 32 | /* Note: Never use DeallocMem directly ! */ 33 | /* Instead use DeallocateMem() which is a */ 34 | /* macro defined in mem3dc.h that allows */ 35 | /* for debugging info. */ 36 | 37 | void DeallocMem(void *__ptr) 38 | { 39 | #if debug 40 | deall_cnt++; 41 | #endif 42 | 43 | if(__ptr) free(__ptr); 44 | 45 | #if debug 46 | else { 47 | 48 | textprint("ERROR - freeing null ptr\n"); 49 | WaitForReturn(); 50 | 51 | } 52 | #endif 53 | }; 54 | 55 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/PENTIME.H: -------------------------------------------------------------------------------- 1 | /* pentime.h */ 2 | extern unsigned long int rdtsc_lo(void); 3 | extern unsigned long int rdtsc_hi(void); 4 | extern unsigned long int rdtsc_mid(void); 5 | 6 | #define ProfileStart() \ 7 | { \ 8 | int time = rdtsc_lo(); 9 | #define ProfileStop(x) \ 10 | textprint("%s %d\n",x,rdtsc_lo()-time); \ 11 | } 12 | 13 | #pragma aux rdtsc_lo = \ 14 | "db 0fh, 31h" \ 15 | value [eax] \ 16 | modify [edx]; 17 | 18 | #pragma aux rdtsc_hi = \ 19 | "db 0fh, 31h" \ 20 | value [edx] \ 21 | modify [eax]; 22 | 23 | #pragma aux rdtsc_mid = \ 24 | "db 0fh, 31h" \ 25 | "shr eax, 10h" \ 26 | "shl edx, 10h" \ 27 | "add eax, edx" \ 28 | value [eax] \ 29 | modify [edx]; 30 | 31 | /* Test to see if we have a Pentium or not. Note that this test is reliable 32 | * enough for a tools project (where we can put in an overide switch) but not 33 | * for a released product. 34 | */ 35 | extern unsigned char Pentium(void); 36 | #pragma aux Pentium = \ 37 | "pushfd" \ 38 | "pop eax" \ 39 | "or eax, 00200000h" \ 40 | "push eax" \ 41 | "popfd" \ 42 | "pushfd" \ 43 | "pop eax" \ 44 | "mov ecx, eax" \ 45 | "and eax, 00200000h" \ 46 | "cmp eax, 0" \ 47 | "je not_Pentium" \ 48 | "mov eax, ecx" \ 49 | "and eax, 0ffdfffffh" \ 50 | "push eax" \ 51 | "popfd" \ 52 | "pushfd" \ 53 | "pop eax" \ 54 | "and eax, 00200000h" \ 55 | "cmp eax, 0" \ 56 | "jne not_Pentium" \ 57 | "is_Pentium: mov al, 1" \ 58 | "jmp finish" \ 59 | "not_Pentium: mov al, 0" \ 60 | "finish: nop" \ 61 | value [al] \ 62 | modify [eax ecx] 63 | 64 | 65 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/SMSOPT.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------- 2 | // DESCRIPTION: SMSOPT.H - Options for SMS compilation 3 | // 4 | // AUTHOR: Mark Tolley 5 | // 6 | // HISTORY: Created 19th Sept 1996 7 | // 8 | //------------------------------------------------------------------- 9 | 10 | // Incorporated into sndmanag.h and xxxxxsnd.h 11 | 12 | #ifndef SMSOPT_H 13 | #define SMSOPT_H 14 | 15 | 16 | // #DEFINES 17 | // General switches 18 | #define SOUND_ON 0 // Compile sound commands in main game code 19 | #define SOUND_3D 1 // Compile 3D sound functions 20 | 21 | // (NB switching this off makes SMS independent of 3DC) 22 | 23 | // Platform switches - ONLY ONE OF THESE SHOULD BE ON!! 24 | #define SMS_SATURN 0 // Compile SMS for Saturn 25 | #define SMS_PSX 0 // Compile SMS for PSX 26 | #define SMS_PCDOS 0 // Compile SMS for PC-DOS 27 | #define SMS_WIN32 1 // Compile SMS for PC-Win95 28 | 29 | // Sound source switches 30 | #define MIDI_ON 1 // Compile MIDI-specific code 31 | #define DIGI_ON 1 // Compile WAV-specific code 32 | #define CDDA_ON 1 // Compile CDDA-specific code 33 | 34 | // Any other sound-specific compiler switches 35 | #define SMS_FORCE_PENTIUM_TO_DOS_QUALITY 0 // Forces Pentium to use 36 | // DOS quality sound. May help to speed things 37 | // up... NB 3D SOUND WON'T WORK PROPERLY 38 | #define SMS_TIMER 1 // Implement timing for ONEHI. Relies on NormalFrameTime 39 | #endif // SMSOPT_H 40 | // END OF FILE 41 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/ShowCmds.h: -------------------------------------------------------------------------------- 1 | /* KJL 14:42:10 29/03/98 - ShowCmds.h 2 | 3 | defines the variables that describe the status of the debugging text 4 | 5 | 6 | eg. if ShowDebuggingText.FPS == 1, then the frame-rate show be displayed. 7 | 8 | */ 9 | struct DEBUGGINGTEXTOPTIONS 10 | { 11 | unsigned int FPS :1; 12 | unsigned int Environment :1; 13 | unsigned int Coords :1; 14 | unsigned int Module :1; 15 | unsigned int Target :1; 16 | 17 | unsigned int Networking: 1; 18 | unsigned int Dynamics :1; 19 | unsigned int GunPos :1; 20 | unsigned int Tears :1; 21 | unsigned int PolyCount :1; 22 | unsigned int Sounds :1; 23 | }; 24 | 25 | extern struct DEBUGGINGTEXTOPTIONS ShowDebuggingText; 26 | 27 | #ifdef AVP_DEBUG_VERSION 28 | #define DEBUGGING_TEXT_ON 1 29 | #else 30 | #define DEBUGGING_TEXT_ON 0 31 | #endif 32 | 33 | #if DEBUGGING_TEXT_ON 34 | extern int PrintDebuggingText(const char* t, ...); 35 | #else 36 | #define PrintDebuggingText(ignore) 37 | #endif 38 | 39 | #if 1 40 | extern int ReleasePrintDebuggingText(const char* t, ...); 41 | #else 42 | #define PrintDebuggingText(ignore) 43 | #endif 44 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/TOOLCHNK.CPP: -------------------------------------------------------------------------------- 1 | #include "toolchnk.hpp" 2 | 3 | #ifdef cencon 4 | #define new my_new 5 | #endif 6 | 7 | //macro for helping to force inclusion of chunks when using libraries 8 | FORCE_CHUNK_INCLUDE_IMPLEMENT(toolchnk) 9 | 10 | RIF_IMPLEMENT_DYNCREATE("CAMORIGN",Camera_Origin_Chunk) 11 | 12 | Camera_Origin_Chunk::Camera_Origin_Chunk(Chunk_With_Children* parent) 13 | :Chunk(parent,"CAMORIGN") 14 | { 15 | location.x=0; 16 | location.y=0; 17 | location.z=0; 18 | ChunkMatrix identity={1,0,0,0,1,0,0,0,1}; 19 | orientation=identity; 20 | } 21 | 22 | Camera_Origin_Chunk::Camera_Origin_Chunk(Chunk_With_Children* parent,const char* data,size_t ) 23 | :Chunk(parent,"CAMORIGN") 24 | { 25 | location=*(ChunkVector*)data; 26 | data+=sizeof(ChunkVector); 27 | orientation=*(ChunkMatrix*)data; 28 | } 29 | 30 | void Camera_Origin_Chunk::fill_data_block(char * data_start) 31 | { 32 | strncpy (data_start, identifier, 8); 33 | data_start += 8; 34 | *((int *) data_start) = chunk_size; 35 | data_start += 4; 36 | 37 | *(ChunkVector*)data_start=location; 38 | data_start+=sizeof(ChunkVector); 39 | *(ChunkMatrix*)data_start=orientation; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/TOOLCHNK.HPP: -------------------------------------------------------------------------------- 1 | #ifndef _toolchnk_hpp 2 | #define _toolchnk_hpp 3 | 4 | #include "chunk.hpp" 5 | #include "chnktype.hpp" 6 | 7 | class Camera_Origin_Chunk :public Chunk 8 | { 9 | public : 10 | Camera_Origin_Chunk(Chunk_With_Children* parent); 11 | Camera_Origin_Chunk(Chunk_With_Children * parent,const char* data,size_t size); 12 | 13 | ChunkVector location; 14 | ChunkMatrix orientation;//not used yet 15 | 16 | virtual void fill_data_block (char * data_start); 17 | virtual size_t size_chunk (){return chunk_size=12+sizeof(ChunkVector)+sizeof(ChunkMatrix); } 18 | 19 | 20 | }; 21 | 22 | 23 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/TXIOCTRL.H: -------------------------------------------------------------------------------- 1 | #ifndef _included_txioctrl_h_ 2 | #define _included_txioctrl_h_ 3 | 4 | #include "system.h" 5 | 6 | #ifdef MaxImageGroups 7 | #if MaxImageGroups < 2 /* optimize if this multiple groups are not required */ 8 | #undef MaxImageGroups 9 | #endif /* MaxImageGroups < 2 */ 10 | #endif /* MaxImageGroups */ 11 | 12 | #ifdef MaxImageGroups 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | void ImageGroupFreed(int img_group); 19 | 20 | void MarkImageInUseByGroup(int img_group, int img_num_offset, int group_using); 21 | 22 | int IsImageInUse(int img_group, int img_num_offset); 23 | 24 | int CanDeleteImage(int img_group, int img_num_offset); 25 | 26 | void NowDeleteImage(int img_group, int img_num_offset); 27 | 28 | #if debug 29 | 30 | void ImageGroupsDebugPrint(void); 31 | 32 | void ImageGroupsDebugPrintInit(void); 33 | 34 | #endif /* debug */ 35 | 36 | typedef void (*ImageNumberCallbackFunction) (int imgnum, void * user); 37 | 38 | void EnumSharedImages(int group_num, int numimages, ImageNumberCallbackFunction callback_fn, void * user); 39 | 40 | void EnumLeftoverImages(int group_num, int numimages, ImageNumberCallbackFunction callback_fn, void * user); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* MaxImageGroups */ 47 | 48 | #endif /* ! _included_txioctrl_h_ */ 49 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/VRAMTIME.C: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "vramtime.h" 4 | 5 | static DWORD transition_times_matrix[][VWS_MAXSTATES] = 6 | { 7 | /* from DDRELEASE */ 8 | { 0, 20, 0, 100, 100 }, 9 | /* from D3DTEXRELEASE */ 10 | { 20, 0, 100, 100, 100 }, 11 | /* from DDCREATE */ 12 | { 0, 100, 0, 20, 100 }, 13 | /* from D3DTEXCREATE */ 14 | { 20, 100, 20, 20, 100 }, 15 | /* from UNKNOWN */ 16 | { 100, 100, 100, 100, 100 } 17 | }; 18 | 19 | 20 | void WaitForVRamReady(VRAM_WAIT_STATE vws) 21 | { 22 | static DWORD old_time = 0; 23 | static VRAM_WAIT_STATE old_vws = VWS_UNKNOWN; 24 | 25 | DWORD new_time; 26 | 27 | if (0==old_time) old_time = timeGetTime(); 28 | 29 | do new_time = timeGetTime(); while (new_time - old_time < transition_times_matrix[old_vws][vws]); 30 | 31 | old_time = new_time; 32 | old_vws = vws; 33 | } 34 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/VRAMTIME.H: -------------------------------------------------------------------------------- 1 | #ifndef _included_vramtime_h_ 2 | #define _included_vramtime_h_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef enum VramWaitState 9 | { 10 | VWS_DDRELEASE, 11 | VWS_D3DTEXRELEASE, 12 | VWS_DDCREATE, 13 | VWS_D3DTEXCREATE, 14 | VWS_UNKNOWN, 15 | VWS_MAXSTATES 16 | 17 | } VRAM_WAIT_STATE; 18 | 19 | void WaitForVRamReady(VRAM_WAIT_STATE); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif /* ! _included_vramtime_h_ */ 26 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/VideoModes.h: -------------------------------------------------------------------------------- 1 | #define MAX_DEVICES 4 2 | #define MAX_VIDEOMODES 100 3 | 4 | 5 | typedef struct 6 | { 7 | int Width; 8 | int Height; 9 | int ColourDepth; 10 | } VIDEOMODEDESC; 11 | 12 | typedef struct 13 | { 14 | GUID DDGUID; 15 | int DDGUIDIsSet; 16 | 17 | DDDEVICEIDENTIFIER DeviceInfo; 18 | DDDEVICEIDENTIFIER DeviceInfoHost; 19 | DDCAPS DriverCaps; 20 | 21 | VIDEOMODEDESC VideoModes[MAX_VIDEOMODES]; 22 | int NumberOfVideoModes; 23 | 24 | } DEVICEANDVIDEOMODESDESC; 25 | 26 | typedef struct 27 | { 28 | GUID DDGUID; 29 | int DDGUIDIsSet; 30 | int Width; 31 | int Height; 32 | int ColourDepth; 33 | 34 | } DEVICEANDVIDEOMODE; 35 | 36 | extern DEVICEANDVIDEOMODESDESC DeviceDescriptions[MAX_DEVICES]; 37 | extern int NumberOfDevices; 38 | extern int CurrentlySelectedDevice; 39 | extern int CurrentlySelectedVideoMode; 40 | 41 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/Zsp.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _zsp_hpp 2 | #define _zsp_hpp 1 3 | 4 | #include "shpchunk.hpp" 5 | 6 | 7 | #define rsp_oc_x0 0x00000001 8 | #define rsp_oc_x1 0x00000002 9 | #define rsp_oc_y0 0x00000004 10 | #define rsp_oc_y1 0x00000008 11 | #define rsp_oc_z0 0x00000010 12 | #define rsp_oc_z1 0x00000020 13 | 14 | 15 | // this file should be included from chunk.hpp 16 | 17 | 18 | struct ChunkShape; 19 | 20 | struct ZSP_zone 21 | { 22 | #if (cencon || shpedit) 23 | ZSP_zone (const ChunkShape &, double, double, double, double); 24 | #endif 25 | 26 | ZSP_zone (); 27 | ~ZSP_zone(); 28 | 29 | ZSP_zone (const ZSP_zone &); 30 | ZSP_zone & operator=(const ZSP_zone &); 31 | 32 | int num_z_polys; 33 | int * z_poly_list; 34 | int num_z_verts; 35 | int * z_vert_list; 36 | 37 | friend unsigned char operator==(const ZSP_zone &, const ZSP_zone &); 38 | friend unsigned char operator!=(const ZSP_zone &, const ZSP_zone &); 39 | }; 40 | 41 | 42 | class ZSP_Data 43 | { 44 | 45 | public: 46 | 47 | #if (cencon || shpedit) 48 | ZSP_Data (const ChunkShape &, int); 49 | #endif 50 | 51 | ZSP_Data (const char * zdata, size_t zsize); 52 | 53 | ~ZSP_Data (); 54 | 55 | double cube_size; 56 | double cube_radius; 57 | 58 | int num_x_cubes, num_y_cubes, num_z_cubes; 59 | 60 | List zone_array; 61 | 62 | 63 | }; 64 | 65 | 66 | ///////////////////////////////////////// 67 | 68 | class Shape_ZSP_Data_Chunk : public Chunk 69 | { 70 | public: 71 | 72 | #if cencon || shpedit 73 | Shape_ZSP_Data_Chunk (Shape_Sub_Shape_Chunk * parent, ZSP_Data zspin) 74 | : Chunk(parent, "SHPZSPDT"), zspdata (zspin) 75 | {} 76 | 77 | Shape_ZSP_Data_Chunk (Shape_Chunk * parent, ZSP_Data zspin) 78 | : Chunk(parent, "SHPZSPDT"), zspdata (zspin) 79 | {} 80 | #endif 81 | 82 | const ZSP_Data zspdata; 83 | 84 | size_t size_chunk (); 85 | void fill_data_block (char *); 86 | 87 | Shape_ZSP_Data_Chunk (Shape_Sub_Shape_Chunk * parent, const char * zdata, size_t zsize) 88 | : Chunk (parent, "SHPZSPDT"), zspdata (zdata, zsize) 89 | {} 90 | 91 | Shape_ZSP_Data_Chunk (Shape_Chunk * parent, const char * zdata, size_t zsize) 92 | : Chunk (parent, "SHPZSPDT"), zspdata (zdata, zsize) 93 | {} 94 | 95 | }; 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | #endif 108 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/alt_tab.h: -------------------------------------------------------------------------------- 1 | /* 2 | JH - 18/02/98 3 | Deal with lost surfaces and textures - restore them when the application is re-activated 4 | */ 5 | 6 | #ifndef _INCLUDED_ALT_TAB_H_ 7 | #define _INCLUDED_ALT_TAB_H_ 8 | 9 | #include "aw.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef void (* AT_PFN_RESTORETEXTURE) (D3DTexture * pTexture, void * pUser); 16 | typedef void (* AT_PFN_RESTORESURFACE) (DDSurface * pSurface, void * pUser); 17 | 18 | #ifdef NDEBUG 19 | extern void ATIncludeTexture(D3DTexture * pTexture, AW_BACKUPTEXTUREHANDLE hBackup); 20 | extern void ATIncludeTextureEx(D3DTexture * pTexture, AT_PFN_RESTORETEXTURE pfnRestore, void * pUser); 21 | extern void ATIncludeSurface(DDSurface * pSurface, AW_BACKUPTEXTUREHANDLE hBackup); 22 | extern void ATIncludeSurfaceEx(DDSurface * pSurface, AT_PFN_RESTORESURFACE pfnRestore, void * pUser); 23 | #else 24 | extern void _ATIncludeTexture(D3DTexture * pTexture, AW_BACKUPTEXTUREHANDLE hBackup, char const * pszFile, unsigned nLine, char const * pszDebugString); 25 | extern void _ATIncludeTextureEx(D3DTexture * pTexture, AT_PFN_RESTORETEXTURE pfnRestore, void * pUser, char const * pszFile, unsigned nLine, char const * pszFuncName, char const * pszDebugString); 26 | extern void _ATIncludeSurface(DDSurface * pSurface, AW_BACKUPTEXTUREHANDLE hBackup, char const * pszFile, unsigned nLine, char const * pszDebugString); 27 | extern void _ATIncludeSurfaceEx(DDSurface * pSurface, AT_PFN_RESTORESURFACE pfnRestore, void * pUser, char const * pszFile, unsigned nLine, char const * pszFuncName, char const * pszDebugString); 28 | #define ATIncludeTexture(p,h) _ATIncludeTexture(p,h,__FILE__,__LINE__,NULL) 29 | #define ATIncludeTextureEx(p,f,u) _ATIncludeTextureEx(p,f,u,__FILE__,__LINE__,#f ,NULL) 30 | #define ATIncludeSurface(p,h) _ATIncludeSurface(p,h,__FILE__,__LINE__,NULL) 31 | #define ATIncludeSurfaceEx(p,f,u) _ATIncludeSurfaceEx(p,f,u,__FILE__,__LINE__,#f ,NULL) 32 | #define ATIncludeTextureDb(p,h,d) _ATIncludeTexture(p,h,__FILE__,__LINE__,d) 33 | #define ATIncludeTextureExDb(p,f,u,d) _ATIncludeTextureEx(p,f,u,__FILE__,__LINE__,#f ,d) 34 | #define ATIncludeSurfaceDb(p,h,d) _ATIncludeSurface(p,h,__FILE__,__LINE__,d) 35 | #define ATIncludeSurfaceExDb(p,f,u,d) _ATIncludeSurfaceEx(p,f,u,__FILE__,__LINE__,#f ,d) 36 | #endif 37 | 38 | extern void ATRemoveTexture(D3DTexture * pTexture); 39 | extern void ATRemoveSurface(DDSurface * pSurface); 40 | 41 | extern void ATOnAppReactivate(); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif /* ! _INCLUDED_ALT_TAB_H_ */ 48 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/aw.h: -------------------------------------------------------------------------------- 1 | #ifndef _INCLUDED_AW_H_ 2 | #define _INCLUDED_AW_H_ 3 | 4 | #include 5 | 6 | typedef IDirectDraw DDObject; 7 | typedef IDirect3DDevice D3DDevice; 8 | typedef IDirect3DTexture D3DTexture; 9 | typedef IDirectDrawSurface DDSurface; 10 | typedef IDirectDrawPalette DDPalette; 11 | 12 | #define GUID_D3D_TEXTURE IID_IDirect3DTexture 13 | #define GUID_DD_SURFACE IID_IDirectDrawSurface 14 | 15 | typedef DDSURFACEDESC DD_SURFACE_DESC; 16 | typedef DDSCAPS DD_S_CAPS; 17 | 18 | struct AwBackupTexture; 19 | typedef struct AwBackupTexture * AW_BACKUPTEXTUREHANDLE; 20 | 21 | #endif /* _INCLUDED_AW_H_ */ -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/bink.c: -------------------------------------------------------------------------------- 1 | 2 | #include "3dc.h" 3 | #include "d3_func.h" 4 | 5 | #define UseLocalAssert 1 6 | #include "ourasert.h" 7 | 8 | extern char *ScreenBuffer; 9 | extern LPDIRECTSOUND DSObject; 10 | extern int GotAnyKey; 11 | extern int IntroOutroMoviesAreActive; 12 | extern DDPIXELFORMAT DisplayPixelFormat; 13 | 14 | extern void DirectReadKeyboard(void); 15 | 16 | void PlayBinkedFMV(char *filenamePtr) 17 | { 18 | } 19 | extern void StartMenuBackgroundBink(void) 20 | { 21 | } 22 | extern int PlayMenuBackgroundBink(void) 23 | { 24 | return 0; 25 | } 26 | extern void EndMenuBackgroundBink(void) 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/fail.c: -------------------------------------------------------------------------------- 1 | /* LotU: Error handling functions. 2 | 3 | Copyright (C) 1995, Jamie Lokier. 4 | Written for Rebellion Developments, Ltd. 5 | 6 | Permission to use, copy, modify and distribute this file for any 7 | purpose by Rebellion Developments, Ltd. is hereby granted. If you 8 | want to use this file outside the company, please let me know. 9 | */ 10 | 11 | #include "3dc.h" 12 | #include "fail.h" 13 | #include "dxlog.h" 14 | 15 | void 16 | fail (const char * format, ...) 17 | { 18 | va_list ap; 19 | 20 | LOGDXSTR(format); 21 | va_start (ap, format); 22 | if (format != 0) 23 | vfprintf (stderr, format, ap); 24 | va_end (ap); 25 | 26 | exit (EXIT_FAILURE); 27 | } 28 | 29 | void FAILHandleCompilerWarningMessage(void) 30 | { 31 | int temp; 32 | 33 | temp = D3DRMMAP_PERSPCORRECT; 34 | temp = D3DRMMAP_WRAPU; 35 | temp = D3DRMMAP_WRAPV; 36 | temp = D3DRMGROUP_ALLGROUPS; 37 | } -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/fail.h: -------------------------------------------------------------------------------- 1 | /* LotU: Error handling functions. 2 | 3 | Copyright (C) 1995, Jamie Lokier. 4 | Written for Rebellion Developments, Ltd. 5 | 6 | Permission to use, copy, modify and distribute this file for any 7 | purpose by Rebellion Developments, Ltd. is hereby granted. If you 8 | want to use this file outside the company, please let me know. 9 | */ 10 | 11 | #ifndef __fail_h 12 | #define __fail_h 1 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #ifdef _MSC_VER 19 | #define VARARG_DECL __cdecl 20 | #else 21 | #define VARARG_DECL 22 | #endif 23 | 24 | #ifdef __GNUC__ 25 | 26 | #if __GNUC__ >= 2 && __GNUC_MINOR__ >= 5 27 | extern void 28 | VARARG_DECL fail (const char * __format, ...) 29 | __attribute__ ((noreturn, format (printf, 1, 2))); 30 | #else 31 | extern __volatile__ void VARARG_DECL fail (const char * __format, ...); 32 | #endif 33 | 34 | #else 35 | 36 | extern void VARARG_DECL fail (const char * __format, ...); 37 | 38 | #endif 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif /* __fail_h */ 45 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/fragchnk.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _fragchnk_hpp_ 2 | #define _fragchnk_hpp_ 3 | 4 | #include "chunk.hpp" 5 | #include "chnktype.hpp" 6 | 7 | 8 | class Fragment_Type_Data_Chunk : public Chunk 9 | { 10 | public : 11 | 12 | Fragment_Type_Data_Chunk(Chunk_With_Children* parent,const char* name); 13 | Fragment_Type_Data_Chunk (Chunk_With_Children * const parent,const char *, size_t const); 14 | ~Fragment_Type_Data_Chunk(); 15 | 16 | size_t size_chunk (); 17 | void fill_data_block (char * data_start); 18 | 19 | 20 | char* frag_type_name; 21 | int pad1,pad2,pad3; 22 | 23 | }; 24 | 25 | class Fragment_Type_Shape_Chunk : public Chunk 26 | { 27 | public: 28 | 29 | Fragment_Type_Shape_Chunk(Chunk_With_Children* parent,const char* _name,int number,ChunkVectorInt _location); 30 | Fragment_Type_Shape_Chunk (Chunk_With_Children * const parent,const char *, size_t const); 31 | ~Fragment_Type_Shape_Chunk(); 32 | 33 | size_t size_chunk (); 34 | void fill_data_block (char * data_start); 35 | 36 | 37 | int num_fragments; 38 | ChunkVectorInt location; 39 | char* name; 40 | 41 | int pad1,pad2,pad3; 42 | 43 | }; 44 | class Fragment_Type_Sound_Chunk : public Chunk 45 | { 46 | public: 47 | 48 | Fragment_Type_Sound_Chunk(Chunk_With_Children* parent); 49 | Fragment_Type_Sound_Chunk (Chunk_With_Children * const parent,const char *, size_t const); 50 | ~Fragment_Type_Sound_Chunk(); 51 | 52 | size_t size_chunk (); 53 | void fill_data_block (char * data_start); 54 | 55 | char* wav_name; 56 | unsigned long inner_range; 57 | unsigned long outer_range; 58 | int max_volume; 59 | int pitch; 60 | int pad; 61 | 62 | }; 63 | 64 | class Fragment_Type_Chunk : public Chunk_With_Children 65 | { 66 | public : 67 | Fragment_Type_Chunk(Chunk_With_Children * parent,const char* name) 68 | : Chunk_With_Children (parent, "FRAGTYPE") 69 | {new Fragment_Type_Data_Chunk(this,name);} 70 | 71 | Fragment_Type_Chunk (Chunk_With_Children * const parent,const char *, size_t const); 72 | 73 | const char* get_name(); 74 | 75 | }; 76 | 77 | 78 | 79 | 80 | 81 | 82 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/huffman.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _huffman_hpp_included 2 | #define _huffman_hpp_included 1 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #define MAX_DEPTH 11 10 | typedef struct 11 | { 12 | char Identifier[8]; 13 | int CompressedDataSize; 14 | int UncompressedDataSize; 15 | int CodelengthCount[MAX_DEPTH]; 16 | unsigned char ByteAssignment[256]; 17 | } HuffmanPackage; 18 | 19 | /* KJL 17:16:03 17/09/98 - Compression */ 20 | extern HuffmanPackage *HuffmanCompression(unsigned char *sourcePtr, int length); 21 | 22 | /* KJL 16:53:53 19/09/98 - Decompression */ 23 | extern char *HuffmanDecompress(HuffmanPackage *inpackage); 24 | 25 | 26 | #define COMPRESSED_RIF_IDENTIFIER "REBCRIF1" 27 | #ifdef __cplusplus 28 | }; 29 | #endif 30 | 31 | #endif -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/list_tem.cpp: -------------------------------------------------------------------------------- 1 | #ifdef NDEBUG 2 | ; 3 | #else 4 | 5 | char const * list_fail_get_data_from_sentinel = "%s: Tried to get data from sentinel\n"; 6 | char const * list_fail_add_entry_after = "%s: Tried to add after a nonexistent List entry\n"; 7 | char const * list_fail_add_entry_before = "%s: Tried to add before a nonexistent List entry\n"; 8 | char const * list_fail_delete_entry = "%s: Tried to delete a nonexistent List entry\n"; 9 | char const * list_fail_delete_entry_by_pointer = "%s: Tried to delete-by-pointer the sentinel of a list.\n"; 10 | char const * list_fail_alter_entry = "%s: Tried to alter a nonexistent List entry\n"; 11 | char const * list_fail_next_entry_nonexist = "%s: Tried to get entry after nonexistent entry."; 12 | char const * list_fail_next_entry_sentinel = "%s: Tried to get next entry, which is sentinel."; 13 | char const * list_fail_prev_entry_nonexist = "%s: Tried to get entry before nonexistent entry"; 14 | char const * list_fail_prev_entry_sentinel = "%s: Tried to get previous entry, which is sentinel."; 15 | char const * list_fail_last_entry = "%s: Tried to get last entry from a 0-length list.\n."; 16 | char const * list_fail_first_entry = "%s: Tried to get first entry from a 0-length list.\n."; 17 | char const * list_fail_similar_entry = "%s: Tried to get entry similar to nonexistent entry"; 18 | char const * list_fail_delete_last_entry = "%s: Tried to delete last element from an empty List.\n"; 19 | char const * list_fail_delete_first_entry = "%s: Tried to delete first element from an empty List.\n"; 20 | char const * list_fail_operator = "%s: Tried to get entry %d from %d-entry list.\n"; 21 | char const * lit_fail_next = "%s: Tried to take an Iterator past the sentinel of a List.\n"; 22 | char const * lit_fail_operator = "%s: Tried to take contents of sentinel of List\n"; 23 | char const * lit_fail_delete_current = "%s: Tried to delete sentinel of List\n"; 24 | char const * lit_fail_change_current = "%s: Tried to change contents of sentinel of List\n"; 25 | 26 | #endif 27 | 28 | 29 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/objedit.h: -------------------------------------------------------------------------------- 1 | 2 | #include "Chunk.hpp" 3 | 4 | #define VECTOR VECTORCH 5 | 6 | struct ChunkMapBlock 7 | { 8 | char TemplateName[20]; 9 | char TemplateNotes[100]; 10 | int MapType; 11 | int MapShape; 12 | int MapFlags; 13 | int MapFlags2; 14 | int MapFlags3; 15 | int MapCType; 16 | int MapCGameType; 17 | int MapCStrategyS; 18 | int MapCStrategyL; 19 | int MapInteriorType; 20 | int MapLightType; 21 | int MapMass; 22 | VECTOR MapNewtonV; 23 | VECTOR MapOrigin; 24 | int MapViewType; 25 | 26 | int MapVDBData; 27 | int SimShapeList; 28 | 29 | 30 | 31 | }; 32 | 33 | class Map_Block_Chunk : public Chunk 34 | { 35 | public: 36 | virtual size_t size_chunk() 37 | { 38 | return (chunk_size=216); 39 | } 40 | virtual BOOL output_chunk (HANDLE &); 41 | 42 | virtual void fill_data_block (char * data_start); 43 | 44 | ChunkMapBlock map_data; 45 | friend class Object_Project_Data_Chunk; 46 | 47 | Map_Block_Chunk (Object_Project_Data_Chunk * parent) 48 | :Chunk(parent,"MAPBLOCK") 49 | {} 50 | private: 51 | 52 | //constructor from buffer 53 | Map_Block_Chunk (Object_Project_Data_Chunk * parent,const char* data); 54 | }; 55 | 56 | struct ChunkStrategy 57 | { 58 | char StrategyName[20]; 59 | char StrategyNotes[100]; 60 | int Strategy; 61 | }; 62 | 63 | class Strategy_Chunk : public Chunk 64 | { 65 | public : 66 | virtual size_t size_chunk() 67 | { 68 | return (chunk_size=136); 69 | } 70 | virtual BOOL output_chunk (HANDLE &); 71 | 72 | virtual void fill_data_block (char * data_start); 73 | 74 | ChunkStrategy strategy_data; 75 | friend class Object_Project_Data_Chunk; 76 | 77 | Strategy_Chunk(Object_Project_Data_Chunk *parent) 78 | :Chunk(parent,"STRATEGY") 79 | {} 80 | private: 81 | 82 | //constructor from buffer 83 | Strategy_Chunk (Object_Project_Data_Chunk * parent,const char* data); 84 | }; 85 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/plat_shp.h: -------------------------------------------------------------------------------- 1 | /* Plat_Shp.h */ 2 | 3 | 4 | extern void SetupPolygonFlagAccessForShape(SHAPEHEADER *shape); 5 | extern int Request_PolyFlags(void *polygon); 6 | 7 | extern int SetupPolygonAccess(DISPLAYBLOCK *objectPtr); 8 | extern void AccessNextPolygon(void); 9 | extern void GetPolygonVertices(struct ColPolyTag *polyPtr); 10 | extern void GetPolygonNormal(struct ColPolyTag *polyPtr); 11 | extern int SetupPolygonAccessFromShapeIndex(int shapeIndex); 12 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/smacker.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* KJL 15:25:20 8/16/97 4 | * 5 | * smacker.h - functions to handle FMV playback 6 | * 7 | */ 8 | typedef int Smack; 9 | 10 | extern void PlayFMV(char *filenamePtr); 11 | extern void StartMenuMusic(void); 12 | extern void PlayMenuMusic(void); 13 | extern void EndMenuMusic(void); 14 | 15 | 16 | 17 | typedef struct 18 | { 19 | IMAGEHEADER *ImagePtr; 20 | Smack *SmackHandle; 21 | int SoundVolume; 22 | int IsTriggeredPlotFMV; 23 | int StaticImageDrawn; 24 | 25 | int MessageNumber; 26 | 27 | LPDIRECTDRAWSURFACE SrcSurface; 28 | LPDIRECT3DTEXTURE SrcTexture; 29 | LPDIRECT3DTEXTURE DestTexture; 30 | PALETTEENTRY SrcPalette[256]; 31 | 32 | int RedScale; 33 | int GreenScale; 34 | int BlueScale; 35 | 36 | } FMVTEXTURE; 37 | 38 | 39 | extern int NextFMVTextureFrame(FMVTEXTURE *ftPtr, void *bufferPtr); 40 | extern void UpdateFMVTexturePalette(FMVTEXTURE *ftPtr); 41 | extern void InitialiseTriggeredFMVs(void); 42 | extern void StartTriggerPlotFMV(int number); 43 | 44 | extern void StartFMVAtFrame(int number, int frame); 45 | extern void GetFMVInformation(int *messageNumberPtr, int *frameNumberPtr); 46 | -------------------------------------------------------------------------------- /AvP_vc/3dc/win95/wpchunk.hpp: -------------------------------------------------------------------------------- 1 | #ifndef wpchunk_hpp 2 | #define wpchunk_hpp 1 3 | 4 | #include "chunk.hpp" 5 | #include "chnktype.hpp" 6 | #include "obchunk.hpp" 7 | 8 | struct WaypointLink 9 | { 10 | int index; 11 | int flags; 12 | }; 13 | 14 | struct ModuleLink 15 | { 16 | ~ModuleLink(); 17 | 18 | char* module_name; 19 | int flags; 20 | }; 21 | 22 | #define WaypointFlag_CentreDefinedByUser 0x80000000 23 | #define WaypointFlag_FirstGroundWaypoint 0x40000000 24 | struct ChunkWaypoint 25 | { 26 | ChunkWaypoint(); 27 | ~ChunkWaypoint(); 28 | 29 | int index; 30 | ChunkVectorInt min,max; //relative to centre 31 | ChunkVectorInt centre; //relative to world 32 | 33 | int NumWPLinks; 34 | WaypointLink* WayLinks; 35 | 36 | int NumModLinks; 37 | ModuleLink* ModLinks; 38 | 39 | int flags,spare2; 40 | 41 | }; 42 | 43 | class Module_Waypoint_Chunk : public Chunk 44 | { 45 | public : 46 | Module_Waypoint_Chunk(Chunk_With_Children*,const char *,size_t); 47 | Module_Waypoint_Chunk(Chunk_With_Children*); 48 | ~Module_Waypoint_Chunk(); 49 | 50 | virtual size_t size_chunk(); 51 | virtual void fill_data_block(char* data_start); 52 | 53 | //Copies waypoint data and deletes the old waypoint_chunk 54 | void TransferWaypointData(Module_Waypoint_Chunk*); 55 | 56 | int NumWaypoints; 57 | ChunkWaypoint* Waypoints; 58 | 59 | ChunkWaypoint* AlienWaypoints; 60 | ChunkWaypoint* GroundWaypoints; 61 | 62 | short NumAlienWaypoints; 63 | short NumGroundWaypoints; 64 | 65 | int spare1; 66 | int spare2; 67 | }; 68 | 69 | class AI_Module_Master_Chunk : public Chunk 70 | { 71 | public : 72 | AI_Module_Master_Chunk(Chunk_With_Children*,const char*,size_t); 73 | AI_Module_Master_Chunk(Object_Module_Data_Chunk*); 74 | 75 | virtual size_t size_chunk(); 76 | virtual void fill_data_block(char* data_start); 77 | 78 | void AddModule(Object_Chunk*); 79 | Object_Chunk* get_my_object_chunk(); 80 | 81 | List ModuleList; 82 | }; 83 | 84 | class AI_Module_Slave_Chunk : public Chunk 85 | { 86 | public : 87 | AI_Module_Slave_Chunk(Chunk_With_Children*,const char*,size_t); 88 | AI_Module_Slave_Chunk(Object_Module_Data_Chunk*,Object_Chunk*); 89 | ~AI_Module_Slave_Chunk(); 90 | 91 | virtual size_t size_chunk(); 92 | virtual void fill_data_block(char* data_start); 93 | virtual void post_input_processing(); 94 | 95 | Object_Chunk* get_my_object_chunk(); 96 | 97 | Object_Chunk* MasterModule; 98 | #if UseOldChunkLoader 99 | char* MasterModuleName; 100 | #endif 101 | int MasterModuleIndex; 102 | }; 103 | 104 | 105 | #endif 106 | 107 | 108 | -------------------------------------------------------------------------------- /AvP_vc/AvP.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "AvP"=.\AvP.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /AvP_vc/AvP.opt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/avp/a6a27a071c86955a36d3ca3db27cee7a154e18fd/AvP_vc/AvP.opt -------------------------------------------------------------------------------- /AvP_vc/avp395.mk: -------------------------------------------------------------------------------- 1 | project : c:\avp_vc\avpprog.exe c:\avp_vc\wat_release\avp.exe .SYMBOLIC 2 | 3 | !include c:\avp_vc\avpprog.mk1 4 | !include c:\avp_vc\wat_release\avp.mk1 5 | -------------------------------------------------------------------------------- /AvP_vc/avp395.wpj: -------------------------------------------------------------------------------- 1 | 40 2 | projectIdent 3 | 0 4 | VpeMain 5 | 1 6 | WRect 7 | 0 8 | 0 9 | 10240 10 | 10240 11 | 2 12 | MProject 13 | 3 14 | MCommand 15 | 0 16 | 4 17 | MCommand 18 | 0 19 | 2 20 | 5 21 | WFileName 22 | 11 23 | avpprog.tgt 24 | 6 25 | WFileName 26 | 19 27 | wat_release\avp.tgt 28 | 7 29 | WVList 30 | 2 31 | 8 32 | VComponent 33 | 9 34 | WRect 35 | 160 36 | 0 37 | 4240 38 | 4800 39 | 0 40 | 0 41 | 10 42 | WFileName 43 | 11 44 | avpprog.tgt 45 | 203 46 | 205 47 | 11 48 | VComponent 49 | 12 50 | WRect 51 | 4560 52 | 0 53 | 4160 54 | 4800 55 | 0 56 | 0 57 | 13 58 | WFileName 59 | 19 60 | wat_release\avp.tgt 61 | 0 62 | 4 63 | 8 64 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | The source code to Aliens Vs Predator is copyright (c) 1999-2000 Rebellion and is provided as is with no warranty for its suitability for use. You may not use this source code in full or in part for commercial purposes. Any use must include a clearly visible credit to Rebellion as the creators and owners, and reiteration of this license. --------------------------------------------------------------------------------