Added the missing support for static on the televisions.
This commit is contained in:
parent
55ddb88c8e
commit
e69698d11e
7 changed files with 435 additions and 64 deletions
2
Makefile
2
Makefile
|
@ -11,7 +11,7 @@ CXXFLAGS = $(CFLAGS)
|
||||||
|
|
||||||
LDLIBS = -m32 $(shell sdl-config --libs) $(shell openal-config --libs)
|
LDLIBS = -m32 $(shell sdl-config --libs) $(shell openal-config --libs)
|
||||||
|
|
||||||
ROOT = main.c files.c winapi.c stubs.c version.c mathline.c opengl.c oglfunc.c openal.c cdplayer.c menus.c net.c frustum.c kshape.c map.c maths.c md5.c mem3dc.c mem3dcpp.cpp module.c morph.c object.c shpanim.c sphere.c tables.c vdb.c
|
ROOT = main.c files.c winapi.c stubs.c version.c mathline.c opengl.c fmv.c oglfunc.c openal.c cdplayer.c menus.c net.c frustum.c kshape.c map.c maths.c md5.c mem3dc.c mem3dcpp.cpp module.c morph.c object.c shpanim.c sphere.c tables.c vdb.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 extents.c game.c game_statistics.c gamecmds.cpp gamevars.cpp hmodel.c hud.c inventry.c language.c lighting.c load_shp.c los.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 extents.c game.c game_statistics.c gamecmds.cpp gamevars.cpp hmodel.c hud.c inventry.c language.c lighting.c load_shp.c los.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 indexfnt.cpp r2base.cpp r2pos666.cpp reflist.cpp refobj.cpp rentrntq.cpp scstring.cpp strtab.cpp strutil.c trig666.cpp wrapstr.cpp
|
SUPPORT = consbind.cpp consbtch.cpp coordstr.cpp daemon.cpp indexfnt.cpp r2base.cpp r2pos666.cpp reflist.cpp refobj.cpp rentrntq.cpp scstring.cpp strtab.cpp strutil.c trig666.cpp wrapstr.cpp
|
||||||
|
|
|
@ -35,6 +35,10 @@ void PlayMenuMusic(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EndMenuMusic(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void WeWantAnIntro(void)
|
void WeWantAnIntro(void)
|
||||||
{
|
{
|
||||||
IntroHasAlreadyBeenPlayed = 0;
|
IntroHasAlreadyBeenPlayed = 0;
|
||||||
|
|
|
@ -107,6 +107,14 @@ typedef struct RECT
|
||||||
int bottom;
|
int bottom;
|
||||||
} RECT;
|
} RECT;
|
||||||
|
|
||||||
|
typedef struct PALETTEENTRY
|
||||||
|
{
|
||||||
|
BYTE peRed;
|
||||||
|
BYTE peGreen;
|
||||||
|
BYTE peBlue;
|
||||||
|
BYTE peFlags;
|
||||||
|
} PALETTEENTRY;
|
||||||
|
|
||||||
#if !defined(__INTEL_COMPILER)
|
#if !defined(__INTEL_COMPILER)
|
||||||
typedef int64_t __int64;
|
typedef int64_t __int64;
|
||||||
#else
|
#else
|
||||||
|
|
368
src/fmv.c
Normal file
368
src/fmv.c
Normal file
|
@ -0,0 +1,368 @@
|
||||||
|
/* KJL 15:25:20 8/16/97
|
||||||
|
*
|
||||||
|
* smacker.c - functions to handle FMV playback
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include "3dc.h"
|
||||||
|
#include "module.h"
|
||||||
|
#include "inline.h"
|
||||||
|
#include "stratdef.h"
|
||||||
|
#include "gamedef.h"
|
||||||
|
#include "fmv.h"
|
||||||
|
#include "avp_menus.h"
|
||||||
|
#include "avp_userprofile.h"
|
||||||
|
#include "oglfunc.h"
|
||||||
|
|
||||||
|
#define UseLocalAssert 1
|
||||||
|
#include "ourasert.h"
|
||||||
|
|
||||||
|
int VolumeOfNearestVideoScreen;
|
||||||
|
int PanningOfNearestVideoScreen;
|
||||||
|
|
||||||
|
extern char *ScreenBuffer;
|
||||||
|
extern int GotAnyKey;
|
||||||
|
extern void DirectReadKeyboard(void);
|
||||||
|
extern IMAGEHEADER ImageHeaderArray[];
|
||||||
|
#if MaxImageGroups>1
|
||||||
|
extern int NumImagesArray[];
|
||||||
|
#else
|
||||||
|
extern int NumImages;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void PlayFMV(char *filenamePtr);
|
||||||
|
|
||||||
|
void FindLightingValueFromFMV(unsigned short *bufferPtr);
|
||||||
|
void FindLightingValuesFromTriggeredFMV(unsigned char *bufferPtr, FMVTEXTURE *ftPtr);
|
||||||
|
|
||||||
|
int SmackerSoundVolume=ONE_FIXED/512;
|
||||||
|
int MoviesAreActive;
|
||||||
|
int IntroOutroMoviesAreActive=1;
|
||||||
|
|
||||||
|
int FmvColourRed;
|
||||||
|
int FmvColourGreen;
|
||||||
|
int FmvColourBlue;
|
||||||
|
|
||||||
|
void ReleaseFMVTexture(FMVTEXTURE *ftPtr);
|
||||||
|
|
||||||
|
|
||||||
|
/* KJL 12:45:23 10/08/98 - FMVTEXTURE stuff */
|
||||||
|
#define MAX_NO_FMVTEXTURES 10
|
||||||
|
FMVTEXTURE FMVTexture[MAX_NO_FMVTEXTURES];
|
||||||
|
int NumberOfFMVTextures;
|
||||||
|
|
||||||
|
void ScanImagesForFMVs(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
extern void SetupFMVTexture(FMVTEXTURE *ftPtr);
|
||||||
|
int i;
|
||||||
|
IMAGEHEADER *ihPtr;
|
||||||
|
NumberOfFMVTextures=0;
|
||||||
|
|
||||||
|
#if MaxImageGroups>1
|
||||||
|
for (j=0; j<MaxImageGroups; j++)
|
||||||
|
{
|
||||||
|
if (NumImagesArray[j])
|
||||||
|
{
|
||||||
|
ihPtr = &ImageHeaderArray[j*MaxImages];
|
||||||
|
for (i = 0; i<NumImagesArray[j]; i++, ihPtr++)
|
||||||
|
{
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
if(NumImages)
|
||||||
|
{
|
||||||
|
ihPtr = &ImageHeaderArray[0];
|
||||||
|
for (i = 0; i<NumImages; i++, ihPtr++)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
char *strPtr;
|
||||||
|
if((strPtr = strstr(ihPtr->ImageName,"FMVs")))
|
||||||
|
{
|
||||||
|
char filename[30];
|
||||||
|
{
|
||||||
|
char *filenamePtr = filename;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
*filenamePtr++ = *strPtr;
|
||||||
|
}
|
||||||
|
while(*strPtr++!='.');
|
||||||
|
|
||||||
|
*filenamePtr++='s';
|
||||||
|
*filenamePtr++='m';
|
||||||
|
*filenamePtr++='k';
|
||||||
|
*filenamePtr=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (smackHandle)
|
||||||
|
//{
|
||||||
|
// FMVTexture[NumberOfFMVTextures].IsTriggeredPlotFMV = 0;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
{
|
||||||
|
FMVTexture[NumberOfFMVTextures].IsTriggeredPlotFMV = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
//FMVTexture[NumberOfFMVTextures].SmackHandle = smackHandle;
|
||||||
|
FMVTexture[NumberOfFMVTextures].ImagePtr = ihPtr;
|
||||||
|
FMVTexture[NumberOfFMVTextures].StaticImageDrawn=0;
|
||||||
|
SetupFMVTexture(&FMVTexture[NumberOfFMVTextures]);
|
||||||
|
NumberOfFMVTextures++;
|
||||||
|
|
||||||
|
if (NumberOfFMVTextures == MAX_NO_FMVTEXTURES)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAllFMVTextures(void)
|
||||||
|
{
|
||||||
|
extern void UpdateFMVTexture(FMVTEXTURE *ftPtr);
|
||||||
|
int i = NumberOfFMVTextures;
|
||||||
|
|
||||||
|
while(i--)
|
||||||
|
{
|
||||||
|
UpdateFMVTexture(&FMVTexture[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReleaseAllFMVTextures(void)
|
||||||
|
{
|
||||||
|
extern void UpdateFMVTexture(FMVTEXTURE *ftPtr);
|
||||||
|
int i = NumberOfFMVTextures;
|
||||||
|
|
||||||
|
while(i--)
|
||||||
|
{
|
||||||
|
ReleaseFMVTexture(&FMVTexture[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int NextFMVTextureFrame(FMVTEXTURE *ftPtr, void *bufferPtr)
|
||||||
|
{
|
||||||
|
int w = 128;
|
||||||
|
|
||||||
|
if (!ftPtr->StaticImageDrawn)
|
||||||
|
{
|
||||||
|
int i = w*96/4;
|
||||||
|
unsigned int seed = FastRandom();
|
||||||
|
int *ptr = (int*)bufferPtr;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
seed = ((seed*1664525)+1013904223);
|
||||||
|
*ptr++ = seed;
|
||||||
|
}
|
||||||
|
while(--i);
|
||||||
|
ftPtr->StaticImageDrawn=1;
|
||||||
|
}
|
||||||
|
FindLightingValuesFromTriggeredFMV((unsigned char*)bufferPtr,ftPtr);
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateFMVTexturePalette(FMVTEXTURE *ftPtr)
|
||||||
|
{
|
||||||
|
//unsigned char *c;
|
||||||
|
int i;
|
||||||
|
//
|
||||||
|
//if (MoviesAreActive && ftPtr->SmackHandle)
|
||||||
|
//{
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
{
|
||||||
|
{
|
||||||
|
unsigned int seed = FastRandom();
|
||||||
|
for(i=0;i<256;i++)
|
||||||
|
{
|
||||||
|
int l = (seed&(seed>>24)&(seed>>16));
|
||||||
|
seed = ((seed*1664525)+1013904223);
|
||||||
|
ftPtr->SrcPalette[i].peRed=l;
|
||||||
|
ftPtr->SrcPalette[i].peGreen=l;
|
||||||
|
ftPtr->SrcPalette[i].peBlue=l;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extern void StartTriggerPlotFMV(int number)
|
||||||
|
{
|
||||||
|
(void) number;
|
||||||
|
|
||||||
|
//int i = NumberOfFMVTextures;
|
||||||
|
//char buffer[25];
|
||||||
|
//
|
||||||
|
//if (CheatMode_Active != CHEATMODE_NONACTIVE) return;
|
||||||
|
//
|
||||||
|
//sprintf(buffer,"FMVs//message%d.smk",number);
|
||||||
|
//{
|
||||||
|
// FILE* file=fopen(buffer,"rb");
|
||||||
|
// if(!file)
|
||||||
|
// {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// fclose(file);
|
||||||
|
//}
|
||||||
|
//while(i--)
|
||||||
|
//{
|
||||||
|
// if (FMVTexture[i].IsTriggeredPlotFMV)
|
||||||
|
// {
|
||||||
|
// FMVTexture[i].MessageNumber = number;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
extern void StartFMVAtFrame(int number, int frame)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
extern void GetFMVInformation(int *messageNumberPtr, int *frameNumberPtr)
|
||||||
|
{
|
||||||
|
//int i = NumberOfFMVTextures;
|
||||||
|
//
|
||||||
|
//while(i--)
|
||||||
|
//{
|
||||||
|
// if (FMVTexture[i].IsTriggeredPlotFMV)
|
||||||
|
// {
|
||||||
|
// if(FMVTexture[i].SmackHandle)
|
||||||
|
// {
|
||||||
|
// *messageNumberPtr = FMVTexture[i].MessageNumber;
|
||||||
|
// *frameNumberPtr = 0;
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
*messageNumberPtr = 0;
|
||||||
|
*frameNumberPtr = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern void InitialiseTriggeredFMVs(void)
|
||||||
|
{
|
||||||
|
//int i = NumberOfFMVTextures;
|
||||||
|
//while(i--)
|
||||||
|
//{
|
||||||
|
// if (FMVTexture[i].IsTriggeredPlotFMV)
|
||||||
|
// {
|
||||||
|
// if(FMVTexture[i].SmackHandle)
|
||||||
|
// {
|
||||||
|
// FMVTexture[i].MessageNumber = 0;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// FMVTexture[i].SmackHandle = 0;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FindLightingValuesFromTriggeredFMV(unsigned char *bufferPtr, FMVTEXTURE *ftPtr)
|
||||||
|
{
|
||||||
|
unsigned int totalRed=0;
|
||||||
|
unsigned int totalBlue=0;
|
||||||
|
unsigned int totalGreen=0;
|
||||||
|
|
||||||
|
int pixels = 128*96;//64*48;//256*192;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
unsigned char source = (*bufferPtr++);
|
||||||
|
totalBlue += ftPtr->SrcPalette[source].peBlue;
|
||||||
|
totalGreen += ftPtr->SrcPalette[source].peGreen;
|
||||||
|
totalRed += ftPtr->SrcPalette[source].peRed;
|
||||||
|
}
|
||||||
|
while(--pixels);
|
||||||
|
|
||||||
|
FmvColourRed = totalRed/48*16;
|
||||||
|
FmvColourGreen = totalGreen/48*16;
|
||||||
|
FmvColourBlue = totalBlue/48*16;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetupFMVTexture(FMVTEXTURE *ftPtr)
|
||||||
|
{
|
||||||
|
if (ftPtr->PalettedBuf == NULL)
|
||||||
|
{
|
||||||
|
ftPtr->PalettedBuf = (unsigned char*) malloc(128*128*4);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ftPtr->RGBBuf == NULL)
|
||||||
|
{
|
||||||
|
if (ftPtr->PalettedBuf == NULL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ftPtr->RGBBuf = &ftPtr->PalettedBuf[128*128];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateFMVTexture(FMVTEXTURE *ftPtr)
|
||||||
|
{
|
||||||
|
unsigned char *srcPtr;
|
||||||
|
unsigned char *dstPtr;
|
||||||
|
|
||||||
|
int pixels = 128*96;//64*48;//256*192;
|
||||||
|
|
||||||
|
// get the next frame into the paletted buffer
|
||||||
|
if (!NextFMVTextureFrame(ftPtr, &ftPtr->PalettedBuf[0]))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// update the texture palette
|
||||||
|
UpdateFMVTexturePalette(ftPtr);
|
||||||
|
|
||||||
|
srcPtr = &ftPtr->PalettedBuf[0];
|
||||||
|
dstPtr = &ftPtr->RGBBuf[0];
|
||||||
|
|
||||||
|
// not using paletted textures, so convert to rgb manually
|
||||||
|
do
|
||||||
|
{
|
||||||
|
unsigned char source = (*srcPtr++);
|
||||||
|
dstPtr[0] = ftPtr->SrcPalette[source].peRed;
|
||||||
|
dstPtr[1] = ftPtr->SrcPalette[source].peGreen;
|
||||||
|
dstPtr[2] = ftPtr->SrcPalette[source].peBlue;
|
||||||
|
|
||||||
|
dstPtr += 3;
|
||||||
|
} while(--pixels);
|
||||||
|
|
||||||
|
// update the opengl texture
|
||||||
|
pglBindTexture(GL_TEXTURE_2D, ftPtr->ImagePtr->D3DTexture->id);
|
||||||
|
|
||||||
|
pglTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 128, 96, GL_RGB, GL_UNSIGNED_BYTE, &ftPtr->RGBBuf[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReleaseFMVTexture(FMVTEXTURE *ftPtr)
|
||||||
|
{
|
||||||
|
ftPtr->MessageNumber = 0;
|
||||||
|
|
||||||
|
//if (FMVTexture[i].SrcTexture)
|
||||||
|
//{
|
||||||
|
// ReleaseD3DTexture(FMVTexture[i].SrcTexture);
|
||||||
|
// FMVTexture[i].SrcTexture=0;
|
||||||
|
//}
|
||||||
|
//if (FMVTexture[i].SrcSurface)
|
||||||
|
//{
|
||||||
|
// ReleaseDDSurface(FMVTexture[i].SrcSurface);
|
||||||
|
// FMVTexture[i].SrcSurface=0;
|
||||||
|
//}
|
||||||
|
//if (FMVTexture[i].DestTexture)
|
||||||
|
//{
|
||||||
|
// ReleaseD3DTexture(FMVTexture[i].DestTexture);
|
||||||
|
// FMVTexture[i].DestTexture = 0;
|
||||||
|
//}
|
||||||
|
|
||||||
|
if (ftPtr->PalettedBuf != NULL)
|
||||||
|
{
|
||||||
|
free(ftPtr->PalettedBuf);
|
||||||
|
ftPtr->PalettedBuf = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
ftPtr->RGBBuf = NULL;
|
||||||
|
}
|
42
src/fmv.h
Normal file
42
src/fmv.h
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
#ifndef FMV_H
|
||||||
|
#define FMV_H
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
IMAGEHEADER *ImagePtr;
|
||||||
|
int SoundVolume;
|
||||||
|
int IsTriggeredPlotFMV;
|
||||||
|
int StaticImageDrawn;
|
||||||
|
|
||||||
|
int MessageNumber;
|
||||||
|
|
||||||
|
// disabled direct3d stuff
|
||||||
|
//LPDIRECTDRAWSURFACE SrcSurface;
|
||||||
|
//LPDIRECT3DTEXTURE SrcTexture;
|
||||||
|
//LPDIRECT3DTEXTURE DestTexture;
|
||||||
|
PALETTEENTRY SrcPalette[256];
|
||||||
|
|
||||||
|
// buffer used for opengl texture uploads
|
||||||
|
unsigned char* PalettedBuf;
|
||||||
|
unsigned char* RGBBuf;
|
||||||
|
|
||||||
|
int RedScale;
|
||||||
|
int GreenScale;
|
||||||
|
int BlueScale;
|
||||||
|
|
||||||
|
} FMVTEXTURE;
|
||||||
|
|
||||||
|
|
||||||
|
extern int NextFMVTextureFrame(FMVTEXTURE *ftPtr, void *bufferPtr);
|
||||||
|
extern void UpdateFMVTexturePalette(FMVTEXTURE *ftPtr);
|
||||||
|
extern void InitialiseTriggeredFMVs(void);
|
||||||
|
extern void StartTriggerPlotFMV(int number);
|
||||||
|
|
||||||
|
extern void StartFMVAtFrame(int number, int frame);
|
||||||
|
extern void GetFMVInformation(int *messageNumberPtr, int *frameNumberPtr);
|
||||||
|
|
||||||
|
void UpdateAllFMVTextures(void);
|
||||||
|
void ScanImagesForFMVs(void);
|
||||||
|
void ReleaseAllFMVTextures(void);
|
||||||
|
|
||||||
|
#endif
|
23
src/main.c
23
src/main.c
|
@ -43,6 +43,7 @@
|
||||||
#include "progress_bar.h"
|
#include "progress_bar.h"
|
||||||
#include "scrshot.hpp"
|
#include "scrshot.hpp"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
#include "fmv.h"
|
||||||
|
|
||||||
char LevelName[] = {"predbit6\0QuiteALongNameActually"}; /* the real way to load levels */
|
char LevelName[] = {"predbit6\0QuiteALongNameActually"}; /* the real way to load levels */
|
||||||
|
|
||||||
|
@ -77,6 +78,13 @@ static const char * opengl_library = NULL;
|
||||||
|
|
||||||
/* ** */
|
/* ** */
|
||||||
|
|
||||||
|
static void IngameKeyboardInput_ClearBuffer(void)
|
||||||
|
{
|
||||||
|
// clear the keyboard state
|
||||||
|
memset((void*) KeyboardInput, 0, MAX_NUMBER_OF_INPUT_KEYS);
|
||||||
|
GotAnyKey = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void DirectReadKeyboard()
|
void DirectReadKeyboard()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -494,8 +502,7 @@ int SetSoftVideoMode(int Width, int Height, int Depth)
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset input
|
// reset input
|
||||||
memset((void*) KeyboardInput, 0, MAX_NUMBER_OF_INPUT_KEYS);
|
IngameKeyboardInput_ClearBuffer();
|
||||||
GotAnyKey = 0;
|
|
||||||
|
|
||||||
// force restart the video system
|
// force restart the video system
|
||||||
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||||
|
@ -560,8 +567,7 @@ int SetOGLVideoMode(int Width, int Height)
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset input
|
// reset input
|
||||||
memset((void*) KeyboardInput, 0, MAX_NUMBER_OF_INPUT_KEYS);
|
IngameKeyboardInput_ClearBuffer();
|
||||||
GotAnyKey = 0;
|
|
||||||
|
|
||||||
// force restart the video system
|
// force restart the video system
|
||||||
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||||
|
@ -1279,7 +1285,7 @@ if (AvP_MainMenus())
|
||||||
|
|
||||||
AvP.MainLoopRunning = 1;
|
AvP.MainLoopRunning = 1;
|
||||||
|
|
||||||
/* ScanImagesForFMVs(); NOT YET */
|
ScanImagesForFMVs();
|
||||||
|
|
||||||
ResetFrameCounter();
|
ResetFrameCounter();
|
||||||
|
|
||||||
|
@ -1296,7 +1302,7 @@ if (AvP_MainMenus())
|
||||||
TeleportNetPlayerToAStartingPosition(Player->ObStrategyBlock,1);
|
TeleportNetPlayerToAStartingPosition(Player->ObStrategyBlock,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IngameKeyboardInput_ClearBuffer(); NOT YET */
|
IngameKeyboardInput_ClearBuffer();
|
||||||
|
|
||||||
while(AvP.MainLoopRunning) {
|
while(AvP.MainLoopRunning) {
|
||||||
CheckForWindowsMessages();
|
CheckForWindowsMessages();
|
||||||
|
@ -1322,8 +1328,6 @@ if (AvP_MainMenus())
|
||||||
} else {
|
} else {
|
||||||
ReadUserInput();
|
ReadUserInput();
|
||||||
|
|
||||||
/* UpdateAllFMVTextures(); NOT YET */
|
|
||||||
|
|
||||||
SoundSys_Management();
|
SoundSys_Management();
|
||||||
|
|
||||||
FlushD3DZBuffer();
|
FlushD3DZBuffer();
|
||||||
|
@ -1376,10 +1380,7 @@ if (AvP_MainMenus())
|
||||||
|
|
||||||
FixCheatModesInUserProfile(UserProfilePtr);
|
FixCheatModesInUserProfile(UserProfilePtr);
|
||||||
|
|
||||||
/* NOT YET
|
|
||||||
CloseFMV();
|
|
||||||
ReleaseAllFMVTextures();
|
ReleaseAllFMVTextures();
|
||||||
*/
|
|
||||||
|
|
||||||
CONSBIND_WriteKeyBindingsToConfigFile();
|
CONSBIND_WriteKeyBindingsToConfigFile();
|
||||||
|
|
||||||
|
|
52
src/stubs.c
52
src/stubs.c
|
@ -52,58 +52,6 @@ void EndMenuBackgroundBink()
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* smacker.c */
|
|
||||||
int FmvColourRed;
|
|
||||||
int FmvColourGreen;
|
|
||||||
int FmvColourBlue;
|
|
||||||
int IntroOutroMoviesAreActive = 1;
|
|
||||||
int MoviesAreActive;
|
|
||||||
int SmackerSoundVolume;
|
|
||||||
|
|
||||||
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");
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
void EndMenuMusic()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
fprintf(stderr, "EndMenuMusic()\n");
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* alt_tab.cpp */
|
/* alt_tab.cpp */
|
||||||
void ATIncludeSurface(void * pSurface, void * hBackup)
|
void ATIncludeSurface(void * pSurface, void * hBackup)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue