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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (alibaba, vicknick), 1,379 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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 | 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