| |
|
|
Jac de Lad | Hi,
I find The Thread.pcu class. but there a Possibility More as 4 Threads at the same time To using? the bräuchte I absolutely!!!
Jac |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 10/25/05 ▲ |
|
|
|
|
Frank Abbing | I faith, that Profan these boundary setting. be but not integrally sure... |
|
|
| |
|
|
|
| Jain. The Thread.Pcu does only so as though it Threating would. otherwise gäbs ne crowd detriments. with the Thread.Pcu Gibts but only 4 Strands - there can itself too nothing regulate.
real Threads however can You soviele produce How your system allows.
only say me Please - for what More as 4? |
|
|
| |
|
|
|
Jac de Lad | Hallöle,
i want one game program and need several Threads, around the music, Geräusche, Cursor etc To steer. there need I More as 4 Threads...
Jac |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 10/26/05 ▲ |
|
|
|
|
Frank Abbing | Hi,
in the rule verringert eachone further Thread The speed the Hauptprogramms... |
|
|
| |
|
|
|
| @Frank: correctly..
@Jac: music, Geräusche => one thread Cursor etc To steer => About a Keyboardhook - means no Thread.
self Doom comes with 4 Threads from - needed aba 6 in the Multiplayermodus.
therefore say I simply The from you chosen Herangehensweise is To rethinking.
I can The amount neither raise - so gladly ichs tuen would.
salvo. |
|
|
| |
|
|
|
Jac de Lad | Hmmm...
first ne question: What is one Hook?
and How, if I time ask must, functions The thread.pcu really intern? I have momentarily quite no Review of it...
I überdenke with the my game again, and if it sometime time form assumes ye the first, The it To face get!
Jac |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 10/28/05 ▲ |
|
|
|
|
| The Thread.Pcu is a relatively komplexes Gebilde on basis the Timer-APIs. here go Prozeduradressen on Apis transfer - and gleichzeit becomes attention the nix überläuft (prozedurstack). Eigendlich ridiculous - but in its actually shape through its simple Anwendungsmöglichkeit awfully helpful.
what hooks are: [...]
here one small Sample: CompileMarkSeparation {$Cleq}
Set("FastMode",1)
Def Cnhex(4) !"user32","CallNextHookEx"
Def Swhex(4) !"user32","SetWindowsHookExA"
Def Gwtpid(2) !"user32","GetWindowThreadProcessId"
Declare Hkbdhook&
cls
Hkbdhook& = Swhex(2,Procaddr(Kbproc, 3), 0,Gwtpid(%hwnd, 0))
while 1
getmessage
wend
End
Proc Kbproc
Parameters Ncode&, Wparam&, Lparam&
Declare Bval&
If Wparam& = 13
If Lparam& < 0
Endif
Bval&:=1
Elseif Wparam& ==40 down
If Lparam& > 0
Endif
Bval&:=1
Elseif Wparam& ==38 up
If Lparam& > 0
Endif
Bval&:=1
Elseif Wparam& = 222Ä
If Lparam& < 0
Endif
Bval& = 1
Elseif Wparam& = 192Ö
If Lparam& < 0
Endif
Bval& = 1
Elseif Wparam& = 186Ü
If Lparam& < 0
Endif
Bval& = 1
Elseif Wparam& = 219ß
If Lparam& < 0
Endif
Bval& = 1
Else
Cnhex(Hkbdhook&, Ncode&, Wparam&, Lparam&)
Bval& = 0
Endif
Return val&
Endproc
salvo, iF |
|
|
| |
|
|
|
Jac de Lad | I see...hm, but How is it possible at the same time a music To play, Hintergrundgeräusche einzumischen, a animierten Mauscursor moving To let, waters To animate...? somehow Have I there yet n Denkhänger...
Jac |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 10/28/05 ▲ |
|
|
|
|
| [quote:a113f08e31=Jacob Liebeck]I see...hm, but How is it possible at the same time a music To play, Hintergrundgeräusche einzumischen, a animierten Mauscursor moving To let, waters To animate...? somehow Have I there yet n Denkhänger...
Jac[/quote:a113f08e31]For this there API and DirectX-functions. anyway for music.. Or ProSpeed.dll. for the remainder stand you up to 16 Timer available, where Highrestimer in play vorzuziehen are. too there helps you The API moreover. |
|
|
| |
|
|
|
Jac de Lad | How can I because 16 Timer use??? |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 10/29/05 ▲ |
|
|
|
|
| [quote:ac5601579e=Jacob Liebeck]How can I because 16 Timer use???[/quote:ac5601579e] see: [...] for the Timer kannste ~wm_timer evaluate, or a TimerProc transfer, where this though XProfan requires. for ~wm_timer recommend itself naturally too one Callback. PS: for API-Timer is a Window necessary, the but not absolutely visible his must
Simples sinnloses example for 2 Timer: CompileMarkSeparationDef W32settimer(4) !"USER32.DLL", "SetTimer"
Def W32killtimer(2) !"USER32.DLL", "KillTimer"
Proc Mytimer1
Print "Timer 1"
Endproc
Proc Mytimer2
Print "Timer 2"
Endproc
Cls
W32settimer(%Hwnd, 0, 500, Procaddr("MyTimer1", 0))
W32settimer(%Hwnd, 1, 5050, Procaddr("MyTimer2", 0))
Waitinput
W32killtimer(%Hwnd, 0)
W32killtimer(%Hwnd, 1ss=s2>)
plenty Fun
//Edit: Have whom code again korrigiert |
|
|
| |
|
|