Commit c53a7c6c authored by Sam Lantinga's avatar Sam Lantinga

Updated to build on Windows

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403380
parent 30af8c94
...@@ -440,6 +440,18 @@ ...@@ -440,6 +440,18 @@
RelativePath="..\..\src\audio\SDL_audiotypecvt.c" RelativePath="..\..\src\audio\SDL_audiotypecvt.c"
> >
</File> </File>
<File
RelativePath="..\..\src\video\SDL_blendline.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_blendpoint.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_blendrect.c"
>
</File>
<File <File
RelativePath="..\..\src\video\SDL_blit.c" RelativePath="..\..\src\video\SDL_blit.c"
> >
...@@ -484,6 +496,10 @@ ...@@ -484,6 +496,10 @@
RelativePath="..\..\src\video\SDL_blit_slow.c" RelativePath="..\..\src\video\SDL_blit_slow.c"
> >
</File> </File>
<File
RelativePath="..\..\src\video\SDL_blit_slow.h"
>
</File>
<File <File
RelativePath="..\..\src\video\SDL_bmp.c" RelativePath="..\..\src\video\SDL_bmp.c"
> >
...@@ -524,6 +540,18 @@ ...@@ -524,6 +540,18 @@
RelativePath="..\..\src\audio\disk\SDL_diskaudio.h" RelativePath="..\..\src\audio\disk\SDL_diskaudio.h"
> >
</File> </File>
<File
RelativePath="..\..\src\video\SDL_draw.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_drawline.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_drawpoint.c"
>
</File>
<File <File
RelativePath="..\..\src\audio\dummy\SDL_dummyaudio.c" RelativePath="..\..\src\audio\dummy\SDL_dummyaudio.c"
> >
...@@ -569,7 +597,7 @@ ...@@ -569,7 +597,7 @@
> >
</File> </File>
<File <File
RelativePath="..\..\src\video\SDL_fill.c" RelativePath="..\..\src\video\SDL_fillrect.c"
> >
</File> </File>
<File <File
......
...@@ -218,7 +218,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) ...@@ -218,7 +218,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
if (biClrUsed == 0) { if (biClrUsed == 0) {
biClrUsed = 1 << biBitCount; biClrUsed = 1 << biBitCount;
} }
if (biClrUsed > palette->ncolors) { if ((int)biClrUsed > palette->ncolors) {
palette->ncolors = biClrUsed; palette->ncolors = biClrUsed;
palette->colors = palette->colors =
(SDL_Color *) SDL_realloc(palette->colors, (SDL_Color *) SDL_realloc(palette->colors,
...@@ -229,7 +229,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) ...@@ -229,7 +229,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
was_error = 1; was_error = 1;
goto done; goto done;
} }
} else if (biClrUsed < palette->ncolors) { } else if ((int)biClrUsed < palette->ncolors) {
palette->ncolors = biClrUsed; palette->ncolors = biClrUsed;
} }
if (biSize == 12) { if (biSize == 12) {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#define DRAW_MUL(_a, _b) (((unsigned)(_a)*(_b))/255) #define DRAW_MUL(_a, _b) (((unsigned)(_a)*(_b))/255)
#define DRAW_FASTSETPIXEL(x, y, type, bpp, color) \ #define DRAW_FASTSETPIXEL(x, y, type, bpp, color) \
*(type *)(dst->pixels + y * dst->pitch + x * bpp) = (type) color *(type *)((Uint8 *)dst->pixels + y * dst->pitch + x * bpp) = (type) color
#define DRAW_FASTSETPIXEL1(x, y) DRAW_FASTSETPIXEL(x, y, Uint8, 1, color); #define DRAW_FASTSETPIXEL1(x, y) DRAW_FASTSETPIXEL(x, y, Uint8, 1, color);
#define DRAW_FASTSETPIXEL2(x, y) DRAW_FASTSETPIXEL(x, y, Uint16, 2, color); #define DRAW_FASTSETPIXEL2(x, y) DRAW_FASTSETPIXEL(x, y, Uint16, 2, color);
...@@ -74,7 +74,7 @@ do { \ ...@@ -74,7 +74,7 @@ do { \
#define DRAW_SETPIXELXY(x, y, type, bpp, op) \ #define DRAW_SETPIXELXY(x, y, type, bpp, op) \
do { \ do { \
type *pixel = (type *)(dst->pixels + y * dst->pitch + x * bpp); \ type *pixel = (type *)((Uint8 *)dst->pixels + y * dst->pitch + x * bpp); \
op; \ op; \
} while (0) } while (0)
...@@ -346,7 +346,6 @@ do { \ ...@@ -346,7 +346,6 @@ do { \
#define FILLRECT(type, op) \ #define FILLRECT(type, op) \
do { \ do { \
int w; \
int width = dstrect->w; \ int width = dstrect->w; \
int height = dstrect->h; \ int height = dstrect->h; \
int pitch = (dst->pitch / dst->format->BytesPerPixel); \ int pitch = (dst->pitch / dst->format->BytesPerPixel); \
......
...@@ -519,9 +519,9 @@ compile_shader(GL_RenderData * data, GLenum shader_type, const char *_code) ...@@ -519,9 +519,9 @@ compile_shader(GL_RenderData * data, GLenum shader_type, const char *_code)
{ {
const int have_texture_rects = data->GL_ARB_texture_rectangle_supported; const int have_texture_rects = data->GL_ARB_texture_rectangle_supported;
const char *replacement = have_texture_rects ? "RECT" : "2D"; const char *replacement = have_texture_rects ? "RECT" : "2D";
const size_t replacementlen = strlen(replacement); const size_t replacementlen = SDL_strlen(replacement);
const char *token = "%TEXTURETARGET%"; const char *token = "%TEXTURETARGET%";
const size_t tokenlen = strlen(token); const size_t tokenlen = SDL_strlen(token);
char *code = NULL; char *code = NULL;
char *ptr = NULL; char *ptr = NULL;
GLuint program = 0; GLuint program = 0;
...@@ -536,9 +536,9 @@ compile_shader(GL_RenderData * data, GLenum shader_type, const char *_code) ...@@ -536,9 +536,9 @@ compile_shader(GL_RenderData * data, GLenum shader_type, const char *_code)
return 0; return 0;
for (ptr = SDL_strstr(code, token); ptr; ptr = SDL_strstr(ptr + 1, token)) { for (ptr = SDL_strstr(code, token); ptr; ptr = SDL_strstr(ptr + 1, token)) {
memcpy(ptr, replacement, replacementlen); SDL_memcpy(ptr, replacement, replacementlen);
memmove(ptr + replacementlen, ptr + tokenlen, SDL_memmove(ptr + replacementlen, ptr + tokenlen,
strlen(ptr + tokenlen) + 1); SDL_strlen(ptr + tokenlen) + 1);
} }
#if DEBUG_PROGRAM_COMPILE #if DEBUG_PROGRAM_COMPILE
......
...@@ -2075,7 +2075,6 @@ SDL_RenderPoint(int x, int y) ...@@ -2075,7 +2075,6 @@ SDL_RenderPoint(int x, int y)
{ {
SDL_Renderer *renderer; SDL_Renderer *renderer;
SDL_Window *window; SDL_Window *window;
SDL_Rect real_rect;
if (!_this) { if (!_this) {
SDL_UninitializedVideo(); SDL_UninitializedVideo();
......
...@@ -214,7 +214,6 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) ...@@ -214,7 +214,6 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_INPUT: /* mouse events */ case WM_INPUT: /* mouse events */
{ {
LPBYTE lpb; LPBYTE lpb;
int w, h;
const RAWINPUTHEADER *header; const RAWINPUTHEADER *header;
int index; int index;
int i; int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment