Commit Graph

176 Commits

Author SHA1 Message Date
Bill Currie 1b1249bdb0 [ruamoko] Add vsprintf builtin 2020-03-10 18:16:07 +09:00
Bill Currie b517b95e45 [libr] Add -performv:: 2020-03-10 14:29:43 +09:00
Bill Currie 4978713dee [libr] Add __obj_responds_to proto and definition 2020-03-10 00:09:46 +09:00
Bill Currie a487595149 [ruamoko,libr] Begin implementation of __obj_forward
libr supplies an __obj_forward definition that links to a builtin, but
as it is the only def in its object file, it is readily replaceable by
an alternative Ruamoko implementation.

The builtin version currently simply errors out (rather facetiously),
but only as a stub to allow progs to load.
2020-03-09 19:09:08 +09:00
Bill Currie 2ddfe2ef07 [libr] Accept void * for performSelector:withObject:
It's up to the receiver what the object should be.
2020-03-05 15:00:42 +09:00
Bill Currie 051a572bcc [build] Dependency checking for all ruamoko code
Including dependency on qfcc itself. Getting automake to chooch the way
I want it to chooch can be a pain in the... see AvE
2020-03-03 17:24:53 +09:00
Bill Currie cdc1f0c5e7 [libr] Treat ruamoko headers as system headers
Now that qfcc actually supports them properly.
2020-03-03 15:24:41 +09:00
Bill Currie c2138183dd [libr] Initialize SetIterator the right way
I'd written Set.[rh] after the big rewrite so never noticed the access
error.
2020-03-03 10:43:29 +09:00
Bill Currie 679744fc7d [libr] Fix incorrect bounds check on array insert 2020-03-03 00:11:07 +09:00
Bill Currie 383a7fe5e1 Remove File_Open
Other than its blocking of access to certain files, it really wasn't
that useful compared to the functions in qfs, and pointless with access
to qfs anyway.
2020-02-26 13:45:14 +09:00
Bill Currie a6f3e1753a Fix ruamoko's hashtab_t typedef
Being typedefed directly to a pointer is a holdover from when pointer
declarations were really awkward.
2020-02-19 21:41:46 +09:00
Bill Currie 67e183c8b6 Put the guts of qwaq's reflection code into ruamoko 2020-02-19 21:41:46 +09:00
Bill Currie df7c08a010 Add support for doubles to Ruamoko
Only as scalars, I still need to think about what to do for vectors and
quaternions due to param size issues. Also, doubles are not yet
guaranteed to be correctly aligned.
2020-02-15 23:49:12 +09:00
Bill Currie f163e35f21 Add a builtin to get keydown. 2016-01-10 13:33:05 +09:00
Bill Currie f5501fbf24 Fix a pile of automake deprecation warnings.
s/INCLUDES/AM_CPPFLAGS/g

