Commit Graph
143 Commits
Author SHA1 Message Date
Walter Agazzi 69ba09c5fd AGS: Add two methods for handling multiscreen
For completeness, this adds functions sys_window_fit_in_display
and sys_get_window_display_index.
Practically it has no effect as in ScummVM we don't support
multiscreen and the resolution is hardcoded.

Partially from upstream 1afc61df54681ffe2fddc0d30bb2221c38a0fa79 and
b17f58d90061c3b12c9e4c04183dc59b094d66cb
2024-11-27 16:45:50 +01:00
Walter Agazzi 4308801cae AGS: Engine: in GetDiskFreeSpaceMB() ensure we check the save dir's disk
Partially from upstream 220ada5413886e80f42c9f2950e20ea46c141283
2024-10-30 18:07:42 +02:00
Walter Agazzi 822842d038 AGS: Engine, Common: refactor guard using set_our_eip
Remove naked our_eip usages
From upstream 9f4371ab8c2fbc9ccf41b49f7b975ebe8bc5d1b8
2024-10-30 18:07:42 +02:00
Walter Agazzi 8b7b0df59c AGS: Engine: fixed MAX_WALK_AREAS value
From upstream 39228483259a05a3e3a5d60bc1330a90bef6ae75
2024-10-30 18:07:42 +02:00
Walter Agazzi d904cac0c5 AGS: Script API: implemented Game.PrecacheSprite() and PrecacheView()
Partially from upstream 76aee247b7f8ae9eff613393a18192ceab4aca9f
2024-10-30 18:07:42 +02:00
Walter Agazzi eefccd3067 AGS: Common: explicit LockSprite/UnlockSprite methods in SpriteCache
Reimplemented From upstream 8e2d2fc9329a393dcdcddbe29dd5cc7094793350
2024-10-30 18:07:42 +02:00
Walter Agazzi e158764267 AGS: Engine: unrestricted game name and save folder name
From upstream 3b06711da90621b2ee5ba33ff82da91f797cabbb
2024-10-30 18:07:42 +02:00
Walter Agazzi 73e50455ab AGS: Engine: precache only player walk view
From upstream 20c7e57eecfec7b53a3067fd59de50c448a4d977
2024-10-30 18:07:42 +02:00
Walter Agazzi d7613f9653 AGS: Marked few more game script variables as readonly
Partially From upstream 4afaf73e6ff92959a75705f0ec962b6c90a72331
2024-10-30 18:07:42 +02:00
Walter Agazzi e572c4333c AGS: Engine: print cache sizes to log
Partially from upstream 98550532869e1e22a8f23c76cd000a3579167628
2024-10-30 18:07:42 +02:00
Walter Agazzi a05c63e4df AGS: Engine: fix cache config and read legacy values too
From upstream 9b2880e8b7c31891cad672fec9dc1124f9f3cc7c
2024-10-30 18:07:42 +02:00
Walter Agazzi 72a89a8bab AGS: Engine: proper GameState initialization
This should have been done at 5596736.
From upstream 2ba13acde4b686d73148bcf094f60e425f589cfe
2024-10-30 18:07:42 +02:00
Walter Agazzi 178826a9d8 AGS: Engine: init few more things along the GameState struct
This fixes more variables not initialized after 5596736 .
From upstream 99db1355bf9eb00f03ff2a10d01d9f1b80363945
2024-10-30 18:07:42 +02:00
Walter Agazzi 7ba6cf903c AGS: Engine: Removed redundant code from engine init
From upstream f0268dbd9bc40521132bd8465af06581abe6a27
2024-10-30 18:07:42 +02:00
Walter Agazzi 0bb33fcfc5 AGS: Engine: made sure game res inited in InitGameState()
This is more logical than calling this from "engine_setup",
 and also fixes running another AGS game from current game after commit 5596736 .
