Commit Graph
15 Commits
Author SHA1 Message Date
Thierry Crozat 3dee5bb762 AGS: Script API: add "restrictToViewport" arg to Screen.ScreenToRoomPoint()
This argument works similarily to Viewport.ScreenToRoomPoint():
if it's set to true then the function returns null if there's no
viewport under the cursor; if it's set to false it converts
coordinates through the primary viewport in such case.

From upstream 5014c502aa487d3cbdf01e99d57306f2131d4c54
2022-12-15 22:40:17 +01:00
Thierry Crozat 250e32f9a1 AGS: adjusted InputType and KeyMod for easier packing in int32
This allows to fully pack InputType, KeyMod and KeyCode/MouseButton/etc in a int32:

- 8 bits (0xFF) - input type
- 8 bits (0xFF) - key mod flags
- 4 bits (0xF) - reserved (potentially for expanding mod flags, if that will be necessary)
- 12 bits (0xFFF) - KeyCode, mouse codes, gamepad buttons, etc.

Purpose:
1. Potentially allow to set keycodes + mods in an integer and assign to an integer variable/property, such as "skip key", instead of using existing "combo keys"
2. In fact, with InputType flags, this makes it possible to assign a mouse or gamepad button to the same variables.
3. Potentially allow to return keycode + mods from Wait* (currently returns only single key).

From upstream 0203e8feb73b96c501ac2439aa3fe3d6c182c8f4
2022-10-10 00:16:16 +01:00
Thierry Crozat 30038fe426 AGS: Store certain overlay handles, not script ptrs, for safety
From upstream b73553d6b4655feec2f82ee1feaa67a6bc9fca23
2022-06-19 20:50:24 +01:00
Thierry Crozat 10033d195e AGS: Store camera & viewport handles, not script ptrs, for safety
From ustream dc1421a88cd620bd1d34f8bf856e8baa57a50904
Also includes upstream 09c27c38c3afa27194b0b5dd9276036b76267488
2022-06-19 20:50:24 +01:00
Thierry Crozat fa3c524d13 AGS: GetWaitSkipResult: clear SKIP_AUTOTIMER flag (return 0)
From upstream f5159c707a0c8616b0cca39f138c2d7e53058bf5
2022-06-18 18:15:51 +01:00
Thierry Crozat babf223ab7 AGS: Add WaitInput to Script API
- modify skip result to use a flag + data bitwise combination
- also include WaitInput in Script API header
- the input flags can only be 8-bit, since wait_skipped_by and
  key_skip_wait are char, and key_skip_wait is serialized in
  gamestate.

From upstream 9e3d58a83dda00bff9073adb31b2b97adcf8d020
2022-06-18 01:08:58 +01:00
Paul Gilbert a633e9d72f AGS: Fixing various type-cast warnings
From upstream 6c42c7331e96386721f28c92ec3cb4cd039e10cd
2022-04-25 20:06:19 -07:00
Paul Gilbert 70d620c07a AGS: Support freely switching voice-over pack at runtime
From upstream 40b6fff14ac404185b822245bc1a3ba4af928a12
2022-03-27 19:14:55 -07:00
Paul Gilbert 8e310c5d98 AGS: Split GameState::want_speech into two variables for easier handling
From upstream 2f6e7362f742c59020fc6a70fdf67c5a87ff2e69
2022-03-27 19:14:55 -07:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh a386075217 AGS: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Paul Gilbert 65f992979e AGS: Implemented Game.BlockingWaitSkipped
From upstream ce6bd0173f668932a0a5cab41119d2a476f7e73c
2021-07-27 22:03:38 -07:00
Cameron Cawley 9b348b3e7d AGS: Fix more type mismatches 2021-06-16 13:03:41 +01:00
Paul Gilbert 5f4b6d74e3 AGS: Re-add proper class initializations 2021-06-13 21:08:51 -07:00
Paul Gilbert 701396361c AGS: Import of fresh codebase 2021-06-13 21:08:44 -07:00