I <3 sed :)
2013-11-24 13:11:50 +09:00
Bill Currie 2e8d9e7636 Correct the menu code to sortof work with the new IMTs.
The menu code at least compiles now. It should work for the default IMT
tables (ie, if imt_0 is there).
2013-01-16 20:31:46 +09:00
Bill Currie 4868a245b3 Fix the "for new syntax" FIXME.
Empty structs are now (correctly) invalid. The hack of using an empty
struct to represent a handle returned from a builtin has been unnecessary
since opaque structs were implemented: now a pointer to an opaque struct
can be used. This is mostly safe as handles are aways negative and thus
attempting to dereference such a pointer should result in a VM error. It
will be even safer once const is implemented and the pointers can be made
constant (eg, typedef struct handle * const handle;)
2012-12-20 10:10:41 +09:00
Bill Currie e17d8ac9db Add ruamoko wrappers for the set api.
This includes both normal functions and a Set class (and SetIterator
class). Most of the methods are implemented as builtins.
2012-12-16 13:48:36 +09:00
Bill Currie 7ed490c434 Allow nil when replacing objects in an array.
I want this in a little project, but I also want to consult with Deek about
it, so I've only commented out the code.
2012-12-16 13:38:19 +09:00
Bill Currie ff0c51e52c Build our ruamoko stuff with optimizations :) 2012-12-01 11:20:06 +09:00
Bill Currie 2aaa380098 Fix some uninitialized variable warnings.
While they're false positives (qfcc doesn't know about noreturn), at least
qfcc is doing its job :)
2012-11-21 10:25:29 +09:00
Bill Currie db92a7b9f9 Fix an out-by-one error.
That "qfvalgrind" is proving worthwhile :)
2012-11-20 19:49:57 +09:00
Bill Currie 951bed6206 Allow the retain count to become 0.
With the new retain count scheme, it must reach 0 or double frees won't be
caught.
2012-11-20 14:41:13 +09:00
Bill Currie d5c831b6da Add a little test case for accessing types.
Using ruamoko to access ruamoko type encodings is actually quite pleasant
:)
2012-11-15 13:40:11 +09:00
Bill Currie 9a53531d3b Fix a braino in Object's -init.
I'd forgotten AutoreleasePool doesn't like receiving -retain when I did the
retainCount change, and thus Object's -init was a little too naive.
2012-11-14 20:45:29 +09:00
Bill Currie c96718493a A bit of a cleanup before fixing class type defs.
All internal structs now have "proper" names, and fit the naming convention
(eg, obj_module (like objective-c's types, but obj instead of objc). Some
redundant types got removed (holdovers from before proper struct tag
handling).

Also, it has proven to be unnecessary to build internal classes, so
make_class and make_class_struct are gone, too.
2012-11-12 11:12:33 +09:00
Bill Currie 218424d0ae Add debug.r to libcsqc. 2012-11-09 19:11:30 +09:00
Bill Currie 07e67da838 Add class versions of retain and friends.
As class objects don't have retain counts (they're usually static, even!!),
allowing the instance implementations of retain, release, and autorelease
attempt to modify the non-existant retainCount would be a recipe for severe
headaches. We also don't want the retainCount returning "random" values.
2012-11-08 20:41:56 +09:00
Bill Currie 6b46cde7c8 Move retainCount out of Object.
Going by "standard" Objective-C, retainCount really doesn't belong in
Object itself. The way GNUStep does it is to stash retainCount in memory
just below the object by allocating extra bytes for the count and returning
a pointer just beyond those extra bytes. Now Ruamoko does the same. This
fixes the inconsistencies in structure layouts for Protocol and class
structs between qfcc generated (internal) structs and user visible structs.
2012-11-08 20:24:25 +09:00
Bill Currie 23a38738fc Massive whitespace cleanup.
Lots of trailing whitespace and otherwise blank lines.
2012-05-22 08:23:22 +09:00
Bill Currie 95a06c20b2 Move qfcc's libs and headers to ${prefix}/share
On discussion with Despair, share makes more sense than lib as they are
really cross-platform (though qfcc itself is not).
2012-05-05 19:34:35 +09:00
Bill Currie 546a7e7aac Avoid recusing into tools and ruamoko when not needed. 2012-02-12 19:29:31 +09:00
Bill Currie 7c76415f9d Add math.r to libr. 2012-02-06 19:33:08 +09:00
Bill Currie a694eed968 Add Draw_Picf to allow smooth placement on low-res consoles. 2012-02-06 19:32:30 +09:00
Bill Currie 14c0e22494 Tweak Draw_MakePic to be a little more usable. 2012-02-06 15:50:32 +09:00
Bill Currie d6ddbe4efe Create decls for the new draw functions. 2012-02-06 15:50:32 +09:00
Bill Currie c98ffa4eda Create a message buffer API for Ruamoko
The api hides all the gory details of message buffer setup and usage
(particularly the differences between writing and reading). Most
importantly, the api provides a safe way to read and write binary data
(always little endian).
2012-02-06 15:50:32 +09:00
Bill Currie c8163fc0de Add an option to prevent the use of default paths.
Despair has things locked down such that running qfcc during a build fails
due to lack of read access to /usr/local/lib. This is actually a good
thing as accidentally hitting old includes/libs (when a file gets deleted
in the tree) hides bugs. Thus, --no-default-paths to turn off default
search paths.
2012-01-04 13:53:04 +09:00
Jeff Teunissen 7d6430edd4 Rua: move the old cvar() and cvar_set() functions
Move the old cvar get/set funcs to cvar.[rh] from system.[rh].
2011-12-14 20:33:33 -05:00
Jeff Teunissen 4f4d6b5675 OK, now import them...
Duh.
2011-12-09 22:42:43 -05:00
Jeff Teunissen c7c646a53f Makefile portability fixes
Allow our makefiles to build with non-GNU 'make' implementations.
Required some renaming of not-really-QuakeC source to .r to get it right.
2011-07-25 17:22:44 -04:00
Bill Currie 4e66a5b327 Add rua rappers for the cvar alias functions. 2011-07-06 19:17:28 +09:00
Jeff Teunissen 82e934af47 Rualib: nuke some unnecessary classes
List, ListNode, and Stack aren't necessary; all three are obviated by the
new, richer Array class.
2011-06-14 13:33:10 -04:00
Jeff Teunissen b18302eac1 Array: sorta-implement -description
An #if 0'ed out implementation of the -description method, which currently
returns a Quake string containing whatever the contained objects return
from -description, between parens and separated by commas (just like plist
format). Ideally, we'd have string objects interchangeable with primitive
strings, but having string objects (which are being worked on) should help.
2011-06-14 13:31:30 -04:00
Bill Currie 896791b209 Correct the spelling of "int" and clean up the mess. 2011-03-25 16:53:04 +09:00
Bill Currie 8c1d948586 And qfcc finds another bug :) 2011-03-24 13:36:36 +09:00
Bill Currie a9e139e14c Correct a minor logic error.
We don't want to always add a new autorelease pool, and we certainly want
one if there are none.
2011-03-21 13:12:30 +09:00
Bill Currie 7b9d70167f Fix some missed language changes. 2011-03-10 20:51:04 +09:00
Bill Currie aa4ed00090 Fix the message type used to check arguments. 2011-03-02 22:13:16 +09:00
Bill Currie 595019d86e Fix some problems found by the new qfcc.
With this, ruamoko/lib almost compiles (though no object files are output).
Just some bogus "redeclared" errors and an improperly implemented
statement that produces an ice.
2011-02-14 23:10:45 +09:00