Author Topic: Zuul 165 pb code  (Read 2502 times)

0 Members and 1 Guest are viewing this topic.

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Zuul 165 pb code
« on: December 26, 2024 »
Zuul 165 cracktro purebasic remake code.  This should work on all versions from 5.x upwards.  Just copy the osme library into you userlibraries folder. x86 and windows only though.
5.xx should change the subsystem to dx9 instraed of directx9 as the subsystem folder names were changed after 6.xx
Challenge Trophies Won:

Offline ttemper

  • Amiga 1200
  • ****
  • Posts: 261
  • Karma: 7
    • View Profile
Re: Zuul 165 pb code
« Reply #1 on: December 27, 2024 »
nice :) thanks for the source code once again.

one thing i noticed is that the dpi aware settings are negated when you resize the window...

heres the code i updated to keep the dpi awareness...

Code: [Select]
#xres = 640
#yres = 400

screenscale.f = DesktopScaledX(100) / 100
screenscalex.i = #xres / screenscale
screenscaley.i = #yres / screenscale
; screenscale not needed here with openwindow, as you resize the window afterwards...
window = OpenWindow(0, 0, 0, #xres, #yres, "", #PB_Window_BorderLess | #PB_Window_ScreenCentered | #PB_Screen_NoSynchronization | #PB_Window_Invisible)
OpenWindowedScreen(WindowID(0), 0, 0, #xres , #yres, #True, 0, 0)
StickyWindow(0, 1)
SetFrameRate(60)

SpriteQuality(#PB_Sprite_BilinearFiltering)

;Resize to 800x600 ... 800 / 640 = 1.25, therefore to keep the #xres/#yres scaling, multiply both by 1.25 (800x 500y) then divide by the dpi screenscale... unless you want to stretch the #yres then use ry = #yres * 1.5 (600y)
rx = #xres * 1.25 / screenscale ; you need to use screenscale here in order to be dpi aware when resizing the window - 800x
ry = #yres * 1.25 / screenscale ; you need to use screenscale here in order to be dpi aware when resizing the window - 500y
;ry = #yres * 1.5 / screenscale ; you need to use screenscale here in order to be dpi aware when resizing the window - 600y
wxpos = WindowX(0) - ((rx - #xres) / 2) ; centralize new positions
wypos = WindowY(0) - ((ry - #yres) / 2)
ResizeWindow(0, wxpos, wypos, rx, ry)

HideWindow(0, #False) ; show the window
ClearScreen(RGB(32,0,0))
FlipBuffers()
Delay(1000) ; this pauses the timer, and the screen. icon changes to 'wait/load'.

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 380
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Zuul 165 pb code
« Reply #2 on: December 29, 2024 »
Thanks mate. I'll take a look and update my libraries accordingly.
Having trouble sitting at my PC for any length of time right now as I've put my back out lifting a huge sack of turnips.
Turns out the sack was a LOT heavier than it looked.
And I've just upgraded to an Nvidia RTX4060 to play Stalker 2 and can't sit to play it.
 FFS !
Challenge Trophies Won:

Offline ttemper

  • Amiga 1200
  • ****
  • Posts: 261
  • Karma: 7
    • View Profile
Re: Zuul 165 pb code
« Reply #3 on: December 30, 2024 »
Thanks mate. I'll take a look and update my libraries accordingly.

no problem... helps me learn also by working out how to get dpi aware working properly (it can be a pain).

Having trouble sitting at my PC for any length of time right now as I've put my back out lifting a huge sack of turnips.

ouch. not good at all. ik how neck/back issues are, they are not nice at all. rest up, hopefully you'll be back at it sooner rather than later.

And I've just upgraded to an Nvidia RTX4060 to play Stalker 2 and can't sit to play it.

4060, nice. not sure what you had previous, but yeh... decent card. i run a rtx 3060ti myself :) stalker 2... watch out for all those zombies/monsters :D hehe.