Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 10/25/26 03:42
Chat Room for Zorro Programmers
by Haitao_Ren. 10/25/26 03:14
Trading Journey
by Haitao_Ren. 10/25/26 03:14
Algorithmic trading course with Zorro
by Haitao_Ren. 10/25/26 03:12
Zorro tutorial ideas?
by Haitao_Ren. 10/25/26 02:47
Zorro plugin for Hyperliquid.xyz
by mayarik. 10/24/26 09:14
Tradestation missing in table of contents
by AndrewAMD. 10/23/26 14:35
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, Haitao_Ren), 8,042 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Haitao_Ren, JimSimons, julienp, julienper, KelleyAbbey
19247 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
S
sheefo Offline OP
User
sheefo  Offline OP
User
S

Joined: Jul 2006
Posts: 783
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,142
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,142
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
S
sheefo Offline OP
User
sheefo  Offline OP
User
S

Joined: Jul 2006
Posts: 783
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,142
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,142
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
S
sheefo Offline OP
User
sheefo  Offline OP
User
S

Joined: Jul 2006
Posts: 783
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