Commit Graph
232 Commits
Author SHA1 Message Date
Scott Percival ccd72e5e1b DIRECTOR: LINGO: Always let cb_assign write a property
This function needs to be able to deal with D3-style anonymous
objects, where no properties are defined in advance.
2023-01-10 13:41:53 +01:00
Scott Percival 9109495484 DIRECTOR: LINGO: Stop reading property list after getting -1
This appears to be another space reclamation feature in Director;
there are examples of the property list being a -1 followed by
bytecode garbage from the previous field.
2023-01-10 13:41:53 +01:00
Scott Percival 873095c87e DIRECTOR: Move current Lingo state into Window-owned struct
The previous arrangement was to copy the bits of Lingo state back and forth from
the Window object to the Lingo instance, and query the window for the
callstack. This refactor consolidates the current Lingo state into a single
struct, owned by the Window object and accessible via a pointer on the
Lingo object.
2022-12-09 01:10:57 +01:00
Scott Percival cadfa5dcc0 DIRECTOR: Hide noisy global definition warning 2022-10-22 19:53:22 +02:00
Roland van Laar d4bc98d121 DIRECTOR: LINGO: switch to use datum constructor
The datum constructor is overloaded and handles setting the type.
Instead of setting the type by hand we leverage the constructor.

The in this commit are mainly for Datums of type int.
2022-09-21 12:14:35 +02:00
Scott Percival 29cc573d96 DIRECTOR: Update scriptframe command to include cast ID 2022-09-20 20:17:06 +02:00
Scott Percival c1ebb4d52d DIRECTOR: Implement funcs debugger command 2022-09-20 20:17:06 +02:00
Scott Percival 31472c30e2 DIRECTOR: LINGO: Split out disassembly formatting code 2022-09-20 20:17:06 +02:00
Pragyansh Chaturvedi (r41k0u) 3eea6c2a9f DIRECTOR: LINGO: Check for wrong menu and menuItem types when invoking Lingo::getTheEntity() or Lingo::setTheEntity() for MENUREF Datums 2022-06-22 00:55:14 +02:00
Pragyansh Chaturvedi (r41k0u) 4bc2f5ed51 DIRECTOR: LINGO: Create TheEntityArgsType kTEAMenuId to seperate menu entity from kTEAItemId 2022-06-22 00:55:14 +02:00
Pragyansh Chaturvedi (r41k0u) f83934e05b DIRECTOR: LINGO: Implement MENUREF Datum type and STUB for Menu, Menus, MenuItem and MenuItems [WIP] 2022-06-22 00:55:14 +02:00
Pragyansh Chaturvedi (r41k0u) 60fdff4231 DIRECTOR: LINGO: Replace printSTUBWithArglist with macro printWithArglist 2022-06-16 22:46:30 -05:00
Eugene Sandulenko 7dba70066a DIRECTOR: LINGO: Added missing word-bytecodes 2022-06-06 01:18:38 +02:00
Eric Lasota a90a1a0aed COMMON: Move 80-bit float parsing from Director to Common (#3953) 2022-06-03 21:28:17 +02:00
Roland van Laar 3382e49338 DIRECTOR: LINGO: clearify unknown V4 the entities
The comments are the names taken from Projectorrays.
2022-04-03 12:08:59 +02:00
Roland van Laar 50d369631b DIRECTOR: dump factory scripts with their names
FactoryScripts are now dumped with their 'factory-<name>' in the dumped
filename.

Factory scripts are different in that they are not associated with a cast and have a
scripType that is kNoneScript, i.e. -1.
2022-03-25 18:08:55 +01:00
Roland van Laar 8af497a75c DIRECTOR: LINGO: Generalize cb_theassign2
Leverage the existing setTheEntity functionality in cb_theassign2.
2022-03-20 11:43:59 +01:00
Roland van Laar 56d740b60f DIRECTOR: LINGO: Implement preLoadEventAbort
preLoadEventAbort is a boolean property. When true pressing keys or clicking the
mouse can or stop preloading of cast member. ScummVM doesn't preload, so
implemented as a no-op.
2022-03-19 00:18:03 +01:00
Roland van Laar 60d8e9ae88 DIRECTOR: LINGO: Implement preloadRam as a no-op
The preloadRam property is used to specify the amount of RAM allocated
for preloading casts. ScummVM assumes there's always anough RAM to run
old games.
2022-03-18 22:01:10 +01:00
Roland van Laar 0ec237b467 JANITORIAL: Remove old comment 2022-03-14 21:28:32 +01:00
Roland van Laar cc9f49e89c DIRECTOR: LINGO: Add traceLoad to cb_theassign2
traceLoad handling was missing from cb_theassign2.
Fixes D4 dictionary traceLoad movie.
2022-03-14 21:12:00 +01:00
Roland van Laar 3c318cb3f8 DIRECTOR: LINGO: Fix Lingo V4 entity the type
Set the right  bytecode for the entity kTheType. kTheCursor was
defined for two bytecode operations.

This fixes a long standing bug in Majestic. A rectangle got its cursor
set instead of the type. Obsuring other rectangles which did should have
shown a cursor. Now all interactive objects are indicated by a cursor
change.
2022-03-13 15:43:42 +01:00
Roland van Laar 5ce2dffaee DIRECTOR: LINGO: implement updateMovieEnabled
updateMovieEnabled is a boolean. It's a flag to signal that the changes
in the movie need to be saved when branching to another movie.

The variable is implemented but without any side effect.
2022-03-11 23:23:44 +01:00
Roland van Laar 8d22aa3af1 DIRECTOR: LINGO: Implement the actorList property
The actorList is a global array property. Birthed scripts can be added
to it. The `stepFrame` method is called on all objects in the array on
every frame. < D4 had an executePerFrameHook for this.
2022-03-11 21:58:15 +01:00
Roland van Laar 95fc5560f9 Director: Implement the searchPath
the searchPath is an array that contains paths that need to be searched
when opening a file. It's a property on the same global level in the
same way itemDelimeter is.

The searchPath is set via cb_theassign2. It's used for assigning
properties to the movie itself. `g_lingo` in the case of ScummVM.

The only known case for cb_theassign2 is in the game Louis Catorze
where it's only used for the searchPath.

Note: cb_theassign() does the same thing for script and factories
2022-03-10 23:42:37 +01:00
Roland van Laar 7fa0835be7 DIRECTOR: LINGO: Add v4 'the' mappings for cast
Adds mapping for text options.
The mappings follow the same patterns for kTheField.
2022-01-20 21:45:44 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh 02cfffcb67 DIRECTOR: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
djsrv e6c696031f DIRECTOR: Punycode dump file names 2021-08-07 10:44:37 +02:00
ysj1173886760 a317110704 DIRECTOR: implement setTheMenuItemEntity 2021-07-29 11:40:39 +08:00
ysj1173886760 119253ce3f DIRECTOR: add sorted attribute for array type datum. 2021-07-28 14:53:13 +08:00
djsrv 5a7c191ac4 DIRECTOR: LINGO: Create one call stack per window
Since there may be frames left on the call stack after Lingo::execute()
is called now, it isn't safe to share one call stack between several
movies executing in parallel.
2021-07-21 20:35:40 -04:00
djsrv 6ab8a0a4db DIRECTOR: LINGO: Fix tellcall arg type 2021-07-21 19:12:17 -04:00
djsrv 07f8f718c1 DIRECTOR: LINGO: Completely untie script contexts from Lingo archives
A context can outlast its containing archive, so we don't want it to
have any references to the archive.
2021-07-21 18:27:05 -04:00
djsrv 2e8d061cc8 DIRECTOR: LINGO: Remove g_lingo->_currentArchive
All uses of this have been removed since we can't rely on the archive to
still exist when switching movies.
2021-07-21 18:27:05 -04:00
djsrv 3c0b31ef97 DIRECTOR: LINGO: Code name arguments as string
We can't just code the names as integer IDs and look them up later.
The name table will be deleted when the movies switches.
2021-07-21 18:27:05 -04:00
djsrv 4450cd5ced DIRECTOR: LINGO: Decode constants using Cast::decodeString 2021-07-15 16:31:47 -04:00
djsrv 5b3bed6e57 DIRECTOR: LINGO: Re-encode Lingo constants to UTF-8 2021-07-15 16:31:47 -04:00
djsrv 615995fdc1 DIRECTOR: Change member refs to use CastMemberID 2021-06-30 22:32:19 -04:00
djsrv 2d5ca7a1d6 DIRECTOR: Remove getCastMemberByScriptId from Movie
This can be called on the correct cast directly.
2021-06-30 22:32:19 -04:00
Eugene Sandulenko 0902272ab9 DIRECTOR: Fix MSVC warning 2021-07-01 01:35:58 +02:00
djsrv e072cd925f DIRECTOR: LINGO: Add v4 'the' mappings for chunk refs 2021-06-28 19:59:53 -04:00
djsrv d378b8f2e0 DIRECTOR: LINGO: Fix v4 'the' mapping 2021-06-25 23:01:33 -04:00
djsrv 5f95faf116 DIRECTOR: LINGO: Implement cb_v4assign2 2021-06-25 01:52:40 -04:00
djsrv 9198d7364a DIRECTOR: LINGO: Move field funcs from LB to LC
field, delete, and hilite were implemented as their own instructions in
the original. This also avoids having refs evaluated by LC::call.
2021-06-24 00:26:15 -04:00
djsrv a049a0107f DIRECTOR: LINGO: Remove evaluate on pop
Grammar changes have made this hack unnecessary.
2021-06-24 00:21:24 -04:00
djsrv c13088a829 DIRECTOR: LINGO: Load intpush's arg as signed 2021-06-23 16:29:10 -04:00
djsrv 2aa766754f DIRECTOR: LINGO: Make getObjectProp use stack
LC::call only pushes a stack frame and may not evaluate until later, so
we can't immediately pop its return value. This avoids that issue.
2021-06-22 18:16:53 -04:00
djsrv 161cf05f7c DIRECTOR: LINGO: Add missing ! 2021-06-22 18:16:53 -04:00
djsrv 2b19132d97 DIRECTOR: LINGO: Add global, local, prop reference types 2021-06-22 18:16:53 -04:00