Commit Graph
440 Commits
Author SHA1 Message Date
djsrv 0345a04e7a DIRECTOR: LINGO: cb_objectpush -> cb_varrefpush
The opcode isn't used just for objects.
2020-08-18 16:34:40 -04:00
djsrv b19569eb39 DIRECTOR: LINGO: Add eval arg to Lingo::pop/peek 2020-08-18 15:27:59 -04:00
djsrv 799ac26520 DIRECTOR: LINGO: Fix missing method fallback 2020-08-18 15:27:59 -04:00
djsrv 518c90ec8f DIRECTOR: LINGO: Pass me as arg to factory methods 2020-08-17 21:19:55 -04:00
djsrv 1e71b60d7c DIRECTOR: LINGO: Clean up wrong arg count handling 2020-08-17 21:19:55 -04:00
djsrv d5f5aac867 DIRECTOR: LINGO: Fix c_namepush return type 2020-08-17 21:19:54 -04:00
djsrv 1819e7da83 DIRECTOR: LINGO: Allow non-numeric type alignments 2020-08-15 12:30:23 -04:00
djsrv 2f0090e11d DIRECTOR: LINGO: Reload builtins on version change 2020-08-10 15:00:55 -04:00
djsrv 0ff7274993 DIRECTOR: Multiply version numbers by 100
To accomodate minor version.
2020-08-10 15:00:55 -04:00
djsrv 19e1d7e544 DIRECTOR: LINGO: Compile put to b_put 2020-08-06 11:50:34 -04:00
djsrv 9c537a8744 DIRECTOR: Rename Stage to more general Window
The stage and windows are the same type of thing, but the stage only
refers to one particular window.
2020-08-04 23:54:09 -04:00
Eugene Sandulenko 15e305a32d DIRECTOR: Pre-D4 Director was integer-only 2020-08-03 21:54:50 +02:00
Roland van Laar af4fb28dd9 DIRECTOR: LINGO: Improve charOf and charToOf
- Allow for floats as indexes
    Note: D3 does a round, D4 a floor
- Bugfix charToOf: correctly format substr parameters.
    substr 2nd parameter the length of the requested substring
    not a posTo.
2020-08-02 12:13:42 +02:00
Roland van Laar 4f5a851a33 DIRECTOR: LINGO: Implement c_itemOf
c_itemOf returns the specified item in a chunk expression.
A chunk expression is any sequence of characters delimited by
commas. It's 1 indexed in director.

Edge cases where index is:
  < 1: return the whole chunkExpression and
  > number of chunks: return ""
