Page 1 of 1
Posted: Mon Dec 16, 2002 12:31 pm
by BackupUser
Restored from previous forum. Originally posted by Max..
Case is this:
There is a - commercial - game which uses DirectX. Usually it's played in Fullscreen mode.
Is it possible to write a PureBasic program that generates output in that game's screen; most likely text? I tried a little bit with the BitBlit function...
Posted: Fri Dec 20, 2002 3:37 pm
by BackupUser
Restored from previous forum. Originally posted by waffle.
it should be, but its complicated.
I'll asume your using DB or BB
1 - you will need to lock up the display via a Lock Pixcel command or simular
2 - obtain a pointer to the screen
in DB its a pointer to bitmap 0
3 - pass this pointer to your DLL
along with the screen width,height,depth
4 - now all you need to do is place your pixcels
into this bitmap as raw memory. this gets complicated in DB.
for example, to make a dot at X,Y
Color=rgb(r,g,b) use whatever color...
mem=X*Depth+depth*width*Y
poke *bitmap+mem,color
at least i think that how it goes
this is in psudo code
you may need to find a way to ensure that your color bitdepth
does not excede the stated bit depth.
5 - upon return from your DLL
unlock the buffer, discard the pointer and procede normally.
that should provide the bassis for proceding into the unknown.
Posted: Fri Dec 20, 2002 5:51 pm
by BackupUser
Restored from previous forum. Originally posted by Max..
Thanks for your reply, waffle.
You are right. Complicated, or better said: too complicated for me at the moment.
I was in the hope that there is probably a snippet for that; but it's not that important anyways. Enough stuff else to try out in PureBasic. Love it.
Maybe I'll give it another try after I realized all the other stuff that came to my mind. So little time... :-/