Commit Graph
71 Commits
Author SHA1 Message Date
Thierry Crozat b052270504 AGS: Engine: in built-in dialogs exceed all the keypress buffer at once
From upstream ec194e7fbd964f29e590d3b446db9dd3804e9e02
2022-12-17 22:10:55 +01:00
Thierry Crozat 57266951a9 AGS: Engine: fixed built-in textboxes not responding to printed chars
From upstream f1064e91c3b71e2bed4d866bb57b2d32fc1fed25
2022-12-17 22:10:55 +01:00
Le Philousophe 7f90669bdd AGS: Don't use unsafe strcat and strcpy 2022-10-23 22:46:19 +02: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
Thierry Crozat 282ee9ad97 AGS: Fixing more trivial warnings
From upstream 83f7d9857e70f7d1d10fedf61196740d20ba0b0a
2022-06-18 01:08:54 +01:00
Paul Gilbert 91d25a3098 AGS: Added animation volumes to save format
From upstream 752da45aa7666355e383df0f1017cf5c5842fea1
2022-05-10 21:18:01 -07:00
Paul Gilbert d39c6cb31f AGS: Added "sound volume" param to all Animate() functions
From upstream 926220f9706baafa80d05ff6264f7fa13296dc16
2022-05-10 21:17:59 -07:00
Paul Gilbert c143ceb01b AGS: Tidied and fixed InputBox to work with SDL2 input
From upstream adec08a02664c0ab35ab358ca255ca6f2e3801b1
2022-05-08 11:37:49 -07:00
Paul Gilbert da1178d905 AGS: Implemented proper HasAlphaChannel for all gui controls
From upstream 83306ee321e127368a41068f32bd4899ae00223e
2022-05-05 22:41:06 -07:00
Paul Gilbert ec170ebd2f AGS: More strict MarkChanged use for gui controls, on changes only
From upstream 1383ff33eb4620eae18598f96f7e0cc948977174
2022-05-01 17:23:22 -07:00
Paul Gilbert 2df62bdd55 AGS: Only redraw gui controls when they are marked as changed
From upstream 27a6bd6a13494cd670fb6749e5bd663f088487ea
2022-05-01 17:23:19 -07:00
Paul Gilbert 62ebde86a1 AGS: Gui controls draw themselves at requested offset
From upstream 9e9c8ffafe465b907ed0d22bcb1ba4df06803b8b
2022-04-29 22:20:40 -07:00
Paul Gilbert 403892950c AGS: Removed ListBox::DrawItemsFix, add preview items externally
From upstream af126ccdef791d6f97a65018bc3188e9767d399f
2022-04-29 22:20:40 -07:00
Paul Gilbert 68e5184afa AGS: Replaced some (v)sprintfs with sNprintf counterparts
From upstream a34bd392249f87a152dc470d90c67a7d193a28d8
2022-04-27 20:51:30 -07: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 9dd7ce9313 AGS: Store debug room names in std::vector
From upstream 83499b1afbb1a4c0717cf9b665969f4e4ca9b6b1
2022-04-23 19:36:22 -07:00
Paul Gilbert 3467180e39 AGS: Refactored GUIMain to not use mouse coords directly
From upstream 2f736d3365dc5fae6eebe353b64e16af156308f8
2022-04-23 17:56:20 -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 09d4069428 AGS: Share animation cycling algo between Buttons and RoomObjects
From upstream fd28a2548e39c85478d98e26b51713cd687acada
2022-04-22 20:05:04 -07:00
Paul Gilbert bf5e0b2d08 AGS: Updated AnimatingButton save format
From upstream 7920a8719db3bc39b1187a076184d9a6d66b1310
2022-04-21 22:18:33 -07:00
Paul Gilbert 415235b74e AGS: expanded Button.Animate to feature all common params
From upstream 0853d4146276f86c7418dc02360deb49a0ef324a
2022-04-21 22:07:41 -07:00
Paul Gilbert 3425f8faf2 AGS: Moved couple of gui-related global vars into GuiOptions struct
From upstream 973d238a2c20368d8932ade22d2965d121cb7793
2022-04-10 19:39:06 -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
Paul Gilbert 2d995bbe07 AGS: Simplified use of ReplaceBitmapWithSupportedFormat()
From upstream 2132ba833b9d4508ed3f81a65f531b88f6087cb5
2022-03-14 21:33:38 -07:00
D G Turner 6d7663b1b1 AGS: Fix Redundant Declaration Warnings
These are emitted by GCC when -Wredundant-decls is passed.
2022-03-09 15:28:19 +00:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
antoniou79 d474ee3003 AGS: Change a few char variables to int8
In order to specify that they should be treated as signed