2020-08-01 23:02:56 +02:00
Roland van Laar f17efd5c39 DIRECTOR: LINGO: Implement charOf and charToOf
Includes tests in strings.lingo.
The tests verify that the scummvm implementation follows
the warts of the D4 one.
2020-07-31 22:16:44 +02:00
Roland van Laar 4d82702dfe DIRECTOR: LINGO: make warnings more consistent.
They are prepended with the namespace and functions and with ().
2020-07-29 17:46:48 +02:00
djsrv 1243acfd3a DIRECTOR: LINGO: Don't tell movie-less window 2020-07-28 11:51:10 -04:00
djsrv 8d29257e99 DIRECTOR: LINGO: Implement tell 2020-07-28 11:33:19 -04:00
Roland van Laar 32a4ec8d4d DIRECTOR: LINGO: Set correct debuglevel
The called function only prints on debuglevel 5. Set the debuglevel
to that.
2020-07-26 19:38:05 +02:00
djsrv 2b75427213 DIRECTOR: LINGO: Fix put before/after field 2020-07-22 16:01:12 -04:00
Nathanael Gentry 45cd97c1c4 DIRECTOR: Add matte intersect/within checks 2020-07-22 15:19:16 -04:00
djsrv f1ccd60db8 DIRECTOR: LINGO: Make allowRetVal mandatory 2020-07-22 14:31:13 -04:00
djsrv 542c702d8f DIRECTOR: LINGO: Don't push void on undefined cmds 2020-07-22 14:31:13 -04:00
djsrv d61ca31e56 DIRECTOR: LINGO: Improve return value handling 2020-07-22 12:38:01 -04:00
djsrv 336576c538 DIRECTOR: LINGO: Enforce return values 2020-07-22 12:38:01 -04:00
Roland van Laar 5357b8b23c DIRECTOR: LINGO: Handle builtin args in range
Builtins can have a range of arguments. For example
`unLoadCast` can have 0, 1 or 2 arguments, defined as 0, 2.
Calling such functions only allowed for the min and max number
of arguments (nargs). This fixes that by checking if the nargs
is either smaller than the minimum or larger than the maximum.
2020-07-22 00:18:52 +02:00
djsrv 5176a39a90 DIRECTOR: LINGO: Suppress var not found warnings 2020-07-20 11:56:05 -04:00
djsrv 7ae8fc0ff0 DIRECTOR: LINGO: Fix c_call resolution order 2020-07-20 11:56:05 -04:00
djsrv e95b7979b7 DIRECTOR: LINGO: Replace BLTIN/FBLTIN
They should only be treated differently during execution, not during
parse.
2020-07-19 13:33:35 -04:00
Nathanael Gentry 5fb984e99f DIRECTOR: Mostly implement cursor of sprite 2020-07-18 00:37:57 -04:00
djsrv f71670e8d9 DIRECTOR: LINGO: Implement allow outdated lingo 2020-07-15 23:30:12 -04:00
djsrv 27c02f3646 DIRECTOR: LINGO: c_open -> b_open
open needs to be compiled to c_call for the open window method to work.
2020-07-08 15:19:04 -04:00
Nathanael Gentry 8a85754f25 DIRECTOR: Move Channel to its own file 2020-07-08 13:44:02 -04:00
djsrv 3f0a33e5e8 DIRECTOR: LINGO: Allow method calls on any objtype 2020-07-07 16:59:55 -04:00
djsrv b2c20a07f7 DIRECTOR: LINGO: Refactor Object
This turns Object into a template so any type can easily act as a Lingo
object. For example, script objects no longer own a script context.
They *are* script contexts, and there are custom getters/setters for
methods and properties.
2020-07-07 16:59:55 -04:00
djsrv 59baadaefc DIRECTOR: LINGO: Fix builtin method calls 2020-07-07 16:53:31 -04:00
djsrv 1efd5f5c11 DIRECTOR: LINGO: Improve object refcounting 2020-07-06 20:18:57 -04:00
djsrv 856cb27870 DIRECTOR: LINGO: Reorganize Object 2020-07-06 20:18:57 -04:00
djsrv 38d17341e2 DIRECTOR: LINGO: Move lingo archive to Cast 2020-07-01 22:07:13 -04:00
Eugene Sandulenko 0193472e96 DIRECTOR: LINGO: Reduce remaining include dependencies 2020-07-01 18:16:21 +02:00
Eugene Sandulenko 888e80c9b0 DIRECTOR: LINGO: Reduce header dependency 2020-07-01 18:05:05 +02:00
djsrv 5ae6c34074 DIRECTOR: Separate Movie and Cast from Score 2020-07-01 10:50:31 -04:00
djsrv 3303ab985e DIRECTOR: Rename cast.cpp -> castmember.cpp 2020-07-01 10:50:31 -04:00
Roland van Laar f564846122 DIRECTOR: LINGO: Add closing bracket on point print 2020-06-30 11:48:35 +02:00
djsrv 0906dc3240 DIRECTOR: LINGO: Improve factory method calls 2020-06-25 21:04:00 -04:00
djsrv f220a0c469 DIRECTOR: LINGO: Give each Object a script context
Since symbols are bound to a script context, this will allow objects and
their methods to persist between movie changes. By extension, symbols
are now bound to a target object, eliminating the need for the extra
LC::call parameter.
2020-06-23 19:34:49 -04:00
djsrv 28d05a21c3 DIRECTOR: LINGO: Revert divide by 0 revert 2020-06-22 17:16:32 -04:00
djsrv 531b93b2a2 DIRECTOR: LINGO: Destroy anonymous context on pop 2020-06-22 15:51:29 -04:00
Eugene Sandulenko 9be8063cdc DIRECTOR: LINGO: Do not error out on division by zero 2020-06-22 09:50:40 +02:00
djsrv a548734a78 DIRECTOR: LINGO: Implement object comparison 2020-06-19 15:39:13 -04:00