Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Using images

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Dec 2012 21:42
I'm attempting to start a Spriter dll plugin for DB, my only problem is that it's been a few years since I've touched C++. How could I go about loading images from the DLL and displaying them into DBP? I'm not even sure where to begin. I'd prefer not to rely on DB's image structure in terms of sharing their image IDs, same thing for sprites. Since each Spriter object will use multiple images, I don't the user to have to keep track of what image numbers are free and which aren't.

I'm sure I can look up tutorials on loading/manipulating images in C++, but where do I go from there?

"You're not going crazy. You're going sane in a crazy world!" ~Tick
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 12th Dec 2012 03:28
DBP images use DX surfaces which once locked can be accessed directly. Here's a little snippet I played around with some time ago that might help you out...

Basically you lock the surface and grab the parameters of it including the pointer to directly manipulate the pixel data.



Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 12th Dec 2012 23:36
"Basically" ?

Good grief.

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Dec 2012 16:14
That's kinda what I thought Duffer, lol. I got my work cut out for me. Time to go learn some stuff!

"You're not going crazy. You're going sane in a crazy world!" ~Tick
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Jan 2013 16:31
Quote: ""Basically" ?

Good grief. "


Seconded.

[Note to self: put C++ on a very slow back-burner yet again.]

Login to post a reply

Server time is: 2024-04-25 00:18:56
Your offset time is: 2024-04-25 00:18:56