Some ports may treat an (unspecified) "char" as unsigned by default. Android does this for its ARM architectures and while we did fix this by enforcing -fsigned-char to its compiler, the issue may come up for other ports. Also it should be better to clarify in the engine when a variable is not actually storing string characters.

I've spotted and changed the most "safe" cases I could find for this. As far as I can tell, out of these, only the Outline field and fontoutline array could potentially be assigned valid negative values which would cause bugs for ports treating chars as unsigned.
2021-09-09 19:27:49 -07:00
Thierry Crozat 60d86686e6 AGS: Fix savegame description in preparesavegamelist
We now use a U32String for the savegame descriptions, but
the code was calling c_str() directly on it, and the uint32 pointer
was casted to a char pointer along the way. This resulted in only
the first character of the description being displayed on little
endian systems (and probably none on big endian systems since the
first byte would be 0 for ASCII characters).

This fixes bug #12869
2021-09-07 00:18:02 +01:00
Paul Gilbert 91fa6ee386 AGS: Removed check_font() from GUI, as font handling is now safer
From upstream dc24ac2493026cfecfd0664a057f61f99f4b28ae
2021-08-20 21:49:38 -07:00
Paul Gilbert 73cd6b9215 AGS: Structure for passing events UTF8 text around along with the keycode
From upstream 9d65a68c61d0503e05e2cbe80447af0d619161e4

Note that ScummVM doesn't have a TEXT_INPUT event, so this change and following
ones will be mostly to keep in sync with the standalone codebase even if they're
not directly used
2021-07-10 14:33:36 -07:00
Paul Gilbert 454cc0fff9 AGS: Properly move Lines global into Globals 2021-07-08 20:37:51 -07:00
Cameron Cawley 9b348b3e7d AGS: Fix more type mismatches 2021-06-16 13:03:41 +01:00
Paul Gilbert 472fbb224a AGS: Switch processmessage to use NumberPtr again 2021-06-15 18:38:07 -07:00
Paul Gilbert 46ddd20145 AGS: Fixed few type cast warnings
From upstream 3085660c96318f2fb4943aff6fc41dfcd6a00c3d
2021-06-13 21:09:01 -07:00
Paul Gilbert eb1e337edd AGS: Removed String's "const char*" conversion operator
From upstream 7c426674e7e53bffe9120f8ffc059b77fa03a606
2021-06-13 21:08:59 -07:00
Paul Gilbert 87dba2e276 AGS: Re-added checks for SHOULD_QUIT and abort_engine 2021-06-13 21:08:52 -07: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
Thierry Crozat d1d2f106bb AGS: Sort savegame by decreasing slot number
The original interpreter sorts the savegame from the most recent
to the oldest. We don't have the savegame date in ScummVM, but
sorting by decreasing slot number should approximate this better
than using increasing slot numbers.
2021-04-13 20:42:54 +01:00
Thierry Crozat 19ef15177b AGS: Fix various issues with savegames
One of the issue was that we were listing the restart point
savegame (in slot 999), and it should not have been listed.
This caused a crash in the ags savegamedialog as it tried
to use the next slot, 1000, which is out of bound.
Changing this fixes bug #12386.

Another issue is that we could do out of bound writes due
to the AGS engine having to MAXSAVEGAMES define, one set to 20
and the other to 50. And in one place we were using the wrong
one.

Also specify a maximum save slot of 99. This is what the
original uses as it reserves higher slots for special purposes.

And finally do not use slot 999 for autosaves as it conflicts
with the slot used bu AGS for the restart point.
2021-04-09 00:14:56 +01:00
Paul Gilbert 1a67d84723 AGS: Do shouldQuit() check when showing quit dialog 2021-03-14 17:05:45 -07:00
Paul Gilbert 43778457ad AGS: Move guidialog.cpp globals to Globals 2021-03-13 16:46:24 -08:00
Paul Gilbert 3a0a70bc43 AGS: Move more game.cpp globals to Globals 2021-03-10 21:01:11 -08:00
Paul Gilbert d61b6f98c5 AGS: Move cscdialog.cpp globals to Globals 2021-03-10 20:14:15 -08:00
Paul Gilbert 2d82d32577 AGS: Move draw.cpp globals to Globals 2021-03-09 21:14:02 -08:00
Paul Gilbert f05ad88320 AGS: Move gui.cpp globals to Globals 2021-03-08 18:41:26 -08:00
Paul Gilbert 34c86ce1a1 AGS: Removal of commented out includes 2021-03-06 19:43:13 -08:00
Paul Gilbert 94423abaa1 AGS: Move usetup to Globals 2021-03-05 21:36:00 -08:00
Paul Gilbert a51a186387 AGS: Moved guibutton.cpp globals to Globals 2021-03-03 20:25:07 -08:00
Paul Gilbert 3f62f198ac AGS: Move Lines global to Globals fontLines 2021-03-01 21:12:32 -08:00