| |
spider-j
Registered: Oct 2004 Posts: 498 |
Release id #216054 : GTUltra V1.0.3
Better take this to discussions to not flood the comments.
Quote:Can you run it from the win32 folder?
Running the exe through WINE works fine. I'd prefer a native linux build though. |
|
... 159 posts hidden. Click here to view all posts.... |
| |
Jason Page
Registered: Sep 2015 Posts: 87 |
Nope. That means I’ve broken something. It should pick up the palettes in the gtpalette folder and load them at startup
Can you confirm you’ve got a gtpalette folder with files in it within the same folder as your GTUltra.exe ? |
| |
theK
Registered: Oct 2020 Posts: 46 |
Yes, in linux the binaries is in the /linux-folder and under there there's the /gtpalettes-folder with six files 0-5. |
| |
Jason Page
Registered: Sep 2015 Posts: 87 |
OK... ANOTHER one pushed. Let me know how it goes!
I think the issue was that I had "\\" instead of "/" for file path separator. I've changed it to "/" in gpaletteeditor.c so that hopefully this now picks up all of the palette files |
| |
theK
Registered: Oct 2020 Posts: 46 |
Hmm, no. Sorry. :-/ Still no theme change.
Looking to see if I can see what's going wrong? What did you change from 1.1.6? |
| |
Jason Page
Registered: Sep 2015 Posts: 87 |
I'm sure it will be failing in the loadPalettes() method.
It checks to see if the gtpalette folder exists, and then gets the files in that folder via readdir, builds a final file path.
This then calls loadPalette(char *paletteName)
this loads the palette file and then calls readPaletteData(paletteMem); - which runs through the loaded data and sets RGB
readPaletteData is also called when loading the default palette - So this bit works. It has to be the file loaded - or how it's failing to find either the gtpalette folder or its contents where the problem is |
| |
tlr
Registered: Sep 2003 Posts: 1787 |
This happens: $ gtultra
Unable to read directory: No such file or directory
$ (regardsless of where I'm standing) |
| |
Jason Page
Registered: Sep 2015 Posts: 87 |
So, that's in loadPalettes, as suspected:
createFilename(appFileName, paletteFile, "gtpalettes");
folder = opendir(paletteFile);
if (folder == NULL)
{
jdebug[0] = 0xff;
perror("Unable to read directory");
It works for windows (or at least, for me and Lman!)
maybe for linux, it needs another "\" at the end of "gtpalettes"? |
| |
tlr
Registered: Sep 2003 Posts: 1787 |
did a little printf() debugging, appFileName is '/home/tlr/.goattrk/gtultra.cfg' on my system... |
| |
Jason Page
Registered: Sep 2015 Posts: 87 |
createFilename looks backwards through that string until it finds a / or \. It then and adds the new filename (or folder) at that point (basically, replacing the gtultra.cfg text with the new string)
Changing the perror to the following show show the folder it's trying to open..
perror(paletteFile); |
| |
Jason Page
Registered: Sep 2015 Posts: 87 |
printf does nothing when i'm using windows cmd window to build - which is the reason that debugging this whole thing has been a f**king nightmare! |
Previous - 1 | ... | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 - Next |