Skip to content

Instantly share code, notes, and snippets.

@drdnar
Created June 6, 2021 02:49
Show Gist options
  • Save drdnar/717d12bb9d941ce617278b2188d14630 to your computer and use it in GitHub Desktop.
Save drdnar/717d12bb9d941ce617278b2188d14630 to your computer and use it in GitHub Desktop.
Magically initialize GraphX
#include <graphx.h>
#include "style.h"
#include "gfx/gfx.h"
class GraphX
{
public:
GraphX(void)
{
gfx_Begin();
gfx_SetPalette(Palette_Global, sizeof_Palette_Global, 0);
gfx_SetTransparentColor(COLOR_TRANSPARENT);
gfx_FillScreen(COLOR_ZERO);
}
~GraphX() { gfx_End(); }
} instance;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment