Mercurial > mxe-octave
annotate src/sdl_image-test.c @ 733:6f7cdcfc3279
bugfix and test program for package sdl_image
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Sun, 14 Feb 2010 19:33:14 +0100 |
parents | |
children | 35a9e556c82c |
rev | line source |
---|---|
733
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
1 /* This file is part of mingw-cross-env. */ |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
2 /* See doc/index.html for further information. */ |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
3 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
4 #include <SDL.h> |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
5 #include <SDL_image.h> |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
6 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
7 int main(int argc, char* argv[]) |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
8 { |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
9 SDL_Surface *image; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
10 SDL_Surface *screen; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
11 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 (void)argc; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 (void)argv; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
14 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
15 if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return 1; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
17 image = IMG_Load("test.png"); |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE); |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 SDL_Quit(); |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 return 0; |
6f7cdcfc3279
bugfix and test program for package sdl_image
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
22 } |