Walter Agazzi
7cd860207d
AGS: Engine: add object and char assertions in Get/SetProperty functions
...
Since older commit 5f3b8eb the properties are stored in vectors,
strictly resized to the number of characters and objects.
But the script functions that access these do not do any assertion
whether the object or char is valid, which could cause bad mem
access in case script loops over a array of objects of MAX_OBJECTS
size, or tries to access something using Object* pointer from another room.
From upstream 6ad4b220d75a32ea8df959e9a7b7f1ecb21d0c26
2023-09-02 13:23:59 +02:00
Walter Agazzi
18b8335fea
AGS: Engine: fixed the bw-compat SetObjectFrame() behavior
...
This was broken by eb376e6
1. Treating negative loop and frame as an instruction to keep latest object's
loop and frame values was introduced around AGS 2.70 by Object.SetView(),
but this behavior also propagated to SetObjectFrame() command.
2. Removed clamping of loop and frame values inside Object.SetView(),
as that prevented applying a historical behavior of SetObjectFrame(),
where any invalid loop and frame value would be changed to just 0.
3. Don't quit the game in case of invalid loop and frame, but fallback
to default 0 value, and print a warning.
Also removed some redundant assignments to RoomObject,
possibly a result of a commit merge from another branch.
From upstream 66bb18f0224eebfb2a130395e9b18ce59b584e13
This is the 3.6.1 branch, but the fix is required to solve a game-breaking
bug in Chronicle of Innsmouth
2023-08-14 18:34:58 +02:00
Walter Agazzi
503e06a1a1
AGS: Engine: picked out basic Animate params check and warn instead of quit
...
This avoids the Gobliiins5 errors.
From upstream ecb4ae13031c32c2793d1d6a2b2af9f2af7bd911
2023-05-12 12:00:39 +02:00
Eugene Sandulenko
03460f9469
AGS: Fix bitwise operations
2023-04-29 20:28:20 +02:00
Walter Agazzi
150df392b4
AGS: Engine: fixed <3.6.0 Animate functions default volume parameter
...
From upstream d8d94b36a3e4e7fe201e93965952698fc6c8da5e
2023-04-29 14:32:39 +02:00
Walter Agazzi
7133cbfcdb
AGS: Engine: fixed room objects with ID >= 100 fail to Animate
...
This is because of legacy AnimateObject behavior, which treated IDs >= 100
as a command to run AnimateCharacter(ID - 100) instead.
From upstream 8365802092cd3f704aecffe7d08b4d9f65f1f396
2023-04-29 13:11:41 +02:00
Walter Agazzi
f77da38379
AGS: Engine: fixed view frames have a linked sound 0 by default
...
from upstream a4a98adfcb039e0f8f213d60e8b0b639b0217f9b
2023-03-12 20:58:28 +00:00
Thierry Crozat
8d36266724
AGS: Replaced strcpy with snprintf in old string API impls
...
From upstream 44d99badb2708fb99b1f7b9bc024082d570706c7
2022-06-19 20:50:24 +01:00
Thierry Crozat
9619169132
AGS: Use 100 as a default animation volume, as it's relative anyway
...
From upstream 90a60fffd5f010e957a53721f860997835216308
Also includes upstream 951f60c4dc25aa1d4320f595e01b048b53f6bf5f
2022-06-19 00:46:56 +01:00
Thierry Crozat
282ee9ad97
AGS: Fixing more trivial warnings
...
From upstream 83f7d9857e70f7d1d10fedf61196740d20ba0b0a
2022-06-18 01:08:54 +01: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
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
a40ea44aa2
AGS: CharacterCache is stored in std::vector, hide in draw.cpp
...
From upstream 417879fce0dc27d458a73fedc20f311f3305f26f
2022-05-05 22:41:08 -07:00
Paul Gilbert
830c1b096b
AGS: introduced ObjTexture struct which combines bmp and ddb
...
From upstream b628fb4d1b3ca6a85e2b2424a468f4cec94ae9c6
Also includes new implementation of std::vector class to
properly allow for arrays of smart pointers
2022-05-05 22:41:05 -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
8d261dd92f
AGS: Corrected naimng style of RoomObject::NO_VIEW constant
...
From upstream ff544cda911ab036be44171a1b97b8a52e943758
2022-04-24 16:00:03 -07:00
Paul Gilbert
f27e782b23
AGS: Use constant to setup "no view" in RoomObjects instead of -1
...
From upstream a1f74944a7e3c058deb8b12680c5b9aba19dee5a
2022-04-24 16:00:01 -07:00
Paul Gilbert
fabab1285d
AGS: Made Hotspot.Name and Object.Name settable
...
From upstream 6a7271c4df1765dc86f88d7676337b63fcef17aa
2022-04-10 19:39:08 -07:00
Paul Gilbert
8511f7b36c
AGS: Adjusted comment in SetObjectFrame to make it bit more visible
...
From upstream 6c6a5ff35a29eedbcd8aa1a33ec99de2f3536b09
2022-03-23 20:40:23 -07:00
Paul Gilbert
a3dda03cf1
AGS: Store Views in std::vector
...
From upstream 095db88ae0f1acceb298f793a2e1b81dbe06fcff
2022-03-18 21:29:56 -07:00
Paul Gilbert
255a739eca
AGS: Encapsulate game object draw caches in draw.cpp
...
From upstream e04ebc0039580faf017ceb0acbeeab975bf44fcc
2022-03-14 21:04:09 -07:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
Paul Gilbert
5e5a7ab089
AGS: SetObjectFrame fallback to dummy frame in an empty loop
...
From upstream 1496f7f6419d192bd4060956492e8897678035c9
2021-09-28 20:18:40 -07:00
Paul Gilbert
47928c39aa
AGS: changed Object.SetView default loop & frame values to 0
...
From upstream eb376e63f95b09fd75ca7f96591aca20d0564072
2021-07-27 22:03:36 -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
701396361c
AGS: Import of fresh codebase
2021-06-13 21:08:44 -07:00
Paul Gilbert
3a0a70bc43
AGS: Move more game.cpp globals to Globals
2021-03-10 21:01:11 -08:00
Paul Gilbert
2d82d32577
AGS: Move draw.cpp globals to Globals
2021-03-09 21:14:02 -08:00
Paul Gilbert
764271844a
AGS: Move global_object globals to Globals
2021-03-08 20:03:22 -08:00
Paul Gilbert
dc019af530
AGS: Move character.cpp globals to Globals
2021-03-08 19:04:35 -08:00
Paul Gilbert
d12bb69417
AGS: Move event.cpp globals to Globals
2021-03-08 18:29:32 -08:00
Paul Gilbert
37b563ef35
AGS: Move game globals to Globals
2021-03-07 19:23:24 -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
ef245e2104
AGS: Move thisroom to Globals
2021-02-28 13:27:21 -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
fe46be9223
AGS: Added engine/ac/ folder
2021-02-06 16:37:31 -08:00
Paul Gilbert
9a78e04039
AGS: Beginnings of engine/ inclusion
2021-02-06 16:37:31 -08:00
Paul Gilbert
a7a9ca0543
AGS: Adding AGS3 namespace to cpp files
2021-02-06 16:37:31 -08:00
Paul Gilbert
d8e471b03c
AGS: Changing Common namespace to Shared
2021-02-06 16:37:31 -08:00
dreammaster
8026e4bb30
AGS: Run astyle formatting
2021-02-06 16:37:31 -08:00
Paul Gilbert
bd6a58d1a1
AGS: Adding ScummVM comment headers
2021-02-06 16:37:31 -08:00
Paul Gilbert
a60d290a08
AGS: Initial addition of engine/ and shared/ folders
2021-02-06 16:37:31 -08:00