Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Updated to build on Windows

  • Loading branch information
slouken committed Dec 25, 2008
1 parent 914bcdb commit 92cac75b9401d219379dd50d5366ee5f99198984
@@ -440,6 +440,18 @@
RelativePath="..\..\src\audio\SDL_audiotypecvt.c"
>
</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
RelativePath="..\..\src\video\SDL_blit.c"
>
@@ -484,6 +496,10 @@
RelativePath="..\..\src\video\SDL_blit_slow.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_blit_slow.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_bmp.c"
>
@@ -524,6 +540,18 @@
RelativePath="..\..\src\audio\disk\SDL_diskaudio.h"
>
</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
RelativePath="..\..\src\audio\dummy\SDL_dummyaudio.c"
>
@@ -569,7 +597,7 @@
>
</File>
<File
RelativePath="..\..\src\video\SDL_fill.c"
RelativePath="..\..\src\video\SDL_fillrect.c"
>
</File>
<File
@@ -218,7 +218,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
if (biClrUsed == 0) {
biClrUsed = 1 << biBitCount;
}
if (biClrUsed > palette->ncolors) {
if ((int)biClrUsed > palette->ncolors) {
palette->ncolors = biClrUsed;
palette->colors =
(SDL_Color *) SDL_realloc(palette->colors,
@@ -229,7 +229,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
was_error = 1;
goto done;
}
} else if (biClrUsed < palette->ncolors) {
} else if ((int)biClrUsed < palette->ncolors) {
palette->ncolors = biClrUsed;
}
if (biSize == 12) {
@@ -30,7 +30,7 @@
#define DRAW_MUL(_a, _b) (((unsigned)(_a)*(_b))/255)

#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_FASTSETPIXEL2(x, y) DRAW_FASTSETPIXEL(x, y, Uint16, 2, color);
@@ -74,7 +74,7 @@ do { \

#define DRAW_SETPIXELXY(x, y, type, bpp, op) \
do { \
type *pixel = (type *)(dst->pixels + y * dst->pitch + x * bpp); \
type *pixel = (type *)((Uint8 *)dst->pixels + y * dst->pitch + x * bpp); \
op; \
} while (0)

@@ -346,7 +346,6 @@ do { \

#define FILLRECT(type, op) \
do { \
int w; \
int width = dstrect->w; \
int height = dstrect->h; \
int pitch = (dst->pitch / dst->format->BytesPerPixel); \
@@ -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 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 size_t tokenlen = strlen(token);
const size_t tokenlen = SDL_strlen(token);
char *code = NULL;
char *ptr = NULL;
GLuint program = 0;
@@ -536,9 +536,9 @@ compile_shader(GL_RenderData * data, GLenum shader_type, const char *_code)
return 0;

for (ptr = SDL_strstr(code, token); ptr; ptr = SDL_strstr(ptr + 1, token)) {
memcpy(ptr, replacement, replacementlen);
memmove(ptr + replacementlen, ptr + tokenlen,
strlen(ptr + tokenlen) + 1);
SDL_memcpy(ptr, replacement, replacementlen);
SDL_memmove(ptr + replacementlen, ptr + tokenlen,
SDL_strlen(ptr + tokenlen) + 1);
}

#if DEBUG_PROGRAM_COMPILE
@@ -2075,7 +2075,6 @@ SDL_RenderPoint(int x, int y)
{
SDL_Renderer *renderer;
SDL_Window *window;
SDL_Rect real_rect;

if (!_this) {
SDL_UninitializedVideo();
@@ -214,7 +214,6 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_INPUT: /* mouse events */
{
LPBYTE lpb;
int w, h;
const RAWINPUTHEADER *header;
int index;
int i;

0 comments on commit 92cac75

Please sign in to comment.