00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef _GINTER_H_
00016 #define _GINTER_H_
00017
00018
00019 #include "SDL.h"
00020
00021 namespace mx3d
00022 {
00023
00024
00028 typedef struct _Rect {
00029
00030 int x,y,w,h;
00031 int Pitch;
00032 } grapRect ;
00033
00037 class graphicsInterface
00038 {
00039 public:
00040
00044 graphicsInterface(SDL_Surface *f = 0);
00045 ~graphicsInterface();
00046
00048 void lock();
00050 void unlock();
00051
00058 void fast_sp(int x, int y,int pitch, unsigned int color);
00064 void setpixel(int x, int y, unsigned int color);
00070 unsigned int fast_gp(int x, int y);
00071
00073 void drawrect(int x, int y, int w , int h, unsigned int color);
00075 void drawline(int start_x, int start_y, int stop_x, int stop_y,unsigned int color);
00077 void drawtoptri(int x1, int y1, int x2, int y2, int x3, int y3, unsigned int color);
00079 void drawgentri(int x1, int y1, int x2, int y2, int x3, int y3, unsigned int color);
00081 void drawtoptri2(float x1, float y1, float x2, float y2, float x3, float y3, unsigned int color);
00083 void drawbottomtri2(float x1, float y1, float x2, float y2, float x3, float y3, unsigned int color);
00085 void drawtri2(float x1, float y1, float x2, float y2, float x3, float y3, unsigned int color);
00087 void drawbottomtri(int x1, int y1, int x2, int y2, int x3, int y3, unsigned int color);
00089 void drawtri(int x1, int y1, int x2, int y2, int x3, int y3, unsigned int color);
00091 void drawhline(int x, int x2, int y, unsigned int color);
00093 int w,h;
00095 grapRect rect;
00097 SDL_Surface *front;
00098 };
00099 }
00100 #endif