From upstream a82d8147d4424b0aa83762d810db96cff31d7af9
2024-10-30 18:07:42 +02:00
Walter Agazzi 2de9c546b5 AGS: Engine: store DoOnceOnly tokens in a unordered_set
From upstream c3927ec4b225778eba98d9ab0eb1f785eb3e6c03
2024-10-30 18:07:42 +02:00
Hubert Maier 2acfde1e35 JANITORIAL: Fix acommodating typo in engine.cpp 2024-07-15 20:50:41 +03:00
Le Philousophe 49b4c1b3c4 AGS: Revert to use std namespace
This allows to minimize changes from upstream
2024-07-08 21:37:28 +02:00
Paul Gilbert c2a476411c AGS: Move std namespace into common/std/ 2024-07-07 15:28:31 -07:00
Walter Agazzi 42a26dc75b AGS: Engine: renamed cant_skip_speech to speech_skip_style for clarity
Also... the old name had inverse meaning to what the variable really did.
From upstream 44f1188992691c118aea15cffa0a73d6d4302601
2024-03-28 12:01:51 +01:00
Walter Agazzi de715bab92 AGS: Engine: fixed uses of scsystem.color_depth
This complements 67c3bdc
From upstream 79c70aac2b0df604cdb7adab8fc596a18c7d4c74
2024-01-17 03:12:31 +01: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
Wyatt Radkiewicz 742f1f296d AGS: Fixed code formatting 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz 87656d66df AGS: Cleaned up blending/blitting pull request. 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz a22396163f AGS: Created test code for blending modes 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz 4ad7a30b38 AGS: Just fixed kTintBlenderMode 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz 07107b19bd AGS: Fixed ARGB blending and finished benchmark 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz d5b2cd4aea AGS: Added SIMD optimizations for stretchedDraw 2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz 499dfd7d7a AGS: Added 2Bpp specifc code path optimization
Added a template specialization for 2bpp to 2bpp blits in
BITMAP::drawInner, makes 2bpp to 2bpp now around 2 times as fast as
normal 4bpp to 4bpp blitting.
2023-08-28 21:16:42 +02:00
Wyatt Radkiewicz aa9d13f84a AGS: Preliminary optimizations of blending funcs
Just commiting my first attempts at optimizing BITMAP::draw and the
blendPixel function. Here's an overview of the changes (some are
temporary):

- Put the loop of BITMAP::draw into its own function drawInner.
 I templated it so that I could put different paths into the loop that
 could be optimized out at compile time if a certain blending function
 didn't need it etc.

- I added apple NEON (SIMD) intrensics to the drawInner function,
 haven't ported it to SSE yet, but there is a small library that actually
 maps neon intrensics to sse ones.

