include/SDL_types.h
changeset 1330 450721ad5436
parent 1312 c9b51268668f
child 1345 7f32b9bede06
     1.1 --- a/include/SDL_types.h	Sat Feb 04 22:01:44 2006 +0000
     1.2 +++ b/include/SDL_types.h	Mon Feb 06 08:28:51 2006 +0000
     1.3 @@ -25,11 +25,17 @@
     1.4  #ifndef _SDL_types_h
     1.5  #define _SDL_types_h
     1.6  
     1.7 -/* The number of elements in a table */
     1.8 -#define SDL_TABLESIZE(table)	(sizeof(table)/sizeof(table[0]))
     1.9 +#include <sys/types.h>
    1.10 +#ifdef _MSC_VER
    1.11 +#include <crtdefs.h>	/* For size_t */
    1.12 +#endif
    1.13 +
    1.14 +/* The number of elements in an array */
    1.15 +#define SDL_arraysize(array)	(sizeof(array)/sizeof(array[0]))
    1.16 +#define SDL_TABLESIZE(table)	SDL_arraysize(table)
    1.17  
    1.18  /* Basic data types */
    1.19 -typedef enum {
    1.20 +typedef enum SDL_bool {
    1.21  	SDL_FALSE = 0,
    1.22  	SDL_TRUE  = 1
    1.23  } SDL_bool;
    1.24 @@ -107,9 +113,4 @@
    1.25  
    1.26  SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
    1.27  
    1.28 -#undef SDL_COMPILE_TIME_ASSERT
    1.29 -
    1.30 -/* General keyboard/mouse state definitions */
    1.31 -enum { SDL_PRESSED = 0x01, SDL_RELEASED = 0x00 };
    1.32 -
    1.33  #endif