utunga / tiledggd

Automatically exported from code.google.com/p/tiledggd
0 stars 0 forks source link

Can't open .NCGR and .NCBR files #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is a very strange problem. I've to do a little introduction.

Some time ago, I changed my pc with a new one, which mounts Windows7, and
re-downloaded the program from the website.
Before that, I used to open every type of file on my old computer.

I've realized it only in this moment: on the new pc, TGDD doesn't open
graphic NDS files like .NCGR and .NCBR anymore!
I tried to open the program in Administrator mode, but nothing changes. I
also tried to open the files sliding or using the File menu: in the first
case, the program simply does nothing; in the second case, the program
shows an error message (it's in italian, but it should be understandable):

"Impossibile caricare il file o l'assembly 'LuaInterface,
Version=2.0.0.16708, Culture=neutral, PublicKeyToken=null' o una delle
relative dipendenze. Tentativo di caricare un programma con un formato non
corretto."

Basically, it says that the file format is not correct... But how could it
be?! The program shouldn't pay attention to the actual "file format", as it
opens everything!

Indeed, the strange thing is that it opens EVERY file format but these!

I don't know if it depends on the operating system, because the program
works pretty well... I tried to run TGDD in compatibility mode (XP SP3),
and also reloading the bindings, but the problem remains.
As I said, on the old pc this problem doesn't exists...
I don't know what to think.

Thanks.

Original issue reported on code.google.com by francesc...@gmail.com on 9 Jan 2010 at 7:38

GoogleCodeExporter commented 9 years ago
I think it is because you do not have the VisualC++ runtime libraries installed
(which you can download here:
http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D
-074B9F2BC1BF&displaylang=en
), as it seems the connection to the Lua library cannot be made (which is 
necessary
for NCGR and NCBR files).

There is a notice about this on the main page, but I admit it isn't very 
eye-catching.

Original comment by barubary on 9 Jan 2010 at 8:26

GoogleCodeExporter commented 9 years ago
I had already seen that notice, but I was pretty sure that I had already 
installed
those libraries... I just reinstalled them, but nothing... I also tried 
rebooting the
system, but it shows the same problem.

Original comment by francesc...@gmail.com on 9 Jan 2010 at 8:41

GoogleCodeExporter commented 9 years ago
It's a brute method, but in the end I solved erasing the headers of the NCGR 
files
with an hex editor. And now they open. The data is a little more messy, but it 
only
needs a little pixel skip.
Still, don't know why, the real problem remains.

Original comment by francesc...@gmail.com on 10 Jan 2010 at 4:21

GoogleCodeExporter commented 9 years ago
While I try to figure out why this is happening, you can use the built-in 
methods for
loading a NCGR file instead. Do this by editing Plugins.xml, and changing this:

    <Binding type="GRAPHICS" enabled="0">
        <Name>NCGR and NCBR Files</Name>
        <FilterSet method="AND">
            <Filter type="MAGIC">RGCN</Filter>
        </FilterSet>
        <Target type="METHOD">loadFileAsNCGR</Target>
    </Binding>
    <Binding type="GRAPHICS" enabled="1">
        <Name>NCGR and NCBR Files (Lua version)</Name>
        <FilterSet method="AND">
            <Filter type="MAGIC">RGCN</Filter>
        </FilterSet>
        <Target type="LUA">Graphics_NCGR.lua</Target>
    </Binding>

into this:

    <Binding type="GRAPHICS" enabled="1">
        <Name>NCGR and NCBR Files</Name>
        <FilterSet method="AND">
            <Filter type="MAGIC">RGCN</Filter>
        </FilterSet>
        <Target type="METHOD">loadFileAsNCGR</Target>
    </Binding>
    <Binding type="GRAPHICS" enabled="0">
        <Name>NCGR and NCBR Files (Lua version)</Name>
        <FilterSet method="AND">
            <Filter type="MAGIC">RGCN</Filter>
        </FilterSet>
        <Target type="LUA">Graphics_NCGR.lua</Target>
    </Binding>

(flipping the enabled="0" to enabled="1" and vice-versa)
That part of the file starts at line 17.

Original comment by barubary on 10 Jan 2010 at 10:33

GoogleCodeExporter commented 9 years ago
Hey, now it's working fine! Thank you very much!!

Original comment by francesc...@gmail.com on 11 Jan 2010 at 11:26

GoogleCodeExporter commented 9 years ago
Do you still have this problem (if you revert the above changes to 
Bindings.xml)?

If so, do you have the files lua51.dll and LuaInterface.dll in the same 
directory as TiledGGD.exe? I'm afraid that's the only solution I can come up 
with at the moment =/

Original comment by barubary on 3 Jul 2010 at 4:19

GoogleCodeExporter commented 9 years ago
Well, I didn't try reverting the changes... ><
But it works perfectly (and yes, lua51 and LuaInterface are all in the 
directory of TGGD), so I don't think it should be a problem leaving them.

Original comment by francesc...@gmail.com on 3 Jul 2010 at 8:48

GoogleCodeExporter commented 9 years ago
That's because of 32bit/64bit/ALL flag miss-match on LuaInterface.dll (32bit) 
and TiledGGD.exe (ALL). Or something like that. Both files were compiled with 
different settings. When I changed that flag on TiledGGD.exe to 32bit, this 
error was gone.
If I remember right, I've run it like this:
corflags.exe /32BIT+ TiledGGD.exe.

I hope it helps.

Original comment by ArakirSi...@gmail.com on 30 May 2012 at 11:42