- Removed a few ifs from the normal x loop and put it in the y loop.
2023-08-28 21:16:42 +02:00
wyatt-radkiewicz bf1f3dbb8b AGS: Refined the temporary bitmap benchmark
The old benchmark benchmarked the render_to_screen function, which
wasn't specific enough to what is needing to be benchmarked (
BITMAP::draw, and blending functions), so it was changed to just use the
drawing functions of allegro's bitmap directly. Also from just looking
at other games, it seems like AGS games use truecolor graphics more
often than not, so the benchmark test graphic was changed to truecolor.
2023-08-28 21:16:42 +02:00
wyatt-radkiewicz 9b77e3bf03 AGS: Preliminary bitmap benchmark code
Made basic benchmarking code in engines/ags/engine/main/engine.cpp, by
adding the code into the seemingly unused allegro_bitmap_test_init
function.
2023-08-28 21:16:42 +02:00
Walter Agazzi 37f97cc8b6 AGS: Engine: add bitness and endianess to the printed engine version
+ Use term "engine" instead of "ACI" (a legacy "Adventure
Creator Interpreter" title).
From upstream eaf298ae3f96db6e37bfd9ac99bad1dff48430ae
2023-04-29 13:11:41 +02:00
Walter Agazzi 7808fb52e6 AGS: Engine: tidied few remaining old functions in Mouse namespace
* minstalled -> Mouse::GetButtonCount();
* msetgraphpos -> Mouse::SetSysPosition() (internal);
* mgetgraphpos -> Mouse::Poll();
* msetcursorlimit -> merged with Mouse::SetMoveLimit();
* msethotspot -> Mouse::SetHotspot().

From upstream 9211b07f36528776e6fabc34a29405b6d63f6c23
2023-04-29 13:11:41 +02:00
Walter Agazzi 6565ca8530 AGS: Engine: allow VSync in windowed mode
From upstream bcf90697ac93080d0edac3e99727041a4e2b461a
2023-04-29 13:11:41 +02:00
Walter Agazzi 9a801a02fd AGS: Engine: fixed preload image does not have a sprite batch
From upstream 84730a4bbfb971855c667241a9a47745f283f12e
2023-04-29 13:11:41 +02:00
Walter Agazzi 711ca20dd1 AGS: Engine: abort in case failed both to switch and restore gfx mode
This may be a temporary solution, but it's necessary, because otherwise
engine will fail later, with a seemingly unrelated error, which will
be harder to diagnose.
From upstream 902568c4eba9dba4eb762882890c6e8a308683aa
2023-03-12 20:58:28 +00:00
Thierry Crozat fa87b3f28f AGS: force update gui metrics on load and on game start
This fixes some controls not reporting their metrics correctly until first displayed on screen.

From upstream ea4e6762236a13621ba0771b9d5d8ac4bcf33ee8
2022-10-09 19:12:22 +01:00
Thierry Crozat 29505204c1 AGS: Turned want_exit and abort_engine vars from int to bool
From upstream e924778ce3f88a4c821a4eecfea8edc353a6807b

In ScummVM they were already bools, but where still assigned values
of 0 and 1 instead of false and true in some places.
2022-06-23 23:57:27 +01:00
Thierry Crozat 3a4d94bf0b AGS: Updated Multitasking setting
* Added `[misc] multitasking=[0,1]` to config, acting as a *starting*
  setting, which may be changed by runtime call to `SetMultitaskingMode`;
* Ensure multitasking mode is overridden by connected external debugger
  (always on, if possible);
* Let multitasking mode work in "fullscreen desktop" gfx mode (still
  disabled in exclusive fullscreen);
* Now correctly reset multitasking mode if gfx mode changes.

From upstream 9f091926e393f75c90c951f9597710bf17395332
2022-06-23 23:57:27 +01:00
Thierry Crozat 305fdb853a AGS: Abort current scripts on close window event
This helps kill "hanging" scripts if user closed the window while
there's no real engine update.

From upstream a758fd6de2dccd0c948fc7f9e5b65200df902a65
2022-06-23 23:57:26 +01:00
Thierry Crozat e90fb00412 AGS: Replaced more strcpy with snprintf, for safety
From upstream 1b6cf053ebbe85e7ba6c5828e2582d757503bc16
2022-06-19 20:50:24 +01:00
Thierry Crozat d6d464f898 AGS: Fixed sprite cache limit was reset on sprite file open
From upstream 4f57730e2b3d41af4fd0300e8b092d31d448f544
2022-06-16 23:16:20 +01:00
Paul Gilbert d2547418c0 AGS: Added show_fps to config
From upstream 2d6e0fca6bd310822e4f82ed95eb2bb5c116ac65
2022-05-05 22:59:51 -07:00
Paul Gilbert d385968209 AGS: Tidy up mobile config once more and get rid of psp_* variables
From upstream 4ba8fbed2f16786e86f201f57fdaaa91cc887700
2022-05-05 22:41:10 -07:00
Paul Gilbert 97c12e8435 AGS: Merged Character and ObjectCache structs, and hid in draw.cpp
From upstream 753d47d975b10666702c47a22cbc4e68847787f1
2022-05-05 22:41:09 -07:00
Paul Gilbert 6482e38803 AGS: CharacterExtras and MoveLists are stored in std::vector
From upstream 0c81cfefb788c0dcfdb2cad914f939f28110edca
2022-05-05 22:41:08 -07:00
Paul Gilbert 21ab95f5ab AGS: Remove RegisterGameWithGameExplorer()
From upstream 1554207f04dc6999994d02956587b302bb56f858
2022-04-29 22:20:39 -07:00
Paul Gilbert 23a2e8c709 AGS: More config parse helpers: reading boolean ints, min-max range
From upstream 9737cabb8e7562122f8c471793bd994685d72bfe
2022-04-27 20:38:38 -07:00
Paul Gilbert 7b0bfee7cc AGS: Renamed and moved INIread/write functions for proper org&style
From upstream 18398a7d695e81575218380e1bba28010c239fdc
2022-04-27 20:25:31 -07:00