Page 1 of 2
[Implemented] Nativ DirectX7 should be a Subsystem too
Posted: Thu Jan 03, 2008 10:06 pm
by IceSoft
How can I detect with compilerif thats I use currently the DirectX7 sprite lib?
I cannot...so I hope the DirectX7 will be also a Subsystem (The default one).
Re: [PB4.20b1] Nativ DirectX7 should be a Subsystem too
Posted: Thu Jan 03, 2008 10:50 pm
by thyphoon
IceSoft wrote:How can I detect with compilerif thats I use currently the DirectX7 sprite lib?
I cannot...so I hope the DirectX7 will be also a Subsystem (The default one).
if no subsystem used :
Re: [PB4.20b1] Nativ DirectX7 should be a Subsystem too
Posted: Thu Jan 03, 2008 11:00 pm
by IceSoft
thyphoon wrote:if no subsystem used :
Ok fine.
As long as there are only 'Graphic' Subssystems existing as long I can use this piece of code. Thanks.
Posted: Fri Jan 04, 2008 5:38 am
by IceSoft
This is not working. Sorry. We need a solution from Fantasie Software for this.
Try and change the subsystem:
There are no differents I got always: 0
Posted: Fri Jan 04, 2008 6:13 pm
by nco2k
Code: Select all
CompilerIf Subsystem("DirectX9")
MessageRequester("", "DirectX 9")
CompilerElse
MessageRequester("", "DirectX 7")
CompilerEndIf
c ya,
nco2k
Posted: Fri Jan 04, 2008 7:29 pm
by IceSoft
nco2k wrote:
Code: Select all
CompilerIf Subsystem("DirectX9")
MessageRequester("", "DirectX 9")
CompilerElse
MessageRequester("", "DirectX 7")
CompilerEndIf
c ya,
nco2k
What about DX9: I have currently 3 Subsystems:
the native DirectX7
the 4.20 DirectX9
the S.M. DX9
And do not forget the currently not working OpenGL subsystem!
So we need a new compiler directive: CompilerElseIf
Posted: Fri Jan 04, 2008 7:30 pm
by blueznl
Makes me think... is there a CompilerElseIf these days?
Posted: Fri Jan 04, 2008 7:43 pm
by traumatic
What about using CompilerCase for that?
Posted: Fri Jan 04, 2008 8:14 pm
by IceSoft
traumatic wrote:What about using CompilerCase for that?
Code: Select all
CompilerSelect <numeric constant>
CompilerCase
...
[CompilerDefault]
...
CompilerEndSelect
is not usefull in this case.
You can only get an info about a subsystem like using or not using...not of which one is used.
Posted: Fri Jan 04, 2008 8:56 pm
by traumatic
IceSoft wrote:You can only get an info about a subsystem like using or not using...not of which one is used.
True. Sorry, I thought into the wrong direction.
Posted: Fri Jan 04, 2008 9:03 pm
by IceSoft
traumatic wrote:IceSoft wrote:You can only get an info about a subsystem like using or not using...not of which one is used.
... I thought into the wrong direction.
No prob... I doing it all the time.

Posted: Fri Jan 04, 2008 9:54 pm
by nco2k
i agree on the missing
CompilerElseIf, but stop saying xyz is not possible, because it is...
Code: Select all
CompilerIf Subsystem("DirectX9")
MessageRequester("", "DirectX9")
CompilerElse
CompilerIf Subsystem("DX9")
MessageRequester("", "DX9")
CompilerElse
CompilerIf Subsystem("OpenGL")
MessageRequester("", "OpenGL")
CompilerElse
MessageRequester("", "DirectX7")
CompilerEndIf
CompilerEndIf
CompilerEndIf
c ya,
nco2k
Posted: Fri Jan 04, 2008 10:05 pm
by IceSoft
nco2k wrote:i agree on the missing
CompilerElseIf, but stop saying xyz is not possible, because it is...
Code: Select all
CompilerIf Subsystem("DirectX9")
MessageRequester("", "DirectX9")
CompilerElse
CompilerIf Subsystem("DX9")
MessageRequester("", "DX9")
CompilerElse
CompilerIf Subsystem("OpenGL")
MessageRequester("", "OpenGL")
CompilerElse
MessageRequester("", "DirectX7")
CompilerEndIf
CompilerEndIf
CompilerEndIf
c ya,
nco2k
Please add the missing 2 new grafic subsystem which I will make with the release of PB4.20.
DX10 and SDL
If you have it done...I will say no longer it is not possible.

Posted: Fri Jan 04, 2008 11:29 pm
by nco2k
IceSoft wrote:Please add the missing 2 new grafic subsystem which I will make with the release of PB4.20.
DX10 and SDL
If you have it done...I will say no longer it is not possible.

and that is connected how to this thread? dont mix apples and oranges. :roll:
first you said its not possible to detect dx7 because its not a subsystem and i showed you otherwise. then you said its not possible to detect various subsystems because of the missing CompilerElseIf and i showed you otherwise.
you wanted a solution, you got a soultion... its that simple.
c ya,
nco2k
Posted: Sat Jan 05, 2008 12:18 am
by Trond
You could have use CompilerSelect if it wasn't so buggy. I think I need to report something!
You can test the concept with constants, but unfortunately with Subsystem() inlined everything goes boom.
Code: Select all
#DX9 = Subsystem("DirectX9")
#OpenGL = Subsystem("opengl")
#SDL = Subsystem("sdl")
#DX10 = Subsystem("dx10")
CompilerSelect 1
CompilerCase #DX9
Debug "nine"
CompilerCase #OpenGL
Debug "opengl"
CompilerCase #sdl
Debug "sdl"
CompilerCase #dx10
Debug "ten!"
CompilerDefault
Debug "seven"
CompilerEndSelect