OpenMortal Apocalypse mirror
Sourceforge mirror
SourceForge.net Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Toplevel design | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

sge_primitives.cpp File Reference

#include "SDL.h"
#include <math.h>
#include <string.h>
#include <stdarg.h>
#include "sge_primitives.h"
#include "sge_surface.h"

Defines

#define AAbits   8
#define AAlevels   256
#define DO_BEZIER(function)

Functions

void _HLine (SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y, Uint32 Color)
 Line functions *.
void sge_HLine (SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y, Uint32 Color)
void sge_HLine (SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y, Uint8 R, Uint8 G, Uint8 B)
void _HLineAlpha (SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y, Uint32 Color, Uint8 alpha)
void sge_HLineAlpha (SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y, Uint32 Color, Uint8 alpha)
void sge_HLineAlpha (SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void _VLine (SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2, Uint32 Color)
void sge_VLine (SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2, Uint32 Color)
void sge_VLine (SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2, Uint8 R, Uint8 G, Uint8 B)
void _VLineAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2, Uint32 Color, Uint8 alpha)
void sge_VLineAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2, Uint32 Color, Uint8 alpha)
void sge_VLineAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_DoLine (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 Color, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color))
void sge_DoLine (SDL_Surface *Surface, Sint16 X1, Sint16 Y1, Sint16 X2, Sint16 Y2, Uint8 R, Uint8 G, Uint8 B, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color))
void _Line (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
void sge_Line (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 Color)
void sge_Line (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 R, Uint8 G, Uint8 B)
void callback_alpha_hack (SDL_Surface *surf, Sint16 x, Sint16 y, Uint32 color)
void sge_LineAlpha (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 Color, Uint8 alpha)
void sge_LineAlpha (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_AALineAlpha (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, Uint8 alpha)
void sge_AALineAlpha (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 alpha)
void sge_AALine (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
void sge_AALine (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b)
void sge_Rect (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Figure functions *.
void sge_Rect (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 R, Uint8 G, Uint8 B)
void sge_RectAlpha (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, Uint8 alpha)
void sge_RectAlpha (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_FilledRect (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
void sge_FilledRect (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 R, Uint8 G, Uint8 B)
void sge_FilledRectAlpha (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, Uint8 alpha)
void sge_FilledRectAlpha (SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_DoEllipse (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color))
void sge_DoEllipse (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 R, Uint8 G, Uint8 B, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color))
void sge_Ellipse (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
void sge_Ellipse (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 R, Uint8 G, Uint8 B)
void sge_EllipseAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color, Uint8 alpha)
void sge_EllipseAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_FilledEllipse (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
void sge_FilledEllipse (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 R, Uint8 G, Uint8 B)
void sge_FilledEllipseAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color, Uint8 alpha)
void sge_FilledEllipseAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_DoCircle (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint32 color, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color))
void sge_DoCircle (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint8 R, Uint8 G, Uint8 B, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color))
void sge_Circle (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint32 color)
void sge_Circle (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint8 R, Uint8 G, Uint8 B)
void sge_CircleAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint32 color, Uint8 alpha)
void sge_CircleAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_FilledCircle (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint32 color)
void sge_FilledCircle (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint8 R, Uint8 G, Uint8 B)
void sge_FilledCircleAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint32 color, Uint8 alpha)
void sge_FilledCircleAlpha (SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_Bezier (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Sint16 x4, Sint16 y4, int level, Uint32 color)
void sge_Bezier (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Sint16 x4, Sint16 y4, int level, Uint8 R, Uint8 G, Uint8 B)
void sge_BezierAlpha (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Sint16 x4, Sint16 y4, int level, Uint32 color, Uint8 alpha)
void sge_BezierAlpha (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Sint16 x4, Sint16 y4, int level, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_AABezierAlpha (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Sint16 x4, Sint16 y4, int level, Uint32 color, Uint8 alpha)
void sge_AABezierAlpha (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Sint16 x4, Sint16 y4, int level, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha)
void sge_AABezier (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Sint16 x4, Sint16 y4, int level, Uint32 color)
void sge_AABezier (SDL_Surface *surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Sint16 x4, Sint16 y4, int level, Uint8 R, Uint8 G, Uint8 B)

Variables

Uint8 _sge_update
Uint8 _sge_lock
Uint8 _sge_alpha_hack = 0

Define Documentation

#define AAbits   8
 

#define AAlevels   256
 

#define DO_BEZIER function   ) 
 


Function Documentation

void _HLine SDL_Surface *  Surface,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint32  Color
 

Line functions *.

void _HLineAlpha SDL_Surface *  Surface,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint32  Color,
Uint8  alpha
 

void _Line SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color
 

void _VLine SDL_Surface *  Surface,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint32  Color
 

void _VLineAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint32  Color,
Uint8  alpha
 

void callback_alpha_hack SDL_Surface *  surf,
Sint16  x,
Sint16  y,
Uint32  color
 

void sge_AABezier SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Sint16  x4,
Sint16  y4,
int  level,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_AABezier SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Sint16  x4,
Sint16  y4,
int  level,
Uint32  color
 

void sge_AABezierAlpha SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Sint16  x4,
Sint16  y4,
int  level,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_AABezierAlpha SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Sint16  x4,
Sint16  y4,
int  level,
Uint32  color,
Uint8  alpha
 

void sge_AALine SDL_Surface *  dst,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b
 

void sge_AALine SDL_Surface *  dst,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color
 

void sge_AALineAlpha SDL_Surface *  dst,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  alpha
 

void sge_AALineAlpha SDL_Surface *  dst,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color,
Uint8  alpha
 

void sge_Bezier SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Sint16  x4,
Sint16  y4,
int  level,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_Bezier SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Sint16  x4,
Sint16  y4,
int  level,
Uint32  color
 

void sge_BezierAlpha SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Sint16  x4,
Sint16  y4,
int  level,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_BezierAlpha SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Sint16  x4,
Sint16  y4,
int  level,
Uint32  color,
Uint8  alpha
 

void sge_Circle SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_Circle SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint32  color
 

void sge_CircleAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_CircleAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint32  color,
Uint8  alpha
 

void sge_DoCircle SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint8  R,
Uint8  G,
Uint8  B,
void   Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color)
 

void sge_DoCircle SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint32  color,
void   Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color)
 

void sge_DoEllipse SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  R,
Uint8  G,
Uint8  B,
void   Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color)
 

