Fixed errors in inline.h.
More compiling. 156 unique undefined references.
This commit is contained in:
parent
cfd7274022
commit
29792b40ef
19 changed files with 504 additions and 1092 deletions
5
Makefile
5
Makefile
|
@ -14,10 +14,11 @@ ROOT = main.c stubs.c afont.c frustum.c kshape.c map.c maths.c md5.c mem3dc.c me
|
||||||
AVP = ai_sight.c avpview.c bh_agun.c bh_ais.c bh_alien.c bh_binsw.c bh_cable.c bh_corpse.c bh_deathvol.c bh_debri.c bh_dummy.c bh_fan.c bh_far.c bh_fhug.c bh_gener.c bh_ldoor.c bh_lift.c bh_light.c bh_lnksw.c bh_ltfx.c bh_marin.c bh_mission.c bh_near.c bh_pargen.c bh_plachier.c bh_plift.c bh_pred.c bh_queen.c bh_rubberduck.c bh_selfdest.c bh_snds.c bh_spcl.c bh_swdor.c bh_track.c bh_types.c bh_videoscreen.c bh_waypt.c bh_weap.c bh_xeno.c bonusabilities.c cconvars.cpp cdtrackselection.cpp cheatmodes.c comp_map.c comp_shp.c consolelog.cpp davehook.cpp deaths.c decal.c detaillevels.c dynamics.c dynblock.c equipmnt.c equiputl.cpp extents.c game.c game_statistics.c gamecmds.cpp gameflow.c gamevars.cpp hmodel.c hud.c inventry.c language.c lighting.c load_shp.c los.c maps.c mempool.c messagehistory.c missions.cpp movement.c paintball.c particle.c pfarlocs.c pheromon.c player.c pmove.c psnd.c psndproj.c pvisible.c savegame.c scream.cpp secstats.c sfx.c stratdef.c targeting.c track.c triggers.c weapons.c
|
AVP = ai_sight.c avpview.c bh_agun.c bh_ais.c bh_alien.c bh_binsw.c bh_cable.c bh_corpse.c bh_deathvol.c bh_debri.c bh_dummy.c bh_fan.c bh_far.c bh_fhug.c bh_gener.c bh_ldoor.c bh_lift.c bh_light.c bh_lnksw.c bh_ltfx.c bh_marin.c bh_mission.c bh_near.c bh_pargen.c bh_plachier.c bh_plift.c bh_pred.c bh_queen.c bh_rubberduck.c bh_selfdest.c bh_snds.c bh_spcl.c bh_swdor.c bh_track.c bh_types.c bh_videoscreen.c bh_waypt.c bh_weap.c bh_xeno.c bonusabilities.c cconvars.cpp cdtrackselection.cpp cheatmodes.c comp_map.c comp_shp.c consolelog.cpp davehook.cpp deaths.c decal.c detaillevels.c dynamics.c dynblock.c equipmnt.c equiputl.cpp extents.c game.c game_statistics.c gamecmds.cpp gameflow.c gamevars.cpp hmodel.c hud.c inventry.c language.c lighting.c load_shp.c los.c maps.c mempool.c messagehistory.c missions.cpp movement.c paintball.c particle.c pfarlocs.c pheromon.c player.c pmove.c psnd.c psndproj.c pvisible.c savegame.c scream.cpp secstats.c sfx.c stratdef.c targeting.c track.c triggers.c weapons.c
|
||||||
SHAPES = cube.c
|
SHAPES = cube.c
|
||||||
SUPPORT = consbind.cpp consbtch.cpp coordstr.cpp daemon.cpp r2base.cpp r2pos666.cpp reflist.cpp refobj.cpp scstring.cpp strtab.cpp strutil.c trig666.cpp wrapstr.cpp
|
SUPPORT = consbind.cpp consbtch.cpp coordstr.cpp daemon.cpp r2base.cpp r2pos666.cpp reflist.cpp refobj.cpp scstring.cpp strtab.cpp strutil.c trig666.cpp wrapstr.cpp
|
||||||
AVPWIN95 = avpchunk.cpp cheat.c chtcodes.cpp d3d_hud.cpp ddplat.cpp endianio.c ffread.cpp ffstdio.cpp gflwplat.c hierplace.cpp iofocus.cpp jsndsup.cpp kzsort.c langplat.c modcmds.cpp npcsetup.cpp objsetup.cpp pathchnk.cpp platsup.c pldghost.c projload.cpp scrshot.cpp strachnk.cpp system.c vision.c
|
AVPWIN95 = avpchunk.cpp cheat.c chtcodes.cpp d3d_hud.cpp ddplat.cpp endianio.c ffread.cpp ffstdio.cpp gflwplat.c hierplace.cpp iofocus.cpp jsndsup.cpp kzsort.c langplat.c modcmds.cpp npcsetup.cpp objsetup.cpp pathchnk.cpp platsup.c pldghost.c projload.cpp scrshot.cpp strachnk.cpp system.c usr_io.c vision.c
|
||||||
FRONTEND = avp_envinfo.c avp_intro.cpp avp_menudata.c
|
FRONTEND = avp_envinfo.c avp_intro.cpp avp_menudata.c
|
||||||
GADGETS = ahudgadg.cpp conscmnd.cpp conssym.cpp consvar.cpp gadget.cpp hudgadg.cpp rootgadg.cpp t_ingadg.cpp teletype.cpp textexp.cpp textin.cpp trepgadg.cpp
|
GADGETS = ahudgadg.cpp conscmnd.cpp conssym.cpp consvar.cpp gadget.cpp hudgadg.cpp rootgadg.cpp t_ingadg.cpp teletype.cpp textexp.cpp textin.cpp trepgadg.cpp
|
||||||
WIN95 = animchnk.cpp animobs.cpp awbmpld.cpp awiffld.cpp awpnmld.cpp bmpnames.cpp chnkload.cpp chnktexi.cpp chnktype.cpp chunk.cpp chunkpal.cpp debuglog.cpp dummyobjectchunk.cpp enumchnk.cpp enumsch.cpp envchunk.cpp fail.c fragchnk.cpp gsprchnk.cpp hierchnk.cpp huffman.cpp iff.cpp iff_ilbm.cpp ilbm_ext.cpp io.c list_tem.cpp ltchunk.cpp media.cpp mishchnk.cpp obchunk.cpp oechunk.cpp our_mem.c plat_shp.c plspecfn.c shpchunk.cpp sndchunk.cpp sprchunk.cpp string.cpp texio.c toolchnk.cpp txioctrl.cpp wpchunk.cpp zsp.cpp
|
WIN95 = animchnk.cpp animobs.cpp awtexld.cpp bmpnames.cpp chnkload.cpp chnktexi.cpp chnktype.cpp chunk.cpp chunkpal.cpp db.c debuglog.cpp dummyobjectchunk.cpp enumchnk.cpp enumsch.cpp envchunk.cpp fail.c fragchnk.cpp gsprchnk.cpp hierchnk.cpp huffman.cpp iff.cpp iff_ilbm.cpp ilbm_ext.cpp io.c list_tem.cpp ltchunk.cpp media.cpp mishchnk.cpp obchunk.cpp oechunk.cpp our_mem.c plat_shp.c plspecfn.c shpchunk.cpp sndchunk.cpp sprchunk.cpp string.cpp texio.c toolchnk.cpp txioctrl.cpp wpchunk.cpp zsp.cpp
|
||||||
|
# awbmpld.cpp awiffld.cpp awpnmld.cpp awtexld.cpp
|
||||||
|
|
||||||
# the following should really be autogenerated...
|
# the following should really be autogenerated...
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ extern "C" {
|
||||||
|
|
||||||
#define LOAD_MORPH_SHAPES 1 // you can compile out the code that copies morph data
|
#define LOAD_MORPH_SHAPES 1 // you can compile out the code that copies morph data
|
||||||
|
|
||||||
#define CL_SUPPORT_ALTTAB 1 // textures and surfaces loaded with CL_LoadImageOnce with LIO_RESTORABLE set will be added to ALT+TAB lists
|
#define CL_SUPPORT_ALTTAB 0 // textures and surfaces loaded with CL_LoadImageOnce with LIO_RESTORABLE set will be added to ALT+TAB lists
|
||||||
#define CL_SUPPORT_FASTFILE 1 // AvP uses fastfiles (but if the gfx aren't in them, it'll try the actual files
|
#define CL_SUPPORT_FASTFILE 1 // AvP uses fastfiles (but if the gfx aren't in them, it'll try the actual files
|
||||||
#ifdef AVP_DEBUG_VERSION
|
#ifdef AVP_DEBUG_VERSION
|
||||||
#define CL_SUPPORTONLY_FASTFILE 0 // for release, milestones, CDs, demos, may want this to be non-zero
|
#define CL_SUPPORTONLY_FASTFILE 0 // for release, milestones, CDs, demos, may want this to be non-zero
|
||||||
|
|
|
@ -769,7 +769,7 @@ void PlatEndSoundSys(void)
|
||||||
db_log3("PlatEndSoundSys finished.");
|
db_log3("PlatEndSoundSys finished.");
|
||||||
}
|
}
|
||||||
|
|
||||||
int PlatChangeGlobalVolume(volume)
|
int PlatChangeGlobalVolume(int volume)
|
||||||
{
|
{
|
||||||
int attenuation;
|
int attenuation;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
@ -797,7 +797,7 @@ int PlatChangeGlobalVolume(volume)
|
||||||
return SOUND_PLATFORMERROR;
|
return SOUND_PLATFORMERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PlatPlaySound(activeIndex)
|
int PlatPlaySound(int activeIndex)
|
||||||
{
|
{
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
SOUNDINDEX gameIndex;
|
SOUNDINDEX gameIndex;
|
||||||
|
|
|
@ -325,11 +325,7 @@ extern int maxshapes;
|
||||||
|
|
||||||
/*************************** WINDOWS 95 *********************/
|
/*************************** WINDOWS 95 *********************/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define SUPPORT_MMX 0
|
#define SUPPORT_MMX 0
|
||||||
#else
|
|
||||||
#define SUPPORT_MMX 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MaxD3DInstructions 1000 // includes state change instructions!!!
|
#define MaxD3DInstructions 1000 // includes state change instructions!!!
|
||||||
#define MaxD3DVertices 256
|
#define MaxD3DVertices 256
|
||||||
|
|
|
@ -943,38 +943,38 @@ void ReadPlayerGameInput(STRATEGYBLOCK* sbPtr)
|
||||||
{
|
{
|
||||||
case I_Marine:
|
case I_Marine:
|
||||||
{
|
{
|
||||||
if(KeyboardInput[primaryInput->ImageIntensifier]
|
if(KeyboardInput[primaryInput->d.ImageIntensifier]
|
||||||
||KeyboardInput[secondaryInput->ImageIntensifier])
|
||KeyboardInput[secondaryInput->d.ImageIntensifier])
|
||||||
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_ChangeVision = 1;
|
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_ChangeVision = 1;
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->ThrowFlare]
|
if(DebouncedKeyboardInput[primaryInput->e.ThrowFlare]
|
||||||
||DebouncedKeyboardInput[secondaryInput->ThrowFlare])
|
||DebouncedKeyboardInput[secondaryInput->e.ThrowFlare])
|
||||||
ThrowAFlare();
|
ThrowAFlare();
|
||||||
|
|
||||||
#if !(MARINE_DEMO||DEATHMATCH_DEMO)
|
#if !(MARINE_DEMO||DEATHMATCH_DEMO)
|
||||||
if(KeyboardInput[primaryInput->Jetpack]
|
if(KeyboardInput[primaryInput->f.Jetpack]
|
||||||
||KeyboardInput[secondaryInput->Jetpack])
|
||KeyboardInput[secondaryInput->f.Jetpack])
|
||||||
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_Jetpack = 1;
|
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_Jetpack = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(KeyboardInput[primaryInput->MarineTaunt]
|
if(KeyboardInput[primaryInput->g.MarineTaunt]
|
||||||
||KeyboardInput[secondaryInput->MarineTaunt])
|
||KeyboardInput[secondaryInput->g.MarineTaunt])
|
||||||
StartPlayerTaunt();
|
StartPlayerTaunt();
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->Marine_MessageHistory]
|
if(DebouncedKeyboardInput[primaryInput->h.Marine_MessageHistory]
|
||||||
||DebouncedKeyboardInput[secondaryInput->Marine_MessageHistory])
|
||DebouncedKeyboardInput[secondaryInput->h.Marine_MessageHistory])
|
||||||
MessageHistory_DisplayPrevious();
|
MessageHistory_DisplayPrevious();
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->Marine_Say]
|
if(DebouncedKeyboardInput[primaryInput->i.Marine_Say]
|
||||||
||DebouncedKeyboardInput[secondaryInput->Marine_Say])
|
||DebouncedKeyboardInput[secondaryInput->i.Marine_Say])
|
||||||
BringDownConsoleWithSayTypedIn();
|
BringDownConsoleWithSayTypedIn();
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->Marine_SpeciesSay]
|
if(DebouncedKeyboardInput[primaryInput->j.Marine_SpeciesSay]
|
||||||
||DebouncedKeyboardInput[secondaryInput->Marine_SpeciesSay])
|
||DebouncedKeyboardInput[secondaryInput->j.Marine_SpeciesSay])
|
||||||
BringDownConsoleWithSaySpeciesTypedIn();
|
BringDownConsoleWithSaySpeciesTypedIn();
|
||||||
|
|
||||||
if(KeyboardInput[primaryInput->Marine_ShowScores]
|
if(KeyboardInput[primaryInput->k.Marine_ShowScores]
|
||||||
||KeyboardInput[secondaryInput->Marine_ShowScores])
|
||KeyboardInput[secondaryInput->k.Marine_ShowScores])
|
||||||
ShowMultiplayerScores();
|
ShowMultiplayerScores();
|
||||||
|
|
||||||
|
|
||||||
|
@ -984,43 +984,43 @@ void ReadPlayerGameInput(STRATEGYBLOCK* sbPtr)
|
||||||
{
|
{
|
||||||
extern int CameraZoomLevel;
|
extern int CameraZoomLevel;
|
||||||
|
|
||||||
if(KeyboardInput[primaryInput->Cloak]
|
if(KeyboardInput[primaryInput->d.Cloak]
|
||||||
||KeyboardInput[secondaryInput->Cloak])
|
||KeyboardInput[secondaryInput->d.Cloak])
|
||||||
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_ChangeVision = 1;
|
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_ChangeVision = 1;
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->CycleVisionMode]
|
if(DebouncedKeyboardInput[primaryInput->e.CycleVisionMode]
|
||||||
||DebouncedKeyboardInput[secondaryInput->CycleVisionMode])
|
||DebouncedKeyboardInput[secondaryInput->e.CycleVisionMode])
|
||||||
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_CycleVisionMode = 1;
|
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_CycleVisionMode = 1;
|
||||||
|
|
||||||
#if !(PREDATOR_DEMO||DEATHMATCH_DEMO)
|
#if !(PREDATOR_DEMO||DEATHMATCH_DEMO)
|
||||||
if(DebouncedKeyboardInput[primaryInput->GrapplingHook]
|
if(DebouncedKeyboardInput[primaryInput->h.GrapplingHook]
|
||||||
||DebouncedKeyboardInput[secondaryInput->GrapplingHook])
|
||DebouncedKeyboardInput[secondaryInput->h.GrapplingHook])
|
||||||
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_GrapplingHook = 1;
|
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_GrapplingHook = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->ZoomIn]
|
if(DebouncedKeyboardInput[primaryInput->f.ZoomIn]
|
||||||
||DebouncedKeyboardInput[secondaryInput->ZoomIn])
|
||DebouncedKeyboardInput[secondaryInput->f.ZoomIn])
|
||||||
{
|
{
|
||||||
if (CameraZoomLevel<3) CameraZoomLevel++;
|
if (CameraZoomLevel<3) CameraZoomLevel++;
|
||||||
}
|
}
|
||||||
if(DebouncedKeyboardInput[primaryInput->ZoomOut]
|
if(DebouncedKeyboardInput[primaryInput->g.ZoomOut]
|
||||||
||DebouncedKeyboardInput[secondaryInput->ZoomOut])
|
||DebouncedKeyboardInput[secondaryInput->g.ZoomOut])
|
||||||
{
|
{
|
||||||
if (CameraZoomLevel>0) CameraZoomLevel--;
|
if (CameraZoomLevel>0) CameraZoomLevel--;
|
||||||
}
|
}
|
||||||
|
|
||||||
MaintainZoomingLevel();
|
MaintainZoomingLevel();
|
||||||
|
|
||||||
if(KeyboardInput[primaryInput->PredatorTaunt]
|
if(KeyboardInput[primaryInput->j.PredatorTaunt]
|
||||||
||KeyboardInput[secondaryInput->PredatorTaunt])
|
||KeyboardInput[secondaryInput->j.PredatorTaunt])
|
||||||
StartPlayerTaunt();
|
StartPlayerTaunt();
|
||||||
|
|
||||||
if(KeyboardInput[primaryInput->RecallDisc]
|
if(KeyboardInput[primaryInput->i.RecallDisc]
|
||||||
||KeyboardInput[secondaryInput->RecallDisc])
|
||KeyboardInput[secondaryInput->i.RecallDisc])
|
||||||
Recall_Disc();
|
Recall_Disc();
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->Predator_MessageHistory]
|
if(DebouncedKeyboardInput[primaryInput->k.Predator_MessageHistory]
|
||||||
||DebouncedKeyboardInput[secondaryInput->Predator_MessageHistory])
|
||DebouncedKeyboardInput[secondaryInput->k.Predator_MessageHistory])
|
||||||
MessageHistory_DisplayPrevious();
|
MessageHistory_DisplayPrevious();
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->Predator_Say]
|
if(DebouncedKeyboardInput[primaryInput->Predator_Say]
|
||||||
|
@ -1040,28 +1040,28 @@ void ReadPlayerGameInput(STRATEGYBLOCK* sbPtr)
|
||||||
|
|
||||||
case I_Alien:
|
case I_Alien:
|
||||||
{
|
{
|
||||||
if(KeyboardInput[primaryInput->AlternateVision]
|
if(KeyboardInput[primaryInput->a.AlternateVision]
|
||||||
||KeyboardInput[secondaryInput->AlternateVision])
|
||KeyboardInput[secondaryInput->a.AlternateVision])
|
||||||
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_ChangeVision = 1;
|
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_ChangeVision = 1;
|
||||||
|
|
||||||
if(KeyboardInput[primaryInput->Taunt]
|
if(KeyboardInput[primaryInput->b.Taunt]
|
||||||
||KeyboardInput[secondaryInput->Taunt])
|
||KeyboardInput[secondaryInput->b.Taunt])
|
||||||
StartPlayerTaunt();
|
StartPlayerTaunt();
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->Alien_MessageHistory]
|
if(DebouncedKeyboardInput[primaryInput->c.Alien_MessageHistory]
|
||||||
||DebouncedKeyboardInput[secondaryInput->Alien_MessageHistory])
|
||DebouncedKeyboardInput[secondaryInput->c.Alien_MessageHistory])
|
||||||
MessageHistory_DisplayPrevious();
|
MessageHistory_DisplayPrevious();
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->Alien_Say]
|
if(DebouncedKeyboardInput[primaryInput->d.Alien_Say]
|
||||||
||DebouncedKeyboardInput[secondaryInput->Alien_Say])
|
||DebouncedKeyboardInput[secondaryInput->d.Alien_Say])
|
||||||
BringDownConsoleWithSayTypedIn();
|
BringDownConsoleWithSayTypedIn();
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->Alien_SpeciesSay]
|
if(DebouncedKeyboardInput[primaryInput->e.Alien_SpeciesSay]
|
||||||
||DebouncedKeyboardInput[secondaryInput->Alien_SpeciesSay])
|
||DebouncedKeyboardInput[secondaryInput->e.Alien_SpeciesSay])
|
||||||
BringDownConsoleWithSaySpeciesTypedIn();
|
BringDownConsoleWithSaySpeciesTypedIn();
|
||||||
|
|
||||||
if(KeyboardInput[primaryInput->Alien_ShowScores]
|
if(KeyboardInput[primaryInput->f.Alien_ShowScores]
|
||||||
||KeyboardInput[secondaryInput->Alien_ShowScores])
|
||KeyboardInput[secondaryInput->f.Alien_ShowScores])
|
||||||
ShowMultiplayerScores();
|
ShowMultiplayerScores();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1096,16 +1096,16 @@ void ReadPlayerGameInput(STRATEGYBLOCK* sbPtr)
|
||||||
||KeyboardInput[secondaryInput->CentreView])
|
||KeyboardInput[secondaryInput->CentreView])
|
||||||
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_CentreView = 1;
|
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_CentreView = 1;
|
||||||
|
|
||||||
if(KeyboardInput[primaryInput->NextWeapon]
|
if(KeyboardInput[primaryInput->a.NextWeapon]
|
||||||
||KeyboardInput[secondaryInput->NextWeapon])
|
||KeyboardInput[secondaryInput->a.NextWeapon])
|
||||||
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_NextWeapon = 1;
|
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_NextWeapon = 1;
|
||||||
|
|
||||||
if(KeyboardInput[primaryInput->PreviousWeapon]
|
if(KeyboardInput[primaryInput->b.PreviousWeapon]
|
||||||
||KeyboardInput[secondaryInput->PreviousWeapon])
|
||KeyboardInput[secondaryInput->b.PreviousWeapon])
|
||||||
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_PreviousWeapon = 1;
|
playerStatusPtr->Mvt_InputRequests.Flags.Rqst_PreviousWeapon = 1;
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->FlashbackWeapon]
|
if(DebouncedKeyboardInput[primaryInput->c.FlashbackWeapon]
|
||||||
||DebouncedKeyboardInput[secondaryInput->FlashbackWeapon])
|
||DebouncedKeyboardInput[secondaryInput->c.FlashbackWeapon])
|
||||||
{
|
{
|
||||||
if (playerStatusPtr->PreviouslySelectedWeaponSlot!=playerStatusPtr->SelectedWeaponSlot)
|
if (playerStatusPtr->PreviouslySelectedWeaponSlot!=playerStatusPtr->SelectedWeaponSlot)
|
||||||
{
|
{
|
||||||
|
@ -1172,14 +1172,14 @@ void ReadPlayerGameInput(STRATEGYBLOCK* sbPtr)
|
||||||
#if !(PREDATOR_DEMO||MARINE_DEMO||ALIEN_DEMO||DEATHMATCH_DEMO)
|
#if !(PREDATOR_DEMO||MARINE_DEMO||ALIEN_DEMO||DEATHMATCH_DEMO)
|
||||||
else // Cool - paintball mode `
|
else // Cool - paintball mode `
|
||||||
{
|
{
|
||||||
if(DebouncedKeyboardInput[primaryInput->NextWeapon]
|
if(DebouncedKeyboardInput[primaryInput->a.NextWeapon]
|
||||||
||DebouncedKeyboardInput[secondaryInput->NextWeapon])
|
||DebouncedKeyboardInput[secondaryInput->a.NextWeapon])
|
||||||
{
|
{
|
||||||
PaintBallMode_ChangeSelectedDecalID(+1);
|
PaintBallMode_ChangeSelectedDecalID(+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(DebouncedKeyboardInput[primaryInput->PreviousWeapon]
|
if(DebouncedKeyboardInput[primaryInput->b.PreviousWeapon]
|
||||||
||DebouncedKeyboardInput[secondaryInput->PreviousWeapon])
|
||DebouncedKeyboardInput[secondaryInput->b.PreviousWeapon])
|
||||||
{
|
{
|
||||||
PaintBallMode_ChangeSelectedDecalID(-1);
|
PaintBallMode_ChangeSelectedDecalID(-1);
|
||||||
}
|
}
|
||||||
|
@ -1349,6 +1349,8 @@ void ReadPlayerGameInput(STRATEGYBLOCK* sbPtr)
|
||||||
/* KJL 18:27:34 04/29/97 - joystick control */
|
/* KJL 18:27:34 04/29/97 - joystick control */
|
||||||
if (GotJoystick)
|
if (GotJoystick)
|
||||||
{
|
{
|
||||||
|
fprintf(stderr, "ReadPlayerGameInput: GotJoystick\n");
|
||||||
|
#if 0
|
||||||
#define JOYSTICK_DEAD_ZONE 12000
|
#define JOYSTICK_DEAD_ZONE 12000
|
||||||
extern int GotJoystick;
|
extern int GotJoystick;
|
||||||
extern JOYINFOEX JoystickData;
|
extern JOYINFOEX JoystickData;
|
||||||
|
@ -1587,6 +1589,7 @@ void ReadPlayerGameInput(STRATEGYBLOCK* sbPtr)
|
||||||
JoystickData.dwButtons,
|
JoystickData.dwButtons,
|
||||||
JoystickData.dwPOV);
|
JoystickData.dwPOV);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* KJL 16:03:06 05/11/97 - Handle map options */
|
/* KJL 16:03:06 05/11/97 - Handle map options */
|
||||||
|
@ -1735,14 +1738,3 @@ void LoadDefaultPrimaryConfigs(void)
|
||||||
|
|
||||||
fclose(file);
|
fclose(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -161,70 +161,76 @@ typedef struct
|
||||||
{
|
{
|
||||||
unsigned char NextWeapon; // Predator & Marine
|
unsigned char NextWeapon; // Predator & Marine
|
||||||
unsigned char AlternateVision; // Alien
|
unsigned char AlternateVision; // Alien
|
||||||
};
|
} a;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char PreviousWeapon; // Predator & Marine
|
unsigned char PreviousWeapon; // Predator & Marine
|
||||||
unsigned char Taunt; // Alien
|
unsigned char Taunt; // Alien
|
||||||
};
|
} b;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char FlashbackWeapon; // Predator & Marine
|
unsigned char FlashbackWeapon; // Predator & Marine
|
||||||
unsigned char Alien_MessageHistory; // Alien
|
unsigned char Alien_MessageHistory; // Alien
|
||||||
};
|
} c;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char Cloak; // Predator
|
unsigned char Cloak; // Predator
|
||||||
unsigned char ImageIntensifier; // Marine
|
unsigned char ImageIntensifier; // Marine
|
||||||
unsigned char Alien_Say; // Alien
|
unsigned char Alien_Say; // Alien
|
||||||
};
|
} d;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char CycleVisionMode; // Predator
|
unsigned char CycleVisionMode; // Predator
|
||||||
unsigned char ThrowFlare; // Marine
|
unsigned char ThrowFlare; // Marine
|
||||||
unsigned char Alien_SpeciesSay; // Alien
|
unsigned char Alien_SpeciesSay; // Alien
|
||||||
};
|
} e;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char ZoomIn; // Predator
|
unsigned char ZoomIn; // Predator
|
||||||
unsigned char Jetpack; // Marine
|
unsigned char Jetpack; // Marine
|
||||||
unsigned char Alien_ShowScores; // Alien
|
unsigned char Alien_ShowScores; // Alien
|
||||||
};
|
} f;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char ZoomOut; // Predator
|
unsigned char ZoomOut; // Predator
|
||||||
unsigned char MarineTaunt; // Marine
|
unsigned char MarineTaunt; // Marine
|
||||||
};
|
} g;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char GrapplingHook; // Predator
|
unsigned char GrapplingHook; // Predator
|
||||||
unsigned char Marine_MessageHistory; // Marine
|
unsigned char Marine_MessageHistory; // Marine
|
||||||
};
|
} h;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char RecallDisc; // Predator
|
unsigned char RecallDisc; // Predator
|
||||||
unsigned char Marine_Say; // Marine
|
unsigned char Marine_Say; // Marine
|
||||||
};
|
} i;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char PredatorTaunt; // Predator
|
unsigned char PredatorTaunt; // Predator
|
||||||
unsigned char Marine_SpeciesSay; // Marine
|
unsigned char Marine_SpeciesSay; // Marine
|
||||||
};
|
} j;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char Predator_MessageHistory; // Predator
|
unsigned char Predator_MessageHistory; // Predator
|
||||||
unsigned char Marine_ShowScores; // Marine
|
unsigned char Marine_ShowScores; // Marine
|
||||||
};
|
} k;
|
||||||
|
|
||||||
unsigned char Predator_Say;
|
unsigned char Predator_Say;
|
||||||
unsigned char Predator_SpeciesSay;
|
unsigned char Predator_SpeciesSay;
|
||||||
unsigned char Predator_ShowScores;
|
unsigned char Predator_ShowScores;
|
||||||
unsigned char ExpansionSpace7;
|
unsigned char ExpansionSpace7;
|
||||||
unsigned char ExpansionSpace8;
|
unsigned char ExpansionSpace8;
|
||||||
|
|
||||||
} PLAYER_INPUT_CONFIGURATION;
|
} PLAYER_INPUT_CONFIGURATION;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
27
src/fixer.h
27
src/fixer.h
|
@ -90,21 +90,24 @@ typedef struct SYSTEMTIME
|
||||||
} SYSTEMTIME;
|
} SYSTEMTIME;
|
||||||
|
|
||||||
#define INVALID_HANDLE_VALUE -1
|
#define INVALID_HANDLE_VALUE -1
|
||||||
#define GENERIC_WRITE 0
|
#define GENERIC_WRITE 1
|
||||||
#define CREATE_ALWAYS 1
|
#define CREATE_ALWAYS 2
|
||||||
#define FILE_FLAG_RANDOM_ACCESS 2
|
#define FILE_FLAG_RANDOM_ACCESS 3
|
||||||
#define GENERIC_READ 3
|
#define GENERIC_READ 4
|
||||||
#define OPEN_EXISTING 4
|
#define OPEN_EXISTING 5
|
||||||
#define FILE_ATTRIBUTE_READONLY 5
|
#define FILE_ATTRIBUTE_READONLY 6
|
||||||
#define FILE_CURRENT 6
|
#define FILE_CURRENT 7
|
||||||
#define FILE_BEGIN 7
|
#define FILE_BEGIN 8
|
||||||
#define FILE_END 8
|
#define FILE_END 9
|
||||||
#define FILE_SHARE_READ 9
|
#define FILE_SHARE_READ 10
|
||||||
#define FILE_ATTRIBUTE_DIRECTORY 10
|
#define FILE_ATTRIBUTE_DIRECTORY 11
|
||||||
|
#define FILE_SHARE_WRITE 12
|
||||||
|
#define OPEN_ALWAYS 13
|
||||||
|
#define FILE_ATTRIBUTE_NORMAL 14
|
||||||
|
|
||||||
HANDLE CreateFile(const char *file, int write, int x, int y, int flags, int flags2, int z);
|
HANDLE CreateFile(const char *file, int write, int x, int y, int flags, int flags2, int z);
|
||||||
HANDLE CreateFileA(const char *file, int write, int x, int y, int flags, int flags2, int z);
|
HANDLE CreateFileA(const char *file, int write, int x, int y, int flags, int flags2, int z);
|
||||||
int WriteFile(HANDLE file, const void *data, int len, unsigned long *byteswritten, int x);
|
int WriteFile(HANDLE file, const void *data, int len, /* unsigned long */ void *byteswritten, int x);
|
||||||
int ReadFile(HANDLE file, void *data, int len, /* unsigned long */ void *bytesread, int x);
|
int ReadFile(HANDLE file, void *data, int len, /* unsigned long */ void *bytesread, int x);
|
||||||
int GetFileSize(HANDLE file, int x);
|
int GetFileSize(HANDLE file, int x);
|
||||||
int CloseHandle(HANDLE file);
|
int CloseHandle(HANDLE file);
|
||||||
|
|
|
@ -16,6 +16,11 @@ int InitialiseWindowsSystem()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ExitWindowsSystem()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -20,13 +20,11 @@
|
||||||
* Still in the public domain.
|
* Still in the public domain.
|
||||||
*
|
*
|
||||||
* md5_buffer added by Steven Fuller
|
* md5_buffer added by Steven Fuller
|
||||||
|
* Still in the public domain.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h> /* for memcpy() */
|
#include <string.h> /* for memcpy() */
|
||||||
#include <sys/types.h> /* for stupid systems */
|
|
||||||
#include <netinet/in.h> /* for ntohl() */
|
|
||||||
|
|
||||||
//#include "config.h"
|
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
|
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
* Still in the public domain.
|
* Still in the public domain.
|
||||||
*
|
*
|
||||||
* md5_buffer added by Steven Fuller
|
* md5_buffer added by Steven Fuller
|
||||||
|
* Still in the public domain.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MD5_H
|
#ifndef MD5_H
|
||||||
|
|
273
src/stubs.c
273
src/stubs.c
|
@ -5,6 +5,194 @@
|
||||||
#include "fixer.h"
|
#include "fixer.h"
|
||||||
|
|
||||||
#include "3dc.h"
|
#include "3dc.h"
|
||||||
|
#include "platform.h"
|
||||||
|
#include "psndplat.h"
|
||||||
|
|
||||||
|
/* smacker.c */
|
||||||
|
int FmvColorRed;
|
||||||
|
int FmvColorGreen;
|
||||||
|
int FmvColourBlue;
|
||||||
|
|
||||||
|
void GetFMVInformation(int *messageNumberPtr, int *frameNumberPtr)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "GetFMVInformation(%p, %p)\n", messageNumberPtr, frameNumberPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitialiseTriggeredFMVs()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "InitialiseTriggeredFMVs()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartFMVAtFrame(int number, int frame)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "StartFMVAtFrame(%d, %d)\n", number, frame);
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartTriggerPlotFMV(int number)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "StartTriggerPlotFMV(%d)\n", number);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAllFMVTextures()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "UpdateAllFMVTextures()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* win_func.cpp */
|
||||||
|
void CheckForWindowsMessages()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "CheckForWindowsMessages()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* psndplat.cpp */
|
||||||
|
ACTIVESOUNDSAMPLE ActiveSounds[SOUND_MAXACTIVE];
|
||||||
|
ACTIVESOUNDSAMPLE BlankActiveSound = {SID_NOSOUND,ASP_Minimum,0,0,NULL,0,0,0,0,0,{{0,0,0},0,0},NULL, NULL, NULL};
|
||||||
|
SOUNDSAMPLEDATA BlankGameSound = {0,0,0,0,NULL,0,NULL};
|
||||||
|
SOUNDSAMPLEDATA GameSounds[SID_MAXIMUM];
|
||||||
|
|
||||||
|
int PlatStartSoundSys()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatStartSoundSys()\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlatEndSoundSys()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatEndSoundSys()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
int PlatChangeGlobalVolume(int volume)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatChangeGlobalVolume(%d)\n", volume);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PlatPlaySound(int activeIndex)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatPlaySound(%d)\n", activeIndex);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlatStopSound(int activeIndex)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatStopSound(%d)\n", activeIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
int PlatChangeSoundVolume(int activeIndex, int volume)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatChangeSoundVolume(%d, %d)\n", activeIndex, volume);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PlatChangeSoundPitch(int activeIndex, int pitch)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatChangeSoundPitch(%d, %d)\n", activeIndex, pitch);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PlatSoundHasStopped(int activeIndex)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatSoundHasStopped(%d)\n", activeIndex);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PlatDo3dSound(int activeIndex)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatDo3dSound(%d)\n", activeIndex);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlatEndGameSound(SOUNDINDEX index)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatEndGameSound(%d)\n", index);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int PlatMaxHWSounds()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatMaxHWSounds()\n");
|
||||||
|
|
||||||
|
return 256;
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitialiseBaseFrequency(SOUNDINDEX soundNum)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "InitialiseBaseFrequency(%d)\n", soundNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
int LoadWavFile(int soundNum, char * wavFileName)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "LoadWavFile(%d, %s)\n", soundNum, wavFileName);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned char *ExtractWavFile(int soundIndex, unsigned char *bufferPtr)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ExtractWavFile(%d, %p)\n", soundIndex, bufferPtr);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int LoadWavFromFastFile(int soundNum, char * wavFileName)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "LoadWavFromFastFile(%d, %s)\n", soundNum, wavFileName);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlatUpdatePlayer()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatUpdatePlayer()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlatSetEnviroment(unsigned int env_index, float reverb_mix)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "PlatSetEnvironment(%d, %f)\n", env_index, reverb_mix);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateSoundFrequencies()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "UpdateSoundFreqncies()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* alt_tab.cpp */
|
||||||
|
void ATIncludeSurface(void * pSurface, void * hBackup)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ATIncludeSurface(%p, %p)\n", pSurface, hBackup);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ATRemoveSurface(void * pSurface)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ATRemoveSurface(%p)\n", pSurface);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ATRemoveTexture(void * pTexture)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ATRemoveTexture(%p)\n", pTexture);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* avp_menugfx.cpp */
|
||||||
|
char AAFontWidths[256];
|
||||||
|
|
||||||
|
void FadedScreen(int alpha)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "FadedScreen(%d)\n", alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* winmain.c */
|
||||||
|
BOOL KeepMainRifFile = FALSE;
|
||||||
|
|
||||||
|
|
||||||
/* avpreg.cpp */
|
/* avpreg.cpp */
|
||||||
char* AvpCDPath = 0;
|
char* AvpCDPath = 0;
|
||||||
|
@ -20,12 +208,65 @@ extern char * SecondSoundDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* d3d_render.cpp */
|
||||||
|
int NumberOfLandscapePolygons;
|
||||||
|
int FMVParticleColour;
|
||||||
|
|
||||||
|
void InitDrawTest()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "InitDrawTest()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitForceField()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "InitForceField()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* avp_userprofile.c */
|
||||||
|
int SmackerSoundVolume;
|
||||||
|
|
||||||
|
|
||||||
/* dd_func.cpp */
|
/* dd_func.cpp */
|
||||||
|
long BackBufferPitch;
|
||||||
|
|
||||||
void FlipBuffers()
|
void FlipBuffers()
|
||||||
{
|
{
|
||||||
fprintf(stderr, "FlipBuffers()\n");
|
fprintf(stderr, "FlipBuffers()\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ChangePalette (unsigned char* NewPalette)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ChangePalette(%p)\n", NewPalette);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* di_func.cpp */
|
||||||
|
unsigned char DebouncedGotAnyKey;
|
||||||
|
unsigned char DebouncedKeyboardInput[MAX_NUMBER_OF_INPUT_KEYS];
|
||||||
|
int GotJoystick;
|
||||||
|
int GotMouse;
|
||||||
|
int JoystickEnabled;
|
||||||
|
int MouseVelX;
|
||||||
|
int MouseVelY;
|
||||||
|
|
||||||
|
void DirectReadKeyboard()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "DirectReadKeyboard()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void DirectReadMouse()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "DirectReadMouse()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReadJoysticks()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ReadJoysticks()\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* dx_proj.cpp */
|
/* dx_proj.cpp */
|
||||||
int use_mmx_math = 1;
|
int use_mmx_math = 1;
|
||||||
|
@ -79,6 +320,29 @@ void CDDA_SwitchOn()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* winmain.c */
|
||||||
|
int HWAccel = 0;
|
||||||
|
|
||||||
|
/* dxlog.c */
|
||||||
|
void dx_str_log(char const * str, int line, char const * file)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "dx_str_log: %s/%d: %s\n", file, line, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dx_strf_log(char const * fmt, ... )
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, fmt);
|
||||||
|
fprintf(stderr, "dx_strf_log: ");
|
||||||
|
vfprintf(stderr,fmt,ap);
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dx_line_log(int line, char const * file)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "dx_line_log: %s/%d\n", file, line);
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* pldnet.c */
|
/* pldnet.c */
|
||||||
|
|
||||||
|
@ -105,7 +369,7 @@ HANDLE CreateFileA(const char *file, int write, int x, int y, int flags, int fla
|
||||||
return CreateFileA(file, write, x, y, flags, flags2, z);
|
return CreateFileA(file, write, x, y, flags, flags2, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
int WriteFile(HANDLE file, const void *data, int len, unsigned long *byteswritten, int x)
|
int WriteFile(HANDLE file, const void *data, int len, /* unsigned long */ void *byteswritten, int x)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "WriteFile(%d, %p, %d, %p, %d)\n", file, data, len, byteswritten, x);
|
fprintf(stderr, "WriteFile(%d, %p, %d, %p, %d)\n", file, data, len, byteswritten, x);
|
||||||
|
|
||||||
|
@ -211,3 +475,10 @@ int timeGetTime()
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int GetTickCount()
|
||||||
|
{
|
||||||
|
fprintf(stderr, "GetTickCount()\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -42,6 +42,8 @@ enum AwTlErc
|
||||||
AW_TL_ERC;
|
AW_TL_ERC;
|
||||||
|
|
||||||
|
|
||||||
|
#define NO_ERROR 0
|
||||||
|
|
||||||
/*********/
|
/*********/
|
||||||
/* Flags */
|
/* Flags */
|
||||||
/*********/
|
/*********/
|
||||||
|
@ -76,6 +78,43 @@ extern DDSurface * AwCreateSurface(char const * _argFormatS, ...);
|
||||||
|
|
||||||
extern AW_TL_ERC AwDestroyBackupTexture(AW_BACKUPTEXTUREHANDLE _bH);
|
extern AW_TL_ERC AwDestroyBackupTexture(AW_BACKUPTEXTUREHANDLE _bH);
|
||||||
|
|
||||||
|
|
||||||
|
typedef int (* AW_TL_PFN_CALLBACK) (void *);
|
||||||
|
|
||||||
|
/* Structure for receiving specific regions of an image in a surface or texture.
|
||||||
|
* A pointer to an array of thise structures is passed to the AwCreate...
|
||||||
|
* functions if the 'a' format specifier is used. The fields 'left', 'right',
|
||||||
|
* 'top' and 'bottom' specify the rectangle to cut out of the image being loaded
|
||||||
|
* and must be valid. In AwCreateSurface, the 'pSurface' field is used and is a
|
||||||
|
* pointer to the Direct Draw surface created; in AwCreateTexture, the
|
||||||
|
* 'pTexture' field is used and is a pointer to the Direct 3D texture created.
|
||||||
|
* If an error occurs all the pointers in the array will be set to NULL. The
|
||||||
|
* 'width' and 'height' fields will be filled in with the width and height of
|
||||||
|
* the surface or texture that is created. If the rectangle specified is
|
||||||
|
* completely outsided the main image, the width and height will be set to zero,
|
||||||
|
* and the pointer field will be set to NULL, but this does not constitute an
|
||||||
|
* error. If the 't' option is used, the pointer fields are assumed to be valid
|
||||||
|
* textures or surfaces into which to load the new textures or surfaces. If the
|
||||||
|
* pointer is NULL, the structure is ignored. The pointers will remain unchanged
|
||||||
|
* even in the event of an error or a rectangle specified outside the main
|
||||||
|
* image, though the width and height will still be set to zero.
|
||||||
|
*/
|
||||||
|
struct AwCreateGraphicRegion
|
||||||
|
{
|
||||||
|
unsigned left, top, right, bottom; /* rectangle to cut from the original image */
|
||||||
|
unsigned width, height; /* width and height of the resulting surface or texture */
|
||||||
|
union /* DDSurface or D3DTexture pointer depending on the context used */
|
||||||
|
{
|
||||||
|
DDSurface * pSurface; /* Direct Draw Surface object pointer */
|
||||||
|
D3DTexture * pTexture; /* Direct 3D Texture object pointer */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* typedef to save typing 'struct' when not using C++ */
|
||||||
|
typedef struct AwCreateGraphicRegion AW_CREATEGRAPHICREGION;
|
||||||
|
|
||||||
|
extern char const * AwTlErrorToString(AW_TL_ERC _AWTL_DEFAULTPARM(awTlLastErr));
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
* stuff, but NOT Direct Draw, define DB_NODIRECTDRAW.
|
* stuff, but NOT Direct Draw, define DB_NODIRECTDRAW.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define DB_NOWINDOWS
|
||||||
|
#define DB_NODIRECTDRAW
|
||||||
|
|
||||||
/* ******************************************************************** *
|
/* ******************************************************************** *
|
||||||
* *
|
* *
|
||||||
* I N T E R F A C E - both internal and external. *
|
* I N T E R F A C E - both internal and external. *
|
||||||
|
@ -26,8 +29,9 @@
|
||||||
|
|
||||||
/* I N C L U D E S **************************************************** */
|
/* I N C L U D E S **************************************************** */
|
||||||
|
|
||||||
|
#include "fixer.h"
|
||||||
|
|
||||||
/* Windows includes. Actually internal, but here to allow pre-compilation. */
|
/* Windows includes. Actually internal, but here to allow pre-compilation. */
|
||||||
#include "advwin32.h"
|
|
||||||
#ifndef DB_NOWINDOWS
|
#ifndef DB_NOWINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "advwin32.h"
|
#include "advwin32.h"
|
||||||
|
@ -63,9 +67,8 @@ int db_option = 0; /* Default is off. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <conio.h>
|
|
||||||
#include <direct.h> /* For getcwd() */
|
|
||||||
#include <stdarg.h> /* For variable arguments. */
|
#include <stdarg.h> /* For variable arguments. */
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
/* C O N S T A N T S ************************************************** */
|
/* C O N S T A N T S ************************************************** */
|
||||||
|
|
||||||
|
@ -90,7 +93,8 @@ int db_option = 0; /* Default is off. */
|
||||||
#define DB_FORCE_EXCEPTION() ( db_vol_zero = 1 / db_vol_zero )
|
#define DB_FORCE_EXCEPTION() ( db_vol_zero = 1 / db_vol_zero )
|
||||||
|
|
||||||
/* Cause a brakepoint. */
|
/* Cause a brakepoint. */
|
||||||
#define DB_FORCE_BRAKEPOINT() do {__asm int 3} while(0)
|
//#define DB_FORCE_BRAKEPOINT() do {__asm int 3} while(0)
|
||||||
|
#define DB_FORCE_BRAKEPOINT() { }
|
||||||
|
|
||||||
/* T Y P E S ********************************************************** */
|
/* T Y P E S ********************************************************** */
|
||||||
|
|
||||||
|
@ -534,6 +538,7 @@ static void db_do_std_prompt(unsigned yOffset)
|
||||||
switch(db_display_type)
|
switch(db_display_type)
|
||||||
{
|
{
|
||||||
case DB_DOS:
|
case DB_DOS:
|
||||||
|
#if 0
|
||||||
printf( db_prompt_std );
|
printf( db_prompt_std );
|
||||||
printf("\n");
|
printf("\n");
|
||||||
do
|
do
|
||||||
|
@ -541,6 +546,9 @@ static void db_do_std_prompt(unsigned yOffset)
|
||||||
ch = toupper(getch());
|
ch = toupper(getch());
|
||||||
}
|
}
|
||||||
while((ch != 'N') && (ch != 'Y') && (ch != 'X'));
|
while((ch != 'N') && (ch != 'Y') && (ch != 'X'));
|
||||||
|
#endif
|
||||||
|
ch = 'N';
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#ifndef DB_NODIRECTDRAW
|
#ifndef DB_NODIRECTDRAW
|
||||||
case DB_DIRECTDRAW:
|
case DB_DIRECTDRAW:
|
||||||
|
|
|
@ -47,112 +47,6 @@ extern "C" {
|
||||||
#define OUR_MUL_INT(a, b) ((a) * (b))
|
#define OUR_MUL_INT(a, b) ((a) * (b))
|
||||||
#define OUR_ISR(a, shift) ((a) >> (shift))
|
#define OUR_ISR(a, shift) ((a) >> (shift))
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
win95\item.c functions
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void InitialiseTriangleArrayData(void);
|
|
||||||
void* AllocateTriangleArrayData(int tasize);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
General Triangle Array Handler Null Case / Error
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void TriangleArrayNullOrError(TRIANGLEARRAY *tarr);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Item Polygon Triangle Array Functions
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void Item_Polygon_PrepareTriangleArray_3(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Polygon_PrepareTriangleArray_4(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Polygon_PrepareTriangleArray_5(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Polygon_PrepareTriangleArray_6(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Polygon_PrepareTriangleArray_7(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Polygon_PrepareTriangleArray_8(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Polygon_PrepareTriangleArray_9(TRIANGLEARRAY *qarr);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Item Gouraud Polygon Triangle Array Functions
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void Item_GouraudPolygon_PrepareTriangleArray_3(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_GouraudPolygon_PrepareTriangleArray_4(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_GouraudPolygon_PrepareTriangleArray_5(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_GouraudPolygon_PrepareTriangleArray_6(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_GouraudPolygon_PrepareTriangleArray_7(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_GouraudPolygon_PrepareTriangleArray_8(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_GouraudPolygon_PrepareTriangleArray_9(TRIANGLEARRAY *qarr);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Item 2d Textured Polygon Triangle Array Functions
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void Item_2dTexturedPolygon_PrepareTriangleArray_3(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_2dTexturedPolygon_PrepareTriangleArray_4(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_2dTexturedPolygon_PrepareTriangleArray_5(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_2dTexturedPolygon_PrepareTriangleArray_6(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_2dTexturedPolygon_PrepareTriangleArray_7(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_2dTexturedPolygon_PrepareTriangleArray_8(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_2dTexturedPolygon_PrepareTriangleArray_9(TRIANGLEARRAY *qarr);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Item Gouraud 2d Textured Polygon Triangle Array Functions
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void Item_Gouraud2dTexturedPolygon_PrepareTriangleArray_3(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud2dTexturedPolygon_PrepareTriangleArray_4(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud2dTexturedPolygon_PrepareTriangleArray_5(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud2dTexturedPolygon_PrepareTriangleArray_6(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud2dTexturedPolygon_PrepareTriangleArray_7(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud2dTexturedPolygon_PrepareTriangleArray_8(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud2dTexturedPolygon_PrepareTriangleArray_9(TRIANGLEARRAY *qarr);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Item 3d Textured Polygon Triangle Array Functions
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void Item_3dTexturedPolygon_PrepareTriangleArray_3(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_3dTexturedPolygon_PrepareTriangleArray_4(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_3dTexturedPolygon_PrepareTriangleArray_5(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_3dTexturedPolygon_PrepareTriangleArray_6(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_3dTexturedPolygon_PrepareTriangleArray_7(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_3dTexturedPolygon_PrepareTriangleArray_8(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_3dTexturedPolygon_PrepareTriangleArray_9(TRIANGLEARRAY *qarr);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Item Gouraud 3d Textured Polygon Triangle Array Functions
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void Item_Gouraud3dTexturedPolygon_PrepareTriangleArray_3(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud3dTexturedPolygon_PrepareTriangleArray_4(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud3dTexturedPolygon_PrepareTriangleArray_5(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud3dTexturedPolygon_PrepareTriangleArray_6(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud3dTexturedPolygon_PrepareTriangleArray_7(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud3dTexturedPolygon_PrepareTriangleArray_8(TRIANGLEARRAY *qarr);
|
|
||||||
void Item_Gouraud3dTexturedPolygon_PrepareTriangleArray_9(TRIANGLEARRAY *qarr);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Platform Specific 64-Bit Operator Functions
|
Platform Specific 64-Bit Operator Functions
|
||||||
|
@ -1383,7 +1277,7 @@ static __inline__ void MUL_I_WIDE(int a, int b, LONGLONGCH *c)
|
||||||
mov [ebx+4],edx
|
mov [ebx+4],edx
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
__asm__("imull %0 \n\t"
|
__asm__("imull %2 \n\t"
|
||||||
"movl %%eax, 0(%%ebx) \n\t"
|
"movl %%eax, 0(%%ebx) \n\t"
|
||||||
"movl %%edx, 4(%%ebx) \n\t"
|
"movl %%edx, 4(%%ebx) \n\t"
|
||||||
:
|
:
|
||||||
|
@ -1596,7 +1490,7 @@ static __inline__ int MUL_FIXED(int a, int b)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/* TODO */
|
/* TODO */
|
||||||
__asm__("imull %0 \n\t"
|
__asm__("imull %2 \n\t"
|
||||||
"shrdl $16, %%edx, %%eax \n\t"
|
"shrdl $16, %%edx, %%eax \n\t"
|
||||||
: "=a" (retval)
|
: "=a" (retval)
|
||||||
: "a" (a), "q" (b)
|
: "a" (a), "q" (b)
|
||||||
|
@ -1631,7 +1525,7 @@ __asm__("cdq \n\t"
|
||||||
"roll $16, %%eax \n\t"
|
"roll $16, %%eax \n\t"
|
||||||
"mov %%ax, %%dx \n\t"
|
"mov %%ax, %%dx \n\t"
|
||||||
"xor %%ax, %%ax \n\t"
|
"xor %%ax, %%ax \n\t"
|
||||||
"idivl %0 \n\t"
|
"idivl %2 \n\t"
|
||||||
: "=a" (retval)
|
: "=a" (retval)
|
||||||
: "a" (a), "q" (b)
|
: "a" (a), "q" (b)
|
||||||
: "%edx", "cc"
|
: "%edx", "cc"
|
||||||
|
@ -1677,7 +1571,7 @@ static __inline__ int NarrowDivide(LONGLONGCH *a, int b)
|
||||||
*/
|
*/
|
||||||
__asm__("movl 0(%%esi), %%eax \n\t"
|
__asm__("movl 0(%%esi), %%eax \n\t"
|
||||||
"movl 4(%%esi), %%edx \n\t"
|
"movl 4(%%esi), %%edx \n\t"
|
||||||
"idivl %0 \n\t"
|
"idivl %2 \n\t"
|
||||||
: "=a" (retval)
|
: "=a" (retval)
|
||||||
: "S" (a), "q" (b)
|
: "S" (a), "q" (b)
|
||||||
: "%edx", "cc"
|
: "%edx", "cc"
|
||||||
|
@ -1706,8 +1600,8 @@ static __inline__ int WideMulNarrowDiv(int a, int b, int c)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/* TODO */
|
/* TODO */
|
||||||
__asm__("imull %0 \n\t"
|
__asm__("imull %2 \n\t"
|
||||||
"idivl %1 \n\t"
|
"idivl %3 \n\t"
|
||||||
: "=a" (retval)
|
: "=a" (retval)
|
||||||
: "a" (a), "q" (b), "q" (c)
|
: "a" (a), "q" (b), "q" (c)
|
||||||
: "cc"
|
: "cc"
|
||||||
|
@ -1959,15 +1853,11 @@ a = FloatToInt(b); \
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* These functions are in plspecfn.c */
|
|
||||||
|
|
||||||
int WideMul2NarrowDiv(int a, int b, int c, int d, int e);
|
int WideMul2NarrowDiv(int a, int b, int c, int d, int e);
|
||||||
int _Dot(VECTORCH *vptr1, VECTORCH *vptr2);
|
int _Dot(VECTORCH *vptr1, VECTORCH *vptr2);
|
||||||
void MakeV(VECTORCH *v1, VECTORCH *v2, VECTORCH *v3);
|
void MakeV(VECTORCH *v1, VECTORCH *v2, VECTORCH *v3);
|
||||||
void AddV(VECTORCH *v1, VECTORCH *v2);
|
void AddV(VECTORCH *v1, VECTORCH *v2);
|
||||||
void RotVect(VECTORCH *v, MATRIXCH *m);
|
void RotVect(VECTORCH *v, MATRIXCH *m);
|
||||||
void CopyClipPoint(CLIP_POINT *cp1, CLIP_POINT *cp2);
|
|
||||||
|
|
||||||
#if SUPPORT_MMX
|
#if SUPPORT_MMX
|
||||||
|
|
||||||
|
|
|
@ -634,6 +634,7 @@ void InitialiseSystem()
|
||||||
video memory etc exist.
|
video memory etc exist.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0 /* LINUX */
|
||||||
if (InitialiseDirectDrawObject()
|
if (InitialiseDirectDrawObject()
|
||||||
== FALSE)
|
== FALSE)
|
||||||
/*
|
/*
|
||||||
|
@ -665,6 +666,7 @@ void InitialiseSystem()
|
||||||
system memory...
|
system memory...
|
||||||
*/
|
*/
|
||||||
TestMemoryAccess();
|
TestMemoryAccess();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initialise main window, windows procedure etc */
|
/* Initialise main window, windows procedure etc */
|
||||||
rc = InitialiseWindowsSystem(hInstance, nCmdShow, WinInitFull);
|
rc = InitialiseWindowsSystem(hInstance, nCmdShow, WinInitFull);
|
||||||
|
@ -673,11 +675,13 @@ void InitialiseSystem()
|
||||||
memset((void*)KeyboardInput, No, MAX_NUMBER_OF_INPUT_KEYS);
|
memset((void*)KeyboardInput, No, MAX_NUMBER_OF_INPUT_KEYS);
|
||||||
GotAnyKey = No;
|
GotAnyKey = No;
|
||||||
|
|
||||||
|
#if 0 /* LINUX */
|
||||||
/* launch Direct Input */
|
/* launch Direct Input */
|
||||||
InitialiseDirectInput();
|
InitialiseDirectInput();
|
||||||
InitialiseDirectKeyboard();
|
InitialiseDirectKeyboard();
|
||||||
InitialiseDirectMouse();
|
InitialiseDirectMouse();
|
||||||
InitJoysticks();
|
InitJoysticks();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initialise textprint system */
|
/* Initialise textprint system */
|
||||||
textprintPosX = 0;
|
textprintPosX = 0;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "fixer.h"
|
||||||
|
|
||||||
#include "media.hpp"
|
#include "media.hpp"
|
||||||
|
|
||||||
void * MediaMedium::GetWriteBuffer(unsigned * pSize, unsigned /*nDesiredSize*/)
|
void * MediaMedium::GetWriteBuffer(unsigned * pSize, unsigned /*nDesiredSize*/)
|
||||||
|
@ -51,7 +53,7 @@ unsigned MediaWinFileMedium::GetRemainingSize()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned nSize = GetFileSize(m_hFile,NULL);
|
unsigned nSize = GetFileSize(m_hFile, 0);
|
||||||
|
|
||||||
if (0xffffffff == nSize)
|
if (0xffffffff == nSize)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#ifndef _INCLUDED_MEDIA_HPP_
|
#ifndef _INCLUDED_MEDIA_HPP_
|
||||||
#define _INCLUDED_MEDIA_HPP_
|
#define _INCLUDED_MEDIA_HPP_
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(WIN32) || defined(WINDOWS) || defined(_WINDOWS)
|
//#if defined(_WIN32) || defined(WIN32) || defined(WINDOWS) || defined(_WINDOWS)
|
||||||
#define _MEDIA_WIN_TARGET
|
#define _MEDIA_WIN_TARGET
|
||||||
#include <windows.h>
|
// #include <windows.h>
|
||||||
#endif // WIN32 || _WIN32 || WINDOWS || _WINDOWS
|
//#endif // WIN32 || _WIN32 || WINDOWS || _WINDOWS
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -386,7 +386,7 @@ class MediaWinFileMedium : public MediaMedium
|
||||||
m_hFile = INVALID_HANDLE_VALUE;
|
m_hFile = INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Open(LPCTSTR pszFileName, DWORD dwDesiredAccess)
|
void Open(char *pszFileName, DWORD dwDesiredAccess)
|
||||||
{
|
{
|
||||||
DWORD dwShareMode;
|
DWORD dwShareMode;
|
||||||
DWORD dwCreationDistribution;
|
DWORD dwCreationDistribution;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue