Files
RP411/MUNGA_L4/L4VB8.h
T
CydandClaude Opus 4.8 4abbf8879f Initial import of Red Planet v4.10 Win32 source
Imports the current Win32 source for the pod-racing game 'Red Planet',
built on the MUNGA engine and its L4 (Win32/DirectX) platform layer:

- MUNGA / MUNGA_L4: cross-platform engine core and Win32 backend
- RP / RP_L4: Red Planet game logic and Win32 application
- DivLoader, Setup1: asset loader and installer project
- lib, MUNGA_L4/openal, MUNGA_L4/sos: third-party audio dependencies

Removed stale Subversion metadata and added .gitignore/.gitattributes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 07:59:51 -05:00

261 lines
4.7 KiB
C++

#pragma once
#include "..\munga\graph2d.h"
//########################################################################
//######################### Video8BitBuffered ###########################
//########################################################################
//
// X/Y values passed to these routines are assumed to be in
// the VIDEO DISPLAY COORDINATE SYSTEM, with (0,0) at the top left.
//
class Video8BitBuffered :
public GraphicsDisplay
{
public:
Video8BitBuffered(int x, int y);
Video8BitBuffered(PixelMap8 *pixel_map);
~Video8BitBuffered();
Logical
TestInstance() const;
void
ShowInstance(char *indent);
void
DrawPoint(
int color,
int bitmask,
Enumeration operation,
int x, int y
);
void
DrawLine(
int color,
int bitmask,
Enumeration operation,
int x1, int y1,
int x2, int y2,
Logical include_last_pixel
);
void
DrawFilledRectangle(
int color,
int bitmask,
Enumeration operation,
int x1, int y1,
int x2, int y2
);
void
DrawText(
int color,
int bitmask,
Enumeration operation,
Logical opaque,
int rotation,
Enumeration fontNumber,
Logical vertical,
GraphicsDisplay::Justification justification,
Rectangle2D *clippingRectanglePtr,
char *stringPointer
);
void
DrawBitMap(
int color,
int bitmask,
Enumeration operation,
int rotation,
int x, int y,
BitMap *bitmap,
int sx1, int sy1, int sx2, int sy2 // these are SOURCE coordinates
);
void
DrawBitMapOpaque(
int color,
int background,
int bitmask,
Enumeration operation,
int rotation,
int x, int y,
BitMap *bitmap,
int sx1, int sy1, int sx2, int sy2 // these are SOURCE coordinates
);
void
DrawPixelMap8(
int *translation_table,
int bitmask,
Enumeration operation,
Logical opaque,
int rotation,
int x, int y,
PixelMap8 *pixelmap,
int sx1, int sy1, int sx2, int sy2 // these are SOURCE coordinates
);
void
DrawPixelMap8SingleColor(
int color,
int bitmask,
Enumeration operation,
int rotation,
int x, int y,
PixelMap8 *pixelmap,
int sx1, int sy1, int sx2, int sy2 // these are SOURCE coordinates
);
protected:
void
MarkChangedLines(int screenTop, int screenBottom);
void
buildDestPointer(
int x, int y,
Byte **pixelPointer
);
Logical
valid,
createdPixelmap;
int
width,
height,
maximumX,
maximumY;
public:
PixelMap8
*pixelBuffer;
protected:
Word
*changedLine;
};
//########################################################################
//########################## L4BytePort ##############################
//########################################################################
//
// X/Y values passed to these routines are assumed to be in
// the GRAPHICS COORDINATE SYSTEM, with (0,0) at the bottom left.
//
class L4BytePort :
public GraphicsPort
{
public:
L4BytePort(
Video8BitBuffered *graphics_display,
const char *name,
int rotation
);
~L4BytePort();
Logical
TestInstance() const;
void
ShowInstance(char *indent);
void
DrawPoint(
int color,
Enumeration operation,
int x, int y
);
void
DrawLine(
int color,
Enumeration operation,
int x1, int y1,
int x2, int y2,
Logical include_last_pixel
);
void
DrawFilledRectangle(
int color,
Enumeration operation,
int x1, int y1,
int x2, int y2
);
void
DrawText(
int color,
Enumeration operation,
Logical opaque,
int rotation,
Enumeration fontNumber,
Logical vertical,
GraphicsDisplay::Justification justification,
Rectangle2D *clippingRectanglePtr,
char *stringPointer
);
void
DrawBitMap(
int color,
Enumeration operation,
int rotation,
int x, int y,
BitMap *bitmap,
int sx1, int sy1, int sx2, int sy2 // these are SOURCE coordinates
);
void
DrawBitMapOpaque(
int color,
int background,
Enumeration operation,
int rotation,
int x, int y,
BitMap *bitmap,
int sx1, int sy1, int sx2, int sy2 // these are SOURCE coordinates
);
void
DrawPixelMap8(
Enumeration operation,
Logical opaque,
int rotation,
int x, int y,
PixelMap8 *pixelmap,
int sx1, int sy1, int sx2, int sy2 // these are SOURCE coordinates
);
void
DrawPixelMap8SingleColor(
int color,
Enumeration operation,
int rotation,
int x, int y,
PixelMap8 *pixelmap,
int sx1, int sy1, int sx2, int sy2 // these are SOURCE coordinates
);
protected:
void
convertPortPair(
int *xp,
int *yp,
int x,
int y
);
//------------------------------------------------------------
// Protected data
//------------------------------------------------------------
int
baseRotation,
maximumX,
maximumY;
};