22#ifndef WAYNESWORLD_GRAPHICS_H
23#define WAYNESWORLD_GRAPHICS_H
25#include "waynesworld/waynesworld.h"
26#include "graphics/surface.h"
28namespace WaynesWorld {
39 void frameRect(
int x1,
int y1,
int x2,
int y2,
byte color);
40 void fillSquare(
int x,
int y,
int length,
byte color);
41 void fillRect(
int x1,
int y1,
int x2,
int y2,
byte color);
42 void clear(
byte color);
50 void loadFromFile(
const char *filename);
51 void drawText(
Graphics::Surface *surface,
const char *text,
int x,
int y,
byte color);
52 void drawWrappedText(
Graphics::Surface *surface,
const char *text,
int x,
int y,
int maxWidth,
byte color);
54 int getTextWidth(
const char *text)
const;
55 int getCharWidth(
byte ch)
const;
59 uint16 *_charTable =
nullptr;
60 byte *_fontData =
nullptr;
62 int16 _formHeight = 0;
76 void frameRect(
int x1,
int y1,
int x2,
int y2,
byte color);
77 void fillSquare(
int x,
int y,
int length,
byte color);
78 void fillRect(
int x1,
int y1,
int x2,
int y2,
byte color);
79 void clear(
byte color);
80 void drawText(
GFTFont *font,
const char *text,
int x,
int y,
byte color);
81 void drawWrappedText(
GFTFont *font,
const char *text,
int x,
int y,
int maxWidth,
byte color);
82 void saveScreenshot();
93 void drawSpiralEffect();
94 void drawRandomEffect();
99 int _grainWidth, _grainHeight;
100 int _blockCountW, _blockCountH;
102 uint32 _timePerSlice;
103 uint32 _totalSliceTicks = 0;
105 void drawBlock(
int blockX,
int blockY);
106 static uint getBitCount(
int value);
107 uint getSeed(uint bitCount)
const;
Definition: graphics.h:45
Definition: graphics.h:89
Definition: graphics.h:65
Definition: graphics.h:30
Definition: waynesworld.h:112