mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'next' into udmf-fof-flags
This commit is contained in:
commit
ec119eac2f
178 changed files with 60 additions and 45854 deletions
|
@ -3677,6 +3677,7 @@ udmf
|
|||
0 = "Add tag";
|
||||
1 = "Remove tag";
|
||||
2 = "Replace first tag";
|
||||
3 = "Change trigger tag";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3699,6 +3700,7 @@ udmf
|
|||
0 = "Add tag";
|
||||
1 = "Remove tag";
|
||||
2 = "Replace first tag";
|
||||
3 = "Change trigger tag";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IncludePath>$(SolutionDir)libs\fmodex\inc;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)libs\fmodex\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup />
|
||||
<ItemDefinitionGroup Condition="'$(PlatformTarget)'=='x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>fmodexL64_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(PlatformTarget)'=='x86'">
|
||||
<Link>
|
||||
<AdditionalDependencies>fmodexL_vc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
</Project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -1,159 +0,0 @@
|
|||
/* ==================================================================================================== */
|
||||
/* FMOD Ex - codec development header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2011. */
|
||||
/* */
|
||||
/* Use this header if you are wanting to develop your own file format plugin to use with */
|
||||
/* FMOD's codec system. With this header you can make your own fileformat plugin that FMOD */
|
||||
/* can register and use. See the documentation and examples on how to make a working plugin. */
|
||||
/* */
|
||||
/* ==================================================================================================== */
|
||||
|
||||
#ifndef _FMOD_CODEC_H
|
||||
#define _FMOD_CODEC_H
|
||||
|
||||
typedef struct FMOD_CODEC_STATE FMOD_CODEC_STATE;
|
||||
typedef struct FMOD_CODEC_WAVEFORMAT FMOD_CODEC_WAVEFORMAT;
|
||||
|
||||
/*
|
||||
Codec callbacks
|
||||
*/
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_OPENCALLBACK) (FMOD_CODEC_STATE *codec_state, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO *userexinfo);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_CLOSECALLBACK) (FMOD_CODEC_STATE *codec_state);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_READCALLBACK) (FMOD_CODEC_STATE *codec_state, void *buffer, unsigned int sizebytes, unsigned int *bytesread);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETLENGTHCALLBACK) (FMOD_CODEC_STATE *codec_state, unsigned int *length, FMOD_TIMEUNIT lengthtype);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_SETPOSITIONCALLBACK) (FMOD_CODEC_STATE *codec_state, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETPOSITIONCALLBACK) (FMOD_CODEC_STATE *codec_state, unsigned int *position, FMOD_TIMEUNIT postype);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_SOUNDCREATECALLBACK) (FMOD_CODEC_STATE *codec_state, int subsound, FMOD_SOUND *sound);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_METADATACALLBACK) (FMOD_CODEC_STATE *codec_state, FMOD_TAGTYPE tagtype, char *name, void *data, unsigned int datalen, FMOD_TAGDATATYPE datatype, int unique);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETWAVEFORMAT) (FMOD_CODEC_STATE *codec_state, int index, FMOD_CODEC_WAVEFORMAT *waveformat);
|
||||
|
||||
|
||||
/*
|
||||
[STRUCTURE]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
When creating a codec, declare one of these and provide the relevant callbacks and name for FMOD to use when it opens and reads a file.
|
||||
|
||||
[REMARKS]
|
||||
Members marked with [in] mean the variable can be written to. The user can set the value.
|
||||
Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
FMOD_CODEC_STATE
|
||||
]
|
||||
*/
|
||||
typedef struct FMOD_CODEC_DESCRIPTION
|
||||
{
|
||||
const char *name; /* [in] Name of the codec. */
|
||||
unsigned int version; /* [in] Plugin writer's version number. */
|
||||
int defaultasstream; /* [in] Tells FMOD to open the file as a stream when calling System::createSound, and not a static sample. Should normally be 0 (FALSE), because generally the user wants to decode the file into memory when using System::createSound. Mainly used for formats that decode for a very long time, or could use large amounts of memory when decoded. Usually sequenced formats such as mod/s3m/xm/it/midi fall into this category. It is mainly to stop users that don't know what they're doing from getting FMOD_ERR_MEMORY returned from createSound when they should have in fact called System::createStream or used FMOD_CREATESTREAM in System::createSound. */
|
||||
FMOD_TIMEUNIT timeunits; /* [in] When setposition codec is called, only these time formats will be passed to the codec. Use bitwise OR to accumulate different types. */
|
||||
FMOD_CODEC_OPENCALLBACK open; /* [in] Open callback for the codec for when FMOD tries to open a sound using this codec. */
|
||||
FMOD_CODEC_CLOSECALLBACK close; /* [in] Close callback for the codec for when FMOD tries to close a sound using this codec. */
|
||||
FMOD_CODEC_READCALLBACK read; /* [in] Read callback for the codec for when FMOD tries to read some data from the file to the destination format (specified in the open callback). */
|
||||
FMOD_CODEC_GETLENGTHCALLBACK getlength; /* [in] Callback to return the length of the song in whatever format required when Sound::getLength is called. */
|
||||
FMOD_CODEC_SETPOSITIONCALLBACK setposition; /* [in] Seek callback for the codec for when FMOD tries to seek within the file with Channel::setPosition. */
|
||||
FMOD_CODEC_GETPOSITIONCALLBACK getposition; /* [in] Tell callback for the codec for when FMOD tries to get the current position within the with Channel::getPosition. */
|
||||
FMOD_CODEC_SOUNDCREATECALLBACK soundcreate; /* [in] Sound creation callback for the codec when FMOD finishes creating the sound. (So the codec can set more parameters for the related created sound, ie loop points/mode or 3D attributes etc). */
|
||||
FMOD_CODEC_GETWAVEFORMAT getwaveformat; /* [in] Callback to tell FMOD about the waveformat of a particular subsound. This is to save memory, rather than saving 1000 FMOD_CODEC_WAVEFORMAT structures in the codec, the codec might have a more optimal way of storing this information. */
|
||||
} FMOD_CODEC_DESCRIPTION;
|
||||
|
||||
|
||||
/*
|
||||
[STRUCTURE]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Set these values marked 'in' to tell fmod what sort of sound to create.
|
||||
The format, channels and frequency tell FMOD what sort of hardware buffer to create when you initialize your code. So if you wrote an MP3 codec that decoded to stereo 16bit integer PCM, you would specify FMOD_SOUND_FORMAT_PCM16, and channels would be equal to 2.
|
||||
Members marked as 'out' are set by fmod. Do not modify these. Simply specify 0 for these values when declaring the structure, FMOD will fill in the values for you after creation with the correct function pointers.
|
||||
|
||||
[REMARKS]
|
||||
Members marked with [in] mean the variable can be written to. The user can set the value.
|
||||
Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.
|
||||
|
||||
An FMOD file might be from disk, memory or network, however the file may be opened by the user.
|
||||
|
||||
'numsubsounds' should be 0 if the file is a normal single sound stream or sound. Examples of this would be .WAV, .WMA, .MP3, .AIFF.
|
||||
'numsubsounds' should be 1+ if the file is a container format, and does not contain wav data itself. Examples of these types would be CDDA (multiple CD tracks), FSB (contains multiple sounds), MIDI/MOD/S3M/XM/IT (contain instruments).
|
||||
The arrays of format, channel, frequency, length and blockalign should point to arrays of information based on how many subsounds are in the format. If the number of subsounds is 0 then it should point to 1 of each attribute, the same as if the number of subsounds was 1. If subsounds was 100 for example, each pointer should point to an array of 100 of each attribute.
|
||||
When a sound has 1 or more subsounds, you must play the individual sounds specified by first obtaining the subsound with Sound::getSubSound.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
FMOD_SOUND_FORMAT
|
||||
FMOD_FILE_READCALLBACK
|
||||
FMOD_FILE_SEEKCALLBACK
|
||||
FMOD_CODEC_METADATACALLBACK
|
||||
Sound::getSubSound
|
||||
Sound::getNumSubSounds
|
||||
]
|
||||
*/
|
||||
struct FMOD_CODEC_WAVEFORMAT
|
||||
{
|
||||
char name[256]; /* [in] Name of sound.*/
|
||||
FMOD_SOUND_FORMAT format; /* [in] Format for (decompressed) codec output, ie FMOD_SOUND_FORMAT_PCM8, FMOD_SOUND_FORMAT_PCM16.*/
|
||||
int channels; /* [in] Number of channels used by codec, ie mono = 1, stereo = 2. */
|
||||
int frequency; /* [in] Default frequency in hz of the codec, ie 44100. */
|
||||
unsigned int lengthbytes; /* [in] Length in bytes of the source data. */
|
||||
unsigned int lengthpcm; /* [in] Length in decompressed, PCM samples of the file, ie length in seconds * frequency. Used for Sound::getLength and for memory allocation of static decompressed sample data. */
|
||||
int blockalign; /* [in] Blockalign in decompressed, PCM samples of the optimal decode chunk size for this format. The codec read callback will be called in multiples of this value. */
|
||||
int loopstart; /* [in] Loopstart in decompressed, PCM samples of file. */
|
||||
int loopend; /* [in] Loopend in decompressed, PCM samples of file. */
|
||||
FMOD_MODE mode; /* [in] Mode to determine whether the sound should by default load as looping, non looping, 2d or 3d. */
|
||||
unsigned int channelmask; /* [in] Microsoft speaker channel mask, as defined for WAVEFORMATEXTENSIBLE and is found in ksmedia.h. Leave at 0 to play in natural speaker order. */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
[STRUCTURE]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Codec plugin structure that is passed into each callback.
|
||||
|
||||
Set these numsubsounds and waveformat members when called in FMOD_CODEC_OPENCALLBACK to tell fmod what sort of sound to create.
|
||||
|
||||
The format, channels and frequency tell FMOD what sort of hardware buffer to create when you initialize your code. So if you wrote an MP3 codec that decoded to stereo 16bit integer PCM, you would specify FMOD_SOUND_FORMAT_PCM16, and channels would be equal to 2.
|
||||
|
||||
[REMARKS]
|
||||
Members marked with [in] mean the variable can be written to. The user can set the value.
|
||||
Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.
|
||||
|
||||
An FMOD file might be from disk, memory or internet, however the file may be opened by the user.
|
||||
|
||||
'numsubsounds' should be 0 if the file is a normal single sound stream or sound. Examples of this would be .WAV, .WMA, .MP3, .AIFF.
|
||||
'numsubsounds' should be 1+ if the file is a container format, and does not contain wav data itself. Examples of these types would be CDDA (multiple CD tracks), FSB (contains multiple sounds), DLS (contain instruments).
|
||||
The arrays of format, channel, frequency, length and blockalign should point to arrays of information based on how many subsounds are in the format. If the number of subsounds is 0 then it should point to 1 of each attribute, the same as if the number of subsounds was 1. If subsounds was 100 for example, each pointer should point to an array of 100 of each attribute.
|
||||
When a sound has 1 or more subsounds, you must play the individual sounds specified by first obtaining the subsound with Sound::getSubSound.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
FMOD_SOUND_FORMAT
|
||||
FMOD_FILE_READCALLBACK
|
||||
FMOD_FILE_SEEKCALLBACK
|
||||
FMOD_CODEC_METADATACALLBACK
|
||||
Sound::getSubSound
|
||||
Sound::getNumSubSounds
|
||||
]
|
||||
*/
|
||||
struct FMOD_CODEC_STATE
|
||||
{
|
||||
int numsubsounds; /* [in] Number of 'subsounds' in this sound. Anything other than 0 makes it a 'container' format (ie CDDA/DLS/FSB etc which contain 1 or more su bsounds). For most normal, single sound codec such as WAV/AIFF/MP3, this should be 0 as they are not a container for subsounds, they are the sound by itself. */
|
||||
FMOD_CODEC_WAVEFORMAT *waveformat; /* [in] Pointer to an array of format structures containing information about each sample. Can be 0 or NULL if FMOD_CODEC_GETWAVEFORMAT callback is preferred. The number of entries here must equal the number of subsounds defined in the subsound parameter. If numsubsounds = 0 then there should be 1 instance of this structure. */
|
||||
void *plugindata; /* [in] Plugin writer created data the codec author wants to attach to this object. */
|
||||
|
||||
void *filehandle; /* [out] This will return an internal FMOD file handle to use with the callbacks provided. */
|
||||
unsigned int filesize; /* [out] This will contain the size of the file in bytes. */
|
||||
FMOD_FILE_READCALLBACK fileread; /* [out] This will return a callable FMOD file function to use from codec. */
|
||||
FMOD_FILE_SEEKCALLBACK fileseek; /* [out] This will return a callable FMOD file function to use from codec. */
|
||||
FMOD_CODEC_METADATACALLBACK metadata; /* [out] This will return a callable FMOD metadata function to use from codec. */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,743 +0,0 @@
|
|||
/* ========================================================================================== */
|
||||
/* FMOD Ex - DSP header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2011. */
|
||||
/* */
|
||||
/* Use this header if you are interested in delving deeper into the FMOD software mixing / */
|
||||
/* DSP engine. In this header you can find parameter structures for FMOD system reigstered */
|
||||
/* DSP effects and generators. */
|
||||
/* Also use this header if you are wanting to develop your own DSP plugin to use with FMOD's */
|
||||
/* dsp system. With this header you can make your own DSP plugin that FMOD can */
|
||||
/* register and use. See the documentation and examples on how to make a working plugin. */
|
||||
/* */
|
||||
/* ========================================================================================== */
|
||||
|
||||
#ifndef _FMOD_DSP_H
|
||||
#define _FMOD_DSP_H
|
||||
|
||||
typedef struct FMOD_DSP_STATE FMOD_DSP_STATE;
|
||||
|
||||
/*
|
||||
DSP callbacks
|
||||
*/
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_CREATECALLBACK) (FMOD_DSP_STATE *dsp_state);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_RELEASECALLBACK) (FMOD_DSP_STATE *dsp_state);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_RESETCALLBACK) (FMOD_DSP_STATE *dsp_state);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_READCALLBACK) (FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_SETPOSITIONCALLBACK)(FMOD_DSP_STATE *dsp_state, unsigned int pos);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_SETPARAMCALLBACK) (FMOD_DSP_STATE *dsp_state, int index, float value);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_GETPARAMCALLBACK) (FMOD_DSP_STATE *dsp_state, int index, float *value, char *valuestr);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_DIALOGCALLBACK) (FMOD_DSP_STATE *dsp_state, void *hwnd, int show);
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
These definitions can be used for creating FMOD defined special effects or DSP units.
|
||||
|
||||
[REMARKS]
|
||||
To get them to be active, first create the unit, then add it somewhere into the DSP network, either at the front of the network near the soundcard unit to affect the global output (by using System::getDSPHead), or on a single channel (using Channel::getDSPHead).
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
System::createDSPByType
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_TYPE_UNKNOWN, /* This unit was created via a non FMOD plugin so has an unknown purpose. */
|
||||
FMOD_DSP_TYPE_MIXER, /* This unit does nothing but take inputs and mix them together then feed the result to the soundcard unit. */
|
||||
FMOD_DSP_TYPE_OSCILLATOR, /* This unit generates sine/square/saw/triangle or noise tones. */
|
||||
FMOD_DSP_TYPE_LOWPASS, /* This unit filters sound using a high quality, resonant lowpass filter algorithm but consumes more CPU time. */
|
||||
FMOD_DSP_TYPE_ITLOWPASS, /* This unit filters sound using a resonant lowpass filter algorithm that is used in Impulse Tracker, but with limited cutoff range (0 to 8060hz). */
|
||||
FMOD_DSP_TYPE_HIGHPASS, /* This unit filters sound using a resonant highpass filter algorithm. */
|
||||
FMOD_DSP_TYPE_ECHO, /* This unit produces an echo on the sound and fades out at the desired rate. */
|
||||
FMOD_DSP_TYPE_FLANGE, /* This unit produces a flange effect on the sound. */
|
||||
FMOD_DSP_TYPE_DISTORTION, /* This unit distorts the sound. */
|
||||
FMOD_DSP_TYPE_NORMALIZE, /* This unit normalizes or amplifies the sound to a certain level. */
|
||||
FMOD_DSP_TYPE_PARAMEQ, /* This unit attenuates or amplifies a selected frequency range. */
|
||||
FMOD_DSP_TYPE_PITCHSHIFT, /* This unit bends the pitch of a sound without changing the speed of playback. */
|
||||
FMOD_DSP_TYPE_CHORUS, /* This unit produces a chorus effect on the sound. */
|
||||
FMOD_DSP_TYPE_VSTPLUGIN, /* This unit allows the use of Steinberg VST plugins */
|
||||
FMOD_DSP_TYPE_WINAMPPLUGIN, /* This unit allows the use of Nullsoft Winamp plugins */
|
||||
FMOD_DSP_TYPE_ITECHO, /* This unit produces an echo on the sound and fades out at the desired rate as is used in Impulse Tracker. */
|
||||
FMOD_DSP_TYPE_COMPRESSOR, /* This unit implements dynamic compression (linked multichannel, wideband) */
|
||||
FMOD_DSP_TYPE_SFXREVERB, /* This unit implements SFX reverb */
|
||||
FMOD_DSP_TYPE_LOWPASS_SIMPLE, /* This unit filters sound using a simple lowpass with no resonance, but has flexible cutoff and is fast. */
|
||||
FMOD_DSP_TYPE_DELAY, /* This unit produces different delays on individual channels of the sound. */
|
||||
FMOD_DSP_TYPE_TREMOLO, /* This unit produces a tremolo / chopper effect on the sound. */
|
||||
FMOD_DSP_TYPE_LADSPAPLUGIN, /* This unit allows the use of LADSPA standard plugins. */
|
||||
FMOD_DSP_TYPE_HIGHPASS_SIMPLE, /* This unit filters sound using a simple highpass with no resonance, but has flexible cutoff and is fast. */
|
||||
FMOD_DSP_TYPE_HARDWARE = 1000, /* Offset that platform specific FMOD_HARDWARE DSPs will start at. */
|
||||
FMOD_DSP_TYPE_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
|
||||
} FMOD_DSP_TYPE;
|
||||
|
||||
|
||||
/*
|
||||
[STRUCTURE]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Structure to define a parameter for a DSP unit.
|
||||
|
||||
[REMARKS]
|
||||
Members marked with [r] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.
|
||||
Members marked with [w] mean the variable can be written to. The user can set the value.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
System::createDSP
|
||||
DSP::setParameter
|
||||
]
|
||||
*/
|
||||
typedef struct FMOD_DSP_PARAMETERDESC
|
||||
{
|
||||
float min; /* [w] Minimum value of the parameter (ie 100.0). */
|
||||
float max; /* [w] Maximum value of the parameter (ie 22050.0). */
|
||||
float defaultval; /* [w] Default value of parameter. */
|
||||
char name[16]; /* [w] Name of the parameter to be displayed (ie "Cutoff frequency"). */
|
||||
char label[16]; /* [w] Short string to be put next to value to denote the unit type (ie "hz"). */
|
||||
const char *description; /* [w] Description of the parameter to be displayed as a help item / tooltip for this parameter. */
|
||||
} FMOD_DSP_PARAMETERDESC;
|
||||
|
||||
|
||||
/*
|
||||
[STRUCTURE]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
When creating a DSP unit, declare one of these and provide the relevant callbacks and name for FMOD to use when it creates and uses a DSP unit of this type.
|
||||
|
||||
[REMARKS]
|
||||
Members marked with [r] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.
|
||||
Members marked with [w] mean the variable can be written to. The user can set the value.
|
||||
|
||||
There are 2 different ways to change a parameter in this architecture.
|
||||
One is to use DSP::setParameter / DSP::getParameter. This is platform independant and is dynamic, so new unknown plugins can have their parameters enumerated and used.
|
||||
The other is to use DSP::showConfigDialog. This is platform specific and requires a GUI, and will display a dialog box to configure the plugin.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
System::createDSP
|
||||
FMOD_DSP_STATE
|
||||
]
|
||||
*/
|
||||
typedef struct FMOD_DSP_DESCRIPTION
|
||||
{
|
||||
char name[32]; /* [w] Name of the unit to be displayed in the network. */
|
||||
unsigned int version; /* [w] Plugin writer's version number. */
|
||||
int channels; /* [w] Number of channels. Use 0 to process whatever number of channels is currently in the network. >0 would be mostly used if the unit is a unit that only generates sound. */
|
||||
FMOD_DSP_CREATECALLBACK create; /* [w] Create callback. This is called when DSP unit is created. Can be null. */
|
||||
FMOD_DSP_RELEASECALLBACK release; /* [w] Release callback. This is called just before the unit is freed so the user can do any cleanup needed for the unit. Can be null. */
|
||||
FMOD_DSP_RESETCALLBACK reset; /* [w] Reset callback. This is called by the user to reset any history buffers that may need resetting for a filter, when it is to be used or re-used for the first time to its initial clean state. Use to avoid clicks or artifacts. */
|
||||
FMOD_DSP_READCALLBACK read; /* [w] Read callback. Processing is done here. Can be null. */
|
||||
FMOD_DSP_SETPOSITIONCALLBACK setposition; /* [w] Set position callback. This is called if the unit wants to update its position info but not process data, or reset a cursor position internally if it is reading data from a certain source. Can be null. */
|
||||
|
||||
int numparameters; /* [w] Number of parameters used in this filter. The user finds this with DSP::getNumParameters */
|
||||
FMOD_DSP_PARAMETERDESC *paramdesc; /* [w] Variable number of parameter structures. */
|
||||
FMOD_DSP_SETPARAMCALLBACK setparameter; /* [w] This is called when the user calls DSP::setParameter. Can be null. */
|
||||
FMOD_DSP_GETPARAMCALLBACK getparameter; /* [w] This is called when the user calls DSP::getParameter. Can be null. */
|
||||
FMOD_DSP_DIALOGCALLBACK config; /* [w] This is called when the user calls DSP::showConfigDialog. Can be used to display a dialog to configure the filter. Can be null. */
|
||||
int configwidth; /* [w] Width of config dialog graphic if there is one. 0 otherwise.*/
|
||||
int configheight; /* [w] Height of config dialog graphic if there is one. 0 otherwise.*/
|
||||
void *userdata; /* [w] Optional. Specify 0 to ignore. This is user data to be attached to the DSP unit during creation. Access via DSP::getUserData. */
|
||||
} FMOD_DSP_DESCRIPTION;
|
||||
|
||||
|
||||
/*
|
||||
[STRUCTURE]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
DSP plugin structure that is passed into each callback.
|
||||
|
||||
[REMARKS]
|
||||
Members marked with [r] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.
|
||||
Members marked with [w] mean the variable can be written to. The user can set the value.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
FMOD_DSP_DESCRIPTION
|
||||
]
|
||||
*/
|
||||
struct FMOD_DSP_STATE
|
||||
{
|
||||
FMOD_DSP *instance; /* [r] Handle to the DSP hand the user created. Not to be modified. C++ users cast to FMOD::DSP to use. */
|
||||
void *plugindata; /* [w] Plugin writer created data the output author wants to attach to this object. */
|
||||
unsigned short speakermask; /* [w] Specifies which speakers the DSP effect is active on */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
===================================================================================================
|
||||
|
||||
FMOD built in effect parameters.
|
||||
Use DSP::setParameter with these enums for the 'index' parameter.
|
||||
|
||||
===================================================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_OSCILLATOR filter.
|
||||
|
||||
[REMARKS]
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_OSCILLATOR_TYPE, /* Waveform type. 0 = sine. 1 = square. 2 = sawup. 3 = sawdown. 4 = triangle. 5 = noise. */
|
||||
FMOD_DSP_OSCILLATOR_RATE /* Frequency of the sinewave in hz. 1.0 to 22000.0. Default = 220.0. */
|
||||
} FMOD_DSP_OSCILLATOR;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_LOWPASS filter.
|
||||
|
||||
[REMARKS]
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_LOWPASS_CUTOFF, /* Lowpass cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0. */
|
||||
FMOD_DSP_LOWPASS_RESONANCE /* Lowpass resonance Q value. 1.0 to 10.0. Default = 1.0. */
|
||||
} FMOD_DSP_LOWPASS;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_ITLOWPASS filter.
|
||||
This is different to the default FMOD_DSP_TYPE_ITLOWPASS filter in that it uses a different quality algorithm and is
|
||||
the filter used to produce the correct sounding playback in .IT files.
|
||||
FMOD Ex's .IT playback uses this filter.
|
||||
|
||||
[REMARKS]
|
||||
Note! This filter actually has a limited cutoff frequency below the specified maximum, due to its limited design,
|
||||
so for a more open range filter use FMOD_DSP_LOWPASS or if you don't mind not having resonance,
|
||||
FMOD_DSP_LOWPASS_SIMPLE.
|
||||
The effective maximum cutoff is about 8060hz.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_ITLOWPASS_CUTOFF, /* Lowpass cutoff frequency in hz. 1.0 to 22000.0. Default = 5000.0/ */
|
||||
FMOD_DSP_ITLOWPASS_RESONANCE /* Lowpass resonance Q value. 0.0 to 127.0. Default = 1.0. */
|
||||
} FMOD_DSP_ITLOWPASS;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_HIGHPASS filter.
|
||||
|
||||
[REMARKS]
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_HIGHPASS_CUTOFF, /* Highpass cutoff frequency in hz. 1.0 to output 22000.0. Default = 5000.0. */
|
||||
FMOD_DSP_HIGHPASS_RESONANCE /* Highpass resonance Q value. 1.0 to 10.0. Default = 1.0. */
|
||||
} FMOD_DSP_HIGHPASS;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_ECHO filter.
|
||||
|
||||
[REMARKS]
|
||||
Note. Every time the delay is changed, the plugin re-allocates the echo buffer. This means the echo will dissapear at that time while it refills its new buffer.
|
||||
Larger echo delays result in larger amounts of memory allocated.
|
||||
|
||||
'<i>maxchannels</i>' also dictates the amount of memory allocated. By default, the maxchannels value is 0. If FMOD is set to stereo, the echo unit will allocate enough memory for 2 channels. If it is 5.1, it will allocate enough memory for a 6 channel echo, etc.
|
||||
If the echo effect is only ever applied to the global mix (ie it was added with System::addDSP), then 0 is the value to set as it will be enough to handle all speaker modes.
|
||||
When the echo is added to a channel (ie Channel::addDSP) then the channel count that comes in could be anything from 1 to 8 possibly. It is only in this case where you might want to increase the channel count above the output's channel count.
|
||||
If a channel echo is set to a lower number than the sound's channel count that is coming in, it will not echo the sound.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_ECHO_DELAY, /* Echo delay in ms. 10 to 5000. Default = 500. */
|
||||
FMOD_DSP_ECHO_DECAYRATIO, /* Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay (ie simple 1 line delay). Default = 0.5. */
|
||||
FMOD_DSP_ECHO_MAXCHANNELS, /* Maximum channels supported. 0 to 16. 0 = same as fmod's default output polyphony, 1 = mono, 2 = stereo etc. See remarks for more. Default = 0. It is suggested to leave at 0! */
|
||||
FMOD_DSP_ECHO_DRYMIX, /* Volume of original signal to pass to output. 0.0 to 1.0. Default = 1.0. */
|
||||
FMOD_DSP_ECHO_WETMIX /* Volume of echo signal to pass to output. 0.0 to 1.0. Default = 1.0. */
|
||||
} FMOD_DSP_ECHO;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_DELAY filter.
|
||||
|
||||
[REMARKS]
|
||||
Note. Every time MaxDelay is changed, the plugin re-allocates the delay buffer. This means the delay will dissapear at that time while it refills its new buffer.
|
||||
A larger MaxDelay results in larger amounts of memory allocated.
|
||||
Channel delays above MaxDelay will be clipped to MaxDelay and the delay buffer will not be resized.
|
||||
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_DELAY_CH0, /* Channel #0 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH1, /* Channel #1 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH2, /* Channel #2 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH3, /* Channel #3 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH4, /* Channel #4 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH5, /* Channel #5 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH6, /* Channel #6 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH7, /* Channel #7 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH8, /* Channel #8 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH9, /* Channel #9 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH10, /* Channel #10 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH11, /* Channel #11 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH12, /* Channel #12 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH13, /* Channel #13 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH14, /* Channel #14 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_CH15, /* Channel #15 Delay in ms. 0 to 10000. Default = 0. */
|
||||
FMOD_DSP_DELAY_MAXDELAY /* Maximum delay in ms. 0 to 10000. Default = 10. */
|
||||
} FMOD_DSP_DELAY;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_FLANGE filter.
|
||||
|
||||
[REMARKS]
|
||||
Flange is an effect where the signal is played twice at the same time, and one copy slides back and forth creating a whooshing or flanging effect.
|
||||
As there are 2 copies of the same signal, by default each signal is given 50% mix, so that the total is not louder than the original unaffected signal.
|
||||
|
||||
Flange depth is a percentage of a 10ms shift from the original signal. Anything above 10ms is not considered flange because to the ear it begins to 'echo' so 10ms is the highest value possible.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_FLANGE_DRYMIX, /* Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.45. */
|
||||
FMOD_DSP_FLANGE_WETMIX, /* Volume of flange signal to pass to output. 0.0 to 1.0. Default = 0.55. */
|
||||
FMOD_DSP_FLANGE_DEPTH, /* Flange depth (percentage of 40ms delay). 0.01 to 1.0. Default = 1.0. */
|
||||
FMOD_DSP_FLANGE_RATE /* Flange speed in hz. 0.0 to 20.0. Default = 0.1. */
|
||||
} FMOD_DSP_FLANGE;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_TREMOLO filter.
|
||||
|
||||
[REMARKS]
|
||||
The tremolo effect varies the amplitude of a sound. Depending on the settings, this unit can produce a tremolo, chopper or auto-pan effect.
|
||||
|
||||
The shape of the LFO (low freq. oscillator) can morphed between sine, triangle and sawtooth waves using the FMOD_DSP_TREMOLO_SHAPE and FMOD_DSP_TREMOLO_SKEW parameters.
|
||||
FMOD_DSP_TREMOLO_DUTY and FMOD_DSP_TREMOLO_SQUARE are useful for a chopper-type effect where the first controls the on-time duration and second controls the flatness of the envelope.
|
||||
FMOD_DSP_TREMOLO_SPREAD varies the LFO phase between channels to get an auto-pan effect. This works best with a sine shape LFO.
|
||||
The LFO can be synchronized using the FMOD_DSP_TREMOLO_PHASE parameter which sets its instantaneous phase.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_TREMOLO_FREQUENCY, /* LFO frequency in Hz. 0.1 to 20. Default = 4. */
|
||||
FMOD_DSP_TREMOLO_DEPTH, /* Tremolo depth. 0 to 1. Default = 0. */
|
||||
FMOD_DSP_TREMOLO_SHAPE, /* LFO shape morph between triangle and sine. 0 to 1. Default = 0. */
|
||||
FMOD_DSP_TREMOLO_SKEW, /* Time-skewing of LFO cycle. -1 to 1. Default = 0. */
|
||||
FMOD_DSP_TREMOLO_DUTY, /* LFO on-time. 0 to 1. Default = 0.5. */
|
||||
FMOD_DSP_TREMOLO_SQUARE, /* Flatness of the LFO shape. 0 to 1. Default = 0. */
|
||||
FMOD_DSP_TREMOLO_PHASE, /* Instantaneous LFO phase. 0 to 1. Default = 0. */
|
||||
FMOD_DSP_TREMOLO_SPREAD /* Rotation / auto-pan effect. -1 to 1. Default = 0. */
|
||||
} FMOD_DSP_TREMOLO;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_DISTORTION filter.
|
||||
|
||||
[REMARKS]
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_DISTORTION_LEVEL /* Distortion value. 0.0 to 1.0. Default = 0.5. */
|
||||
} FMOD_DSP_DISTORTION;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_NORMALIZE filter.
|
||||
|
||||
[REMARKS]
|
||||
Normalize amplifies the sound based on the maximum peaks within the signal.
|
||||
For example if the maximum peaks in the signal were 50% of the bandwidth, it would scale the whole sound by 2.
|
||||
The lower threshold value makes the normalizer ignores peaks below a certain point, to avoid over-amplification if a loud signal suddenly came in, and also to avoid amplifying to maximum things like background hiss.
|
||||
|
||||
Because FMOD is a realtime audio processor, it doesn't have the luxury of knowing the peak for the whole sound (ie it can't see into the future), so it has to process data as it comes in.
|
||||
To avoid very sudden changes in volume level based on small samples of new data, fmod fades towards the desired amplification which makes for smooth gain control. The fadetime parameter can control this.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_NORMALIZE_FADETIME, /* Time to ramp the silence to full in ms. 0.0 to 20000.0. Default = 5000.0. */
|
||||
FMOD_DSP_NORMALIZE_THRESHHOLD, /* Lower volume range threshold to ignore. 0.0 to 1.0. Default = 0.1. Raise higher to stop amplification of very quiet signals. */
|
||||
FMOD_DSP_NORMALIZE_MAXAMP /* Maximum amplification allowed. 1.0 to 100000.0. Default = 20.0. 1.0 = no amplifaction, higher values allow more boost. */
|
||||
} FMOD_DSP_NORMALIZE;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_PARAMEQ filter.
|
||||
|
||||
[REMARKS]
|
||||
Parametric EQ is a bandpass filter that attenuates or amplifies a selected frequency and its neighbouring frequencies.
|
||||
|
||||
To create a multi-band EQ create multiple FMOD_DSP_TYPE_PARAMEQ units and set each unit to different frequencies, for example 1000hz, 2000hz, 4000hz, 8000hz, 16000hz with a range of 1 octave each.
|
||||
|
||||
When a frequency has its gain set to 1.0, the sound will be unaffected and represents the original signal exactly.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PARAMEQ_CENTER, /* Frequency center. 20.0 to 22000.0. Default = 8000.0. */
|
||||
FMOD_DSP_PARAMEQ_BANDWIDTH, /* Octave range around the center frequency to filter. 0.2 to 5.0. Default = 1.0. */
|
||||
FMOD_DSP_PARAMEQ_GAIN /* Frequency Gain. 0.05 to 3.0. Default = 1.0. */
|
||||
} FMOD_DSP_PARAMEQ;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_PITCHSHIFT filter.
|
||||
|
||||
[REMARKS]
|
||||
This pitch shifting unit can be used to change the pitch of a sound without speeding it up or slowing it down.
|
||||
It can also be used for time stretching or scaling, for example if the pitch was doubled, and the frequency of the sound was halved, the pitch of the sound would sound correct but it would be twice as slow.
|
||||
|
||||
<b>Warning!</b> This filter is very computationally expensive! Similar to a vocoder, it requires several overlapping FFT and IFFT's to produce smooth output, and can require around 440mhz for 1 stereo 48khz signal using the default settings.
|
||||
Reducing the signal to mono will half the cpu usage.
|
||||
Reducing this will lower audio quality, but what settings to use are largely dependant on the sound being played. A noisy polyphonic signal will need higher fft size compared to a speaking voice for example.
|
||||
|
||||
This pitch shifter is based on the pitch shifter code at http://www.dspdimension.com, written by Stephan M. Bernsee.
|
||||
The original code is COPYRIGHT 1999-2003 Stephan M. Bernsee <smb@dspdimension.com>.
|
||||
|
||||
'<i>maxchannels</i>' dictates the amount of memory allocated. By default, the maxchannels value is 0. If FMOD is set to stereo, the pitch shift unit will allocate enough memory for 2 channels. If it is 5.1, it will allocate enough memory for a 6 channel pitch shift, etc.
|
||||
If the pitch shift effect is only ever applied to the global mix (ie it was added with System::addDSP), then 0 is the value to set as it will be enough to handle all speaker modes.
|
||||
When the pitch shift is added to a channel (ie Channel::addDSP) then the channel count that comes in could be anything from 1 to 8 possibly. It is only in this case where you might want to increase the channel count above the output's channel count.
|
||||
If a channel pitch shift is set to a lower number than the sound's channel count that is coming in, it will not pitch shift the sound.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PITCHSHIFT_PITCH, /* Pitch value. 0.5 to 2.0. Default = 1.0. 0.5 = one octave down, 2.0 = one octave up. 1.0 does not change the pitch. */
|
||||
FMOD_DSP_PITCHSHIFT_FFTSIZE, /* FFT window size. 256, 512, 1024, 2048, 4096. Default = 1024. Increase this to reduce 'smearing'. This effect is a warbling sound similar to when an mp3 is encoded at very low bitrates. */
|
||||
FMOD_DSP_PITCHSHIFT_OVERLAP, /* Removed. Do not use. FMOD now uses 4 overlaps and cannot be changed. */
|
||||
FMOD_DSP_PITCHSHIFT_MAXCHANNELS /* Maximum channels supported. 0 to 16. 0 = same as fmod's default output polyphony, 1 = mono, 2 = stereo etc. See remarks for more. Default = 0. It is suggested to leave at 0! */
|
||||
} FMOD_DSP_PITCHSHIFT;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_CHORUS filter.
|
||||
|
||||
[REMARKS]
|
||||
Chrous is an effect where the sound is more 'spacious' due to 1 to 3 versions of the sound being played along side the original signal but with the pitch of each copy modulating on a sine wave.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_CHORUS_DRYMIX, /* Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5. */
|
||||
FMOD_DSP_CHORUS_WETMIX1, /* Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5. */
|
||||
FMOD_DSP_CHORUS_WETMIX2, /* Volume of 2nd chorus tap. This tap is 90 degrees out of phase of the first tap. 0.0 to 1.0. Default = 0.5. */
|
||||
FMOD_DSP_CHORUS_WETMIX3, /* Volume of 3rd chorus tap. This tap is 90 degrees out of phase of the second tap. 0.0 to 1.0. Default = 0.5. */
|
||||
FMOD_DSP_CHORUS_DELAY, /* Chorus delay in ms. 0.1 to 100.0. Default = 40.0 ms. */
|
||||
FMOD_DSP_CHORUS_RATE, /* Chorus modulation rate in hz. 0.0 to 20.0. Default = 0.8 hz. */
|
||||
FMOD_DSP_CHORUS_DEPTH /* Chorus modulation depth. 0.0 to 1.0. Default = 0.03. */
|
||||
} FMOD_DSP_CHORUS;
|
||||
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_ITECHO filter.
|
||||
This is effectively a software based echo filter that emulates the DirectX DMO echo effect. Impulse tracker files can support this, and FMOD will produce the effect on ANY platform, not just those that support DirectX effects!
|
||||
|
||||
[REMARKS]
|
||||
Note. Every time the delay is changed, the plugin re-allocates the echo buffer. This means the echo will dissapear at that time while it refills its new buffer.
|
||||
Larger echo delays result in larger amounts of memory allocated.
|
||||
|
||||
As this is a stereo filter made mainly for IT playback, it is targeted for stereo signals.
|
||||
With mono signals only the FMOD_DSP_ITECHO_LEFTDELAY is used.
|
||||
For multichannel signals (>2) there will be no echo on those channels.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::SetParameter
|
||||
DSP::GetParameter
|
||||
FMOD_DSP_TYPE
|
||||
System::addDSP
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_ITECHO_WETDRYMIX, /* Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from 0.0 through 100.0 (all wet). The default value is 50. */
|
||||
FMOD_DSP_ITECHO_FEEDBACK, /* Percentage of output fed back into input, in the range from 0.0 through 100.0. The default value is 50. */
|
||||
FMOD_DSP_ITECHO_LEFTDELAY, /* Delay for left channel, in milliseconds, in the range from 1.0 through 2000.0. The default value is 500 ms. */
|
||||
FMOD_DSP_ITECHO_RIGHTDELAY, /* Delay for right channel, in milliseconds, in the range from 1.0 through 2000.0. The default value is 500 ms. */
|
||||
FMOD_DSP_ITECHO_PANDELAY /* Value that specifies whether to swap left and right delays with each successive echo. The default value is zero, meaning no swap. Possible values are defined as 0.0 (equivalent to FALSE) and 1.0 (equivalent to TRUE). CURRENTLY NOT SUPPORTED. */
|
||||
} FMOD_DSP_ITECHO;
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_COMPRESSOR unit.
|
||||
This is a simple linked multichannel software limiter that is uniform across the whole spectrum.
|
||||
|
||||
[REMARKS]
|
||||
The limiter is not guaranteed to catch every peak above the threshold level,
|
||||
because it cannot apply gain reduction instantaneously - the time delay is
|
||||
determined by the attack time. However setting the attack time too short will
|
||||
distort the sound, so it is a compromise. High level peaks can be avoided by
|
||||
using a short attack time - but not too short, and setting the threshold a few
|
||||
decibels below the critical level.
|
||||
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::SetParameter
|
||||
DSP::GetParameter
|
||||
FMOD_DSP_TYPE
|
||||
System::addDSP
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_COMPRESSOR_THRESHOLD, /* Threshold level (dB) in the range from -60 through 0. The default value is 0. */
|
||||
FMOD_DSP_COMPRESSOR_ATTACK, /* Gain reduction attack time (milliseconds), in the range from 10 through 200. The default value is 50. */
|
||||
FMOD_DSP_COMPRESSOR_RELEASE, /* Gain reduction release time (milliseconds), in the range from 20 through 1000. The default value is 50. */
|
||||
FMOD_DSP_COMPRESSOR_GAINMAKEUP /* Make-up gain (dB) applied after limiting, in the range from 0 through 30. The default value is 0. */
|
||||
} FMOD_DSP_COMPRESSOR;
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_SFXREVERB unit.
|
||||
|
||||
[REMARKS]
|
||||
This is a high quality I3DL2 based reverb.
|
||||
On top of the I3DL2 property set, "Dry Level" is also included to allow the dry mix to be changed.
|
||||
|
||||
These properties can be set with presets in FMOD_REVERB_PRESETS.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::SetParameter
|
||||
DSP::GetParameter
|
||||
FMOD_DSP_TYPE
|
||||
System::addDSP
|
||||
FMOD_REVERB_PRESETS
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_SFXREVERB_DRYLEVEL, /* Dry Level : Mix level of dry signal in output in mB. Ranges from -10000.0 to 0.0. Default is 0. */
|
||||
FMOD_DSP_SFXREVERB_ROOM, /* Room : Room effect level at low frequencies in mB. Ranges from -10000.0 to 0.0. Default is -10000.0. */
|
||||
FMOD_DSP_SFXREVERB_ROOMHF, /* Room HF : Room effect high-frequency level re. low frequency level in mB. Ranges from -10000.0 to 0.0. Default is 0.0. */
|
||||
FMOD_DSP_SFXREVERB_DECAYTIME, /* Decay Time : Reverberation decay time at low-frequencies in seconds. Ranges from 0.1 to 20.0. Default is 1.0. */
|
||||
FMOD_DSP_SFXREVERB_DECAYHFRATIO, /* Decay HF Ratio : High-frequency to low-frequency decay time ratio. Ranges from 0.1 to 2.0. Default is 0.5. */
|
||||
FMOD_DSP_SFXREVERB_REFLECTIONSLEVEL, /* Reflections : Early reflections level relative to room effect in mB. Ranges from -10000.0 to 1000.0. Default is -10000.0. */
|
||||
FMOD_DSP_SFXREVERB_REFLECTIONSDELAY, /* Reflect Delay : Delay time of first reflection in seconds. Ranges from 0.0 to 0.3. Default is 0.02. */
|
||||
FMOD_DSP_SFXREVERB_REVERBLEVEL, /* Reverb : Late reverberation level relative to room effect in mB. Ranges from -10000.0 to 2000.0. Default is 0.0. */
|
||||
FMOD_DSP_SFXREVERB_REVERBDELAY, /* Reverb Delay : Late reverberation delay time relative to first reflection in seconds. Ranges from 0.0 to 0.1. Default is 0.04. */
|
||||
FMOD_DSP_SFXREVERB_DIFFUSION, /* Diffusion : Reverberation diffusion (echo density) in percent. Ranges from 0.0 to 100.0. Default is 100.0. */
|
||||
FMOD_DSP_SFXREVERB_DENSITY, /* Density : Reverberation density (modal density) in percent. Ranges from 0.0 to 100.0. Default is 100.0. */
|
||||
FMOD_DSP_SFXREVERB_HFREFERENCE, /* HF Reference : Reference high frequency in Hz. Ranges from 20.0 to 20000.0. Default is 5000.0. */
|
||||
FMOD_DSP_SFXREVERB_ROOMLF, /* Room LF : Room effect low-frequency level in mB. Ranges from -10000.0 to 0.0. Default is 0.0. */
|
||||
FMOD_DSP_SFXREVERB_LFREFERENCE /* LF Reference : Reference low-frequency in Hz. Ranges from 20.0 to 1000.0. Default is 250.0. */
|
||||
} FMOD_DSP_SFXREVERB;
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_LOWPASS_SIMPLE filter.
|
||||
This is a very simple low pass filter, based on two single-pole RC time-constant modules.
|
||||
The emphasis is on speed rather than accuracy, so this should not be used for task requiring critical filtering.
|
||||
|
||||
[REMARKS]
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_LOWPASS_SIMPLE_CUTOFF /* Lowpass cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0 */
|
||||
} FMOD_DSP_LOWPASS_SIMPLE;
|
||||
|
||||
/*
|
||||
[ENUM]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Parameter types for the FMOD_DSP_TYPE_HIGHPASS_SIMPLE filter.
|
||||
This is a very simple single-order high pass filter.
|
||||
The emphasis is on speed rather than accuracy, so this should not be used for task requiring critical filtering.
|
||||
|
||||
[REMARKS]
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
DSP::setParameter
|
||||
DSP::getParameter
|
||||
FMOD_DSP_TYPE
|
||||
]
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_HIGHPASS_SIMPLE_CUTOFF /* Highpass cutoff frequency in hz. 10.0 to 22000.0. Default = 1000.0 */
|
||||
} FMOD_DSP_HIGHPASS_SIMPLE;
|
||||
|
||||
#endif
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
|
||||
/* ============================================================================================== */
|
||||
/* FMOD Ex - Error string header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2011. */
|
||||
/* */
|
||||
/* Use this header if you want to store or display a string version / english explanation of */
|
||||
/* the FMOD error codes. */
|
||||
/* */
|
||||
/* ============================================================================================== */
|
||||
|
||||
#ifndef _FMOD_ERRORS_H
|
||||
#define _FMOD_ERRORS_H
|
||||
|
||||
#include "fmod.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
static const char *FMOD_ErrorString(FMOD_RESULT errcode) __attribute__((unused));
|
||||
#endif
|
||||
|
||||
static const char *FMOD_ErrorString(FMOD_RESULT errcode)
|
||||
{
|
||||
switch (errcode)
|
||||
{
|
||||
case FMOD_ERR_ALREADYLOCKED: return "Tried to call lock a second time before unlock was called. ";
|
||||
case FMOD_ERR_BADCOMMAND: return "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound). ";
|
||||
case FMOD_ERR_CDDA_DRIVERS: return "Neither NTSCSI nor ASPI could be initialised. ";
|
||||
case FMOD_ERR_CDDA_INIT: return "An error occurred while initialising the CDDA subsystem. ";
|
||||
case FMOD_ERR_CDDA_INVALID_DEVICE: return "Couldn't find the specified device. ";
|
||||
case FMOD_ERR_CDDA_NOAUDIO: return "No audio tracks on the specified disc. ";
|
||||
case FMOD_ERR_CDDA_NODEVICES: return "No CD/DVD devices were found. ";
|
||||
case FMOD_ERR_CDDA_NODISC: return "No disc present in the specified drive. ";
|
||||
case FMOD_ERR_CDDA_READ: return "A CDDA read error occurred. ";
|
||||
case FMOD_ERR_CHANNEL_ALLOC: return "Error trying to allocate a channel. ";
|
||||
case FMOD_ERR_CHANNEL_STOLEN: return "The specified channel has been reused to play another sound. ";
|
||||
case FMOD_ERR_COM: return "A Win32 COM related error occured. COM failed to initialize or a QueryInterface failed meaning a Windows codec or driver was not installed properly. ";
|
||||
case FMOD_ERR_DMA: return "DMA Failure. See debug output for more information. ";
|
||||
case FMOD_ERR_DSP_CONNECTION: return "DSP connection error. Connection possibly caused a cyclic dependancy. Or tried to connect a tree too many units deep (more than 128). ";
|
||||
case FMOD_ERR_DSP_FORMAT: return "DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format. ";
|
||||
case FMOD_ERR_DSP_NOTFOUND: return "DSP connection error. Couldn't find the DSP unit specified. ";
|
||||
case FMOD_ERR_DSP_RUNNING: return "DSP error. Cannot perform this operation while the network is in the middle of running. This will most likely happen if a connection or disconnection is attempted in a DSP callback. ";
|
||||
case FMOD_ERR_DSP_TOOMANYCONNECTIONS: return "DSP connection error. The unit being connected to or disconnected should only have 1 input or output. ";
|
||||
case FMOD_ERR_EVENT_ALREADY_LOADED: return "The specified project or bank has already been loaded. Having multiple copies of the same project loaded simultaneously is forbidden. ";
|
||||
case FMOD_ERR_EVENT_FAILED: return "An Event failed to be retrieved, most likely due to 'just fail' being specified as the max playbacks behavior. ";
|
||||
case FMOD_ERR_EVENT_GUIDCONFLICT: return "An event with the same GUID already exists. ";
|
||||
case FMOD_ERR_EVENT_INFOONLY: return "Can't execute this command on an EVENT_INFOONLY event. ";
|
||||
case FMOD_ERR_EVENT_INTERNAL: return "An error occured that wasn't supposed to. See debug log for reason. ";
|
||||
case FMOD_ERR_EVENT_MAXSTREAMS: return "Event failed because 'Max streams' was hit when FMOD_EVENT_INIT_FAIL_ON_MAXSTREAMS was specified. ";
|
||||
case FMOD_ERR_EVENT_MISMATCH: return "FSB mismatches the FEV it was compiled with, the stream/sample mode it was meant to be created with was different, or the FEV was built for a different platform. ";
|
||||
case FMOD_ERR_EVENT_NAMECONFLICT: return "A category with the same name already exists. ";
|
||||
case FMOD_ERR_EVENT_NEEDSSIMPLE: return "Tried to call a function on a complex event that's only supported by simple events. ";
|
||||
case FMOD_ERR_EVENT_NOTFOUND: return "The requested event, event group, event category or event property could not be found. ";
|
||||
case FMOD_ERR_FILE_BAD: return "Error loading file. ";
|
||||
case FMOD_ERR_FILE_COULDNOTSEEK: return "Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format. ";
|
||||
case FMOD_ERR_FILE_DISKEJECTED: return "Media was ejected while reading. ";
|
||||
case FMOD_ERR_FILE_EOF: return "End of file unexpectedly reached while trying to read essential data (truncated data?). ";
|
||||
case FMOD_ERR_FILE_NOTFOUND: return "File not found. ";
|
||||
case FMOD_ERR_FILE_UNWANTED: return "Unwanted file access occured. ";
|
||||
case FMOD_ERR_FORMAT: return "Unsupported file or audio format. ";
|
||||
case FMOD_ERR_HTTP: return "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere. ";
|
||||
case FMOD_ERR_HTTP_ACCESS: return "The specified resource requires authentication or is forbidden. ";
|
||||
case FMOD_ERR_HTTP_PROXY_AUTH: return "Proxy authentication is required to access the specified resource. ";
|
||||
case FMOD_ERR_HTTP_SERVER_ERROR: return "A HTTP server error occurred. ";
|
||||
case FMOD_ERR_HTTP_TIMEOUT: return "The HTTP request timed out. ";
|
||||
case FMOD_ERR_INITIALIZATION: return "FMOD was not initialized correctly to support this function. ";
|
||||
case FMOD_ERR_INITIALIZED: return "Cannot call this command after System::init. ";
|
||||
case FMOD_ERR_INTERNAL: return "An error occured that wasn't supposed to. Contact support. ";
|
||||
case FMOD_ERR_INVALID_ADDRESS: return "On Xbox 360, this memory address passed to FMOD must be physical, (ie allocated with XPhysicalAlloc.) ";
|
||||
case FMOD_ERR_INVALID_FLOAT: return "Value passed in was a NaN, Inf or denormalized float. ";
|
||||
case FMOD_ERR_INVALID_HANDLE: return "An invalid object handle was used. ";
|
||||
case FMOD_ERR_INVALID_PARAM: return "An invalid parameter was passed to this function. ";
|
||||
case FMOD_ERR_INVALID_POSITION: return "An invalid seek position was passed to this function. ";
|
||||
case FMOD_ERR_INVALID_SPEAKER: return "An invalid speaker was passed to this function based on the current speaker mode. ";
|
||||
case FMOD_ERR_INVALID_SYNCPOINT: return "The syncpoint did not come from this sound handle. ";
|
||||
case FMOD_ERR_INVALID_VECTOR: return "The vectors passed in are not unit length, or perpendicular. ";
|
||||
case FMOD_ERR_MAXAUDIBLE: return "Reached maximum audible playback count for this sound's soundgroup. ";
|
||||
case FMOD_ERR_MEMORY: return "Not enough memory or resources. ";
|
||||
case FMOD_ERR_MEMORY_CANTPOINT: return "Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used. ";
|
||||
case FMOD_ERR_MEMORY_SRAM: return "Not enough memory or resources on console sound ram. ";
|
||||
case FMOD_ERR_MUSIC_NOCALLBACK: return "The music callback is required, but it has not been set. ";
|
||||
case FMOD_ERR_MUSIC_NOTFOUND: return "The requested music entity could not be found. ";
|
||||
case FMOD_ERR_MUSIC_UNINITIALIZED: return "Music system is not initialized probably because no music data is loaded. ";
|
||||
case FMOD_ERR_NEEDS2D: return "Tried to call a command on a 3d sound when the command was meant for 2d sound. ";
|
||||
case FMOD_ERR_NEEDS3D: return "Tried to call a command on a 2d sound when the command was meant for 3d sound. ";
|
||||
case FMOD_ERR_NEEDSHARDWARE: return "Tried to use a feature that requires hardware support. (ie trying to play a GCADPCM compressed sound in software on Wii). ";
|
||||
case FMOD_ERR_NEEDSSOFTWARE: return "Tried to use a feature that requires the software engine. Software engine has either been turned off, or command was executed on a hardware channel which does not support this feature. ";
|
||||
case FMOD_ERR_NET_CONNECT: return "Couldn't connect to the specified host. ";
|
||||
case FMOD_ERR_NET_SOCKET_ERROR: return "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere. ";
|
||||
case FMOD_ERR_NET_URL: return "The specified URL couldn't be resolved. ";
|
||||
case FMOD_ERR_NET_WOULD_BLOCK: return "Operation on a non-blocking socket could not complete immediately. ";
|
||||
case FMOD_ERR_NOTREADY: return "Operation could not be performed because specified sound/DSP connection is not ready. ";
|
||||
case FMOD_ERR_OUTPUT_ALLOCATED: return "Error initializing output device, but more specifically, the output device is already in use and cannot be reused. ";
|
||||
case FMOD_ERR_OUTPUT_CREATEBUFFER: return "Error creating hardware sound buffer. ";
|
||||
case FMOD_ERR_OUTPUT_DRIVERCALL: return "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted. ";
|
||||
case FMOD_ERR_OUTPUT_ENUMERATION: return "Error enumerating the available driver list. List may be inconsistent due to a recent device addition or removal. ";
|
||||
case FMOD_ERR_OUTPUT_FORMAT: return "Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output). ";
|
||||
case FMOD_ERR_OUTPUT_INIT: return "Error initializing output device. ";
|
||||
case FMOD_ERR_OUTPUT_NOHARDWARE: return "FMOD_HARDWARE was specified but the sound card does not have the resources necessary to play it. ";
|
||||
case FMOD_ERR_OUTPUT_NOSOFTWARE: return "Attempted to create a software sound but no software channels were specified in System::init. ";
|
||||
case FMOD_ERR_PAN: return "Panning only works with mono or stereo sound sources. ";
|
||||
case FMOD_ERR_PLUGIN: return "An unspecified error has been returned from a 3rd party plugin. ";
|
||||
case FMOD_ERR_PLUGIN_INSTANCES: return "The number of allowed instances of a plugin has been exceeded. ";
|
||||
case FMOD_ERR_PLUGIN_MISSING: return "A requested output, dsp unit type or codec was not available. ";
|
||||
case FMOD_ERR_PLUGIN_RESOURCE: return "A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback or other DLLs that it needs to load) ";
|
||||
case FMOD_ERR_PRELOADED: return "The specified sound is still in use by the event system, call EventSystem::unloadFSB before trying to release it. ";
|
||||
case FMOD_ERR_PROGRAMMERSOUND: return "The specified sound is still in use by the event system, wait for the event which is using it finish with it. ";
|
||||
case FMOD_ERR_RECORD: return "An error occured trying to initialize the recording device. ";
|
||||
case FMOD_ERR_REVERB_INSTANCE: return "Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesnt exist. ";
|
||||
case FMOD_ERR_SUBSOUNDS: return "The error occured because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound, or a parent sound was played without setting up a sentence first. ";
|
||||
case FMOD_ERR_SUBSOUND_ALLOCATED: return "This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first. ";
|
||||
case FMOD_ERR_SUBSOUND_CANTMOVE: return "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file. ";
|
||||
case FMOD_ERR_SUBSOUND_MODE: return "The subsound's mode bits do not match with the parent sound's mode bits. See documentation for function that it was called with. ";
|
||||
case FMOD_ERR_TAGNOTFOUND: return "The specified tag could not be found or there are no tags. ";
|
||||
case FMOD_ERR_TOOMANYCHANNELS: return "The sound created exceeds the allowable input channel count. This can be increased using the maxinputchannels parameter in System::setSoftwareFormat. ";
|
||||
case FMOD_ERR_UNIMPLEMENTED: return "Something in FMOD hasn't been implemented when it should be! contact support! ";
|
||||
case FMOD_ERR_UNINITIALIZED: return "This command failed because System::init or System::setDriver was not called. ";
|
||||
case FMOD_ERR_UNSUPPORTED: return "A command issued was not supported by this object. Possibly a plugin without certain callbacks specified. ";
|
||||
case FMOD_ERR_UPDATE: return "An error caused by System::update occured. ";
|
||||
case FMOD_ERR_VERSION: return "The version number of this file format is not supported. ";
|
||||
case FMOD_OK: return "No errors.";
|
||||
default : return "Unknown error.";
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,201 +0,0 @@
|
|||
/* ============================================================================================= */
|
||||
/* FMOD Ex - Memory info header file. Copyright (c), Firelight Technologies Pty, Ltd. 2008-2011. */
|
||||
/* */
|
||||
/* Use this header if you are interested in getting detailed information on FMOD's memory */
|
||||
/* usage. See the documentation for more details. */
|
||||
/* */
|
||||
/* ============================================================================================= */
|
||||
|
||||
#ifndef _FMOD_MEMORYINFO_H
|
||||
#define _FMOD_MEMORYINFO_H
|
||||
|
||||
/*
|
||||
[STRUCTURE]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Structure to be filled with detailed memory usage information of an FMOD object
|
||||
|
||||
[REMARKS]
|
||||
Every public FMOD class has a getMemoryInfo function which can be used to get detailed information on what memory resources are associated with the object in question.
|
||||
On return from getMemoryInfo, each member of this structure will hold the amount of memory used for its type in bytes.
|
||||
|
||||
Members marked with [in] mean the user sets the value before passing it to the function.
|
||||
Members marked with [out] mean FMOD sets the value to be used after the function exits.
|
||||
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
System::getMemoryInfo
|
||||
EventSystem::getMemoryInfo
|
||||
FMOD_MEMBITS
|
||||
FMOD_EVENT_MEMBITS
|
||||
]
|
||||
*/
|
||||
typedef struct FMOD_MEMORY_USAGE_DETAILS
|
||||
{
|
||||
unsigned int other; /* [out] Memory not accounted for by other types */
|
||||
unsigned int string; /* [out] String data */
|
||||
unsigned int system; /* [out] System object and various internals */
|
||||
unsigned int plugins; /* [out] Plugin objects and internals */
|
||||
unsigned int output; /* [out] Output module object and internals */
|
||||
unsigned int channel; /* [out] Channel related memory */
|
||||
unsigned int channelgroup; /* [out] ChannelGroup objects and internals */
|
||||
unsigned int codec; /* [out] Codecs allocated for streaming */
|
||||
unsigned int file; /* [out] File buffers and structures */
|
||||
unsigned int sound; /* [out] Sound objects and internals */
|
||||
unsigned int secondaryram; /* [out] Sound data stored in secondary RAM */
|
||||
unsigned int soundgroup; /* [out] SoundGroup objects and internals */
|
||||
unsigned int streambuffer; /* [out] Stream buffer memory */
|
||||
unsigned int dspconnection; /* [out] DSPConnection objects and internals */
|
||||
unsigned int dsp; /* [out] DSP implementation objects */
|
||||
unsigned int dspcodec; /* [out] Realtime file format decoding DSP objects */
|
||||
unsigned int profile; /* [out] Profiler memory footprint. */
|
||||
unsigned int recordbuffer; /* [out] Buffer used to store recorded data from microphone */
|
||||
unsigned int reverb; /* [out] Reverb implementation objects */
|
||||
unsigned int reverbchannelprops; /* [out] Reverb channel properties structs */
|
||||
unsigned int geometry; /* [out] Geometry objects and internals */
|
||||
unsigned int syncpoint; /* [out] Sync point memory. */
|
||||
unsigned int eventsystem; /* [out] EventSystem and various internals */
|
||||
unsigned int musicsystem; /* [out] MusicSystem and various internals */
|
||||
unsigned int fev; /* [out] Definition of objects contained in all loaded projects e.g. events, groups, categories */
|
||||
unsigned int memoryfsb; /* [out] Data loaded with preloadFSB */
|
||||
unsigned int eventproject; /* [out] EventProject objects and internals */
|
||||
unsigned int eventgroupi; /* [out] EventGroup objects and internals */
|
||||
unsigned int soundbankclass; /* [out] Objects used to manage wave banks */
|
||||
unsigned int soundbanklist; /* [out] Data used to manage lists of wave bank usage */
|
||||
unsigned int streaminstance; /* [out] Stream objects and internals */
|
||||
unsigned int sounddefclass; /* [out] Sound definition objects */
|
||||
unsigned int sounddefdefclass; /* [out] Sound definition static data objects */
|
||||
unsigned int sounddefpool; /* [out] Sound definition pool data */
|
||||
unsigned int reverbdef; /* [out] Reverb definition objects */
|
||||
unsigned int eventreverb; /* [out] Reverb objects */
|
||||
unsigned int userproperty; /* [out] User property objects */
|
||||
unsigned int eventinstance; /* [out] Event instance base objects */
|
||||
unsigned int eventinstance_complex; /* [out] Complex event instance objects */
|
||||
unsigned int eventinstance_simple; /* [out] Simple event instance objects */
|
||||
unsigned int eventinstance_layer; /* [out] Event layer instance objects */
|
||||
unsigned int eventinstance_sound; /* [out] Event sound instance objects */
|
||||
unsigned int eventenvelope; /* [out] Event envelope objects */
|
||||
unsigned int eventenvelopedef; /* [out] Event envelope definition objects */
|
||||
unsigned int eventparameter; /* [out] Event parameter objects */
|
||||
unsigned int eventcategory; /* [out] Event category objects */
|
||||
unsigned int eventenvelopepoint; /* [out] Event envelope point objects */
|
||||
unsigned int eventinstancepool; /* [out] Event instance pool memory */
|
||||
} FMOD_MEMORY_USAGE_DETAILS;
|
||||
|
||||
|
||||
/*
|
||||
[DEFINE]
|
||||
[
|
||||
[NAME]
|
||||
FMOD_MEMBITS
|
||||
|
||||
[DESCRIPTION]
|
||||
Bitfield used to request specific memory usage information from the getMemoryInfo function of every public FMOD Ex class.
|
||||
Use with the "memorybits" parameter of getMemoryInfo to get information on FMOD Ex memory usage.
|
||||
|
||||
[REMARKS]
|
||||
Every public FMOD class has a getMemoryInfo function which can be used to get detailed information on what memory resources are associated with the object in question.
|
||||
The FMOD_MEMBITS defines can be OR'd together to specify precisely what memory usage you'd like to get information on. See System::getMemoryInfo for an example.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
FMOD_EVENT_MEMBITS
|
||||
System::getMemoryInfo
|
||||
]
|
||||
*/
|
||||
#define FMOD_MEMBITS_OTHER 0x00000001 /* Memory not accounted for by other types */
|
||||
#define FMOD_MEMBITS_STRING 0x00000002 /* String data */
|
||||
|
||||
#define FMOD_MEMBITS_SYSTEM 0x00000004 /* System object and various internals */
|
||||
#define FMOD_MEMBITS_PLUGINS 0x00000008 /* Plugin objects and internals */
|
||||
#define FMOD_MEMBITS_OUTPUT 0x00000010 /* Output module object and internals */
|
||||
#define FMOD_MEMBITS_CHANNEL 0x00000020 /* Channel related memory */
|
||||
#define FMOD_MEMBITS_CHANNELGROUP 0x00000040 /* ChannelGroup objects and internals */
|
||||
#define FMOD_MEMBITS_CODEC 0x00000080 /* Codecs allocated for streaming */
|
||||
#define FMOD_MEMBITS_FILE 0x00000100 /* Codecs allocated for streaming */
|
||||
#define FMOD_MEMBITS_SOUND 0x00000200 /* Sound objects and internals */
|
||||
#define FMOD_MEMBITS_SOUND_SECONDARYRAM 0x00000400 /* Sound data stored in secondary RAM */
|
||||
#define FMOD_MEMBITS_SOUNDGROUP 0x00000800 /* SoundGroup objects and internals */
|
||||
#define FMOD_MEMBITS_STREAMBUFFER 0x00001000 /* Stream buffer memory */
|
||||
#define FMOD_MEMBITS_DSPCONNECTION 0x00002000 /* DSPConnection objects and internals */
|
||||
#define FMOD_MEMBITS_DSP 0x00004000 /* DSP implementation objects */
|
||||
#define FMOD_MEMBITS_DSPCODEC 0x00008000 /* Realtime file format decoding DSP objects */
|
||||
#define FMOD_MEMBITS_PROFILE 0x00010000 /* Profiler memory footprint. */
|
||||
#define FMOD_MEMBITS_RECORDBUFFER 0x00020000 /* Buffer used to store recorded data from microphone */
|
||||
#define FMOD_MEMBITS_REVERB 0x00040000 /* Reverb implementation objects */
|
||||
#define FMOD_MEMBITS_REVERBCHANNELPROPS 0x00080000 /* Reverb channel properties structs */
|
||||
#define FMOD_MEMBITS_GEOMETRY 0x00100000 /* Geometry objects and internals */
|
||||
#define FMOD_MEMBITS_SYNCPOINT 0x00200000 /* Sync point memory. */
|
||||
#define FMOD_MEMBITS_ALL 0xffffffff /* All memory used by FMOD Ex */
|
||||
/* [DEFINE_END] */
|
||||
|
||||
|
||||
/*
|
||||
[DEFINE]
|
||||
[
|
||||
[NAME]
|
||||
FMOD_EVENT_MEMBITS
|
||||
|
||||
[DESCRIPTION]
|
||||
Bitfield used to request specific memory usage information from the getMemoryInfo function of every public FMOD Event System class.
|
||||
Use with the "event_memorybits" parameter of getMemoryInfo to get information on FMOD Event System memory usage.
|
||||
|
||||
[REMARKS]
|
||||
Every public FMOD Event System class has a getMemoryInfo function which can be used to get detailed information on what memory resources are associated with the object in question.
|
||||
The FMOD_EVENT_MEMBITS defines can be OR'd together to specify precisely what memory usage you'd like to get information on. See EventSystem::getMemoryInfo for an example.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
FMOD_MEMBITS
|
||||
System::getMemoryInfo
|
||||
]
|
||||
*/
|
||||
#define FMOD_EVENT_MEMBITS_EVENTSYSTEM 0x00000001 /* EventSystem and various internals */
|
||||
#define FMOD_EVENT_MEMBITS_MUSICSYSTEM 0x00000002 /* MusicSystem and various internals */
|
||||
#define FMOD_EVENT_MEMBITS_FEV 0x00000004 /* Definition of objects contained in all loaded projects e.g. events, groups, categories */
|
||||
#define FMOD_EVENT_MEMBITS_MEMORYFSB 0x00000008 /* Data loaded with preloadFSB */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTPROJECT 0x00000010 /* EventProject objects and internals */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTGROUPI 0x00000020 /* EventGroup objects and internals */
|
||||
#define FMOD_EVENT_MEMBITS_SOUNDBANKCLASS 0x00000040 /* Objects used to manage wave banks */
|
||||
#define FMOD_EVENT_MEMBITS_SOUNDBANKLIST 0x00000080 /* Data used to manage lists of wave bank usage */
|
||||
#define FMOD_EVENT_MEMBITS_STREAMINSTANCE 0x00000100 /* Stream objects and internals */
|
||||
#define FMOD_EVENT_MEMBITS_SOUNDDEFCLASS 0x00000200 /* Sound definition objects */
|
||||
#define FMOD_EVENT_MEMBITS_SOUNDDEFDEFCLASS 0x00000400 /* Sound definition static data objects */
|
||||
#define FMOD_EVENT_MEMBITS_SOUNDDEFPOOL 0x00000800 /* Sound definition pool data */
|
||||
#define FMOD_EVENT_MEMBITS_REVERBDEF 0x00001000 /* Reverb definition objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTREVERB 0x00002000 /* Reverb objects */
|
||||
#define FMOD_EVENT_MEMBITS_USERPROPERTY 0x00004000 /* User property objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTINSTANCE 0x00008000 /* Event instance base objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTINSTANCE_COMPLEX 0x00010000 /* Complex event instance objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTINSTANCE_SIMPLE 0x00020000 /* Simple event instance objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTINSTANCE_LAYER 0x00040000 /* Event layer instance objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTINSTANCE_SOUND 0x00080000 /* Event sound instance objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTENVELOPE 0x00100000 /* Event envelope objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTENVELOPEDEF 0x00200000 /* Event envelope definition objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTPARAMETER 0x00400000 /* Event parameter objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTCATEGORY 0x00800000 /* Event category objects */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTENVELOPEPOINT 0x01000000 /* Event envelope point object+s */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTINSTANCEPOOL 0x02000000 /* Event instance pool data */
|
||||
#define FMOD_EVENT_MEMBITS_ALL 0xffffffff /* All memory used by FMOD Event System */
|
||||
|
||||
/* All event instance memory */
|
||||
#define FMOD_EVENT_MEMBITS_EVENTINSTANCE_GROUP (FMOD_EVENT_MEMBITS_EVENTINSTANCE | \
|
||||
FMOD_EVENT_MEMBITS_EVENTINSTANCE_COMPLEX | \
|
||||
FMOD_EVENT_MEMBITS_EVENTINSTANCE_SIMPLE | \
|
||||
FMOD_EVENT_MEMBITS_EVENTINSTANCE_LAYER | \
|
||||
FMOD_EVENT_MEMBITS_EVENTINSTANCE_SOUND)
|
||||
|
||||
/* All sound definition memory */
|
||||
#define FMOD_EVENT_MEMBITS_SOUNDDEF_GROUP (FMOD_EVENT_MEMBITS_SOUNDDEFCLASS | \
|
||||
FMOD_EVENT_MEMBITS_SOUNDDEFDEFCLASS | \
|
||||
FMOD_EVENT_MEMBITS_SOUNDDEFPOOL)
|
||||
/* [DEFINE_END] */
|
||||
|
||||
#endif
|
|
@ -1,93 +0,0 @@
|
|||
/* ==================================================================================================== */
|
||||
/* FMOD Ex - output development header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2011. */
|
||||
/* */
|
||||
/* Use this header if you are wanting to develop your own output plugin to use with */
|
||||
/* FMOD's output system. With this header you can make your own output plugin that FMOD */
|
||||
/* can register and use. See the documentation and examples on how to make a working plugin. */
|
||||
/* */
|
||||
/* ==================================================================================================== */
|
||||
|
||||
#ifndef _FMOD_OUTPUT_H
|
||||
#define _FMOD_OUTPUT_H
|
||||
|
||||
#include "fmod.h"
|
||||
|
||||
typedef struct FMOD_OUTPUT_STATE FMOD_OUTPUT_STATE;
|
||||
|
||||
/*
|
||||
Output callbacks
|
||||
*/
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETNUMDRIVERSCALLBACK)(FMOD_OUTPUT_STATE *output_state, int *numdrivers);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETDRIVERNAMECALLBACK)(FMOD_OUTPUT_STATE *output_state, int id, char *name, int namelen);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETDRIVERCAPSCALLBACK)(FMOD_OUTPUT_STATE *output_state, int id, FMOD_CAPS *caps);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_INITCALLBACK) (FMOD_OUTPUT_STATE *output_state, int selecteddriver, FMOD_INITFLAGS flags, int *outputrate, int outputchannels, FMOD_SOUND_FORMAT *outputformat, int dspbufferlength, int dspnumbuffers, void *extradriverdata);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_CLOSECALLBACK) (FMOD_OUTPUT_STATE *output_state);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_UPDATECALLBACK) (FMOD_OUTPUT_STATE *output_state);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETHANDLECALLBACK) (FMOD_OUTPUT_STATE *output_state, void **handle);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETPOSITIONCALLBACK) (FMOD_OUTPUT_STATE *output_state, unsigned int *pcm);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_LOCKCALLBACK) (FMOD_OUTPUT_STATE *output_state, unsigned int offset, unsigned int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_UNLOCKCALLBACK) (FMOD_OUTPUT_STATE *output_state, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_READFROMMIXER) (FMOD_OUTPUT_STATE *output_state, void *buffer, unsigned int length);
|
||||
|
||||
|
||||
/*
|
||||
[STRUCTURE]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
When creating an output, declare one of these and provide the relevant callbacks and name for FMOD to use when it opens and reads a file of this type.
|
||||
|
||||
[REMARKS]
|
||||
Members marked with [in] mean the variable can be written to. The user can set the value.
|
||||
Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
FMOD_OUTPUT_STATE
|
||||
]
|
||||
*/
|
||||
typedef struct FMOD_OUTPUT_DESCRIPTION
|
||||
{
|
||||
const char *name; /* [in] Name of the output. */
|
||||
unsigned int version; /* [in] Plugin writer's version number. */
|
||||
int polling; /* [in] If TRUE (non zero), this tells FMOD to start a thread and call getposition / lock / unlock for feeding data. If 0, the output is probably callback based, so all the plugin needs to do is call readfrommixer to the appropriate pointer. */
|
||||
FMOD_OUTPUT_GETNUMDRIVERSCALLBACK getnumdrivers; /* [in] For sound device enumeration. This callback is to give System::getNumDrivers somthing to return. */
|
||||
FMOD_OUTPUT_GETDRIVERNAMECALLBACK getdrivername; /* [in] For sound device enumeration. This callback is to give System::getDriverName somthing to return. */
|
||||
FMOD_OUTPUT_GETDRIVERCAPSCALLBACK getdrivercaps; /* [in] For sound device enumeration. This callback is to give System::getDriverCaps somthing to return. */
|
||||
FMOD_OUTPUT_INITCALLBACK init; /* [in] Initialization function for the output device. This is called from System::init. */
|
||||
FMOD_OUTPUT_CLOSECALLBACK close; /* [in] Cleanup / close down function for the output device. This is called from System::close. */
|
||||
FMOD_OUTPUT_UPDATECALLBACK update; /* [in] Update function that is called once a frame by the user. This is called from System::update. */
|
||||
FMOD_OUTPUT_GETHANDLECALLBACK gethandle; /* [in] This is called from System::getOutputHandle. This is just to return a pointer to the internal system device object that the system may be using.*/
|
||||
FMOD_OUTPUT_GETPOSITIONCALLBACK getposition; /* [in] This is called from the FMOD software mixer thread if 'polling' = true. This returns a position value in samples so that FMOD knows where and when to fill its buffer. */
|
||||
FMOD_OUTPUT_LOCKCALLBACK lock; /* [in] This is called from the FMOD software mixer thread if 'polling' = true. This function provides a pointer to data that FMOD can write to when software mixing. */
|
||||
FMOD_OUTPUT_UNLOCKCALLBACK unlock; /* [in] This is called from the FMOD software mixer thread if 'polling' = true. This optional function accepts the data that has been mixed and copies it or does whatever it needs to before sending it to the hardware. */
|
||||
} FMOD_OUTPUT_DESCRIPTION;
|
||||
|
||||
|
||||
/*
|
||||
[STRUCTURE]
|
||||
[
|
||||
[DESCRIPTION]
|
||||
Output plugin structure that is passed into each callback.
|
||||
|
||||
[REMARKS]
|
||||
Members marked with [in] mean the variable can be written to. The user can set the value.
|
||||
Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.
|
||||
|
||||
[PLATFORMS]
|
||||
Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
|
||||
|
||||
[SEE_ALSO]
|
||||
FMOD_OUTPUT_DESCRIPTION
|
||||
]
|
||||
*/
|
||||
struct FMOD_OUTPUT_STATE
|
||||
{
|
||||
void *plugindata; /* [in] Plugin writer created data the output author wants to attach to this object. */
|
||||
FMOD_OUTPUT_READFROMMIXER readfrommixer; /* [out] Function to update mixer and write the result to the provided pointer. Used from callback based output only. Polling based output uses lock/unlock/getposition. */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,28 +0,0 @@
|
|||
Which library do I link?
|
||||
------------------------
|
||||
|
||||
If you want to use fmodex.dll:
|
||||
|
||||
Visual Studio users - fmodex_vc.lib.
|
||||
Metrowerks Codewarrior users - fmodex_vc.lib.
|
||||
Borland users - fmodex_bc.lib.
|
||||
LCC-Win32 users - fmodex_lcc.lib.
|
||||
Dev-C++, MinGW and CygWin users - libfmodex.a.
|
||||
|
||||
If you want to use fmodexL.dll: (same as fmodex.dll but with debug logging enabled)
|
||||
|
||||
Visual Studio users - fmodexL_vc.lib.
|
||||
Metrowerks Codewarrior users - fmodexL_vc.lib.
|
||||
Borland users - fmodexL_bc.lib.
|
||||
LCC-Win32 users - fmodexL_lcc.lib.
|
||||
Dev-C++, MinGW and CygWin users - libfmodexL.a.
|
||||
|
||||
If you want to use fmodex64.dll: (same as fmodex.dll but for 64bit machines)
|
||||
|
||||
Visual Studio users - fmodex64_vc.lib.
|
||||
|
||||
If you want to use fmodexL64.dll: (same as fmodex64.dll but with debug logging enabled)
|
||||
|
||||
Visual Studio users - fmodexL64_vc.lib.
|
||||
|
||||
No other compilers are supported for 64bit libraries.
|
|
@ -1306,7 +1306,11 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
|
||||
light = R_GetPlaneLight(sector, spr->mobj->z + spr->mobj->height, false); // Always use the light at the top instead of whatever I was doing before
|
||||
|
||||
if (!R_ThingIsFullBright(spr->mobj))
|
||||
if (R_ThingIsFullDark(spr->mobj))
|
||||
lightlevel = 0;
|
||||
else if (R_ThingIsSemiBright(spr->mobj))
|
||||
lightlevel = 128 + (*sector->lightlist[light].lightlevel>>1);
|
||||
else if (!R_ThingIsFullBright(spr->mobj))
|
||||
lightlevel = *sector->lightlist[light].lightlevel > 255 ? 255 : *sector->lightlist[light].lightlevel;
|
||||
|
||||
if (*sector->lightlist[light].extra_colormap)
|
||||
|
@ -1314,7 +1318,11 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!R_ThingIsFullBright(spr->mobj))
|
||||
if (R_ThingIsFullDark(spr->mobj))
|
||||
lightlevel = 0;
|
||||
else if (R_ThingIsSemiBright(spr->mobj))
|
||||
lightlevel = 128 + (sector->lightlevel>>1);
|
||||
else if (!R_ThingIsFullBright(spr->mobj))
|
||||
lightlevel = sector->lightlevel > 255 ? 255 : sector->lightlevel;
|
||||
|
||||
if (sector->extra_colormap)
|
||||
|
|
|
@ -1456,7 +1456,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
if ((rover->fofflags & (FOF_SWIMMABLE|FOF_GOOWATER)) == (FOF_SWIMMABLE|FOF_GOOWATER))
|
||||
goopgravity = true;
|
||||
|
||||
gravfactor = P_GetSectorGravityFactor(mo->subsector->sector);
|
||||
gravfactor = P_GetSectorGravityFactor(rover->master->frontsector);
|
||||
|
||||
if (gravfactor == FRACUNIT)
|
||||
continue;
|
||||
|
|
|
@ -4323,6 +4323,8 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[0] = tag;
|
||||
lines[i].args[1] = lines[i].special - 66;
|
||||
lines[i].args[2] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
lines[i].args[2] *= -1;
|
||||
lines[i].special = 66;
|
||||
break;
|
||||
case 76: //Make FOF bouncy
|
||||
|
|
|
@ -2396,6 +2396,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
default:
|
||||
Tag_SectorFSet(secnum, newtag);
|
||||
break;
|
||||
case TMT_TRIGGERTAG:
|
||||
sectors[secnum].triggertag = newtag;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -2418,6 +2421,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
default:
|
||||
Tag_SectorFSet(secnum, newtag);
|
||||
break;
|
||||
case TMT_TRIGGERTAG:
|
||||
sectors[secnum].triggertag = newtag;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -306,6 +306,7 @@ typedef enum
|
|||
TMT_ADD = 0,
|
||||
TMT_REMOVE = 1,
|
||||
TMT_REPLACEFIRST = 2,
|
||||
TMT_TRIGGERTAG = 3,
|
||||
} textmaptagoptions_t;
|
||||
|
||||
typedef enum
|
||||
|
|
|
@ -11915,7 +11915,7 @@ void P_PlayerThink(player_t *player)
|
|||
if (player->mo->movefactor != FRACUNIT) // Friction-scaled acceleration...
|
||||
acceleration = FixedMul(acceleration<<FRACBITS, player->mo->movefactor)>>FRACBITS;
|
||||
|
||||
P_Thrust(player->mo, moveAngle, -acceleration);
|
||||
P_Thrust(player->mo, moveAngle, FixedMul(-acceleration, player->mo->scale));
|
||||
}
|
||||
|
||||
if (!(player->pflags & PF_AUTOBRAKE)
|
||||
|
|
|
@ -87,39 +87,40 @@ if(${SDL2_FOUND})
|
|||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||
find_library(CORE_LIB CoreFoundation)
|
||||
find_library(CORE_FOUNDATION_LIBRARY "CoreFoundation")
|
||||
target_link_libraries(SRB2SDL2 PRIVATE
|
||||
${CORE_LIB}
|
||||
SDL2
|
||||
SDL2_mixer
|
||||
${GME_LIBRARIES}
|
||||
${OPENMPT_LIBRARIES}
|
||||
${MIXERX_LIBRARIES}
|
||||
${PNG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${CORE_FOUNDATION_LIBRARY}
|
||||
)
|
||||
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
|
||||
else()
|
||||
target_link_libraries(SRB2SDL2 PRIVATE
|
||||
${SDL2_LIBRARIES}
|
||||
${SDL2_MIXER_LIBRARIES}
|
||||
${GME_LIBRARIES}
|
||||
${OPENMPT_LIBRARIES}
|
||||
${MIXERX_LIBRARIES}
|
||||
${PNG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
)
|
||||
|
||||
if(${CMAKE_SYSTEM} MATCHES Linux)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE
|
||||
m
|
||||
rt
|
||||
)
|
||||
endif()
|
||||
# Configure the app bundle icon and plist properties
|
||||
target_sources(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/macosx/Srb2mac.icns")
|
||||
set_target_properties(SRB2SDL2 PROPERTIES
|
||||
MACOSX_BUNDLE_ICON_FILE "Srb2mac"
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "Sonic Robo Blast 2"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${SRB2_VERSION}
|
||||
|
||||
RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/macosx/Srb2mac.icns"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(SRB2SDL2 PRIVATE
|
||||
${SDL2_LIBRARIES}
|
||||
${SDL2_MIXER_LIBRARIES}
|
||||
${GME_LIBRARIES}
|
||||
${OPENMPT_LIBRARIES}
|
||||
${MIXERX_LIBRARIES}
|
||||
${PNG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
)
|
||||
|
||||
if(${CMAKE_SYSTEM} MATCHES Linux)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE
|
||||
m
|
||||
rt
|
||||
)
|
||||
endif()
|
||||
|
||||
#target_link_libraries(SRB2SDL2 PRIVATE SRB2Core)
|
||||
|
@ -136,8 +137,6 @@ if(${SDL2_FOUND})
|
|||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(SRB2SDL2 PROPERTIES VERSION ${SRB2_VERSION})
|
||||
|
||||
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||
target_link_libraries(SRB2SDL2 PRIVATE
|
||||
ws2_32
|
||||
|
@ -188,6 +187,7 @@ if(${SDL2_FOUND})
|
|||
install(TARGETS SRB2SDL2
|
||||
BUNDLE DESTINATION .
|
||||
)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY INSTALL_RPATH_USE_LINK_PATH ON)
|
||||
else()
|
||||
install(TARGETS SRB2SDL2 SRB2SDL2
|
||||
RUNTIME DESTINATION .
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "taglist.h"
|
||||
#include "z_zone.h"
|
||||
#include "r_data.h"
|
||||
#include "p_spec.h"
|
||||
|
||||
// Bit array of whether a tag exists for sectors/lines/things.
|
||||
bitarray_t tags_available[BIT_ARRAY_SIZE (MAXTAGS)];
|
||||
|
@ -454,6 +455,11 @@ void Tag_SectorFSet (const size_t id, const mtag_t tag)
|
|||
Taggroup_Remove(tags_sectors, curtag, id);
|
||||
Taggroup_Add(tags_sectors, tag, id);
|
||||
Tag_FSet(&sec->tags, tag);
|
||||
|
||||
// Sectors with linedef trigger effects need to have their trigger tag updated too
|
||||
// This is a bit of a hack...
|
||||
if (!udmf && GETSECSPECIAL(sec->special, 2) >= 1 && GETSECSPECIAL(sec->special, 2) <= 7)
|
||||
sec->triggertag = tag;
|
||||
}
|
||||
|
||||
mtag_t Tag_NextUnused(mtag_t start)
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
file(GLOB SRB2_WIN_SOURCES *.c *.h *.rc)
|
||||
|
||||
if(${SRB2_CONFIG_HWRENDER})
|
||||
set(SRB2_WIN_SOURCES ${SRB2_WIN_SOURCES} ${SRB2_HWRENDER_SOURCES} ${SRB2_HWRENDER_HEADERS})
|
||||
set(SRB2_WIN_SOURCES ${SRB2_WIN_SOURCES} ${SRB2_R_OPENGL_SOURCES} ${SRB2_R_OPENGL_HEADERS})
|
||||
endif()
|
||||
|
||||
add_executable(SRB2DD EXCLUDE_FROM_ALL WIN32
|
||||
${SRB2_WIN_SOURCES}
|
||||
)
|
||||
|
||||
target_compile_definitions(SRB2DD PRIVATE
|
||||
-D_WINDOWS
|
||||
)
|
||||
|
||||
set_target_properties(SRB2DD PROPERTIES OUTPUT_NAME ${SRB2_WIN_EXE_NAME})
|
||||
|
||||
target_link_libraries(SRB2DD PRIVATE SRB2Core)
|
|
@ -1,517 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>Srb2DD</ProjectName>
|
||||
<ProjectGuid>{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Srb2win</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
<Import Project="..\..\SRB2_common.props" />
|
||||
<Import Project="..\..\comptime.props" />
|
||||
<Import Project="..\..\libs\FMOD.props" />
|
||||
<Import Project="..\..\libs\zlib.props" />
|
||||
<Import Project="..\..\libs\libpng.props" />
|
||||
<Import Project="..\..\libs\libgme.props" />
|
||||
<Import Project="SRB2Win.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\SRB2_Debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\SRB2_Debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\SRB2_Release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\SRB2_Release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\SRB2_Debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\SRB2_Debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\SRB2_Release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\SRB2_Release.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<Link>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<Link>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<Link>
|
||||
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\am_map.c" />
|
||||
<ClCompile Include="..\apng.c" />
|
||||
<ClCompile Include="..\blua\lapi.c" />
|
||||
<ClCompile Include="..\blua\lauxlib.c" />
|
||||
<ClCompile Include="..\blua\lbaselib.c" />
|
||||
<ClCompile Include="..\blua\lcode.c" />
|
||||
<ClCompile Include="..\blua\ldebug.c" />
|
||||
<ClCompile Include="..\blua\ldo.c" />
|
||||
<ClCompile Include="..\blua\ldump.c" />
|
||||
<ClCompile Include="..\blua\lfunc.c" />
|
||||
<ClCompile Include="..\blua\lgc.c" />
|
||||
<ClCompile Include="..\blua\linit.c" />
|
||||
<ClCompile Include="..\blua\llex.c" />
|
||||
<ClCompile Include="..\blua\lmem.c" />
|
||||
<ClCompile Include="..\blua\lobject.c" />
|
||||
<ClCompile Include="..\blua\lopcodes.c" />
|
||||
<ClCompile Include="..\blua\lparser.c" />
|
||||
<ClCompile Include="..\blua\lstate.c" />
|
||||
<ClCompile Include="..\blua\lstring.c" />
|
||||
<ClCompile Include="..\blua\lstrlib.c" />
|
||||
<ClCompile Include="..\blua\ltable.c" />
|
||||
<ClCompile Include="..\blua\ltablib.c" />
|
||||
<ClCompile Include="..\blua\ltm.c" />
|
||||
<ClCompile Include="..\blua\lundump.c" />
|
||||
<ClCompile Include="..\blua\lvm.c" />
|
||||
<ClCompile Include="..\blua\lzio.c" />
|
||||
<ClCompile Include="..\b_bot.c" />
|
||||
<ClCompile Include="..\command.c" />
|
||||
<ClCompile Include="..\comptime.c" />
|
||||
<ClCompile Include="..\console.c" />
|
||||
<ClCompile Include="..\dehacked.c" />
|
||||
<ClCompile Include="..\d_clisrv.c" />
|
||||
<ClCompile Include="..\d_main.c" />
|
||||
<ClCompile Include="..\d_net.c" />
|
||||
<ClCompile Include="..\d_netcmd.c" />
|
||||
<ClCompile Include="..\d_netfil.c" />
|
||||
<ClCompile Include="..\filesrch.c" />
|
||||
<ClCompile Include="..\f_finale.c" />
|
||||
<ClCompile Include="..\f_wipe.c" />
|
||||
<ClCompile Include="..\g_game.c" />
|
||||
<ClCompile Include="..\g_input.c" />
|
||||
<ClCompile Include="..\hardware\hw3sound.c" />
|
||||
<ClCompile Include="..\hardware\hw_bsp.c" />
|
||||
<ClCompile Include="..\hardware\hw_cache.c" />
|
||||
<ClCompile Include="..\hardware\hw_clip.c" />
|
||||
<ClCompile Include="..\hardware\hw_draw.c" />
|
||||
<ClCompile Include="..\hardware\hw_light.c" />
|
||||
<ClCompile Include="..\hardware\hw_main.c" />
|
||||
<ClCompile Include="..\hardware\hw_md2.c" />
|
||||
<ClCompile Include="..\hardware\hw_md2load.c" />
|
||||
<ClCompile Include="..\hardware\hw_md3load.c" />
|
||||
<ClCompile Include="..\hardware\hw_model.c" />
|
||||
<ClCompile Include="..\hardware\u_list.c" />
|
||||
<ClCompile Include="..\hu_stuff.c" />
|
||||
<ClCompile Include="..\info.c" />
|
||||
<ClCompile Include="..\i_addrinfo.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\i_tcp.c" />
|
||||
<ClCompile Include="..\lua_baselib.c" />
|
||||
<ClCompile Include="..\lua_blockmaplib.c" />
|
||||
<ClCompile Include="..\lua_consolelib.c" />
|
||||
<ClCompile Include="..\lua_hooklib.c" />
|
||||
<ClCompile Include="..\lua_hudlib.c" />
|
||||
<ClCompile Include="..\lua_infolib.c" />
|
||||
<ClCompile Include="..\lua_maplib.c" />
|
||||
<ClCompile Include="..\lua_mathlib.c" />
|
||||
<ClCompile Include="..\lua_mobjlib.c" />
|
||||
<ClCompile Include="..\lua_playerlib.c" />
|
||||
<ClCompile Include="..\lua_script.c" />
|
||||
<ClCompile Include="..\lua_skinlib.c" />
|
||||
<ClCompile Include="..\lua_thinkerlib.c" />
|
||||
<ClCompile Include="..\lzf.c" />
|
||||
<ClCompile Include="..\md5.c" />
|
||||
<ClCompile Include="..\mserv.c" />
|
||||
<ClCompile Include="..\m_aatree.c" />
|
||||
<ClCompile Include="..\m_anigif.c" />
|
||||
<ClCompile Include="..\m_argv.c" />
|
||||
<ClCompile Include="..\m_bbox.c" />
|
||||
<ClCompile Include="..\m_cheat.c" />
|
||||
<ClCompile Include="..\m_cond.c" />
|
||||
<ClCompile Include="..\m_fixed.c" />
|
||||
<ClCompile Include="..\m_menu.c" />
|
||||
<ClCompile Include="..\m_misc.c" />
|
||||
<ClCompile Include="..\m_queue.c" />
|
||||
<ClCompile Include="..\m_random.c" />
|
||||
<ClCompile Include="..\p_ceilng.c" />
|
||||
<ClCompile Include="..\p_enemy.c" />
|
||||
<ClCompile Include="..\p_floor.c" />
|
||||
<ClCompile Include="..\p_inter.c" />
|
||||
<ClCompile Include="..\p_lights.c" />
|
||||
<ClCompile Include="..\p_map.c" />
|
||||
<ClCompile Include="..\p_maputl.c" />
|
||||
<ClCompile Include="..\p_mobj.c" />
|
||||
<ClCompile Include="..\p_polyobj.c" />
|
||||
<ClCompile Include="..\p_saveg.c" />
|
||||
<ClCompile Include="..\p_setup.c" />
|
||||
<ClCompile Include="..\p_sight.c" />
|
||||
<ClCompile Include="..\p_slopes.c" />
|
||||
<ClCompile Include="..\p_spec.c" />
|
||||
<ClCompile Include="..\p_telept.c" />
|
||||
<ClCompile Include="..\p_tick.c" />
|
||||
<ClCompile Include="..\p_user.c" />
|
||||
<ClCompile Include="..\r_bsp.c" />
|
||||
<ClCompile Include="..\r_data.c" />
|
||||
<ClCompile Include="..\r_draw.c" />
|
||||
<ClCompile Include="..\r_draw16.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_draw8.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_draw8_npo2.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_main.c" />
|
||||
<ClCompile Include="..\r_patch.c" />
|
||||
<ClCompile Include="..\r_patchrotation.c" />
|
||||
<ClCompile Include="..\r_picformats.c" />
|
||||
<ClCompile Include="..\r_plane.c" />
|
||||
<ClCompile Include="..\r_portal.c" />
|
||||
<ClCompile Include="..\r_segs.c" />
|
||||
<ClCompile Include="..\r_sky.c" />
|
||||
<ClCompile Include="..\r_splats.c" />
|
||||
<ClCompile Include="..\r_textures.c" />
|
||||
<ClCompile Include="..\r_things.c" />
|
||||
<ClCompile Include="..\screen.c" />
|
||||
<ClCompile Include="..\sounds.c" />
|
||||
<ClCompile Include="..\string.c" />
|
||||
<ClCompile Include="..\st_stuff.c" />
|
||||
<ClCompile Include="..\s_sound.c" />
|
||||
<ClCompile Include="..\tables.c" />
|
||||
<ClCompile Include="..\t_facon.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\t_fsin.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\t_ftan.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\t_tan2a.c">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\v_video.c" />
|
||||
<ClCompile Include="..\w_wad.c" />
|
||||
<ClCompile Include="..\y_inter.c" />
|
||||
<ClCompile Include="..\z_zone.c" />
|
||||
<ClCompile Include="dx_error.c" />
|
||||
<ClCompile Include="fabdxlib.c" />
|
||||
<ClCompile Include="win_cd.c" />
|
||||
<ClCompile Include="win_dbg.c" />
|
||||
<ClCompile Include="win_dll.c" />
|
||||
<ClCompile Include="win_main.c" />
|
||||
<ClCompile Include="win_net.c" />
|
||||
<ClCompile Include="win_snd.c" />
|
||||
<ClCompile Include="win_sys.c" />
|
||||
<ClCompile Include="win_vid.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\am_map.h" />
|
||||
<ClInclude Include="..\apng.h" />
|
||||
<ClInclude Include="..\blua\lapi.h" />
|
||||
<ClInclude Include="..\blua\lauxlib.h" />
|
||||
<ClInclude Include="..\blua\lcode.h" />
|
||||
<ClInclude Include="..\blua\ldebug.h" />
|
||||
<ClInclude Include="..\blua\ldo.h" />
|
||||
<ClInclude Include="..\blua\lfunc.h" />
|
||||
<ClInclude Include="..\blua\lgc.h" />
|
||||
<ClInclude Include="..\blua\llex.h" />
|
||||
<ClInclude Include="..\blua\llimits.h" />
|
||||
<ClInclude Include="..\blua\lmem.h" />
|
||||
<ClInclude Include="..\blua\lobject.h" />
|
||||
<ClInclude Include="..\blua\lopcodes.h" />
|
||||
<ClInclude Include="..\blua\lparser.h" />
|
||||
<ClInclude Include="..\blua\lstate.h" />
|
||||
<ClInclude Include="..\blua\lstring.h" />
|
||||
<ClInclude Include="..\blua\ltable.h" />
|
||||
<ClInclude Include="..\blua\ltm.h" />
|
||||
<ClInclude Include="..\blua\lua.h" />
|
||||
<ClInclude Include="..\blua\luaconf.h" />
|
||||
<ClInclude Include="..\blua\lualib.h" />
|
||||
<ClInclude Include="..\blua\lundump.h" />
|
||||
<ClInclude Include="..\blua\lvm.h" />
|
||||
<ClInclude Include="..\blua\lzio.h" />
|
||||
<ClInclude Include="..\byteptr.h" />
|
||||
<ClInclude Include="..\b_bot.h" />
|
||||
<ClInclude Include="..\command.h" />
|
||||
<ClInclude Include="..\comptime.h" />
|
||||
<ClInclude Include="..\console.h" />
|
||||
<ClInclude Include="..\dehacked.h" />
|
||||
<ClInclude Include="..\doomdata.h" />
|
||||
<ClInclude Include="..\doomdef.h" />
|
||||
<ClInclude Include="..\doomstat.h" />
|
||||
<ClInclude Include="..\doomtype.h" />
|
||||
<ClInclude Include="..\d_clisrv.h" />
|
||||
<ClInclude Include="..\d_event.h" />
|
||||
<ClInclude Include="..\d_main.h" />
|
||||
<ClInclude Include="..\d_net.h" />
|
||||
<ClInclude Include="..\d_netcmd.h" />
|
||||
<ClInclude Include="..\d_netfil.h" />
|
||||
<ClInclude Include="..\d_player.h" />
|
||||
<ClInclude Include="..\d_think.h" />
|
||||
<ClInclude Include="..\d_ticcmd.h" />
|
||||
<ClInclude Include="..\endian.h" />
|
||||
<ClInclude Include="..\fastcmp.h" />
|
||||
<ClInclude Include="..\filesrch.h" />
|
||||
<ClInclude Include="..\f_finale.h" />
|
||||
<ClInclude Include="..\g_game.h" />
|
||||
<ClInclude Include="..\g_input.h" />
|
||||
<ClInclude Include="..\g_state.h" />
|
||||
<ClInclude Include="..\hardware\hw3dsdrv.h" />
|
||||
<ClInclude Include="..\hardware\hw3sound.h" />
|
||||
<ClInclude Include="..\hardware\hws_data.h" />
|
||||
<ClInclude Include="..\hardware\hw_clip.h" />
|
||||
<ClInclude Include="..\hardware\hw_data.h" />
|
||||
<ClInclude Include="..\hardware\hw_defs.h" />
|
||||
<ClInclude Include="..\hardware\hw_dll.h" />
|
||||
<ClInclude Include="..\hardware\hw_drv.h" />
|
||||
<ClInclude Include="..\hardware\hw_glob.h" />
|
||||
<ClInclude Include="..\hardware\hw_light.h" />
|
||||
<ClInclude Include="..\hardware\hw_main.h" />
|
||||
<ClInclude Include="..\hardware\hw_md2.h" />
|
||||
<ClInclude Include="..\hardware\hw_md2load.h" />
|
||||
<ClInclude Include="..\hardware\hw_md3load.h" />
|
||||
<ClInclude Include="..\hardware\hw_model.h" />
|
||||
<ClInclude Include="..\hardware\u_list.h" />
|
||||
<ClInclude Include="..\hu_stuff.h" />
|
||||
<ClInclude Include="..\info.h" />
|
||||
<ClInclude Include="..\i_addrinfo.h" />
|
||||
<ClInclude Include="..\i_joy.h" />
|
||||
<ClInclude Include="..\i_net.h" />
|
||||
<ClInclude Include="..\i_sound.h" />
|
||||
<ClInclude Include="..\i_system.h" />
|
||||
<ClInclude Include="..\i_tcp.h" />
|
||||
<ClInclude Include="..\i_video.h" />
|
||||
<ClInclude Include="..\keys.h" />
|
||||
<ClInclude Include="..\lua_hook.h" />
|
||||
<ClInclude Include="..\lua_hud.h" />
|
||||
<ClInclude Include="..\lua_libs.h" />
|
||||
<ClInclude Include="..\lua_script.h" />
|
||||
<ClInclude Include="..\lzf.h" />
|
||||
<ClInclude Include="..\md5.h" />
|
||||
<ClInclude Include="..\mserv.h" />
|
||||
<ClInclude Include="..\m_aatree.h" />
|
||||
<ClInclude Include="..\m_anigif.h" />
|
||||
<ClInclude Include="..\m_argv.h" />
|
||||
<ClInclude Include="..\m_bbox.h" />
|
||||
<ClInclude Include="..\m_cheat.h" />
|
||||
<ClInclude Include="..\m_cond.h" />
|
||||
<ClInclude Include="..\m_dllist.h" />
|
||||
<ClInclude Include="..\m_fixed.h" />
|
||||
<ClInclude Include="..\m_menu.h" />
|
||||
<ClInclude Include="..\m_misc.h" />
|
||||
<ClInclude Include="..\m_queue.h" />
|
||||
<ClInclude Include="..\m_random.h" />
|
||||
<ClInclude Include="..\m_swap.h" />
|
||||
<ClInclude Include="..\p5prof.h" />
|
||||
<ClInclude Include="..\p_local.h" />
|
||||
<ClInclude Include="..\p_maputl.h" />
|
||||
<ClInclude Include="..\p_mobj.h" />
|
||||
<ClInclude Include="..\p_polyobj.h" />
|
||||
<ClInclude Include="..\p_pspr.h" />
|
||||
<ClInclude Include="..\p_saveg.h" />
|
||||
<ClInclude Include="..\p_setup.h" />
|
||||
<ClInclude Include="..\p_slopes.h" />
|
||||
<ClInclude Include="..\p_spec.h" />
|
||||
<ClInclude Include="..\p_tick.h" />
|
||||
<ClInclude Include="..\r_bsp.h" />
|
||||
<ClInclude Include="..\r_data.h" />
|
||||
<ClInclude Include="..\r_defs.h" />
|
||||
<ClInclude Include="..\r_draw.h" />
|
||||
<ClInclude Include="..\r_local.h" />
|
||||
<ClInclude Include="..\r_main.h" />
|
||||
<ClInclude Include="..\r_patch.h" />
|
||||
<ClInclude Include="..\r_patchrotation.h" />
|
||||
<ClInclude Include="..\r_picformats.h" />
|
||||
<ClInclude Include="..\r_plane.h" />
|
||||
<ClInclude Include="..\r_portal.h" />
|
||||
<ClInclude Include="..\r_segs.h" />
|
||||
<ClInclude Include="..\r_sky.h" />
|
||||
<ClInclude Include="..\r_splats.h" />
|
||||
<ClInclude Include="..\r_state.h" />
|
||||
<ClInclude Include="..\r_textures.h" />
|
||||
<ClInclude Include="..\r_things.h" />
|
||||
<ClInclude Include="..\screen.h" />
|
||||
<ClInclude Include="..\sounds.h" />
|
||||
<ClInclude Include="..\st_stuff.h" />
|
||||
<ClInclude Include="..\s_sound.h" />
|
||||
<ClInclude Include="..\tables.h" />
|
||||
<ClInclude Include="..\v_video.h" />
|
||||
<ClInclude Include="..\w_wad.h" />
|
||||
<ClInclude Include="..\y_inter.h" />
|
||||
<ClInclude Include="..\z_zone.h" />
|
||||
<ClInclude Include="afxres.h" />
|
||||
<ClInclude Include="dx_error.h" />
|
||||
<ClInclude Include="fabdxlib.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="win_dbg.h" />
|
||||
<ClInclude Include="win_dll.h" />
|
||||
<ClInclude Include="win_main.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Srb2win.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Srb2win.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\libs\libpng-src\projects\visualc10\libpng.vcxproj">
|
||||
<Project>{72b01aca-7a1a-4f7b-acef-2607299cf052}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\libs\zlib\projects\visualc10\zlib.vcxproj">
|
||||
<Project>{73a5729c-7323-41d4-ab48-8a03c9f81603}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\asm_defs.inc" />
|
||||
<None Include="..\config.h.in" />
|
||||
<CustomBuild Include="..\tmap.nas">
|
||||
<FileType>Document</FileType>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\tmap_mmx.nas">
|
||||
<FileType>Document</FileType>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\tmap_vc.nas">
|
||||
<FileType>Document</FileType>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,943 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="BLUA">
|
||||
<UniqueIdentifier>{20cba664-c3ef-48f1-85dd-42aafd5345cc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="LUA">
|
||||
<UniqueIdentifier>{d3817a65-82f5-4989-9217-e5a7f43380a0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="B_Bots">
|
||||
<UniqueIdentifier>{9c3ed4ae-dbed-4d00-a164-b8bb7fc1710c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Docs">
|
||||
<UniqueIdentifier>{4b8a8fb6-7c84-48c2-85d1-0583e6b8cacd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="W_Wad">
|
||||
<UniqueIdentifier>{1907eee5-0ebf-4325-a2fa-793f089ed2e3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="S_Sounds">
|
||||
<UniqueIdentifier>{b9e78a3f-3e2b-4f89-9817-b77c7a26d2aa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="R_Rend">
|
||||
<UniqueIdentifier>{3f336df5-a1d7-4610-9728-4525e42c0abc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="P_Play">
|
||||
<UniqueIdentifier>{b5090aa0-6645-4091-aa1a-ffc3bf4dc422}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="M_Misc">
|
||||
<UniqueIdentifier>{d59e82c9-68e5-44bf-827e-f7bb1676cd6c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="I_Interface">
|
||||
<UniqueIdentifier>{29e746a2-3d91-4b69-af6e-5e03895516b7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Hw_Hardware">
|
||||
<UniqueIdentifier>{b295d364-61c3-4ebb-9b68-7d6c0bb891be}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="H_Hud">
|
||||
<UniqueIdentifier>{ba258ec5-13d7-4083-98bd-c2ee58700b66}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="G_Game">
|
||||
<UniqueIdentifier>{6163f1e5-da5d-4af2-b92c-753452f9e1d0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="F_Frame">
|
||||
<UniqueIdentifier>{077b0966-1151-4afa-a533-120a4c931322}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="D_Doom">
|
||||
<UniqueIdentifier>{bded90bc-8019-42b1-ba19-32166743d3e3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="A_Asm">
|
||||
<UniqueIdentifier>{c0ddfdb5-7494-4cca-b2ad-cb048be9cbdf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Win32app">
|
||||
<UniqueIdentifier>{d5157f99-43ef-49cc-ad76-658a1168fc0d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="O_Other">
|
||||
<UniqueIdentifier>{2cedf139-53a1-40ea-b4de-19e9f4505a1f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dx_error.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fabdxlib.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="win_cd.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="win_dbg.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="win_dll.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="win_main.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="win_net.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="win_snd.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="win_sys.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="win_vid.c">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_bsp.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_cache.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_clip.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_draw.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_light.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_main.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_md2.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw3sound.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lapi.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lauxlib.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lbaselib.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lcode.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\ldebug.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\ldo.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\ldump.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lfunc.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lgc.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\linit.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\llex.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lmem.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lobject.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lopcodes.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lparser.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lstate.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lstring.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lstrlib.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\ltable.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\ltablib.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\ltm.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lundump.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lvm.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\blua\lzio.c">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\d_clisrv.c">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\d_main.c">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\d_net.c">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\d_netcmd.c">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\d_netfil.c">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\dehacked.c">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\g_game.c">
|
||||
<Filter>G_Game</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\g_input.c">
|
||||
<Filter>G_Game</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\f_finale.c">
|
||||
<Filter>F_Frame</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\f_wipe.c">
|
||||
<Filter>F_Frame</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\i_addrinfo.c">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\i_tcp.c">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_thinkerlib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_baselib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_blockmaplib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_consolelib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_hooklib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_hudlib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_infolib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_maplib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_mathlib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_mobjlib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_playerlib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_script.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lua_skinlib.c">
|
||||
<Filter>LUA</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_aatree.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_anigif.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_argv.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_bbox.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_cheat.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_cond.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_fixed.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_menu.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_misc.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_queue.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\m_random.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\md5.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\am_map.c">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\b_bot.c">
|
||||
<Filter>B_Bots</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_ceilng.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_enemy.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_floor.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_inter.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_lights.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_map.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_maputl.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_mobj.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_polyobj.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_saveg.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_setup.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_sight.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_slopes.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_spec.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_telept.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_tick.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\p_user.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_bsp.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_data.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_draw.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_draw8.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_draw16.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_draw8_npo2.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_main.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_plane.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_segs.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_sky.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_splats.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_things.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\t_facon.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\t_fsin.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\t_ftan.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\t_tan2a.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\tables.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\sounds.c">
|
||||
<Filter>S_Sounds</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\w_wad.c">
|
||||
<Filter>W_Wad</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\lzf.c">
|
||||
<Filter>W_Wad</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\s_sound.c">
|
||||
<Filter>S_Sounds</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\comptime.c">
|
||||
<Filter>O_Other</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\command.c">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\console.c">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\filesrch.c">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hu_stuff.c">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\info.c">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\mserv.c">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\st_stuff.c">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\v_video.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\screen.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\y_inter.c">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\z_zone.c">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\string.c">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_md2load.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_md3load.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_model.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\u_list.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hardware\hw_clip.c">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apng.c" />
|
||||
<ClCompile Include="..\r_patch.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_patchrotation.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_picformats.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_textures.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\r_portal.c">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="afxres.h">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dx_error.h">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="fabdxlib.h">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="win_dbg.h">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="win_dll.h">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="win_main.h">
|
||||
<Filter>Win32app</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_clip.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_data.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_defs.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_dll.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_drv.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_glob.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_light.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_main.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_md2.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_md2load.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_md3load.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_model.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw3dsdrv.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw3sound.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hws_data.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\u_list.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lapi.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lauxlib.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lcode.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\ldebug.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\ldo.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lfunc.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lgc.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\llex.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\llimits.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lmem.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lobject.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lopcodes.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lparser.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lstate.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lstring.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\ltable.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\ltm.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lua.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\luaconf.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lualib.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lundump.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lvm.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\blua\lzio.h">
|
||||
<Filter>BLUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\d_clisrv.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\d_event.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\d_main.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\d_net.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\d_netcmd.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\d_netfil.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\d_player.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\d_think.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\d_ticcmd.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\dehacked.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\doomdata.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\doomdef.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\doomstat.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\doomtype.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\g_game.h">
|
||||
<Filter>G_Game</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\g_input.h">
|
||||
<Filter>G_Game</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\g_state.h">
|
||||
<Filter>G_Game</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\f_finale.h">
|
||||
<Filter>F_Frame</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\i_addrinfo.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\i_joy.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\i_net.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\i_sound.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\i_system.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\i_tcp.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\i_video.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\lua_hook.h">
|
||||
<Filter>LUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\lua_hud.h">
|
||||
<Filter>LUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\lua_libs.h">
|
||||
<Filter>LUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\lua_script.h">
|
||||
<Filter>LUA</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\md5.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_aatree.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_anigif.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_argv.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_bbox.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_cheat.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_cond.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_dllist.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_fixed.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_menu.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_misc.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_queue.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_random.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\m_swap.h">
|
||||
<Filter>M_Misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\am_map.h">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\b_bot.h">
|
||||
<Filter>B_Bots</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_local.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_maputl.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_mobj.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_polyobj.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_pspr.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_saveg.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_setup.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_slopes.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_spec.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p_tick.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_bsp.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_data.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_defs.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_draw.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_local.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_main.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_plane.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_segs.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_sky.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_splats.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_state.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_things.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\tables.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sounds.h">
|
||||
<Filter>S_Sounds</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\w_wad.h">
|
||||
<Filter>W_Wad</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\lzf.h">
|
||||
<Filter>W_Wad</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\byteptr.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\s_sound.h">
|
||||
<Filter>S_Sounds</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\comptime.h">
|
||||
<Filter>O_Other</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\keys.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\command.h">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\console.h">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\endian.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\filesrch.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hu_stuff.h">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\info.h">
|
||||
<Filter>P_Play</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\mserv.h">
|
||||
<Filter>I_Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\p5prof.h">
|
||||
<Filter>A_Asm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\st_stuff.h">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\v_video.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\screen.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\y_inter.h">
|
||||
<Filter>H_Hud</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\z_zone.h">
|
||||
<Filter>D_Doom</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\fastcmp.h">
|
||||
<Filter>O_Other</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\hardware\hw_clip.h">
|
||||
<Filter>Hw_Hardware</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apng.h" />
|
||||
<ClInclude Include="..\r_patch.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_patchrotation.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_picformats.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_textures.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\r_portal.h">
|
||||
<Filter>R_Rend</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Srb2win.ico">
|
||||
<Filter>Win32app</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Srb2win.rc">
|
||||
<Filter>Win32app</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\asm_defs.inc">
|
||||
<Filter>A_Asm</Filter>
|
||||
</None>
|
||||
<None Include="..\config.h.in">
|
||||
<Filter>O_Other</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\tmap.nas">
|
||||
<Filter>A_Asm</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\tmap_mmx.nas">
|
||||
<Filter>A_Asm</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\tmap_vc.nas">
|
||||
<Filter>A_Asm</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,77 +0,0 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Srb2win"=.\Srb2win.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name libpng
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name zlib
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "libpng"="..\..\libs\libpng-src\projects\visualc6\libpng.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name zlib
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "r_opengl"=..\hardware\r_opengl\r_opengl.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Srb2win
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "zlib"=..\..\libs\zlib\projects\visualc6\zlib.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<!-- x86/x64 defines: has specific libraries that ARM does not -->
|
||||
<PreprocessorDefinitions Condition="'$(Platform)' == 'Win32' OR '$(Platform)' == 'x64'">HAVE_ZLIB;HAVE_LIBGME;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<!-- ARM defines -->
|
||||
<PreprocessorDefinitions Condition="'$(Platform)' != 'Win32' AND '$(Platform)' != 'x64'">_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link />
|
||||
<Link>
|
||||
<AdditionalDependencies>dxguid.lib;winmm.lib;dinput8.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
</Project>
|
|
@ -1,276 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief DirectX error messages
|
||||
/// adapted from DirectX6 sample code
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#define DIRECTSOUND_VERSION 0x0600 /* version 6.0 */
|
||||
#define DXVERSION_NTCOMPATIBLE 0x0300
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <ddraw.h>
|
||||
#include <dsound.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
#include "dx_error.h"
|
||||
|
||||
// -----------------
|
||||
// DXErrorMessageBox
|
||||
// Displays a message box containing the given formatted string.
|
||||
// -----------------
|
||||
/*
|
||||
VOID DXErrorMessageBox (HRESULT error) LPSTR fmt, ...)
|
||||
{
|
||||
char buff[256];
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
wvsprintf(buff, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
lstrcat(buff, "\r\n");
|
||||
MessageBoxA(NULL, buff, "DirectX Error:", MB_ICONEXCLAMATION + MB_OK);
|
||||
}*/
|
||||
|
||||
|
||||
// ---------------
|
||||
// DXErrorToString
|
||||
// Returns a pointer to a string describing the given DD, D3D or D3DRM error code.
|
||||
// ---------------
|
||||
LPCSTR DXErrorToString (HRESULT error)
|
||||
{
|
||||
switch (error) {
|
||||
case DD_OK:
|
||||
/* Also includes D3D_OK and D3DRM_OK */
|
||||
return "No error.";
|
||||
case DDERR_ALREADYINITIALIZED:
|
||||
return "This object is already initialized.";
|
||||
case DDERR_BLTFASTCANTCLIP:
|
||||
return "Return if a clipper object is attached to the source surface passed into a BltFast call.";
|
||||
case DDERR_CANNOTATTACHSURFACE:
|
||||
return "This surface can not be attached to the requested surface.";
|
||||
case DDERR_CANNOTDETACHSURFACE:
|
||||
return "This surface can not be detached from the requested surface.";
|
||||
case DDERR_CANTCREATEDC:
|
||||
return "Windows can not create any more DCs.";
|
||||
case DDERR_CANTDUPLICATE:
|
||||
return "Can't duplicate primary & 3D surfaces, or surfaces that are implicitly created.";
|
||||
case DDERR_CLIPPERISUSINGHWND:
|
||||
return "An attempt was made to set a cliplist for a clipper object that is already monitoring an hwnd.";
|
||||
case DDERR_COLORKEYNOTSET:
|
||||
return "No src color key specified for this operation.";
|
||||
case DDERR_CURRENTLYNOTAVAIL:
|
||||
return "Support is currently not available.";
|
||||
case DDERR_DIRECTDRAWALREADYCREATED:
|
||||
return "A DirectDraw object representing this driver has already been created for this process.";
|
||||
case DDERR_EXCEPTION:
|
||||
return "An exception was encountered while performing the requested operation.";
|
||||
case DDERR_EXCLUSIVEMODEALREADYSET:
|
||||
return "An attempt was made to set the cooperative level when it was already set to exclusive.";
|
||||
case DDERR_GENERIC:
|
||||
return "Generic failure.";
|
||||
case DDERR_HEIGHTALIGN:
|
||||
return "Height of rectangle provided is not a multiple of reqd alignment.";
|
||||
case DDERR_HWNDALREADYSET:
|
||||
return "The CooperativeLevel HWND has already been set. It can not be reset while the process has surfaces or palettes created.";
|
||||
case DDERR_HWNDSUBCLASSED:
|
||||
return "HWND used by DirectDraw CooperativeLevel has been subclassed, this prevents DirectDraw from restoring state.";
|
||||
case DDERR_IMPLICITLYCREATED:
|
||||
return "This surface can not be restored because it is an implicitly created surface.";
|
||||
case DDERR_INCOMPATIBLEPRIMARY:
|
||||
return "Unable to match primary surface creation request with existing primary surface.";
|
||||
case DDERR_INVALIDCAPS:
|
||||
return "One or more of the caps bits passed to the callback are incorrect.";
|
||||
case DDERR_INVALIDCLIPLIST:
|
||||
return "DirectDraw does not support the provided cliplist.";
|
||||
case DDERR_INVALIDDIRECTDRAWGUID:
|
||||
return "The GUID passed to DirectDrawCreate is not a valid DirectDraw driver identifier.";
|
||||
case DDERR_INVALIDMODE:
|
||||
return "DirectDraw does not support the requested mode.";
|
||||
case DDERR_INVALIDOBJECT:
|
||||
return "DirectDraw received a pointer that was an invalid DIRECTDRAW object.";
|
||||
case DDERR_INVALIDPARAMS:
|
||||
return "One or more of the parameters passed to the function are incorrect.";
|
||||
case DDERR_INVALIDPIXELFORMAT:
|
||||
return "The pixel format was invalid as specified.";
|
||||
case DDERR_INVALIDPOSITION:
|
||||
return "Returned when the position of the overlay on the destination is no longer legal for that destination.";
|
||||
case DDERR_INVALIDRECT:
|
||||
return "Rectangle provided was invalid.";
|
||||
case DDERR_LOCKEDSURFACES:
|
||||
return "Operation could not be carried out because one or more surfaces are locked.";
|
||||
case DDERR_NO3D:
|
||||
return "There is no 3D present.";
|
||||
case DDERR_NOALPHAHW:
|
||||
return "Operation could not be carried out because there is no alpha accleration hardware present or available.";
|
||||
case DDERR_NOBLTHW:
|
||||
return "No blitter hardware present.";
|
||||
case DDERR_NOCLIPLIST:
|
||||
return "No cliplist available.";
|
||||
case DDERR_NOCLIPPERATTACHED:
|
||||
return "No clipper object attached to surface object.";
|
||||
case DDERR_NOCOLORCONVHW:
|
||||
return "Operation could not be carried out because there is no color conversion hardware present or available.";
|
||||
case DDERR_NOCOLORKEY:
|
||||
return "Surface doesn't currently have a color key";
|
||||
case DDERR_NOCOLORKEYHW:
|
||||
return "Operation could not be carried out because there is no hardware support of the destination color key.";
|
||||
case DDERR_NOCOOPERATIVELEVELSET:
|
||||
return "Create function called without DirectDraw object method SetCooperativeLevel being called.";
|
||||
case DDERR_NODC:
|
||||
return "No DC was ever created for this surface.";
|
||||
case DDERR_NODDROPSHW:
|
||||
return "No DirectDraw ROP hardware.";
|
||||
case DDERR_NODIRECTDRAWHW:
|
||||
return "A hardware-only DirectDraw object creation was attempted but the driver did not support any hardware.";
|
||||
case DDERR_NOEMULATION:
|
||||
return "Software emulation not available.";
|
||||
case DDERR_NOEXCLUSIVEMODE:
|
||||
return "Operation requires the application to have exclusive mode but the application does not have exclusive mode.";
|
||||
case DDERR_NOFLIPHW:
|
||||
return "Flipping visible surfaces is not supported.";
|
||||
case DDERR_NOGDI:
|
||||
return "There is no GDI present.";
|
||||
case DDERR_NOHWND:
|
||||
return "Clipper notification requires an HWND or no HWND has previously been set as the CooperativeLevel HWND.";
|
||||
case DDERR_NOMIRRORHW:
|
||||
return "Operation could not be carried out because there is no hardware present or available.";
|
||||
case DDERR_NOOVERLAYDEST:
|
||||
return "Returned when GetOverlayPosition is called on an overlay that UpdateOverlay has never been called on to establish a destination.";
|
||||
case DDERR_NOOVERLAYHW:
|
||||
return "Operation could not be carried out because there is no overlay hardware present or available.";
|
||||
case DDERR_NOPALETTEATTACHED:
|
||||
return "No palette object attached to this surface.";
|
||||
case DDERR_NOPALETTEHW:
|
||||
return "No hardware support for 16 or 256 color palettes.";
|
||||
case DDERR_NORASTEROPHW:
|
||||
return "Operation could not be carried out because there is no appropriate raster op hardware present or available.";
|
||||
case DDERR_NOROTATIONHW:
|
||||
return "Operation could not be carried out because there is no rotation hardware present or available.";
|
||||
case DDERR_NOSTRETCHHW:
|
||||
return "Operation could not be carried out because there is no hardware support for stretching.";
|
||||
case DDERR_NOT4BITCOLOR:
|
||||
return "DirectDrawSurface is not in 4 bit color palette and the requested operation requires 4 bit color palette.";
|
||||
case DDERR_NOT4BITCOLORINDEX:
|
||||
return "DirectDrawSurface is not in 4 bit color index palette and the requested operation requires 4 bit color index palette.";
|
||||
case DDERR_NOT8BITCOLOR:
|
||||
return "DirectDrawSurface is not in 8 bit color mode and the requested operation requires 8 bit color.";
|
||||
case DDERR_NOTAOVERLAYSURFACE:
|
||||
return "Returned when an overlay member is called for a non-overlay surface.";
|
||||
case DDERR_NOTEXTUREHW:
|
||||
return "Operation could not be carried out because there is no texture mapping hardware present or available.";
|
||||
case DDERR_NOTFLIPPABLE:
|
||||
return "An attempt has been made to flip a surface that is not flippable.";
|
||||
case DDERR_NOTFOUND:
|
||||
return "Requested item was not found.";
|
||||
case DDERR_NOTLOCKED:
|
||||
return "Surface was not locked. An attempt to unlock a surface that was not locked at all, or by this process, has been attempted.";
|
||||
case DDERR_NOTPALETTIZED:
|
||||
return "The surface being used is not a palette-based surface.";
|
||||
case DDERR_NOVSYNCHW:
|
||||
return "Operation could not be carried out because there is no hardware support for vertical blank synchronized operations.";
|
||||
case DDERR_NOZBUFFERHW:
|
||||
return "Operation could not be carried out because there is no hardware support for zbuffer blitting.";
|
||||
case DDERR_NOZOVERLAYHW:
|
||||
return "Overlay surfaces could not be z layered based on their BltOrder because the hardware does not support z layering of overlays.";
|
||||
case DDERR_OUTOFCAPS:
|
||||
return "The hardware needed for the requested operation has already been allocated.";
|
||||
case DDERR_OUTOFMEMORY:
|
||||
return "There is not enough memory to perform the operation.";
|
||||
case DDERR_OUTOFVIDEOMEMORY:
|
||||
return "DirectDraw does not have enough memory to perform the operation.";
|
||||
case DDERR_OVERLAYCANTCLIP:
|
||||
return "The hardware does not support clipped overlays.";
|
||||
case DDERR_OVERLAYCOLORKEYONLYONEACTIVE:
|
||||
return "Can only have ony color key active at one time for overlays.";
|
||||
case DDERR_OVERLAYNOTVISIBLE:
|
||||
return "Returned when GetOverlayPosition is called on a hidden overlay.";
|
||||
case DDERR_PALETTEBUSY:
|
||||
return "Access to this palette is being refused because the palette is already locked by another thread.";
|
||||
case DDERR_PRIMARYSURFACEALREADYEXISTS:
|
||||
return "This process already has created a primary surface.";
|
||||
case DDERR_REGIONTOOSMALL:
|
||||
return "Region passed to Clipper::GetClipList is too small.";
|
||||
case DDERR_SURFACEALREADYATTACHED:
|
||||
return "This surface is already attached to the surface it is being attached to.";
|
||||
case DDERR_SURFACEALREADYDEPENDENT:
|
||||
return "This surface is already a dependency of the surface it is being made a dependency of.";
|
||||
case DDERR_SURFACEBUSY:
|
||||
return "Access to this surface is being refused because the surface is already locked by another thread.";
|
||||
case DDERR_SURFACEISOBSCURED:
|
||||
return "Access to surface refused because the surface is obscured.";
|
||||
case DDERR_SURFACELOST:
|
||||
return "Access to this surface is being refused because the surface memory is gone. The DirectDrawSurface object representing this surface should have Restore called on it.";
|
||||
case DDERR_SURFACENOTATTACHED:
|
||||
return "The requested surface is not attached.";
|
||||
case DDERR_TOOBIGHEIGHT:
|
||||
return "Height requested by DirectDraw is too large.";
|
||||
case DDERR_TOOBIGSIZE:
|
||||
return "Size requested by DirectDraw is too large, but the individual height and width are OK.";
|
||||
case DDERR_TOOBIGWIDTH:
|
||||
return "Width requested by DirectDraw is too large.";
|
||||
case DDERR_UNSUPPORTED:
|
||||
return "Function call not supported.";
|
||||
case DDERR_UNSUPPORTEDFORMAT:
|
||||
return "FOURCC format requested is unsupported by DirectDraw.";
|
||||
case DDERR_UNSUPPORTEDMASK:
|
||||
return "Bitmask in the pixel format requested is unsupported by DirectDraw.";
|
||||
case DDERR_VERTICALBLANKINPROGRESS:
|
||||
return "Vertical blank is in progress.";
|
||||
case DDERR_WASSTILLDRAWING:
|
||||
return "Informs DirectDraw that the previous Blt which is transfering information to or from this Surface is incomplete.";
|
||||
case DDERR_WRONGMODE:
|
||||
return "This surface can not be restored because it was created in a different mode.";
|
||||
case DDERR_XALIGN:
|
||||
return "Rectangle provided was not horizontally aligned on required boundary.";
|
||||
|
||||
//
|
||||
// DirectSound errors
|
||||
//
|
||||
case DSERR_ALLOCATED:
|
||||
return "The request failed because resources, such as a priority level, were already in use by another caller.";
|
||||
case DSERR_ALREADYINITIALIZED:
|
||||
return "The object is already initialized.";
|
||||
case DSERR_BADFORMAT:
|
||||
return "The specified wave format is not supported.";
|
||||
case DSERR_BUFFERLOST:
|
||||
return "The buffer memory has been lost and must be restored.";
|
||||
case DSERR_CONTROLUNAVAIL:
|
||||
return "The control (volume, pan, and so forth) requested by the caller is not available.";
|
||||
case DSERR_INVALIDCALL:
|
||||
return "This function is not valid for the current state of this object.";
|
||||
case DSERR_NOAGGREGATION:
|
||||
return "The object does not support aggregation.";
|
||||
case DSERR_NODRIVER:
|
||||
return "No sound driver is available for use.";
|
||||
case DSERR_NOINTERFACE:
|
||||
return "The requested COM interface is not available.";
|
||||
case DSERR_OTHERAPPHASPRIO:
|
||||
return "Another application has a higher priority level, preventing this call from succeeding";
|
||||
case DSERR_PRIOLEVELNEEDED:
|
||||
return "The caller does not have the priority level required for the function to succeed.";
|
||||
case DSERR_UNINITIALIZED:
|
||||
return "The IDirectSound::Initialize method has not been called or has not been called successfully before other methods were called.";
|
||||
default:
|
||||
return "Unrecognized error value.";
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief transform an unreadable DirectX error code
|
||||
/// into a meaningful error message.
|
||||
|
||||
#ifndef __DX_ERROR_H__
|
||||
#define __DX_ERROR_H__
|
||||
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Displays a message box containing the given formatted string.
|
||||
//VOID DXErrorMessageBox (LPSTR fmt, ...);
|
||||
|
||||
// Returns a pointer to a string describing the given DD, D3D or D3DRM error code.
|
||||
LPCSTR DXErrorToString (HRESULT error);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
#endif // __DX_ERROR_H__
|
|
@ -1,677 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief faB's DirectX library v1.0
|
||||
/// - converted to C for Doom Legacy
|
||||
|
||||
#include "../doomdef.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include "../i_system.h"
|
||||
#include "dx_error.h"
|
||||
|
||||
#include "fabdxlib.h"
|
||||
|
||||
#define NT4COMPAT //always defined, always compatible
|
||||
|
||||
|
||||
// globals
|
||||
|
||||
IDirectDraw2* DDr2 = NULL;
|
||||
IDirectDrawSurface* ScreenReal = NULL; // DirectDraw primary surface
|
||||
IDirectDrawSurface* ScreenVirtual = NULL; // DirectDraw back surface
|
||||
IDirectDrawPalette* DDPalette = NULL; // The primary surface palette
|
||||
static IDirectDrawClipper *windclip = NULL; // clipper for windowed mode
|
||||
|
||||
BOOL bAppFullScreen; // true for fullscreen exclusive mode,
|
||||
|
||||
int windowPosX = 0; // current position in windowed mode
|
||||
int windowPosY = 0;
|
||||
|
||||
int ScreenWidth;
|
||||
int ScreenHeight;
|
||||
BOOL ScreenLocked; // Screen surface is being locked
|
||||
int ScreenPitch; // offset from one line to the next
|
||||
LPBYTE ScreenPtr; // memory of the surface
|
||||
|
||||
|
||||
//
|
||||
// CreateNewSurface
|
||||
//
|
||||
static inline IDirectDrawSurface* CreateNewSurface(int dwWidth,
|
||||
int dwHeight,
|
||||
int dwSurfaceCaps)
|
||||
{
|
||||
DDSURFACEDESC ddsd;
|
||||
HRESULT hr;
|
||||
LPDIRECTDRAWSURFACE psurf;
|
||||
|
||||
ZeroMemory(&ddsd, sizeof (ddsd));
|
||||
ddsd.dwSize = sizeof (ddsd);
|
||||
ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT |DDSD_WIDTH;
|
||||
|
||||
ddsd.ddsCaps.dwCaps = dwSurfaceCaps;
|
||||
|
||||
ddsd.dwHeight = dwHeight;
|
||||
ddsd.dwWidth = dwWidth;
|
||||
|
||||
hr = IDirectDraw2_CreateSurface (DDr2, &ddsd, &psurf, NULL);
|
||||
|
||||
if (hr == DD_OK)
|
||||
{
|
||||
//DDCOLORKEY ddck;
|
||||
IDirectDrawSurface_Restore(psurf);
|
||||
|
||||
//hr = IDirectDrawSurface_GetColorKey(DDCKEY_SRCBLT, &ddck);
|
||||
//psurf->SetColorKey(DDCKEY_SRCBLT, &ddck);
|
||||
}
|
||||
else
|
||||
psurf = NULL;
|
||||
|
||||
return psurf;
|
||||
}
|
||||
|
||||
//
|
||||
// wow! from 320x200x8 up to 1600x1200x32 thanks Banshee! :)
|
||||
//
|
||||
static HRESULT WINAPI myEnumModesCallback (LPDDSURFACEDESC surf, LPVOID lpContext)
|
||||
{
|
||||
APPENUMMODESCALLBACK pfnContext = lpContext;
|
||||
|
||||
if (pfnContext) pfnContext(surf->dwWidth,
|
||||
surf->dwHeight,surf->ddpfPixelFormat.
|
||||
#ifdef DUMMYUNIONNAMEN
|
||||
DUMMYUNIONNAMEN(1).
|
||||
#endif
|
||||
dwRGBBitCount
|
||||
);
|
||||
|
||||
/*I_OutputMsg("%dx%dx%d bpp %d refresh\n",
|
||||
surf->dwWidth,
|
||||
surf->dwHeight,
|
||||
surf->ddpfPixelFormat.dwRGBBitCount,
|
||||
surf->dwRefreshRate);*/
|
||||
|
||||
return DDENUMRET_OK;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Application call here to enumerate display modes
|
||||
//
|
||||
BOOL EnumDirectDrawDisplayModes (APPENUMMODESCALLBACK appFunc)
|
||||
{
|
||||
LPVOID lpappFunc = appFunc;
|
||||
|
||||
if (DDr2 == NULL)
|
||||
return FALSE;
|
||||
|
||||
// enumerate display modes
|
||||
// Carl: DirectX 3.x apparently does not support VGA modes. Who cares. :)
|
||||
// faB: removed DDEDM_REFRESHRATES, detects too many modes, plus we don't care of refresh rate.
|
||||
if (bDX0300)
|
||||
IDirectDraw2_EnumDisplayModes (DDr2, 0 /*| DDEDM_REFRESHRATES*/,
|
||||
NULL, lpappFunc, myEnumModesCallback);
|
||||
else
|
||||
IDirectDraw2_EnumDisplayModes (DDr2, DDEDM_STANDARDVGAMODES /*| DDEDM_REFRESHRATES*/,
|
||||
NULL, lpappFunc, myEnumModesCallback);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static HINSTANCE DDrawDLL = NULL;
|
||||
typedef HRESULT(WINAPI *DDCreate)(GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter);
|
||||
static DDCreate pfnDirectDrawCreate = NULL;
|
||||
|
||||
static inline BOOL LoadDirectDraw(VOID)
|
||||
{
|
||||
// load ddraw.dll
|
||||
DDrawDLL = LoadLibraryA("DDRAW.DLL");
|
||||
if (DDrawDLL == NULL)
|
||||
return false;
|
||||
pfnDirectDrawCreate = (DDCreate)(LPVOID)GetProcAddress(DDrawDLL, "DirectDrawCreate");
|
||||
if (pfnDirectDrawCreate == NULL)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline VOID UnLoadDirectDraw(VOID)
|
||||
{
|
||||
if (!DDrawDLL)
|
||||
return;
|
||||
FreeLibrary(DDrawDLL);
|
||||
pfnDirectDrawCreate = NULL;
|
||||
DDrawDLL = NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Create the DirectDraw object for later
|
||||
//
|
||||
BOOL CreateDirectDrawInstance (VOID)
|
||||
{
|
||||
HRESULT hr;
|
||||
IDirectDraw* DDr;
|
||||
IDirectDraw** rp = &DDr;
|
||||
IDirectDraw2** rp2 = &DDr2;
|
||||
LPVOID *tp = (LPVOID *)rp2;
|
||||
|
||||
if (!LoadDirectDraw())
|
||||
return FALSE;
|
||||
//
|
||||
// create an instance of DirectDraw object
|
||||
//
|
||||
if (FAILED(hr = pfnDirectDrawCreate(NULL, rp, NULL)))
|
||||
I_Error("DirectDrawCreate FAILED: %s", DXErrorToString(hr));
|
||||
|
||||
// change interface to IDirectDraw2
|
||||
if (FAILED(hr = IDirectDraw_QueryInterface(DDr, &IID_IDirectDraw2, tp)))
|
||||
I_Error("Failed to query DirectDraw2 interface: %s", DXErrorToString(hr));
|
||||
|
||||
// release the interface we don't need
|
||||
IDirectDraw_Release (DDr);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// - returns true if DirectDraw was initialized properly
|
||||
//
|
||||
int InitDirectDrawe (HWND appWin, int width, int height, int bpp, int fullScr)
|
||||
{
|
||||
DDSURFACEDESC ddsd; // DirectDraw surface description for allocating
|
||||
DDSCAPS ddscaps;
|
||||
HRESULT ddrval;
|
||||
|
||||
DWORD dwStyle;
|
||||
RECT rect;
|
||||
|
||||
// enumerate directdraw devices
|
||||
//if (FAILED(DirectDrawEnumerate (myEnumDDDevicesCallback, NULL)))
|
||||
// I_Error("Error with DirectDrawEnumerate");
|
||||
|
||||
if (!DDr2)
|
||||
CreateDirectDrawInstance();
|
||||
|
||||
// remember what screen mode we are in
|
||||
bAppFullScreen = fullScr;
|
||||
ScreenHeight = height;
|
||||
ScreenWidth = width;
|
||||
|
||||
if (bAppFullScreen)
|
||||
{
|
||||
// Change window attributes
|
||||
dwStyle = WS_POPUP | WS_VISIBLE;
|
||||
SetWindowLong (appWin, GWL_STYLE, dwStyle);
|
||||
SetWindowPos(appWin, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE |
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
|
||||
|
||||
// Get exclusive mode
|
||||
ddrval = IDirectDraw2_SetCooperativeLevel(DDr2, appWin, DDSCL_EXCLUSIVE |
|
||||
DDSCL_FULLSCREEN |
|
||||
DDSCL_ALLOWREBOOT);
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("SetCooperativeLevel FAILED: %s\n", DXErrorToString(ddrval));
|
||||
|
||||
// Switch from windows desktop to fullscreen
|
||||
|
||||
#ifdef NT4COMPAT
|
||||
ddrval = IDirectDraw2_SetDisplayMode(DDr2, width, height, bpp, 0, 0);
|
||||
#else
|
||||
ddrval = IDirectDraw2_SetDisplayMode(DDr2, width, height, bpp, 0, DDSDM_STANDARDVGAMODE);
|
||||
#endif
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("SetDisplayMode FAILED: %s\n", DXErrorToString(ddrval));
|
||||
|
||||
// This is not really needed, except in certain cases. One case
|
||||
// is while using MFC. When the desktop is initally at 16bpp, a mode
|
||||
// switch to 8bpp somehow causes the MFC window to not fully initialize
|
||||
// and a CreateSurface will fail with DDERR_NOEXCLUSIVEMODE. This will
|
||||
// ensure that the window is initialized properly after a mode switch.
|
||||
|
||||
ShowWindow(appWin, SW_SHOW);
|
||||
|
||||
// Create the primary surface with 1 back buffer. Always zero the
|
||||
// DDSURFACEDESC structure and set the dwSize member!
|
||||
|
||||
ZeroMemory(&ddsd, sizeof (ddsd));
|
||||
ddsd.dwSize = sizeof (ddsd);
|
||||
ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
|
||||
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;
|
||||
|
||||
// for fullscreen we use page flipping, for windowed mode, we blit the hidden surface to
|
||||
// the visible surface, in both cases we have a visible (or 'real') surface, and a hidden
|
||||
// (or 'virtual', or 'backbuffer') surface.
|
||||
ddsd.dwBackBufferCount = 2;
|
||||
|
||||
ddrval = IDirectDraw2_CreateSurface(DDr2,&ddsd, &ScreenReal, NULL);
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("CreateSurface Primary Screen FAILED");
|
||||
|
||||
// Get a pointer to the back buffer
|
||||
|
||||
ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
|
||||
ddrval = IDirectDrawSurface_GetAttachedSurface(ScreenReal,&ddscaps, &ScreenVirtual);
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("GetAttachedSurface FAILED");
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.top = 0;
|
||||
rect.left = 0;
|
||||
rect.bottom = height;
|
||||
rect.right = width;
|
||||
|
||||
// Change window attributes
|
||||
|
||||
dwStyle = GetWindowStyle(appWin);
|
||||
dwStyle &= ~WS_POPUP;
|
||||
dwStyle |= WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION;
|
||||
|
||||
SetWindowLong(appWin, GWL_STYLE, dwStyle);
|
||||
|
||||
// Resize the window so that the client area is the requested width/height
|
||||
|
||||
AdjustWindowRectEx(&rect, GetWindowStyle(appWin), GetMenu(appWin) != NULL,
|
||||
GetWindowExStyle(appWin));
|
||||
|
||||
// Just in case the window was moved off the visible area of the
|
||||
// screen.
|
||||
|
||||
SetWindowPos(appWin, NULL, 0, 0, rect.right-rect.left,
|
||||
rect.bottom-rect.top, SWP_NOMOVE | SWP_NOZORDER |
|
||||
SWP_NOACTIVATE);
|
||||
|
||||
SetWindowPos(appWin, HWND_NOTOPMOST, 0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
|
||||
|
||||
// Exclusive mode is normal since it's in windowed mode and needs
|
||||
// to cooperate with GDI
|
||||
|
||||
ddrval = IDirectDraw2_SetCooperativeLevel(DDr2,appWin, DDSCL_NORMAL);
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("SetCooperativeLevel FAILED");
|
||||
|
||||
// Always zero the DDSURFACEDESC structure and set the dwSize member!
|
||||
|
||||
ZeroMemory(&ddsd, sizeof (ddsd));
|
||||
ddsd.dwSize = sizeof (ddsd);
|
||||
ddsd.dwFlags = DDSD_CAPS;
|
||||
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
|
||||
|
||||
// Create the primary surface
|
||||
|
||||
ddrval = IDirectDraw2_CreateSurface(DDr2,&ddsd, &ScreenReal, NULL);
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("CreateSurface Primary Screen FAILED");
|
||||
|
||||
// Create a back buffer for offscreen rendering, this will be used to
|
||||
// blt to the primary
|
||||
|
||||
ScreenVirtual = CreateNewSurface(width, height, DDSCAPS_OFFSCREENPLAIN |
|
||||
DDSCAPS_SYSTEMMEMORY);
|
||||
if (ScreenVirtual == NULL)
|
||||
I_Error("CreateSurface Secondary Screen FAILED");
|
||||
|
||||
/// \todo get the desktop bit depth, and build a lookup table
|
||||
/// for quick conversions of 8bit color indexes 0-255 to desktop colors
|
||||
/// eg: 256 entries of equivalent of palette colors 0-255 in 15,16,24,32 bit format
|
||||
/// when blit virtual to real, convert pixels through lookup table..
|
||||
|
||||
// Use a clipper object for clipping when in windowed mode
|
||||
// (make sure our drawing doesn't affect other windows)
|
||||
|
||||
ddrval = IDirectDraw2_CreateClipper (DDr2, 0, &windclip, 0);
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("CreateClipper FAILED");
|
||||
|
||||
// Associate the clipper with the window.
|
||||
ddrval = IDirectDrawClipper_SetHWnd (windclip,0, appWin);
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("Clipper -> SetHWnd FAILED");
|
||||
|
||||
// Attach the clipper to the surface.
|
||||
ddrval = IDirectDrawSurface_SetClipper (ScreenReal,windclip);
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("PrimaryScreen -> SetClipperClipper FAILED");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Free all memory
|
||||
//
|
||||
VOID CloseDirectDraw (VOID)
|
||||
{
|
||||
ReleaseChtuff();
|
||||
if (DDr2)
|
||||
{
|
||||
IDirectDraw2_Release(DDr2);
|
||||
DDr2 = NULL;
|
||||
}
|
||||
UnLoadDirectDraw();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Release DirectDraw stuff before display mode change
|
||||
//
|
||||
VOID ReleaseChtuff (VOID)
|
||||
{
|
||||
if (!DDr2)
|
||||
return;
|
||||
if (windclip)
|
||||
{
|
||||
IDirectDrawClipper_Release(windclip);
|
||||
windclip = NULL;
|
||||
}
|
||||
if (DDPalette)
|
||||
{
|
||||
IDirectDrawPalette_Release(DDPalette);
|
||||
DDPalette = NULL;
|
||||
}
|
||||
// If the app is fullscreen, the back buffer is attached to the
|
||||
// primary. Releasing the primary buffer will also release any
|
||||
// attached buffers, so explicitly releasing the back buffer is not
|
||||
// necessary.
|
||||
|
||||
if (!bAppFullScreen && ScreenVirtual)
|
||||
{
|
||||
IDirectDrawSurface_Release(ScreenVirtual); // release hidden surface
|
||||
ScreenVirtual = NULL;
|
||||
}
|
||||
if (ScreenReal)
|
||||
{
|
||||
IDirectDrawSurface_Release(ScreenReal); // and attached backbuffers for bAppFullScreen mode
|
||||
ScreenReal = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Clear the surface to color
|
||||
//
|
||||
VOID ClearSurface(IDirectDrawSurface* surface, int color)
|
||||
{
|
||||
DDBLTFX ddbltfx;
|
||||
|
||||
// Use the blter to do a color fill to clear the back buffer
|
||||
ddbltfx.dwSize = sizeof (ddbltfx);
|
||||
ddbltfx.
|
||||
#ifdef DUMMYUNIONNAMEN
|
||||
DUMMYUNIONNAMEN(5).
|
||||
#endif
|
||||
dwFillColor = color;
|
||||
IDirectDrawSurface_Blt(surface,NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx);
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Flip the real page with virtual page
|
||||
// - in bAppFullScreen mode, do page flipping
|
||||
// - in windowed mode, copy the hidden surface to the visible surface
|
||||
//
|
||||
// waitflip : if not 0, wait for page flip to end
|
||||
BOOL ScreenFlip(int waitflip)
|
||||
{
|
||||
HRESULT hr;
|
||||
RECT rect;
|
||||
|
||||
if (bAppFullScreen)
|
||||
{
|
||||
//hr = IDirectDrawSurface_GetFlipStatus (ScreenReal, DDGFS_);
|
||||
|
||||
// In full-screen exclusive mode, do a hardware flip.
|
||||
hr = IDirectDrawSurface_Flip(ScreenReal, NULL, DDFLIP_WAIT | (waitflip ? 0 : DDFLIP_NOVSYNC)); //return immediately
|
||||
|
||||
// If the surface was lost, restore it.
|
||||
if (hr == DDERR_SURFACELOST)
|
||||
{
|
||||
IDirectDrawSurface_Restore(ScreenReal);
|
||||
|
||||
// The restore worked, so try the flip again.
|
||||
hr = IDirectDrawSurface_Flip(ScreenReal, 0, DDFLIP_WAIT | (waitflip ? 0 : DDFLIP_NOVSYNC));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.left = windowPosX;
|
||||
rect.top = windowPosY;
|
||||
rect.right = windowPosX + ScreenWidth - 1;
|
||||
rect.bottom = windowPosY + ScreenHeight - 1;
|
||||
|
||||
// Copy the back buffer to front.
|
||||
hr = IDirectDrawSurface_Blt(ScreenReal, &rect, ScreenVirtual, 0, DDBLT_WAIT, 0);
|
||||
|
||||
if (hr != DD_OK)
|
||||
{
|
||||
// If the surfaces were lost, restore them.
|
||||
if (IDirectDrawSurface_IsLost(ScreenReal) == DDERR_SURFACELOST)
|
||||
IDirectDrawSurface_Restore(ScreenReal);
|
||||
|
||||
if (IDirectDrawSurface_IsLost(ScreenVirtual) == DDERR_SURFACELOST)
|
||||
IDirectDrawSurface_Restore(ScreenVirtual);
|
||||
|
||||
// Retry the copy.
|
||||
hr = IDirectDrawSurface_Blt(ScreenReal,&rect, ScreenVirtual, 0, DDBLT_WAIT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (hr != DD_OK)
|
||||
I_Error("ScreenFlip() : couldn't Flip surfaces because %s", DXErrorToString(hr));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
// Print a text to the surface
|
||||
//
|
||||
VOID TextPrint(int x, int y, LPCSTR message)
|
||||
{
|
||||
HRESULT hr;
|
||||
HDC hdc = NULL;
|
||||
|
||||
// Get the device context handle.
|
||||
hr = IDirectDrawSurface_GetDC(ScreenVirtual,&hdc);
|
||||
if (hr != DD_OK)
|
||||
return;
|
||||
|
||||
// Write the message.
|
||||
SetBkMode(hdc, TRANSPARENT);
|
||||
SetTextColor(hdc, RGB(255, 255, 255));
|
||||
TextOutA(hdc, x, y, message, (int)strlen(message));
|
||||
|
||||
// Release the device context.
|
||||
hr = IDirectDrawSurface_ReleaseDC(ScreenVirtual,hdc);
|
||||
}
|
||||
|
||||
//
|
||||
// Lock surface before multiple drawings by hand, for speed
|
||||
//
|
||||
boolean LockScreen(VOID)
|
||||
{
|
||||
DDSURFACEDESC ddsd;
|
||||
HRESULT ddrval;
|
||||
|
||||
ZeroMemory(&ddsd, sizeof (ddsd));
|
||||
ddsd.dwSize = sizeof (ddsd);
|
||||
|
||||
// attempt to Lock the surface
|
||||
ddrval = IDirectDrawSurface_Lock(ScreenVirtual, NULL, &ddsd, DDLOCK_WAIT, NULL);
|
||||
|
||||
// Always, always check for errors with DirectX!
|
||||
// If the surface was lost, restore it.
|
||||
if (ddrval == DDERR_SURFACELOST)
|
||||
{
|
||||
ddrval = IDirectDrawSurface_Restore(ScreenReal);
|
||||
|
||||
// now retry to get the lock
|
||||
ddrval = IDirectDrawSurface_Lock(ScreenVirtual, NULL, &ddsd, DDLOCK_WAIT, NULL);
|
||||
}
|
||||
|
||||
if (ddrval == DD_OK)
|
||||
{
|
||||
ScreenLocked = TRUE;
|
||||
ScreenPtr = (LPBYTE)ddsd.lpSurface;
|
||||
ScreenPitch = ddsd.
|
||||
#ifdef DUMMYUNIONNAMEN
|
||||
DUMMYUNIONNAMEN(1).
|
||||
#endif
|
||||
lPitch;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenLocked = FALSE;
|
||||
ScreenPtr = NULL;
|
||||
ScreenPitch = 0;
|
||||
//I_Error("LockScreen() : couldn't restore the surface.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// Unlock surface
|
||||
//
|
||||
VOID UnlockScreen(VOID)
|
||||
{
|
||||
if (DD_OK != IDirectDrawSurface_Unlock(ScreenVirtual,NULL))
|
||||
I_Error("Couldn't UnLock the renderer!");
|
||||
|
||||
ScreenLocked = FALSE;
|
||||
ScreenPtr = NULL;
|
||||
ScreenPitch = 0;
|
||||
}
|
||||
|
||||
// Blit virtual screen to real screen
|
||||
//faB: note: testing 14/03/1999, see if it is faster than memcopy of virtual to
|
||||
/*
|
||||
static LPDIRECTDRAWSURFACE lpDDS = NULL;
|
||||
VOID BlitScreen(VOID)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
if (!lpDDS)
|
||||
I_Error("lpDDS NULL");
|
||||
|
||||
hr = IDirectDrawSurface_BltFast(ScreenVirtual,
|
||||
0, 0, // Upper left xy of destination
|
||||
lpDDS, // Source surface
|
||||
NULL, // Source rectangle = entire surface
|
||||
DDBLTFAST_WAIT | DDBLTFAST_NOCOLORKEY);
|
||||
if (FAILED(hr))
|
||||
I_Error("BltFast FAILED");
|
||||
}
|
||||
|
||||
VOID MakeScreen(int width, int height, BYTE* lpSurface)
|
||||
{
|
||||
HRESULT hr;
|
||||
DDSURFACEDESC ddsd;
|
||||
|
||||
// Initialize the surface description.
|
||||
ZeroMemory (&ddsd, sizeof ddsd);
|
||||
ZeroMemory (&ddsd.ddpfPixelFormat, sizeof (DDPIXELFORMAT));
|
||||
ddsd.dwSize = sizeof ddsd;
|
||||
ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | //DDSD_LPSURFACE |
|
||||
DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_CAPS;
|
||||
ddsd.dwWidth = width;
|
||||
ddsd.dwHeight= height;
|
||||
ddsd.lPitch = width;
|
||||
ddsd.lpSurface = lpSurface;
|
||||
ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN;
|
||||
|
||||
// Set up the pixel format for 8-bit
|
||||
ddsd.ddpfPixelFormat.dwSize = sizeof (DDPIXELFORMAT);
|
||||
ddsd.ddpfPixelFormat.dwFlags= DDPF_RGB | DDPF_PALETTEINDEXED8;
|
||||
ddsd.ddpfPixelFormat.dwRGBBitCount = 8;
|
||||
|
||||
//
|
||||
ddsd.ddpfPixelFormat.dwRGBBitCount = (DWORD)DEPTH*8;
|
||||
ddsd.ddpfPixelFormat.dwRBitMask = 0x00FF0000;
|
||||
ddsd.ddpfPixelFormat.dwGBitMask = 0x0000FF00;
|
||||
ddsd.ddpfPixelFormat.dwBBitMask = 0x000000FF;
|
||||
|
||||
// Create the surface
|
||||
hr = IDirectDraw2_CreateSurface(DDr2, &ddsd, &lpDDS, NULL);
|
||||
if (FAILED(hr))
|
||||
I_Error("MakeScreen FAILED: %s",DDError(hr));
|
||||
//ddsd.lpSurface = lpSurface;
|
||||
}
|
||||
*/
|
||||
|
||||
//
|
||||
// Create a palette object
|
||||
//
|
||||
VOID CreateDDPalette (PALETTEENTRY* colorTable)
|
||||
{
|
||||
HRESULT ddrval;
|
||||
ddrval = IDirectDraw2_CreatePalette(DDr2,DDPCAPS_8BIT|DDPCAPS_ALLOW256, colorTable, &DDPalette, NULL);
|
||||
if (ddrval != DD_OK)
|
||||
I_Error("couldn't CreatePalette");
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Free the palette object
|
||||
//
|
||||
VOID DestroyDDPalette (VOID)
|
||||
{
|
||||
if (DDPalette)
|
||||
{
|
||||
IDirectDrawPalette_Release(DDPalette);
|
||||
DDPalette = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Set a a full palette of 256 PALETTEENTRY entries
|
||||
//
|
||||
VOID SetDDPalette(PALETTEENTRY* pal)
|
||||
{
|
||||
// create palette first time
|
||||
if (DDPalette == NULL)
|
||||
CreateDDPalette(pal);
|
||||
else
|
||||
IDirectDrawPalette_SetEntries(DDPalette, 0, 0, 256, pal);
|
||||
// setting the same palette to the same surface again does not increase
|
||||
// the reference count
|
||||
IDirectDrawSurface_SetPalette(ScreenReal, DDPalette);
|
||||
}
|
||||
|
||||
//
|
||||
// Wait for vsync, gross
|
||||
//
|
||||
VOID WaitVbl(VOID)
|
||||
{
|
||||
IDirectDraw2_WaitForVerticalBlank(DDr2, DDWAITVB_BLOCKBEGIN, NULL);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Restore the palette. Useful when we regain focus.
|
||||
//
|
||||
VOID RestoreDDPalette(VOID)
|
||||
{
|
||||
if (DDPalette)
|
||||
IDirectDrawSurface_SetPalette(ScreenReal, DDPalette);
|
||||
}
|
||||
#endif
|
|
@ -1,82 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief faB's DirectX library v1.0
|
||||
|
||||
#ifndef _H_FABDXLIB_
|
||||
#define _H_FABDXLIB_
|
||||
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#ifdef __MINGW32__
|
||||
//#define NONAMELESSUNION
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <ddraw.h>
|
||||
#if (defined (DIRECTDRAW_VERSION) && (DIRECTDRAW_VERSION >= 0x0700))
|
||||
#undef DUMMYUNIONNAMEN
|
||||
#endif
|
||||
// format of function in app called with width,height
|
||||
typedef BOOL (*APPENUMMODESCALLBACK)(int width, int height, int bpp);
|
||||
|
||||
|
||||
// globals
|
||||
extern IDirectDraw2* DDr2;
|
||||
extern IDirectDrawSurface* ScreenReal;
|
||||
extern IDirectDrawSurface* ScreenVirtual;
|
||||
extern IDirectDrawPalette* DDPalette;
|
||||
|
||||
extern BOOL bAppFullScreen; // main code might need this to know the current
|
||||
// fullscreen or windowed state
|
||||
|
||||
extern int windowPosX; // current position in windowed mode
|
||||
extern int windowPosY;
|
||||
|
||||
extern int ScreenWidth;
|
||||
extern int ScreenHeight;
|
||||
extern BOOL ScreenLocked; // Screen surface is being locked
|
||||
extern int ScreenPitch; // offset from one line to the next
|
||||
extern LPBYTE ScreenPtr; // memory of the surface
|
||||
|
||||
extern BOOL bDX0300;
|
||||
|
||||
BOOL EnumDirectDrawDisplayModes (APPENUMMODESCALLBACK appFunc);
|
||||
BOOL CreateDirectDrawInstance (VOID);
|
||||
|
||||
int InitDirectDrawe (HWND appWin, int width, int height, int bpp, int fullScr);
|
||||
VOID CloseDirectDraw (VOID);
|
||||
|
||||
VOID ReleaseChtuff (VOID);
|
||||
|
||||
VOID ClearSurface (IDirectDrawSurface* surface, int color);
|
||||
BOOL ScreenFlip (int wait);
|
||||
VOID TextPrint (int x, int y, LPCSTR message);
|
||||
|
||||
VOID CreateDDPalette (PALETTEENTRY* colorTable);
|
||||
VOID DestroyDDPalette (VOID);
|
||||
VOID SetDDPalette (PALETTEENTRY* pal);
|
||||
VOID RestoreDDPalette(VOID);
|
||||
|
||||
VOID WaitVbl (VOID);
|
||||
|
||||
boolean LockScreen (VOID);
|
||||
VOID UnlockScreen (VOID);
|
||||
|
||||
|
||||
#endif /* _H_FABDXLIB_ */
|
|
@ -1,539 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief cd music interface (uses MCI).
|
||||
|
||||
#include "../doomdef.h"
|
||||
#include "../doomstat.h"
|
||||
#ifdef _WINDOWS
|
||||
#include "win_main.h"
|
||||
#include <mmsystem.h>
|
||||
|
||||
#include "../command.h"
|
||||
#include "../doomtype.h"
|
||||
#include "../i_sound.h"
|
||||
#include "../i_system.h"
|
||||
|
||||
#include "../s_sound.h"
|
||||
|
||||
#define MAX_CD_TRACKS 255
|
||||
|
||||
typedef struct {
|
||||
BOOL IsAudio;
|
||||
DWORD Start, End;
|
||||
DWORD Length; // minutes
|
||||
} CDTrack;
|
||||
|
||||
// -------
|
||||
// private
|
||||
// -------
|
||||
static CDTrack m_nTracks[MAX_CD_TRACKS];
|
||||
static int m_nTracksCount; // up to MAX_CD_TRACKS
|
||||
static MCI_STATUS_PARMS m_MCIStatus;
|
||||
static MCI_OPEN_PARMS m_MCIOpen;
|
||||
|
||||
// ------
|
||||
// protos
|
||||
// ------
|
||||
static void Command_Cd_f (void);
|
||||
|
||||
|
||||
// -------------------
|
||||
// MCIErrorMessageBox
|
||||
// Retrieve error message corresponding to return value from
|
||||
// mciSendCommand() or mciSenString()
|
||||
// -------------------
|
||||
static VOID MCIErrorMessageBox (MCIERROR iErrorCode)
|
||||
{
|
||||
char szErrorText[128];
|
||||
if (!mciGetErrorStringA (iErrorCode, szErrorText, sizeof (szErrorText)))
|
||||
wsprintfA(szErrorText,"MCI CD Audio Unknown Error #%lu\n", iErrorCode);
|
||||
I_OutputMsg("%s", szErrorText);
|
||||
/*MessageBox (GetActiveWindow(), szTemp+1, "LEGACY",
|
||||
MB_OK | MB_ICONSTOP);*/
|
||||
}
|
||||
|
||||
|
||||
// --------
|
||||
// CD_Reset
|
||||
// --------
|
||||
static VOID CD_Reset (VOID)
|
||||
{
|
||||
// no win32 equivalent
|
||||
//faB: for DOS, some odd drivers like to be reset sometimes.. useless in MCI I guess
|
||||
}
|
||||
|
||||
|
||||
// ----------------
|
||||
// CD_ReadTrackInfo
|
||||
// Read in number of tracks, and length of each track in minutes/seconds
|
||||
// returns true if error
|
||||
// ----------------
|
||||
static BOOL CD_ReadTrackInfo(VOID)
|
||||
{
|
||||
UINT nTrackLength;
|
||||
INT i;
|
||||
MCIERROR iErr;
|
||||
|
||||
m_nTracksCount = 0;
|
||||
|
||||
m_MCIStatus.dwItem = MCI_STATUS_NUMBER_OF_TRACKS;
|
||||
iErr = mciSendCommand(m_MCIOpen.wDeviceID, MCI_STATUS, MCI_STATUS_ITEM|MCI_WAIT, (DWORD_PTR)&m_MCIStatus);
|
||||
if (iErr)
|
||||
{
|
||||
MCIErrorMessageBox (iErr);
|
||||
return FALSE;
|
||||
}
|
||||
m_nTracksCount = (int)m_MCIStatus.dwReturn;
|
||||
if (m_nTracksCount > MAX_CD_TRACKS)
|
||||
m_nTracksCount = MAX_CD_TRACKS;
|
||||
|
||||
for (i = 0; i < m_nTracksCount; i++)
|
||||
{
|
||||
m_MCIStatus.dwTrack = (DWORD)(i+1);
|
||||
m_MCIStatus.dwItem = MCI_STATUS_LENGTH;
|
||||
iErr = mciSendCommand(m_MCIOpen.wDeviceID, MCI_STATUS, MCI_TRACK|MCI_STATUS_ITEM|MCI_WAIT, (DWORD_PTR)&m_MCIStatus);
|
||||
if (iErr)
|
||||
{
|
||||
MCIErrorMessageBox (iErr);
|
||||
return FALSE;
|
||||
}
|
||||
nTrackLength = (DWORD)(MCI_MSF_MINUTE(m_MCIStatus.dwReturn)*60 + MCI_MSF_SECOND(m_MCIStatus.dwReturn));
|
||||
m_nTracks[i].Length = nTrackLength;
|
||||
|
||||
m_MCIStatus.dwItem = MCI_CDA_STATUS_TYPE_TRACK;
|
||||
iErr = mciSendCommand(m_MCIOpen.wDeviceID, MCI_STATUS, MCI_TRACK|MCI_STATUS_ITEM|MCI_WAIT, (DWORD_PTR)&m_MCIStatus);
|
||||
if (iErr)
|
||||
{
|
||||
MCIErrorMessageBox (iErr);
|
||||
return FALSE;
|
||||
}
|
||||
m_nTracks[i].IsAudio = (m_MCIStatus.dwReturn == MCI_CDA_TRACK_AUDIO);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// ------------
|
||||
// CD_TotalTime
|
||||
// returns total time for all audio tracks in seconds
|
||||
// ------------
|
||||
static UINT CD_TotalTime(VOID)
|
||||
{
|
||||
UINT nTotalLength = 0;
|
||||
INT nTrack;
|
||||
for (nTrack = 0; nTrack < m_nTracksCount; nTrack++)
|
||||
{
|
||||
if (m_nTracks[nTrack].IsAudio)
|
||||
nTotalLength += m_nTracks[nTrack].Length;
|
||||
}
|
||||
return nTotalLength;
|
||||
}
|
||||
|
||||
|
||||
//======================================================================
|
||||
// CD AUDIO MUSIC SUBSYSTEM
|
||||
//======================================================================
|
||||
|
||||
UINT8 cdaudio_started = 0; // for system startup/shutdown
|
||||
|
||||
static BOOL cdPlaying = FALSE;
|
||||
static INT cdPlayTrack; // when cdPlaying is true
|
||||
static BOOL cdLooping = FALSE;
|
||||
static BYTE cdRemap[MAX_CD_TRACKS];
|
||||
static BOOL cdEnabled = TRUE; // cd info available
|
||||
static BOOL cdValid; // true when last cd audio info was ok
|
||||
static BOOL wasPlaying;
|
||||
//static INT cdVolume = 0; // current cd volume (0-31)
|
||||
|
||||
// 0-31 like Music & Sfx, though CD hardware volume is 0-255.
|
||||
consvar_t cd_volume = CVAR_INIT ("cd_volume","18",CV_SAVE,soundvolume_cons_t, NULL);
|
||||
|
||||
// allow Update for next/loop track
|
||||
// some crap cd drivers take up to
|
||||
// a second for a simple 'busy' check..
|
||||
// (on those Update can be disabled)
|
||||
consvar_t cdUpdate = CVAR_INIT ("cd_update","1",CV_SAVE, NULL, NULL);
|
||||
|
||||
#if (__GNUC__ > 6)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-overflow"
|
||||
#endif
|
||||
// hour,minutes,seconds
|
||||
static LPSTR hms(UINT seconds)
|
||||
{
|
||||
UINT hours, minutes;
|
||||
static CHAR s[9];
|
||||
|
||||
minutes = seconds / 60;
|
||||
seconds %= 60;
|
||||
hours = minutes / 60;
|
||||
minutes %= 60;
|
||||
if (hours > 0)
|
||||
sprintf (s, "%lu:%02lu:%02lu", (long unsigned int)hours, (long unsigned int)minutes, (long unsigned int)seconds);
|
||||
else
|
||||
sprintf (s, "%2lu:%02lu", (long unsigned int)minutes, (long unsigned int)seconds);
|
||||
return s;
|
||||
}
|
||||
#if (__GNUC__ > 6)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
static void Command_Cd_f(void)
|
||||
{
|
||||
LPCSTR s;
|
||||
int i,j;
|
||||
|
||||
if (!cdaudio_started)
|
||||
return;
|
||||
|
||||
if (COM_Argc() < 2)
|
||||
{
|
||||
CONS_Printf (M_GetText(
|
||||
"cd [on] [off] [remap] [reset] [select]\n"
|
||||
" [open] [info] [play <track>] [resume]\n"
|
||||
" [stop] [pause] [loop <track>]\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
s = COM_Argv(1);
|
||||
|
||||
// activate cd music
|
||||
if (!strncmp(s,"on",2))
|
||||
{
|
||||
cdEnabled = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
// stop/deactivate cd music
|
||||
if (!strncmp(s, "off", 3))
|
||||
{
|
||||
if (cdPlaying)
|
||||
I_StopCD();
|
||||
cdEnabled = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
// remap tracks
|
||||
if (!strncmp(s, "remap", 5))
|
||||
{
|
||||
i = (int)COM_Argc() - 2;
|
||||
if (i <= 0)
|
||||
{
|
||||
CONS_Printf(M_GetText("CD tracks remapped in that order :\n"));
|
||||
for (j = 1; j < MAX_CD_TRACKS; j++)
|
||||
if (cdRemap[j] != j)
|
||||
CONS_Printf(" %2d -> %2d\n", j, cdRemap[j]);
|
||||
return;
|
||||
}
|
||||
for (j = 1; j <= i; j++)
|
||||
cdRemap[j] = (UINT8)atoi(COM_Argv(j+1));
|
||||
return;
|
||||
}
|
||||
|
||||
// reset the CD driver, useful on some odd cd's
|
||||
if (!strncmp(s,"reset",5))
|
||||
{
|
||||
cdEnabled = TRUE;
|
||||
if (cdPlaying)
|
||||
I_StopCD ();
|
||||
for (i = 0; i < MAX_CD_TRACKS; i++)
|
||||
cdRemap[i] = (UINT8)i;
|
||||
CD_Reset();
|
||||
cdValid = CD_ReadTrackInfo();
|
||||
return;
|
||||
}
|
||||
|
||||
// any other command is not allowed until we could retrieve cd information
|
||||
if (!cdValid)
|
||||
{
|
||||
CONS_Printf(M_GetText("CD is not ready.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
/* faB: not with MCI, didn't find it, useless anyway
|
||||
if (!strncmp(s,"open",4))
|
||||
{
|
||||
if (cdPlaying)
|
||||
I_StopCD ();
|
||||
bcd_open_door();
|
||||
cdValid = FALSE;
|
||||
return;
|
||||
}*/
|
||||
|
||||
if (!strncmp(s,"info",4))
|
||||
{
|
||||
if (!CD_ReadTrackInfo())
|
||||
{
|
||||
cdValid = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
cdValid = TRUE;
|
||||
|
||||
if (m_nTracksCount <= 0)
|
||||
CONS_Printf(M_GetText("No audio tracks\n"));
|
||||
else
|
||||
{
|
||||
// display list of tracks
|
||||
// highlight current playing track
|
||||
for (i = 0; i < m_nTracksCount; i++)
|
||||
{
|
||||
CONS_Printf("%s%2d. %s %s\n",
|
||||
cdPlaying && (cdPlayTrack == i) ? "\x82 " : " ",
|
||||
i+1, m_nTracks[i].IsAudio ? M_GetText("audio") : M_GetText("data "),
|
||||
hms(m_nTracks[i].Length));
|
||||
}
|
||||
CONS_Printf(M_GetText("\x82Total time : %s\n"), hms(CD_TotalTime()));
|
||||
}
|
||||
if (cdPlaying)
|
||||
{
|
||||
CONS_Printf(M_GetText("Currently %s track %u\n"), cdLooping ? M_GetText("looping") : M_GetText("playing"), cdPlayTrack);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strncmp(s,"play",4))
|
||||
{
|
||||
I_PlayCD ((UINT8)atoi (COM_Argv (2)), false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strncmp(s,"stop",4))
|
||||
{
|
||||
I_StopCD ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strncmp(s,"loop",4))
|
||||
{
|
||||
I_PlayCD((UINT8)atoi (COM_Argv (2)), true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strncmp(s,"resume",4))
|
||||
{
|
||||
I_ResumeCD ();
|
||||
return;
|
||||
}
|
||||
|
||||
CONS_Printf (M_GetText("Invalid CD command \"CD %s\"\n"), s);
|
||||
}
|
||||
|
||||
|
||||
// ------------
|
||||
// I_ShutdownCD
|
||||
// Shutdown CD Audio subsystem, release whatever was allocated
|
||||
// ------------
|
||||
void I_ShutdownCD(void)
|
||||
{
|
||||
MCIERROR iErr;
|
||||
|
||||
if (!cdaudio_started)
|
||||
return;
|
||||
|
||||
CONS_Printf("I_ShutdownCD: ");
|
||||
|
||||
I_StopCD();
|
||||
|
||||
// closes MCI CD
|
||||
iErr = mciSendCommand(m_MCIOpen.wDeviceID, MCI_CLOSE, 0, 0);
|
||||
if (iErr)
|
||||
MCIErrorMessageBox (iErr);
|
||||
}
|
||||
|
||||
|
||||
// --------
|
||||
// I_InitCD
|
||||
// Init CD Audio subsystem
|
||||
// --------
|
||||
void I_InitCD(void)
|
||||
{
|
||||
MCI_SET_PARMS mciSet;
|
||||
MCIERROR iErr;
|
||||
int i;
|
||||
|
||||
// We don't have an open device yet
|
||||
m_MCIOpen.wDeviceID = 0;
|
||||
m_nTracksCount = 0;
|
||||
|
||||
cdaudio_started = false;
|
||||
|
||||
m_MCIOpen.lpstrDeviceType = (LPCTSTR)MCI_DEVTYPE_CD_AUDIO;
|
||||
iErr = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE|MCI_OPEN_TYPE_ID, (DWORD_PTR)&m_MCIOpen);
|
||||
if (iErr)
|
||||
{
|
||||
MCIErrorMessageBox (iErr);
|
||||
return;
|
||||
}
|
||||
|
||||
// Set the time format to track/minute/second/frame (TMSF).
|
||||
mciSet.dwTimeFormat = MCI_FORMAT_TMSF;
|
||||
iErr = mciSendCommand(m_MCIOpen.wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD_PTR)&mciSet);
|
||||
if (iErr)
|
||||
{
|
||||
MCIErrorMessageBox (iErr);
|
||||
mciSendCommand(m_MCIOpen.wDeviceID, MCI_CLOSE, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
I_AddExitFunc (I_ShutdownCD);
|
||||
cdaudio_started = true;
|
||||
|
||||
CONS_Printf (M_GetText("CD audio Initialized\n"));
|
||||
|
||||
// last saved in config.cfg
|
||||
i = cd_volume.value;
|
||||
//I_SetVolumeCD (0); // initialize to 0 for some odd cd drivers
|
||||
I_SetVolumeCD (i); // now set the last saved volume
|
||||
|
||||
for (i = 0; i < MAX_CD_TRACKS; i++)
|
||||
cdRemap[i] = (UINT8)i;
|
||||
|
||||
if (!CD_ReadTrackInfo())
|
||||
{
|
||||
CONS_Printf(M_GetText("No CD in drive\n"));
|
||||
cdEnabled = FALSE;
|
||||
cdValid = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
cdEnabled = TRUE;
|
||||
cdValid = TRUE;
|
||||
}
|
||||
|
||||
COM_AddCommand ("cd", Command_Cd_f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// loop/go to next track when track is finished (if cd_update var is true)
|
||||
// update the volume when it has changed (from console/menu)
|
||||
void I_UpdateCD(void)
|
||||
{
|
||||
/// \todo check for cd change and restart music ?
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
void I_PlayCD(UINT8 nTrack, UINT8 bLooping)
|
||||
{
|
||||
MCI_PLAY_PARMS mciPlay;
|
||||
MCIERROR iErr;
|
||||
|
||||
if (!cdaudio_started || !cdEnabled)
|
||||
return;
|
||||
|
||||
//faB: try again if it didn't work (just free the user of typing 'cd reset' command)
|
||||
if (!cdValid)
|
||||
cdValid = CD_ReadTrackInfo();
|
||||
if (!cdValid)
|
||||
return;
|
||||
|
||||
// tracks start at 0 in the code..
|
||||
nTrack--;
|
||||
if (nTrack >= m_nTracksCount)
|
||||
nTrack = (UINT8) (nTrack % m_nTracksCount);
|
||||
|
||||
nTrack = cdRemap[nTrack];
|
||||
|
||||
if (cdPlaying)
|
||||
{
|
||||
if (cdPlayTrack == nTrack)
|
||||
return;
|
||||
I_StopCD ();
|
||||
}
|
||||
|
||||
cdPlayTrack = nTrack;
|
||||
|
||||
if (!m_nTracks[nTrack].IsAudio)
|
||||
{
|
||||
//I_OutputMsg("\x82""CD Play: not an audio track\n"); // Tails 03-25-2001
|
||||
return;
|
||||
}
|
||||
|
||||
cdLooping = bLooping;
|
||||
|
||||
//faB: stop MIDI music, MIDI music will restart if volume is upped later
|
||||
cv_digmusicvolume.value = 0;
|
||||
cv_midimusicvolume.value = 0;
|
||||
I_StopSong();
|
||||
|
||||
//faB: I don't use the notify message, I'm trying to minimize the delay
|
||||
mciPlay.dwCallback = (DWORD)((size_t)hWndMain);
|
||||
mciPlay.dwFrom = MCI_MAKE_TMSF(nTrack+1, 0, 0, 0);
|
||||
iErr = mciSendCommand(m_MCIOpen.wDeviceID, MCI_PLAY, MCI_FROM|MCI_NOTIFY, (DWORD_PTR)&mciPlay);
|
||||
if (iErr)
|
||||
{
|
||||
MCIErrorMessageBox (iErr);
|
||||
cdValid = FALSE;
|
||||
cdPlaying = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
cdPlaying = TRUE;
|
||||
}
|
||||
|
||||
|
||||
// pause cd music
|
||||
void I_StopCD(void)
|
||||
{
|
||||
MCIERROR iErr;
|
||||
|
||||
if (!cdaudio_started || !cdEnabled)
|
||||
return;
|
||||
|
||||
iErr = mciSendCommand(m_MCIOpen.wDeviceID, MCI_PAUSE, MCI_WAIT, 0);
|
||||
if (iErr)
|
||||
MCIErrorMessageBox (iErr);
|
||||
else
|
||||
{
|
||||
wasPlaying = cdPlaying;
|
||||
cdPlaying = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// continue after a pause
|
||||
void I_ResumeCD(void)
|
||||
{
|
||||
MCIERROR iErr;
|
||||
|
||||
if (!cdaudio_started || !cdEnabled)
|
||||
return;
|
||||
|
||||
if (!cdValid)
|
||||
return;
|
||||
|
||||
if (!wasPlaying)
|
||||
return;
|
||||
|
||||
iErr = mciSendCommand(m_MCIOpen.wDeviceID, MCI_RESUME, MCI_WAIT, 0);
|
||||
if (iErr)
|
||||
MCIErrorMessageBox (iErr);
|
||||
else
|
||||
cdPlaying = TRUE;
|
||||
}
|
||||
|
||||
|
||||
// volume : logical cd audio volume 0-31 (hardware is 0-255)
|
||||
boolean I_SetVolumeCD (INT32 volume)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(volume);
|
||||
return false;
|
||||
}
|
||||
#endif
|
|
@ -1,238 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief load and initialise the 3D driver DLL
|
||||
|
||||
#include "../doomdef.h"
|
||||
#ifdef HWRENDER
|
||||
#include "../hardware/hw_drv.h" // get the standard 3D Driver DLL exports prototypes
|
||||
#endif
|
||||
|
||||
#ifdef HW3SOUND
|
||||
#include "../hardware/hw3dsdrv.h" // get the 3D sound driver DLL export prototypes
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
#include "win_dll.h"
|
||||
#include "win_main.h" // I_ShowLastError()
|
||||
|
||||
#if defined(HWRENDER) || defined(HW3SOUND)
|
||||
typedef struct loadfunc_s {
|
||||
LPCSTR fnName;
|
||||
LPVOID fnPointer;
|
||||
} loadfunc_t;
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Load a DLL, returns the HMODULE handle or NULL
|
||||
// --------------------------------------------------------------------------
|
||||
static HMODULE LoadDLL (LPCSTR dllName, loadfunc_t *funcTable)
|
||||
{
|
||||
LPVOID funcPtr;
|
||||
loadfunc_t *loadfunc;
|
||||
HMODULE hModule;
|
||||
|
||||
if ((hModule = LoadLibraryA(dllName)) != NULL)
|
||||
{
|
||||
// get function pointers for all functions we use
|
||||
for (loadfunc = funcTable; loadfunc->fnName != NULL; loadfunc++)
|
||||
{
|
||||
funcPtr = GetProcAddress(hModule, loadfunc->fnName);
|
||||
if (!funcPtr) {
|
||||
I_ShowLastError(FALSE);
|
||||
MessageBoxA(NULL, va("The '%s' haven't the good specification (function %s missing)\n\n"
|
||||
"You must use dll from the same zip of this exe\n", dllName, loadfunc->fnName),
|
||||
"Error", MB_OK|MB_ICONINFORMATION);
|
||||
return FALSE;
|
||||
}
|
||||
// store function address
|
||||
*((LPVOID*)loadfunc->fnPointer) = funcPtr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
I_ShowLastError(FALSE);
|
||||
MessageBoxA(NULL, va("LoadLibrary() FAILED : couldn't load '%s'\r\n", dllName), "Warning", MB_OK|MB_ICONINFORMATION);
|
||||
}
|
||||
|
||||
return hModule;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Unload the DLL
|
||||
// --------------------------------------------------------------------------
|
||||
static VOID UnloadDLL (HMODULE* pModule)
|
||||
{
|
||||
if (FreeLibrary(*pModule))
|
||||
*pModule = NULL;
|
||||
else
|
||||
I_ShowLastError(TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
// ==========================================================================
|
||||
// STANDARD 3D DRIVER DLL FOR DOOM LEGACY
|
||||
// ==========================================================================
|
||||
|
||||
// note : the 3D driver loading should be put somewhere else..
|
||||
|
||||
#ifdef HWRENDER
|
||||
static HMODULE hwdModule = NULL;
|
||||
|
||||
static loadfunc_t hwdFuncTable[] = {
|
||||
#ifdef _X86_
|
||||
{"Init@4", &hwdriver.pfnInit},
|
||||
{"Shutdown@0", &hwdriver.pfnShutdown},
|
||||
{"GetModeList@8", &hwdriver.pfnGetModeList},
|
||||
{"SetPalette@4", &hwdriver.pfnSetPalette},
|
||||
{"FinishUpdate@4", &hwdriver.pfnFinishUpdate},
|
||||
{"Draw2DLine@12", &hwdriver.pfnDraw2DLine},
|
||||
{"DrawPolygon@16", &hwdriver.pfnDrawPolygon},
|
||||
{"RenderSkyDome@4", &hwdriver.pfnRenderSkyDome},
|
||||
{"SetBlend@4", &hwdriver.pfnSetBlend},
|
||||
{"ClearBuffer@12", &hwdriver.pfnClearBuffer},
|
||||
{"SetTexture@4", &hwdriver.pfnSetTexture},
|
||||
{"UpdateTexture@4", &hwdriver.pfnUpdateTexture},
|
||||
{"DeleteTexture@4", &hwdriver.pfnDeleteTexture},
|
||||
{"ReadRect@24", &hwdriver.pfnReadRect},
|
||||
{"GClipRect@20", &hwdriver.pfnGClipRect},
|
||||
{"ClearMipMapCache@0", &hwdriver.pfnClearMipMapCache},
|
||||
{"SetSpecialState@8", &hwdriver.pfnSetSpecialState},
|
||||
{"DrawModel@16", &hwdriver.pfnDrawModel},
|
||||
{"SetTransform@4", &hwdriver.pfnSetTransform},
|
||||
{"GetTextureUsed@0", &hwdriver.pfnGetTextureUsed},
|
||||
{"GetRenderVersion@0", &hwdriver.pfnGetRenderVersion},
|
||||
#ifdef SHUFFLE
|
||||
{"PostImgRedraw@4", &hwdriver.pfnPostImgRedraw},
|
||||
#endif
|
||||
{"FlushScreenTextures@0",&hwdriver.pfnFlushScreenTextures},
|
||||
{"StartScreenWipe@0", &hwdriver.pfnStartScreenWipe},
|
||||
{"EndScreenWipe@0", &hwdriver.pfnEndScreenWipe},
|
||||
{"DoScreenWipe@0", &hwdriver.pfnDoScreenWipe},
|
||||
{"DrawIntermissionBG@0",&hwdriver.pfnDrawIntermissionBG},
|
||||
{"MakeScreenTexture@0", &hwdriver.pfnMakeScreenTexture},
|
||||
{"MakeScreenFinalTexture@0", &hwdriver.pfnMakeScreenFinalTexture},
|
||||
{"DrawScreenFinalTexture@8", &hwdriver.pfnDrawScreenFinalTexture},
|
||||
#else
|
||||
{"Init", &hwdriver.pfnInit},
|
||||
{"Shutdown", &hwdriver.pfnShutdown},
|
||||
{"GetModeList", &hwdriver.pfnGetModeList},
|
||||
{"SetPalette", &hwdriver.pfnSetPalette},
|
||||
{"FinishUpdate", &hwdriver.pfnFinishUpdate},
|
||||
{"Draw2DLine", &hwdriver.pfnDraw2DLine},
|
||||
{"DrawPolygon", &hwdriver.pfnDrawPolygon},
|
||||
{"RenderSkyDome", &hwdriver.pfnRenderSkyDome},
|
||||
{"SetBlend", &hwdriver.pfnSetBlend},
|
||||
{"ClearBuffer", &hwdriver.pfnClearBuffer},
|
||||
{"SetTexture", &hwdriver.pfnSetTexture},
|
||||
{"UpdateTexture", &hwdriver.pfnUpdateTexture},
|
||||
{"DeleteTexture", &hwdriver.pfnDeleteTexture},
|
||||
{"ReadRect", &hwdriver.pfnReadRect},
|
||||
{"GClipRect", &hwdriver.pfnGClipRect},
|
||||
{"ClearMipMapCache", &hwdriver.pfnClearMipMapCache},
|
||||
{"SetSpecialState", &hwdriver.pfnSetSpecialState},
|
||||
{"DrawModel", &hwdriver.pfnDrawModel},
|
||||
{"SetTransform", &hwdriver.pfnSetTransform},
|
||||
{"GetTextureUsed", &hwdriver.pfnGetTextureUsed},
|
||||
{"GetRenderVersion", &hwdriver.pfnGetRenderVersion},
|
||||
#ifdef SHUFFLE
|
||||
{"PostImgRedraw", &hwdriver.pfnPostImgRedraw},
|
||||
#endif
|
||||
{"FlushScreenTextures", &hwdriver.pfnFlushScreenTextures},
|
||||
{"StartScreenWipe", &hwdriver.pfnStartScreenWipe},
|
||||
{"EndScreenWipe", &hwdriver.pfnEndScreenWipe},
|
||||
{"DoScreenWipe", &hwdriver.pfnDoScreenWipe},
|
||||
{"DrawIntermissionBG", &hwdriver.pfnDrawIntermissionBG},
|
||||
{"MakeScreenTexture", &hwdriver.pfnMakeScreenTexture},
|
||||
{"MakeScreenFinalTexture", &hwdriver.pfnMakeScreenFinalTexture},
|
||||
{"DrawScreenFinalTexture", &hwdriver.pfnDrawScreenFinalTexture},
|
||||
#endif
|
||||
{NULL,NULL}
|
||||
};
|
||||
|
||||
BOOL Init3DDriver (LPCSTR dllName)
|
||||
{
|
||||
hwdModule = LoadDLL(dllName, hwdFuncTable);
|
||||
return (hwdModule != NULL);
|
||||
}
|
||||
|
||||
VOID Shutdown3DDriver (VOID)
|
||||
{
|
||||
UnloadDLL(&hwdModule);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HW3SOUND
|
||||
static HMODULE hwsModule = NULL;
|
||||
|
||||
static loadfunc_t hwsFuncTable[] = {
|
||||
#ifdef _X86_
|
||||
{"Startup@8", &hw3ds_driver.pfnStartup},
|
||||
{"Shutdown@0", &hw3ds_driver.pfnShutdown},
|
||||
{"AddSfx@4", &hw3ds_driver.pfnAddSfx},
|
||||
{"AddSource@8", &hw3ds_driver.pfnAddSource},
|
||||
{"StartSource@4", &hw3ds_driver.pfnStartSource},
|
||||
{"StopSource@4", &hw3ds_driver.pfnStopSource},
|
||||
{"GetHW3DSVersion@0", &hw3ds_driver.pfnGetHW3DSVersion},
|
||||
{"BeginFrameUpdate@0", &hw3ds_driver.pfnBeginFrameUpdate},
|
||||
{"EndFrameUpdate@0", &hw3ds_driver.pfnEndFrameUpdate},
|
||||
{"IsPlaying@4", &hw3ds_driver.pfnIsPlaying},
|
||||
{"UpdateListener@8", &hw3ds_driver.pfnUpdateListener},
|
||||
{"UpdateSourceParms@12", &hw3ds_driver.pfnUpdateSourceParms},
|
||||
{"SetCone@8", &hw3ds_driver.pfnSetCone},
|
||||
{"SetGlobalSfxVolume@4", &hw3ds_driver.pfnSetGlobalSfxVolume},
|
||||
{"Update3DSource@8", &hw3ds_driver.pfnUpdate3DSource},
|
||||
{"ReloadSource@8", &hw3ds_driver.pfnReloadSource},
|
||||
{"KillSource@4", &hw3ds_driver.pfnKillSource},
|
||||
{"KillSfx@4", &hw3ds_driver.pfnKillSfx},
|
||||
{"GetHW3DSTitle@8", &hw3ds_driver.pfnGetHW3DSTitle},
|
||||
#else
|
||||
{"Startup", &hw3ds_driver.pfnStartup},
|
||||
{"Shutdown", &hw3ds_driver.pfnShutdown},
|
||||
{"AddSfx", &hw3ds_driver.pfnAddSfx},
|
||||
{"AddSource", &hw3ds_driver.pfnAddSource},
|
||||
{"StartSource", &hw3ds_driver.pfnStartSource},
|
||||
{"StopSource", &hw3ds_driver.pfnStopSource},
|
||||
{"GetHW3DSVersion", &hw3ds_driver.pfnGetHW3DSVersion},
|
||||
{"BeginFrameUpdate", &hw3ds_driver.pfnBeginFrameUpdate},
|
||||
{"EndFrameUpdate", &hw3ds_driver.pfnEndFrameUpdate},
|
||||
{"IsPlaying", &hw3ds_driver.pfnIsPlaying},
|
||||
{"UpdateListener", &hw3ds_driver.pfnUpdateListener},
|
||||
{"UpdateSourceParms", &hw3ds_driver.pfnUpdateSourceParms},
|
||||
{"SetCone", &hw3ds_driver.pfnSetCone},
|
||||
{"SetGlobalSfxVolume", &hw3ds_driver.pfnSetGlobalSfxVolume},
|
||||
{"Update3DSource", &hw3ds_driver.pfnUpdate3DSource},
|
||||
{"ReloadSource", &hw3ds_driver.pfnReloadSource},
|
||||
{"KillSource", &hw3ds_driver.pfnKillSource},
|
||||
{"KillSfx", &hw3ds_driver.pfnKillSfx},
|
||||
{"GetHW3DSTitle", &hw3ds_driver.pfnGetHW3DSTitle},
|
||||
#endif
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
BOOL Init3DSDriver(LPCSTR dllName)
|
||||
{
|
||||
hwsModule = LoadDLL(dllName, hwsFuncTable);
|
||||
return (hwsModule != NULL);
|
||||
}
|
||||
|
||||
VOID Shutdown3DSDriver (VOID)
|
||||
{
|
||||
UnloadDLL(&hwsModule);
|
||||
}
|
||||
#endif
|
||||
#endif //_WINDOWS
|
|
@ -1,31 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief load/unload a DLL at run-time
|
||||
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef HWRENDER
|
||||
BOOL Init3DDriver (LPCSTR dllName);
|
||||
VOID Shutdown3DDriver (VOID);
|
||||
#endif
|
||||
|
||||
#ifdef HW3SOUND
|
||||
BOOL Init3DSDriver(LPCSTR dllName);
|
||||
VOID Shutdown3DSDriver(VOID);
|
||||
#endif
|
|
@ -1,674 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief Win32 WinMain Entry Point
|
||||
///
|
||||
/// Win32 Sonic Robo Blast 2
|
||||
///
|
||||
/// NOTE:
|
||||
/// To compile WINDOWS SRB2 version : define a '_WINDOWS' symbol.
|
||||
/// to do this go to Project/Settings/ menu, click C/C++ tab, in
|
||||
/// 'Preprocessor definitions:' add '_WINDOWS'
|
||||
|
||||
#include "../doomdef.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
#include "../doomstat.h" // netgame
|
||||
#include "resource.h"
|
||||
|
||||
#include "../m_argv.h"
|
||||
#include "../d_main.h"
|
||||
#include "../i_system.h"
|
||||
|
||||
#include "../keys.h" //hack quick test
|
||||
|
||||
#include "../console.h"
|
||||
|
||||
#include "fabdxlib.h"
|
||||
#include "win_main.h"
|
||||
#include "win_dbg.h"
|
||||
#include "../s_sound.h" // pause sound with handling
|
||||
#include "../g_input.h" // KEY_MOUSEWHEELxxx
|
||||
#include "../screen.h" // for BASEVID*
|
||||
|
||||
// MSWheel support for Win95/NT3.51
|
||||
#include <zmouse.h>
|
||||
|
||||
#ifndef WM_XBUTTONDOWN
|
||||
#define WM_XBUTTONDOWN 523
|
||||
#endif
|
||||
#ifndef WM_XBUTTONUP
|
||||
#define WM_XBUTTONUP 524
|
||||
#endif
|
||||
#ifndef MK_XBUTTON1
|
||||
#define MK_XBUTTON1 32
|
||||
#endif
|
||||
#ifndef MK_XBUTTON2
|
||||
#define MK_XBUTTON2 64
|
||||
#endif
|
||||
|
||||
typedef BOOL (WINAPI *p_IsDebuggerPresent)(VOID);
|
||||
|
||||
HWND hWndMain = NULL;
|
||||
static HCURSOR windowCursor = NULL; // main window cursor
|
||||
|
||||
static LPCSTR wClassName = "SRB2WC";
|
||||
|
||||
INT appActive = false; // app window is active
|
||||
|
||||
#ifdef LOGMESSAGES
|
||||
FILE *logstream;
|
||||
#endif
|
||||
|
||||
BOOL nodinput = FALSE;
|
||||
|
||||
static LRESULT CALLBACK MainWndproc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
event_t ev; //Doom input event
|
||||
int mouse_keys;
|
||||
|
||||
// judgecutor:
|
||||
// Response MSH Mouse Wheel event
|
||||
|
||||
if (message == MSHWheelMessage)
|
||||
{
|
||||
message = WM_MOUSEWHEEL;
|
||||
wParam <<= 16;
|
||||
}
|
||||
|
||||
//I_OutputMsg("MainWndproc: %p,%i,%i,%i",hWnd, message, wParam, (UINT)lParam);
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
nodinput = M_CheckParm("-nodinput");
|
||||
if (!nodinput && !LoadDirectInput())
|
||||
nodinput = true;
|
||||
break;
|
||||
|
||||
case WM_ACTIVATEAPP: // Handle task switching
|
||||
appActive = (int)wParam;
|
||||
|
||||
//coming back from alt-tab? reset the palette.
|
||||
if (appActive)
|
||||
vid.recalc = true;
|
||||
|
||||
// pause music when alt-tab
|
||||
if (appActive && !paused)
|
||||
S_ResumeAudio();
|
||||
else if (!paused)
|
||||
S_PauseAudio();
|
||||
{
|
||||
HANDLE ci = GetStdHandle(STD_INPUT_HANDLE);
|
||||
DWORD mode;
|
||||
if (ci != INVALID_HANDLE_VALUE && GetFileType(ci) == FILE_TYPE_CHAR && GetConsoleMode(ci, &mode))
|
||||
appActive = true;
|
||||
}
|
||||
InvalidateRect (hWnd, NULL, TRUE);
|
||||
break;
|
||||
|
||||
case WM_PAINT:
|
||||
if (!appActive && !bAppFullScreen && !netgame)
|
||||
// app becomes inactive (if windowed)
|
||||
{
|
||||
// Paint "Game Paused" in the middle of the screen
|
||||
PAINTSTRUCT ps;
|
||||
RECT rect;
|
||||
HDC hdc = BeginPaint (hWnd, &ps);
|
||||
GetClientRect (hWnd, &rect);
|
||||
DrawText (hdc, TEXT("Game Paused"), -1, &rect,
|
||||
DT_SINGLELINE | DT_CENTER | DT_VCENTER);
|
||||
EndPaint (hWnd, &ps);
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case WM_QUERYNEWPALETTE:
|
||||
RestoreDDPalette();
|
||||
return TRUE;
|
||||
|
||||
case WM_PALETTECHANGED:
|
||||
if((HWND)wParam != hWnd)
|
||||
RestoreDDPalette();
|
||||
break;
|
||||
|
||||
//case WM_RBUTTONDOWN:
|
||||
//case WM_LBUTTONDOWN:
|
||||
|
||||
case WM_MOVE:
|
||||
if (bAppFullScreen)
|
||||
{
|
||||
SetWindowPos(hWnd, NULL, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
windowPosX = (SHORT) LOWORD(lParam); // horizontal position
|
||||
windowPosY = (SHORT) HIWORD(lParam); // vertical position
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
// This is where switching windowed/fullscreen is handled. DirectDraw
|
||||
// objects must be destroyed, recreated, and artwork reloaded.
|
||||
|
||||
case WM_DISPLAYCHANGE:
|
||||
case WM_SIZE:
|
||||
break;
|
||||
|
||||
case WM_SETCURSOR:
|
||||
if (bAppFullScreen)
|
||||
SetCursor(NULL);
|
||||
else
|
||||
SetCursor(windowCursor);
|
||||
return TRUE;
|
||||
|
||||
case WM_KEYUP:
|
||||
ev.type = ev_keyup;
|
||||
goto handleKeyDoom;
|
||||
break;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
ev.type = ev_keydown;
|
||||
|
||||
handleKeyDoom:
|
||||
ev.key = 0;
|
||||
if (wParam == VK_PAUSE)
|
||||
// intercept PAUSE key
|
||||
{
|
||||
ev.key = KEY_PAUSE;
|
||||
}
|
||||
else if (!keyboard_started)
|
||||
// post some keys during the game startup
|
||||
// (allow escaping from network synchronization, or pressing enter after
|
||||
// an error message in the console)
|
||||
{
|
||||
switch (wParam)
|
||||
{
|
||||
case VK_ESCAPE: ev.key = KEY_ESCAPE; break;
|
||||
case VK_RETURN: ev.key = KEY_ENTER; break;
|
||||
case VK_SHIFT: ev.key = KEY_LSHIFT; break;
|
||||
default: ev.key = MapVirtualKey((DWORD)wParam,2); // convert in to char
|
||||
}
|
||||
}
|
||||
|
||||
if (ev.key)
|
||||
D_PostEvent (&ev);
|
||||
|
||||
return 0;
|
||||
break;
|
||||
|
||||
// judgecutor:
|
||||
// Handle mouse events
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_LBUTTONUP:
|
||||
case WM_RBUTTONDOWN:
|
||||
case WM_RBUTTONUP:
|
||||
case WM_MBUTTONDOWN:
|
||||
case WM_MBUTTONUP:
|
||||
case WM_MOUSEMOVE:
|
||||
if (nodinput)
|
||||
{
|
||||
mouse_keys = 0;
|
||||
if (wParam & MK_LBUTTON)
|
||||
mouse_keys |= 1;
|
||||
if (wParam & MK_RBUTTON)
|
||||
mouse_keys |= 2;
|
||||
if (wParam & MK_MBUTTON)
|
||||
mouse_keys |= 4;
|
||||
I_GetSysMouseEvents(mouse_keys);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_XBUTTONUP:
|
||||
if (nodinput)
|
||||
{
|
||||
ev.type = ev_keyup;
|
||||
ev.key = KEY_MOUSE1 + 3 + HIWORD(wParam);
|
||||
D_PostEvent(&ev);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case WM_XBUTTONDOWN:
|
||||
if (nodinput)
|
||||
{
|
||||
ev.type = ev_keydown;
|
||||
ev.key = KEY_MOUSE1 + 3 + HIWORD(wParam);
|
||||
D_PostEvent(&ev);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case WM_MOUSEWHEEL:
|
||||
//I_OutputMsg("MW_WHEEL dispatched.\n");
|
||||
ev.type = ev_keydown;
|
||||
if ((INT16)HIWORD(wParam) > 0)
|
||||
ev.key = KEY_MOUSEWHEELUP;
|
||||
else
|
||||
ev.key = KEY_MOUSEWHEELDOWN;
|
||||
D_PostEvent(&ev);
|
||||
break;
|
||||
|
||||
case WM_SETTEXT:
|
||||
COM_BufAddText((LPCSTR)lParam);
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
PostQuitMessage(0); //to quit while in-game
|
||||
ev.key = KEY_ESCAPE; //to exit network synchronization
|
||||
ev.type = ev_keydown;
|
||||
D_PostEvent (&ev);
|
||||
return 0;
|
||||
case WM_DESTROY:
|
||||
//faB: main app loop will exit the loop and proceed with I_Quit()
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
case WM_SYSCOMMAND:
|
||||
// Don't allow the keyboard to activate the menu.
|
||||
if(wParam == SC_KEYMENU)
|
||||
return 0;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
static inline VOID OpenTextConsole(VOID)
|
||||
{
|
||||
HANDLE ci, co;
|
||||
BOOL console;
|
||||
|
||||
#ifdef _DEBUG
|
||||
console = M_CheckParm("-noconsole") == 0;
|
||||
#else
|
||||
console = M_CheckParm("-console") != 0;
|
||||
#endif
|
||||
|
||||
dedicated = M_CheckParm("-dedicated") != 0;
|
||||
|
||||
if (M_CheckParm("-detachconsole"))
|
||||
{
|
||||
if (FreeConsole())
|
||||
{
|
||||
I_OutputMsg("Detatched console.\n");
|
||||
console = TRUE; //lets get back a console
|
||||
}
|
||||
else
|
||||
{
|
||||
I_OutputMsg("No console to detatch.\n");
|
||||
I_ShowLastError(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (dedicated || console)
|
||||
{
|
||||
if (AllocConsole()) //Let get the real console HANDLEs, because Mingw's Bash is bad!
|
||||
{
|
||||
SetConsoleTitleA("SRB2 Console");
|
||||
CONS_Printf(M_GetText("Hello, it's me, SRB2's Console Window\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
I_OutputMsg("We have a console already.\n");
|
||||
I_ShowLastError(FALSE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
ci = CreateFile(TEXT("CONIN$") , GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (ci != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
HANDLE sih = GetStdHandle(STD_INPUT_HANDLE);
|
||||
if (sih != ci)
|
||||
{
|
||||
I_OutputMsg("Old STD_INPUT_HANDLE: %p\nNew STD_INPUT_HANDLE: %p\n", sih, ci);
|
||||
SetStdHandle(STD_INPUT_HANDLE,ci);
|
||||
}
|
||||
else
|
||||
I_OutputMsg("STD_INPUT_HANDLE already set at %p\n", ci);
|
||||
|
||||
if (GetFileType(ci) == FILE_TYPE_CHAR)
|
||||
{
|
||||
#if 0
|
||||
const DWORD CM = ENABLE_LINE_INPUT|ENABLE_ECHO_INPUT|ENABLE_PROCESSED_INPUT; //default mode but no ENABLE_MOUSE_INPUT
|
||||
if (SetConsoleMode(ci,CM))
|
||||
{
|
||||
I_OutputMsg("Disabled mouse input on the console\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
I_OutputMsg("Could not disable mouse input on the console\n");
|
||||
I_ShowLastError(FALSE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
I_OutputMsg("Handle CONIN$ in not a Console HANDLE\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
I_OutputMsg("Could not get a CONIN$ HANDLE\n");
|
||||
I_ShowLastError(FALSE);
|
||||
}
|
||||
|
||||
co = CreateFile(TEXT("CONOUT$"), GENERIC_WRITE|GENERIC_READ, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (co != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
HANDLE soh = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
HANDLE seh = GetStdHandle(STD_ERROR_HANDLE);
|
||||
if (soh != co)
|
||||
{
|
||||
I_OutputMsg("Old STD_OUTPUT_HANDLE: %p\nNew STD_OUTPUT_HANDLE: %p\n", soh, co);
|
||||
SetStdHandle(STD_OUTPUT_HANDLE,co);
|
||||
}
|
||||
else
|
||||
I_OutputMsg("STD_OUTPUT_HANDLE already set at %p\n", co);
|
||||
if (seh != co)
|
||||
{
|
||||
I_OutputMsg("Old STD_ERROR_HANDLE: %p\nNew STD_ERROR_HANDLE: %p\n", seh, co);
|
||||
SetStdHandle(STD_ERROR_HANDLE,co);
|
||||
}
|
||||
else
|
||||
I_OutputMsg("STD_ERROR_HANDLE already set at %p\n", co);
|
||||
}
|
||||
else
|
||||
I_OutputMsg("Could not get a CONOUT$ HANDLE\n");
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Do that Windows initialization stuff...
|
||||
//
|
||||
static HWND OpenMainWindow (HINSTANCE hInstance, LPSTR wTitle)
|
||||
{
|
||||
const LONG styles = WS_CAPTION|WS_POPUP|WS_SYSMENU, exstyles = 0;
|
||||
HWND hWnd;
|
||||
WNDCLASSEXA wc;
|
||||
RECT bounds;
|
||||
|
||||
// Set up and register window class
|
||||
ZeroMemory(&wc, sizeof(wc));
|
||||
wc.cbSize = sizeof(wc);
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW /*| CS_DBLCLKS*/;
|
||||
wc.lpfnWndProc = MainWndproc;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_DLICON1));
|
||||
windowCursor = LoadCursor(NULL, IDC_WAIT); //LoadCursor(hInstance, MAKEINTRESOURCE(IDC_DLCURSOR1));
|
||||
wc.hCursor = windowCursor;
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
||||
wc.lpszClassName = wClassName;
|
||||
|
||||
if (!RegisterClassExA(&wc))
|
||||
{
|
||||
I_OutputMsg("Error doing RegisterClassExA\n");
|
||||
I_ShowLastError(TRUE);
|
||||
return INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
// Create a window
|
||||
// CreateWindowEx - seems to create just the interior, not the borders
|
||||
|
||||
bounds.left = 0;
|
||||
bounds.right = dedicated ? 0 : specialmodes[0].width;
|
||||
bounds.top = 0;
|
||||
bounds.bottom = dedicated ? 0 : specialmodes[0].height;
|
||||
|
||||
AdjustWindowRectEx(&bounds, styles, FALSE, exstyles);
|
||||
|
||||
hWnd = CreateWindowExA(
|
||||
exstyles, //ExStyle
|
||||
wClassName, //Classname
|
||||
wTitle, //Windowname
|
||||
styles, //dwStyle //WS_VISIBLE|WS_POPUP for bAppFullScreen
|
||||
0,
|
||||
0,
|
||||
bounds.right - bounds.left, //GetSystemMetrics(SM_CXSCREEN),
|
||||
bounds.bottom - bounds.top, //GetSystemMetrics(SM_CYSCREEN),
|
||||
NULL, //hWnd Parent
|
||||
NULL, //hMenu Menu
|
||||
hInstance,
|
||||
NULL);
|
||||
|
||||
if (hWnd == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
I_OutputMsg("Error doing CreateWindowExA\n");
|
||||
I_ShowLastError(TRUE);
|
||||
}
|
||||
|
||||
return hWnd;
|
||||
}
|
||||
|
||||
|
||||
static inline BOOL tlErrorMessage(const TCHAR *err)
|
||||
{
|
||||
/* make the cursor visible */
|
||||
SetCursor(LoadCursor(NULL, IDC_ARROW));
|
||||
|
||||
//
|
||||
// warn user if there is one
|
||||
//
|
||||
printf("Error %s..\n", err);
|
||||
fflush(stdout);
|
||||
|
||||
MessageBox(hWndMain, err, TEXT("ERROR"), MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
// ------------------
|
||||
// Command line stuff
|
||||
// ------------------
|
||||
#define MAXCMDLINEARGS 64
|
||||
static char * myWargv[MAXCMDLINEARGS+1];
|
||||
static char myCmdline[512];
|
||||
|
||||
static VOID GetArgcArgv (LPSTR cmdline)
|
||||
{
|
||||
LPSTR tokenstr;
|
||||
size_t i = 0, len;
|
||||
char cSep = ' ';
|
||||
BOOL bCvar = FALSE, prevCvar = FALSE;
|
||||
|
||||
// split arguments of command line into argv
|
||||
strlcpy (myCmdline, cmdline, sizeof(myCmdline)); // in case window's cmdline is in protected memory..for strtok
|
||||
len = strlen (myCmdline);
|
||||
|
||||
myargc = 0;
|
||||
while (myargc < MAXCMDLINEARGS)
|
||||
{
|
||||
// get token
|
||||
while (myCmdline[i] == cSep)
|
||||
i++;
|
||||
if (i >= len)
|
||||
break;
|
||||
tokenstr = myCmdline + i;
|
||||
if (myCmdline[i] == '"')
|
||||
{
|
||||
cSep = '"';
|
||||
i++;
|
||||
if (!prevCvar) //cvar leave the "" in
|
||||
tokenstr++;
|
||||
}
|
||||
else
|
||||
cSep = ' ';
|
||||
|
||||
//cvar
|
||||
if (myCmdline[i] == '+' && cSep == ' ') //a + begins a cvarname, but not after quotes
|
||||
bCvar = TRUE;
|
||||
else
|
||||
bCvar = FALSE;
|
||||
|
||||
while (myCmdline[i] &&
|
||||
myCmdline[i] != cSep)
|
||||
i++;
|
||||
|
||||
if (myCmdline[i] == '"')
|
||||
{
|
||||
cSep = ' ';
|
||||
if (prevCvar)
|
||||
i++; // get ending " quote in arg
|
||||
}
|
||||
|
||||
prevCvar = bCvar;
|
||||
|
||||
if (myCmdline + i > tokenstr)
|
||||
{
|
||||
myWargv[myargc++] = tokenstr;
|
||||
}
|
||||
|
||||
if (!myCmdline[i] || i >= len)
|
||||
break;
|
||||
|
||||
myCmdline[i++] = '\0';
|
||||
}
|
||||
myWargv[myargc] = NULL;
|
||||
|
||||
// m_argv.c uses myargv[], we used myWargv because we fill the arguments ourselves
|
||||
// and myargv is just a pointer, so we set it to point myWargv
|
||||
myargv = myWargv;
|
||||
}
|
||||
|
||||
static inline VOID MakeCodeWritable(VOID)
|
||||
{
|
||||
#ifdef USEASM // Disable write-protection of code segment
|
||||
DWORD OldRights;
|
||||
const DWORD NewRights = PAGE_EXECUTE_READWRITE;
|
||||
PBYTE pBaseOfImage = (PBYTE)GetModuleHandle(NULL);
|
||||
PIMAGE_DOS_HEADER dosH =(PIMAGE_DOS_HEADER)pBaseOfImage;
|
||||
PIMAGE_NT_HEADERS ntH = (PIMAGE_NT_HEADERS)(pBaseOfImage + dosH->e_lfanew);
|
||||
PIMAGE_OPTIONAL_HEADER oH = (PIMAGE_OPTIONAL_HEADER)
|
||||
((PBYTE)ntH + sizeof (IMAGE_NT_SIGNATURE) + sizeof (IMAGE_FILE_HEADER));
|
||||
LPVOID pA = pBaseOfImage+oH->BaseOfCode;
|
||||
SIZE_T pS = oH->SizeOfCode;
|
||||
#if 1 // try to find the text section
|
||||
PIMAGE_SECTION_HEADER ntS = IMAGE_FIRST_SECTION (ntH);
|
||||
WORD s;
|
||||
for (s = 0; s < ntH->FileHeader.NumberOfSections; s++)
|
||||
{
|
||||
if (memcmp (ntS[s].Name, ".text\0\0", 8) == 0)
|
||||
{
|
||||
pA = pBaseOfImage+ntS[s].VirtualAddress;
|
||||
pS = ntS[s].Misc.VirtualSize;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!VirtualProtect(pA,pS,NewRights,&OldRights))
|
||||
I_Error("Could not make code writable\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// HandledWinMain : called by exception handler
|
||||
// -----------------------------------------------------------------------------
|
||||
static int WINAPI HandledWinMain(HINSTANCE hInstance)
|
||||
{
|
||||
LPSTR args;
|
||||
|
||||
#ifdef LOGMESSAGES
|
||||
// DEBUG!!! - set logstream to NULL to disable debug log
|
||||
// Replace WIN32 filehandle with standard C calls, because WIN32 doesn't handle \n properly.
|
||||
logstream = fopen(va("%s"PATHSEP"%s", srb2home, "log.txt"), "wt");
|
||||
#endif
|
||||
|
||||
// fill myargc,myargv for m_argv.c retrieval of cmdline arguments
|
||||
args = GetCommandLineA();
|
||||
CONS_Printf("Command line arguments: '%s'\n", args);
|
||||
GetArgcArgv(args);
|
||||
// Create a text console window
|
||||
OpenTextConsole();
|
||||
|
||||
#ifdef _DEBUG
|
||||
{
|
||||
int i;
|
||||
CONS_Printf("Myargc: %d\n", myargc);
|
||||
for (i = 0; i < myargc; i++)
|
||||
CONS_Printf("myargv[%d] : '%s'\n", i, myargv[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
// open a dummy window, both OpenGL and DirectX need one.
|
||||
if ((hWndMain = OpenMainWindow(hInstance, va("SRB2 "VERSIONSTRING))) == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
tlErrorMessage(TEXT("Couldn't open window"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// currently starts DirectInput
|
||||
CONS_Printf("I_StartupSystem() ...\n");
|
||||
I_StartupSystem();
|
||||
MakeCodeWritable();
|
||||
|
||||
// startup SRB2
|
||||
CONS_Printf("Setting up SRB2...\n");
|
||||
D_SRB2Main();
|
||||
CONS_Printf("Entering main game loop...\n");
|
||||
// never return
|
||||
D_SRB2Loop();
|
||||
|
||||
// back to Windoze
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Exception handler calls WinMain for catching exceptions
|
||||
// -----------------------------------------------------------------------------
|
||||
int WINAPI WinMain (HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
int Result = -1;
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
UNREFERENCED_PARAMETER(nCmdShow);
|
||||
|
||||
{
|
||||
#if 0
|
||||
p_IsDebuggerPresent pfnIsDebuggerPresent = (p_IsDebuggerPresent)GetProcAddress(GetModuleHandleA("kernel32.dll"),"IsDebuggerPresent");
|
||||
if((!pfnIsDebuggerPresent || !pfnIsDebuggerPresent())
|
||||
#ifdef BUGTRAP
|
||||
&& !InitBugTrap()
|
||||
#endif
|
||||
)
|
||||
#endif
|
||||
{
|
||||
LoadLibraryA("exchndl.dll");
|
||||
}
|
||||
}
|
||||
#ifndef __MINGW32__
|
||||
prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo);
|
||||
#endif
|
||||
Result = HandledWinMain(hInstance);
|
||||
#ifdef BUGTRAP
|
||||
// This is safe even if BT didn't start.
|
||||
ShutdownBugTrap();
|
||||
#endif
|
||||
|
||||
return Result;
|
||||
}
|
||||
#endif //_WINDOWS
|
|
@ -1,45 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief Win32 Sharing
|
||||
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern HWND hWndMain;
|
||||
|
||||
extern INT appActive;
|
||||
|
||||
VOID I_GetSysMouseEvents(INT mouse_state);
|
||||
extern UINT MSHWheelMessage;
|
||||
|
||||
extern BOOL nodinput;
|
||||
BOOL LoadDirectInput(VOID);
|
||||
|
||||
//faB: midi channel Volume set is delayed by the MIDI stream callback thread, see win_snd.c
|
||||
#define WM_MSTREAM_UPDATEVOLUME (WM_USER + 101)
|
||||
|
||||
// defined in win_sys.c
|
||||
VOID I_BeginProfile(VOID); //for timing code
|
||||
DWORD I_EndProfile(VOID);
|
||||
|
||||
VOID I_ShowLastError(BOOL MB);
|
||||
VOID I_LoadingScreen (LPCSTR msg);
|
||||
|
||||
VOID I_RestartSysMouse(VOID);
|
||||
VOID I_DoStartupMouse(VOID);
|
|
@ -1,42 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file
|
||||
/// \brief Win32 network interface
|
||||
|
||||
#include "../doomdef.h"
|
||||
#include "../m_argv.h"
|
||||
#include "../i_net.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
//
|
||||
// NETWORKING
|
||||
//
|
||||
|
||||
//
|
||||
// I_InitNetwork
|
||||
//
|
||||
boolean I_InitNetwork(void)
|
||||
{
|
||||
if (M_CheckParm ("-net"))
|
||||
{
|
||||
I_Error("The Win32 version of SRB2 doesn't work with external drivers like ipxsetup, sersetup, or doomatic\n"
|
||||
"Read the documentation about \"-server\" and \"-connect\" parameters or just use the launcher\n");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
|
@ -1,959 +0,0 @@
|
|||
/// \file
|
||||
/// \brief FMOD Ex interface for sound
|
||||
#include "../doomdef.h"
|
||||
#include "../sounds.h"
|
||||
#include "../i_sound.h"
|
||||
#include "../s_sound.h"
|
||||
#include "../w_wad.h"
|
||||
#include "../z_zone.h"
|
||||
#include "../byteptr.h"
|
||||
|
||||
#include <fmod.h> // FMOD Ex
|
||||
#define errcode _errcode
|
||||
#include <fmod_errors.h>
|
||||
#undef errcode
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
#include "gme/gme.h"
|
||||
#define GME_TREBLE 5.0
|
||||
#define GME_BASS 1.0
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
#ifndef _MSC_VER
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _LFS64_LARGEFILE
|
||||
#define _LFS64_LARGEFILE
|
||||
#endif
|
||||
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 0
|
||||
#endif
|
||||
|
||||
#include "zlib.h"
|
||||
#endif // HAVE_ZLIB
|
||||
#endif // HAVE_LIBGME
|
||||
|
||||
static FMOD_SYSTEM *fsys;
|
||||
static FMOD_SOUND *music_stream;
|
||||
static FMOD_CHANNEL *music_channel;
|
||||
|
||||
static UINT8 music_volume, midi_volume, sfx_volume;
|
||||
static INT32 current_track;
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
static Music_Emu *gme;
|
||||
#endif
|
||||
|
||||
//
|
||||
// SYSTEM
|
||||
//
|
||||
|
||||
// spew console messages for general errors.
|
||||
static void FMR_Debug(FMOD_RESULT e, int line)
|
||||
{
|
||||
if (e != FMOD_OK)
|
||||
CONS_Alert(CONS_ERROR, "FMOD:%d - %s\n", line, FMOD_ErrorString(e));
|
||||
}
|
||||
#define FMR(x) FMR_Debug(x, __LINE__)
|
||||
|
||||
// for operations on music_channel ONLY.
|
||||
// returns false if music was released.
|
||||
// (in other words, if !FMR_MUSIC(op) return immediately,
|
||||
// because music_stream and music_channel are no longer valid.)
|
||||
static boolean FMR_Music_Debug(FMOD_RESULT e, int line)
|
||||
{
|
||||
switch(e)
|
||||
{
|
||||
case FMOD_ERR_INVALID_HANDLE: // non-looping song ended
|
||||
case FMOD_ERR_CHANNEL_STOLEN: // song ended and then sfx was played
|
||||
FMOD_Sound_Release(music_stream);
|
||||
music_stream = NULL;
|
||||
return false;
|
||||
default:
|
||||
FMR_Debug(e, line);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#define FMR_MUSIC(x) FMR_Music_Debug(x, __LINE__)
|
||||
|
||||
void I_StartupSound(void)
|
||||
{
|
||||
I_Assert(!sound_started);
|
||||
sound_started = true;
|
||||
|
||||
FMR(FMOD_System_Create(&fsys));
|
||||
FMR(FMOD_System_SetDSPBufferSize(fsys, 44100 / 30, 2));
|
||||
FMR(FMOD_System_Init(fsys, 64, FMOD_INIT_VOL0_BECOMES_VIRTUAL, NULL));
|
||||
music_stream = NULL;
|
||||
#ifdef HAVE_LIBGME
|
||||
gme = NULL;
|
||||
#endif
|
||||
current_track = -1;
|
||||
}
|
||||
|
||||
void I_ShutdownSound(void)
|
||||
{
|
||||
I_Assert(sound_started);
|
||||
sound_started = false;
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
if (gme)
|
||||
gme_delete(gme);
|
||||
#endif
|
||||
FMR(FMOD_System_Release(fsys));
|
||||
}
|
||||
|
||||
void I_UpdateSound(void)
|
||||
{
|
||||
FMR(FMOD_System_Update(fsys));
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
// Callback hook to read streaming GME data.
|
||||
static FMOD_RESULT F_CALLBACK GMEReadCallback(FMOD_SOUND *sound, void *data, unsigned int datalen)
|
||||
{
|
||||
Music_Emu *emu;
|
||||
void *emuvoid = NULL;
|
||||
// get our emu
|
||||
FMR(FMOD_Sound_GetUserData(sound, &emuvoid));
|
||||
emu = emuvoid;
|
||||
// no emu? no play.
|
||||
if (!emu)
|
||||
return FMOD_ERR_FILE_EOF;
|
||||
if (gme_track_ended(emu))
|
||||
{
|
||||
// don't delete the primary music stream
|
||||
if (emu == gme)
|
||||
return FMOD_ERR_FILE_EOF;
|
||||
// do delete sfx streams
|
||||
FMR(FMOD_Sound_SetUserData(sound, NULL));
|
||||
gme_delete(emu);
|
||||
return FMOD_ERR_FILE_EOF;
|
||||
}
|
||||
// play beautiful musics theme of ancient land.
|
||||
if (gme_play(emu, datalen/2, data))
|
||||
return FMOD_ERR_FILE_BAD;
|
||||
// O.K
|
||||
return FMOD_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// SFX
|
||||
//
|
||||
|
||||
// convert doom format sound (signed 8bit)
|
||||
// to an fmod format sound (unsigned 8bit)
|
||||
// and return the FMOD_SOUND.
|
||||
static inline FMOD_SOUND *ds2fmod(char *stream)
|
||||
{
|
||||
FMOD_SOUND *sound;
|
||||
UINT16 ver;
|
||||
UINT16 freq;
|
||||
UINT32 samples;
|
||||
FMOD_CREATESOUNDEXINFO fmt;
|
||||
UINT32 i;
|
||||
UINT8 *p;
|
||||
|
||||
// lump header
|
||||
ver = READUINT16(stream); // sound version format?
|
||||
if (ver != 3) // It should be 3 if it's a doomsound...
|
||||
return NULL; // onos! it's not a doomsound!
|
||||
freq = READUINT16(stream);
|
||||
samples = READUINT32(stream);
|
||||
//CONS_Printf("FMT: v%d f%d, s%d, b%d\n", ver, freq, samples, bps);
|
||||
|
||||
memset(&fmt, 0, sizeof(FMOD_CREATESOUNDEXINFO));
|
||||
fmt.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
|
||||
|
||||
// convert to unsigned
|
||||
fmt.format = FMOD_SOUND_FORMAT_PCM8; // 8bit
|
||||
fmt.length = samples*1; // 1 bps
|
||||
fmt.numchannels = 1; // mono
|
||||
fmt.defaultfrequency = freq;
|
||||
|
||||
// Make a duplicate of the stream to change format.
|
||||
p = Z_Malloc(fmt.length, PU_SOUND, NULL);
|
||||
for (i = 0; i < fmt.length; i++)
|
||||
p[i] = (UINT8)(stream[i]+0x80); // convert from signed to unsigned
|
||||
stream = (char *)p;
|
||||
|
||||
// Create FMOD_SOUND.
|
||||
FMR(FMOD_System_CreateSound(fsys, stream, FMOD_CREATESAMPLE|FMOD_OPENMEMORY|FMOD_OPENRAW|FMOD_SOFTWARE|FMOD_LOWMEM, &fmt, &sound));
|
||||
|
||||
Z_Free(stream); // FMOD made its own copy, so we don't need this anymore.
|
||||
return sound;
|
||||
}
|
||||
|
||||
void *I_GetSfx(sfxinfo_t *sfx)
|
||||
{
|
||||
FMOD_SOUND *sound;
|
||||
char *lump;
|
||||
FMOD_CREATESOUNDEXINFO fmt;
|
||||
#ifdef HAVE_LIBGME
|
||||
Music_Emu *emu;
|
||||
gme_info_t *info;
|
||||
#endif
|
||||
|
||||
if (sfx->lumpnum == LUMPERROR)
|
||||
sfx->lumpnum = S_GetSfxLumpNum(sfx);
|
||||
sfx->length = W_LumpLength(sfx->lumpnum);
|
||||
|
||||
lump = W_CacheLumpNum(sfx->lumpnum, PU_SOUND);
|
||||
sound = ds2fmod(lump);
|
||||
if (sound)
|
||||
{
|
||||
Z_Free(lump);
|
||||
return sound;
|
||||
}
|
||||
|
||||
// It's not a doom sound.
|
||||
// Try to read it as an FMOD sound?
|
||||
|
||||
memset(&fmt, 0, sizeof(FMOD_CREATESOUNDEXINFO));
|
||||
fmt.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
|
||||
fmt.length = sfx->length;
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
// VGZ format
|
||||
if ((UINT8)lump[0] == 0x1F
|
||||
&& (UINT8)lump[1] == 0x8B)
|
||||
{
|
||||
#ifdef HAVE_ZLIB
|
||||
UINT8 *inflatedData;
|
||||
size_t inflatedLen;
|
||||
z_stream stream;
|
||||
int zErr; // Somewhere to handle any error messages zlib tosses out
|
||||
|
||||
memset(&stream, 0x00, sizeof (z_stream)); // Init zlib stream
|
||||
// Begin the inflation process
|
||||
inflatedLen = *(UINT32 *)(lump + (sfx->length-4)); // Last 4 bytes are the decompressed size, typically
|
||||
inflatedData = (UINT8 *)Z_Malloc(inflatedLen, PU_SOUND, NULL); // Make room for the decompressed data
|
||||
stream.total_in = stream.avail_in = sfx->length;
|
||||
stream.total_out = stream.avail_out = inflatedLen;
|
||||
stream.next_in = (UINT8 *)lump;
|
||||
stream.next_out = inflatedData;
|
||||
|
||||
zErr = inflateInit2(&stream, 32 + MAX_WBITS);
|
||||
if (zErr == Z_OK) // We're good to go
|
||||
{
|
||||
zErr = inflate(&stream, Z_FINISH);
|
||||
if (zErr == Z_STREAM_END) {
|
||||
// Run GME on new data
|
||||
if (!gme_open_data(inflatedData, inflatedLen, &emu, 44100))
|
||||
{
|
||||
Z_Free(inflatedData); // GME supposedly makes a copy for itself, so we don't need this lying around
|
||||
Z_Free(lump); // We're done with the uninflated lump now, too.
|
||||
|
||||
gme_start_track(emu, 0);
|
||||
gme_track_info(emu, &info, 0);
|
||||
|
||||
fmt.format = FMOD_SOUND_FORMAT_PCM16;
|
||||
fmt.defaultfrequency = 44100;
|
||||
fmt.numchannels = 2;
|
||||
fmt.length = ((UINT32)info->play_length * 441 / 10) * 4;
|
||||
fmt.decodebuffersize = (44100 * 2) / 35;
|
||||
fmt.pcmreadcallback = GMEReadCallback;
|
||||
fmt.userdata = emu;
|
||||
|
||||
FMR(FMOD_System_CreateSound(fsys, NULL, FMOD_CREATESAMPLE|FMOD_OPENUSER|FMOD_SOFTWARE|FMOD_LOWMEM, &fmt, &sound));
|
||||
return sound;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *errorType;
|
||||
switch (zErr)
|
||||
{
|
||||
case Z_ERRNO:
|
||||
errorType = "Z_ERRNO"; break;
|
||||
case Z_STREAM_ERROR:
|
||||
errorType = "Z_STREAM_ERROR"; break;
|
||||
case Z_DATA_ERROR:
|
||||
errorType = "Z_DATA_ERROR"; break;
|
||||
case Z_MEM_ERROR:
|
||||
errorType = "Z_MEM_ERROR"; break;
|
||||
case Z_BUF_ERROR:
|
||||
errorType = "Z_BUF_ERROR"; break;
|
||||
case Z_VERSION_ERROR:
|
||||
errorType = "Z_VERSION_ERROR"; break;
|
||||
default:
|
||||
errorType = "unknown error";
|
||||
}
|
||||
CONS_Alert(CONS_ERROR,"Encountered %s when running inflate: %s\n", errorType, stream.msg);
|
||||
}
|
||||
(void)inflateEnd(&stream);
|
||||
}
|
||||
else // Hold up, zlib's got a problem
|
||||
{
|
||||
const char *errorType;
|
||||
switch (zErr)
|
||||
{
|
||||
case Z_ERRNO:
|
||||
errorType = "Z_ERRNO"; break;
|
||||
case Z_STREAM_ERROR:
|
||||
errorType = "Z_STREAM_ERROR"; break;
|
||||
case Z_DATA_ERROR:
|
||||
errorType = "Z_DATA_ERROR"; break;
|
||||
case Z_MEM_ERROR:
|
||||
errorType = "Z_MEM_ERROR"; break;
|
||||
case Z_BUF_ERROR:
|
||||
errorType = "Z_BUF_ERROR"; break;
|
||||
case Z_VERSION_ERROR:
|
||||
errorType = "Z_VERSION_ERROR"; break;
|
||||
default:
|
||||
errorType = "unknown error";
|
||||
}
|
||||
CONS_Alert(CONS_ERROR,"Encountered %s when running inflateInit: %s\n", errorType, stream.msg);
|
||||
}
|
||||
Z_Free(inflatedData); // GME didn't open jack, but don't let that stop us from freeing this up
|
||||
#else
|
||||
//CONS_Alert(CONS_ERROR,"Cannot decompress VGZ; no zlib support\n");
|
||||
#endif
|
||||
}
|
||||
// Try to read it as a GME sound
|
||||
else if (!gme_open_data(lump, sfx->length, &emu, 44100))
|
||||
{
|
||||
Z_Free(lump);
|
||||
|
||||
gme_start_track(emu, 0);
|
||||
gme_track_info(emu, &info, 0);
|
||||
|
||||
fmt.format = FMOD_SOUND_FORMAT_PCM16;
|
||||
fmt.defaultfrequency = 44100;
|
||||
fmt.numchannels = 2;
|
||||
fmt.length = ((UINT32)info->play_length * 441 / 10) * 4;
|
||||
fmt.decodebuffersize = (44100 * 2) / 35;
|
||||
fmt.pcmreadcallback = GMEReadCallback;
|
||||
fmt.userdata = emu;
|
||||
|
||||
gme_free_info(info);
|
||||
|
||||
FMR(FMOD_System_CreateSound(fsys, NULL, FMOD_CREATESAMPLE|FMOD_OPENUSER|FMOD_SOFTWARE|FMOD_LOWMEM, &fmt, &sound));
|
||||
return sound;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Ogg, Mod, Midi, etc.
|
||||
FMR(FMOD_System_CreateSound(fsys, lump, FMOD_CREATESAMPLE|FMOD_OPENMEMORY|FMOD_SOFTWARE|FMOD_LOWMEM, &fmt, &sound));
|
||||
Z_Free(lump); // We're done with the lump now, at least.
|
||||
return sound;
|
||||
}
|
||||
|
||||
void I_FreeSfx(sfxinfo_t *sfx)
|
||||
{
|
||||
if (sfx->data)
|
||||
FMOD_Sound_Release(sfx->data);
|
||||
sfx->data = NULL;
|
||||
}
|
||||
|
||||
INT32 I_StartSound(sfxenum_t id, UINT8 vol, UINT8 sep, UINT8 pitch, UINT8 priority, INT32 channel)
|
||||
{
|
||||
FMOD_SOUND *sound;
|
||||
FMOD_CHANNEL *chan;
|
||||
INT32 i;
|
||||
float frequency;
|
||||
(void)channel;
|
||||
|
||||
sound = (FMOD_SOUND *)S_sfx[id].data;
|
||||
I_Assert(sound != NULL);
|
||||
|
||||
FMR(FMOD_System_PlaySound(fsys, FMOD_CHANNEL_FREE, sound, true, &chan));
|
||||
|
||||
if (sep == 0)
|
||||
sep = 1;
|
||||
|
||||
FMR(FMOD_Channel_SetVolume(chan, (vol / 255.0) * (sfx_volume / 31.0)));
|
||||
FMR(FMOD_Channel_SetPan(chan, (sep - 128) / 127.0));
|
||||
|
||||
FMR(FMOD_Sound_GetDefaults(sound, &frequency, NULL, NULL, NULL));
|
||||
FMR(FMOD_Channel_SetFrequency(chan, (pitch / 128.0) * frequency));
|
||||
|
||||
FMR(FMOD_Channel_SetPriority(chan, priority));
|
||||
//UNREFERENCED_PARAMETER(priority);
|
||||
//FMR(FMOD_Channel_SetPriority(chan, 1 + ((0xff-vol)>>1))); // automatic priority 1 - 128 based on volume (priority 0 is music)
|
||||
|
||||
FMR(FMOD_Channel_GetIndex(chan, &i));
|
||||
FMR(FMOD_Channel_SetPaused(chan, false));
|
||||
return i;
|
||||
}
|
||||
|
||||
void I_StopSound(INT32 handle)
|
||||
{
|
||||
FMOD_CHANNEL *chan;
|
||||
FMR(FMOD_System_GetChannel(fsys, handle, &chan));
|
||||
if (music_stream && chan == music_channel)
|
||||
return;
|
||||
FMR(FMOD_Channel_Stop(chan));
|
||||
}
|
||||
|
||||
boolean I_SoundIsPlaying(INT32 handle)
|
||||
{
|
||||
FMOD_CHANNEL *chan;
|
||||
FMOD_BOOL playing;
|
||||
FMOD_RESULT e;
|
||||
FMR(FMOD_System_GetChannel(fsys, handle, &chan));
|
||||
if (music_stream && chan == music_channel)
|
||||
return false;
|
||||
e = FMOD_Channel_IsPlaying(chan, &playing);
|
||||
switch(e)
|
||||
{
|
||||
case FMOD_ERR_INVALID_HANDLE: // Sound effect finished.
|
||||
case FMOD_ERR_CHANNEL_STOLEN: // Sound effect interrupted. -- technically impossible due to GetChannel by handle. :(
|
||||
return false; // therefore, it's not playing anymore.
|
||||
default:
|
||||
FMR(e);
|
||||
break;
|
||||
}
|
||||
return (boolean)playing;
|
||||
}
|
||||
|
||||
// seems to never be called on an invalid channel (calls I_SoundIsPlaying first?)
|
||||
// so I'm not gonna worry about it.
|
||||
void I_UpdateSoundParams(INT32 handle, UINT8 vol, UINT8 sep, UINT8 pitch)
|
||||
{
|
||||
FMOD_CHANNEL *chan;
|
||||
FMOD_SOUND *sound;
|
||||
float frequency;
|
||||
|
||||
FMR(FMOD_System_GetChannel(fsys, handle, &chan));
|
||||
FMR(FMOD_Channel_SetVolume(chan, (vol / 255.0) * (sfx_volume / 31.0)));
|
||||
FMR(FMOD_Channel_SetPan(chan, (sep - 128) / 127.0));
|
||||
|
||||
FMR(FMOD_Channel_GetCurrentSound(chan, &sound));
|
||||
FMR(FMOD_Sound_GetDefaults(sound, &frequency, NULL, NULL, NULL));
|
||||
FMR(FMOD_Channel_SetFrequency(chan, (pitch / 128.0) * frequency));
|
||||
|
||||
//FMR(FMOD_Channel_SetPriority(chan, 1 + ((0xff-vol)>>1))); // automatic priority 1 - 128 based on volume (priority 0 is music)
|
||||
}
|
||||
|
||||
void I_SetSfxVolume(UINT8 volume)
|
||||
{
|
||||
// volume is 0 to 31.
|
||||
sfx_volume = volume;
|
||||
}
|
||||
|
||||
/// ------------------------
|
||||
// MUSIC SYSTEM
|
||||
/// ------------------------
|
||||
|
||||
void I_InitMusic(void)
|
||||
{
|
||||
}
|
||||
|
||||
void I_ShutdownMusic(void)
|
||||
{
|
||||
I_StopSong();
|
||||
}
|
||||
|
||||
/// ------------------------
|
||||
// MUSIC PROPERTIES
|
||||
/// ------------------------
|
||||
|
||||
musictype_t I_SongType(void)
|
||||
{
|
||||
FMOD_SOUND_TYPE type;
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
if (gme)
|
||||
return MU_GME;
|
||||
#endif
|
||||
|
||||
if (!music_stream)
|
||||
return MU_NONE;
|
||||
|
||||
if (FMOD_Sound_GetFormat(music_stream, &type, NULL, NULL, NULL) == FMOD_OK)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case FMOD_SOUND_TYPE_WAV:
|
||||
return MU_WAV;
|
||||
case FMOD_SOUND_TYPE_MOD:
|
||||
return MU_MOD;
|
||||
case FMOD_SOUND_TYPE_MIDI:
|
||||
return MU_MID;
|
||||
case FMOD_SOUND_TYPE_OGGVORBIS:
|
||||
return MU_OGG;
|
||||
case FMOD_SOUND_TYPE_MPEG:
|
||||
return MU_MP3;
|
||||
case FMOD_SOUND_TYPE_FLAC:
|
||||
return MU_FLAC;
|
||||
default:
|
||||
return MU_NONE;
|
||||
}
|
||||
}
|
||||
else
|
||||
return MU_NONE;
|
||||
}
|
||||
|
||||
boolean I_SongPlaying(void)
|
||||
{
|
||||
return (music_stream != NULL);
|
||||
}
|
||||
|
||||
boolean I_SongPaused(void)
|
||||
{
|
||||
FMOD_BOOL fmpaused = false;
|
||||
if (music_stream)
|
||||
FMOD_Channel_GetPaused(music_channel, &fmpaused);
|
||||
return (boolean)fmpaused;
|
||||
}
|
||||
|
||||
/// ------------------------
|
||||
// MUSIC EFFECTS
|
||||
/// ------------------------
|
||||
|
||||
boolean I_SetSongSpeed(float speed)
|
||||
{
|
||||
FMOD_RESULT e;
|
||||
float frequency;
|
||||
if (!music_stream)
|
||||
return false;
|
||||
if (speed > 250.0f)
|
||||
speed = 250.0f; //limit speed up to 250x
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
// Try to set GME speed
|
||||
if (gme)
|
||||
{
|
||||
gme_set_tempo(gme, speed);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Try to set Mod/Midi speed
|
||||
e = FMOD_Sound_SetMusicSpeed(music_stream, speed);
|
||||
|
||||
if (e == FMOD_ERR_FORMAT)
|
||||
{
|
||||
// Just change pitch instead for Ogg/etc.
|
||||
FMR(FMOD_Sound_GetDefaults(music_stream, &frequency, NULL, NULL, NULL));
|
||||
FMR_MUSIC(FMOD_Channel_SetFrequency(music_channel, speed*frequency));
|
||||
}
|
||||
else
|
||||
FMR_MUSIC(e);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// ------------------------
|
||||
// MUSIC PLAYBACK
|
||||
/// ------------------------
|
||||
|
||||
boolean I_LoadSong(char *data, size_t len)
|
||||
{
|
||||
FMOD_CREATESOUNDEXINFO fmt;
|
||||
FMOD_RESULT e;
|
||||
FMOD_TAG tag;
|
||||
unsigned int loopstart, loopend;
|
||||
|
||||
if (
|
||||
#ifdef HAVE_LIBGME
|
||||
gme ||
|
||||
#endif
|
||||
music_stream
|
||||
)
|
||||
I_UnloadSong();
|
||||
|
||||
memset(&fmt, 0, sizeof(FMOD_CREATESOUNDEXINFO));
|
||||
fmt.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
if ((UINT8)data[0] == 0x1F
|
||||
&& (UINT8)data[1] == 0x8B)
|
||||
{
|
||||
#ifdef HAVE_ZLIB
|
||||
UINT8 *inflatedData;
|
||||
size_t inflatedLen;
|
||||
z_stream stream;
|
||||
int zErr; // Somewhere to handle any error messages zlib tosses out
|
||||
|
||||
memset(&stream, 0x00, sizeof (z_stream)); // Init zlib stream
|
||||
// Begin the inflation process
|
||||
inflatedLen = *(UINT32 *)(data + (len-4)); // Last 4 bytes are the decompressed size, typically
|
||||
inflatedData = (UINT8 *)Z_Calloc(inflatedLen, PU_MUSIC, NULL); // Make room for the decompressed data
|
||||
stream.total_in = stream.avail_in = len;
|
||||
stream.total_out = stream.avail_out = inflatedLen;
|
||||
stream.next_in = (UINT8 *)data;
|
||||
stream.next_out = inflatedData;
|
||||
|
||||
zErr = inflateInit2(&stream, 32 + MAX_WBITS);
|
||||
if (zErr == Z_OK) // We're good to go
|
||||
{
|
||||
zErr = inflate(&stream, Z_FINISH);
|
||||
if (zErr == Z_STREAM_END) {
|
||||
// Run GME on new data
|
||||
if (!gme_open_data(inflatedData, inflatedLen, &gme, 44100))
|
||||
{
|
||||
gme_equalizer_t gmeq = {GME_TREBLE, GME_BASS, 0,0,0,0,0,0,0,0};
|
||||
Z_Free(inflatedData); // GME supposedly makes a copy for itself, so we don't need this lying around
|
||||
Z_Free(data); // We don't need this, either.
|
||||
gme_set_equalizer(gme,&gmeq);
|
||||
fmt.format = FMOD_SOUND_FORMAT_PCM16;
|
||||
fmt.defaultfrequency = 44100;
|
||||
fmt.numchannels = 2;
|
||||
fmt.length = -1;
|
||||
fmt.decodebuffersize = (44100 * 2) / 35;
|
||||
fmt.pcmreadcallback = GMEReadCallback;
|
||||
fmt.userdata = gme;
|
||||
FMR(FMOD_System_CreateStream(fsys, NULL, FMOD_OPENUSER, &fmt, &music_stream));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *errorType;
|
||||
switch (zErr)
|
||||
{
|
||||
case Z_ERRNO:
|
||||
errorType = "Z_ERRNO"; break;
|
||||
case Z_STREAM_ERROR:
|
||||
errorType = "Z_STREAM_ERROR"; break;
|
||||
case Z_DATA_ERROR:
|
||||
errorType = "Z_DATA_ERROR"; break;
|
||||
case Z_MEM_ERROR:
|
||||
errorType = "Z_MEM_ERROR"; break;
|
||||
case Z_BUF_ERROR:
|
||||
errorType = "Z_BUF_ERROR"; break;
|
||||
case Z_VERSION_ERROR:
|
||||
errorType = "Z_VERSION_ERROR"; break;
|
||||
default:
|
||||
errorType = "unknown error";
|
||||
}
|
||||
CONS_Alert(CONS_ERROR,"Encountered %s when running inflate: %s\n", errorType, stream.msg);
|
||||
}
|
||||
(void)inflateEnd(&stream);
|
||||
}
|
||||
else // Hold up, zlib's got a problem
|
||||
{
|
||||
const char *errorType;
|
||||
switch (zErr)
|
||||
{
|
||||
case Z_ERRNO:
|
||||
errorType = "Z_ERRNO"; break;
|
||||
case Z_STREAM_ERROR:
|
||||
errorType = "Z_STREAM_ERROR"; break;
|
||||
case Z_DATA_ERROR:
|
||||
errorType = "Z_DATA_ERROR"; break;
|
||||
case Z_MEM_ERROR:
|
||||
errorType = "Z_MEM_ERROR"; break;
|
||||
case Z_BUF_ERROR:
|
||||
errorType = "Z_BUF_ERROR"; break;
|
||||
case Z_VERSION_ERROR:
|
||||
errorType = "Z_VERSION_ERROR"; break;
|
||||
default:
|
||||
errorType = "unknown error";
|
||||
}
|
||||
CONS_Alert(CONS_ERROR,"Encountered %s when running inflateInit: %s\n", errorType, stream.msg);
|
||||
}
|
||||
Z_Free(inflatedData); // GME didn't open jack, but don't let that stop us from freeing this up
|
||||
#else
|
||||
//CONS_Alert(CONS_ERROR,"Cannot decompress VGZ; no zlib support\n");
|
||||
#endif
|
||||
}
|
||||
else if (!gme_open_data(data, len, &gme, 44100))
|
||||
{
|
||||
gme_equalizer_t gmeq = {GME_TREBLE, GME_BASS, 0,0,0,0,0,0,0,0};
|
||||
Z_Free(data); // We don't need this anymore.
|
||||
gme_set_equalizer(gme,&gmeq);
|
||||
fmt.format = FMOD_SOUND_FORMAT_PCM16;
|
||||
fmt.defaultfrequency = 44100;
|
||||
fmt.numchannels = 2;
|
||||
fmt.length = -1;
|
||||
fmt.decodebuffersize = (44100 * 2) / 35;
|
||||
fmt.pcmreadcallback = GMEReadCallback;
|
||||
fmt.userdata = gme;
|
||||
FMR(FMOD_System_CreateStream(fsys, NULL, FMOD_OPENUSER, &fmt, &music_stream));
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
fmt.length = len;
|
||||
|
||||
e = FMOD_System_CreateStream(fsys, data, FMOD_OPENMEMORY_POINT, &fmt, &music_stream);
|
||||
if (e != FMOD_OK)
|
||||
{
|
||||
if (e == FMOD_ERR_FORMAT)
|
||||
CONS_Alert(CONS_WARNING, "Failed to play music lump due to invalid format.\n");
|
||||
else
|
||||
FMR(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Try to find a loop point in streaming music formats (ogg, mp3)
|
||||
|
||||
// A proper LOOPPOINT is its own tag, stupid.
|
||||
e = FMOD_Sound_GetTag(music_stream, "LOOPPOINT", 0, &tag);
|
||||
if (e != FMOD_ERR_TAGNOTFOUND)
|
||||
{
|
||||
FMR(e);
|
||||
loopstart = atoi((char *)tag.data); // assumed to be a string data tag.
|
||||
FMR(FMOD_Sound_GetLoopPoints(music_stream, NULL, FMOD_TIMEUNIT_PCM, &loopend, FMOD_TIMEUNIT_PCM));
|
||||
if (loopstart > 0)
|
||||
FMR(FMOD_Sound_SetLoopPoints(music_stream, loopstart, FMOD_TIMEUNIT_PCM, loopend, FMOD_TIMEUNIT_PCM));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Use LOOPMS for time in miliseconds.
|
||||
e = FMOD_Sound_GetTag(music_stream, "LOOPMS", 0, &tag);
|
||||
if (e != FMOD_ERR_TAGNOTFOUND)
|
||||
{
|
||||
FMR(e);
|
||||
loopstart = atoi((char *)tag.data); // assumed to be a string data tag.
|
||||
FMR(FMOD_Sound_GetLoopPoints(music_stream, NULL, FMOD_TIMEUNIT_MS, &loopend, FMOD_TIMEUNIT_PCM));
|
||||
if (loopstart > 0)
|
||||
FMR(FMOD_Sound_SetLoopPoints(music_stream, loopstart, FMOD_TIMEUNIT_MS, loopend, FMOD_TIMEUNIT_PCM));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Try to fetch it from the COMMENT tag, like A.J. Freda
|
||||
e = FMOD_Sound_GetTag(music_stream, "COMMENT", 0, &tag);
|
||||
if (e != FMOD_ERR_TAGNOTFOUND)
|
||||
{
|
||||
char *loopText;
|
||||
// Handle any errors that arose, first
|
||||
FMR(e);
|
||||
// Figure out where the number starts
|
||||
loopText = strstr((char *)tag.data,"LOOPPOINT=");
|
||||
if (loopText != NULL)
|
||||
{
|
||||
// Skip the "LOOPPOINT=" part.
|
||||
loopText += 10;
|
||||
// Convert it to our looppoint
|
||||
// FMOD seems to ensure the tag is properly NULL-terminated.
|
||||
// atoi will stop when it reaches anything that's not a number.
|
||||
loopstart = atoi(loopText);
|
||||
// Now do the rest like above
|
||||
FMR(FMOD_Sound_GetLoopPoints(music_stream, NULL, FMOD_TIMEUNIT_PCM, &loopend, FMOD_TIMEUNIT_PCM));
|
||||
if (loopstart > 0)
|
||||
FMR(FMOD_Sound_SetLoopPoints(music_stream, loopstart, FMOD_TIMEUNIT_PCM, loopend, FMOD_TIMEUNIT_PCM));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// No special loop point
|
||||
return true;
|
||||
}
|
||||
|
||||
void I_UnloadSong(void)
|
||||
{
|
||||
I_StopSong();
|
||||
#ifdef HAVE_LIBGME
|
||||
if (gme)
|
||||
{
|
||||
gme_delete(gme);
|
||||
gme = NULL;
|
||||
}
|
||||
#endif
|
||||
if (music_stream)
|
||||
{
|
||||
FMR(FMOD_Sound_Release(music_stream));
|
||||
music_stream = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
boolean I_PlaySong(boolean looping)
|
||||
{
|
||||
#ifdef HAVE_LIBGME
|
||||
if (gme)
|
||||
{
|
||||
gme_start_track(gme, 0);
|
||||
current_track = 0;
|
||||
FMR(FMOD_System_PlaySound(fsys, FMOD_CHANNEL_FREE, music_stream, false, &music_channel));
|
||||
FMR(FMOD_Channel_SetVolume(music_channel, music_volume / 31.0));
|
||||
FMR(FMOD_Channel_SetPriority(music_channel, 0));
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
FMR(FMOD_Sound_SetMode(music_stream, (looping ? FMOD_LOOP_NORMAL : FMOD_LOOP_OFF)));
|
||||
FMR(FMOD_System_PlaySound(fsys, FMOD_CHANNEL_FREE, music_stream, false, &music_channel));
|
||||
if (I_SongType() != MU_MID)
|
||||
FMR(FMOD_Channel_SetVolume(music_channel, midi_volume / 31.0));
|
||||
else
|
||||
FMR(FMOD_Channel_SetVolume(music_channel, music_volume / 31.0));
|
||||
FMR(FMOD_Channel_SetPriority(music_channel, 0));
|
||||
current_track = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void I_StopSong(void)
|
||||
{
|
||||
if (music_channel)
|
||||
FMR_MUSIC(FMOD_Channel_Stop(music_channel));
|
||||
}
|
||||
|
||||
void I_PauseSong(void)
|
||||
{
|
||||
if (music_channel)
|
||||
FMR_MUSIC(FMOD_Channel_SetPaused(music_channel, true));
|
||||
}
|
||||
|
||||
void I_ResumeSong(void)
|
||||
{
|
||||
if (music_channel)
|
||||
FMR_MUSIC(FMOD_Channel_SetPaused(music_channel, false));
|
||||
}
|
||||
|
||||
void I_SetMusicVolume(UINT8 volume)
|
||||
{
|
||||
if (!music_channel)
|
||||
return;
|
||||
|
||||
// volume is 0 to 31.
|
||||
if (I_SongType() == MU_MID)
|
||||
music_volume = 31; // windows bug hack
|
||||
else
|
||||
music_volume = volume;
|
||||
|
||||
FMR_MUSIC(FMOD_Channel_SetVolume(music_channel, music_volume / 31.0));
|
||||
}
|
||||
|
||||
UINT32 I_GetSongLength(void)
|
||||
{
|
||||
UINT32 length;
|
||||
if (I_SongType() == MU_MID)
|
||||
return 0;
|
||||
FMR_MUSIC(FMOD_Sound_GetLength(music_stream, &length, FMOD_TIMEUNIT_MS));
|
||||
return length;
|
||||
}
|
||||
|
||||
boolean I_SetSongLoopPoint(UINT32 looppoint)
|
||||
{
|
||||
(void)looppoint;
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT32 I_GetSongLoopPoint(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
boolean I_SetSongPosition(UINT32 position)
|
||||
{
|
||||
FMOD_RESULT e;
|
||||
if(I_SongType() == MU_MID)
|
||||
// Dummy out; this works for some MIDI, but not others.
|
||||
// SDL does not support this for any MIDI.
|
||||
return false;
|
||||
|
||||
e = FMOD_Channel_SetPosition(music_channel, position, FMOD_TIMEUNIT_MS);
|
||||
if (e == FMOD_OK)
|
||||
return true;
|
||||
else if (e == FMOD_ERR_UNSUPPORTED // Only music modules, numbnuts!
|
||||
|| e == FMOD_ERR_INVALID_POSITION) // Out-of-bounds!
|
||||
return false;
|
||||
else // Congrats, you horribly broke it somehow
|
||||
{
|
||||
FMR_MUSIC(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
UINT32 I_GetSongPosition(void)
|
||||
{
|
||||
FMOD_RESULT e;
|
||||
unsigned int fmposition = 0;
|
||||
if(I_SongType() == MU_MID)
|
||||
// Dummy out because unsupported, even though FMOD does this correctly.
|
||||
return 0;
|
||||
e = FMOD_Channel_GetPosition(music_channel, &fmposition, FMOD_TIMEUNIT_MS);
|
||||
if (e == FMOD_OK)
|
||||
return (UINT32)fmposition;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
boolean I_SetSongTrack(INT32 track)
|
||||
{
|
||||
if (track != current_track) // If the track's already playing, then why bother?
|
||||
{
|
||||
FMOD_RESULT e;
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
// If the specified track is within the number of tracks playing, then change it
|
||||
if (gme)
|
||||
{
|
||||
if (track >= 0
|
||||
&& track < gme_track_count(gme))
|
||||
{
|
||||
gme_err_t gme_e = gme_start_track(gme,track);
|
||||
if (gme_e == NULL)
|
||||
{
|
||||
current_track = track;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
CONS_Alert(CONS_ERROR, "Encountered GME error: %s\n", gme_e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // HAVE_LIBGME
|
||||
|
||||
// Try to set it via FMOD
|
||||
e = FMOD_Channel_SetPosition(music_channel, (UINT32)track, FMOD_TIMEUNIT_MODORDER);
|
||||
if (e == FMOD_OK) // We good
|
||||
{
|
||||
current_track = track;
|
||||
return true;
|
||||
}
|
||||
else if (e == FMOD_ERR_UNSUPPORTED // Only music modules, numbnuts!
|
||||
|| e == FMOD_ERR_INVALID_POSITION) // Out-of-bounds!
|
||||
return false;
|
||||
else // Congrats, you horribly broke it somehow
|
||||
{
|
||||
FMR_MUSIC(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// ------------------------
|
||||
/// MUSIC FADING
|
||||
/// ------------------------
|
||||
|
||||
void I_SetInternalMusicVolume(UINT8 volume)
|
||||
{
|
||||
(void)volume;
|
||||
}
|
||||
|
||||
void I_StopFadingSong(void)
|
||||
{
|
||||
}
|
||||
|
||||
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void))
|
||||
{
|
||||
(void)target_volume;
|
||||
(void)source_volume;
|
||||
(void)ms;
|
||||
(void)callback;
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void))
|
||||
{
|
||||
(void)target_volume;
|
||||
(void)ms;
|
||||
(void)callback;
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean I_FadeOutStopSong(UINT32 ms)
|
||||
{
|
||||
(void)ms;
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean I_FadeInPlaySong(UINT32 ms, boolean looping)
|
||||
{
|
||||
(void)ms;
|
||||
(void)looping;
|
||||
return false;
|
||||
}
|
3707
src/win32/win_sys.c
3707
src/win32/win_sys.c
File diff suppressed because it is too large
Load diff
1113
src/win32/win_vid.c
1113
src/win32/win_vid.c
File diff suppressed because it is too large
Load diff
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
header("Content-type: text/xml; charset=ISO-8859-1");
|
||||
echo '<?xml version="1.0" encoding="ISO-8859-1"?>';
|
||||
echo "\n";
|
||||
echo '<rdf:RDF';
|
||||
echo ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"';
|
||||
echo "\n";
|
||||
echo ' xmlns="http://purl.org/rss/1.0/"';
|
||||
echo "\n";
|
||||
echo ' xmlns:dc="http://purl.org/dc/elements/1.1/"';
|
||||
echo "\n";
|
||||
echo ' xmlns:srb2ms="http://srb2.servegame.org/SRB2MS/elements/"';
|
||||
echo "\n";
|
||||
echo '>';
|
||||
echo "\n";
|
||||
echo "\n";
|
||||
echo ' <channel rdf:about="http://srb2.servegame.org/">';
|
||||
echo "\n";
|
||||
echo ' <title>SRB2 Master Server RSS Feed</title>';
|
||||
echo "\n";
|
||||
echo ' <link>http://srb2.servegame.org/</link>';
|
||||
echo "\n";
|
||||
echo ' <description>Playing around with RSS</description>';
|
||||
echo "\n";
|
||||
//echo ' <language>en-us</language>';
|
||||
//echo "\n";
|
||||
$fd = fsockopen("srb2.servegame.org", 28900, $errno, $errstr, 5);
|
||||
// $fd = 0;
|
||||
if ($fd)
|
||||
{
|
||||
$buff = "000012400000";
|
||||
fwrite($fd, $buff);
|
||||
while (1)
|
||||
{
|
||||
$content=fgets($fd, 13); // skip 13 first bytes
|
||||
$content=fgets($fd, 1024);
|
||||
echo "$content";
|
||||
if (feof($fd)) break;
|
||||
}
|
||||
fclose($fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<items>';
|
||||
echo '<rdf:Seq>';
|
||||
echo '<rdf:li rdf:resource="http://srb2.servegame.org/" />';
|
||||
echo '</rdf:Seq>';
|
||||
echo '</items>';
|
||||
echo '</channel>';
|
||||
echo "\n";
|
||||
echo '<item rdf:about="http://srb2.servegame.org/"> ';
|
||||
echo '<title>No master server</title><dc:description>The master server is not running</dc:description></item>';
|
||||
}
|
||||
?>
|
||||
</rdf:RDF>
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
header("Content-type: text/xml; charset=ISO-8859-1");
|
||||
echo '<?xml version="1.0" encoding="ISO-8859-1" ?>';
|
||||
echo "\n";
|
||||
echo '<rss version="0.92">';
|
||||
echo "\n";
|
||||
echo ' <channel>';
|
||||
echo "\n";
|
||||
echo ' <title>SRB2 Master Server RSS Feed</title>';
|
||||
echo "\n";
|
||||
echo ' <description>Playing around with RSS</description>';
|
||||
echo "\n";
|
||||
echo ' <link>http://srb2.servegame.org/</link>';
|
||||
echo "\n";
|
||||
echo ' <language>en-us</language>';
|
||||
echo "\n";
|
||||
$fd = fsockopen("srb2.servegame.org", 28900, $errno, $errstr, 5);
|
||||
if ($fd)
|
||||
{
|
||||
$buff = "000012380000";
|
||||
fwrite($fd, $buff);
|
||||
while (1)
|
||||
{
|
||||
$content=fgets($fd, 13); // skip the next 13 bytes
|
||||
$content=fgets($fd, 1024);
|
||||
echo "$content";
|
||||
if (feof($fd)) break;
|
||||
}
|
||||
fclose($fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<item><title>No master server</title><description>The master server is not running</description></item>";
|
||||
}
|
||||
?>
|
||||
</channel>
|
||||
</rss>
|
|
@ -1,90 +0,0 @@
|
|||
<?php
|
||||
header("Content-type: text/html; charset=ISO-8859-1");
|
||||
ob_start("ob_gzhandler");
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>SRB2 Master Server Status</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#000000" TEXT="#FFFFFF">
|
||||
<CENTER>
|
||||
<TABLE BORDER="0" WIDTH="835">
|
||||
<TR>
|
||||
<TD WIDTH="444">
|
||||
<CENTER>
|
||||
<A HREF="http://www.srb2.org/"> <IMG SRC="http://clipper.ship.edu/~af0916/srb2/corner.png" ALT="SRB2 logo." WIDTH="120" HEIGHT="84">
|
||||
<BR>
|
||||
SRB2's HomePage</A>
|
||||
</CENTER>
|
||||
</TD>
|
||||
<TD WIDTH="392">
|
||||
<CENTER>
|
||||
<A HREF="http://chompo.home.comcast.net/"><IMG SRC="http://chompo.home.comcast.net/cwimages/topbar.jpg" ALT="Chompy World logo." WIDTH="386" HEIGHT="64">
|
||||
<BR>
|
||||
Chompy World</A>
|
||||
</CENTER>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH="444">
|
||||
<CENTER>
|
||||
<A HREF="http://www.sepwich.com/foxboy/Srb2World/"><IMG SRC="http://www.sepwich.com/foxboy/Srb2World/title.jpg" ALT="SRB2 World logo." WIDTH="436" HEIGHT="52">
|
||||
<BR>
|
||||
SRB2 World</A>
|
||||
</CENTER>
|
||||
</TD>
|
||||
<TD WIDTH="389">
|
||||
<!-- <CENTER>
|
||||
<A HREF="http://jte.rose-manor.net/"><img src="http://jte.rose-manor.net/images/logo.png" alt="JTE Website logo." width="295" height="43">
|
||||
<BR>
|
||||
Jason the Echidna's website</A>
|
||||
</CENTER> !-->
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<HR>
|
||||
|
||||
<?php
|
||||
// ob_start("mb_output_handler");
|
||||
$host_addr = "Alam_GBC's box (srb2.servegame.org : 28900)";
|
||||
$fd = fsockopen("srb2.servegame.org", 28900, $errno, $errstr, 5);
|
||||
if ($fd)
|
||||
{
|
||||
echo "<h3>SRB2 Master Server Status</h3>\nCurrent host: $host_addr<br>";
|
||||
$buff = "000043210000";
|
||||
fwrite($fd, $buff);
|
||||
while (1)
|
||||
{
|
||||
$content=fgets($fd, 13); // skip 13 first bytes
|
||||
$content=fgets($fd, 1024);
|
||||
echo "$content";
|
||||
if (feof($fd)) break;
|
||||
}
|
||||
fclose($fd);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'The master server is not running <br>';
|
||||
echo "ERROR: $errno - $errstr<br />\n";
|
||||
}
|
||||
?>
|
||||
<HR>
|
||||
<H2>Info:</H2>
|
||||
<A HREF="http://fanmade.emulationzone.org/gregorsoft/launcher.htm">Win32 SRB2MSLauncher</A> Great job, "Gregor Dick"/Oogaland of <A HREF="http://fanmade.emulationzone.org/gregorsoft/">Gregorsoft Software</A>
|
||||
<BR>
|
||||
<HR><BR>
|
||||
<H2>Version Info:</H2>
|
||||
srb2dos.exe (DOS/Allegro/WATTCP32 version)<BR>
|
||||
srb2.exe (Windows/DirectX/FMOD version)<BR>
|
||||
srb2sdl.exe (Windows/SDL/SDL_mixer version)<BR>
|
||||
lsdlsrb2 (GNU/Linux/SDL/SDL_mixer version)<BR>
|
||||
<BR>
|
||||
<A HREF="http://clipper.ship.edu/~af0916/srb2/download.htm">Srb2win.exe</A> v1.09.4 (use Internet search menu)<BR>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<?php
|
||||
ob_flush();
|
||||
?>
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
header("Content-type: text/plain; charset=ISO-8859-1");
|
||||
$host_addr = "Alam_GBC's box (srb2.servegame.org : 28900)";
|
||||
$fd = fsockopen("srb2.servegame.org", 28900, $errno, $errstr, 5);
|
||||
if ($fd)
|
||||
{
|
||||
stream_set_timeout ($fd, 5);
|
||||
echo "SRB2 Master Server Status\nCurrent host: $host_addr\n";
|
||||
$buff = "000012360000";
|
||||
fwrite($fd, $buff);
|
||||
while (1)
|
||||
{
|
||||
$content=fgets($fd, 13); // skip 13 first bytes
|
||||
$content=fgets($fd, 1024);
|
||||
echo "$content";
|
||||
if (feof($fd)) break;
|
||||
}
|
||||
fclose($fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "The master server is not running";
|
||||
}
|
||||
?>
|
|
@ -1 +0,0 @@
|
|||
Once patched, run autogen.sh, configure with "./configure --without-x --disable-video-x11 --disable-video-fbcon --disable-video-aalib --disable-video-directfb --disable-video-opengl --enable-video-gc" and then compile.
|
|
@ -1,641 +0,0 @@
|
|||
From 8e6ada7bc33e3cc4e1c17821ea171bf0815a505d Mon Sep 17 00:00:00 2001
|
||||
From: Alam Arias <Alam.GBC@gmail.com>
|
||||
Date: Tue, 1 Dec 2009 19:31:57 -0500
|
||||
Subject: [PATCH] SDL GC hack
|
||||
|
||||
---
|
||||
configure.in | 17 ++
|
||||
include/SDL_config.h.in | 1 +
|
||||
src/video/fbcon/SDL_fbgc.c | 471 +++++++++++++++++++++++++++++++++++++++++
|
||||
src/video/fbcon/SDL_fbgc.h | 35 +++
|
||||
src/video/fbcon/SDL_fbvideo.c | 10 +
|
||||
src/video/fbcon/SDL_fbvideo.h | 11 +
|
||||
6 files changed, 545 insertions(+), 0 deletions(-)
|
||||
create mode 100644 src/video/fbcon/SDL_fbgc.c
|
||||
create mode 100644 src/video/fbcon/SDL_fbgc.h
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index a7e9b18..a8961ba 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -1227,6 +1227,22 @@ AC_HELP_STRING([--enable-video-fbcon], [use framebuffer console video driver [[d
|
||||
fi
|
||||
}
|
||||
|
||||
+dnl See if we're running on Linux for the Nintendo GameCube/Wii
|
||||
+dnl FIXME, perform a real test here...
|
||||
+CheckGC()
|
||||
+{
|
||||
+ AC_ARG_ENABLE(video-gc,
|
||||
+AC_HELP_STRING([--enable-video-gc], [enable GameCube video support in FB [[default=no]]]),
|
||||
+ , enable_video_gc=no)
|
||||
+ if test x$enable_video = xyes -a x$enable_video_gc = xyes -a x$video_fbcon = xyes; then
|
||||
+ video_gc=yes
|
||||
+ AC_MSG_RESULT($video_gc)
|
||||
+ if test x$video_gc = xyes; then
|
||||
+ AC_DEFINE(SDL_VIDEO_DRIVER_GC)
|
||||
+ fi
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
dnl Find DirectFB
|
||||
CheckDirectFB()
|
||||
{
|
||||
@@ -2322,6 +2338,7 @@ case "$host" in
|
||||
CheckX11
|
||||
CheckNANOX
|
||||
CheckFBCON
|
||||
+ CheckGC
|
||||
CheckDirectFB
|
||||
CheckPS2GS
|
||||
CheckPS3
|
||||
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
|
||||
index 58593ca..e523e9b 100644
|
||||
--- a/include/SDL_config.h.in
|
||||
+++ b/include/SDL_config.h.in
|
||||
@@ -262,6 +262,7 @@
|
||||
#undef SDL_VIDEO_DRIVER_DUMMY
|
||||
#undef SDL_VIDEO_DRIVER_FBCON
|
||||
#undef SDL_VIDEO_DRIVER_GAPI
|
||||
+#undef SDL_VIDEO_DRIVER_GC
|
||||
#undef SDL_VIDEO_DRIVER_GEM
|
||||
#undef SDL_VIDEO_DRIVER_GGI
|
||||
#undef SDL_VIDEO_DRIVER_IPOD
|
||||
diff --git a/src/video/fbcon/SDL_fbgc.c b/src/video/fbcon/SDL_fbgc.c
|
||||
new file mode 100644
|
||||
index 0000000..b3b72bb
|
||||
--- /dev/null
|
||||
+++ b/src/video/fbcon/SDL_fbgc.c
|
||||
@@ -0,0 +1,471 @@
|
||||
+/*
|
||||
+ SDL - Simple DirectMedia Layer
|
||||
+ Copyright (C) 1997-2009 Sam Lantinga
|
||||
+
|
||||
+ This library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ This library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with this library; if not, write to the Free Software
|
||||
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+
|
||||
+ Sam Lantinga
|
||||
+ slouken@libsdl.org
|
||||
+*/
|
||||
+#include "SDL_config.h"
|
||||
+
|
||||
+#ifdef SDL_VIDEO_DRIVER_GC
|
||||
+#include <errno.h>
|
||||
+#include "SDL_video.h"
|
||||
+#include "../SDL_blit.h"
|
||||
+#include "SDL_fbgc.h"
|
||||
+
|
||||
+static Uint32 r_Yr[256];
|
||||
+static Uint32 g_Yg_[256];
|
||||
+static Uint32 b_Yb[256];
|
||||
+static Uint32 r_Ur[256];
|
||||
+static Uint32 g_Ug_[256];
|
||||
+static Uint32 b_Ub[256];
|
||||
+/* static Uint32 r_Vr[256]; // space and cache optimisation */
|
||||
+#define r_Vr b_Ub
|
||||
+static Uint32 g_Vg_[256];
|
||||
+static Uint32 b_Vb[256];
|
||||
+
|
||||
+static Uint8 RGB16toY[1 << 16];
|
||||
+static Uint8 RGB16toU[1 << 16];
|
||||
+static Uint8 RGB16toV[1 << 16];
|
||||
+
|
||||
+#ifndef FBIOFLIPHACK
|
||||
+#define FBIOFLIPHACK 0x4623 /* gc-linux */
|
||||
+#endif
|
||||
+
|
||||
+#ifndef GC_BLACK
|
||||
+#define GC_BLACK 0x00800080
|
||||
+#endif
|
||||
+
|
||||
+#ifdef GC_DEBUG
|
||||
+# define GC_DPRINTF(fmt, args...) \
|
||||
+ fprintf(stderr,"DDD|%s: " fmt, __FUNCTION__ , ## args)
|
||||
+#else
|
||||
+# define GC_DPRINTF(fmt, args...)
|
||||
+#endif
|
||||
+
|
||||
+SDL_bool GC_Test(_THIS)
|
||||
+{
|
||||
+ int fliptest;
|
||||
+ if (ioctl(console_fd, FBIOFLIPHACK, &fliptest))
|
||||
+ return SDL_TRUE;
|
||||
+ return SDL_FALSE;
|
||||
+}
|
||||
+
|
||||
+SDL_bool GC_Available(void)
|
||||
+{
|
||||
+ if (access("/sys/bus/of_platform/drivers/gcn-vifb", 0) == 0)
|
||||
+ return SDL_TRUE;
|
||||
+
|
||||
+ return SDL_FALSE;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ *
|
||||
+ * Color space handling.
|
||||
+ */
|
||||
+
|
||||
+#define RGB2YUV_SHIFT 16
|
||||
+#define RGB2YUV_LUMA 16
|
||||
+#define RGB2YUV_CHROMA 128
|
||||
+
|
||||
+#define Yr ((int)( 0.299*(1<<RGB2YUV_SHIFT)))
|
||||
+#define Yg ((int)( 0.587*(1<<RGB2YUV_SHIFT)))
|
||||
+#define Yb ((int)( 0.114*(1<<RGB2YUV_SHIFT)))
|
||||
+
|
||||
+#define Ur ((int)(-0.169*(1<<RGB2YUV_SHIFT)))
|
||||
+#define Ug ((int)(-0.331*(1<<RGB2YUV_SHIFT)))
|
||||
+#define Ub ((int)( 0.500*(1<<RGB2YUV_SHIFT)))
|
||||
+
|
||||
+#define Vr ((int)( 0.500*(1<<RGB2YUV_SHIFT))) /* same as Ub */
|
||||
+#define Vg ((int)(-0.419*(1<<RGB2YUV_SHIFT)))
|
||||
+#define Vb ((int)(-0.081*(1<<RGB2YUV_SHIFT)))
|
||||
+
|
||||
+#define clamp(x, y, z) ((z < x) ? x : ((z > y) ? y : z))
|
||||
+
|
||||
+static void GC_InitRGB2YUVTables(void)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+ unsigned int r, g, b;
|
||||
+
|
||||
+ for (i = 0; i < 256; i++) {
|
||||
+ r_Yr[i] = Yr * i;
|
||||
+ g_Yg_[i] = Yg * i + (RGB2YUV_LUMA << RGB2YUV_SHIFT);
|
||||
+ b_Yb[i] = Yb * i;
|
||||
+ r_Ur[i] = Ur * i;
|
||||
+ g_Ug_[i] = Ug * i + (RGB2YUV_CHROMA << RGB2YUV_SHIFT);
|
||||
+ b_Ub[i] = Ub * i;
|
||||
+ r_Vr[i] = Vr * i;
|
||||
+ g_Vg_[i] = Vg * i + (RGB2YUV_CHROMA << RGB2YUV_SHIFT);
|
||||
+ b_Vb[i] = Vb * i;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < 1 << 16; i++) {
|
||||
+ /* RGB565 */
|
||||
+ r = ((i >> 8) & 0xf8);
|
||||
+ g = ((i >> 3) & 0xfc);
|
||||
+ b = ((i << 3) & 0xf8);
|
||||
+ /* extend to 8bit */
|
||||
+ r |= (r >> 5);
|
||||
+ g |= (g >> 6);
|
||||
+ b |= (b >> 5);
|
||||
+
|
||||
+ RGB16toY[i] =
|
||||
+ clamp(16, 235,
|
||||
+ (r_Yr[r] + g_Yg_[g] + b_Yb[b]) >> RGB2YUV_SHIFT);
|
||||
+ RGB16toU[i] =
|
||||
+ clamp(16, 240,
|
||||
+ (r_Ur[r] + g_Ug_[g] + b_Ub[b]) >> RGB2YUV_SHIFT);
|
||||
+ RGB16toV[i] =
|
||||
+ clamp(16, 240,
|
||||
+ (r_Vr[r] + g_Vg_[g] + b_Vb[b]) >> RGB2YUV_SHIFT);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static inline Uint32 rgbrgb16toyuy2(Uint16 rgb1, Uint16 rgb2)
|
||||
+{
|
||||
+ register int Y1, Cb, Y2, Cr;
|
||||
+ Uint16 rgb;
|
||||
+
|
||||
+ /* fast path, thanks to bohdy */
|
||||
+ if (!(rgb1 | rgb2)) {
|
||||
+ return GC_BLACK; /* black, black */
|
||||
+ }
|
||||
+
|
||||
+ if (rgb1 == rgb2) {
|
||||
+ /* fast path, thanks to isobel */
|
||||
+ Y1 = Y2 = RGB16toY[rgb1];
|
||||
+ Cb = RGB16toU[rgb1];
|
||||
+ Cr = RGB16toV[rgb1];
|
||||
+ } else {
|
||||
+ Y1 = RGB16toY[rgb1];
|
||||
+ Y2 = RGB16toY[rgb2];
|
||||
+
|
||||
+ /* RGB565 average */
|
||||
+ rgb = ((rgb1 >> 1) & 0xFBEF) + ((rgb2 >> 1) & 0xFBEF) +
|
||||
+ ((rgb1 & rgb2) & 0x0821);
|
||||
+
|
||||
+ Cb = RGB16toU[rgb];
|
||||
+ Cr = RGB16toV[rgb];
|
||||
+ }
|
||||
+
|
||||
+ return (((char)Y1) << 24) | (((char)Cb) << 16) | (((char)Y2) << 8)
|
||||
+ | (((char)Cr) << 0);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ *
|
||||
+ * Blitters.
|
||||
+ */
|
||||
+static void GC_UpdateRectRGB16(_THIS, SDL_Rect * rect, int pitch)
|
||||
+{
|
||||
+ int width, height, left, i, mod, mod32;
|
||||
+ Uint8 *src, *dst;
|
||||
+ Uint32 *src32, *dst32;
|
||||
+ Uint16 *rgb;
|
||||
+
|
||||
+ /* XXX case width < 2 needs special treatment */
|
||||
+
|
||||
+ /* in pixel units */
|
||||
+ left = rect->x & ~1; /* 2 pixel align */
|
||||
+ width = (rect->w + 1) & ~1; /* 2 pixel align in excess */
|
||||
+ height = rect->h;
|
||||
+
|
||||
+ /* in bytes, src and dest are 16bpp */
|
||||
+ src = shadow_mem + (rect->y * pitch) + left * 2;
|
||||
+ dst = flip_address[back_page] + page_offset +
|
||||
+ (rect->y * pitch) + left * 2;
|
||||
+ mod = pitch - width * 2;
|
||||
+
|
||||
+ src32 = (Uint32 *) src;
|
||||
+ dst32 = (Uint32 *) dst;
|
||||
+ mod32 = mod / 4;
|
||||
+
|
||||
+ while (height--) {
|
||||
+ i = width / 2;
|
||||
+
|
||||
+ while (i--) {
|
||||
+ rgb = (Uint16 *) src32;
|
||||
+ *dst32++ = rgbrgb16toyuy2(rgb[0], rgb[1]);
|
||||
+ src32++;
|
||||
+ }
|
||||
+ src32 += mod32;
|
||||
+ dst32 += mod32;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void GC_Init(_THIS, SDL_PixelFormat *vformat)
|
||||
+{
|
||||
+ GC_InitRGB2YUVTables();
|
||||
+
|
||||
+ /* 16 bits per pixel */
|
||||
+ vformat->BitsPerPixel = 16;
|
||||
+ vformat->BytesPerPixel = 2;
|
||||
+ /* RGB565 */
|
||||
+ vformat->Rmask = 0x0000f800;
|
||||
+ vformat->Gmask = 0x000007e0;
|
||||
+ vformat->Bmask = 0x0000001f;
|
||||
+
|
||||
+ shadow_fb = 1;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ *
|
||||
+ * Video mode handling.
|
||||
+ */
|
||||
+
|
||||
+/* only 640x480 16bpp is currently supported */
|
||||
+const static SDL_Rect RECT_640x480 = { 0, 0, 640, 480 };
|
||||
+const static SDL_Rect *vid_modes[] = {
|
||||
+ &RECT_640x480,
|
||||
+ NULL
|
||||
+};
|
||||
+
|
||||
+static SDL_Rect **GC_ListModes(_THIS, SDL_PixelFormat * format, Uint32 flags)
|
||||
+{
|
||||
+ switch (format->BitsPerPixel) {
|
||||
+ case 16:
|
||||
+ return (SDL_Rect **) vid_modes;
|
||||
+ default:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SDL_Surface *GC_SetVideoMode(_THIS, SDL_Surface * current,
|
||||
+ int width, int height, int bpp, Uint32 flags)
|
||||
+{
|
||||
+ struct fb_fix_screeninfo finfo;
|
||||
+ struct fb_var_screeninfo vinfo;
|
||||
+ int i;
|
||||
+ Uint32 Rmask;
|
||||
+ Uint32 Gmask;
|
||||
+ Uint32 Bmask;
|
||||
+ Uint32 *p, *q;
|
||||
+ Uint32 yres;
|
||||
+
|
||||
+ GC_DPRINTF("Setting %dx%d %dbpp %smode\n", width, height, bpp,
|
||||
+ (flags & SDL_DOUBLEBUF)?"(doublebuf) ":"");
|
||||
+
|
||||
+ /* Set the terminal into graphics mode */
|
||||
+ if (FB_EnterGraphicsMode(this) < 0) {
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+
|
||||
+ /* Restore the original palette */
|
||||
+ //FB_RestorePalette(this);
|
||||
+
|
||||
+ /* Set the video mode and get the final screen format */
|
||||
+ if (ioctl(console_fd, FBIOGET_VSCREENINFO, &vinfo) < 0) {
|
||||
+ SDL_SetError("Couldn't get console screen info");
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+
|
||||
+ yres = vinfo.yres;
|
||||
+
|
||||
+ /* hack to center 640x480 resolution on PAL cubes */
|
||||
+ if (vinfo.xres == 640 && vinfo.yres == 576) {
|
||||
+ page_offset = ((576 - 480) / 2) * 640 * ((bpp + 7) / 8);
|
||||
+ } else {
|
||||
+ page_offset = 0;
|
||||
+ }
|
||||
+
|
||||
+ /* clear all video memory */
|
||||
+ p = (Uint32 *)mapped_mem;
|
||||
+ q = (Uint32 *)(mapped_mem + mapped_memlen);
|
||||
+ while (p < q)
|
||||
+ *p++ = GC_BLACK;
|
||||
+
|
||||
+ if ((vinfo.xres != width) || (vinfo.yres != height) ||
|
||||
+ (vinfo.bits_per_pixel != bpp)) {
|
||||
+ vinfo.activate = FB_ACTIVATE_NOW;
|
||||
+ vinfo.accel_flags = 0;
|
||||
+ vinfo.bits_per_pixel = bpp;
|
||||
+ vinfo.xres = width;
|
||||
+ vinfo.xres_virtual = width;
|
||||
+ /* do not modify yres*, we use a fake 640x480 mode in PAL */
|
||||
+ //vinfo.yres = height;
|
||||
+ //vinfo.yres_virtual = 2*height;
|
||||
+ vinfo.xoffset = 0;
|
||||
+ vinfo.yoffset = 0;
|
||||
+ vinfo.red.length = vinfo.red.offset = 0;
|
||||
+ vinfo.green.length = vinfo.green.offset = 0;
|
||||
+ vinfo.blue.length = vinfo.blue.offset = 0;
|
||||
+ vinfo.transp.length = vinfo.transp.offset = 0;
|
||||
+
|
||||
+ if (ioctl(console_fd, FBIOPUT_VSCREENINFO, &vinfo) < 0) {
|
||||
+ SDL_SetError("Couldn't set console screen info");
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+ } else {
|
||||
+ int maxheight;
|
||||
+
|
||||
+ /* Figure out how much video memory is available */
|
||||
+ maxheight = 2*yres;
|
||||
+ if (vinfo.yres_virtual > maxheight) {
|
||||
+ vinfo.yres_virtual = maxheight;
|
||||
+ }
|
||||
+ }
|
||||
+ cache_vinfo = vinfo;
|
||||
+
|
||||
+ Rmask = 0;
|
||||
+ for (i = 0; i < vinfo.red.length; ++i) {
|
||||
+ Rmask <<= 1;
|
||||
+ Rmask |= (0x00000001 << vinfo.red.offset);
|
||||
+ }
|
||||
+ Gmask = 0;
|
||||
+ for (i = 0; i < vinfo.green.length; ++i) {
|
||||
+ Gmask <<= 1;
|
||||
+ Gmask |= (0x00000001 << vinfo.green.offset);
|
||||
+ }
|
||||
+ Bmask = 0;
|
||||
+ for (i = 0; i < vinfo.blue.length; ++i) {
|
||||
+ Bmask <<= 1;
|
||||
+ Bmask |= (0x00000001 << vinfo.blue.offset);
|
||||
+ }
|
||||
+ if (!SDL_ReallocFormat(current, bpp, Rmask, Gmask, Bmask, 0)) {
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+
|
||||
+ /* Get the fixed information about the console hardware.
|
||||
+ This is necessary since finfo.line_length changes.
|
||||
+ */
|
||||
+ if (ioctl(console_fd, FBIOGET_FSCREENINFO, &finfo) < 0) {
|
||||
+ SDL_SetError("Couldn't get console hardware info");
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+
|
||||
+ /* Save hardware palette, if needed */
|
||||
+ //FB_SavePalette(this, &finfo, &vinfo);
|
||||
+
|
||||
+ /* Set up the new mode framebuffer */
|
||||
+ current->flags = SDL_FULLSCREEN;
|
||||
+ current->w = width;
|
||||
+ current->h = height;
|
||||
+ current->pitch = width * ((bpp + 7) / 8);
|
||||
+ current->pixels = shadow_mem;
|
||||
+
|
||||
+ flip_address[0] = mapped_mem;
|
||||
+ flip_address[1] = mapped_mem + current->pitch * yres;
|
||||
+
|
||||
+ back_page = 1;
|
||||
+ if (flags & SDL_DOUBLEBUF) {
|
||||
+ current->flags |= SDL_DOUBLEBUF;
|
||||
+ flip_pending = 1;
|
||||
+ } else {
|
||||
+ flip_pending = 0;
|
||||
+ /* make page 0 both the visible and back page */
|
||||
+ back_page = ioctl(console_fd, FBIOFLIPHACK, &back_page);
|
||||
+ if (back_page < 0)
|
||||
+ back_page = 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Set the update rectangle function */
|
||||
+ switch (bpp) {
|
||||
+ case 16:
|
||||
+ GC_DPRINTF("Using 16bpp blitter\n");
|
||||
+ this->hidden->UpdateRect = GC_UpdateRectRGB16;
|
||||
+ break;
|
||||
+ default:
|
||||
+ GC_DPRINTF("Using NO blitter\n");
|
||||
+ this->hidden->UpdateRect = NULL;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Handle OpenGL support */
|
||||
+#ifdef HAVE_OPENGL
|
||||
+ if (flags & SDL_OPENGL) {
|
||||
+ if (GC_GL_CreateWindow(this, width, height) == 0) {
|
||||
+ current->flags |= (SDL_OPENGL | SDL_FULLSCREEN);
|
||||
+ } else {
|
||||
+ current = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+#endif /* HAVE_OPENGL */
|
||||
+
|
||||
+ /* We're done */
|
||||
+ return (current);
|
||||
+}
|
||||
+
|
||||
+static int GC_FlipHWSurface(_THIS, SDL_Surface * surface)
|
||||
+{
|
||||
+ if (flip_pending) {
|
||||
+ /* SDL_UpdateRect was not called */
|
||||
+ SDL_UpdateRect(this->screen, 0, 0, 0, 0);
|
||||
+ }
|
||||
+
|
||||
+ /* flip video page as soon as possible */
|
||||
+ ioctl(console_fd, FBIOFLIPHACK, NULL);
|
||||
+ flip_pending = 1;
|
||||
+
|
||||
+ return (0);
|
||||
+}
|
||||
+
|
||||
+static void GC_WaitForFlipCompletion(_THIS)
|
||||
+{
|
||||
+ int visible_page;
|
||||
+ int result;
|
||||
+
|
||||
+ if (flip_pending) {
|
||||
+ flip_pending = 0;
|
||||
+ back_page ^= 1;
|
||||
+ visible_page = back_page;
|
||||
+ while (visible_page == back_page) {
|
||||
+ /* wait until back_page is not visible */
|
||||
+ result = ioctl(console_fd, FBIOFLIPHACK, &back_page);
|
||||
+ if (result < 0) {
|
||||
+ if ((errno == EINTR) || (errno == EAGAIN))
|
||||
+ continue;
|
||||
+ return; /* ioctl unsupported ... */
|
||||
+ }
|
||||
+ visible_page = result;
|
||||
+ }
|
||||
+ /*
|
||||
+ * At this point the back_page is not visible. We can safely
|
||||
+ * write to it without tearing.
|
||||
+ */
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void GC_UpdateRects(_THIS, int numrects, SDL_Rect * rects)
|
||||
+{
|
||||
+ SDL_Surface *screen;
|
||||
+ int pitch;
|
||||
+
|
||||
+ /* external yuy2 fb is 16bpp */
|
||||
+
|
||||
+ screen = this->screen;
|
||||
+ pitch = screen->pitch; /* this is the pitch of the shadow buffer */
|
||||
+
|
||||
+ if (this->hidden->UpdateRect) {
|
||||
+ GC_WaitForFlipCompletion(this);
|
||||
+ while (numrects--) {
|
||||
+ if (rects->w <= 0 || rects->h <= 0)
|
||||
+ continue;
|
||||
+ this->hidden->UpdateRect(this, rects, pitch);
|
||||
+ rects++;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void GC_CreateDevice(SDL_VideoDevice *this)
|
||||
+{
|
||||
+ this->ListModes = GC_ListModes;
|
||||
+ this->SetVideoMode = GC_SetVideoMode;
|
||||
+ this->FlipHWSurface = GC_FlipHWSurface;
|
||||
+ this->UpdateRects = GC_UpdateRects;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
diff --git a/src/video/fbcon/SDL_fbgc.h b/src/video/fbcon/SDL_fbgc.h
|
||||
new file mode 100644
|
||||
index 0000000..534a73e
|
||||
--- /dev/null
|
||||
+++ b/src/video/fbcon/SDL_fbgc.h
|
||||
@@ -0,0 +1,35 @@
|
||||
+/*
|
||||
+ SDL - Simple DirectMedia Layer
|
||||
+ Copyright (C) 1997-2009 Sam Lantinga
|
||||
+
|
||||
+ This library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ This library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with this library; if not, write to the Free Software
|
||||
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+
|
||||
+ Sam Lantinga
|
||||
+ slouken@libsdl.org
|
||||
+*/
|
||||
+#include "SDL_config.h"
|
||||
+
|
||||
+
|
||||
+#ifdef SDL_VIDEO_DRIVER_GC
|
||||
+/* Gamecube/Wii hardware setup for the SDL framebuffer console driver */
|
||||
+
|
||||
+#include "SDL_fbvideo.h"
|
||||
+
|
||||
+extern SDL_bool GC_Available(void);
|
||||
+extern void GC_CreateDevice(SDL_VideoDevice *this);
|
||||
+
|
||||
+extern SDL_bool GC_Test(_THIS);
|
||||
+extern void GC_Init(_THIS, SDL_PixelFormat *vformat);
|
||||
+#endif
|
||||
diff --git a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c
|
||||
index 81a89da..328790e 100644
|
||||
--- a/src/video/fbcon/SDL_fbvideo.c
|
||||
+++ b/src/video/fbcon/SDL_fbvideo.c
|
||||
@@ -272,6 +272,11 @@ static SDL_VideoDevice *FB_CreateDevice(int devindex)
|
||||
|
||||
this->free = FB_DeleteDevice;
|
||||
|
||||
+#ifdef SDL_VIDEO_DRIVER_GC
|
||||
+ if (GC_Available(this))
|
||||
+ GC_CreateDevice(this);
|
||||
+#endif
|
||||
+
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -784,6 +789,11 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef SDL_VIDEO_DRIVER_GC
|
||||
+ if (GC_Test(this))
|
||||
+ GC_Init(this, vformat);
|
||||
+#endif
|
||||
+
|
||||
if (shadow_fb) {
|
||||
shadow_mem = (char *)SDL_malloc(mapped_memlen);
|
||||
if (shadow_mem == NULL) {
|
||||
diff --git a/src/video/fbcon/SDL_fbvideo.h b/src/video/fbcon/SDL_fbvideo.h
|
||||
index 03b9e94..74d1460 100644
|
||||
--- a/src/video/fbcon/SDL_fbvideo.h
|
||||
+++ b/src/video/fbcon/SDL_fbvideo.h
|
||||
@@ -106,6 +106,12 @@ struct SDL_PrivateVideoData {
|
||||
|
||||
void (*wait_vbl)(_THIS);
|
||||
void (*wait_idle)(_THIS);
|
||||
+#ifdef SDL_VIDEO_DRIVER_GC
|
||||
+ void (*UpdateRect) (_THIS, SDL_Rect * rect, int pitch);
|
||||
+ int back_page;
|
||||
+ int page_offset;
|
||||
+ int flip_pending;
|
||||
+#endif
|
||||
};
|
||||
/* Old variable names */
|
||||
#define console_fd (this->hidden->console_fd)
|
||||
@@ -147,6 +153,11 @@ struct SDL_PrivateVideoData {
|
||||
#define screen_palette (this->hidden->screen_palette)
|
||||
#define wait_vbl (this->hidden->wait_vbl)
|
||||
#define wait_idle (this->hidden->wait_idle)
|
||||
+#ifdef SDL_VIDEO_DRIVER_GC
|
||||
+#define back_page (this->hidden->back_page)
|
||||
+#define page_offset (this->hidden->page_offset)
|
||||
+#define flip_pending (this->hidden->flip_pending)
|
||||
+#endif
|
||||
|
||||
/* Accelerator types that are supported by the driver, but are not
|
||||
necessarily in the kernel headers on the system we compile on.
|
||||
--
|
||||
1.6.5
|
||||
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,96 +0,0 @@
|
|||
Attribute VB_Name = "Module1"
|
||||
Option Explicit
|
||||
Public SOCFile As String
|
||||
Public SOCTemp As String
|
||||
Public SourcePath As String
|
||||
|
||||
Public Function FirstToken(ByVal line As String)
|
||||
Dim index As Integer
|
||||
|
||||
index = InStr(line, " ") - 1
|
||||
|
||||
If index < 1 Then
|
||||
index = Len(line)
|
||||
End If
|
||||
|
||||
FirstToken = TrimComplete(Left(line, index))
|
||||
End Function
|
||||
|
||||
Public Function SecondToken(ByVal line As String)
|
||||
Dim startclip As Integer
|
||||
Dim endclip As Integer
|
||||
|
||||
startclip = InStr(line, " ")
|
||||
|
||||
startclip = startclip + 1
|
||||
|
||||
SecondToken = TrimComplete(Mid(line, startclip, Len(line)))
|
||||
End Function
|
||||
|
||||
Public Function SecondTokenEqual(ByVal line As String)
|
||||
Dim startclip As Integer
|
||||
Dim endclip As Integer
|
||||
|
||||
startclip = InStr(line, "=")
|
||||
|
||||
startclip = startclip + 2
|
||||
|
||||
line = Mid(line, startclip, Len(line))
|
||||
|
||||
SecondTokenEqual = TrimComplete(line)
|
||||
End Function
|
||||
|
||||
Public Function TrimComplete(ByVal sValue As String) As String
|
||||
Dim sAns As String
|
||||
Dim sWkg As String
|
||||
Dim sChar As String
|
||||
Dim lLen As Long
|
||||
Dim lCtr As Long
|
||||
|
||||
sAns = sValue
|
||||
lLen = Len(sValue)
|
||||
|
||||
If lLen > 0 Then
|
||||
'Ltrim
|
||||
For lCtr = 1 To lLen
|
||||
sChar = Mid(sAns, lCtr, 1)
|
||||
If Asc(sChar) > 32 Then Exit For
|
||||
Next
|
||||
|
||||
sAns = Mid(sAns, lCtr)
|
||||
lLen = Len(sAns)
|
||||
|
||||
'Rtrim
|
||||
If lLen > 0 Then
|
||||
For lCtr = lLen To 1 Step -1
|
||||
sChar = Mid(sAns, lCtr, 1)
|
||||
If Asc(sChar) > 32 Then Exit For
|
||||
Next
|
||||
End If
|
||||
sAns = Left$(sAns, lCtr)
|
||||
End If
|
||||
|
||||
TrimComplete = sAns
|
||||
End Function
|
||||
|
||||
Public Function RTrimComplete(ByVal sValue As String) As String
|
||||
Dim sAns As String
|
||||
Dim sWkg As String
|
||||
Dim sChar As String
|
||||
Dim lLen As Long
|
||||
Dim lCtr As Long
|
||||
|
||||
sAns = sValue
|
||||
lLen = Len(sValue)
|
||||
|
||||
'Rtrim
|
||||
If lLen > 0 Then
|
||||
For lCtr = lLen To 1 Step -1
|
||||
sChar = Mid(sAns, lCtr, 1)
|
||||
If Asc(sChar) > 32 Then Exit For
|
||||
Next
|
||||
End If
|
||||
sAns = Left$(sAns, lCtr)
|
||||
|
||||
RTrimComplete = sAns
|
||||
End Function
|
|
@ -1,53 +0,0 @@
|
|||
Type=Exe
|
||||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\WINNT\system32\stdole2.tlb#OLE Automation
|
||||
Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\..\..\WINNT\system32\scrrun.dll#Microsoft Scripting Runtime
|
||||
Form=Things.frm
|
||||
Module=Module1; Global.bas
|
||||
Form=frmStateEdit.frm
|
||||
Form=frmLevelHeader.frm
|
||||
Form=frmHub.frm
|
||||
Form=frmMaincfg.frm
|
||||
Form=frmUnlockablesEdit.frm
|
||||
Form=frmEmblemEdit.frm
|
||||
Form=frmSoundEdit.frm
|
||||
Form=frmCharacterEdit.frm
|
||||
Form=frmCutsceneEdit.frm
|
||||
Form=frmHelp.frm
|
||||
Form=frmHUDEdit.frm
|
||||
IconForm="frmThingEdit"
|
||||
Startup="frmHub"
|
||||
HelpFile=""
|
||||
Title="SOC Editor"
|
||||
ExeName32="SOCEdit.exe"
|
||||
Path32="..\..\..\srb2demo2\SOCEdit"
|
||||
Command32=""
|
||||
Name="SOCEditor"
|
||||
HelpContextID="0"
|
||||
CompatibleMode="0"
|
||||
MajorVer=0
|
||||
MinorVer=7
|
||||
RevisionVer=7
|
||||
AutoIncrementVer=0
|
||||
ServerSupportFiles=0
|
||||
VersionComments="http://www.srb2.org/"
|
||||
VersionCompanyName="Sonic Team Junior"
|
||||
VersionFileDescription="For SRB2 v1.09.4"
|
||||
CompilationType=0
|
||||
OptimizationType=0
|
||||
FavorPentiumPro(tm)=0
|
||||
CodeViewDebugInfo=0
|
||||
NoAliasing=0
|
||||
BoundsCheck=0
|
||||
OverflowCheck=0
|
||||
FlPointCheck=0
|
||||
FDIVCheck=0
|
||||
UnroundedFP=0
|
||||
StartMode=0
|
||||
Unattended=0
|
||||
Retained=0
|
||||
ThreadPerObject=0
|
||||
MaxNumberOfThreads=1
|
||||
DebugStartupOption=0
|
||||
|
||||
[MS Transaction Server]
|
||||
AutoRefresh=1
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,320 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmCharacterEdit
|
||||
Caption = "Character Edit"
|
||||
ClientHeight = 3345
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 4680
|
||||
Icon = "frmCharacterEdit.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
ScaleHeight = 3345
|
||||
ScaleWidth = 4680
|
||||
Begin VB.CommandButton cmdExample
|
||||
Caption = "Show Me An &Example"
|
||||
Height = 495
|
||||
Left = 1320
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 14
|
||||
Top = 2400
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.CheckBox chkEnabled
|
||||
Caption = "Enable this player selection."
|
||||
Height = 495
|
||||
Left = 1080
|
||||
TabIndex = 13
|
||||
Top = 1560
|
||||
Width = 1455
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "&Delete from SOC"
|
||||
Height = 495
|
||||
Left = 120
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 12
|
||||
Top = 2760
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 11
|
||||
Top = 2160
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.TextBox txtSkinname
|
||||
Height = 285
|
||||
Left = 3240
|
||||
TabIndex = 9
|
||||
Top = 1200
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtPicname
|
||||
Height = 285
|
||||
Left = 3240
|
||||
MaxLength = 8
|
||||
TabIndex = 7
|
||||
Top = 840
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.TextBox txtMenuposition
|
||||
Height = 285
|
||||
Left = 3240
|
||||
MaxLength = 3
|
||||
TabIndex = 5
|
||||
Top = 480
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtPlayername
|
||||
Height = 285
|
||||
Left = 3240
|
||||
MaxLength = 64
|
||||
TabIndex = 3
|
||||
Top = 120
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtPlayertext
|
||||
Height = 1455
|
||||
Left = 2640
|
||||
MultiLine = -1 'True
|
||||
TabIndex = 1
|
||||
Top = 1800
|
||||
Width = 1935
|
||||
End
|
||||
Begin VB.ListBox lstPlayers
|
||||
Height = 1815
|
||||
ItemData = "frmCharacterEdit.frx":0442
|
||||
Left = 120
|
||||
List = "frmCharacterEdit.frx":0461
|
||||
TabIndex = 0
|
||||
Top = 240
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.Label lblSkinname
|
||||
Caption = "Name of player (skin) to use:"
|
||||
Height = 255
|
||||
Left = 1080
|
||||
TabIndex = 10
|
||||
Top = 1200
|
||||
Width = 2055
|
||||
End
|
||||
Begin VB.Label lblPicname
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Picture to display:"
|
||||
Height = 255
|
||||
Left = 1560
|
||||
TabIndex = 8
|
||||
Top = 840
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.Label lblMenuposition
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Vertical menu position:"
|
||||
Height = 255
|
||||
Left = 1320
|
||||
TabIndex = 6
|
||||
Top = 480
|
||||
Width = 1815
|
||||
End
|
||||
Begin VB.Label lblPlayername
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Displayed name of player:"
|
||||
Height = 255
|
||||
Left = 1320
|
||||
TabIndex = 4
|
||||
Top = 120
|
||||
Width = 1815
|
||||
End
|
||||
Begin VB.Label lblPlayertext
|
||||
Caption = "Short Description:"
|
||||
Height = 255
|
||||
Left = 2640
|
||||
TabIndex = 2
|
||||
Top = 1560
|
||||
Width = 1455
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmCharacterEdit"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
Call WriteCharacter(True)
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExample_Click()
|
||||
txtPlayername.Text = "SONIC"
|
||||
txtMenuposition.Text = "20"
|
||||
txtPicname.Text = "SONCCHAR"
|
||||
txtSkinname.Text = "SONIC"
|
||||
chkEnabled.Value = 1
|
||||
txtPlayertext.Text = " Fastest" & vbCrLf & " Speed Thok" & vbCrLf & " Not a good pick" & vbCrLf & "for starters, but when" & vbCrLf & "controlled properly," & vbCrLf & "Sonic is the most" & vbCrLf & "powerful of the three."
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
Call WriteCharacter(False)
|
||||
End Sub
|
||||
|
||||
Private Sub ClearForm()
|
||||
txtPlayername.Text = ""
|
||||
txtMenuposition.Text = ""
|
||||
txtPicname.Text = ""
|
||||
txtSkinname.Text = ""
|
||||
chkEnabled.Value = 0
|
||||
txtPlayertext.Text = ""
|
||||
End Sub
|
||||
|
||||
Private Sub ReadSOCPlayer(num As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
SOCLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo SOCLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo SOCLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo SOCLoad
|
||||
|
||||
word = FirstToken(line)
|
||||
word2 = SecondToken(line)
|
||||
|
||||
If UCase(word) = "CHARACTER" And Val(word2) = num Then
|
||||
Do While Len(line) > 0 And Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondTokenEqual(line))
|
||||
|
||||
If word = "PLAYERTEXT" Then
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
startclip = InStr(line, "=")
|
||||
|
||||
startclip = startclip + 2
|
||||
|
||||
line = Mid(line, startclip, Len(line))
|
||||
|
||||
txtPlayertext.Text = line & vbCrLf
|
||||
|
||||
Do While InStr(line, "#") = 0 And Not ts.AtEndOfStream
|
||||
line = ts.ReadLine & vbCrLf
|
||||
txtPlayertext.Text = txtPlayertext.Text & line
|
||||
Loop
|
||||
|
||||
txtPlayertext.Text = RTrimComplete(txtPlayertext.Text)
|
||||
If Right(txtPlayertext.Text, 1) = "#" Then
|
||||
txtPlayertext.Text = Left(txtPlayertext.Text, Len(txtPlayertext.Text) - 1)
|
||||
End If
|
||||
ElseIf word = "PLAYERNAME" Then
|
||||
txtPlayername.Text = word2
|
||||
ElseIf word = "MENUPOSITION" Then
|
||||
txtMenuposition.Text = Val(word2)
|
||||
ElseIf word = "PICNAME" Then
|
||||
txtPicname.Text = word2
|
||||
ElseIf word = "STATUS" Then
|
||||
If Val(word2) = 32 Then
|
||||
chkEnabled.Value = 1
|
||||
Else
|
||||
chkEnabled.Value = 0
|
||||
End If
|
||||
ElseIf word = "SKINNAME" Then
|
||||
txtSkinname.Text = word2
|
||||
ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then
|
||||
MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line
|
||||
End If
|
||||
Loop
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub lstPlayers_Click()
|
||||
Call ClearForm
|
||||
Call ReadSOCPlayer(lstPlayers.ListIndex)
|
||||
End Sub
|
||||
|
||||
Private Sub WriteCharacter(Remove As Boolean)
|
||||
Dim myFSOSource As New Scripting.FileSystemObject
|
||||
Dim tsSource As TextStream
|
||||
Dim myFSOTarget As New Scripting.FileSystemObject
|
||||
Dim tsTarget As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
Dim charfound As Boolean
|
||||
|
||||
charfound = False
|
||||
|
||||
Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False)
|
||||
Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True)
|
||||
|
||||
Do While Not tsSource.AtEndOfStream
|
||||
line = tsSource.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
'If the current character exists in the SOC, delete it.
|
||||
If word = "CHARACTER" And Val(word2) = lstPlayers.ListIndex Then
|
||||
charfound = True
|
||||
Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream)
|
||||
Loop
|
||||
Else
|
||||
tsTarget.WriteLine line
|
||||
End If
|
||||
Loop
|
||||
|
||||
tsSource.Close
|
||||
Set myFSOSource = Nothing
|
||||
|
||||
If Remove = False Then
|
||||
If line <> "" Then tsTarget.WriteLine ""
|
||||
|
||||
tsTarget.WriteLine "CHARACTER " & lstPlayers.ListIndex
|
||||
txtPlayername.Text = TrimComplete(txtPlayername.Text)
|
||||
txtMenuposition.Text = TrimComplete(txtMenuposition.Text)
|
||||
txtPicname.Text = TrimComplete(txtPicname.Text)
|
||||
txtSkinname.Text = TrimComplete(txtSkinname.Text)
|
||||
If txtPlayername.Text <> "" Then tsTarget.WriteLine "PLAYERNAME = " & txtPlayername.Text
|
||||
If txtMenuposition.Text <> "" Then tsTarget.WriteLine "MENUPOSITION = " & Val(txtMenuposition.Text)
|
||||
If txtPicname.Text <> "" Then tsTarget.WriteLine "PICNAME = " & txtPicname.Text
|
||||
If txtSkinname.Text <> "" Then tsTarget.WriteLine "SKINNAME = " & txtSkinname.Text
|
||||
If chkEnabled.Value = 1 Then
|
||||
tsTarget.WriteLine "STATUS = 32"
|
||||
Else
|
||||
tsTarget.WriteLine "STATUS = 0"
|
||||
End If
|
||||
If txtPlayertext.Text <> "" Then tsTarget.WriteLine "PLAYERTEXT = " & txtPlayertext.Text & "#"
|
||||
End If
|
||||
|
||||
tsTarget.Close
|
||||
Set myFSOTarget = Nothing
|
||||
|
||||
FileCopy SOCTemp, SOCFile
|
||||
|
||||
Kill SOCTemp
|
||||
|
||||
If Remove = True Then
|
||||
If charfound = True Then
|
||||
MsgBox "Player choice removed from SOC."
|
||||
Else
|
||||
MsgBox "Player choice not found in SOC."
|
||||
End If
|
||||
Else
|
||||
MsgBox "Character Saved."
|
||||
End If
|
||||
End Sub
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,384 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmEmblemEdit
|
||||
Caption = "Emblem Edit"
|
||||
ClientHeight = 2865
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 5160
|
||||
Icon = "frmEmblemEdit.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
ScaleHeight = 2865
|
||||
ScaleWidth = 5160
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "&Delete Last Emblem"
|
||||
Height = 735
|
||||
Left = 1560
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 17
|
||||
Top = 600
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "&Add"
|
||||
Height = 375
|
||||
Left = 1560
|
||||
TabIndex = 16
|
||||
Top = 120
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save Emblem"
|
||||
Height = 495
|
||||
Left = 4200
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 13
|
||||
Top = 2280
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.CommandButton cmdReload
|
||||
Caption = "&Reload"
|
||||
Height = 495
|
||||
Left = 3120
|
||||
TabIndex = 12
|
||||
Top = 2280
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.TextBox txtPlayernum
|
||||
Height = 285
|
||||
Left = 4320
|
||||
MaxLength = 3
|
||||
TabIndex = 9
|
||||
Top = 1800
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.TextBox txtMapnum
|
||||
Height = 285
|
||||
Left = 4320
|
||||
MaxLength = 4
|
||||
TabIndex = 7
|
||||
Top = 1320
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.TextBox txtZ
|
||||
Height = 285
|
||||
Left = 4320
|
||||
MaxLength = 5
|
||||
TabIndex = 3
|
||||
Top = 960
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.TextBox txtY
|
||||
Height = 285
|
||||
Left = 4320
|
||||
MaxLength = 5
|
||||
TabIndex = 2
|
||||
Top = 600
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.TextBox txtX
|
||||
Height = 285
|
||||
Left = 4320
|
||||
MaxLength = 5
|
||||
TabIndex = 1
|
||||
Top = 240
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.ListBox lstEmblems
|
||||
Height = 2400
|
||||
Left = 120
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.Label Label1
|
||||
Caption = "Emblem #s must be linear, sorry!"
|
||||
Height = 495
|
||||
Left = 1560
|
||||
TabIndex = 18
|
||||
Top = 2400
|
||||
Width = 1455
|
||||
End
|
||||
Begin VB.Label lblNumEmblems
|
||||
Caption = "# of Emblems:"
|
||||
Height = 255
|
||||
Left = 120
|
||||
TabIndex = 15
|
||||
Top = 2520
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.Label lblNote2
|
||||
Caption = "Don't forget to set Game Data file and # of Emblems in Global Game Settings!"
|
||||
Height = 855
|
||||
Left = 1560
|
||||
TabIndex = 14
|
||||
Top = 1440
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.Label lblNote
|
||||
Appearance = 0 'Flat
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Caption = "Note: Enter map coordinates, not game coordinates. (I.e., 128, not 8388608)"
|
||||
ForeColor = &H80000008&
|
||||
Height = 1095
|
||||
Left = 2640
|
||||
TabIndex = 11
|
||||
Top = 120
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.Label lblPlayernum
|
||||
Caption = "Player # (255 for all players):"
|
||||
Height = 495
|
||||
Left = 3240
|
||||
TabIndex = 10
|
||||
Top = 1680
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.Label lblMapnum
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Map #:"
|
||||
Height = 255
|
||||
Left = 3600
|
||||
TabIndex = 8
|
||||
Top = 1320
|
||||
Width = 615
|
||||
End
|
||||
Begin VB.Label lblZ
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Z:"
|
||||
Height = 255
|
||||
Left = 3960
|
||||
TabIndex = 6
|
||||
Top = 960
|
||||
Width = 255
|
||||
End
|
||||
Begin VB.Label lblY
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Y:"
|
||||
Height = 255
|
||||
Left = 3960
|
||||
TabIndex = 5
|
||||
Top = 600
|
||||
Width = 255
|
||||
End
|
||||
Begin VB.Label lblX
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "X:"
|
||||
Height = 255
|
||||
Left = 3960
|
||||
TabIndex = 4
|
||||
Top = 240
|
||||
Width = 255
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmEmblemEdit"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
lstEmblems.AddItem "Emblem " & lstEmblems.ListCount + 1
|
||||
lstEmblems.ListIndex = lstEmblems.ListCount - 1
|
||||
lblNumEmblems.Caption = "# of Emblems: " & lstEmblems.ListCount
|
||||
txtX.Text = 0
|
||||
txtY.Text = 0
|
||||
txtZ.Text = 0
|
||||
txtPlayernum.Text = 255
|
||||
txtMapnum.Text = 1
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
Call WriteEmblem(True)
|
||||
lstEmblems.RemoveItem lstEmblems.ListCount - 1
|
||||
lstEmblems.ListIndex = lstEmblems.ListCount - 1
|
||||
lblNumEmblems.Caption = "# of Emblems: " & lstEmblems.ListCount
|
||||
End Sub
|
||||
|
||||
Private Sub cmdReload_Click()
|
||||
Call Reload
|
||||
End Sub
|
||||
|
||||
Private Sub Reload()
|
||||
lstEmblems.Clear
|
||||
txtX.Text = ""
|
||||
txtY.Text = ""
|
||||
txtZ.Text = ""
|
||||
txtMapnum.Text = ""
|
||||
txtPlayernum.Text = ""
|
||||
lblNumEmblems.Caption = "# of Emblems: " & lstEmblems.ListCount
|
||||
Call ReadSOCEmblems
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
If lstEmblems.ListCount <= 0 Then
|
||||
MsgBox "You have no emblems to save!"
|
||||
Else
|
||||
Call WriteEmblem(False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call Reload
|
||||
End Sub
|
||||
|
||||
Private Sub ReadSOCEmblems()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
lstEmblems.Clear
|
||||
|
||||
EmblemLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo EmblemLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo EmblemLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo EmblemLoad
|
||||
|
||||
word = FirstToken(line)
|
||||
word2 = SecondToken(line)
|
||||
|
||||
If UCase(word) = "EMBLEM" Then
|
||||
lstEmblems.AddItem ("Emblem " & Val(word2))
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub ReadSOCEmblemNum(num As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
EmblemLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo EmblemLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo EmblemLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo EmblemLoad
|
||||
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
If word = "EMBLEM" Then
|
||||
If Val(word2) = num Then
|
||||
Do While Len(line) > 0 And Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondTokenEqual(line))
|
||||
|
||||
If word = "X" Then
|
||||
txtX.Text = Val(word2)
|
||||
ElseIf word = "Y" Then
|
||||
txtY.Text = Val(word2)
|
||||
ElseIf word = "Z" Then
|
||||
txtZ.Text = Val(word2)
|
||||
ElseIf word = "PLAYERNUM" Then
|
||||
txtPlayernum.Text = Val(word2)
|
||||
ElseIf word = "MAPNUM" Then
|
||||
txtMapnum.Text = Val(word2)
|
||||
ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then
|
||||
MsgBox "Error in SOC with Emblem " & num & vbCrLf & "Unknown line: " & line
|
||||
End If
|
||||
Loop
|
||||
Exit Do
|
||||
End If
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub lstEmblems_Click()
|
||||
Dim i As Integer
|
||||
|
||||
i = InStr(lstEmblems.List(lstEmblems.ListIndex), " ") + 1
|
||||
|
||||
i = Mid(lstEmblems.List(lstEmblems.ListIndex), i, Len(lstEmblems.List(lstEmblems.ListIndex)) - i + 1)
|
||||
i = Val(i)
|
||||
Call ReadSOCEmblemNum(i)
|
||||
End Sub
|
||||
|
||||
Private Sub WriteEmblem(Remove As Boolean)
|
||||
Dim myFSOSource As New Scripting.FileSystemObject
|
||||
Dim tsSource As TextStream
|
||||
Dim myFSOTarget As New Scripting.FileSystemObject
|
||||
Dim tsTarget As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
Dim i As Integer
|
||||
|
||||
Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False)
|
||||
Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True)
|
||||
|
||||
Do While Not tsSource.AtEndOfStream
|
||||
line = tsSource.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
i = InStr(lstEmblems.List(lstEmblems.ListIndex), " ") + 1
|
||||
|
||||
i = Mid(lstEmblems.List(lstEmblems.ListIndex), i, Len(lstEmblems.List(lstEmblems.ListIndex)) - i + 1)
|
||||
i = Val(i)
|
||||
|
||||
'If the current emblem exists in the SOC, delete it.
|
||||
If word = "EMBLEM" And Val(word2) = i Then
|
||||
Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream)
|
||||
Loop
|
||||
Else
|
||||
tsTarget.WriteLine line
|
||||
End If
|
||||
Loop
|
||||
|
||||
tsSource.Close
|
||||
Set myFSOSource = Nothing
|
||||
|
||||
If Remove = False Then
|
||||
If line <> "" Then tsTarget.WriteLine ""
|
||||
|
||||
tsTarget.WriteLine UCase(lstEmblems.List(lstEmblems.ListIndex))
|
||||
txtX.Text = TrimComplete(txtX.Text)
|
||||
txtY.Text = TrimComplete(txtY.Text)
|
||||
txtZ.Text = TrimComplete(txtZ.Text)
|
||||
txtMapnum.Text = TrimComplete(txtMapnum.Text)
|
||||
txtPlayernum.Text = TrimComplete(txtPlayernum.Text)
|
||||
If txtX.Text <> "" Then tsTarget.WriteLine "X = " & Val(txtX.Text)
|
||||
If txtY.Text <> "" Then tsTarget.WriteLine "Y = " & Val(txtY.Text)
|
||||
If txtZ.Text <> "" Then tsTarget.WriteLine "Z = " & Val(txtZ.Text)
|
||||
If txtMapnum.Text <> "" Then tsTarget.WriteLine "MAPNUM = " & Val(txtMapnum.Text)
|
||||
If txtPlayernum.Text <> "" Then tsTarget.WriteLine "PLAYERNUM = " & Val(txtPlayernum.Text)
|
||||
End If
|
||||
|
||||
tsTarget.Close
|
||||
Set myFSOTarget = Nothing
|
||||
|
||||
FileCopy SOCTemp, SOCFile
|
||||
|
||||
Kill SOCTemp
|
||||
|
||||
If Remove = True Then
|
||||
MsgBox "Emblem deleted."
|
||||
Else
|
||||
MsgBox "Emblem Saved."
|
||||
End If
|
||||
End Sub
|
Binary file not shown.
|
@ -1,315 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmHUDEdit
|
||||
Caption = "HUD Edit"
|
||||
ClientHeight = 2505
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 5160
|
||||
Icon = "frmHUDEdit.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
ScaleHeight = 2505
|
||||
ScaleWidth = 5160
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdCodeDefault
|
||||
Caption = "&Load Code Default"
|
||||
Height = 375
|
||||
Left = 3480
|
||||
TabIndex = 9
|
||||
Top = 1080
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "&Delete from SOC"
|
||||
Height = 375
|
||||
Left = 3480
|
||||
TabIndex = 7
|
||||
Top = 2040
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save Changes"
|
||||
Height = 375
|
||||
Left = 3480
|
||||
TabIndex = 6
|
||||
Top = 1560
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.TextBox txtY
|
||||
Height = 285
|
||||
Left = 4080
|
||||
MaxLength = 3
|
||||
TabIndex = 3
|
||||
Top = 720
|
||||
Width = 615
|
||||
End
|
||||
Begin VB.TextBox txtX
|
||||
Height = 285
|
||||
Left = 4080
|
||||
MaxLength = 3
|
||||
TabIndex = 2
|
||||
Top = 360
|
||||
Width = 615
|
||||
End
|
||||
Begin VB.ListBox lstHUD
|
||||
Height = 2010
|
||||
Left = 120
|
||||
TabIndex = 0
|
||||
Top = 360
|
||||
Width = 3255
|
||||
End
|
||||
Begin VB.Label lblNote
|
||||
Caption = "HUD items are placed on a 320x200 grid."
|
||||
Height = 255
|
||||
Left = 1680
|
||||
TabIndex = 8
|
||||
Top = 120
|
||||
Width = 3015
|
||||
End
|
||||
Begin VB.Label lblY
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Y:"
|
||||
Height = 255
|
||||
Left = 3600
|
||||
TabIndex = 5
|
||||
Top = 720
|
||||
Width = 375
|
||||
End
|
||||
Begin VB.Label lblX
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "X:"
|
||||
Height = 255
|
||||
Left = 3720
|
||||
TabIndex = 4
|
||||
Top = 360
|
||||
Width = 255
|
||||
End
|
||||
Begin VB.Label lblHUDItems
|
||||
Caption = "HUD Items:"
|
||||
Height = 255
|
||||
Left = 120
|
||||
TabIndex = 1
|
||||
Top = 120
|
||||
Width = 975
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmHUDEdit"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmdCodeDefault_Click()
|
||||
LoadHUDInfo (lstHUD.ListIndex)
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
Call WriteHUDItem(True)
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
Call WriteHUDItem(False)
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call Reload
|
||||
End Sub
|
||||
|
||||
Private Sub Reload()
|
||||
txtX.Text = ""
|
||||
txtY.Text = ""
|
||||
Call LoadCode
|
||||
lstHUD.ListIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCode()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
Dim addstring As String
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("st_stuff.h", ForReading, False)
|
||||
|
||||
Do While ts.ReadLine <> "/** HUD location information (don't move this comment)"
|
||||
Loop
|
||||
|
||||
ts.ReadLine ' */
|
||||
ts.ReadLine ' typedef struct
|
||||
ts.ReadLine ' {
|
||||
ts.ReadLine ' int x, y;
|
||||
ts.ReadLine ' } hudinfo_t;
|
||||
ts.ReadLine '
|
||||
ts.ReadLine ' typedef enum
|
||||
ts.ReadLine ' {
|
||||
|
||||
line = ts.ReadLine
|
||||
number = 0
|
||||
|
||||
lstHUD.Clear
|
||||
|
||||
Do While InStr(line, "NUMHUDITEMS") = 0
|
||||
startclip = InStr(line, "HUD_")
|
||||
If InStr(line, "HUD_") <> 0 Then
|
||||
endclip = InStr(line, ",")
|
||||
line = Mid(line, startclip, endclip - startclip)
|
||||
addstring = number & " - " & line
|
||||
lstHUD.AddItem addstring
|
||||
number = number + 1
|
||||
End If
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub lstHUD_Click()
|
||||
LoadHUDInfo (lstHUD.ListIndex)
|
||||
Call ReadSOC(lstHUD.ListIndex)
|
||||
End Sub
|
||||
|
||||
Private Sub LoadHUDInfo(HUDNum As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("st_stuff.c", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "hudinfo[NUMHUDITEMS] =") = 0
|
||||
Loop
|
||||
|
||||
ts.SkipLine ' {
|
||||
line = ts.ReadLine ' First HUD item
|
||||
|
||||
number = 0
|
||||
|
||||
Do While number <> HUDNum
|
||||
line = ts.ReadLine
|
||||
number = number + 1
|
||||
Loop
|
||||
|
||||
startclip = InStr(line, "{") + 1
|
||||
endclip = InStr(line, ",")
|
||||
|
||||
txtX.Text = TrimComplete(Mid(line, startclip, endclip - startclip))
|
||||
|
||||
startclip = endclip + 2
|
||||
endclip = InStr(startclip, line, "}") - 1
|
||||
|
||||
txtY.Text = TrimComplete(Mid(line, startclip, endclip - startclip))
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub ReadSOC(HUDNum As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
SOCLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo SOCLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo SOCLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo SOCLoad
|
||||
|
||||
word = FirstToken(line)
|
||||
word2 = SecondToken(line)
|
||||
|
||||
If UCase(word) = "HUDITEM" And Val(word2) = HUDNum Then
|
||||
Do While Len(line) > 0 And Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondTokenEqual(line))
|
||||
|
||||
If word = "X" Then
|
||||
txtX.Text = Val(word2)
|
||||
ElseIf word = "Y" Then
|
||||
txtY.Text = Val(word2)
|
||||
ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then
|
||||
MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line
|
||||
End If
|
||||
Loop
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub WriteHUDItem(Remove As Boolean)
|
||||
Dim myFSOSource As New Scripting.FileSystemObject
|
||||
Dim tsSource As TextStream
|
||||
Dim myFSOTarget As New Scripting.FileSystemObject
|
||||
Dim tsTarget As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
Dim hudremoved As Boolean
|
||||
|
||||
hudremoved = False
|
||||
|
||||
Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False)
|
||||
Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True)
|
||||
|
||||
Do While Not tsSource.AtEndOfStream
|
||||
line = tsSource.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
'If the current item exists in the SOC, delete it.
|
||||
If word = "HUDITEM" And Val(word2) = lstHUD.ListIndex Then
|
||||
hudremoved = True
|
||||
Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not tsSource.AtEndOfStream
|
||||
Loop
|
||||
Else
|
||||
tsTarget.WriteLine line
|
||||
End If
|
||||
Loop
|
||||
|
||||
tsSource.Close
|
||||
Set myFSOSource = Nothing
|
||||
|
||||
If Remove = False Then
|
||||
If line <> "" Then tsTarget.WriteLine ""
|
||||
|
||||
tsTarget.WriteLine "HUDITEM " & lstHUD.ListIndex
|
||||
txtX.Text = TrimComplete(txtX.Text)
|
||||
txtY.Text = TrimComplete(txtY.Text)
|
||||
If txtX.Text <> "" Then tsTarget.WriteLine "X = " & Val(txtX.Text)
|
||||
If txtY.Text <> "" Then tsTarget.WriteLine "Y = " & Val(txtY.Text)
|
||||
End If
|
||||
|
||||
tsTarget.Close
|
||||
Set myFSOTarget = Nothing
|
||||
|
||||
FileCopy SOCTemp, SOCFile
|
||||
|
||||
Kill SOCTemp
|
||||
|
||||
If Remove = True Then
|
||||
If hudremoved = True Then
|
||||
MsgBox "HUD Item deleted from SOC."
|
||||
Else
|
||||
MsgBox "Couldn't find HUD Item in SOC."
|
||||
End If
|
||||
Else
|
||||
MsgBox "HUD Item Saved."
|
||||
End If
|
||||
End Sub
|
Binary file not shown.
|
@ -1,213 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmHelp
|
||||
BorderStyle = 3 'Fixed Dialog
|
||||
Caption = "Getting Started"
|
||||
ClientHeight = 7395
|
||||
ClientLeft = 45
|
||||
ClientTop = 330
|
||||
ClientWidth = 6360
|
||||
Icon = "frmHelp.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
MinButton = 0 'False
|
||||
ScaleHeight = 7395
|
||||
ScaleWidth = 6360
|
||||
ShowInTaskbar = 0 'False
|
||||
StartUpPosition = 1 'CenterOwner
|
||||
Begin VB.CommandButton cmdOK
|
||||
Caption = "&OK, I know what I'm doing now."
|
||||
Height = 495
|
||||
Left = 1920
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 8
|
||||
Top = 6840
|
||||
Width = 2535
|
||||
End
|
||||
Begin VB.Line Line9
|
||||
X1 = 120
|
||||
X2 = 6120
|
||||
Y1 = 4800
|
||||
Y2 = 4800
|
||||
End
|
||||
Begin VB.Line Line7
|
||||
X1 = 120
|
||||
X2 = 6120
|
||||
Y1 = 5400
|
||||
Y2 = 5400
|
||||
End
|
||||
Begin VB.Label Label12
|
||||
Caption = $"frmHelp.frx":0442
|
||||
Height = 615
|
||||
Left = 120
|
||||
TabIndex = 12
|
||||
Top = 4800
|
||||
Width = 6015
|
||||
End
|
||||
Begin VB.Line Line6
|
||||
X1 = 120
|
||||
X2 = 6120
|
||||
Y1 = 4200
|
||||
Y2 = 4200
|
||||
End
|
||||
Begin VB.Label Label11
|
||||
Caption = $"frmHelp.frx":04F8
|
||||
Height = 615
|
||||
Left = 120
|
||||
TabIndex = 11
|
||||
Top = 4200
|
||||
Width = 6015
|
||||
End
|
||||
Begin VB.Line Line8
|
||||
X1 = 120
|
||||
X2 = 6120
|
||||
Y1 = 6360
|
||||
Y2 = 6360
|
||||
End
|
||||
Begin VB.Line Line5
|
||||
X1 = 120
|
||||
X2 = 6120
|
||||
Y1 = 3720
|
||||
Y2 = 3720
|
||||
End
|
||||
Begin VB.Line Line4
|
||||
X1 = 120
|
||||
X2 = 6120
|
||||
Y1 = 2880
|
||||
Y2 = 2880
|
||||
End
|
||||
Begin VB.Line Line3
|
||||
X1 = 120
|
||||
X2 = 6120
|
||||
Y1 = 2400
|
||||
Y2 = 2400
|
||||
End
|
||||
Begin VB.Line Line2
|
||||
X1 = 120
|
||||
X2 = 6120
|
||||
Y1 = 1800
|
||||
Y2 = 1800
|
||||
End
|
||||
Begin VB.Line Line1
|
||||
X1 = 120
|
||||
X2 = 6120
|
||||
Y1 = 1200
|
||||
Y2 = 1200
|
||||
End
|
||||
Begin VB.Label Label10
|
||||
Caption = $"frmHelp.frx":05EC
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 10
|
||||
Top = 3720
|
||||
Width = 6135
|
||||
End
|
||||
Begin VB.Label Label9
|
||||
Caption = $"frmHelp.frx":068F
|
||||
Height = 615
|
||||
Left = 120
|
||||
TabIndex = 9
|
||||
Top = 1200
|
||||
Width = 6135
|
||||
End
|
||||
Begin VB.Label Label8
|
||||
Caption = $"frmHelp.frx":0772
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 7
|
||||
Top = 6360
|
||||
Width = 6135
|
||||
End
|
||||
Begin VB.Label Label7
|
||||
Caption = "However, if you have these settings in the SOC you are using, don't worry - the editor will not erase them from your file."
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 6
|
||||
Top = 5880
|
||||
Width = 6135
|
||||
End
|
||||
Begin VB.Label Label6
|
||||
Caption = $"frmHelp.frx":0816
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 5
|
||||
Top = 5400
|
||||
Width = 6135
|
||||
End
|
||||
Begin VB.Label Label5
|
||||
Caption = $"frmHelp.frx":08A9
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 855
|
||||
Left = 120
|
||||
TabIndex = 4
|
||||
Top = 2880
|
||||
Width = 6135
|
||||
End
|
||||
Begin VB.Label Label4
|
||||
Caption = $"frmHelp.frx":09B1
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 3
|
||||
Top = 2400
|
||||
Width = 6135
|
||||
End
|
||||
Begin VB.Label Label3
|
||||
Caption = $"frmHelp.frx":0A5A
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 2
|
||||
Top = 1920
|
||||
Width = 6135
|
||||
End
|
||||
Begin VB.Label Label2
|
||||
Caption = "Finally! A way to easily edit SOC files! I know you're anxious to get started, but here are some things you should know first:"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 9.75
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 1
|
||||
Top = 600
|
||||
Width = 6135
|
||||
End
|
||||
Begin VB.Label Label1
|
||||
Caption = "How To Use This Program"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 13.5
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = -1 'True
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 3855
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmHelp"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmdOK_Click()
|
||||
frmHelp.Hide
|
||||
End Sub
|
Binary file not shown.
|
@ -1,429 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmHub
|
||||
Caption = "SOC Editor"
|
||||
ClientHeight = 6960
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 4920
|
||||
Icon = "frmHub.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
ScaleHeight = 6960
|
||||
ScaleWidth = 4920
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdCreateBlank
|
||||
Caption = "Make a &Blank SOC"
|
||||
Height = 255
|
||||
Left = 240
|
||||
TabIndex = 22
|
||||
Top = 2520
|
||||
Width = 2055
|
||||
End
|
||||
Begin VB.CommandButton cmdUnlockables
|
||||
Caption = "Edit &Unlockables"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 2760
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 21
|
||||
Top = 6360
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdAuthor
|
||||
Caption = "Enter &Author Info"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 120
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 19
|
||||
Top = 3960
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdHelp
|
||||
Caption = "Getting Starte&d / READ ME FIRST!"
|
||||
Height = 495
|
||||
Left = 480
|
||||
TabIndex = 18
|
||||
Top = 2880
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.CommandButton cmdEditCutscenes
|
||||
Caption = "Edit C&utscenes"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 17
|
||||
Top = 6360
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdCharacterEdit
|
||||
Caption = "Edit &Character Select Screen"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 120
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 16
|
||||
Top = 5760
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.PictureBox Picture1
|
||||
Height = 1965
|
||||
Left = 2760
|
||||
Picture = "frmHub.frx":0442
|
||||
ScaleHeight = 1905
|
||||
ScaleWidth = 1905
|
||||
TabIndex = 15
|
||||
Top = 3960
|
||||
Width = 1965
|
||||
End
|
||||
Begin VB.CommandButton cmdSoundEdit
|
||||
Caption = "Edit &Sounds"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 14
|
||||
Top = 5160
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdEmblemEdit
|
||||
Caption = "Edit &Emblem Locations"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 120
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 13
|
||||
Top = 4560
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdHUDEdit
|
||||
Caption = "Edit &HUD Coordinates"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 1440
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 12
|
||||
Top = 3960
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdMaincfg
|
||||
Caption = "Edit &Global Game Settings"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 1440
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 11
|
||||
Top = 4560
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.DriveListBox Drive2
|
||||
Height = 315
|
||||
Left = 2640
|
||||
TabIndex = 9
|
||||
Top = 360
|
||||
Width = 2175
|
||||
End
|
||||
Begin VB.DirListBox Dir2
|
||||
Height = 1665
|
||||
Left = 2520
|
||||
TabIndex = 8
|
||||
Top = 720
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.FileListBox File1
|
||||
Height = 1455
|
||||
Left = 2520
|
||||
Pattern = "*.soc"
|
||||
TabIndex = 7
|
||||
Top = 2400
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.DriveListBox Drive1
|
||||
Height = 315
|
||||
Left = 120
|
||||
TabIndex = 6
|
||||
Top = 360
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.DirListBox Dir1
|
||||
Height = 1665
|
||||
Left = 120
|
||||
TabIndex = 4
|
||||
Top = 720
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.CommandButton cmdAbout
|
||||
Caption = "&About"
|
||||
Height = 375
|
||||
Left = 3960
|
||||
TabIndex = 3
|
||||
Top = 6000
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.CommandButton cmdStateEdit
|
||||
Caption = "Edit St&ates"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 1440
|
||||
TabIndex = 2
|
||||
Top = 6360
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdLevelHeader
|
||||
Caption = "Edit &Level Headers"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 1440
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 1
|
||||
Top = 5160
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdThingEdit
|
||||
Caption = "Edit &Things"
|
||||
Enabled = 0 'False
|
||||
Height = 495
|
||||
Left = 1440
|
||||
TabIndex = 0
|
||||
Top = 5760
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.Label lblAuthor
|
||||
Caption = "Modification By:"
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 20
|
||||
Top = 3480
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.Label lblSOCFile
|
||||
Caption = "SOC File to use (double click):"
|
||||
Height = 255
|
||||
Left = 2640
|
||||
TabIndex = 10
|
||||
Top = 120
|
||||
Width = 2175
|
||||
End
|
||||
Begin VB.Label lblSourcePath
|
||||
Caption = "Path to SRB2 Source Code:"
|
||||
Height = 255
|
||||
Left = 120
|
||||
TabIndex = 5
|
||||
Top = 120
|
||||
Width = 2175
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmHub"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmdAbout_Click()
|
||||
MsgBox App.Title & " v" & App.Major & "." & App.Minor & "." & App.Revision & vbCrLf & "By " & App.CompanyName & vbCrLf & "(SSNTails)" & vbCrLf & App.Comments & vbCrLf & App.FileDescription
|
||||
End Sub
|
||||
|
||||
Private Sub cmdAuthor_Click()
|
||||
Dim Response As String
|
||||
|
||||
Response$ = InputBox("Enter name to appear on credits (type in NOBODY to delete):", "Modification By", GetAuthor)
|
||||
|
||||
If Response = "" Then Exit Sub
|
||||
|
||||
Response = TrimComplete(Response)
|
||||
|
||||
If UCase(Response) = "NOBODY" Then
|
||||
Call WriteAuthor(True, Response)
|
||||
lblAuthor.Caption = "Modification By: "
|
||||
Else
|
||||
Call WriteAuthor(False, Response)
|
||||
lblAuthor.Caption = "Modification By: " & Response
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdCharacterEdit_Click()
|
||||
frmCharacterEdit.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdCreateBlank_Click()
|
||||
Dim socname As String
|
||||
|
||||
socname = InputBox("This file will be created in the directory you have selected on the main window." & vbCrLf & vbCrLf & "Enter the filename you want (do not include .SOC at the end):", "Make A Blank SOC")
|
||||
Trim (socname)
|
||||
|
||||
If InStr(LCase(socname), ".soc") > 0 Then
|
||||
MsgBox "The thing says not to include the .SOC at the end, stupid.", vbOKOnly, "You goofed!"
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Len(socname) > 0 Then
|
||||
socname = socname & ".soc"
|
||||
|
||||
Dim myFSOSOC As New Scripting.FileSystemObject
|
||||
Dim tsSOC As TextStream
|
||||
|
||||
Set tsSOC = myFSOSOC.OpenTextFile(File1.Path & "\" & socname, ForWriting, True)
|
||||
tsSOC.Close
|
||||
Set myFSOSOC = Nothing
|
||||
|
||||
MsgBox "Blank SOC named " & socname & " created in " & File1.Path, vbOKOnly, "Success!"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdEditCutscenes_Click()
|
||||
frmCutsceneEdit.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdEmblemEdit_Click()
|
||||
frmEmblemEdit.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdHelp_Click()
|
||||
frmHelp.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdHUDEdit_Click()
|
||||
frmHUDEdit.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdLevelHeader_Click()
|
||||
frmLevelHeader.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdMaincfg_Click()
|
||||
frmMaincfg.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSoundEdit_Click()
|
||||
frmSoundEdit.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdStateEdit_Click()
|
||||
frmStateEdit.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdThingEdit_Click()
|
||||
frmThingEdit.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdUnlockables_Click()
|
||||
frmUnlockablesEdit.Show vbModal, Me
|
||||
End Sub
|
||||
|
||||
Private Sub Dir1_Change()
|
||||
SourcePath = Dir1.Path
|
||||
End Sub
|
||||
|
||||
Private Sub Dir2_Change()
|
||||
File1.Path = Dir2.Path
|
||||
End Sub
|
||||
|
||||
Private Sub Drive1_Change()
|
||||
Dir1.Path = Drive1.Drive
|
||||
End Sub
|
||||
|
||||
Private Sub Drive2_Change()
|
||||
Dir2.Path = Drive2.Drive
|
||||
End Sub
|
||||
|
||||
Private Sub File1_DblClick()
|
||||
SOCTemp = File1.Path & "\" & "socedit.tmp"
|
||||
SOCFile = File1.Path & "\" & File1.List(File1.ListIndex)
|
||||
MsgBox "You are now using the file: " & vbCrLf & SOCFile
|
||||
cmdLevelHeader.Enabled = True
|
||||
cmdThingEdit.Enabled = True
|
||||
cmdStateEdit.Enabled = True
|
||||
cmdHUDEdit.Enabled = True
|
||||
cmdMaincfg.Enabled = True
|
||||
cmdEmblemEdit.Enabled = True
|
||||
cmdSoundEdit.Enabled = True
|
||||
cmdCharacterEdit.Enabled = True
|
||||
cmdEditCutscenes.Enabled = True
|
||||
cmdAuthor.Enabled = True
|
||||
cmdUnlockables.Enabled = True
|
||||
lblAuthor.Caption = "Modification By: " & GetAuthor
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
SourcePath = App.Path
|
||||
Dir1.Path = SourcePath
|
||||
End Sub
|
||||
|
||||
Private Function GetAuthor() As String
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
SOCLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo SOCLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo SOCLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo SOCLoad
|
||||
|
||||
word = FirstToken(line)
|
||||
word2 = SecondToken(line)
|
||||
|
||||
If UCase(word) = "MODBY" Then
|
||||
GetAuthor = word2
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Function
|
||||
|
||||
Private Sub WriteAuthor(Remove As Boolean, ModderName As String)
|
||||
Dim myFSOSource As New Scripting.FileSystemObject
|
||||
Dim tsSource As TextStream
|
||||
Dim myFSOTarget As New Scripting.FileSystemObject
|
||||
Dim tsTarget As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False)
|
||||
Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True)
|
||||
|
||||
Do While Not tsSource.AtEndOfStream
|
||||
line = tsSource.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
'If the entry exists in the SOC, delete it.
|
||||
If word <> "MODBY" Then
|
||||
tsTarget.WriteLine line
|
||||
End If
|
||||
Loop
|
||||
|
||||
tsSource.Close
|
||||
Set myFSOSource = Nothing
|
||||
|
||||
If Remove = False Then
|
||||
If line <> "" Then tsTarget.WriteLine ""
|
||||
|
||||
tsTarget.WriteLine "ModBy " & ModderName
|
||||
End If
|
||||
|
||||
tsTarget.Close
|
||||
Set myFSOTarget = Nothing
|
||||
|
||||
FileCopy SOCTemp, SOCFile
|
||||
|
||||
Kill SOCTemp
|
||||
|
||||
If Remove = True Then
|
||||
MsgBox "Name removed."
|
||||
Else
|
||||
MsgBox "Name Saved."
|
||||
End If
|
||||
End Sub
|
||||
|
Binary file not shown.
|
@ -1,839 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmLevelHeader
|
||||
Caption = "Level Header Info"
|
||||
ClientHeight = 5250
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 7650
|
||||
Icon = "frmLevelHeader.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
ScaleHeight = 5250
|
||||
ScaleWidth = 7650
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.TextBox txtRunSOC
|
||||
Height = 285
|
||||
Left = 6240
|
||||
MaxLength = 8
|
||||
TabIndex = 49
|
||||
Top = 4680
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CheckBox chkLevelSelect
|
||||
Caption = "Show on Host Game selection menu"
|
||||
Height = 375
|
||||
Left = 1680
|
||||
TabIndex = 48
|
||||
Top = 4800
|
||||
Width = 1935
|
||||
End
|
||||
Begin VB.CheckBox chkTimeAttack
|
||||
Caption = "Include in Time Attack calculations"
|
||||
Height = 255
|
||||
Left = 1680
|
||||
TabIndex = 47
|
||||
Top = 4440
|
||||
Width = 2775
|
||||
End
|
||||
Begin VB.CheckBox chkNoReload
|
||||
Caption = "Retain level state when player dies."
|
||||
Height = 255
|
||||
Left = 1680
|
||||
TabIndex = 46
|
||||
Top = 4080
|
||||
Width = 2895
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save Map"
|
||||
Height = 735
|
||||
Left = 120
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 45
|
||||
Top = 4440
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdRename
|
||||
Caption = "&Rename Map"
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 44
|
||||
Top = 3960
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "&Delete Map"
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 43
|
||||
Top = 3480
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CommandButton cmdAddMap
|
||||
Caption = "&Add Map"
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 42
|
||||
Top = 3000
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CheckBox chkNossmusic
|
||||
Caption = "Disable Super Sonic music changes"
|
||||
Height = 255
|
||||
Left = 4560
|
||||
TabIndex = 29
|
||||
Top = 1200
|
||||
Width = 2895
|
||||
End
|
||||
Begin VB.CheckBox chkHidden
|
||||
Caption = "Don't show on level selection menu"
|
||||
Height = 255
|
||||
Left = 4560
|
||||
TabIndex = 28
|
||||
Top = 480
|
||||
Width = 2895
|
||||
End
|
||||
Begin VB.TextBox txtCountdown
|
||||
Height = 285
|
||||
Left = 6360
|
||||
MaxLength = 3
|
||||
TabIndex = 26
|
||||
Top = 840
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.TextBox txtCutscenenum
|
||||
Height = 285
|
||||
Left = 4440
|
||||
MaxLength = 3
|
||||
TabIndex = 25
|
||||
Top = 3720
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtPrecutscenenum
|
||||
Height = 285
|
||||
Left = 2640
|
||||
MaxLength = 3
|
||||
TabIndex = 22
|
||||
Top = 3720
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.CheckBox chkScriptislump
|
||||
Caption = "Script is a lump in WAD, not a file"
|
||||
Height = 255
|
||||
Left = 1680
|
||||
TabIndex = 21
|
||||
Top = 3360
|
||||
Width = 2775
|
||||
End
|
||||
Begin VB.TextBox txtScriptname
|
||||
Height = 285
|
||||
Left = 2640
|
||||
MaxLength = 191
|
||||
TabIndex = 19
|
||||
Top = 3000
|
||||
Width = 1455
|
||||
End
|
||||
Begin VB.TextBox txtSkynum
|
||||
Height = 285
|
||||
Left = 2640
|
||||
MaxLength = 4
|
||||
TabIndex = 17
|
||||
Top = 2640
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.ComboBox cmbWeather
|
||||
Height = 315
|
||||
ItemData = "frmLevelHeader.frx":0442
|
||||
Left = 2640
|
||||
List = "frmLevelHeader.frx":0458
|
||||
TabIndex = 15
|
||||
Top = 2280
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.TextBox txtForcecharacter
|
||||
Height = 285
|
||||
Left = 2640
|
||||
MaxLength = 2
|
||||
TabIndex = 13
|
||||
Top = 1920
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.ComboBox cmbMusicslot
|
||||
Height = 315
|
||||
Left = 2640
|
||||
TabIndex = 11
|
||||
Top = 1560
|
||||
Width = 1815
|
||||
End
|
||||
Begin VB.TextBox txtNextlevel
|
||||
Height = 285
|
||||
Left = 2640
|
||||
MaxLength = 4
|
||||
TabIndex = 9
|
||||
Top = 1200
|
||||
Width = 615
|
||||
End
|
||||
Begin VB.Frame frmTypeOfLevel
|
||||
Caption = "Type of Level"
|
||||
Height = 2775
|
||||
Left = 5040
|
||||
TabIndex = 8
|
||||
Top = 1680
|
||||
Width = 2535
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Christmas"
|
||||
Height = 255
|
||||
Index = 11
|
||||
Left = 1440
|
||||
TabIndex = 41
|
||||
Tag = "1024"
|
||||
Top = 960
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "2D"
|
||||
Height = 255
|
||||
Index = 10
|
||||
Left = 1440
|
||||
TabIndex = 40
|
||||
Tag = "512"
|
||||
Top = 720
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Mario"
|
||||
Height = 255
|
||||
Index = 9
|
||||
Left = 120
|
||||
TabIndex = 39
|
||||
Tag = "256"
|
||||
Top = 2400
|
||||
Width = 1455
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Sonic Adventure"
|
||||
Height = 255
|
||||
Index = 8
|
||||
Left = 120
|
||||
TabIndex = 38
|
||||
Tag = "128"
|
||||
Top = 2160
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "NiGHTS"
|
||||
Height = 255
|
||||
Index = 7
|
||||
Left = 120
|
||||
TabIndex = 37
|
||||
Tag = "64"
|
||||
Top = 1920
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Chaos"
|
||||
Height = 255
|
||||
Index = 6
|
||||
Left = 120
|
||||
TabIndex = 36
|
||||
Tag = "32"
|
||||
Top = 1680
|
||||
Width = 1455
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Capture the Flag"
|
||||
Height = 255
|
||||
Index = 5
|
||||
Left = 120
|
||||
TabIndex = 35
|
||||
Tag = "16"
|
||||
Top = 1440
|
||||
Width = 1695
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Tag"
|
||||
Height = 255
|
||||
Index = 4
|
||||
Left = 120
|
||||
TabIndex = 34
|
||||
Tag = "8"
|
||||
Top = 1200
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Match"
|
||||
Height = 255
|
||||
Index = 3
|
||||
Left = 120
|
||||
TabIndex = 33
|
||||
Tag = "4"
|
||||
Top = 960
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Race"
|
||||
Height = 255
|
||||
Index = 2
|
||||
Left = 120
|
||||
TabIndex = 32
|
||||
Tag = "2"
|
||||
Top = 720
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Cooperative"
|
||||
Height = 255
|
||||
Index = 1
|
||||
Left = 120
|
||||
TabIndex = 31
|
||||
Tag = "1"
|
||||
Top = 480
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.CheckBox chkTypeoflevel
|
||||
Caption = "Single Player"
|
||||
Height = 255
|
||||
Index = 0
|
||||
Left = 120
|
||||
TabIndex = 30
|
||||
Tag = "4096"
|
||||
Top = 240
|
||||
Width = 1215
|
||||
End
|
||||
End
|
||||
Begin VB.CheckBox chkNozone
|
||||
Caption = "Don't show ""ZONE"" after Level Name"
|
||||
Height = 255
|
||||
Left = 4560
|
||||
TabIndex = 7
|
||||
Top = 120
|
||||
Width = 3015
|
||||
End
|
||||
Begin VB.TextBox txtAct
|
||||
Height = 285
|
||||
Left = 2640
|
||||
MaxLength = 2
|
||||
TabIndex = 5
|
||||
Top = 840
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtInterscreen
|
||||
Height = 285
|
||||
Left = 2640
|
||||
MaxLength = 8
|
||||
TabIndex = 3
|
||||
Top = 480
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.ListBox lstMaps
|
||||
Height = 2790
|
||||
Left = 120
|
||||
Sorted = -1 'True
|
||||
TabIndex = 2
|
||||
Top = 120
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.TextBox txtLevelName
|
||||
Height = 285
|
||||
Left = 2640
|
||||
MaxLength = 32
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 1815
|
||||
End
|
||||
Begin VB.Label lblRunSOC
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Run SOC at level load (lump name):"
|
||||
Height = 495
|
||||
Left = 4440
|
||||
TabIndex = 50
|
||||
Top = 4560
|
||||
Width = 1695
|
||||
End
|
||||
Begin VB.Label lblCountdown
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Level Timer (seconds):"
|
||||
Height = 255
|
||||
Left = 4560
|
||||
TabIndex = 27
|
||||
Top = 840
|
||||
Width = 1695
|
||||
End
|
||||
Begin VB.Label lblCutscenenum
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Cutscene to play after level:"
|
||||
Height = 495
|
||||
Left = 3240
|
||||
TabIndex = 24
|
||||
Top = 3600
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.Label lblPrecutscenenum
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Cutscene to play before level:"
|
||||
Height = 375
|
||||
Left = 1320
|
||||
TabIndex = 23
|
||||
Top = 3600
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.Label lblScriptName
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Script Name:"
|
||||
Height = 255
|
||||
Left = 1440
|
||||
TabIndex = 20
|
||||
Top = 3000
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.Label lblSkynum
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Sky #:"
|
||||
Height = 255
|
||||
Left = 1800
|
||||
TabIndex = 18
|
||||
Top = 2640
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.Label Label1
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Weather:"
|
||||
Height = 255
|
||||
Left = 1680
|
||||
TabIndex = 16
|
||||
Top = 2280
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.Label lblForcecharacter
|
||||
Caption = "Force Character #:"
|
||||
Height = 375
|
||||
Left = 1440
|
||||
TabIndex = 14
|
||||
Top = 1800
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.Label lblMusicslot
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Music:"
|
||||
Height = 255
|
||||
Left = 1800
|
||||
TabIndex = 12
|
||||
Top = 1560
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.Label lblNextlevel
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Next Level:"
|
||||
Height = 255
|
||||
Left = 1440
|
||||
TabIndex = 10
|
||||
Top = 1200
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.Label lblAct
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Act:"
|
||||
Height = 255
|
||||
Left = 2040
|
||||
TabIndex = 6
|
||||
Top = 840
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.Label lblInterscreen
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Intermission BG:"
|
||||
Height = 255
|
||||
Left = 1320
|
||||
TabIndex = 4
|
||||
Top = 480
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.Label lblLevelName
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Level Name:"
|
||||
Height = 255
|
||||
Left = 1560
|
||||
TabIndex = 1
|
||||
Top = 120
|
||||
Width = 975
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmLevelHeader"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmdAddMap_Click()
|
||||
Dim Response As String
|
||||
Dim NewNum As Integer
|
||||
|
||||
Response$ = InputBox("Enter the new level (NUMBER ONLY):")
|
||||
|
||||
If Response = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
NewNum = Val(TrimComplete(Response))
|
||||
|
||||
lstMaps.AddItem "Level " & NewNum
|
||||
lstMaps.ListIndex = lstMaps.ListCount - 1
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
Dim i As Integer
|
||||
|
||||
If MsgBox("Delete this level header?", vbYesNo) = vbNo Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
i = InStr(lstMaps.List(lstMaps.ListIndex), " ") + 1
|
||||
|
||||
i = Mid(lstMaps.List(lstMaps.ListIndex), i, Len(lstMaps.List(lstMaps.ListIndex)) - i + 1)
|
||||
i = Val(i)
|
||||
Call WriteLevel(True, i)
|
||||
lstMaps.RemoveItem lstMaps.ListIndex
|
||||
|
||||
If lstMaps.ListCount > 0 Then
|
||||
lstMaps.ListIndex = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdRename_Click()
|
||||
Dim Response As String
|
||||
Dim NewNum As Integer
|
||||
Dim i As Integer
|
||||
|
||||
Response$ = InputBox("Rename level to (NUMBER ONLY):")
|
||||
|
||||
If Response = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
NewNum = Val(TrimComplete(Response))
|
||||
|
||||
i = InStr(lstMaps.List(lstMaps.ListIndex), " ") + 1
|
||||
|
||||
i = Mid(lstMaps.List(lstMaps.ListIndex), i, Len(lstMaps.List(lstMaps.ListIndex)) - i + 1)
|
||||
i = Val(i)
|
||||
Call WriteLevel(True, i)
|
||||
lstMaps.List(lstMaps.ListIndex) = "Level " & NewNum
|
||||
Call cmdSave_Click
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
Dim i As Integer
|
||||
|
||||
i = InStr(lstMaps.List(lstMaps.ListIndex), " ") + 1
|
||||
|
||||
i = Val(Mid(lstMaps.List(lstMaps.ListIndex), i, Len(lstMaps.List(lstMaps.ListIndex)) - i + 1))
|
||||
Call WriteLevel(False, i)
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call LoadMusic
|
||||
Call LoadSOCMaps
|
||||
If lstMaps.ListCount > 0 Then lstMaps.ListIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSOCMaps()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
lstMaps.Clear
|
||||
|
||||
SOCLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo SOCLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo SOCLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo SOCLoad
|
||||
|
||||
word = FirstToken(line)
|
||||
word2 = SecondToken(line)
|
||||
|
||||
If UCase(word) = "LEVEL" Then
|
||||
lstMaps.AddItem ("Level " & Val(word2))
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub LoadMusic()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
Dim addstring As String
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("sounds.h", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "Music list (don't edit this comment!)") = 0
|
||||
Loop
|
||||
|
||||
ts.SkipLine ' typedef enum
|
||||
ts.SkipLine ' {
|
||||
|
||||
line = ts.ReadLine
|
||||
number = 0
|
||||
|
||||
cmbMusicslot.Clear
|
||||
|
||||
Do While InStr(line, "NUMMUSIC") = 0
|
||||
startclip = InStr(line, "mus_")
|
||||
If InStr(line, "mus_") <> 0 Then
|
||||
endclip = InStr(line, ",")
|
||||
line = Mid(line, startclip, endclip - startclip)
|
||||
addstring = number & " - " & line
|
||||
cmbMusicslot.AddItem addstring
|
||||
number = number + 1
|
||||
End If
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub ClearForm()
|
||||
Dim j As Integer
|
||||
|
||||
txtLevelName.Text = ""
|
||||
txtInterscreen.Text = ""
|
||||
txtAct.Text = ""
|
||||
txtNextlevel.Text = ""
|
||||
cmbMusicslot.Text = ""
|
||||
txtForcecharacter.Text = ""
|
||||
cmbWeather.Text = ""
|
||||
txtSkynum.Text = ""
|
||||
txtScriptname.Text = ""
|
||||
chkScriptislump.Value = 0
|
||||
txtPrecutscenenum.Text = ""
|
||||
txtCutscenenum.Text = ""
|
||||
txtRunSOC.Text = ""
|
||||
chkNozone.Value = 0
|
||||
chkHidden.Value = 0
|
||||
txtCountdown.Text = ""
|
||||
chkNossmusic.Value = 0
|
||||
chkNoReload.Value = 0
|
||||
chkTimeAttack.Value = 0
|
||||
chkLevelSelect = 0
|
||||
|
||||
For j = 0 To 11
|
||||
chkTypeoflevel(j).Value = 0
|
||||
Next j
|
||||
End Sub
|
||||
|
||||
Private Sub lstMaps_Click()
|
||||
Dim startclip As Integer
|
||||
Call ClearForm
|
||||
startclip = InStr(lstMaps.List(lstMaps.ListIndex), " ")
|
||||
Call LoadSOCMapInfo(Val(Mid(lstMaps.List(lstMaps.ListIndex), startclip + 1, Len(lstMaps.List(lstMaps.ListIndex)))))
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSOCMapInfo(num As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
SOCLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo SOCLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo SOCLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo SOCLoad
|
||||
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
If word = "LEVEL" Then
|
||||
If Val(word2) = num Then
|
||||
Do While Len(line) > 0 And Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondTokenEqual(line))
|
||||
|
||||
If word = "LEVELNAME" Then
|
||||
txtLevelName.Text = word2
|
||||
ElseIf word = "INTERSCREEN" Then
|
||||
txtInterscreen.Text = word2
|
||||
ElseIf word = "ACT" Then
|
||||
txtAct.Text = Val(word2)
|
||||
ElseIf word = "NOZONE" Then
|
||||
chkNozone.Value = Val(word2)
|
||||
ElseIf word = "TYPEOFLEVEL" Then
|
||||
ProcessMapFlags (Val(word2))
|
||||
ElseIf word = "NEXTLEVEL" Then
|
||||
txtNextlevel.Text = Val(word2)
|
||||
ElseIf word = "MUSICSLOT" Then
|
||||
cmbMusicslot.ListIndex = Val(word2)
|
||||
ElseIf word = "FORCECHARACTER" Then
|
||||
txtForcecharacter.Text = Val(word2)
|
||||
ElseIf word = "WEATHER" Then
|
||||
cmbWeather.ListIndex = Val(word2)
|
||||
ElseIf word = "SKYNUM" Then
|
||||
txtSkynum.Text = Val(word2)
|
||||
ElseIf word = "SCRIPTNAME" Then
|
||||
txtScriptname.Text = word2
|
||||
ElseIf word = "SCRIPTISLUMP" Then
|
||||
chkScriptislump.Value = Val(word2)
|
||||
ElseIf word = "PRECUTSCENENUM" Then
|
||||
txtPrecutscenenum.Text = Val(word2)
|
||||
ElseIf word = "CUTSCENENUM" Then
|
||||
txtCutscenenum.Text = Val(word2)
|
||||
ElseIf word = "COUNTDOWN" Then
|
||||
txtCountdown.Text = Val(word2)
|
||||
ElseIf word = "HIDDEN" Then
|
||||
chkHidden.Value = Val(word2)
|
||||
ElseIf word = "NOSSMUSIC" Then
|
||||
chkNossmusic.Value = Val(word2)
|
||||
ElseIf word = "NORELOAD" Then
|
||||
chkNoReload.Value = Val(word2)
|
||||
ElseIf word = "TIMEATTACK" Then
|
||||
chkTimeAttack.Value = Val(word2)
|
||||
ElseIf word = "LEVELSELECT" Then
|
||||
chkLevelSelect.Value = Val(word2)
|
||||
ElseIf word = "RUNSOC" Then
|
||||
txtRunSOC.Text = word2
|
||||
ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then
|
||||
MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line
|
||||
End If
|
||||
Loop
|
||||
Exit Do
|
||||
End If
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub ProcessMapFlags(flags As Long)
|
||||
Dim j As Integer
|
||||
|
||||
For j = 0 To 11
|
||||
If flags And chkTypeoflevel(j).Tag Then
|
||||
chkTypeoflevel(j).Value = 1
|
||||
Else
|
||||
chkTypeoflevel(j).Value = 0
|
||||
End If
|
||||
Next j
|
||||
End Sub
|
||||
|
||||
Private Sub WriteLevel(Remove As Boolean, Mapnum As Integer)
|
||||
Dim myFSOSource As New Scripting.FileSystemObject
|
||||
Dim tsSource As TextStream
|
||||
Dim myFSOTarget As New Scripting.FileSystemObject
|
||||
Dim tsTarget As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
Dim flags As Long
|
||||
Dim i As Integer
|
||||
|
||||
Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False)
|
||||
Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True)
|
||||
|
||||
Do While Not tsSource.AtEndOfStream
|
||||
line = tsSource.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
i = InStr(lstMaps.List(lstMaps.ListIndex), " ") + 1
|
||||
|
||||
i = Mid(lstMaps.List(lstMaps.ListIndex), i, Len(lstMaps.List(lstMaps.ListIndex)) - i + 1)
|
||||
i = Val(i)
|
||||
'If the current level exists in the SOC, delete it.
|
||||
If word = "LEVEL" And Val(word2) = i Then
|
||||
Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream)
|
||||
Loop
|
||||
Else
|
||||
tsTarget.WriteLine line
|
||||
End If
|
||||
Loop
|
||||
|
||||
tsSource.Close
|
||||
Set myFSOSource = Nothing
|
||||
|
||||
If Remove = False Then
|
||||
If line <> "" Then tsTarget.WriteLine ""
|
||||
|
||||
tsTarget.WriteLine UCase(lstMaps.List(lstMaps.ListIndex))
|
||||
txtLevelName.Text = TrimComplete(txtLevelName.Text)
|
||||
txtInterscreen.Text = TrimComplete(txtInterscreen.Text)
|
||||
txtAct.Text = TrimComplete(txtAct.Text)
|
||||
txtNextlevel.Text = TrimComplete(txtNextlevel.Text)
|
||||
cmbMusicslot.Text = TrimComplete(cmbMusicslot.Text)
|
||||
txtForcecharacter.Text = TrimComplete(txtForcecharacter.Text)
|
||||
cmbWeather.Text = TrimComplete(cmbWeather.Text)
|
||||
txtSkynum.Text = TrimComplete(txtSkynum.Text)
|
||||
txtScriptname.Text = TrimComplete(txtScriptname.Text)
|
||||
txtPrecutscenenum.Text = TrimComplete(txtPrecutscenenum.Text)
|
||||
txtCutscenenum.Text = TrimComplete(txtCutscenenum.Text)
|
||||
txtCountdown.Text = TrimComplete(txtCountdown.Text)
|
||||
txtRunSOC.Text = TrimComplete(txtRunSOC.Text)
|
||||
|
||||
If txtLevelName.Text <> "" Then tsTarget.WriteLine "LEVELNAME = " & txtLevelName.Text
|
||||
If txtInterscreen.Text <> "" Then tsTarget.WriteLine "INTERSCREEN = " & txtInterscreen.Text
|
||||
If txtAct.Text <> "" Then tsTarget.WriteLine "ACT = " & Val(txtAct.Text)
|
||||
If txtNextlevel.Text <> "" Then tsTarget.WriteLine "NEXTLEVEL = " & Val(txtNextlevel.Text)
|
||||
If cmbMusicslot.Text <> "" Then tsTarget.WriteLine "MUSICSLOT = " & cmbMusicslot.ListIndex
|
||||
If txtForcecharacter.Text <> "" Then tsTarget.WriteLine "FORCECHARACTER = " & Val(txtForcecharacter.Text)
|
||||
If cmbWeather.Text <> "" Then tsTarget.WriteLine "WEATHER = " & cmbWeather.ListIndex
|
||||
If txtSkynum.Text <> "" Then tsTarget.WriteLine "SKYNUM = " & Val(txtSkynum.Text)
|
||||
If txtScriptname.Text <> "" Then tsTarget.WriteLine "SCRIPTNAME = " & txtScriptname.Text
|
||||
If txtPrecutscenenum.Text <> "" Then tsTarget.WriteLine "PRECUTSCENENUM = " & Val(txtPrecutscenenum.Text)
|
||||
If txtCutscenenum.Text <> "" Then tsTarget.WriteLine "CUTSCENENUM = " & Val(txtCutscenenum.Text)
|
||||
If txtCountdown.Text <> "" Then tsTarget.WriteLine "COUNTDOWN = " & Val(txtCountdown.Text)
|
||||
If chkScriptislump.Value = 1 Then tsTarget.WriteLine "SCRIPTISLUMP = 1"
|
||||
If chkNozone.Value = 1 Then tsTarget.WriteLine "NOZONE = 1"
|
||||
If chkHidden.Value = 1 Then tsTarget.WriteLine "HIDDEN = 1"
|
||||
If chkNossmusic.Value = 1 Then tsTarget.WriteLine "NOSSMUSIC = 1"
|
||||
If chkNoReload.Value = 1 Then tsTarget.WriteLine "NORELOAD = 1"
|
||||
If chkTimeAttack.Value = 1 Then tsTarget.WriteLine "TIMEATTACK = 1"
|
||||
If chkLevelSelect.Value = 1 Then tsTarget.WriteLine "LEVELSELECT = 1"
|
||||
If txtRunSOC.Text <> "" Then tsTarget.WriteLine "RUNSOC = " & txtRunSOC.Text
|
||||
|
||||
flags = 0
|
||||
For i = 0 To 11
|
||||
If chkTypeoflevel(i).Value = 1 Then
|
||||
flags = flags + Val(chkTypeoflevel(i).Tag)
|
||||
End If
|
||||
Next
|
||||
|
||||
If flags > 0 Then tsTarget.WriteLine "TYPEOFLEVEL = " & flags
|
||||
End If
|
||||
|
||||
tsTarget.Close
|
||||
Set myFSOTarget = Nothing
|
||||
|
||||
FileCopy SOCTemp, SOCFile
|
||||
|
||||
Kill SOCTemp
|
||||
|
||||
If Remove = True Then
|
||||
MsgBox "Level Deleted."
|
||||
Else
|
||||
MsgBox "Level Saved."
|
||||
End If
|
||||
End Sub
|
||||
|
Binary file not shown.
|
@ -1,644 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmMaincfg
|
||||
Caption = "Global Game Settings"
|
||||
ClientHeight = 5295
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 9360
|
||||
Icon = "frmMaincfg.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
ScaleHeight = 5295
|
||||
ScaleWidth = 9360
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.Frame frmReset
|
||||
Caption = "Reset Data (Be sure this is at the TOP of your SOC)"
|
||||
Height = 975
|
||||
Left = 4800
|
||||
TabIndex = 43
|
||||
Top = 4200
|
||||
Width = 4455
|
||||
Begin VB.CheckBox chkReset
|
||||
Caption = "Thing Properties"
|
||||
Height = 255
|
||||
Index = 2
|
||||
Left = 1680
|
||||
TabIndex = 46
|
||||
Tag = "4"
|
||||
Top = 240
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.CheckBox chkReset
|
||||
Caption = "States"
|
||||
Height = 255
|
||||
Index = 1
|
||||
Left = 240
|
||||
TabIndex = 45
|
||||
Tag = "2"
|
||||
Top = 600
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.CheckBox chkReset
|
||||
Caption = "Sprite Names"
|
||||
Height = 255
|
||||
Index = 0
|
||||
Left = 240
|
||||
TabIndex = 44
|
||||
Tag = "1"
|
||||
Top = 240
|
||||
Width = 1575
|
||||
End
|
||||
End
|
||||
Begin VB.CheckBox chkDisableSpeedAdjust
|
||||
Caption = "Disable speed adjustment of player animations depending on how fast they are moving."
|
||||
Height = 375
|
||||
Left = 1080
|
||||
TabIndex = 42
|
||||
Top = 4200
|
||||
Width = 3615
|
||||
End
|
||||
Begin VB.TextBox txtTitleScrollSpeed
|
||||
Height = 285
|
||||
Left = 4080
|
||||
TabIndex = 41
|
||||
Top = 1920
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.CheckBox chkLoopTitle
|
||||
Caption = "Loop the title screen music?"
|
||||
Height = 195
|
||||
Left = 1080
|
||||
TabIndex = 39
|
||||
Top = 3840
|
||||
Width = 2415
|
||||
End
|
||||
Begin VB.TextBox txtCreditsCutscene
|
||||
Height = 285
|
||||
Left = 4080
|
||||
TabIndex = 37
|
||||
Top = 1560
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 36
|
||||
Top = 3120
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.CommandButton cmdReload
|
||||
Caption = "&Reload"
|
||||
Height = 495
|
||||
Left = 120
|
||||
TabIndex = 35
|
||||
Top = 2520
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.TextBox txtNumemblems
|
||||
Height = 285
|
||||
Left = 4080
|
||||
MaxLength = 2
|
||||
TabIndex = 33
|
||||
Top = 3360
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtGamedata
|
||||
Height = 285
|
||||
Left = 3240
|
||||
MaxLength = 64
|
||||
TabIndex = 31
|
||||
Top = 2880
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtExeccfg
|
||||
Height = 285
|
||||
Left = 3240
|
||||
TabIndex = 9
|
||||
Top = 2400
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.Frame frmTimers
|
||||
Caption = "Timers (35 = 1 second)"
|
||||
Height = 3975
|
||||
Left = 4800
|
||||
TabIndex = 8
|
||||
Top = 120
|
||||
Width = 4455
|
||||
Begin VB.TextBox txtGameovertics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 29
|
||||
Top = 3480
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtHelpertics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 27
|
||||
Top = 3120
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtParalooptics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 25
|
||||
Top = 2760
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtExtralifetics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 23
|
||||
Top = 2400
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtSpacetimetics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 21
|
||||
Top = 2040
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtUnderwatertics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 19
|
||||
Top = 1680
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtTailsflytics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 17
|
||||
Top = 1320
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtFlashingtics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 15
|
||||
Top = 960
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtSneakertics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 13
|
||||
Top = 600
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.TextBox txtInvulntics
|
||||
Height = 285
|
||||
Left = 3000
|
||||
TabIndex = 11
|
||||
Top = 240
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.Label lblGameovertics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Game Over Screen Time:"
|
||||
Height = 255
|
||||
Left = 960
|
||||
TabIndex = 30
|
||||
Top = 3480
|
||||
Width = 1935
|
||||
End
|
||||
Begin VB.Label lblHelpertics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "NiGHTS Nightopian Helper Time:"
|
||||
Height = 255
|
||||
Left = 240
|
||||
TabIndex = 28
|
||||
Top = 3120
|
||||
Width = 2655
|
||||
End
|
||||
Begin VB.Label lblParalooptics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "NiGHTS Paraloop Powerup Time:"
|
||||
Height = 255
|
||||
Left = 360
|
||||
TabIndex = 26
|
||||
Top = 2760
|
||||
Width = 2535
|
||||
End
|
||||
Begin VB.Label lblExtralifetics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Extra Life Music Duration:"
|
||||
Height = 255
|
||||
Left = 960
|
||||
TabIndex = 24
|
||||
Top = 2400
|
||||
Width = 1935
|
||||
End
|
||||
Begin VB.Label lblSpacetimetics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Space Breath Timeout:"
|
||||
Height = 255
|
||||
Left = 1200
|
||||
TabIndex = 22
|
||||
Top = 2040
|
||||
Width = 1695
|
||||
End
|
||||
Begin VB.Label lblUnderwatertics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Underwater Breath Timeout:"
|
||||
Height = 255
|
||||
Left = 840
|
||||
TabIndex = 20
|
||||
Top = 1680
|
||||
Width = 2055
|
||||
End
|
||||
Begin VB.Label lblTailsflytics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Tails Flying Time:"
|
||||
Height = 255
|
||||
Left = 1440
|
||||
TabIndex = 18
|
||||
Top = 1320
|
||||
Width = 1455
|
||||
End
|
||||
Begin VB.Label lblFlashingtics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Flashing Time After Being Hit:"
|
||||
Height = 255
|
||||
Left = 360
|
||||
TabIndex = 16
|
||||
Top = 960
|
||||
Width = 2535
|
||||
End
|
||||
Begin VB.Label lblSneakertics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Super Sneakers Time:"
|
||||
Height = 255
|
||||
Left = 240
|
||||
TabIndex = 14
|
||||
Top = 600
|
||||
Width = 2655
|
||||
End
|
||||
Begin VB.Label lblInvulntics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Invincibility Time:"
|
||||
Height = 255
|
||||
Left = 360
|
||||
TabIndex = 12
|
||||
Top = 240
|
||||
Width = 2535
|
||||
End
|
||||
End
|
||||
Begin VB.TextBox txtIntrotoplay
|
||||
Height = 285
|
||||
Left = 4080
|
||||
TabIndex = 6
|
||||
Top = 1200
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtRacestage_start
|
||||
Height = 285
|
||||
Left = 4080
|
||||
MaxLength = 4
|
||||
TabIndex = 4
|
||||
Top = 840
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtSpstage_start
|
||||
Height = 285
|
||||
Left = 4080
|
||||
MaxLength = 4
|
||||
TabIndex = 2
|
||||
Top = 480
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtSstage_start
|
||||
Height = 285
|
||||
Left = 4080
|
||||
MaxLength = 4
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.Label lblTitleScrollSpeed
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Scroll speed of title background:"
|
||||
Height = 255
|
||||
Left = 1560
|
||||
TabIndex = 40
|
||||
Top = 1920
|
||||
Width = 2415
|
||||
End
|
||||
Begin VB.Label lblCreditsCutscene
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Cutscene # to replace credits with:"
|
||||
Height = 255
|
||||
Left = 1080
|
||||
TabIndex = 38
|
||||
Top = 1560
|
||||
Width = 2895
|
||||
End
|
||||
Begin VB.Label lblNumemblems
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "# of LEVEL Emblems (Gamedata field must also be filled out):"
|
||||
Height = 375
|
||||
Left = 1440
|
||||
TabIndex = 34
|
||||
Top = 3240
|
||||
Width = 2535
|
||||
End
|
||||
Begin VB.Label lblGamedata
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Gamedata file (to save mod emblems and time data):"
|
||||
Height = 375
|
||||
Left = 960
|
||||
TabIndex = 32
|
||||
Top = 2760
|
||||
Width = 2175
|
||||
End
|
||||
Begin VB.Label lblExeccfg
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "CFG file to instantly execute upon loading this SOC:"
|
||||
Height = 495
|
||||
Left = 960
|
||||
TabIndex = 10
|
||||
Top = 2280
|
||||
Width = 2175
|
||||
End
|
||||
Begin VB.Label lblIntrotoplay
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Cutscene # to use for introduction:"
|
||||
Height = 255
|
||||
Left = 1440
|
||||
TabIndex = 7
|
||||
Top = 1200
|
||||
Width = 2535
|
||||
End
|
||||
Begin VB.Label lblRacestage_start
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Racing mode starts/loops back to this map #:"
|
||||
Height = 255
|
||||
Left = 720
|
||||
TabIndex = 5
|
||||
Top = 840
|
||||
Width = 3255
|
||||
End
|
||||
Begin VB.Label lblSpstage_start
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Single Player Game Starts on this map #:"
|
||||
Height = 255
|
||||
Left = 1080
|
||||
TabIndex = 3
|
||||
Top = 480
|
||||
Width = 2895
|
||||
End
|
||||
Begin VB.Label lblSstage_start
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "First Special Stage Map #:"
|
||||
Height = 255
|
||||
Left = 2040
|
||||
TabIndex = 1
|
||||
Top = 120
|
||||
Width = 1935
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmMaincfg"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Private Sub cmdReload_Click()
|
||||
Call Reload
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
Call WriteSettings
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call Reload
|
||||
End Sub
|
||||
|
||||
Private Sub ClearForm()
|
||||
Dim i As Integer
|
||||
|
||||
txtSstage_start.Text = ""
|
||||
txtSpstage_start.Text = ""
|
||||
txtRacestage_start.Text = ""
|
||||
txtIntrotoplay.Text = ""
|
||||
txtExeccfg.Text = ""
|
||||
txtGamedata.Text = ""
|
||||
txtNumemblems.Text = ""
|
||||
txtInvulntics.Text = ""
|
||||
txtSneakertics.Text = ""
|
||||
txtFlashingtics.Text = ""
|
||||
txtTailsflytics.Text = ""
|
||||
txtUnderwatertics.Text = ""
|
||||
txtSpacetimetics.Text = ""
|
||||
txtExtralifetics.Text = ""
|
||||
txtParalooptics.Text = ""
|
||||
txtHelpertics.Text = ""
|
||||
txtGameovertics.Text = ""
|
||||
txtCreditsCutscene.Text = ""
|
||||
txtTitleScrollSpeed.Text = ""
|
||||
chkLoopTitle.Value = 0
|
||||
chkDisableSpeedAdjust.Value = 0
|
||||
|
||||
For i = 0 To 2
|
||||
chkReset(i).Value = 0
|
||||
Next i
|
||||
End Sub
|
||||
|
||||
Private Sub Reload()
|
||||
Call ClearForm
|
||||
Call ReadSOCMaincfg
|
||||
End Sub
|
||||
|
||||
Private Sub ReadSOCMaincfg()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
SOCLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo SOCLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo SOCLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo SOCLoad
|
||||
|
||||
word = FirstToken(line)
|
||||
word2 = SecondToken(line)
|
||||
|
||||
If UCase(word) = "MAINCFG" Then
|
||||
Do While Len(line) > 0 And Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondTokenEqual(line))
|
||||
|
||||
If word = "SSTAGE_START" Then
|
||||
txtSstage_start.Text = Val(word2)
|
||||
ElseIf word = "SPSTAGE_START" Then
|
||||
txtSpstage_start.Text = Val(word2)
|
||||
ElseIf word = "RACESTAGE_START" Then
|
||||
txtRacestage_start.Text = Val(word2)
|
||||
ElseIf word = "INVULNTICS" Then
|
||||
txtInvulntics.Text = Val(word2)
|
||||
ElseIf word = "SNEAKERTICS" Then
|
||||
txtSneakertics.Text = Val(word2)
|
||||
ElseIf word = "FLASHINGTICS" Then
|
||||
txtFlashingtics.Text = Val(word2)
|
||||
ElseIf word = "TAILSFLYTICS" Then
|
||||
txtTailsflytics.Text = Val(word2)
|
||||
ElseIf word = "UNDERWATERTICS" Then
|
||||
txtUnderwatertics.Text = Val(word2)
|
||||
ElseIf word = "SPACETIMETICS" Then
|
||||
txtSpacetimetics.Text = Val(word2)
|
||||
ElseIf word = "EXTRALIFETICS" Then
|
||||
txtExtralifetics.Text = Val(word2)
|
||||
ElseIf word = "PARALOOPTICS" Then
|
||||
txtParalooptics.Text = Val(word2)
|
||||
ElseIf word = "HELPERTICS" Then
|
||||
txtHelpertics.Text = Val(word2)
|
||||
ElseIf word = "GAMEOVERTICS" Then
|
||||
txtGameovertics.Text = Val(word2)
|
||||
ElseIf word = "INTROTOPLAY" Then
|
||||
txtIntrotoplay.Text = Val(word2)
|
||||
ElseIf word = "CREDITSCUTSCENE" Then
|
||||
txtCreditsCutscene.Text = Val(word2)
|
||||
ElseIf word = "TITLESCROLLSPEED" Then
|
||||
txtTitleScrollSpeed.Text = Val(word2)
|
||||
ElseIf word = "LOOPTITLE" Then
|
||||
chkLoopTitle.Value = Val(word2)
|
||||
ElseIf word = "DISABLESPEEDADJUST" Then
|
||||
chkDisableSpeedAdjust.Value = Val(word2)
|
||||
ElseIf word = "GAMEDATA" Then
|
||||
txtGamedata.Text = word2
|
||||
ElseIf word = "NUMEMBLEMS" Then
|
||||
txtNumemblems.Text = Val(word2)
|
||||
ElseIf word = "RESETDATA" Then
|
||||
Dim resetflags As Integer
|
||||
Dim z As Integer
|
||||
|
||||
resetflags = Val(word2)
|
||||
|
||||
For z = 0 To 2
|
||||
If resetflags And chkReset(z).Tag Then
|
||||
chkReset(z).Value = 1
|
||||
Else
|
||||
chkReset(z).Value = 0
|
||||
End If
|
||||
Next z
|
||||
ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then
|
||||
MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line
|
||||
End If
|
||||
Loop
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub WriteSettings()
|
||||
Dim myFSOSource As New Scripting.FileSystemObject
|
||||
Dim tsSource As TextStream
|
||||
Dim myFSOTarget As New Scripting.FileSystemObject
|
||||
Dim tsTarget As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
Dim flags As Long
|
||||
Dim i As Integer
|
||||
|
||||
Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False)
|
||||
Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True)
|
||||
|
||||
Do While Not tsSource.AtEndOfStream
|
||||
line = tsSource.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
'If the category exists in the SOC, delete it.
|
||||
If word = "MAINCFG" Then
|
||||
Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream)
|
||||
Loop
|
||||
Else
|
||||
tsTarget.WriteLine line
|
||||
End If
|
||||
Loop
|
||||
|
||||
tsSource.Close
|
||||
Set myFSOSource = Nothing
|
||||
|
||||
If line <> "" Then tsTarget.WriteLine ""
|
||||
|
||||
tsTarget.WriteLine "MAINCFG CATEGORY"
|
||||
txtSstage_start.Text = TrimComplete(txtSstage_start.Text)
|
||||
txtSpstage_start.Text = TrimComplete(txtSpstage_start.Text)
|
||||
txtRacestage_start.Text = TrimComplete(txtRacestage_start.Text)
|
||||
txtIntrotoplay.Text = TrimComplete(txtIntrotoplay.Text)
|
||||
txtCreditsCutscene.Text = TrimComplete(txtCreditsCutscene.Text)
|
||||
txtExeccfg.Text = TrimComplete(txtExeccfg.Text)
|
||||
txtGamedata.Text = TrimComplete(txtGamedata.Text)
|
||||
txtNumemblems.Text = TrimComplete(txtNumemblems.Text)
|
||||
txtInvulntics.Text = TrimComplete(txtInvulntics.Text)
|
||||
txtSneakertics.Text = TrimComplete(txtSneakertics.Text)
|
||||
txtFlashingtics.Text = TrimComplete(txtFlashingtics.Text)
|
||||
txtTailsflytics.Text = TrimComplete(txtTailsflytics.Text)
|
||||
txtUnderwatertics.Text = TrimComplete(txtUnderwatertics.Text)
|
||||
txtSpacetimetics.Text = TrimComplete(txtSpacetimetics.Text)
|
||||
txtExtralifetics.Text = TrimComplete(txtExtralifetics.Text)
|
||||
txtParalooptics.Text = TrimComplete(txtParalooptics.Text)
|
||||
txtHelpertics.Text = TrimComplete(txtHelpertics.Text)
|
||||
txtGameovertics.Text = TrimComplete(txtGameovertics.Text)
|
||||
txtTitleScrollSpeed.Text = TrimComplete(txtTitleScrollSpeed.Text)
|
||||
|
||||
If txtSstage_start.Text <> "" Then tsTarget.WriteLine "SSTAGE_START = " & Val(txtSstage_start.Text)
|
||||
If txtSpstage_start.Text <> "" Then tsTarget.WriteLine "SPSTAGE_START = " & Val(txtSpstage_start.Text)
|
||||
If txtRacestage_start.Text <> "" Then tsTarget.WriteLine "RACESTAGE_START = " & Val(txtRacestage_start.Text)
|
||||
If txtIntrotoplay.Text <> "" Then tsTarget.WriteLine "INTROTOPLAY = " & Val(txtIntrotoplay.Text)
|
||||
If txtCreditsCutscene.Text <> "" Then tsTarget.WriteLine "CREDITSCUTSCENE = " & Val(txtCreditsCutscene.Text)
|
||||
If txtExeccfg.Text <> "" Then tsTarget.WriteLine "EXECCFG = " & txtExeccfg.Text
|
||||
If txtGamedata.Text <> "" Then tsTarget.WriteLine "GAMEDATA = " & txtGamedata.Text
|
||||
If txtNumemblems.Text <> "" Then
|
||||
tsTarget.WriteLine "NUMEMBLEMS = " & Val(txtNumemblems.Text)
|
||||
EditedNumemblems = True
|
||||
End If
|
||||
If txtInvulntics.Text <> "" Then tsTarget.WriteLine "INVULNTICS = " & Val(txtInvulntics.Text)
|
||||
If txtSneakertics.Text <> "" Then tsTarget.WriteLine "SNEAKERTICS = " & Val(txtSneakertics.Text)
|
||||
If txtFlashingtics.Text <> "" Then tsTarget.WriteLine "FLASHINGTICS = " & Val(txtFlashingtics.Text)
|
||||
If txtTailsflytics.Text <> "" Then tsTarget.WriteLine "TAILSFLYTICS = " & Val(txtTailsflytics.Text)
|
||||
If txtUnderwatertics.Text <> "" Then tsTarget.WriteLine "UNDERWATERTICS = " & Val(txtUnderwatertics.Text)
|
||||
If txtSpacetimetics.Text <> "" Then tsTarget.WriteLine "SPACETIMETICS = " & Val(txtSpacetimetics.Text)
|
||||
If txtExtralifetics.Text <> "" Then tsTarget.WriteLine "EXTRALIFETICS = " & Val(txtExtralifetics.Text)
|
||||
If txtParalooptics.Text <> "" Then tsTarget.WriteLine "PARALOOPTICS = " & Val(txtParalooptics.Text)
|
||||
If txtHelpertics.Text <> "" Then tsTarget.WriteLine "HELPERTICS = " & Val(txtHelpertics.Text)
|
||||
If txtGameovertics.Text <> "" Then tsTarget.WriteLine "GAMEOVERTICS = " & Val(txtGameovertics.Text)
|
||||
If txtTitleScrollSpeed.Text <> "" Then tsTarget.WriteLine "TITLESCROLLSPEED = " & Val(txtTitleScrollSpeed.Text)
|
||||
If chkLoopTitle.Value = 1 Then tsTarget.WriteLine "LOOPTITLE = " & chkLoopTitle.Value
|
||||
If chkDisableSpeedAdjust.Value = 1 Then tsTarget.WriteLine "DISABLESPEEDADJUST = " & chkDisableSpeedAdjust.Value
|
||||
|
||||
flags = 0
|
||||
For i = 0 To 2
|
||||
If chkReset(i).Value = 1 Then
|
||||
flags = flags + Val(chkReset(i).Tag)
|
||||
End If
|
||||
Next
|
||||
|
||||
If flags > 0 Then tsTarget.WriteLine "RESETDATA = " & flags
|
||||
|
||||
tsTarget.Close
|
||||
Set myFSOTarget = Nothing
|
||||
|
||||
FileCopy SOCTemp, SOCFile
|
||||
|
||||
Kill SOCTemp
|
||||
|
||||
MsgBox "Settings Saved."
|
||||
End Sub
|
||||
|
Binary file not shown.
|
@ -1,485 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmSoundEdit
|
||||
Caption = "Sound Edit"
|
||||
ClientHeight = 4995
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 6180
|
||||
Icon = "frmSoundEdit.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
ScaleHeight = 4995
|
||||
ScaleWidth = 6180
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "&Delete sound from SOC"
|
||||
Height = 495
|
||||
Left = 5040
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 13
|
||||
Top = 4320
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
Height = 495
|
||||
Left = 3840
|
||||
TabIndex = 6
|
||||
Top = 4320
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdReload
|
||||
Caption = "&Load Code Default"
|
||||
Height = 495
|
||||
Left = 2640
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 5
|
||||
Top = 4320
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.Frame frmSpecial
|
||||
Caption = "Special Properties"
|
||||
Height = 3375
|
||||
Left = 2640
|
||||
TabIndex = 4
|
||||
Top = 840
|
||||
Width = 3495
|
||||
Begin VB.CheckBox chkTotallySingle
|
||||
Caption = "Make sure only one sound of this is playing at a time on any sound channel."
|
||||
Height = 615
|
||||
Left = 120
|
||||
TabIndex = 12
|
||||
Tag = "1"
|
||||
Top = 2640
|
||||
Width = 3255
|
||||
End
|
||||
Begin VB.CheckBox chkEightEx
|
||||
Caption = "Sound can be heard across 8x the distance"
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 10
|
||||
Tag = "16"
|
||||
Top = 2160
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.CheckBox chkOutside
|
||||
Caption = "Volume dependent on how close you are to outside"
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 9
|
||||
Tag = "4"
|
||||
Top = 360
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.CheckBox chkFourEx
|
||||
Caption = "Sound can be heard across 4x the distance"
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 8
|
||||
Tag = "8"
|
||||
Top = 1560
|
||||
Width = 2055
|
||||
End
|
||||
Begin VB.CheckBox chkMultiple
|
||||
Caption = "More than one of this sound can be played per object at a time (i.e., thunder)"
|
||||
Height = 615
|
||||
Left = 120
|
||||
TabIndex = 7
|
||||
Tag = "2"
|
||||
Top = 840
|
||||
Width = 2535
|
||||
End
|
||||
Begin VB.Label Label1
|
||||
Caption = "Combine for 32x"
|
||||
Height = 495
|
||||
Left = 2760
|
||||
TabIndex = 11
|
||||
Top = 1800
|
||||
Width = 615
|
||||
End
|
||||
Begin VB.Line Line4
|
||||
X1 = 2400
|
||||
X2 = 2640
|
||||
Y1 = 2400
|
||||
Y2 = 2400
|
||||
End
|
||||
Begin VB.Line Line2
|
||||
X1 = 2400
|
||||
X2 = 2640
|
||||
Y1 = 1800
|
||||
Y2 = 1800
|
||||
End
|
||||
Begin VB.Line Line1
|
||||
X1 = 2640
|
||||
X2 = 2640
|
||||
Y1 = 2400
|
||||
Y2 = 1800
|
||||
End
|
||||
End
|
||||
Begin VB.ComboBox cmbPriority
|
||||
Height = 315
|
||||
ItemData = "frmSoundEdit.frx":0442
|
||||
Left = 3360
|
||||
List = "frmSoundEdit.frx":0444
|
||||
TabIndex = 2
|
||||
Top = 120
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.CheckBox chkSingularity
|
||||
Caption = "Only one can be played at a time per object."
|
||||
Height = 255
|
||||
Left = 2640
|
||||
TabIndex = 1
|
||||
Top = 480
|
||||
Width = 3495
|
||||
End
|
||||
Begin VB.ListBox lstSounds
|
||||
Height = 4740
|
||||
Left = 120
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 2415
|
||||
End
|
||||
Begin VB.Line Line3
|
||||
X1 = 0
|
||||
X2 = 720
|
||||
Y1 = 0
|
||||
Y2 = 0
|
||||
End
|
||||
Begin VB.Label lblPriority
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Priority:"
|
||||
Height = 255
|
||||
Left = 2640
|
||||
TabIndex = 3
|
||||
Top = 120
|
||||
Width = 615
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmSoundEdit"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
Call WriteSound(True)
|
||||
End Sub
|
||||
|
||||
Private Sub cmdReload_Click()
|
||||
Call ClearForm
|
||||
If InStr(lstSounds.List(lstSounds.ListIndex), "(free slot)") = 0 Then
|
||||
Call LoadSoundInfo(lstSounds.ListIndex)
|
||||
Else
|
||||
MsgBox "Free slots do not have a code default."
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
Call WriteSound(False)
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call Reload
|
||||
End Sub
|
||||
|
||||
Private Sub ClearForm()
|
||||
cmbPriority.Text = ""
|
||||
chkSingularity.Value = 0
|
||||
chkOutside.Value = 0
|
||||
chkMultiple.Value = 0
|
||||
chkFourEx.Value = 0
|
||||
chkEightEx.Value = 0
|
||||
chkTotallySingle.Value = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Reload()
|
||||
Call ClearForm
|
||||
Call LoadCode
|
||||
lstSounds.ListIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCode()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
Dim addstring As String
|
||||
Dim i As Integer, numfreeslots As Integer
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("sounds.h", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "List of sounds (don't modify this comment!)") = 0
|
||||
Loop
|
||||
|
||||
ts.SkipLine ' typedef enum
|
||||
ts.SkipLine ' {
|
||||
|
||||
line = ts.ReadLine
|
||||
number = 0
|
||||
|
||||
lstSounds.Clear
|
||||
|
||||
Do While InStr(line, "sfx_freeslot0") = 0
|
||||
startclip = InStr(line, "sfx_")
|
||||
If InStr(line, "sfx_") <> 0 Then
|
||||
endclip = InStr(line, ",")
|
||||
line = Mid(line, startclip, endclip - startclip)
|
||||
addstring = number & " - " & line
|
||||
lstSounds.AddItem addstring
|
||||
number = number + 1
|
||||
End If
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
|
||||
'Populate the free slots!
|
||||
numfreeslots = 800
|
||||
|
||||
For i = 1 To numfreeslots
|
||||
If i < 10 Then
|
||||
addstring = number & " - " & "sfx_fre00" & i & " (free slot)"
|
||||
ElseIf i < 100 Then
|
||||
addstring = number & " - " & "sfx_fre0" & i & " (free slot)"
|
||||
Else
|
||||
addstring = number & " - " & "sfx_fre" & i & " (free slot)"
|
||||
End If
|
||||
lstSounds.AddItem addstring
|
||||
number = number + 1
|
||||
Next
|
||||
|
||||
For i = 0 To 127
|
||||
cmbPriority.AddItem i
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub lstSounds_Click()
|
||||
Call ClearForm
|
||||
If InStr(lstSounds.List(lstSounds.ListIndex), "(free slot)") = 0 Then
|
||||
Call LoadSoundInfo(lstSounds.ListIndex)
|
||||
End If
|
||||
Call LoadSOCSoundInfo(lstSounds.ListIndex)
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSOCSoundInfo(SoundNum As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
SOCLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo SOCLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo SOCLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo SOCLoad
|
||||
|
||||
word = FirstToken(line)
|
||||
word2 = SecondToken(line)
|
||||
|
||||
If UCase(word) = "SOUND" And Val(word2) = SoundNum Then
|
||||
Do While Len(line) > 0 And Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondTokenEqual(line))
|
||||
|
||||
If word = "SINGULAR" Then
|
||||
If Val(word2) = 1 Then
|
||||
chkSingularity.Value = 1
|
||||
Else
|
||||
chkSingularity.Value = 0
|
||||
End If
|
||||
ElseIf word = "PRIORITY" Then
|
||||
cmbPriority.Text = Val(word2)
|
||||
ElseIf word = "FLAGS" Then
|
||||
ProcessSoundFlags (Val(word2))
|
||||
ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then
|
||||
MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line
|
||||
End If
|
||||
Loop
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSoundInfo(StateNum As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
Dim token As String
|
||||
Dim frame As Long
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("sounds.c", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "S_sfx[0] needs to be a dummy for odd reasons.") = 0
|
||||
Loop
|
||||
|
||||
number = 0
|
||||
|
||||
Do While number <> StateNum
|
||||
Do While InStr(ts.ReadLine, """") = 0
|
||||
Loop
|
||||
number = number + 1
|
||||
Loop
|
||||
|
||||
Do While InStr(line, """") = 0
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
startclip = InStr(line, """") + 1
|
||||
line = Mid(line, startclip, Len(line) - startclip)
|
||||
endclip = InStr(line, """") - 1
|
||||
token = TrimComplete(Left(line, endclip))
|
||||
|
||||
'txtName.Text = line
|
||||
|
||||
startclip = InStr(line, ",") + 1
|
||||
line = Mid(line, startclip, Len(line) - startclip)
|
||||
endclip = InStr(line, ",") - 1
|
||||
token = TrimComplete(Left(line, endclip))
|
||||
|
||||
If token = "true" Then
|
||||
chkSingularity.Value = 1
|
||||
Else
|
||||
chkSingularity.Value = 0
|
||||
End If
|
||||
|
||||
startclip = InStr(line, ",") + 1
|
||||
line = Mid(line, startclip, Len(line) - startclip)
|
||||
endclip = InStr(line, ",") - 1
|
||||
token = TrimComplete(Left(line, endclip))
|
||||
cmbPriority.Text = token
|
||||
|
||||
startclip = InStr(line, ",") + 1
|
||||
line = Mid(line, startclip, Len(line) - startclip)
|
||||
endclip = InStr(line, ",") - 1
|
||||
token = TrimComplete(Left(line, endclip))
|
||||
|
||||
ProcessSoundFlags (Val(token))
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub ProcessSoundFlags(flags As Long)
|
||||
|
||||
chkTotallySingle.Value = 0
|
||||
chkMultiple.Value = 0
|
||||
chkOutside.Value = 0
|
||||
chkFourEx.Value = 0
|
||||
chkEightEx.Value = 0
|
||||
|
||||
If flags = -1 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If flags And 1 Then
|
||||
chkTotallySingle.Value = 1
|
||||
End If
|
||||
|
||||
If flags And 2 Then
|
||||
chkMultiple.Value = 1
|
||||
End If
|
||||
|
||||
If flags And 4 Then
|
||||
chkOutside.Value = 1
|
||||
End If
|
||||
|
||||
If flags And 8 Then
|
||||
chkFourEx.Value = 1
|
||||
End If
|
||||
|
||||
If flags And 16 Then
|
||||
chkEightEx.Value = 1
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub WriteSound(Remove As Boolean)
|
||||
Dim myFSOSource As New Scripting.FileSystemObject
|
||||
Dim tsSource As TextStream
|
||||
Dim myFSOTarget As New Scripting.FileSystemObject
|
||||
Dim tsTarget As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
Dim flags As Long
|
||||
Dim soundfound As Boolean
|
||||
|
||||
soundfound = False
|
||||
|
||||
Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False)
|
||||
Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True)
|
||||
|
||||
Do While Not tsSource.AtEndOfStream
|
||||
line = tsSource.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
'If the current sound exists in the SOC, delete it.
|
||||
If word = "SOUND" And Val(word2) = lstSounds.ListIndex Then
|
||||
soundfound = True
|
||||
Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream)
|
||||
Loop
|
||||
Else
|
||||
tsTarget.WriteLine line
|
||||
End If
|
||||
Loop
|
||||
|
||||
tsSource.Close
|
||||
Set myFSOSource = Nothing
|
||||
|
||||
If Remove = False Then
|
||||
If line <> "" Then tsTarget.WriteLine ""
|
||||
|
||||
tsTarget.WriteLine "SOUND " & lstSounds.ListIndex
|
||||
cmbPriority.Text = TrimComplete(cmbPriority.Text)
|
||||
If cmbPriority.Text <> "" Then tsTarget.WriteLine "PRIORITY = " & Val(cmbPriority.Text)
|
||||
If chkSingularity.Value = 1 Then tsTarget.WriteLine "SINGULAR = 1"
|
||||
|
||||
flags = 0
|
||||
|
||||
If chkOutside.Value = 1 Then flags = flags + Val(chkOutside.Tag)
|
||||
If chkMultiple.Value = 1 Then flags = flags + Val(chkMultiple.Tag)
|
||||
If chkFourEx.Value = 1 Then flags = flags + Val(chkFourEx.Tag)
|
||||
If chkEightEx.Value = 1 Then flags = flags + Val(chkEightEx.Tag)
|
||||
If chkTotallySingle.Value = 1 Then flags = flags + Val(chkTotallySingle.Tag)
|
||||
|
||||
If flags > 0 Then tsTarget.WriteLine "FLAGS = " & flags
|
||||
End If
|
||||
|
||||
tsTarget.Close
|
||||
Set myFSOTarget = Nothing
|
||||
|
||||
FileCopy SOCTemp, SOCFile
|
||||
|
||||
Kill SOCTemp
|
||||
|
||||
If Remove = True Then
|
||||
If soundfound = True Then
|
||||
MsgBox "Sound removed from SOC."
|
||||
Else
|
||||
MsgBox "Sound not found in SOC."
|
||||
End If
|
||||
Else
|
||||
MsgBox "Sound Saved."
|
||||
End If
|
||||
End Sub
|
||||
|
Binary file not shown.
|
@ -1,940 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmStateEdit
|
||||
Caption = "State Edit"
|
||||
ClientHeight = 6750
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 8970
|
||||
Icon = "frmStateEdit.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
ScaleHeight = 6750
|
||||
ScaleWidth = 8970
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.TextBox lblVar2Desc
|
||||
Height = 495
|
||||
Left = 4440
|
||||
Locked = -1 'True
|
||||
MultiLine = -1 'True
|
||||
ScrollBars = 2 'Vertical
|
||||
TabIndex = 25
|
||||
Top = 3000
|
||||
Width = 4455
|
||||
End
|
||||
Begin VB.TextBox lblVar1Desc
|
||||
Height = 495
|
||||
Left = 4440
|
||||
Locked = -1 'True
|
||||
MultiLine = -1 'True
|
||||
ScrollBars = 2 'Vertical
|
||||
TabIndex = 24
|
||||
Top = 2400
|
||||
Width = 4455
|
||||
End
|
||||
Begin VB.TextBox lblActionDesc
|
||||
Height = 735
|
||||
Left = 4440
|
||||
Locked = -1 'True
|
||||
MultiLine = -1 'True
|
||||
ScrollBars = 2 'Vertical
|
||||
TabIndex = 23
|
||||
Top = 1560
|
||||
Width = 4455
|
||||
End
|
||||
Begin VB.ListBox lstThings
|
||||
Height = 450
|
||||
ItemData = "frmStateEdit.frx":0442
|
||||
Left = 7440
|
||||
List = "frmStateEdit.frx":0444
|
||||
TabIndex = 22
|
||||
Top = 6120
|
||||
Visible = 0 'False
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.TextBox txtFuncVar2
|
||||
Height = 285
|
||||
Left = 7200
|
||||
TabIndex = 19
|
||||
Top = 3600
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.TextBox txtFuncVar1
|
||||
Height = 285
|
||||
Left = 5520
|
||||
TabIndex = 18
|
||||
Top = 3600
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdCopy
|
||||
Caption = "&Copy state to..."
|
||||
Height = 495
|
||||
Left = 6120
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 17
|
||||
Top = 6120
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "&Delete State from SOC"
|
||||
Height = 495
|
||||
Left = 6120
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 16
|
||||
Top = 5520
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdReload
|
||||
Caption = "&Load Code Default"
|
||||
Height = 495
|
||||
Left = 4920
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 15
|
||||
Top = 5520
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
Height = 495
|
||||
Left = 7320
|
||||
TabIndex = 14
|
||||
Top = 5520
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.ComboBox cmbTranslucency
|
||||
Height = 315
|
||||
ItemData = "frmStateEdit.frx":0446
|
||||
Left = 6720
|
||||
List = "frmStateEdit.frx":045C
|
||||
TabIndex = 12
|
||||
Top = 5040
|
||||
Width = 1695
|
||||
End
|
||||
Begin VB.CheckBox chkFullbright
|
||||
Caption = "Make sprite full-brightness (unaffected by lighting)"
|
||||
Height = 495
|
||||
Left = 6240
|
||||
TabIndex = 11
|
||||
Top = 4440
|
||||
Width = 2175
|
||||
End
|
||||
Begin VB.ComboBox cmbNextstate
|
||||
Height = 315
|
||||
Left = 6120
|
||||
TabIndex = 9
|
||||
Top = 3960
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.ComboBox cmbAction
|
||||
Height = 315
|
||||
Left = 6000
|
||||
TabIndex = 7
|
||||
Top = 1200
|
||||
Width = 2295
|
||||
End
|
||||
Begin VB.TextBox txtTics
|
||||
Height = 285
|
||||
Left = 7800
|
||||
TabIndex = 5
|
||||
Top = 720
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtFrame
|
||||
Height = 285
|
||||
Left = 5880
|
||||
MaxLength = 2
|
||||
TabIndex = 3
|
||||
Top = 720
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.ComboBox cmbSprite
|
||||
Height = 315
|
||||
Left = 5880
|
||||
TabIndex = 1
|
||||
Top = 120
|
||||
Width = 2415
|
||||
End
|
||||
Begin VB.ListBox lstStates
|
||||
Height = 6495
|
||||
Left = 120
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 4215
|
||||
End
|
||||
Begin VB.Label lblFuncVar2
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Var2:"
|
||||
Height = 255
|
||||
Left = 6600
|
||||
TabIndex = 21
|
||||
Top = 3600
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.Label lblFuncVar1
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Var1:"
|
||||
Height = 255
|
||||
Left = 4920
|
||||
TabIndex = 20
|
||||
Top = 3600
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.Label lblTranslucency
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Translucency:"
|
||||
Height = 255
|
||||
Left = 5520
|
||||
TabIndex = 13
|
||||
Top = 5040
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.Label lblNextstate
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Next State:"
|
||||
Height = 255
|
||||
Left = 5160
|
||||
TabIndex = 10
|
||||
Top = 3960
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.Label lblAction
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Function to Call:"
|
||||
Height = 375
|
||||
Left = 5040
|
||||
TabIndex = 8
|
||||
Top = 1080
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.Label lblTics
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Tics (-1 for infinite duration):"
|
||||
Height = 495
|
||||
Left = 6480
|
||||
TabIndex = 6
|
||||
Top = 600
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.Label lblFrame
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Frame:"
|
||||
Height = 255
|
||||
Left = 5160
|
||||
TabIndex = 4
|
||||
Top = 720
|
||||
Width = 615
|
||||
End
|
||||
Begin VB.Label lblSprite
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Sprite:"
|
||||
Height = 255
|
||||
Left = 5160
|
||||
TabIndex = 2
|
||||
Top = 120
|
||||
Width = 615
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmStateEdit"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmbAction_Click()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim index As Integer
|
||||
Dim ActionName As String
|
||||
|
||||
ActionName = cmbAction.List(cmbAction.ListIndex)
|
||||
|
||||
If cmbAction.ListIndex = 0 Then
|
||||
lblActionDesc.Text = ""
|
||||
lblVar1Desc.Text = ""
|
||||
lblVar2Desc.Text = ""
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("p_enemy.c", ForReading, False)
|
||||
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Mid(line, 4, 9) = "Function:" And InStr(line, ActionName) > 0 Then
|
||||
ts.ReadLine ' //
|
||||
line = ts.ReadLine ' // Description:
|
||||
index = InStr(line, ":")
|
||||
lblActionDesc.Text = Mid(line, index + 2, Len(line) - (index + 1))
|
||||
|
||||
ts.ReadLine ' //
|
||||
line = ts.ReadLine ' // var1 =
|
||||
If InStr(line, "var1:") Then
|
||||
lblVar1Desc.Text = Mid(line, 4, Len(line) - 3)
|
||||
line = ts.ReadLine
|
||||
Do While Left(line, 7) <> "// var2"
|
||||
lblVar1Desc.Text = lblVar1Desc.Text & vbCrLf & TrimComplete(Mid(line, 4, Len(line) - 3))
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
Else
|
||||
lblVar1Desc.Text = Mid(line, 4, Len(line) - 3)
|
||||
End If
|
||||
|
||||
If Left(line, 7) <> "// var2" Then
|
||||
line = ts.ReadLine ' // var2 =
|
||||
End If
|
||||
|
||||
If InStr(line, "var2:") Then
|
||||
lblVar2Desc.Text = Mid(line, 4, Len(line) - 3)
|
||||
line = ts.ReadLine
|
||||
Do While Len(line) > 4
|
||||
lblVar2Desc.Text = lblVar2Desc.Text & vbCrLf & TrimComplete(Mid(line, 4, Len(line) - 3))
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
Else
|
||||
lblVar2Desc.Text = Mid(line, 4, Len(line) - 3)
|
||||
End If
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub cmdCopy_Click()
|
||||
Dim Response As String
|
||||
|
||||
Response$ = InputBox("Copy state to #:", "Copy State")
|
||||
|
||||
If Response = "" Then Exit Sub
|
||||
|
||||
Response = TrimComplete(Response)
|
||||
|
||||
Call WriteState(False, Val(Response))
|
||||
|
||||
MsgBox "State copied to #" & Val(Response)
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
Call WriteState(True, lstStates.ListIndex)
|
||||
End Sub
|
||||
|
||||
Private Sub cmdReload_Click()
|
||||
Call ClearForm
|
||||
|
||||
If InStr(lstStates.List(lstStates.ListIndex), "S_FREESLOT") = 0 Then
|
||||
LoadStateInfo (lstStates.ListIndex)
|
||||
Else
|
||||
MsgBox "Free slots do not have a code default."
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
If TrimComplete(txtFrame.Text) = "" And (chkFullbright.Value = 1 Or cmbTranslucency.ListIndex > 0) Then
|
||||
MsgBox "ERROR: Frame field required for fullbright/translucency."
|
||||
Exit Sub
|
||||
End If
|
||||
Call WriteState(False, lstStates.ListIndex)
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call Reload
|
||||
lstStates.ListIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub ClearForm()
|
||||
cmbNextstate.Text = ""
|
||||
cmbSprite.Text = ""
|
||||
txtFrame.Text = ""
|
||||
cmbAction.Text = ""
|
||||
txtFuncVar1.Text = ""
|
||||
txtFuncVar2.Text = ""
|
||||
lblActionDesc.Text = ""
|
||||
lblVar1Desc.Text = ""
|
||||
lblVar2Desc.Text = ""
|
||||
chkFullbright.Value = False
|
||||
cmbTranslucency.ListIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Reload()
|
||||
LoadStates
|
||||
LoadSprites
|
||||
LoadActions
|
||||
End Sub
|
||||
|
||||
Private Sub LoadStates()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
Dim addstring As String
|
||||
Dim numfreeslots As Integer, i As Integer
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("info.h", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "Object states (don't modify this comment!)") = 0
|
||||
Loop
|
||||
|
||||
ts.SkipLine ' typedef enum
|
||||
ts.SkipLine ' {
|
||||
|
||||
line = ts.ReadLine
|
||||
number = 0
|
||||
|
||||
lstStates.Clear
|
||||
|
||||
Do While InStr(line, "S_FIRSTFREESLOT") = 0
|
||||
startclip = InStr(line, "S_")
|
||||
If InStr(line, "S_") <> 0 Then
|
||||
endclip = InStr(line, ",")
|
||||
line = Mid(line, startclip, endclip - startclip)
|
||||
addstring = number & " - " & line
|
||||
lstStates.AddItem addstring
|
||||
cmbNextstate.AddItem addstring
|
||||
number = number + 1
|
||||
End If
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
|
||||
'Populate the free slots!
|
||||
Set ts = myFSO.OpenTextFile("info.h", ForReading, False)
|
||||
|
||||
line = ts.ReadLine
|
||||
Do While InStr(line, "#define NUMMOBJFREESLOTS") = 0
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
startclip = InStr(line, "SLOTS ") + 6
|
||||
numfreeslots = Val(Mid(line, startclip, Len(line) - startclip + 1)) * 6
|
||||
|
||||
For i = 1 To numfreeslots
|
||||
addstring = number & " - " & "S_FREESLOT" & i
|
||||
lstStates.AddItem addstring
|
||||
cmbNextstate.AddItem addstring
|
||||
number = number + 1
|
||||
Next
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSprites()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
Dim addstring As String
|
||||
Dim numfreeslots As Integer, i As Integer
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("info.h", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "Hey, moron! If you change this table, don't forget about") = 0
|
||||
Loop
|
||||
|
||||
ts.SkipLine ' typedef enum
|
||||
ts.SkipLine ' {
|
||||
|
||||
line = ts.ReadLine
|
||||
number = 0
|
||||
|
||||
cmbSprite.Clear
|
||||
|
||||
Do While InStr(line, "SPR_FIRSTFREESLOT") = 0
|
||||
startclip = InStr(line, "SPR_")
|
||||
If InStr(line, "SPR_") <> 0 Then
|
||||
endclip = InStr(line, ",")
|
||||
line = Mid(line, startclip, endclip - startclip)
|
||||
addstring = number & " - " & line
|
||||
cmbSprite.AddItem addstring
|
||||
number = number + 1
|
||||
End If
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
|
||||
'Populate the free slots!
|
||||
Set ts = myFSO.OpenTextFile("info.h", ForReading, False)
|
||||
|
||||
line = ts.ReadLine
|
||||
Do While InStr(line, "#define NUMMOBJFREESLOTS") = 0
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
startclip = InStr(line, "SLOTS ") + 6
|
||||
numfreeslots = Val(Mid(line, startclip, Len(line) - startclip + 1))
|
||||
|
||||
For i = 1 To numfreeslots
|
||||
If i < 10 Then
|
||||
addstring = number & " - " & "SPR_F00" & i & " (Free slot)"
|
||||
ElseIf i < 100 Then
|
||||
addstring = number & " - " & "SPR_F0" & i & " (Free slot)"
|
||||
Else
|
||||
addstring = number & " - " & "SPR_F" & i & " (Free slot)"
|
||||
End If
|
||||
|
||||
cmbSprite.AddItem addstring
|
||||
number = number + 1
|
||||
Next
|
||||
|
||||
ts.Close
|
||||
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub LoadActions()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
Dim addstring As String
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("dehacked.c", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "actionpointer_t actionpointers[]") = 0
|
||||
Loop
|
||||
|
||||
ts.SkipLine ' {
|
||||
|
||||
line = ts.ReadLine
|
||||
number = 0
|
||||
|
||||
cmbAction.Clear
|
||||
|
||||
cmbAction.AddItem "None"
|
||||
|
||||
Do While InStr(line, "NULL") = 0
|
||||
startclip = InStr(line, "A_")
|
||||
If InStr(line, "A_") <> 0 Then
|
||||
endclip = InStr(line, "}")
|
||||
line = Mid(line, startclip, endclip - startclip)
|
||||
cmbAction.AddItem line
|
||||
number = number + 1
|
||||
End If
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub lstStates_Click()
|
||||
Call ClearForm
|
||||
|
||||
If InStr(lstStates.List(lstStates.ListIndex), "S_FREESLOT") = 0 Then
|
||||
LoadStateInfo (lstStates.ListIndex)
|
||||
End If
|
||||
|
||||
LoadSOCStateInfo (lstStates.ListIndex)
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSOCStateInfo(StateNum As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
Dim frameNum As Long
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
SOCLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo SOCLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo SOCLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo SOCLoad
|
||||
|
||||
word = FirstToken(line)
|
||||
word2 = SecondToken(line)
|
||||
|
||||
If UCase(word) = "FRAME" And Val(word2) = StateNum Then
|
||||
Do While Len(line) > 0 And Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondTokenEqual(line))
|
||||
|
||||
If word = "SPRITENUMBER" Then
|
||||
cmbSprite.ListIndex = Val(word2)
|
||||
ElseIf word = "SPRITESUBNUMBER" Then
|
||||
frameNum = Val(word2)
|
||||
|
||||
If frameNum >= 327680 Then ' 5 << 16
|
||||
cmbTranslucency.ListIndex = 5
|
||||
frameNum = frameNum And Not 327680
|
||||
ElseIf frameNum >= 262144 Then ' 4 << 16
|
||||
cmbTranslucency.ListIndex = 4
|
||||
frameNum = frameNum And Not 262144
|
||||
ElseIf frameNum >= 196608 Then ' 3 << 16
|
||||
cmbTranslucency.ListIndex = 3
|
||||
frameNum = frameNum And Not 196608
|
||||
ElseIf frameNum >= 131072 Then ' 2 << 16
|
||||
cmbTranslucency.ListIndex = 2
|
||||
frameNum = frameNum And Not 131072
|
||||
ElseIf frameNum >= 65536 Then ' 1 << 16
|
||||
cmbTranslucency.ListIndex = 1
|
||||
frameNum = frameNum And Not 65536
|
||||
End If
|
||||
|
||||
If frameNum >= 32768 Then
|
||||
chkFullbright.Value = 1
|
||||
frameNum = frameNum And Not 32768
|
||||
Else
|
||||
chkFullbright.Value = 0
|
||||
End If
|
||||
|
||||
txtFrame.Text = frameNum
|
||||
ElseIf word = "DURATION" Then
|
||||
txtTics.Text = Val(word2)
|
||||
ElseIf word = "NEXT" Then
|
||||
cmbNextstate.ListIndex = Val(word2)
|
||||
ElseIf word = "ACTION" Then
|
||||
Call FindComboIndex(cmbAction, UCase(SecondToken(line)))
|
||||
ElseIf word = "VAR1" Then
|
||||
txtFuncVar1.Text = Val(word2)
|
||||
ElseIf word = "VAR2" Then
|
||||
txtFuncVar2.Text = Val(word2)
|
||||
ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then
|
||||
MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line
|
||||
End If
|
||||
Loop
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub LoadStateInfo(StateNum As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
Dim token As String
|
||||
Dim frame As Long
|
||||
Dim templine As String
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("info.c", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "Keep this comment directly above S_NULL") = 0
|
||||
Loop
|
||||
|
||||
number = 0
|
||||
|
||||
Do While number <> StateNum
|
||||
Do While InStr(ts.ReadLine, "SPR_") = 0
|
||||
Loop
|
||||
number = number + 1
|
||||
Loop
|
||||
|
||||
Do While InStr(line, "SPR_") = 0
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
startclip = InStr(line, "SPR_")
|
||||
line = Mid(line, startclip, Len(line) - startclip)
|
||||
endclip = InStr(line, ",") - 1
|
||||
token = Left(line, endclip)
|
||||
Call FindComboIndex(cmbSprite, token)
|
||||
|
||||
startclip = InStr(line, ",") + 1
|
||||
line = TrimComplete(Mid(line, startclip, Len(line) - startclip))
|
||||
endclip = InStr(line, ",") - 1
|
||||
frame = Val(Left(line, endclip))
|
||||
|
||||
If frame >= 32768 Then
|
||||
chkFullbright.Value = 1
|
||||
frame = frame - 32768
|
||||
Else
|
||||
chkFullbright.Value = 0
|
||||
End If
|
||||
|
||||
txtFrame.Text = frame
|
||||
|
||||
cmbTranslucency.ListIndex = 0
|
||||
|
||||
startclip = InStr(line, ",") + 1
|
||||
line = TrimComplete(Mid(line, startclip, Len(line) - startclip))
|
||||
endclip = InStr(line, ",") - 1
|
||||
txtTics.Text = Val(Left(line, endclip))
|
||||
|
||||
startclip = InStr(line, "{") + 1
|
||||
line = TrimComplete(Mid(line, startclip, Len(line) - startclip))
|
||||
endclip = InStr(line, "}") - 1
|
||||
cmbAction.Text = TrimComplete(Left(line, endclip))
|
||||
If cmbAction.Text = "NULL" Then cmbAction.Text = "None"
|
||||
|
||||
startclip = InStr(line, ",") + 1
|
||||
line = TrimComplete(Mid(line, startclip, Len(line) - startclip))
|
||||
endclip = InStr(line, ",") - 1
|
||||
templine = Left(line, endclip)
|
||||
|
||||
templine = TrimComplete(templine)
|
||||
'Check for *FRACUNIT values
|
||||
endclip = InStr(templine, "*FRACUNIT")
|
||||
If endclip <> 0 Then
|
||||
templine = Left(templine, endclip - 1)
|
||||
templine = Val(templine) * 65536
|
||||
End If
|
||||
'Check for crazy-odd MT_ usage
|
||||
endclip = InStr(templine, "MT_")
|
||||
If endclip <> 0 Then
|
||||
templine = FindThingNum(templine) & " - " & templine
|
||||
End If
|
||||
'Check for crazy-odd pw_ usage
|
||||
endclip = InStr(templine, "pw_")
|
||||
If endclip <> 0 Then
|
||||
templine = FindPowerNum(templine) & " - " & templine
|
||||
End If
|
||||
txtFuncVar1.Text = templine
|
||||
|
||||
startclip = InStr(line, ",") + 1
|
||||
line = TrimComplete(Mid(line, startclip, Len(line) - startclip))
|
||||
endclip = InStr(line, ",") - 1
|
||||
templine = Left(line, endclip)
|
||||
|
||||
templine = TrimComplete(templine)
|
||||
'Check for *FRACUNIT values
|
||||
endclip = InStr(templine, "*FRACUNIT")
|
||||
If endclip <> 0 Then
|
||||
templine = Left(templine, endclip - 1)
|
||||
templine = Val(templine) * 65536
|
||||
End If
|
||||
'Check for crazy-odd MT_ usage
|
||||
endclip = InStr(templine, "MT_")
|
||||
If endclip <> 0 Then
|
||||
templine = FindThingNum(templine) & " - " & templine
|
||||
End If
|
||||
'Check for crazy-odd pw_ usage
|
||||
endclip = InStr(templine, "pw_")
|
||||
If endclip <> 0 Then
|
||||
templine = FindPowerNum(templine) & " - " & templine
|
||||
End If
|
||||
txtFuncVar2.Text = templine
|
||||
|
||||
startclip = InStr(line, ",") + 1
|
||||
line = TrimComplete(Mid(line, startclip, Len(line) - startclip))
|
||||
endclip = InStr(line, "}") - 1
|
||||
Call FindComboIndex(cmbNextstate, TrimComplete(Left(line, endclip)))
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub FindComboIndex(ByRef Box As ComboBox, line As String)
|
||||
Dim i As Integer
|
||||
|
||||
For i = 0 To Box.ListCount
|
||||
If InStr(UCase(Box.List(i)), UCase(line)) Then
|
||||
Box.ListIndex = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub WriteState(Remove As Boolean, num As Integer)
|
||||
Dim myFSOSource As New Scripting.FileSystemObject
|
||||
Dim tsSource As TextStream
|
||||
Dim myFSOTarget As New Scripting.FileSystemObject
|
||||
Dim tsTarget As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
Dim flags As Long
|
||||
Dim statefound As Boolean
|
||||
|
||||
statefound = False
|
||||
|
||||
Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False)
|
||||
Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True)
|
||||
|
||||
Do While Not tsSource.AtEndOfStream
|
||||
line = tsSource.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
'If the current sound exists in the SOC, delete it.
|
||||
If word = "FRAME" And Val(word2) = num Then
|
||||
statefound = True
|
||||
Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not (tsSource.AtEndOfStream)
|
||||
Loop
|
||||
Else
|
||||
tsTarget.WriteLine line
|
||||
End If
|
||||
Loop
|
||||
|
||||
tsSource.Close
|
||||
Set myFSOSource = Nothing
|
||||
|
||||
If Remove = False Then
|
||||
If line <> "" Then tsTarget.WriteLine ""
|
||||
|
||||
tsTarget.WriteLine "FRAME " & num
|
||||
cmbSprite.Text = TrimComplete(cmbSprite.Text)
|
||||
txtFrame.Text = TrimComplete(txtFrame.Text)
|
||||
txtTics.Text = TrimComplete(txtTics.Text)
|
||||
cmbAction.Text = TrimComplete(cmbAction.Text)
|
||||
txtFuncVar1.Text = TrimComplete(txtFuncVar1.Text)
|
||||
txtFuncVar2.Text = TrimComplete(txtFuncVar2.Text)
|
||||
cmbNextstate.Text = TrimComplete(cmbNextstate.Text)
|
||||
cmbTranslucency.Text = TrimComplete(cmbTranslucency.Text)
|
||||
|
||||
If cmbSprite.Text <> "" Then tsTarget.WriteLine "SPRITENUMBER = " & cmbSprite.ListIndex
|
||||
|
||||
flags = Val(txtFrame.Text)
|
||||
If chkFullbright.Value = 1 Then flags = flags + 32768
|
||||
|
||||
' Grrr VB doesn't have bitshifts!!
|
||||
If cmbTranslucency.Text <> "" Then
|
||||
flags = flags + cmbTranslucency.ListIndex * 65536
|
||||
End If
|
||||
|
||||
If txtFrame.Text <> "" Then tsTarget.WriteLine "SPRITESUBNUMBER = " & flags
|
||||
If txtTics.Text <> "" Then tsTarget.WriteLine "DURATION = " & Val(txtTics.Text)
|
||||
If cmbNextstate.Text <> "" Then tsTarget.WriteLine "NEXT = " & cmbNextstate.ListIndex
|
||||
If cmbAction.Text <> "" Then tsTarget.WriteLine "ACTION " & cmbAction.Text
|
||||
If txtFuncVar1.Text <> "" Then tsTarget.WriteLine "VAR1 = " & Val(txtFuncVar1.Text)
|
||||
If txtFuncVar2.Text <> "" Then tsTarget.WriteLine "VAR2 = " & Val(txtFuncVar2.Text)
|
||||
End If
|
||||
|
||||
tsTarget.Close
|
||||
Set myFSOTarget = Nothing
|
||||
|
||||
FileCopy SOCTemp, SOCFile
|
||||
|
||||
Kill SOCTemp
|
||||
|
||||
If Remove = True Then
|
||||
If statefound = True Then
|
||||
MsgBox "State removed from SOC."
|
||||
Else
|
||||
MsgBox "State not found in SOC."
|
||||
End If
|
||||
Else
|
||||
MsgBox "State Saved."
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadThings()
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer, endclip As Integer
|
||||
Dim numfreeslots As Integer, i As Integer
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("info.h", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "Little flag for SOC editor (don't change this comment!)") = 0
|
||||
Loop
|
||||
|
||||
ts.SkipLine ' typedef enum
|
||||
ts.SkipLine ' {
|
||||
|
||||
line = ts.ReadLine
|
||||
number = 0
|
||||
|
||||
lstThings.Clear
|
||||
|
||||
Do While InStr(line, "MT_FIRSTFREESLOT") = 0
|
||||
startclip = InStr(line, "MT_")
|
||||
If InStr(line, "MT_") <> 0 Then
|
||||
endclip = InStr(line, ",")
|
||||
line = Mid(line, startclip, endclip - startclip)
|
||||
lstThings.AddItem number & " - " & line
|
||||
number = number + 1
|
||||
End If
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
|
||||
'Populate the free slots!
|
||||
Set ts = myFSO.OpenTextFile("info.h", ForReading, False)
|
||||
|
||||
line = ts.ReadLine
|
||||
Do While InStr(line, "#define NUMMOBJFREESLOTS") = 0
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
startclip = InStr(line, "SLOTS ") + 6
|
||||
numfreeslots = Val(Mid(line, startclip, Len(line) - startclip + 1))
|
||||
|
||||
For i = 1 To numfreeslots
|
||||
lstThings.AddItem number & " - " & "MT_FREESLOT" & i
|
||||
number = number + 1
|
||||
Next
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Function FindThingNum(ThingName As String) As Integer
|
||||
Dim i As Integer
|
||||
Dim temp As String
|
||||
Dim startpoint As Integer
|
||||
Dim endpoint As Integer
|
||||
|
||||
lstThings.Clear
|
||||
LoadThings
|
||||
|
||||
For i = 0 To lstThings.ListCount - 1
|
||||
temp = lstThings.List(i)
|
||||
startpoint = InStr(temp, "-") + 2
|
||||
endpoint = Len(temp) - startpoint + 1
|
||||
temp = Mid(temp, startpoint, endpoint)
|
||||
If temp = ThingName Then
|
||||
FindThingNum = Val(lstThings.List(i))
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Function
|
||||
|
||||
Private Function FindPowerNum(PowerName As String) As Integer
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim number As Integer
|
||||
Dim startclip As Integer
|
||||
|
||||
ChDir SourcePath
|
||||
Set ts = myFSO.OpenTextFile("d_player.h", ForReading, False)
|
||||
|
||||
Do While InStr(ts.ReadLine, "Player powers. (don't edit this comment)") = 0
|
||||
Loop
|
||||
|
||||
ts.SkipLine ' typedef enum
|
||||
ts.SkipLine ' {
|
||||
|
||||
line = ts.ReadLine
|
||||
number = 0
|
||||
|
||||
Do While InStr(line, "NUMPOWERS") = 0
|
||||
startclip = InStr(line, PowerName)
|
||||
If startclip <> 0 Then
|
||||
FindPowerNum = number
|
||||
Exit Do
|
||||
End If
|
||||
number = number + 1
|
||||
line = ts.ReadLine
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Function
|
Binary file not shown.
|
@ -1,391 +0,0 @@
|
|||
VERSION 5.00
|
||||
Begin VB.Form frmUnlockablesEdit
|
||||
Caption = "Unlockables Edit"
|
||||
ClientHeight = 3675
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 8130
|
||||
Icon = "frmUnlockablesEdit.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
ScaleHeight = 3675
|
||||
ScaleWidth = 8130
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CheckBox chkGrade
|
||||
Caption = "Must have beaten Ultimate"
|
||||
Height = 255
|
||||
Index = 4
|
||||
Left = 5400
|
||||
TabIndex = 20
|
||||
Tag = "1024"
|
||||
Top = 2160
|
||||
Width = 2655
|
||||
End
|
||||
Begin VB.CheckBox chkGrade
|
||||
Caption = "Must have beaten Very Hard"
|
||||
Height = 255
|
||||
Index = 3
|
||||
Left = 5400
|
||||
TabIndex = 19
|
||||
Tag = "128"
|
||||
Top = 1800
|
||||
Width = 2655
|
||||
End
|
||||
Begin VB.CheckBox chkGrade
|
||||
Caption = "Must have all emblems"
|
||||
Height = 255
|
||||
Index = 2
|
||||
Left = 5400
|
||||
TabIndex = 18
|
||||
Tag = "16"
|
||||
Top = 1440
|
||||
Width = 2055
|
||||
End
|
||||
Begin VB.CheckBox chkGrade
|
||||
Caption = "Must have gotten all 7 emeralds"
|
||||
Height = 255
|
||||
Index = 1
|
||||
Left = 5400
|
||||
TabIndex = 17
|
||||
Tag = "8"
|
||||
Top = 1080
|
||||
Width = 2655
|
||||
End
|
||||
Begin VB.CheckBox chkGrade
|
||||
Caption = "Game must be completed"
|
||||
Height = 255
|
||||
Index = 0
|
||||
Left = 5400
|
||||
TabIndex = 16
|
||||
Tag = "1"
|
||||
Top = 720
|
||||
Width = 2175
|
||||
End
|
||||
Begin VB.TextBox txtVar
|
||||
Height = 285
|
||||
Left = 4320
|
||||
TabIndex = 14
|
||||
Top = 2640
|
||||
Width = 615
|
||||
End
|
||||
Begin VB.ComboBox cmbType
|
||||
Height = 315
|
||||
ItemData = "frmUnlockablesEdit.frx":0442
|
||||
Left = 3360
|
||||
List = "frmUnlockablesEdit.frx":044C
|
||||
TabIndex = 12
|
||||
Top = 2160
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.TextBox txtNeededTime
|
||||
Height = 285
|
||||
Left = 4080
|
||||
TabIndex = 10
|
||||
Top = 1680
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.TextBox txtNeededEmblems
|
||||
Height = 285
|
||||
Left = 4440
|
||||
TabIndex = 9
|
||||
Top = 1200
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtObjective
|
||||
Height = 285
|
||||
Left = 3240
|
||||
TabIndex = 7
|
||||
Top = 720
|
||||
Width = 1695
|
||||
End
|
||||
Begin VB.TextBox txtName
|
||||
Height = 285
|
||||
Left = 3240
|
||||
TabIndex = 5
|
||||
Top = 240
|
||||
Width = 1695
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "&Delete from SOC"
|
||||
Height = 375
|
||||
Left = 3480
|
||||
TabIndex = 3
|
||||
Top = 3120
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save Changes"
|
||||
Height = 375
|
||||
Left = 1800
|
||||
TabIndex = 2
|
||||
Top = 3120
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.ListBox lstUnlockables
|
||||
Height = 2985
|
||||
ItemData = "frmUnlockablesEdit.frx":046A
|
||||
Left = 120
|
||||
List = "frmUnlockablesEdit.frx":049B
|
||||
TabIndex = 0
|
||||
Top = 480
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.Label lblNote
|
||||
Caption = "Note: All requirements are combinable."
|
||||
Height = 495
|
||||
Left = 6000
|
||||
TabIndex = 22
|
||||
Top = 2760
|
||||
Width = 1695
|
||||
End
|
||||
Begin VB.Label lblOtherReqs
|
||||
Caption = "Other Requirements:"
|
||||
Height = 255
|
||||
Left = 5400
|
||||
TabIndex = 21
|
||||
Top = 360
|
||||
Width = 1935
|
||||
End
|
||||
Begin VB.Label lblVar
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Map # to warp to:"
|
||||
Height = 255
|
||||
Left = 2880
|
||||
TabIndex = 15
|
||||
Top = 2640
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.Label lblType
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Type of Unlockable:"
|
||||
Height = 255
|
||||
Left = 1800
|
||||
TabIndex = 13
|
||||
Top = 2160
|
||||
Width = 1455
|
||||
End
|
||||
Begin VB.Label lblNeededTime
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Needed time on Time Attack rank (in seconds):"
|
||||
Height = 375
|
||||
Left = 1440
|
||||
TabIndex = 11
|
||||
Top = 1560
|
||||
Width = 2535
|
||||
End
|
||||
Begin VB.Label lblNeededEmblems
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "# of Emblems Needed:"
|
||||
Height = 255
|
||||
Left = 2640
|
||||
TabIndex = 8
|
||||
Top = 1200
|
||||
Width = 1695
|
||||
End
|
||||
Begin VB.Label lblObjective
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Objective:"
|
||||
Height = 255
|
||||
Left = 2400
|
||||
TabIndex = 6
|
||||
Top = 720
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.Label lblName
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Name:"
|
||||
Height = 255
|
||||
Left = 2640
|
||||
TabIndex = 4
|
||||
Top = 240
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.Label lblHUDItems
|
||||
Caption = "Unlockables:"
|
||||
Height = 255
|
||||
Left = 120
|
||||
TabIndex = 1
|
||||
Top = 240
|
||||
Width = 975
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmUnlockablesEdit"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
Call WriteUnlockableItem(True)
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
Call WriteUnlockableItem(False)
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call Reload
|
||||
End Sub
|
||||
|
||||
Private Sub Reload()
|
||||
txtName.Text = ""
|
||||
txtObjective.Text = ""
|
||||
txtNeededEmblems.Text = ""
|
||||
txtNeededTime.Text = ""
|
||||
cmbType.Text = ""
|
||||
txtVar.Text = ""
|
||||
|
||||
Dim i As Integer
|
||||
|
||||
For i = 0 To chkGrade.Count - 1
|
||||
chkGrade(i).Value = 0
|
||||
Next i
|
||||
|
||||
lstUnlockables.ListIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub lstUnlockables_Click()
|
||||
Call ReadSOC(lstUnlockables.ListIndex + 1)
|
||||
End Sub
|
||||
|
||||
Private Sub ReadSOC(UnlockableNum As Integer)
|
||||
Dim myFSO As New Scripting.FileSystemObject
|
||||
Dim ts As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
|
||||
Set ts = myFSO.OpenTextFile(SOCFile, ForReading, False)
|
||||
|
||||
SOCLoad:
|
||||
Do While Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
|
||||
If Left(line, 1) = "#" Then GoTo SOCLoad
|
||||
|
||||
If Left(line, 1) = vbCrLf Then GoTo SOCLoad
|
||||
|
||||
If Len(line) < 1 Then GoTo SOCLoad
|
||||
|
||||
word = FirstToken(line)
|
||||
word2 = SecondToken(line)
|
||||
|
||||
If UCase(word) = "UNLOCKABLE" And Val(word2) = UnlockableNum Then
|
||||
Do While Len(line) > 0 And Not ts.AtEndOfStream
|
||||
line = ts.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondTokenEqual(line))
|
||||
|
||||
If word = "NAME" Then
|
||||
txtName.Text = word2
|
||||
ElseIf word = "OBJECTIVE" Then
|
||||
txtObjective.Text = word2
|
||||
ElseIf word = "NEEDEDEMBLEMS" Then
|
||||
txtNeededEmblems.Text = Val(word2)
|
||||
ElseIf word = "NEEDEDTIME" Then
|
||||
txtNeededTime.Text = Val(word2)
|
||||
ElseIf word = "TYPE" Then
|
||||
cmbType.ListIndex = Val(word2)
|
||||
ElseIf word = "VAR" Then
|
||||
txtVar.Text = Val(word2)
|
||||
ElseIf word = "NEEDEDGRADE" Then
|
||||
Dim i As Integer
|
||||
|
||||
For i = 0 To chkGrade.Count - 1
|
||||
If Val(word2) And chkGrade(i).Tag Then
|
||||
chkGrade(i).Tag = True
|
||||
End If
|
||||
Next i
|
||||
ElseIf Len(line) > 0 And Left(line, 1) <> "#" Then
|
||||
MsgBox "Error in SOC!" & vbCrLf & "Unknown line: " & line
|
||||
End If
|
||||
Loop
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
|
||||
ts.Close
|
||||
Set myFSO = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub WriteUnlockableItem(Remove As Boolean)
|
||||
Dim myFSOSource As New Scripting.FileSystemObject
|
||||
Dim tsSource As TextStream
|
||||
Dim myFSOTarget As New Scripting.FileSystemObject
|
||||
Dim tsTarget As TextStream
|
||||
Dim line As String
|
||||
Dim word As String
|
||||
Dim word2 As String
|
||||
Dim unlockableremoved As Boolean
|
||||
|
||||
unlockableremoved = False
|
||||
|
||||
Set tsSource = myFSOSource.OpenTextFile(SOCFile, ForReading, False)
|
||||
Set tsTarget = myFSOTarget.OpenTextFile(SOCTemp, ForWriting, True)
|
||||
|
||||
Do While Not tsSource.AtEndOfStream
|
||||
line = tsSource.ReadLine
|
||||
word = UCase(FirstToken(line))
|
||||
word2 = UCase(SecondToken(line))
|
||||
|
||||
'If the current item exists in the SOC, delete it.
|
||||
If word = "UNLOCKABLE" And Val(word2) = lstUnlockables.ListIndex + 1 Then
|
||||
unlockableremoved = True
|
||||
Do While Len(TrimComplete(tsSource.ReadLine)) > 0 And Not tsSource.AtEndOfStream
|
||||
Loop
|
||||
Else
|
||||
tsTarget.WriteLine line
|
||||
End If
|
||||
Loop
|
||||
|
||||
tsSource.Close
|
||||
Set myFSOSource = Nothing
|
||||
|
||||
If Remove = False Then
|
||||
If line <> "" Then tsTarget.WriteLine ""
|
||||
|
||||
tsTarget.WriteLine "UNLOCKABLE " & lstUnlockables.ListIndex + 1
|
||||
txtName.Text = TrimComplete(txtName.Text)
|
||||
txtObjective.Text = TrimComplete(txtObjective.Text)
|
||||
txtNeededEmblems.Text = TrimComplete(txtNeededEmblems.Text)
|
||||
txtNeededTime.Text = TrimComplete(txtNeededTime.Text)
|
||||
txtVar.Text = TrimComplete(txtVar.Text)
|
||||
|
||||
If txtName.Text <> "" Then tsTarget.WriteLine "NAME = " & txtName.Text
|
||||
If txtObjective.Text <> "" Then tsTarget.WriteLine "OBJECTIVE = " & txtObjective.Text
|
||||
If txtNeededEmblems.Text <> "" Then tsTarget.WriteLine "NEEDEDEMBLEMS = " & txtNeededEmblems.Text
|
||||
If txtNeededTime.Text <> "" Then tsTarget.WriteLine "NEEDEDTIME = " & txtNeededTime.Text
|
||||
If cmbType.ListIndex <> -1 Then tsTarget.WriteLine "TYPE = " & cmbType.ListIndex
|
||||
If txtVar.Text <> "" Then tsTarget.WriteLine "VAR = " & txtVar.Text
|
||||
|
||||
Dim writegrade As Long
|
||||
Dim i As Integer
|
||||
writegrade = 0
|
||||
|
||||
For i = 0 To chkGrade.Count - 1
|
||||
If chkGrade(i).Value = 1 Then
|
||||
writegrade = writegrade + chkGrade(i).Tag
|
||||
End If
|
||||
Next i
|
||||
|
||||
If writegrade > 0 Then tsTarget.WriteLine "NEEDEDGRADE = " & writegrade
|
||||
End If
|
||||
|
||||
tsTarget.Close
|
||||
Set myFSOTarget = Nothing
|
||||
|
||||
FileCopy SOCTemp, SOCFile
|
||||
|
||||
Kill SOCTemp
|
||||
|
||||
If Remove = True Then
|
||||
If unlockableremoved = True Then
|
||||
MsgBox "Unlockable deleted from SOC."
|
||||
Else
|
||||
MsgBox "Couldn't find Unlockable in SOC."
|
||||
End If
|
||||
Else
|
||||
MsgBox "Unlockable Saved."
|
||||
End If
|
||||
End Sub
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,35 +0,0 @@
|
|||
========================================================================
|
||||
WIN32 APPLICATION : SRB2Launcher
|
||||
========================================================================
|
||||
|
||||
|
||||
AppWizard has created this SRB2Launcher application for you.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your SRB2Launcher application.
|
||||
|
||||
SRB2Launcher.cpp
|
||||
This is the main application source file.
|
||||
|
||||
SRB2Launcher.dsp
|
||||
This file (the project file) contains information at the project level and
|
||||
is used to build a single project or subproject. Other users can share the
|
||||
project (.dsp) file, but they should export the makefiles locally.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other standard files:
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
These files are used to build a precompiled header (PCH) file
|
||||
named SRB2Launcher.pch and a precompiled types file named StdAfx.obj.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other notes:
|
||||
|
||||
AppWizard uses "TODO:" to indicate parts of the source code you
|
||||
should add to or customize.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
File diff suppressed because it is too large
Load diff
|
@ -1,144 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="SRB2Launcher" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=SRB2Launcher - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "SRB2Launcher.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "SRB2Launcher.mak" CFG="SRB2Launcher - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "SRB2Launcher - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "SRB2Launcher - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "SRB2Launcher - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "SRB2Launcher - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "SRB2Launcher - Win32 Release"
|
||||
# Name "SRB2Launcher - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SRB2Launcher.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lilsocklib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SRB2Launcher.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bitmap1.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\icon1.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Script1.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
|
@ -1,29 +0,0 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "SRB2Launcher"=.\SRB2Launcher.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
extern char TempString[256];
|
||||
extern char EXEName[1024];
|
||||
extern char Arguments[16384];
|
||||
|
||||
#define APPTITLE "Official Sonic Robo Blast 2 Launcher"
|
||||
#define APPVERSION "v0.1"
|
||||
#define APPAUTHOR "SSNTails"
|
||||
#define APPCOMPANY "Sonic Team Junior"
|
|
@ -1,355 +0,0 @@
|
|||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_MAIN DIALOG DISCARDABLE 0, 0, 272, 226
|
||||
STYLE DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Official Sonic Robo Blast 2 Launcher v0.1"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
COMBOBOX IDC_LAUNCHCONFIG,125,15,135,155,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Saved Launch Configuration",IDC_STATIC,120,5,145,45
|
||||
GROUPBOX "WAD/SOC Files",IDC_STATIC,120,55,145,45
|
||||
COMBOBOX IDC_EXTFILECOMBO,125,65,135,95,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL 102,IDC_STATIC,"Static",SS_BITMAP,5,90,107,79
|
||||
PUSHBUTTON "&About",IDC_ABOUT,125,210,25,10
|
||||
DEFPUSHBUTTON "&Go!",IDC_GO,60,150,50,14
|
||||
PUSHBUTTON "Add",IDC_ADDFILE,225,80,35,15
|
||||
PUSHBUTTON "Remove",IDC_REMOVEFILE,185,80,35,15
|
||||
PUSHBUTTON "Save",IDC_SAVELAUNCHCFG,220,30,40,15
|
||||
GROUPBOX "Multiplayer",IDC_STATIC,5,5,105,50
|
||||
PUSHBUTTON "&Join A Game",IDC_JOINGAME,10,15,50,15
|
||||
PUSHBUTTON "&Host A Game",IDC_HOSTGAME,55,35,50,15
|
||||
EDITTEXT IDC_PARAMETERS,160,190,105,30,ES_MULTILINE |
|
||||
ES_AUTOVSCROLL | WS_VSCROLL
|
||||
RTEXT "Manual Parameters:",IDC_STATIC,115,190,40,15
|
||||
GROUPBOX "Executable Name",IDC_STATIC,120,105,145,50
|
||||
EDITTEXT IDC_EXENAME,125,115,95,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Choose...",IDC_FINDEXENAME,225,115,35,10
|
||||
PUSHBUTTON "General &Options",IDC_OPTIONS,55,60,50,20,BS_MULTILINE
|
||||
EDITTEXT IDC_CONFIGFILE,125,140,95,12,ES_AUTOHSCROLL
|
||||
LTEXT "Configuration File:",IDC_STATIC,125,130,60,10
|
||||
PUSHBUTTON "Choose...",IDC_FINDCONFIGNAME,225,140,35,10
|
||||
CONTROL "List1",IDC_LIST1,"SysListView32",WS_BORDER | WS_TABSTOP,
|
||||
20,180,85,40
|
||||
END
|
||||
|
||||
IDD_JOINGAME DIALOG DISCARDABLE 0, 0, 367, 166
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Join Game"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
PUSHBUTTON "&Refresh List",IDC_SEARCHGAMES,5,140,55,20,BS_MULTILINE
|
||||
CONTROL "List1",IDC_GAMELIST,"SysListView32",LVS_REPORT |
|
||||
LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,5,15,240,120
|
||||
EDITTEXT IDC_NAME,295,10,65,12,ES_AUTOHSCROLL
|
||||
COMBOBOX IDC_COLOR,295,30,65,130,CBS_DROPDOWNLIST | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Name:",IDC_STATIC,265,10,25,10
|
||||
RTEXT "Color:",IDC_STATIC,265,30,25,10
|
||||
COMBOBOX IDC_SKIN,295,50,65,110,CBS_DROPDOWNLIST | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Character:",IDC_STATIC,255,50,35,10
|
||||
EDITTEXT IDC_ADDRESS,255,115,70,12,ES_AUTOHSCROLL
|
||||
LTEXT "Manual Address:",IDC_STATIC,255,105,60,10
|
||||
CONTROL "Don't check server for files.",IDC_NOFILE,"Button",
|
||||
BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,255,70,105,
|
||||
10
|
||||
DEFPUSHBUTTON "&Go!",IDC_JOINSTART,330,115,30,15
|
||||
LTEXT "Double-Click on a game to join:",IDC_STATIC,5,5,215,10
|
||||
CONTROL "Don't download files",IDC_NODOWNLOAD,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,255,90,105,10
|
||||
END
|
||||
|
||||
IDD_HOSTGAME DIALOG DISCARDABLE 0, 0, 287, 156
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Host Game"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
GROUPBOX "Game Type",IDC_STATIC,5,5,110,65
|
||||
PUSHBUTTON "&Options...",IDC_OPTIONS,55,30,40,15
|
||||
COMBOBOX IDC_GAMETYPE,10,15,85,100,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
RTEXT "Max # of players:",IDC_STATIC,35,86,70,10
|
||||
EDITTEXT IDC_MAXPLAYERS,110,86,20,12,ES_AUTOHSCROLL
|
||||
GROUPBOX "General Options",IDC_STATIC,5,75,275,75
|
||||
COMBOBOX IDC_STARTMAP,40,50,70,95,CBS_DROPDOWN | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Start on map #:",IDC_STATIC,10,45,25,20
|
||||
CONTROL "Force players to use host's character",IDC_FORCESKIN,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,140,
|
||||
85,135,10
|
||||
COMBOBOX IDC_ADVANCEMAP,45,105,85,50,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Advance Stage:",IDC_STATIC,10,100,30,20
|
||||
CONTROL "Don't advertise server on Internet",IDC_INTERNETSERVER,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,140,
|
||||
130,120,10
|
||||
RTEXT "Intermission Delay Between Levels (in seconds):",
|
||||
IDC_STATIC,10,125,90,15
|
||||
EDITTEXT IDC_INTTIME,105,130,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "Don't allow autoaim",IDC_DISABLEAUTOAIM,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,140,100,75,10
|
||||
CONTROL "Disable WAD/SOC Downloading",IDC_NODOWNLOAD,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,140,115,120,10
|
||||
PUSHBUTTON "Monitor &Toggles...",IDC_MONITORTOGGLES,125,45,40,20,
|
||||
BS_MULTILINE
|
||||
END
|
||||
|
||||
IDD_MATCHOPTIONS DIALOG DISCARDABLE 0, 0, 142, 141
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Match Options"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "Don't use special ring weapons.",IDC_SPECIALRINGS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,5,115,10
|
||||
RTEXT "Item Box Behavior:",IDC_STATIC,5,50,60,10
|
||||
EDITTEXT IDC_RESPAWNITEMTIME,115,70,20,12,ES_AUTOHSCROLL |
|
||||
ES_NUMBER
|
||||
COMBOBOX IDC_MATCHBOXES,70,50,65,65,CBS_DROPDOWN | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Item Respawn Time (in seconds):",IDC_STATIC,5,70,105,10
|
||||
EDITTEXT IDC_TIMELIMIT,115,84,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Time Limit (in minutes):",IDC_STATIC,35,84,75,10
|
||||
RTEXT "Point Limit:",IDC_STATIC,70,100,40,10
|
||||
EDITTEXT IDC_POINTLIMIT,115,100,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "Sudden Death Mode",IDC_SUDDENDEATH,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,15,20,80,10
|
||||
COMBOBOX IDC_MATCH_SCORING,70,35,65,65,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
RTEXT "Scoring Type:",IDC_STATIC,15,35,50,10
|
||||
PUSHBUTTON "Cance&l",IDC_CANCEL,100,120,35,15
|
||||
DEFPUSHBUTTON "O&K",IDC_OK,60,120,35,15
|
||||
END
|
||||
|
||||
IDD_RACEOPTIONS DIALOG DISCARDABLE 0, 0, 142, 71
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Race Options"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
RTEXT "Item Box Behavior:",IDC_STATIC,5,10,60,10
|
||||
COMBOBOX IDC_RACEITEMBOXES,70,10,65,55,CBS_DROPDOWNLIST |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
EDITTEXT IDC_NUMLAPS,115,30,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Number of Laps:",IDC_STATIC,55,30,55,10
|
||||
PUSHBUTTON "Cance&l",IDC_CANCEL,100,50,35,15
|
||||
DEFPUSHBUTTON "O&K",IDC_OK,60,50,35,15
|
||||
END
|
||||
|
||||
IDD_CTFOPTIONS DIALOG DISCARDABLE 0, 0, 142, 126
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "CTF Options"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "Don't use special ring weapons.",IDC_SPECIALRINGS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,5,115,10
|
||||
RTEXT "Item Box Behavior:",IDC_STATIC,5,20,60,10
|
||||
COMBOBOX IDC_MATCHBOXES,70,20,65,60,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
RTEXT "Item Respawn Time (in seconds):",IDC_STATIC,5,40,105,10
|
||||
EDITTEXT IDC_RESPAWNITEMTIME,115,40,20,12,ES_AUTOHSCROLL |
|
||||
ES_NUMBER
|
||||
RTEXT "Time Limit (in minutes):",IDC_STATIC,35,70,75,10
|
||||
EDITTEXT IDC_TIMELIMIT,115,70,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Point Limit:",IDC_STATIC,70,86,40,10
|
||||
EDITTEXT IDC_POINTLIMIT,115,86,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Flag Respawn Time (in seconds):",IDC_STATIC,5,55,105,10
|
||||
EDITTEXT IDC_FLAGTIME,115,55,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
PUSHBUTTON "Cance&l",IDC_CANCEL,100,105,35,15
|
||||
DEFPUSHBUTTON "O&K",IDC_OK,60,105,35,15
|
||||
END
|
||||
|
||||
IDD_TAGOPTIONS DIALOG DISCARDABLE 0, 0, 142, 111
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "Tag Options"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "Don't use special ring weapons.",IDC_SPECIALRINGS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,5,115,10
|
||||
COMBOBOX IDC_MATCHBOXES,70,20,65,60,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
RTEXT "Item Box Behavior:",IDC_STATIC,5,20,60,10
|
||||
DEFPUSHBUTTON "O&K",IDC_OK,60,90,35,15
|
||||
PUSHBUTTON "Cance&l",IDC_CANCEL,100,90,35,15
|
||||
RTEXT "Item Respawn Time (in seconds):",IDC_STATIC,5,40,105,10
|
||||
EDITTEXT IDC_RESPAWNITEMTIME,115,40,20,12,ES_AUTOHSCROLL |
|
||||
ES_NUMBER
|
||||
RTEXT "Time Limit (in minutes):",IDC_STATIC,35,55,75,10
|
||||
EDITTEXT IDC_TIMELIMIT,115,55,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
RTEXT "Point Limit:",IDC_STATIC,70,70,40,10
|
||||
EDITTEXT IDC_POINTLIMIT,115,70,20,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_MAIN, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 265
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 219
|
||||
END
|
||||
|
||||
IDD_JOINGAME, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 360
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 159
|
||||
END
|
||||
|
||||
IDD_HOSTGAME, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 280
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 149
|
||||
END
|
||||
|
||||
IDD_MATCHOPTIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 135
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 134
|
||||
END
|
||||
|
||||
IDD_RACEOPTIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 135
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 64
|
||||
END
|
||||
|
||||
IDD_CTFOPTIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 135
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 119
|
||||
END
|
||||
|
||||
IDD_TAGOPTIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 135
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 104
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_BITMAP1 BITMAP DISCARDABLE "bitmap1.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICON1 ICON DISCARDABLE "icon1.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog Info
|
||||
//
|
||||
|
||||
IDD_JOINGAME DLGINIT
|
||||
BEGIN
|
||||
IDC_SKIN, 0x403, 6, 0
|
||||
0x6f53, 0x696e, 0x0063,
|
||||
IDC_SKIN, 0x403, 6, 0
|
||||
0x6154, 0x6c69, 0x0073,
|
||||
IDC_SKIN, 0x403, 9, 0
|
||||
0x6e4b, 0x6375, 0x6c6b, 0x7365, "\000"
|
||||
0
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// SRB2Launcher.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
|
@ -1,29 +0,0 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
|
||||
#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
#include <commdlg.h>
|
||||
#include <commctrl.h>
|
||||
#include <winsock.h>
|
||||
#include "lilsocklib.h"
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
|
Binary file not shown.
Before Width: | Height: | Size: 21 KiB |
|
@ -1,57 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// MSERV SDK
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Adapted by Oogaland.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// TCP/IP stuff.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
#include <winsock.h>
|
||||
#include <wsipx.h>
|
||||
|
||||
|
||||
#include "launcher.h"
|
||||
#include "mserv.h" //Hurdler: support master server
|
||||
|
||||
|
||||
|
||||
|
||||
static int init_tcp_driver = 0;
|
||||
|
||||
|
||||
void I_InitTcpDriver(void)
|
||||
{
|
||||
if (!init_tcp_driver)
|
||||
{
|
||||
#ifdef __WIN32__
|
||||
WSADATA winsockdata;
|
||||
if( WSAStartup(MAKEWORD(1,1),&winsockdata) )
|
||||
I_Error("No Tcp/Ip driver detected");
|
||||
#endif
|
||||
#ifdef __DJGPP_
|
||||
if( !__lsck_init() )
|
||||
I_Error("No Tcp/Ip driver detected");
|
||||
#endif
|
||||
init_tcp_driver = 1;
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// MSERV SDK
|
||||
//
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Adapted by Oogaland.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Header file for the TCP/IP routines
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef _I_TCP_H_
|
||||
#define _I_TCP_H_
|
||||
|
||||
extern int sock_port;
|
||||
|
||||
void I_InitTcpDriver(void);
|
||||
|
||||
#endif // !defined(_I_TCP_H_)
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue