Commit 7f53689f authored by Jack's avatar Jack
Browse files

fixes for OpenDingux first OPK release

parent 08ea5a41
......@@ -4,6 +4,7 @@ Name=retro-8
Comment=PICO-8 Emulator
Terminal=false
StartupNotify=true
Exec=retro8
Exec=retro8 %f
Icon=icon
Categories=emulator;
Categories=emulators;
X-OD-Filter=.png,.p8
data/pico8_font.png

1020 Bytes | W: | H:

data/pico8_font.png

645 Bytes | W: | H:

data/pico8_font.png
data/pico8_font.png
data/pico8_font.png
data/pico8_font.png
  • 2-up
  • Swipe
  • Onion skin
rm -rf opk
mkdir -p opk
cp opendingux/retro8 opk
cp vs2017/retro8/api.lua opk
cp ../data/default.gcw0.desktop opk
cp ../data/pico8_font.png opk
cp ../data/icon.png opk
mksquashfs opk retro8.opk -all-root -noappend -no-exports -no-xattrs -no-progress > /dev/null
# rm -rf opk
......@@ -28,6 +28,8 @@ void ui::ViewManager::deinit()
bool ui::ViewManager::loadData()
{
SDL_Surface* font = IMG_Load("pico8_font.png");
assert(font);
machine.font().load(font);
_font = SDL_CreateTextureFromSurface(_renderer, font);
......
......@@ -19,7 +19,7 @@ void ColorTable::init(SDL_PixelFormat* format)
void Font::load(SDL_Surface* surface)
{
assert(surface->w == SPRITE_WIDTH * FONT_GLYPHS_COLUMNS && surface->h == SPRITE_HEIGHT * FONT_GLYPHS_ROWS);
//assert(surface->w == SPRITE_WIDTH * FONT_GLYPHS_COLUMNS && surface->h == SPRITE_HEIGHT * FONT_GLYPHS_ROWS);
for (size_t gy = 0; gy < FONT_GLYPHS_ROWS; ++gy)
for (size_t gx = 0; gx < FONT_GLYPHS_COLUMNS; ++gx)
......
......@@ -9,6 +9,7 @@
#include <SDL.h>
#include <array>
#include <random>
#include <cstring>
namespace retro8
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment