Commit Graph

650 Commits

Author SHA1 Message Date
Bill Currie 2a38135dd9 [qwaq] Fix scrollbar thumbtab covering button
Caused by an out-by-one error.
2021-06-09 08:33:50 +09:00
Bill Currie d23c9582f1 [qwaq] Implement execute-to-cursor
Support for finding the first address associated with a source line was
added to the engine, returning 0 if not found.

A temporary breakpoint is set and the progs allowed to run free.
However, better handling of temporary breakpoitns is needed as currently
a "permanent" breakpoint will be cleared without clearing the temporary
breakpoing if the permanent breakpoing is hit while execut-to-cursor is
running.
2021-06-08 16:54:04 +09:00
Bill Currie c818a2abf9 [qwaq] Support base filename and cursor fetching
Getting the base filename and the current cursor position is needed for
execute-to-line support in the debugger.
2021-06-08 16:50:30 +09:00
Bill Currie c06acd3b53 [qwaq] Update line and char indices with cursor motion 2021-06-08 16:48:24 +09:00
Bill Currie 1f6a4ed941 [qwaq] Implement cursor motion in the editor
Basic arrow key motion, and it's currently limited to not scrolling
horizontally (need to figure out how to handle max scroll), but this
also fixes the cursor handling on focus switching :)
2021-06-07 22:21:48 +09:00
Bill Currie 551236511d [qwaq] Make the editor show the cursor
As well as showing the cursor, it keeps the cursor's position up to date
(for now, just at 0,y as only gotoLine is implemented, no cursor motion
yet)
2021-06-07 16:20:15 +09:00
Bill Currie 5892008306 [qwaq] Add char get/put/insert methods to EditBuffer 2021-06-07 16:05:32 +09:00
Bill Currie 48bf6fff13 [qwaq] Get the cursor mostly working
It's a little flakey with respect to redraws and changes of focus, but I
think that's just updating the cursor state in more places.
2021-06-07 15:58:19 +09:00
Bill Currie d36a75e3de [qwaq] Fix incorrect screen refresh
Or, at least, I think it's incorrect, since stdscr (which was being
refreshed) should not be used when using panels.
2021-06-07 15:56:57 +09:00
Bill Currie 5e8376340d [qwaq] Add method to get group's owning view 2021-06-07 15:56:20 +09:00
Bill Currie 3d42f986c3 [qwaq] Add wrapper for wmove 2021-06-07 15:53:35 +09:00
Bill Currie f50d27ec11 [qwaq] Show dereferenced data for poitner defs
The code currently assumes a single value is referenced rather than the
beginning of an array.
2021-06-04 13:35:53 +09:00
Bill Currie 22b9bb29f6 [qwaq] Calculate type sizes for compound types 2021-06-04 13:34:15 +09:00
Bill Currie 7275d9bbf5 [qwaq] Fully load target types into debugger
Fully loading the types means that code using the target's type
definitions does not need to worry about pulling in sub-types for
structured data.
2021-06-04 13:31:43 +09:00
Bill Currie 5e29cecf44 [ruamoko] Add pr_type_size array to types.[rh] 2021-06-04 13:29:27 +09:00
Bill Currie 53b553e892 [qwaq] Rework def views to support multi-row defs
Needed for structured types (arrays, structs, etc). The multiple rows
aren't implemented yet, but the initial groundwork is done.
2021-06-01 23:52:04 +09:00
Bill Currie 5ca792c40e [ruamoko] Add some stdlib function wrappers
For now, just bsearch (normal and fuzzy), qsort, and prefixsum (not in
C's stdlib that I know of, but I think having native implementations of
float and int prefix sums will be useful.
2021-06-01 18:53:53 +09:00
Bill Currie d98c92a5c4 [qwaq] Start work on cursor management
For now, the cursor is always hidden, but the plan is to have it visible
in only the focused view if that view has enabled the cursor.
2021-06-01 18:53:53 +09:00
Bill Currie 00fb0972a8 [qwaq] Fix some incorrect parameter acesses
They weren't wrong as such (the data was being accessed correctly
anyway, just not ideal as the parameter access was slightly hidden.
2021-06-01 18:53:53 +09:00
Bill Currie 73cffe283a [qwaq] Ensure qwaq_event_t's when is aligned
While qfcc will always align double values to 8 bytes (really, two
global words) regardless of the underlying hardware, gcc does not:
doubles are only 4-byte aligned on 32-bit hardware.

This fixes the invalid debug target handle when running on i686.
2021-06-01 18:53:53 +09:00
Bill Currie 1e9329ccf6 [nq,qw] Stop wring to config.cfg
QF now uses its own configuration file (quakeforge.cfg for now) rather
than overwriting config.cfg so that people trying out QF in their normal
quake installs don't trash their config.cfg for other quake clients. If
quakeforge.cfg is present, all other config files are ignored except
that quake.rc is scanned for a startdemos command and that is executed.
2021-04-12 22:09:09 +09:00
Bill Currie 7e6928d7d5 [qwaq] Work around a gcc non-conformance
*sigh*
2021-04-03 00:27:43 +09:00
Bill Currie a5df5867b6 [qwaq] Avoid ignored return val warning
If those particular writes file (and it matters), we probably have
bigger problems.
2021-04-03 00:14:49 +09:00
Bill Currie 64f51bda6e [build] Get make distcheck working again
again...

This covers only the basic check with a build in debian, but it's a good
start.
2021-03-29 17:35:30 +09:00
Bill Currie 6fea5f5e1a [build] Add -Wformat-non-literal option
While this caused some trouble for pr_strings and configurable strftime
(evil hacks abound), it's the result of discovering an ancient (from
maybe as early as 2004, definitely before 2012) bug in qwaq's printing
that somehow got past months of trial-by-fire testing (origin understood
thanks to the warning finding it).
2021-03-29 17:27:06 +09:00
Bill Currie 88ff254f42 Get QF cross-compiling using MXE/mingw32
This includes -win clients (no clue if anything actually works yet).
2021-03-27 20:09:37 +09:00
Bill Currie a9bd436837 [build] Autoconfiscate printf format attribute
I don't know if gnu_printf is appropriate for all cases, but it is
needed for mingw32.
2021-03-27 19:52:59 +09:00
Bill Currie c9f1d770e0 Merge master into csqc-improvements
That was a mess
2021-03-25 22:01:31 +09:00
Bill Currie 56cf181a11 [gamecode] Make PR_RESMAP macros more function-like
I never liked that some of the macros needed the type as a parameter
(yay typeof and __auto_type) or those that returned a value hid the
return statement so they couldn't be used in assignments.
2021-03-21 21:26:36 +09:00
Bill Currie fbc1bd9f6e [renderer] Clean up entity_t to a certain extent
This is the first step towards component-based entities.

