Crystal Space
Welcome,
Guest
. Please
login
or
register
.
May 25, 2013, 10:08:49 am
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
9224
Posts in
2230
Topics by
5389
Members
Latest Member:
Sandradhernandez
Crystal Space
Crystal Space Development
Support
LoadMapFile doesn't work
« previous
next »
Pages:
[
1
]
Author
Topic: LoadMapFile doesn't work (Read 4547 times)
Adrian
Newbie
Posts: 7
LoadMapFile doesn't work
«
on:
April 16, 2006, 04:44:23 pm »
Hi
I am new to CrystalSpace, and I am trying the tutorials in the docs.
I've compiled and run successfully the first tutorial (4.2), but when I run the second tutorial 4.2.3 (Map loading), I get the error
"Could not load level" followed by a program crash. I've tried with other levels, and got the same result.
This is the code:
-------------------------------------
bool Simple::LoadMap ()
{
// Set VFS current directory to the level we want to load.
csRef<iVFS> VFS (csQueryRegistry<iVFS> (object_reg));
VFS->ChDir ("/lev/flarge")
// Load the level file which is called 'world'.
if (!loader->LoadMapFile ("world"))
ReportError("Error couldn't load level!");
return true;
}
-------------------------------------
My environment:
Windows XP Professional (no service packs)
Bloodshed Dev-C++ IDE 4.9.9.2
MinGW 5.0.2
MSYS 1.0
CrystalFree Pseudo Stable 0.99
Windows Support Libraries 0.99r0_018
I don't know what to try (I am not very proficient in c++) , so any idea would be welcome
Regards
Adrian
Logged
Mick
Guest
Re: LoadMapFile doesn't work
«
Reply #1 on:
April 16, 2006, 10:01:03 pm »
it is essential that iVFS looks the path given in vfs.cfg (standard: VFS.Mount.lev/flarge = $@data$/flarge$/ )
Look inside vfs.cfg for more information.
I suppose so.
greets,
Mick
Logged
Adrian
Newbie
Posts: 7
Re: LoadMapFile doesn't work
«
Reply #2 on:
April 17, 2006, 05:25:46 pm »
The iVFS is ok, I've checked it with iVFS->Exists("world") and iVFS->GetCwd.
I think the problem is somewhere else...
regards
Adrian
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: LoadMapFile doesn't work
«
Reply #3 on:
April 17, 2006, 05:27:33 pm »
Quote from: Adrian on April 17, 2006, 05:25:46 pm
The iVFS is ok, I've checked it with iVFS->Exists("world") and iVFS->GetCwd.
I think the problem is somewhere else...
regards
Adrian
Where is flarge level? Are you running things from the CS dir or another dir?
Greetings,
Logged
Adrian
Newbie
Posts: 7
Re: LoadMapFile doesn't work
«
Reply #4 on:
April 17, 2006, 05:37:07 pm »
flarge is located at
C:\cs\share\crystalspace\data\maps\flarge and is mapped in vfs.cfg as
VFS.Mount.lev/flarge = $(CS_MAPDIR)$/flarge$/
My CS_MAPDIR environment variable points to C:\CS\share\crystalspace\data\maps\
I am running my app from a separate folder, not related to CS folder
Regards
Adrian
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: LoadMapFile doesn't work
«
Reply #5 on:
April 17, 2006, 05:50:23 pm »
Can you (as a test) try to run the app in the CS folder to see if that works?
Greetings,
Logged
Adrian
Newbie
Posts: 7
Re: LoadMapFile doesn't work
«
Reply #6 on:
April 17, 2006, 05:55:39 pm »
I copied the .exe to C:\CS and executed, but I got the same result
regards
Adrian
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: LoadMapFile doesn't work
«
Reply #7 on:
April 18, 2006, 07:37:25 am »
Quote from: Adrian on April 17, 2006, 05:55:39 pm
I copied the .exe to C:\CS and executed, but I got the same result
regards
Adrian
And walktest works?
Greetings,
Logged
Adrian
Newbie
Posts: 7
Re: LoadMapFile doesn't work
«
Reply #8 on:
April 18, 2006, 03:35:04 pm »
Yes, it works fine
Regards
Adrian
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: LoadMapFile doesn't work
«
Reply #9 on:
April 18, 2006, 03:40:04 pm »
Quote from: Adrian on April 18, 2006, 03:35:04 pm
Yes, it works fine
Regards
Adrian
And you set the CRYSTAL environment variable to what exactly?
Greetings,
Logged
Adrian
Newbie
Posts: 7
Re: LoadMapFile doesn't work
«
Reply #10 on:
April 18, 2006, 03:44:38 pm »
CRYSTAL=C:\CS\
When I built CrystalSpace from MSYS, I did ./configure --prefix=/C/CS
Regards
Adrian
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: LoadMapFile doesn't work
«
Reply #11 on:
April 18, 2006, 05:38:46 pm »
Quote from: Adrian on April 18, 2006, 03:44:38 pm
CRYSTAL=C:\CS\
When I built CrystalSpace from MSYS, I did ./configure --prefix=/C/CS
Regards
Adrian
Aha, if you start from msys then you must use:
CRYSTAL=/c/cs
i.e. you must use msys syntax and not dos syntax.
Greetings,
Logged
Adrian
Newbie
Posts: 7
Re: LoadMapFile doesn't work
«
Reply #12 on:
April 19, 2006, 07:28:02 pm »
Sorry, I didn't explain well. What I meant was that when compiling CS from MSYS, I told configure to install it in /C/CS. I don't execute anything from MSYS, I start the app from Windows. I tried setting CRYSTAL env variable to /C/CS/, just in case, but the problem persists.
Regards
Adrian
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Crystal Space Development
-----------------------------
=> General Crystal Space Discussion
=> Support
-----------------------------
Crystal Space Project Development
-----------------------------
=> Feature Requests
=> Plugins
=> Bug Reports
-----------------------------
Crystal Space Development
-----------------------------
=> Game Content Creation
-----------------------------
Miscellaneous
-----------------------------
=> Article/Tutorial Requests
=> Article/Tutorial Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Development Discussion
-----------------------------
Crystal Space Projects
-----------------------------
=> Project Discussion
=> WIP Projects
=> Finished Projects
-----------------------------
Associate Projects
-----------------------------
=> CEL Discussion
=> Crystal Core Discussion
=> CrystalBlend Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Google Summer of Code
-----------------------------
Associate Projects
-----------------------------
=> Apricot (Open Game)
=> Ares Project
Loading...