Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
new create functions #189292
03/18/08 18:16
03/18/08 18:16
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Could you implement these function that allows you to create an entity and bmap from a void* buffer? They should be easy to implement. The idea is to be able to these object from static data or an uncompressed buffer (using zlib or something), without using the add_buffer function. Memory can be managed manually, accessing and deleting.

I was thinking something like this:
Code:

ent_createbuffer(void* buffer, long size, VECTOR*, EVENT);
bmap_createbuffer(void* buffer, long size);


I am not sure if you need to pass the size of the buffer to the function.

It's use is something like this:
Code:

// ENTITY
void* buffer = file_load("model.mdl", NULL , &size);
ent_createbuffer(buffer, size, nullvector, NULL);
// BMAP
void* buffer = file_load("bitmap.bmp", NULL , &size);
bmap_createbuffer(buffer, size);



I would really benifit from these functions, and I am sure many others will too. What do you think about it conitec?

PS: Make sure it is avaiable in commercial version

Re: new create functions [Re: sheefo] #189293
03/19/08 16:28
03/19/08 16:28
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
What's your problem with add_buffer?

Re: new create functions [Re: jcl] #189294
03/19/08 17:59
03/19/08 17:59
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
The idea is to be able to manage files and their memory manually. I have written my own resource buffer and these are the only two functions stopping me from implementing it properly.

My resource buffer is like a tree. It may have two files with the same name, but under different parents. If I use add_buffer, I can only have one file with that name.

Another possibility of these functions is to store bitmap or entity data internally (inside an array), so its data cannot be accessed.

... You don’t seem convinced...?

Re: new create functions [Re: sheefo] #189295
03/20/08 09:08
03/20/08 09:08
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Organize your file names in a way that the parent path is included in the file name. Then you can use add_buffer.

Problem with such suggestions is that they are only useful in very special cases, and even then can mostly be solved with what's already available. We want to avoid bloating the engine API with lots of function variants that are very rarely used.

Re: new create functions [Re: jcl] #189296
03/20/08 14:16
03/20/08 14:16
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Your the boss.


Moderated by  aztec, Spirit 

Gamestudio download | 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