IrrLicht without wrapper DLL
Sorry, I didn't want anyone to get the impression that I've got aFred wrote:How did you solved it ?
working fix for it.
I just changed PUSH eax to MOV ecx, eax as El_Choni suggested
(to allow my brain to get the basic idea).
Next step would be what has already been discussed...
a) write macros
b) write a small parser that gets called before FASM which - as
you said - shouldn't be that hard. The problem will be to keep it
universally usable but as we all know, there's a solution to every
problem!
My "It works!" was only meant to thank El_Choni for his help.
Good programmers don't comment their code. It was hard to write, should be hard to read.
I spent some time thinking about the macro-idea but couldn't get it to work.
I just don't see a way to execute the macro depending on the lines before or after.
In another attempt I tried to check if eax == p_device but also failed...
Well, I'm neither a ASM nor a FASM guru, what did I expect?!
So I went the parser / pre-processor route and noticed I couldn't use
/COMMENTED respectively /REASM with /DEBUGGER... Is that true?
I just don't see a way to execute the macro depending on the lines before or after.
In another attempt I tried to check if eax == p_device but also failed...
Well, I'm neither a ASM nor a FASM guru, what did I expect?!
So I went the parser / pre-processor route and noticed I couldn't use
/COMMENTED respectively /REASM with /DEBUGGER... Is that true?
Good programmers don't comment their code. It was hard to write, should be hard to read.
EDIT: the macro works now:
Code: Select all
; Place at the beginning of the code
!macro CALL arg
! {
! clabel = $
! CALL arg
! plabel = clabel-3
! callsize = $-clabel
! load ops dword from plabel
! load opc byte from plabel+4
! If ops=$FF008B50 & (opc=$10 | opc=$50 | opc=$90)
! If opc=$10
! db $10
! Else If (opc=$50 | opc=$90)
! db $00
! Repeat callsize
! load op byte from clabel+callsize-%
! store byte op at clabel+callsize-%+1
! End Repeat
! End If
! store dword $008BC189 at plabel
! End If
! }
Last edited by El_Choni on Mon May 23, 2005 11:07 am, edited 4 times in total.
El_Choni
Ufff...El_Choni wrote:Here, my non-working approach. Maybe it helps you to get somewhere [...]
Quoting Fred: "that looks frightening!!!"
...even spanish looks easier to me
El_Choni, honestly, I'm deeply impressed!
I got the idea but... ...that's way beyond my understanding... :roll:
You don't think you should finish that by any chance?
Good programmers don't comment their code. It was hard to write, should be hard to read.
I guess no one here is focused on IrrLicht.rufio72 wrote:1) I downloaded examples from irrlichtnx site ( http://www.irrlichtnx.mmdevel.de/), and it seem to be faster...
why are you focalized on irrlicht ???
This thread is neither about this engine in particular nor about working code
examples. All of this discussion is only meant to be some kind of "prove of
concept".
All the work (converting the needed constants, interfaces, helperfunctionsrufio72 wrote:2) I don't know assembler, how can I use your code width Irrlicht dll ???
etc.) has yet to be done. El_Choni's macro only enables you to call IrrLicht's
methods directly from PureBasic (This isn't possible without the macro).
No asm-knowledge is needed in order to use the macro. Try putting the
macro on top of the code El_Choni posted (the one with the interfaces)
and run it. You'll see what I mean.
Good programmers don't comment their code. It was hard to write, should be hard to read.
Re: IrrLicht without wrapper DLL
do i get it right? the macro from El_Choni is doing nothing more then
converting all interface calls from std to the object-com convention?
So when i use that ... i could access any COM DLL with PB and interfaces?
Or is it just the irrlicht dll?
MFG PMV





