____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stratagus.h"
#include "video.h"
#include "intern_video.h"
Go to the source code of this file.
Namespaces | |
| namespace | linedraw_sdl |
| namespace | linedraw_gl |
Defines | |
| #define | ClipCodeInside 0 |
| Clipping inside rectangle. | |
| #define | ClipCodeAbove 1 |
| Clipping above rectangle. | |
| #define | ClipCodeBelow 2 |
| Clipping below rectangle. | |
| #define | ClipCodeLeft 4 |
| Clipping left rectangle. | |
| #define | ClipCodeRight 8 |
| Clipping right rectangle. | |
Functions | |
| static void | linedraw_sdl::VideoDoDrawPixel16 (Uint32 color, int x, int y) |
| void | linedraw_sdl::VideoDrawPixel16 (Uint32 color, int x, int y) |
| static void | linedraw_sdl::VideoDoDrawPixel32 (Uint32 color, int x, int y) |
| void | linedraw_sdl::VideoDrawPixel32 (Uint32 color, int x, int y) |
| static void | linedraw_sdl::VideoDoDrawTransPixel16 (Uint32 color, int x, int y, unsigned char alpha) |
| void | linedraw_sdl::VideoDrawTransPixel16 (Uint32 color, int x, int y, unsigned char alpha) |
| static void | linedraw_sdl::VideoDoDrawTransPixel32 (Uint32 color, int x, int y, unsigned char alpha) |
| void | linedraw_sdl::VideoDrawTransPixel32 (Uint32 color, int x, int y, unsigned char alpha) |
| static void | linedraw_sdl::VideoDoDrawPixelClip (Uint32 color, int x, int y) |
| void | linedraw_sdl::DrawPixelClip (Uint32 color, int x, int y) |
| static void | linedraw_sdl::VideoDoDrawTransPixelClip (Uint32 color, int x, int y, unsigned char alpha) |
| void | linedraw_sdl::DrawTransPixelClip (Uint32 color, int x, int y, unsigned char alpha) |
| void | linedraw_sdl::DrawVLine (Uint32 color, int x, int y, int height) |
| void | linedraw_sdl::DrawTransVLine (Uint32 color, int x, int y, int height, unsigned char alpha) |
| void | linedraw_sdl::DrawVLineClip (Uint32 color, int x, int y, int height) |
| void | linedraw_sdl::DrawTransVLineClip (Uint32 color, int x, int y, int height, unsigned char alpha) |
| void | linedraw_sdl::DrawHLine (Uint32 color, int x, int y, int width) |
| void | linedraw_sdl::DrawHLineClip (Uint32 color, int x, int y, int width) |
| void | linedraw_sdl::DrawTransHLine (Uint32 color, int x, int y, int width, unsigned char alpha) |
| void | linedraw_sdl::DrawTransHLineClip (Uint32 color, int x, int y, int width, unsigned char alpha) |
| void | linedraw_sdl::DrawLine (Uint32 color, int sx, int sy, int dx, int dy) |
| void | linedraw_sdl::DrawLineClip (Uint32 color, int sx, int sy, int dx, int dy) |
| void | linedraw_sdl::DrawTransLine (Uint32 color, int sx, int sy, int dx, int dy, unsigned char alpha) |
| void | linedraw_sdl::DrawTransLineClip (Uint32 color, int sx, int sy, int dx, int dy, unsigned char alpha) |
| void | linedraw_sdl::DrawRectangle (Uint32 color, int x, int y, int w, int h) |
| void | linedraw_sdl::DrawRectangleClip (Uint32 color, int x, int y, int w, int h) |
| void | linedraw_sdl::DrawTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | linedraw_sdl::DrawTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | linedraw_sdl::FillRectangle (Uint32 color, int x, int y, int w, int h) |
| void | linedraw_sdl::FillRectangleClip (Uint32 color, int x, int y, int w, int h) |
| void | linedraw_sdl::FillTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | linedraw_sdl::FillTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | linedraw_sdl::DrawCircle (Uint32 color, int x, int y, int r) |
| void | linedraw_sdl::DrawTransCircle (Uint32 color, int x, int y, int r, unsigned char alpha) |
| void | linedraw_sdl::DrawCircleClip (Uint32 color, int x, int y, int r) |
| void | linedraw_sdl::DrawTransCircleClip (Uint32 color, int x, int y, int r, unsigned char alpha) |
| void | linedraw_sdl::FillCircle (Uint32 color, int x, int y, int r) |
| void | linedraw_sdl::FillTransCircle (Uint32 color, int x, int y, int r, unsigned char alpha) |
| void | linedraw_sdl::FillCircleClip (Uint32 color, int x, int y, int r) |
| void | linedraw_sdl::FillTransCircleClip (Uint32 color, int x, int y, int r, unsigned char alpha) |
| void | linedraw_sdl::InitLineDraw (void) |
| Simply invalidates whole window or screen. | |
| void | linedraw_gl::DrawPixel (Uint32 color, int x, int y) |
| void | linedraw_gl::DrawTransPixel (Uint32 color, int x, int y, unsigned char alpha) |
| void | linedraw_gl::DrawPixelClip (Uint32 color, int x, int y) |
| void | linedraw_gl::DrawTransPixelClip (Uint32 color, int x, int y, unsigned char alpha) |
| void | linedraw_gl::DrawHLine (Uint32 color, int x, int y, int width) |
| void | linedraw_gl::DrawTransHLine (Uint32 color, int x, int y, int width, unsigned char alpha) |
| void | linedraw_gl::DrawHLineClip (Uint32 color, int x, int y, int width) |
| void | linedraw_gl::DrawTransHLineClip (Uint32 color, int x, int y, int width, unsigned char alpha) |
| void | linedraw_gl::DrawVLine (Uint32 color, int x, int y, int height) |
| void | linedraw_gl::DrawTransVLine (Uint32 color, int x, int y, int height, unsigned char alpha) |
| void | linedraw_gl::DrawVLineClip (Uint32 color, int x, int y, int height) |
| void | linedraw_gl::DrawTransVLineClip (Uint32 color, int x, int y, int height, unsigned char alpha) |
| void | linedraw_gl::DrawLine (Uint32 color, int x1, int y1, int x2, int y2) |
| static int | linedraw_gl::ClipCodeLine (int x, int y) |
| static int | linedraw_gl::LineIsUnclippedOnSameSide (int code1, int code2) |
| static int | linedraw_gl::LineIsUnclipped (int code1, int code2) |
| void | linedraw_gl::DrawLineClip (Uint32 color, int x1, int y1, int x2, int y2) |
| void | linedraw_gl::DrawTransLine (Uint32 color, int sx, int sy, int dx, int dy, unsigned char alpha) |
| void | linedraw_gl::DrawTransLineClip (Uint32 color, int sx, int sy, int dx, int dy, unsigned char alpha) |
| void | linedraw_gl::DrawRectangle (Uint32 color, int x, int y, int w, int h) |
| void | linedraw_gl::DrawTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | linedraw_gl::DrawRectangleClip (Uint32 color, int x, int y, int w, int h) |
| void | linedraw_gl::DrawTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | linedraw_gl::FillRectangle (Uint32 color, int x, int y, int w, int h) |
| void | linedraw_gl::FillTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | linedraw_gl::FillRectangleClip (Uint32 color, int x, int y, int w, int h) |
| void | linedraw_gl::FillTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | linedraw_gl::DrawCircle (Uint32 color, int x, int y, int radius) |
| void | linedraw_gl::DrawCircleClip (Uint32 color, int x, int y, int radius) |
| void | linedraw_gl::DrawTransCircle (Uint32 color, int x, int y, int radius, unsigned char alpha) |
| void | linedraw_gl::DrawTransCircleClip (Uint32 color, int x, int y, int radius, unsigned char alpha) |
| void | linedraw_gl::FillCircle (Uint32 color, int x, int y, int radius) |
| void | linedraw_gl::FillTransCircle (Uint32 color, int x, int y, int radius, unsigned char alpha) |
| void | linedraw_gl::FillCircleClip (Uint32 color, int x, int y, int radius) |
| void | linedraw_gl::FillTransCircleClip (Uint32 color, int x, int y, int radius, unsigned char alpha) |
| void | linedraw_gl::InitLineDraw (void) |
| Simply invalidates whole window or screen. | |
| void | InitLineDraw (void) |
| Simply invalidates whole window or screen. | |
Variables | |
| void(* | linedraw_sdl::VideoDrawPixel )(Uint32 color, int x, int y) |
| static void(* | linedraw_sdl::VideoDoDrawPixel )(Uint32 color, int x, int y) |
| void(* | linedraw_sdl::VideoDrawTransPixel )(Uint32 color, int x, int y, unsigned char alpha) |
| static void(* | linedraw_sdl::VideoDoDrawTransPixel )(Uint32 color, int x, int y, unsigned char alpha) |
Definition in file linedraw.cpp.
| #define ClipCodeAbove 1 |
Clipping above rectangle.
Definition at line 55 of file linedraw.cpp.
Referenced by linedraw_gl::ClipCodeLine(), and linedraw_gl::DrawLineClip().
| #define ClipCodeBelow 2 |
Clipping below rectangle.
Definition at line 56 of file linedraw.cpp.
Referenced by linedraw_gl::ClipCodeLine(), and linedraw_gl::DrawLineClip().
| #define ClipCodeInside 0 |
Clipping inside rectangle.
Bitmask, denoting a postion left/right/above/below clip rectangle (mainly used by VideoDrawLineClip)
Definition at line 54 of file linedraw.cpp.
Referenced by linedraw_gl::ClipCodeLine().
| #define ClipCodeLeft 4 |
Clipping left rectangle.
Definition at line 57 of file linedraw.cpp.
Referenced by linedraw_gl::ClipCodeLine(), and linedraw_gl::DrawLineClip().
| #define ClipCodeRight 8 |
Clipping right rectangle.
Definition at line 58 of file linedraw.cpp.
Referenced by linedraw_gl::ClipCodeLine().
| void InitLineDraw | ( | void | ) |
Simply invalidates whole window or screen.
Initialize line draw
Definition at line 2175 of file linedraw.cpp.
References linedraw_sdl::InitLineDraw(), linedraw_gl::InitLineDraw(), and UseOpenGL.
Referenced by InitVideo().
1.5.6