mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 07:02:29 +02:00
debug output for launch error
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
This commit is contained in:
parent
454e080477
commit
d460849575
@ -72,10 +72,10 @@ void SFontPlus::initFont(SDL_Surface *font, string characters) {
|
||||
freeFont();
|
||||
this->characters = characters;
|
||||
if (font==NULL) return;
|
||||
|
||||
cout << "check 1" << endl;
|
||||
surface = font;
|
||||
Uint32 pink = SDL_MapRGB(surface->format, 255,0,255);
|
||||
|
||||
cout << "check 2" << endl;
|
||||
#ifdef _DEBUG
|
||||
bool utf8 = false;
|
||||
for (uint x=0; x<characters.length(); x++) {
|
||||
@ -87,6 +87,7 @@ void SFontPlus::initFont(SDL_Surface *font, string characters) {
|
||||
uint c = 0;
|
||||
|
||||
SDL_LockSurface(surface);
|
||||
cout << "check 3" << endl;
|
||||
for (uint x=0; x<(uint)surface->w && c<characters.length(); x++) {
|
||||
if (getPixel(x,0) == pink) {
|
||||
uint startx = x;
|
||||
@ -106,14 +107,21 @@ void SFontPlus::initFont(SDL_Surface *font, string characters) {
|
||||
c++;
|
||||
}
|
||||
}
|
||||
cout << "check 4" << endl;
|
||||
SDL_UnlockSurface(surface);
|
||||
cout << "check 5x" << endl;
|
||||
Uint32 colKey = getPixel(0,surface->h-1);
|
||||
cout << "check 5.1" << endl;
|
||||
SDL_SetColorKey(surface, SDL_SRCCOLORKEY, colKey);
|
||||
|
||||
cout << "check 5.2" << endl;
|
||||
string::size_type pos = characters.find("0")*2;
|
||||
cout << "check 5.3" << endl;
|
||||
SDL_Rect srcrect = {charpos[pos], 1, charpos[pos+2] - charpos[pos], surface->h-1};
|
||||
cout << "check 5.4" << endl;
|
||||
uint y = srcrect.h+1;
|
||||
cout << "check 5.5" << endl;
|
||||
bool nonKeyFound = false;
|
||||
cout << "check 6" << endl;
|
||||
while (y-->0 && !nonKeyFound) {
|
||||
uint x = srcrect.w+1;
|
||||
while (x-->0 && !nonKeyFound)
|
||||
|
Loading…
Reference in New Issue
Block a user