Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
4 registered members (kzhao, AndrewAMD, bigsmack, 7th_zorro), 869 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Request: Load images from memory (solved) #440566
04/28/14 11:00
04/28/14 11:00
Joined: Nov 2012
Posts: 62
Istanbul
T
Talemon Offline OP
Junior Member
Talemon  Offline OP
Junior Member
T

Joined: Nov 2012
Posts: 62
Istanbul
Hi, I'm downloading some image files and I need to show them on the screen. If you could implement another version of bmap_create which takes a memory pointer to the contents of a file, I could avoid creating unnecessary files on disk and spending unnecessary time for I/O.

Thanks.

Last edited by Talemon; 04/28/14 11:41.
Re: Request: Load images from memory [Re: Talemon] #440567
04/28/14 11:20
04/28/14 11:20
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
add_buffer(char* name,void* buffer,long size)

Re: Request: Load images from memory [Re: txesmi] #440568
04/28/14 11:40
04/28/14 11:40
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Use the directx function (D3DXCreateTextureFromFileInMemory) to generate a texture of your memory (bytes) and then generate the new bitmap struct info yourself, no engine function is needed to do this tongue

Re: Request: Load images from memory [Re: txesmi] #440569
04/28/14 11:40
04/28/14 11:40
Joined: Nov 2012
Posts: 62
Istanbul
T
Talemon Offline OP
Junior Member
Talemon  Offline OP
Junior Member
T

Joined: Nov 2012
Posts: 62
Istanbul
I didn't know that, thanks to both of you!

Last edited by Talemon; 04/28/14 11:41.
Re: Request: Load images from memory [Re: Ch40zzC0d3r] #440573
04/28/14 11:54
04/28/14 11:54
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Originally Posted By: Ch40zzC0d3r
then generate the new bitmap struct info yourself

Is this possible? Can you really fill with no potential troubles the private C_LINK struct contained into all engine structs? How far is the C_LINK data needed to render the image?

Last edited by txesmi; 04/28/14 11:55.
Re: Request: Load images from memory [Re: Ch40zzC0d3r] #440612
04/28/14 18:04
04/28/14 18:04
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Originally Posted By: Ch40zzC0d3r
Use the directx function (D3DXCreateTextureFromFileInMemory) to generate a texture of your memory (bytes) and then generate the new bitmap struct info yourself, no engine function is needed to do this tongue
Please don't never ever mess with the engines internal data structures! There are function for these purposes!


Always learn from history, to be sure you make the same mistakes again...
Re: Request: Load images from memory [Re: Uhrwerk] #440619
04/28/14 19:14
04/28/14 19:14
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
All I can say is that these "hacks" are working fine with this engine, idk how much I messed up during my coding in C++ grin
I hooked 14 functions and game runs fine, I fixed some bugs myself because there was no update for a long time tongue
I cant remember how I did it last time since I cant find some projects -.-
But I dont think I even filled C_LINK struct, the draw functions just use the infos like height/width and the pixel buffer pointer.

Last edited by Ch40zzC0d3r; 04/28/14 19:14.
Re: Request: Load images from memory [Re: Ch40zzC0d3r] #440625
04/28/14 19:42
04/28/14 19:42
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
sounds interesting.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Request: Load images from memory [Re: sivan] #440627
04/28/14 21:45
04/28/14 21:45
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Sounds horribly wrong. I warned you. Do whatever you want...


Always learn from history, to be sure you make the same mistakes again...

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