This site is no longer active and is available for archival purposes only. Registration and login is disabled.

EasyCE / ASurfaces...


Postby Dave Johnston » Jun 7, 2002 @ 3:53pm

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Dave Johnston » Jun 7, 2002 @ 5:45pm

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Dave Johnston » Jun 7, 2002 @ 9:10pm

Last edited by Dave Johnston on Jun 8, 2002 @ 11:10am, edited 1 time in total.
User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Phantom » Jun 8, 2002 @ 10:51am

Tga's that you point to using a relative path should fail without the fullpath thing. :) Some background info, in case you didn't know: On the PC, you can safely assume that 'test.tga' is in the same dir as your application executable.

And, '../graphics/test.tga' is understood also. On the PPC, you loose these 'relative paths'. So I use a trick: The fullpath function. This function kindly asks the PocketPC OS for the path of the current application. It then appends the 'relative path', and now it can be safely loaded on the PPC.

Note that this is quite an ugly distinction between coding for PPC and PC. An unneccessary distinction, as far as I can see.

- Jacco.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Postby Dave Johnston » Jun 8, 2002 @ 11:12am

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Dave Johnston » Jun 8, 2002 @ 9:18pm

Argh this is going to kill me!

2 hours ago it was loading all my TGAs no problem. Now it's decided not to load some of my HUD graphics. Even went to my build from earlier and it won't load the same files either.

Probably a CE/eVC bug, but if this keeps up I might as well give up. It's bad enough having to modify it for myself, let alone once for every individual gamer who wants to play it...
User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


same problem

Postby draklava » Jun 8, 2002 @ 10:39pm

Dave please keep us updated with your status... I was having a similar problem but now my graphics always seem to load - I'm curious what updates are needed if any

Phantom - is it still correct to use

delete tgabuff

or is delete [] tgabuff needed ?

I'm having a strange problem where my app crashes on win32 desktop when I load an image a second time (like they play a game, exit and start a new game it tries to reload a 488x85 pixel image and then crashes)

I clean up the ASurface pointer after the exit game and reallocate on start game...

this works fine on PPC it only crashes on the desktop - weird !
User avatar
draklava
pm Member
 
Posts: 79
Joined: May 15, 2002 @ 6:13am
Location: Atlanta, Albania, Wherever


Postby Dave Johnston » Jun 9, 2002 @ 4:54pm

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Digby » Jun 10, 2002 @ 12:02am

How does fullpath() know that the amount of memory pointed to by the passed parameter is large enough to safely prepend the full path name?

To be honest I've never seen the code for this library, nor have I used it, but a function that makes an assumption about the amount of memory referenced by a pointer parameter is just asking for trouble.

BTW, the rule regarding which version of delete to use depends on which version of operator new is used to allocate the block. In the code that Dave posted, he's used the array allocator to allocate tgabuff. Therefore he should use the matching array deallocator (delete[]).
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby Phantom » Jun 10, 2002 @ 8:42am

It does not append to the passed string, it returns the full path. (potential memory leak: Who frees that string? :) ).
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Previous

Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron