|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D.gnu - linux-powerpc trouble
All in all gdc works very good on my " ppc 7447/7457, altivec supported CHRP Pegasos2 GNU/Linux", but one error always comes back: I'm trying to build the famous aba-games on my machine - several build/work good. But all those which use a routine in "barrage.d" to initialize bulletml crash at the same part: http://paste.dprogramming.com/dpknqggs.php As I don't know how long my pasted entry above exists (?) - I better paste a copy here, too: ------------- public static BulletMLParserTinyXML* getInstance(char[] dirName, char[] fileName) { if (!parser[dirName][fileName]) { char[] barrageName = dirName ~ "/" ~ fileName; Logger.info("Loading BulletML: " ~ barrageName); parser[dirName][fileName] = BulletMLParserTinyXML_new(std.string.toStringz(BARRAGE_DIR_NAME ~ "/" ~ barrageName)); BulletMLParserTinyXML_parse(parser[dirName][fileName]); } return parser[dirName][fileName]; } This is a part from barrage.d from ABA-games Val&Rick. I built it with 3.4.5& gdc-0.19 It also exists in other games & they all crash in this region on a linux-powerpc system! (torustrooper, tumikifighter, (mu-cade)) The problems in similar non-aba games from http://homepage2.nifty.com/isshiki/ maybe have the same reason: these games (GradleUnsion, z-lock) build, but either shots, or enemies are missing Parsec47 uses a similar routine to handle bulletml, but there it works. Valgrind prints this line as 1st error: if (!parser[dirName][fileName]) { Would be great if someone could look into this... -------------- Thanks a lot for attention! friendly, Marcel "frostwork" Unbehaun Nov 23 2006
Marcel Unbehaun escribió:All in all gdc works very good on my " ppc 7447/7457, altivec supported CHRP Pegasos2 GNU/Linux", but one error always comes back: I'm trying to build the famous aba-games on my machine - several build/work good. But all those which use a routine in "barrage.d" to initialize bulletml crash at the same part: http://paste.dprogramming.com/dpknqggs.php As I don't know how long my pasted entry above exists (?) - I better paste a copy here, too: ------------- public static BulletMLParserTinyXML* getInstance(char[] dirName, char[] fileName) { if (!parser[dirName][fileName]) { char[] barrageName = dirName ~ "/" ~ fileName; Logger.info("Loading BulletML: " ~ barrageName); parser[dirName][fileName] = BulletMLParserTinyXML_new(std.string.toStringz(BARRAGE_DIR_NAME ~ "/" ~ barrageName)); BulletMLParserTinyXML_parse(parser[dirName][fileName]); } return parser[dirName][fileName]; } This is a part from barrage.d from ABA-games Val&Rick. I built it with 3.4.5& gdc-0.19 It also exists in other games & they all crash in this region on a linux-powerpc system! (torustrooper, tumikifighter, (mu-cade)) The problems in similar non-aba games from http://homepage2.nifty.com/isshiki/ maybe have the same reason: these games (GradleUnsion, z-lock) build, but either shots, or enemies are missing Parsec47 uses a similar routine to handle bulletml, but there it works. Valgrind prints this line as 1st error: if (!parser[dirName][fileName]) { Nov 23 2006
Hi! Thanks a lot for the fast reply! Would you please give an example of what you mean? I forgot to mention that I can't program :( friendly, Marcel Nov 23 2006
Marcel Unbehaun escribió:Hi! Thanks a lot for the fast reply! Would you please give an example of what you mean? I forgot to mention that I can't program :( friendly, Marcel Nov 23 2006
Thanks for detailed explanation! The changed code compiles but unfortunately it still crashes in the same line. :( Nov 23 2006
I just found s.th. which maybe mighty be interesting:
Before the pasted function there's a line
"if (getExt(fileName) != "xml")"
When I comment out this the game crashes later in the process:
at texture.d:28
The first lines there are
public static SDL_Surface* loadBmp(char[] name) {
if (surface[name]) {
return surface[name];
} else {
char[] fileName = imagesDir ~ name;
The crashing line 28 is "if (surface[name]) {".
When I comment out the if-else routine, the game loads till the title screen
(when starting to play it crashes, probably as of missing bulletml-stuff)
Nov 23 2006
To close this thread in case some other powerpc people are trying this: i successfully built all aba-games but mu-cade on linux-powerpc. (tumiki is unfinished though atm - i.e. the boss-routine doesn't like to work yet). i'll release my changes soon... Jan 10 2007
|