hi!
i need some help here using the kernel32 dll!
this is a bb program
it contains a library in which you can easily set up pixels. i tried to port it to bmax, but first i needed to import the kernel DLL, but i just didn't figure out how :(
can somebody help me here, please?
thanks a lot :)
i need some help here using the kernel32 dll!
this is a bb program
;;the DECLS part: ;.lib "kernel32.dll" ;apiRtlMoveMemory(Destination*,Source,Length):"RtlMoveMemory" ;apiRtlMoveMemory2(Destination,Source*,Length):"RtlMoveMemory" Const gw = 1280 Const gh = 1024 Const gw1 = gw - 1 Const gh1 = gh - 1 Graphics gw, gh, 32, 2 SetBuffer BackBuffer() bnkVideo = CreateBank(gw * gh * 4) w4 = gw * 4 While Not KeyHit(1) x = 0 mx = gw * gh * 4 col = Rand($000000, $FFFFFF) While x < mx PokeInt bnkVideo, x, col x = x + 4 Wend LockBuffer() bnkInfo = CreateBank(32) vgliApiRtlMoveMemory bnkInfo, GraphicsBuffer() + 72, 32 size = PeekInt(bnkInfo, 20) * PeekInt(bnkInfo, 24) * PeekInt(bnkInfo, 28) / 8 If BankSize(bnkVideo) < size Or PeekInt(bnkInfo, 0) = 0 Then FreeBank bnkInfo RuntimeError "Failed to draw on buffer." Else vgliApiRtlMoveMemory2 PeekInt(bnkInfo, 0), bnkVideo, size FreeBank bnkInfo EndIf UnlockBuffer() Text 10, 10, "Poke method!" Text 10, 25, "FPS: " + GetFPS() Flip 0 Wend Global FPS, FPSFrame, FPSTime Function GetFPS(ms = 1000) ctime = MilliSecs() FPSFrame = FPSFrame + 1 If ctime - FPSTime > ms Then FPS = FPSFrame * 1000 / ms FPSFrame = 0 FPSTime = ctime EndIf Return FPS End Function
it contains a library in which you can easily set up pixels. i tried to port it to bmax, but first i needed to import the kernel DLL, but i just didn't figure out how :(
can somebody help me here, please?
thanks a lot :)