Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (ozgur, TipmyPip, AndrewAMD), 1,209 guests, and 5 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
BMAP after level_load #409003
10/10/12 09:54
10/10/12 09:54
Joined: Jan 2010
Posts: 150
iran - tehran
F
flatron Offline OP
Member
flatron  Offline OP
Member
F

Joined: Jan 2010
Posts: 150
iran - tehran
HI
I know that after level_load , "the cache holding level entity files is purged. All current entities in the old level are removed".
but what about BMAP*?

Re: BMAP after level_load [Re: flatron] #409019
10/10/12 13:19
10/10/12 13:19
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
Predefined bmaps like
Code:
BMAP* AnyBitmap = "bitmap.bmp";

are not removed. Bitmaps shown before level_load will stay visible after level loaded, to avoid that use
Code:
proc_mode = PROC_GLOBAL;

in your function which shows / hides the bmaps.

Hope this helped
greets


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: BMAP after level_load [Re: rayp] #409033
10/10/12 15:32
10/10/12 15:32
Joined: Jan 2010
Posts: 150
iran - tehran
F
flatron Offline OP
Member
flatron  Offline OP
Member
F

Joined: Jan 2010
Posts: 150
iran - tehran
thank you for replay.
there is 3 questions:
1- what happened for bmap that removed?and how i know that is removed?
if a BMAP* removed and not set to NULL a problem will occur.in that situation this code make an error: (b is a BMAP*)
if (b!=NULL) ptr_remove(b)
if b dosen't set to null so b is not null but ptr_remove make an error.

2-if a BMAP* Predefined (out of any functions) ,what happend after level_load?

3-if a BMAP* defile in a function or action ,what happend after level_load?

Re: BMAP after level_load [Re: flatron] #409036
10/10/12 15:59
10/10/12 15:59
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You generally have to distinct between bitmaps you create manually (bmap_create, bmap_createblack, Panel Definitions etc.) on the one hand and bitmaps that are created automatically for textures for you level or your entities. When they are created automatically they will be removed automatically as well on a level change. When you created them yourself you have to take care of removing them any time you see removing may fit your needs.

1. They are freed from memory. You won't be notified about that. Exactly. Don't store pointers to bitmaps that are automatically freed in a pointer.

2. Nothing. Take care that you don't loose the pointer to such bitmaps or they won't be accessible any more.

3. Nothing


Always learn from history, to be sure you make the same mistakes again...
Re: BMAP after level_load [Re: Uhrwerk] #409039
10/10/12 16:53
10/10/12 16:53
Joined: Jan 2010
Posts: 150
iran - tehran
F
flatron Offline OP
Member
flatron  Offline OP
Member
F

Joined: Jan 2010
Posts: 150
iran - tehran
ok
I have some problem with BMAP*.
I have some global BMAP* and now try to use them as local.
thank you.

about number 3: that means bmap remain in memory and unaccessible because there is no pointer to it.is it true?

Last edited by flatron; 10/10/12 16:56.
Re: BMAP after level_load [Re: flatron] #409041
10/10/12 17:08
10/10/12 17:08
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You can use any global bitmap pointer locally as well. There is no restriction. Why not posting your code and describing the problem?

3. Exactly. I believe that if you recreate the bitmap with the same filname it won't be loaded again because it is cached, but I wouldn't rely on that.


Always learn from history, to be sure you make the same mistakes again...
Re: BMAP after level_load [Re: Uhrwerk] #409046
10/10/12 18:08
10/10/12 18:08
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
Have a look at
Code:
bmap_purge



Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;

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