void sge_DoEllipse SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color,
void   Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color)
 

void sge_DoLine SDL_Surface *  Surface,
Sint16  X1,
Sint16  Y1,
Sint16  X2,
Sint16  Y2,
Uint8  R,
Uint8  G,
Uint8  B,
void   Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color)
 

void sge_DoLine SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  Color,
void   Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color)
 

void sge_Ellipse SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_Ellipse SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color
 

void sge_EllipseAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_EllipseAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color,
Uint8  alpha
 

void sge_FilledCircle SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_FilledCircle SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint32  color
 

void sge_FilledCircleAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_FilledCircleAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  r,
Uint32  color,
Uint8  alpha
 

void sge_FilledEllipse SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_FilledEllipse SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color
 

void sge_FilledEllipseAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_FilledEllipseAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color,
Uint8  alpha
 

void sge_FilledRect SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_FilledRect SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color
 

void sge_FilledRectAlpha SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_FilledRectAlpha SDL_Surface *  surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color,
Uint8  alpha
 

void sge_HLine SDL_Surface *  Surface,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_HLine SDL_Surface *  Surface,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint32  Color
 

void sge_HLineAlpha SDL_Surface *  Surface,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_HLineAlpha SDL_Surface *  Surface,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint32  Color,
Uint8  alpha
 

void sge_Line SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_Line SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  Color
 

void sge_LineAlpha SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_LineAlpha SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  Color,
Uint8  alpha
 

void sge_Rect SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_Rect SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color
 

Figure functions *.

void sge_RectAlpha SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_RectAlpha SDL_Surface *  Surface,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color,
Uint8  alpha
 

void sge_VLine SDL_Surface *  Surface,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint8  R,
Uint8  G,
Uint8  B
 

void sge_VLine SDL_Surface *  Surface,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint32  Color
 

void sge_VLineAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint8  R,
Uint8  G,
Uint8  B,
Uint8  alpha
 

void sge_VLineAlpha SDL_Surface *  Surface,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint32  Color,
Uint8  alpha
 


Variable Documentation

Uint8 _sge_alpha_hack = 0
 

Uint8 _sge_lock
 

Uint8 _sge_update