Show region on cover page

This commit is contained in:
Ilari Liusvaara 2013-01-08 07:15:06 +02:00
parent 656df5d52c
commit 513161f296
4 changed files with 20 additions and 0 deletions

View file

@ -3,6 +3,7 @@
#include <string>
#include <cstdlib>
#include <vector>
void cover_render_character(void* fb, unsigned x, unsigned y, uint32_t ch, uint32_t fg, uint32_t bg, size_t w,
size_t h, size_t istride, size_t pstride);
@ -10,5 +11,6 @@ void cover_render_string(void* fb, unsigned x, unsigned y, const std::string& st
size_t w, size_t h, size_t istride, size_t pstride);
void cover_next_position(uint32_t ch, unsigned& x, unsigned& y);
void cover_next_position(const std::string& ch, unsigned& x, unsigned& y);
std::vector<std::string> cover_information();
#endif

View file

@ -971,6 +971,11 @@ namespace
name << ch;
}
cover_render_string(cover_fbmem, 0, 16, name.str(), 0x7FFFF, 0x00000, 512, 448, 2048, 4);
unsigned y = 32;
for(auto i : cover_information()) {
cover_render_string(cover_fbmem, 0, y, i, 0x7FFFF, 0x00000, 512, 448, 2048, 4);
y += 16;
}
}
/*

View file

@ -350,6 +350,11 @@ namespace
cover_render_string(cover_fbmem, 0, 0, ident, 0xFFFFFF, 0x00000, 480, 432, 1920, 4);
cover_render_string(cover_fbmem, 0, 16, "Internal ROM name: " + get_cartridge_name(),
0xFFFFFF, 0x00000, 480, 432, 1920, 4);
unsigned y = 32;
for(auto i : cover_information()) {
cover_render_string(cover_fbmem, 0, y, i, 0xFFFFFF, 0x000000, 480, 432, 1920, 4);
y += 16;
}
}
unsigned world_compatible[] = {0, UINT_MAX};

View file

@ -1,3 +1,4 @@
#include "core/moviedata.hpp"
#include "interface/cover.hpp"
#include "library/minmax.hpp"
#include "library/utf8.hpp"
@ -121,3 +122,10 @@ void cover_next_position(const std::string& str, unsigned& x, unsigned& y)
spos++;
}
}
std::vector<std::string> cover_information()
{
std::vector<std::string> ret;
ret.push_back("Region: " + our_rom->region->get_hname());
return ret;
}