1
0
forked from 0ad/0ad

(re)added headers so it'll work without HAVE_PCH

This was SVN commit r396.
This commit is contained in:
janwas 2004-06-04 12:41:53 +00:00
parent 0bd696a27d
commit 0dc6007fbd
22 changed files with 102 additions and 23 deletions

View File

@ -1,13 +1,12 @@
#ifndef ADTS_H__
#define ADTS_H__
#include "precompiled.h"
#include "lib.h"
#include <cassert>
#include <list>
#include <map>
static struct BIT_BUF

View File

@ -20,6 +20,8 @@
#undef HAVE_GETTIMEOFDAY
#undef HAVE_X
#undef HAVE_PCH
#undef CONFIG_DISABLE_EXCEPTIONS
@ -29,6 +31,7 @@
#ifdef _MSC_VER
# define HAVE_ASM
//# define HAVE_PCH
#endif
#ifdef OS_UNIX

View File

@ -22,6 +22,9 @@
#include "input.h"
#include <stdio.h>
#include <stdlib.h>
#define MAX_HANDLERS 4

View File

@ -21,6 +21,8 @@
#include "sdl.h" // endian functions
#include <assert.h>
// more powerful atexit, with 0 or 1 parameters.
// callable before libc initialized, frees up the real atexit table,

View File

@ -5,6 +5,10 @@
#include "ogl.h"
#include "detect.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#ifdef _MSC_VER
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")

View File

@ -1,3 +1,18 @@
// if precompiled headers are supported, include all headers we'd ever need
// that don't often change. if not supported, include nothing (would actually
// slow down the build, since unnecessary headers would be included).
// hence, all files include precompiled.h and then all the headers they'd
// normally lead => best build performance with or without PCH.
#include "config.h"
#ifdef _MSC_VER
#pragma warning(disable:4996) // function is deprecated
#pragma warning(disable:4786) // identifier truncated to 255 chars
#endif
#ifdef HAVE_PCH
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
@ -21,9 +36,7 @@
#include <algorithm>
#include <numeric>
#ifdef _MSC_VER
#pragma warning(disable:4996) // function is deprecated
#pragma warning(disable:4786) // identifier truncated to 255 chars
#endif
#include "config.h"

View File

@ -26,6 +26,8 @@
#include "detect.h"
#include "adts.h"
#include <vector>
#include <algorithm>
// block := power-of-two sized chunk of a file.
// all transfers are expanded to naturally aligned, whole blocks

View File

@ -24,6 +24,9 @@
#include "res.h"
#include "ogl.h"
#include <string.h>
#include <stdio.h>
/*
#include <ft2build.h>

View File

@ -22,12 +22,10 @@
#include "h_mgr.h"
#include "mem.h"
// TODO: h_find - required for caching
#include <assert.h>
#include <limits.h> // CHAR_BIT
#include <string.h>
#include <stdlib.h>
// rationale

View File

@ -6,6 +6,10 @@
#include "res.h"
#include "h_mgr.h"
#include <stdlib.h>
#include <assert.h>
#include <map>
//////////////////////////////////////////////////////////////////////////////

View File

@ -24,6 +24,10 @@
#include "res.h"
#include "ogl.h"
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#define NO_JP2
//#define NO_PNG

View File

@ -23,6 +23,14 @@
#include "res.h"
#include "adts.h"
#include <string.h>
#include <map>
#include <list>
#include <vector>
#include <string>
#include <algorithm>
// currently not thread safe. will have to change that if
// a prefetch thread is to be used.

View File

@ -21,6 +21,8 @@
#include "lib.h"
#include "res.h"
#include <assert.h>
// provision for removing all ZLib code (all inflate calls will fail).
// used for checking DLL dependency; might also simulate corrupt Zip files.
//#define NO_ZLIB

View File

@ -29,6 +29,13 @@
#include "win/wtime.h"
#endif
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <vector>
#include <algorithm>
// replace pathetic MS libc implementation
#ifdef _WIN32

View File

@ -18,11 +18,14 @@
#include "precompiled.h"
#include <io.h>
#include "lib.h"
#include "win_internal.h"
#include <io.h>
#include <assert.h>
#include <stdlib.h>
#define lock() win_lock(WAIO_CS)
#define unlock() win_unlock(WAIO_CS)

View File

@ -23,6 +23,10 @@
#include "win_internal.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _MSC_VER
#pragma comment(lib, "version.lib")
#pragma comment(lib, "advapi32.lib")

View File

@ -21,8 +21,11 @@
#include "win_internal.h"
#include <crtdbg.h> // malloc debug
#include <malloc.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h> // __argc
#include <malloc.h>
//
// these override the portable stdio versions in sysdep.cpp

View File

@ -20,11 +20,15 @@
#include "precompiled.h"
#include <process.h>
#include "lib.h"
#include "win_internal.h"
#include <process.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
static HANDLE mk_handle(intptr_t i)
{

View File

@ -34,6 +34,10 @@
#include <SDL_vkeys.h>
#include <assert.h>
#include <stdio.h>
#include <math.h>
#ifdef _MSC_VER
#pragma comment(lib, "user32.lib")
#pragma comment(lib, "gdi32.lib")
@ -243,7 +247,8 @@ return_char:
next_char_idx++;
ev->type = SDL_KEYDOWN;
ev->key.keysym.sym = (SDLKey)translated_keysym;
//ev->key.keysym.sym = (SDLKey)translated_keysym;
ev->key.keysym.sym = (SDLKey)((c < 256)? c : 0);
ev->key.keysym.unicode = c;
return 1;
}
@ -277,16 +282,14 @@ return_char:
{
// Translation complete: Produce one or more Unicode chars
char_buf[num_chars]=0;
translated_keysym=vkmap(vk);
///translated_keysym=vkmap(vk);
//wprintf(L"ToUnicode: Translated %02x to [%s], %d chars, SDLK %02x. Extended flag %d, scancode %d\n", vk, char_buf, num_chars, translated_keysym, msg.lParam & 0x01000000, scancode);
//fflush(stdout);
goto return_char;
}
else if (num_chars == -1)
{
// Dead Key: Don't produce an event for this one
//printf("ToUnicode: Dead Key %02x [%c] [%c] SDLK %02x\n", vk, vk, char_buf[0], vkmap(vk));
//fflush(stdout);
num_chars = 0;
break;
// leave the switch statement; get next message.
@ -301,7 +304,6 @@ return_char:
ev->key.keysym.unicode = 0;
//printf("ToUnicode: No translation for %02x, extended flag %d, scancode %d, SDLK %02x [%c]\n", vk, msg.lParam & 0x01000000, scancode, ev->key.keysym.sym, ev->key.keysym.sym);
//fflush(stdout);
return 1;
}

View File

@ -21,7 +21,11 @@
#include "lib.h"
#include "wsock.h"
#include <assert.h>
#ifdef _MSC_VER
#pragma comment(lib, "ws2_32.lib")
#endif
fp_getnameinfo_t getnameinfo;

View File

@ -24,6 +24,12 @@
#include "win_internal.h"
#include <math.h>
#include <algorithm>
#include <numeric>
// we no longer use TGT, due to issues on Win9x; GTC is just as good.
// (don't want to accelerate the tick rate, because performance will suffer).
// still need the header for the event timer (triggers periodic recalibration).

View File

@ -20,6 +20,7 @@
#include "lib.h"
#include "timer.h"
#include <math.h>
// wrapper over gettimeofday, instead of emulating it for Windows,
// because double return type allows higher resolution (e.g. if using TSC),