Bill Currie
8dcb3fefb3
[qwaq] Offset position when forwardning mvaddstr
2020-03-26 20:31:14 +09:00
Bill Currie
4de2c6b30e
[qfcc] Move alias expr inside call block expression
...
This fixes the trampled return value when the first expression aliases
the return result.
2020-03-26 20:16:52 +09:00
Bill Currie
98eac2afbc
[qfcc] Hide dependency generation commands
2020-03-26 20:16:32 +09:00
Bill Currie
15d4186fff
[qfcc] Show line numbers in block sub expressions
...
Seems more useful than expression index.
2020-03-26 20:15:50 +09:00
Bill Currie
5fd63b95db
[qfcc] Add a new failing test
...
The struct alias is somehow blocking the detection of the call so the
return value gets corrupted.
2020-03-26 19:22:41 +09:00
Bill Currie
adb7b018d9
[qwaq] Improve focus setting
...
The view is recorded as having focus but is not given focus until the
parent view is actually in focus. This fixes the locals view not having
focus at startup and thus blocking F7.
2020-03-26 18:27:02 +09:00
Bill Currie
b2814700b9
[qwaq] Hook up locals view for events
...
The same debugger method is used because the idea is that all the
window in a group respond to the same commands in general.
2020-03-26 18:25:26 +09:00
Bill Currie
bd8d09479f
[qwaq] Start work on displaying local defs
...
The names show for the first function, but there are problems after
that.
2020-03-26 18:25:26 +09:00
Bill Currie
6ec7b96693
[qwaq] Initialize onEvent
...
sigh
2020-03-26 18:25:26 +09:00
Bill Currie
48f41142f5
[qwaq] Add function to get a string from the target
2020-03-26 18:14:20 +09:00
Bill Currie
90d89e8874
[qwaq] Move onEvent into View
...
In the end, it did make sense since it seems to facilitate MVC nicely.
2020-03-26 17:28:38 +09:00
Bill Currie
91c5283af5
[build] Fix ruamoko/gui's auto dependencies
...
Changing str_free's return type highlighted that I'd missed an edit when
I did the big ruamoko build cleanup.
Also silence the sed/mv noise now that things are working nicely.
2020-03-26 16:53:53 +09:00
Bill Currie
45d23ce521
[libr] Add bindings for new string functions
...
And correct str_free's return type.
2020-03-26 16:49:09 +09:00
Bill Currie
58ebbb147d
[ruamoko] Add some new string builtins
...
Wrappers for hold, valid and mutable. I have no idea why I didn't think
of wrapping string validation years ago.
2020-03-26 16:39:21 +09:00
Bill Currie
1586df4dfc
[gamecode] Make it possible to check string mutability
2020-03-26 16:38:09 +09:00
Bill Currie
ec82d6b027
[gamecode] Add support for holding ephemeral strings
...
PR_HoldString converts ephemeral (temp and return) strings to dynamic
strings. This makes dealing with strings in progs a little easier.
2020-03-26 16:36:29 +09:00
Bill Currie
b4874f7d9b
[gamecode] Make PR_FreeString a little more forgiving
...
It treats only strings that are actually invalid as invalid. That is,
now it is safe to "free" a static string: it's just a no-op.
2020-03-26 15:48:04 +09:00
Bill Currie
22e2695f80
[gamecode] Add VISIBLE to some missed functions
2020-03-26 15:36:46 +09:00
Bill Currie
e893421dba
[qwaq] Get context from owner instead of prev view
...
The previous view might be nil, which would result in the new view not
getting a context.
2020-03-26 14:46:48 +09:00
Bill Currie
e018f5cf71
[qwaq] Clean up Editor's event forwarding
...
Much less clunky with that container object. With this, I think it will
be useful moving the forwarding into View. Still unsure on that, though.
2020-03-26 14:16:58 +09:00
Bill Currie
aac732fc63
[qwaq] Support an actual parameter for listeners
2020-03-26 14:16:07 +09:00
Bill Currie
983a7422db
[libr] Add a two-object Array perform method
...
I decided it was worth doing after all. This cleans up event forwarding
in qwaq.
2020-03-26 14:14:04 +09:00
Bill Currie
6e473dc8f2
[ruamoko] Return nil IMP for nil method
...
Fixes a segfault.
2020-03-26 14:13:05 +09:00
Bill Currie
6e74f2a03f
[qwaq] remove @ from externs
...
I had forgotten that extern worked and that @extern was for headers that
might be compiled in traditional or extended modes.
2020-03-26 13:30:33 +09:00
Bill Currie
a28e7417e6
[qwaq] Make traceon and traceoff always available
...
Tired of adding and removing them all the time.
2020-03-26 13:27:53 +09:00
Bill Currie
30b97af65a
[qwaq] Actually send on receive/release focus messages
...
Noticed while tracking down the proxy view switch issue.
2020-03-26 13:21:05 +09:00
Bill Currie
dbb3802740
[qwaq] Transfer context to new view in proxy
...
This fixes the broken source window on file change.
2020-03-26 13:20:10 +09:00
Bill Currie
2d5df34234
[gamecode] Add VM enter/exit events
...
And rename prd_exit to prd_terminate (the idea is the host will
terminate the VM). This makes it possible for the debugger to pause the
VM before any code, even a builtin function, is executed. Breaks the
debugger source window, but only because it's not updating on file
change (I think).
2020-03-26 12:30:32 +09:00
Bill Currie
1bd8e2ee85
[gamecode] Add a param pointer to debug_handler
...
I decided I want events for VM enter/exit but enter needs to somehow
pass the function which will be executed (even if a builtin). A generic
void * param seemed the best idea, which meant the error string could be
passed via the param instead of a "global" string in the progs struct.
2020-03-26 11:44:02 +09:00
Bill Currie
35bb3a3854
[qwaq] Raise windows when clicked
2020-03-26 11:18:00 +09:00
Bill Currie
af0333a172
[qwaq] Ensure super's handleEvent is called
...
This fixes the inability to single-step (debug window couldn't regain
focus).
2020-03-26 11:04:57 +09:00
Bill Currie
1f8301774c
[qwaq] Fix over-consumption of editor events
...
This lets the window scroll again.
2020-03-26 09:19:22 +09:00
Bill Currie
fd73daea4b
[qwaq] Correct mangled params to qwaq_mvwvprintf
2020-03-26 09:11:56 +09:00
Bill Currie
22d173068b
[qwaq] Make a start on a locals viewer
...
It's just a data dump for now. Also, found a bug...
2020-03-26 09:11:39 +09:00
Bill Currie
e579ffcb00
[qwaq] Add functions to get functions by number
2020-03-26 09:03:44 +09:00
Bill Currie
115541877a
[qwaq] Set up an application color palette
...
Nothing special, just all the combinations of the 8 colors
2020-03-26 09:01:39 +09:00
Bill Currie
3ea16c2764
[qwaq] Add support for getting data, defs and functions
...
This will allow for really probing the target progs.
2020-03-25 22:39:17 +09:00
Bill Currie
513bb868fc
[qfcc] Remove unsigned define
...
I had forgotten that qfcc supports the keyword, just not the type yet.
2020-03-25 22:37:38 +09:00
Bill Currie
52dcb0a6e2
[gamecode] Add G_PACKED macro
...
Not sure when I'll use it, but as it avoids the null pointer check, it
should make for faster access to structs when reading or writing
multiple fields.
2020-03-25 22:36:04 +09:00
Bill Currie
48f737ecb6
[gamecode] Tweak types in dfunction_t
...
Mostly minor corrections to make more sense when reading them.
2020-03-25 21:05:25 +09:00
Bill Currie
1f8cc7186c
[qfcc] Hide "function" type behind an @
...
I'm not sure it's all that useful and thus it clutters the namespace.
2020-03-25 21:04:22 +09:00
Bill Currie
6f7ddf52ac
[gamecode] Add an exit debug event type
...
The VM never sends it because it cannot know if its exit is program exit
or just sub-program exit, but it's available for host systems to send.
2020-03-25 18:28:28 +09:00
Bill Currie
7b9177ec56
[qwaq] Extract the double-clicked word
...
The plan is to use it for variable lookups etc.
2020-03-25 17:29:08 +09:00
Bill Currie
585b33c111
[qwaq] Close up race-condition hole
...
After a lot of thought, I have come to the conclusion that the weird
crash the other day was caused by a race while the command ring buffer
had just been emptied: the command submission code opened up space for
writing, threads switched, and command processing saw the available data
and pounced on it before the submit code could write valid data. Thus
include the while header in the lock, and move the loop-end release
outside the lock. It may be a little confusing, but it seems to work.
2020-03-25 16:23:36 +09:00
Bill Currie
4cef9792f4
[util] Make hash-tables semi-thread-safe
...
They take a pointer to a free-list used for hashlinks so the hashlink
pools can be per-thread. However, hash tables that are not updated are
always thread-safe, so this affects only updates. progs_t has been set
up such that it is easy for multiple progs within one thread can share
hashlinks.
2020-03-25 15:43:16 +09:00
Bill Currie
ee6b078f18
[qwaq] Fix last window drag-resize corner case
...
I think I got distracted by the HoM bug while testing corners. Anyway,
with this, window resize by dragging seems to work well.
2020-03-25 14:45:55 +09:00
Bill Currie
e554202c24
[qwaq] Add combined move and resize method
...
This fixes the hall of mirrors bug (needed to move, resize, then move
the window).
2020-03-25 14:41:40 +09:00
Bill Currie
42f20f200d
[qwaq] Fix window resize bounds logic
...
Have a lot of HoM going on, though :(
2020-03-25 11:18:07 +09:00
Bill Currie
257b658059
[qfcc] Implement single-stepping
...
That... worked nicely. Program exit needs some work because exiting
terminates the thread and the debugger has no clue about it, but I was
able to single-step through gcd.r quite nicely.
2020-03-25 10:00:18 +09:00
Bill Currie
16bd047022
[qwaq] Add a key event listener to Editor
...
This will allow for easy expansion of editor functionality without
messing with the editor itself. In particularly, an editor normally
doesn't need to know anything about debugger hot keys.
2020-03-25 09:41:56 +09:00