mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-07 21:41:07 +00:00
10c0d67b78
channel when restarting the song, rather than emitting a single note off event which only has a 1 in 127 chance of being for a note that's playing on that channel. Then I decided it would probably be a good idea to reset all the controllers as well. - Increasing the size of the internal Timidity stream buffer from 1/14 sec (copied from the OPL player) improved its sound dramatically, so apparently Timidity has issues with short stream buffers. It's now at 1/2 sec in length. However, there seems to be something weird going on with corazonazul_ff6boss.mid near the beginning where it stops and immediately restarts a guitar on the exact same note. - Added a new sound debugging cvar: snd_drawoutput, which can show various oscilloscopes and spectrums. - Internal TiMidity now plays music. - Changed the progdir global variable into an FString. SVN r900 (trunk)
59 lines
1.5 KiB
C
59 lines
1.5 KiB
C
// cmdlib.h
|
|
|
|
#ifndef __CMDLIB__
|
|
#define __CMDLIB__
|
|
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable : 4244) // MIPS
|
|
#pragma warning(disable : 4136) // X86
|
|
#pragma warning(disable : 4051) // ALPHA
|
|
|
|
#pragma warning(disable : 4018) // signed/unsigned mismatch
|
|
#pragma warning(disable : 4305) // truncate from double to float
|
|
#endif
|
|
|
|
#include "doomtype.h"
|
|
#include "zstring.h"
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
#include <ctype.h>
|
|
#include <stdarg.h>
|
|
|
|
// the dec offsetof macro doesnt work very well...
|
|
#define myoffsetof(type,identifier) ((size_t)&((type *)1)->identifier - 1)
|
|
|
|
int Q_filelength (FILE *f);
|
|
bool FileExists (const char *filename);
|
|
|
|
extern FString progdir;
|
|
|
|
void FixPathSeperator (char *path);
|
|
static void inline FixPathSeperator (FString &path) { path.ReplaceChars('\\', '/'); }
|
|
|
|
void DefaultExtension (char *path, const char *extension);
|
|
void DefaultExtension (FString &path, const char *extension);
|
|
|
|
FString ExtractFilePath (const char *path);
|
|
FString ExtractFileBase (const char *path, bool keep_extension=false);
|
|
|
|
int ParseHex (char *str);
|
|
int ParseNum (char *str);
|
|
bool IsNum (char *str); // [RH] added
|
|
|
|
char *copystring(const char *s);
|
|
void ReplaceString (char **ptr, const char *str);
|
|
|
|
bool CheckWildcards (const char *pattern, const char *text);
|
|
|
|
void FormatGUID (char *text, const GUID &guid);
|
|
|
|
const char *myasctime ();
|
|
|
|
int strbin (char *str);
|
|
|
|
void CreatePath(const char * fn);
|
|
|
|
#endif
|