1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 17:41:52 +02:00

rematch files to orig source

Signed-off-by: Mirko Lindner <mirko@sharism.cc>
This commit is contained in:
Mirko Lindner 2010-02-22 10:16:09 +01:00
parent e2f5df5a43
commit db603afc4c
2 changed files with 2 additions and 14 deletions

View File

@ -1,6 +1,5 @@
#include "pxml.h" #include "pxml.h"
#include "tinyxml/tinyxml.h" #include "tinyxml/tinyxml.h"
#include <sstream>
using namespace std; using namespace std;
@ -9,7 +8,7 @@ PXml::PXml(string file) {
error = title = description = authorName = authorWebsite = category = exec = icon = ""; error = title = description = authorName = authorWebsite = category = exec = icon = "";
version = osVersion = (SoftwareVersion){0,0,0,0}; version = osVersion = (SoftwareVersion){0,0,0,0};
TiXmlDocument doc(file.c_str()); TiXmlDocument doc(file);
if (doc.LoadFile()) { if (doc.LoadFile()) {
TiXmlHandle hDoc(&doc); TiXmlHandle hDoc(&doc);
TiXmlElement* pElem; TiXmlElement* pElem;

View File

@ -72,10 +72,8 @@ void SFontPlus::initFont(SDL_Surface *font, string characters) {
freeFont(); freeFont();
this->characters = characters; this->characters = characters;
if (font==NULL) return; if (font==NULL) return;
cout << "check 1" << endl;
surface = font; surface = font;
Uint32 pink = SDL_MapRGB(surface->format, 255,0,255); Uint32 pink = SDL_MapRGB(surface->format, 255,0,255);
cout << "check 2" << endl;
#ifdef _DEBUG #ifdef _DEBUG
bool utf8 = false; bool utf8 = false;
for (uint x=0; x<characters.length(); x++) { for (uint x=0; x<characters.length(); x++) {
@ -87,7 +85,6 @@ cout << "check 2" << endl;
uint c = 0; uint c = 0;
SDL_LockSurface(surface); SDL_LockSurface(surface);
cout << "check 3" << endl;
for (uint x=0; x<(uint)surface->w && c<characters.length(); x++) { for (uint x=0; x<(uint)surface->w && c<characters.length(); x++) {
if (getPixel(x,0) == pink) { if (getPixel(x,0) == pink) {
uint startx = x; uint startx = x;
@ -107,27 +104,19 @@ cout << "check 2" << endl;
c++; c++;
} }
} }
cout << "check 4" << endl; SDL_UnlockSurface(surface);
cout << "check 5x" << endl;
Uint32 colKey = getPixel(0,surface->h-1); Uint32 colKey = getPixel(0,surface->h-1);
cout << "check 5.1" << endl;
SDL_SetColorKey(surface, SDL_SRCCOLORKEY, colKey); SDL_SetColorKey(surface, SDL_SRCCOLORKEY, colKey);
cout << "check 5.2" << endl;
string::size_type pos = characters.find("0")*2; 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}; SDL_Rect srcrect = {charpos[pos], 1, charpos[pos+2] - charpos[pos], surface->h-1};
cout << "check 5.4" << endl;
uint y = srcrect.h+1; uint y = srcrect.h+1;
cout << "check 5.5" << endl;
bool nonKeyFound = false; bool nonKeyFound = false;
cout << "check 6" << endl;
while (y-->0 && !nonKeyFound) { while (y-->0 && !nonKeyFound) {
uint x = srcrect.w+1; uint x = srcrect.w+1;
while (x-->0 && !nonKeyFound) while (x-->0 && !nonKeyFound)
nonKeyFound = getPixel(x+srcrect.x,y+srcrect.y) != colKey; nonKeyFound = getPixel(x+srcrect.x,y+srcrect.y) != colKey;
} }
lineHeight = y+1; lineHeight = y+1;
SDL_UnlockSurface(surface);
} }
void SFontPlus::freeFont() { void SFontPlus::freeFont() {