Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 927 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
bmap_create() acknexwrapper VS2010 #366976
04/08/11 13:32
04/08/11 13:32
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline OP
Senior Member
pararealist  Offline OP
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
A7 Com
AcknexWrapper
VS 2010

I seem to have found a problem with bmap_create, that maybe you
can clear up or explain. I did not want to post in BUGS as it is not really clear if it is.

At first i thought it was a wrapper problem as bmap_create was returning null
but i finaly with Stromausfall's help narrowed it down.

If i put the bitmap in the folder where the executable runs (bin) it loads the
bitmap without problem, but if in a sub folder of the executable folder f.i (bin\textures)
bmap_create will return null.

The paths are added like so:
Path:
public static String textures = Application.StartupPath + @"\defaults\textures\";
and use like so:
water_bump = BMAP.bmap_create( textures + "waves2.tga" );

All other load or create commands load from this type of path fine, but bmap_create does not.

The paths are also added using add_folder().

It just seems strange that bmap_create() alone (at least i have not yet encountered any other)
has this behaviour.

Any ideas?


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: bmap_create() acknexwrapper VS2010 [Re: pararealist] #366988
04/08/11 15:01
04/08/11 15:01
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Hmm... this is interesting find. A year ago I tried using bmap_create to load an unload all my huge background files in the Silas menus from memory before gameplay(instead of just defining them as bmaps). It actually worked very well and I was pleased, except for the fact that there was a problem that made it unusable for me. It would keep returning random Invalid Pointer errors after I created them, even though it would work most of the time. It actually worked about 90% of the time, but that one error here and there made it unusable.

My process was:

BMAP* btimer;

I would switch between these steps below:

btimer = bmap_create("backtime.dds"); - Call before panel is visible in menu

ptr_remove(btimer); - Call after panel is reset and before gameplay

I also used add_folder and the bmaps were in a path. But I guess my problem may be different than the one above. I soon abandoned this method as I thought it was too unstable or I did not properly code it.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: bmap_create() acknexwrapper VS2010 [Re: William] #366994
04/08/11 15:40
04/08/11 15:40
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline OP
Senior Member
pararealist  Offline OP
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
The strange thing for me is if bmap is in top folder where
app runs it loads ok, only in a sub folder it returns null.
And it seems to only affect bmap_create().


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: bmap_create() acknexwrapper VS2010 [Re: pararealist] #366996
04/08/11 15:50
04/08/11 15:50
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
My problem I believe was related to bmap_create too. But it was a different issue than yours, since it would return invalid randomly and worked other times.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: bmap_create() acknexwrapper VS2010 [Re: pararealist] #367029
04/08/11 21:57
04/08/11 21:57
Joined: Apr 2010
Posts: 172
W
wdlmaster Offline
Member
wdlmaster  Offline
Member
W

Joined: Apr 2010
Posts: 172
Quote:

...only in a sub folder it returns null.

You need two backslashes:
Code:
bmp = bmap_create ("subfolder\\test.tga");


works perfect (A7 com)

Re: bmap_create() acknexwrapper VS2010 [Re: wdlmaster] #367057
04/09/11 11:31
04/09/11 11:31
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline OP
Senior Member
pararealist  Offline OP
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
Using c# and acknex wrapper here.

but i already tried two backslashes in

public static String textures = Application.StartupPath + @"\\defaults\textures\\";

instead of
public static String textures = Application.StartupPath + @"\defaults\textures\";

with same result.


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: bmap_create() acknexwrapper VS2010 [Re: pararealist] #367061
04/09/11 12:41
04/09/11 12:41
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
I have no knowledge about the c# wrapper, but String isn't the same as STRING or char.

Does it automatically convert a String to an engine STRING* or char* ? If yes, then never mind my reply.

Re: bmap_create() acknexwrapper VS2010 [Re: SchokoKeks] #367065
04/09/11 13:22
04/09/11 13:22
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline OP
Senior Member
pararealist  Offline OP
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
just in case you do use it sometime, STRING* is not implemented in wrapper because c# strings are ok to use.


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: bmap_create() acknexwrapper VS2010 [Re: pararealist] #367266
04/11/11 13:39
04/11/11 13:39
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You can read bmaps from any folder. The problem was that you gave an invalid bmap name. File names for engine objects must only contain letters, digits, underscore, and extension - no paths, back slashes, or the like.

Re: bmap_create() acknexwrapper VS2010 [Re: jcl] #367611
04/15/11 13:17
04/15/11 13:17
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline OP
Senior Member
pararealist  Offline OP
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
Quote:
You can read bmaps from any folder. The problem was that you gave an invalid bmap name. File names for engine objects must only contain letters, digits, underscore, and extension - no paths, back slashes, or the like.


Quote:
The paths are added like so:
Path:
public static String textures = Application.StartupPath + @"\defaults\textures\";
and use like so:
water_bump = BMAP.bmap_create( textures + "waves2.tga" );

All other load or create commands load from this type of path fine, but bmap_create does not.


sorry i do not understand where you mean there is an invalid character? Do you mean this @ ?

The other commands have no problem with the same path, or are they not engine objects?

please point out where the path/filename is invalid, as i cannot see it right now.


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1