There's still some transform-related stuff in the struct that needs to
be moved, but it's all entirely client related (rather than renderer)
and will probably go into a "client" component. Also, the current
components are directly included structs rather than references as I
didn't want to deal with the object management at this stage.

As part of the process (because transforms use simd) this also starts
the process of moving QF to using simd for vectors and matrices. There's
now a mess of simd and sisd code mixed together, but it works
surprisingly well together.
2021-03-10 00:01:41 +09:00
Bill Currie 0bfb60775e [util] Ensure hunk allocs are cache alligned
This doesn't seem to make much difference in the vulkan renderer, but it
certainly doesn't hurt.
2021-02-03 13:19:19 +09:00
Bill Currie 7970525ef4 [util] Make va thread-safe
It now takes a context pointer (opaque data) that holds the buffers it
uses for the temporary strings. If the context pointer is null, a static
context is used (making those uses of va NOT thread-safe). Most calls to
va use the static context, but all such calls have been formatted
consistently so they are easy to find when it comes time to do a full
audit.
2021-01-31 16:05:48 +09:00
Bill Currie cad1eb42fd [qwaq] Put my qdb script in a safe place
The paths are generally wrong, and it's not overly complicated, but
having a reference helps me remember how to use the thing.
2021-01-30 14:45:47 +09:00
Bill Currie 328a529a94 Create RB_ACQUIRE and RB_RELEASE
RB_RELEASE is actually RB_DROP_DATA renamed, but RB_ACQUIRE and
RB_RELEASE work well when working with more structured ring buffer
contents.
2021-01-23 11:56:45 +09:00
Bill Currie e6704b85e1 Make RB_PEEK_DATA return the address of the data
This makes it a little more generally useful.
2021-01-22 18:29:35 +09:00
Bill Currie 6e636a27d0 [renderer] Continue the job of merging SCR_UpdateScreen
I think this is probably as merged as it will get (though the update
callbacks can probably do with some merging).
2021-01-11 16:57:31 +09:00
Bill Currie 37b6d11c01 [ruamoko] Add binding for str_upper
I can't believe I didn't do that when I did str_lower.
2021-01-05 18:24:18 +09:00
Bill Currie e1e2a0e712 [ruamoko] Add a wrapper for PL_Line
Makes error reporting in rua code easier.
2020-12-23 21:52:42 +09:00
Bill Currie ab04a1915e [build] Fix a pile of gcc 10 issues
gcc got stricter about array accesses, complicating progs macros, and
much better at detecting buffer overflows.
2020-12-21 14:14:29 +09:00
Bill Currie 8290e3800f [qwaq] Ensure main thread return code gets returned
Needed for catching vkgen errors during the build.
2020-07-16 22:14:19 +09:00
Bill Currie 7a478b4ce7 [libr] Make PLItem more useful
I can't say that I like what's there even now, but at least PLItem can
be used without a lot of casting. Really, Ruamoko needs dictionary and
string classes so reading a property list can build more natural object
trees rather than this mess from when I knew too little.
2020-07-05 16:53:35 +09:00
Bill Currie 1914fa2756 [qwaq] Use full file path for file search
Fixes the memory leak (over 300 editors...)
2020-07-05 16:53:35 +09:00
Bill Currie 225ee0ed3c [qwaq] Use an actual condition variable for control
I think I wasn't sure at the time whether the simple variable was
required for pthread_cond_wait (and friends) to work properly, but it
is: the time between the target posting the debug event and the target
waiting on the condition variable turns out to sometimes be enough for
the debugger to handle the event and signal the target to continue,
resulting in the target waiting on a signal that will never come because
another debug event will not be sent by the target until AFTER it has
exited from the debug handler.
2020-07-05 16:53:35 +09:00
Bill Currie 1910941426 [qwaq] Handle key events differently when running
Pressing F8 (or n) while the debug target was running would cause it to
stop at that point. While it's certainly desirable to stop a runaway
target on demand, that should be with a different input. Now, commands
that start the target running are ignored while the target is running.
No commands for when the target is running have been implemented yet,
but the provision is there.
2020-07-05 16:53:35 +09:00
Bill Currie 64100efe78 [qwaq] Fix a typo 2020-07-05 16:53:35 +09:00
Bill Currie 7f96b0fbed [qwaq] Fix incorrect setting of progs argc/argv 2020-06-28 18:30:01 +09:00
Bill Currie aa8aaaaca9 [build] Support silent rules for qfcc 2020-06-26 10:52:06 +09:00
Bill Currie c2559c7511 [qwaq] PR_RunPostLoadFuncs for qwaq-x11
Same issue as for the menus. But now I know why PR_LoadProgsFile is used
instead of PR_LoadProgs (at least for qwaq): avoidance of the gamedir
restriction (however, the menus are supposed to be restricted).
2020-06-25 19:38:33 +09:00
Bill Currie 86b5b30b45 Merge branch 'master' into vulkan 2020-06-25 14:03:52 +09:00
Bill Currie 6d5ffa9f8e [build] Move to non-recursive make
There's still some cleanup to do, but everything seems to be working
nicely: `make -j` works, `make distcheck` passes. There is probably
plenty of bitrot in the package directories (RPM, debian), though.

The vc project files have been removed since those versions are way out
of date and quakeforge is pretty much dependent on gcc now anyway.

Most of the old Makefile.am files  are now Makemodule.am.  This should
allow for new Makefile.am files that allow local building (to be added
on an as-needed bases).  The current remaining Makefile.am files are for
standalone sub-projects.a

The installable bins are currently built in the top-level build
directory. This may change if the clutter gets to be too much.

While this does make a noticeable difference in build times, the main
reason for the switch was to take care of the growing dependency issues:
now it's possible to build tools for code generation (eg, using qfcc and
ruamoko programs for code-gen).
2020-06-25 11:35:37 +09:00