Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

RotateImage.h

Go to the documentation of this file.
00001 #ifndef __VCS_H__
00002 #define __VCS_H__
00003 
00004 #include <string.h>
00005 #include <SDL/SDL.h>
00006 #include <SDL/SDL_image.h>
00007 
00008 #include <SDL/begin_code.h>
00009 
00010 #define NO_ROTATION     0
00011 #define OFF                     0
00012 #define CLOCKWISE       1
00013 #define CCLOCKWISE      2
00014 
00021 
00036 struct VCS_Surface:public SDL_Surface
00037 {
00039   int RotationMode;
00041   SDL_Surface *OldSurface;
00043   SDL_Surface *LockedSurface;
00045   int VCS_Locked;
00046 };
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051 
00052 /* VCS specific functions */
00053 DECLSPEC int SDLCALL          VCS_TranslateCoords(Sint16 *x, Sint16 *y);
00054 DECLSPEC VCS_Surface *SDLCALL SDL_VCS(SDL_Surface *surface);
00055 DECLSPEC SDL_Surface *SDLCALL VCS_RotateSurface(SDL_Surface *surface, bool autofree=true);
00056 DECLSPEC SDL_Surface *SDLCALL VCS_UnRotateSurface(VCS_Surface *surface, bool autofree=true);
00057 DECLSPEC Uint32 SDLCALL getpixel(SDL_Surface *surface, int x, int y);
00058 DECLSPEC void   SDLCALL putpixel(SDL_Surface *surface,int x, int y, Uint32 pixel);
00059 
00060 /*VCS conversions of SDL functions */
00061 DECLSPEC VCS_Surface *SDLCALL VCS_ConvertSurface(VCS_Surface *ref,SDL_PixelFormat *format, Uint32 flags);
00062 DECLSPEC VCS_Surface *SDLCALL VCS_CreateRGBSurface(Uint32 flags,Sint16 w,Sint16 h,Uint8 bpp,Uint32 rmask, Uint32 gmask, Uint32 bmask, Uint32 amask);
00063 DECLSPEC VCS_Surface *SDLCALL VCS_SetVideoMode(Sint32 w, Sint32 h, Uint8 bpp,Uint32 flags);
00064 DECLSPEC VCS_Surface *SDLCALL VCS_LoadBMP(const char *file);
00065 DECLSPEC VCS_Surface *SDLCALL VCS_CloneSurface(VCS_Surface *surface, Uint32 w, Uint32 h);
00066 DECLSPEC VCS_Surface *SDLCALL VCS_GetVideoSurface();
00067 DECLSPEC VCS_Surface *SDLCALL VCS_DisplayFormat(VCS_Surface *surface);
00068 DECLSPEC VCS_Surface *SDLCALL VCS_Load(const char *fname);
00069 
00070 DECLSPEC void SDLCALL VCS_FreeSurface(VCS_Surface *surface);
00071 DECLSPEC int  SDLCALL VCS_BlitSurface(VCS_Surface *source, SDL_Rect *srcrect, VCS_Surface *dest, SDL_Rect *dstrect);
00072 DECLSPEC void SDLCALL VCS_FillRect(VCS_Surface *surface, SDL_Rect *rect, Uint32 color);
00073 DECLSPEC void SDLCALL VCS_UpdateRect(VCS_Surface *screen,Sint32 x, Sint32 y, Sint32 w, Sint32 h);
00074 DECLSPEC void SDLCALL VCS_UpdateRects(VCS_Surface *screen, int numrects, SDL_Rect *rects);
00075 
00076 DECLSPEC void SDLCALL PrintSurface(SDL_Surface *s);
00077 
00078 DECLSPEC void SDLCALL PrintRect(SDL_Rect *rect);
00079 DECLSPEC void SDLCALL VCS_SetClipRect(VCS_Surface *surface, SDL_Rect *rect);
00080 DECLSPEC void SDLCALL VCS_GetClipRect(VCS_Surface *surface, SDL_Rect *rect);
00081 DECLSPEC void SDLCALL VCS_SetColorKey(VCS_Surface *surface, Uint32 flag, Uint32 color);
00082 DECLSPEC void SDLCALL VCS_UnlockSurface(VCS_Surface *surface);
00083 DECLSPEC void SDLCALL VCS_WM_SetIcon(VCS_Surface *icon, Uint8 *mask);
00084 DECLSPEC void SDLCALL VCS_Quit(void);
00085 DECLSPEC void SDLCALL VCS_SaveBMP(VCS_Surface *surface, const char *file);
00086 
00087 DECLSPEC int SDLCALL VCS_PollEvent(SDL_Event *event);
00088 DECLSPEC int SDLCALL VCS_Flip(VCS_Surface *surface);
00089 DECLSPEC int SDLCALL FindColor(VCS_Surface *surface, SDL_Color *color);
00090 DECLSPEC int SDLCALL VCS_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, Uint32 mask);
00091 DECLSPEC int SDLCALL VCS_SetColors(VCS_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors);
00092 DECLSPEC int SDLCALL VCS_LockSurface(VCS_Surface *surface);
00093 DECLSPEC int SDLCALL VCS_SetAlpha(VCS_Surface *surface, Uint32 flag, Uint8 alpha);
00094 
00095 DECLSPEC Uint8 SDLCALL VCS_GetMouseState(int *x, int *y);
00096 
00097 #ifdef __cplusplus
00098 }
00099 #endif
00100 
00101 
00103 
00104 #ifndef __VCS_CPP__
00105 
00106 #undef  SDL_Surface
00107 #define SDL_Surface           VCS_Surface
00108 
00109 #undef  SDL_ConvertSurface
00110 #define SDL_ConvertSurface    VCS_ConvertSurface
00111 #undef  SDL_CreateRGBSurface
00112 #define SDL_CreateRGBSurface  VCS_CreateRGBSurface
00113 #undef  SDL_SetVideoMode
00114 #define SDL_SetVideoMode      VCS_SetVideoMode
00115 #undef  SDL_LoadBMP
00116 #define SDL_LoadBMP           VCS_LoadBMP
00117 #undef  SDL_GetVideoSurface
00118 #define SDL_GetVideoSurface   VCS_GetVideoSurface
00119 #undef  SDL_DisplayFormat
00120 #define SDL_DisplayFormat     VCS_DisplayFormat
00121 #undef  SDL_FreeSurface
00122 #define SDL_FreeSurface       VCS_FreeSurface
00123 #undef  SDL_BlitSurface
00124 #define SDL_BlitSurface       VCS_BlitSurface
00125 #undef  SDL_FillRect
00126 #define SDL_FillRect          VCS_FillRect
00127 #undef  SDL_UpdateRect
00128 #define SDL_UpdateRect        VCS_UpdateRect
00129 #undef  SDL_UpdateRects
00130 #define SDL_UpdateRects       VCS_UpdateRects
00131 #undef  SDL_SetClipRect
00132 #define SDL_SetClipRect       VCS_SetClipRect
00133 #undef  SDL_GetClipRect
00134 #define SDL_GetClipRect       VCS_GetClipRect
00135 #undef  SDL_SetColorKey
00136 #define SDL_SetColorKey       VCS_SetColorKey
00137 #undef  SDL_UnlockSurface
00138 #define SDL_UnlockSurface     VCS_UnlockSurface
00139 #undef  SDL_WM_SetIcon
00140 #define SDL_WM_SetIcon        VCS_WM_SetIcon
00141 #undef  SDL_Quit
00142 #define SDL_Quit              VCS_Quit
00143 #undef  SDL_SaveBMP
00144 #define SDL_SaveBMP           VCS_SaveBMP
00145 #undef  SDL_PollEvent
00146 #define SDL_PollEvent         VCS_PollEvent
00147 #undef  SDL_Flip
00148 #define SDL_Flip              VCS_Flip
00149 #undef  SDL_PeepEvents
00150 #define SDL_PeepEvents        VCS_PeepEvents
00151 #undef  SDL_SetColors
00152 #define SDL_SetColors         VCS_SetColors
00153 #undef  SDL_LockSurface
00154 #define SDL_LockSurface       VCS_LockSurface
00155 #undef  SDL_SetAlpha
00156 #define SDL_SetAlpha          VCS_SetAlpha
00157 #undef  SDL_GetMouseState
00158 #define SDL_GetMouseState     VCS_GetMouseState
00159 #undef  IMG_Load
00160 #define IMG_Load              VCS_Load
00161 
00162 //All VCS_Surface's must be locked to directly access, software or not
00163 #undef SDL_MUSTLOCK
00164 #define SDL_MUSTLOCK(surface) (1)
00165 
00167 
00168 #endif/*__VCS_CPP__*/
00169 
00170 #include <SDL/close_code.h>
00171 
00172 #endif //__VCS_H

Generated on Sat Oct 11 13:19:25 2003 for Spritelib by doxygen 1.3.4