Commit Graph
11 Commits
Author SHA1 Message Date
Walter Agazzi dd0195163f AGS: Engine: removed excessive header guidialoginternaldefs.h
From upstream 55c81e95261e59a359d51009242e139604c76a4e
2024-10-30 18:07:42 +02:00
Walter Agazzi cce6aff754 AGS: Engine: replaced uses of strncpy with snprintf for safety
From upstream 02feb81b34f041dccd8a4bb33ff060cc532d979b
2024-01-17 03:12:30 +01:00
Walter Agazzi 72888a7a8c AGS: Engine: move cursor and cursor-over-gui updates to the game update fn
This is necessary for the touch-to-mouse emulation to work
properly (and perhaps true touch controls in the future).
The order of updates is a bit wrong historically, where cursor
position and gui control focus is updated later than the
handling of button events. This means, for example, that if the
cursor was positioned over button in game frame 1, then the
mouse click will only trigger button press not later than the frame 2.

Changes:
* moved "cursor over gui" poll from draw_gui_and_overlays()
to update_cursor_over_gui(), call it in the main game update fn.
* moved update_mouse_cursor() call from
construct_game_screen_overlay() to the game update fn
(renamed to update_cursor_view().
* picked out "cursor over location" trigger out of the "render"
function into update_cursor_over_location(), call it explicitly in
the main game update fn.

Effect on user script callbacks:
* the cursor position (and gui focus) will now be updated prior
to `late_repeatedly_execute_always()` callback. Other callbacks
will not be affected, as their relative order won't change
compared with these updates.

From upstream 23493a681d4f66ae0b1088cddb82241b0bc80dbb
2023-04-29 13:11:41 +02:00
Walter Agazzi c366ce5eef AGS: Removed update_polled_stuff_if_runtime() from data loading functions
Leave it with a new name as `update_polled_stuff()` only in functions
related to the game update.
From upstream 95dc139f51e704da19792e5480e69bbfe7ec27aa
2023-03-12 20:58:28 +00:00
Thierry Crozat 5987bc5e6e AGS: rewrote eAGSMouseButton enum to sync with the script API
* Changed from -1 - based constants to 0 - based constants;
* These were purely internal values, therefore no API would be harmed;
* Removed necessity of converting from internal mouse button code to script and back all the time;
* On a side note, this fixes a bug where WaitMouse etc were returning incorrect values on mouse skip, because we forgot to convert from internal to script code.

From upstream 471098d239b076c494beb2d554572ccb69372667
2022-10-10 00:16:16 +01:00
Paul Gilbert a6f42ad1ab AGS: Fixing various "unused va/arg" warnings + removed empty funcs
From upstream 61771ecd638338806c40d0da2bf1addea06cac90
2022-04-25 21:44:40 -07:00
Paul Gilbert 012ca99120 AGS: In built-in guis renamed local args hiding global variables
From upstream aa2a418b41547cb8e65c60855c74061c9ccae646
2022-04-22 21:40:27 -07:00
Paul Gilbert dc3ce9f70a AGS: Renamed few font functions for consistent naming style
From upstream 9c355da410b734edc79212009a5e1be0b502c3b0
2022-03-22 22:30:13 -07:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paul Gilbert 472fbb224a AGS: Switch processmessage to use NumberPtr again 2021-06-15 18:38:07 -07:00
Paul Gilbert 701396361c AGS: Import of fresh codebase 2021-06-13 21:08:44 -07:00