Skip to content

STANNcam v2.3.0

Compare
Choose a tag to compare
@jack27121 jack27121 released this 16 Feb 21:25
· 29 commits to master since this release
85341c2

Changes from v2.2.4

Read through and check if you need to make any changes from the last version.

  • stanncam_fullscreen_ratio_compensate_x / y is now called stanncam_ratio_compensate_x / y
    As it is no longer exclusive to the full screen window mode, but just whenever the window aspect ratio doesn't match the game's aspect ratio
  • Enum STANNCAM_WINDOW_MODE values have changed to be screaming snake case:
    • WINDOWED
    • FULLSCREEN
    • BORDERLESS
    • __SIZE - Added to show number of options in case you want to iterate through them

New Additions

  • cam.draw_no_compensate function, the same as cam.draw but without automatically drawing in the middle of the screen when the aspect ratio doesn't match the display.
  • cam.set_paused
    cam.get_paused
    cam.toggle_paused
    stanncam_toggle_cameras_paused
    stanncam_set_cameras_paused
    stanncam_cameras_pause
    stanncam_cameras_unpause
    functions, you can pause the camera, any movement they were doing before being paused will resume when unpaused
  • stanncam_get_preset_resolution stanncam_get_preset_resolution_range functions has been added, there is now a long list of commons pc resolutions as well as classic game console resolutions. More will be added later, you can still set whatever resolution you want manually, this is just a quick preset collection.
  • cam.room_to_display_x / y function (similar to room to gui)
  • added stanncam_destroy function. It does the opposite of stanncam_init()

Enhancements

  • The first camera uses the application_surface instead of creating a new surface, it's a bit more efficient
  • If stanncam gets deactivated, (like if you use deactivate_all for optimization, you'll get a warning telling you to re-activate stanncam, and how to do so. It's a helpful error if you get confused, why something broke.
  • Updated JSDocs

Bug Fixes

  • fixed bug that would overwrite cameras when switching rooms
  • get_mouse_x/y had difficulties on mac, that got fixed and inadvertently works better on windows as well now
  • fixed surface memory leak when destroying a stanncam