mirror of https://github.com/nothings/stb.git
Updated to compile with Visual Studio 2015
This commit is contained in:
parent
59c353962a
commit
0c0a619ca4
9
stb.h
9
stb.h
|
@ -186,6 +186,13 @@ Parenthesized items have since been removed.
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE
|
||||
#define _CRT_NON_CONFORMING_SWPRINTFS
|
||||
#include <intrin.h> // _BitScanReverse
|
||||
#endif
|
||||
|
||||
#include <stdlib.h> // stdlib could have min/max
|
||||
#include <stdio.h> // need FILE
|
||||
#include <string.h> // stb_define_hash needs memcpy/memset
|
||||
|
@ -1401,7 +1408,7 @@ int stb_is_pow2(unsigned int n)
|
|||
int stb_log2_floor(unsigned int n)
|
||||
{
|
||||
#if _MSC_VER > 1700
|
||||
DWORD i;
|
||||
unsigned long i;
|
||||
_BitScanReverse(&i, n);
|
||||
return i != 0 ? i : -1;
|
||||
#else
|
||||
|
|
|
@ -84,6 +84,10 @@ void print_string(float x, float y, char *text, float r, float g, float b)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#ifndef INCLUDE_STB_EASY_FONT_H
|
||||
#define INCLUDE_STB_EASY_FONT_H
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#undef realloc
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
@ -326,6 +326,12 @@
|
|||
#ifndef STB_TILEMAP_INCLUDE_STB_TILEMAP_EDITOR_H
|
||||
#define STB_TILEMAP_INCLUDE_STB_TILEMAP_EDITOR_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
typedef struct stbte_tilemap stbte_tilemap;
|
||||
|
||||
// these are the drawmodes used in STBTE_DRAW_TILE
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue