Commit Graph
64 Commits
Author SHA1 Message Date
Walter Agazzi 50a655871f AGS: Engine: fixed dialog parser not drawn on the correct position
From upstream 394866b2928433475fcfd0a3ab298e2b70570cbc
2023-01-17 17:27:07 +00:00
Thierry Crozat 871d4b54e1 AGS: Engine: in DialogOptions exceed all the keypress buffer
From upstream 5488f02bae108c1f191a5b6ca3a46eee6497058a
2022-12-17 22:10:55 +01:00
Thierry Crozat 0927821afd AGS: small refactor of key code variables (stricter names, types)
From upstream e04c8ff1fe77e4462babd21d2a103a12e68b4b84
2022-10-10 00:16:16 +01: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 e90fb00412 AGS: Replaced more strcpy with snprintf, for safety
From upstream 1b6cf053ebbe85e7ba6c5828e2582d757503bc16
2022-06-19 20:50:24 +01:00
Thierry Crozat b948d94ce2 AGS: Implemented dialog_options_close callback
From upstream 88cb130d1063bf5268bbcae29ffaae37324f5a30
2022-06-19 00:46:56 +01:00
Thierry Crozat 02085d5481 AGS: Refactored do_conversation()
Split do_conversation into multiple functions, simplified the running
the dialog topics chain code and removed code duplication as possible.
+ Removed the limit of nested dialogs.
+ This also fixes "goto-previous" not working from the first sub-dialog.

From upstream 7bb167f5f6ee6a1976b829a1d67423d69346dc6e
2022-06-13 00:30:21 +01:00
Thierry Crozat e26adb919e AGS: Moved global DlgOpt into show_dialog_options() function
From upstream 516231d87a582f32221e4a3f86ce9d437c37f642
2022-06-13 00:30:21 +01:00
Paul Gilbert 6ee31a530e AGS: Removed unnecessary ags_domouse() calls
From upstream de28de1dd44d991a479ae0adb5fdb4996fe33656
2022-04-29 22:20:39 -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 d0e8eba2c4 AGS: In DialogOptions changed index fields from char to int
From upstream 0db875df33a293797e176a0cbeefd60beeb92b14
2022-04-25 20:08:44 -07:00
Paul Gilbert a1a0323d28 AGS: Removed few redundant function args
From upstream 4c80a7fb3afdfd8d7b82f16b7aeac5418565f608
2022-04-24 16:00:03 -07:00
Paul Gilbert 17bac5b1ef AGS: Removed redundant function domouse(int what)
From upstream 3dfda41382bdd10e3b2b78f797fade8b5dcc1efa
2022-04-23 18:15:02 -07:00
Paul Gilbert e0282d5064 AGS: Implemented key handling switch (old/new mode)
From upstream b9e23731d0d792d095c1d4e83fa1797a1afeee46
2022-04-21 20:55:38 -07:00
Paul Gilbert e736059bbe AGS: pass key modifiers as an extra arg to on_key_press
From upstream b00b82220cbabf44185e042ef33b543fe2ad3543
2022-04-21 20:23:53 -07:00
Paul Gilbert 09da0fbf5d AGS: Implemented dialog_options_text_input(int chr) callback
From upstream 76db49c6189810faa467b00c1aef9e78c526876d
2022-04-18 19:10:39 -07:00
Paul Gilbert b2d8bcad75 AGS: Refactor RunTextScript* functions for the purpose of clarity
From upstream 17af6ca2cb1fba310900f5189da788fa52ef7dab
2022-04-18 19:10:39 -07:00
Paul Gilbert 86f3f8933b AGS: Use real font height for speech & dialog option bitmap sizes
From upstream 22af623cadce89ac27777cf2178649a71fc2a345
2022-03-23 20:50:27 -07:00
Paul Gilbert d42b639142 AGS: Always precalculate and save font linespacing (as outlined)
From upstream 8ba3a77e38a6dc8ace6d6393042730d73292a1a7
2022-03-22 22:30:14 -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
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
Paul Gilbert 9742dfb163 AGS: Shifting multiple classes to plugins/core/ 2021-07-16 19:48:14 -07:00
Paul Gilbert 46eeb0aa2a AGS: Fix crash quitting app when speech dialog is active 2021-07-10 20:23:52 -07:00
Paul Gilbert adc208ca4f AGS: text parser's F3 command works with unicode
From upstream d47ddd66dee768fd76fea74f888929bb9c748323
2021-07-10 14:33:37 -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 eb1e337edd AGS: Removed String's "const char*" conversion operator
From upstream 7c426674e7e53bffe9120f8ffc059b77fa03a606
2021-06-13 21:08:59 -07:00
Paul Gilbert cd8a0cff0d AGS: Removed unnecessary strlen over String
From upstream 3947e968ea306cde579936bf02295bf285d7583a
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 701396361c AGS: Import of fresh codebase 2021-06-13 21:08:44 -07:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Thierry Crozat 31871e4730 AGS: Minor cleaning to match upstream code 2021-04-14 23:54:48 +01:00
Thierry Crozat 8baf920e73 AGS: Fix custom dialog options dropped fps twice
This is because game was making TWO time breaks between frames
instead of one.
Cherry picked from adventuregamestudio/ags bac258cac2.
2021-03-29 20:15:31 +01:00
Paul Gilbert 3a0a70bc43 AGS: Move more game.cpp globals to Globals 2021-03-10 21:01:11 -08:00
Paul Gilbert a5c4876862 AGS: Move mouse.cpp globals to Globals 2021-03-09 21:15:12 -08:00
Paul Gilbert 2d82d32577 AGS: Move draw.cpp globals to Globals 2021-03-09 21:14:02 -08:00
Paul Gilbert 81976cb994 AGS: Move dialog.cpp globals to Globals 2021-03-08 19:22:34 -08:00
Paul Gilbert dc019af530 AGS: Move character.cpp globals to Globals 2021-03-08 19:04:35 -08:00
Paul Gilbert 37b563ef35 AGS: Move game globals to Globals 2021-03-07 19:23:24 -08:00
Paul Gilbert e82070c485 AGS: Move dialog.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
Paul Gilbert b6dd902163 AGS: Move script.cpp globals into Globals 2021-02-28 16:41:48 -08:00
Paul Gilbert 887472c8c1 AGS: Moved a lot of game.cpp globals to Globals 2021-02-28 13:27:21 -08:00
Paul Gilbert ae9a824fba AGS: Fix text strings changed in game search & replace 2021-02-27 15:31:34 -08:00
Paul Gilbert 334b2a9d48 AGS: Move play to Globals 2021-02-27 15:31:34 -08:00
Paul Gilbert 1a8ae27b58 AGS: Move game & spriteset into Globals 2021-02-26 21:28:53 -08:00
Paul Gilbert cd017a73c7 AGS: Revert Standardization of number types
This reverts commit a96422af52.
2021-02-16 19:45:02 -08:00