Maybe an internal CS bug or restriction.
2007/5/28, Jim Sager <[EMAIL PROTECTED]>:
Crystal Space version 1.0.1, last updated 15 Februari 2007
I went from castle to castle just to test.
*Nagy József <[EMAIL PROTECTED]>* wrote:
Hmmm, what is your CS version? And, why do you try go from castle to
castle?
2007/5/28, Jim Sager <[EMAIL PROTECTED]>:
>
> I was able to go from flarge to castle using this code. Thank you. I
> should be set to use this code in my game.
>
> However, if I tried to go from castle to castle, I got some errors:
> Popup error:crystalspace.maploader.parse.trigger : Duplicate sequence '
> LaIpoLamp.014' ! [node:world,sequences(name=LaIpoLamp.014)]
> I click OK
> I get another popup error: CrystalSpace.SimpleMap: Error couldn't load
> level!
> The above error comes from the code error given in the bottom code.
> Console errors:
> crystalspace.renderloop.loop.loader:
> Couldn't register render loop 'std_rloop_diffuse'. Maybe a loop of the
> same
> name already exists?
> [node: params]
> Warning: Missing charsets in String to FontSet conversion
> crystalspace.maploader.parse.trigger: Duplicate sequence 'LaIpoLamp.014
> '!
> crystalspace.maploader.parse.trigger: [node:
> world,sequences,sequence(name=LaIpoLamp.014)]
> Warning: Missing charsets in String to FontSet conversion
> CrystalSpace.SimpleMap: Error couldn't load level!
>
>
> If I tried to go from flarge to flarge, I got some errors:
> Popup error: crystalspace.maploader.parse.trigger: Duplicate sequence
> 'fogloop'! [node: world,sequences,sequence(name=fogloop)]
> I click OK
> I get another popup error: CrystalSpace.SimpleMap: Error couldn't load
> level!
> The above error comes from the code error given in the bottom code.
> Console errors:
> crystalspace.renderloop.loop.loader :
> Couldn't register render loop 'std_rloop_diffuse'. Maybe a loop of the
> same
> name already exists?
> [node: params]
> Warning: Missing charsets in String to FontSet conversion
> crystalspace.maploader.parse.trigger : Duplicate sequence 'fogloop'!
> crystalspace.maploader.parse.trigger: [node:
> world,sequences,sequence(name=fogloop)]
> Warning: Missing charsets in String to FontSet conversion
> CrystalSpace.SimpleMap: Error couldn't load level!
>
>
>
>
>
>
>
> *Nagy József <[EMAIL PROTECTED]>* wrote:
>
> I used this code to load new levels:
>
> bool cimGame::LoadMap (const char* mapname)
> {
> //Delete the engine's content.
>
> engine->DeleteAll();
>
> // Set VFS current directory to the level we want to load.
>
> csRef<iVFS> VFS (CS_QUERY_REGISTRY (GetObjectRegistry (), iVFS));
> VFS->ChDir (mapname);
> // Load the level file which is called 'world'.
>
> if (!loader->LoadMapFile ("world"))
>
> ReportError("Error couldn't load level!");
>
> // Initialize collision objects for all loaded objects.
> csColliderHelper::InitializeCollisionWrappers (cdsys, engine);
>
>
> // Let the engine prepare all lightmaps for use and also free all images
>
> // that were
> loaded for the texture manager.
> engine->Prepare ();
>
> // Find the starting position in this level.
>
> csVector3 pos (0);
> if (engine->GetCameraPositions ()->GetCount () >
> 0)
>
> {
> // There is a valid starting position defined in the level file.
> iCameraPosition* campos = engine->GetCameraPositions ()->Get (0);
>
> room = engine->GetSectors ()->FindByName (campos->GetSector ());
>
> pos = campos->GetPosition ();
> }
> else
> {
> // We didn't find a valid starting position. So we default
>
> // to going to room called 'room' at position (0,0,0).
>
> room = engine->GetSectors ()->FindByName ("room");
> pos = csVector3 (0, 0, 0);
> }
> if (!room)
>
> ReportError("Can't find a valid starting position!");
>
>
> // Now we need to position the camera in our world.
> view->GetCamera
> ()->SetSector (room);
> view->GetCamera ()->GetTransform ().SetOrigin (pos);
>
>
> // Initialize our collider actor.
>
> collider_actor.SetCollideSystem (cdsys);
>
> collider_actor.SetEngine (engine);
> csVector3 legs (.2f, .3f, .2f);
> csVector3 body (.2f, 1.2f, .2f);
> csVector3 shift (0, -1, 0);
> collider_actor.InitializeColliders (view->GetCamera (),
>
> legs, body, shift);
>
> return true;
> }
>
>
>
> 2007/5/28, Jim Sager < [EMAIL PROTECTED]>:
> >
> > Using the application simpmap, I would like to be able to hit the
> > downarrow key and unload "flarge", and load up "castle"
> >
> > I tried the code:
> > if (kbd->GetKeyState (CSKEY_DOWN))
> > {
> > csRef<iVFS> VFS (CS_QUERY_REGISTRY (GetObjectRegistry (), iVFS));
> > VFS->ChDir ("/lev/castle");
> > loader->LoadMapFile ("world");
> > }
> >
>
>
> Also is there a way to unload "EVERYTHING" in the engine and start
> > from scratch?
>
>
> Yes, use the IEngine->DeleteAll() function.
>
>
> If not, I'll have to take careful measure to deallocate all the memory
> > before loading the new world.
> >
> > ,CrazyJim
> > ------------------------------
> > Luggage? GPS? Comic books?
> > Check out fitting gifts for grads
> >
<http://us.rd.yahoo.com/evt=48249/*http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz>at
Yahoo! Search.
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Crystal-main mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/crystal-main
> > Unsubscribe: mailto: [EMAIL PROTECTED]
> > ?subject=unsubscribe
> >
> >
>
>
> --
> Jocó
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
>
>
http://sourceforge.net/powerbar/db2/_______________________________________________
> Crystal-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crystal-main
> Unsubscribe: mailto:[EMAIL PROTECTED]
>
>
>
> ------------------------------
> Pinpoint customers
>
<http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50>who
> are looking for what you sell.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Crystal-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crystal-main
> Unsubscribe: mailto:[EMAIL PROTECTED]
> ?subject=unsubscribe
>
>
--
Jocó
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]
?subject=unsubscribe
------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green
Center.<http://us.rd.yahoo.com/evt=48246/*http://autos.yahoo.com/green_center/;_ylc=X3oDMTE5cDF2bXZzBF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDZ3JlZW4tY2VudGVy>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]
?subject=unsubscribe
--
Jocó
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]