]> git.draconx.ca Git - upkg.git/log
upkg.git
4 months agoStop using gnulib's flexmember module. master
Nick Bowler [Fri, 1 Dec 2023 06:15:29 +0000 (01:15 -0500)]
Stop using gnulib's flexmember module.

The only thing we're actually using from this module is provided
directly by Autoconf, via AC_C_FLEXIBLE_ARRAY_MEMBER, so we can
just use that macro instead.

4 months agoManual updates.
Nick Bowler [Fri, 1 Dec 2023 06:07:50 +0000 (01:07 -0500)]
Manual updates.

For literal strings, we need to use \- instead of just - as some troff
processors turn plain "-" into "proper" unicode hyphens (as opposed to
hyphen-minus), which breaks copy+paste and searching.

Ensure that .Os follows .Dt in the mdoc prologue as apparently not doing
this results in broken manpage headings with groff 1.23.

Add missing copyright and permission notice.

4 months agoReplace gnulib patches with new common helper macro.
Nick Bowler [Fri, 1 Dec 2023 06:12:24 +0000 (01:12 -0500)]
Replace gnulib patches with new common helper macro.

Using the new DX_PATCH_GNULIB macro allows m4 to implement the
conditional dependency patches that were previously being done in
bootstrap, as well as removing the gl_CC_GNULIB_WARNINGS stub.

2 years agotests: Add --version output to the common library.
Nick Bowler [Sun, 27 Feb 2022 20:38:15 +0000 (15:38 -0500)]
tests: Add --version output to the common library.

Just a slight simplification of the individual test apps.  Let's
also augment the --help output with a simple list of options (even
though the current test apps have no useful options).

2 years agoSimplify libupkg package header decoding.
Nick Bowler [Sun, 27 Feb 2022 20:10:40 +0000 (15:10 -0500)]
Simplify libupkg package header decoding.

Not only is this way a bit more readable than the older version, it
also avoids tripping over a designated initializer bug in HP-UX cc.

2 years agoAvoid C99 stdbool.
Nick Bowler [Sun, 27 Feb 2022 19:47:02 +0000 (14:47 -0500)]
Avoid C99 stdbool.

This is barely used at all, just another pointless library requirement.

2 years agoWork around missing SIZE_MAX.
Nick Bowler [Sun, 27 Feb 2022 19:44:11 +0000 (14:44 -0500)]
Work around missing SIZE_MAX.

Older library implementations lack this macro.  Outside of an #if
directive the expression (size_t)-1 is equivalent so we can define
a fallback easily enough.

2 years agoUse gnulib flexmember module.
Nick Bowler [Sun, 27 Feb 2022 19:39:52 +0000 (14:39 -0500)]
Use gnulib flexmember module.

For increased portability to older C compilers.

2 years agoDon't use [static n] in prototypes.
Nick Bowler [Sun, 27 Feb 2022 19:18:58 +0000 (14:18 -0500)]
Don't use [static n] in prototypes.

This modern C syntax is mostly useless and introduces compatibility
problems for no real benefit.

2 years agoFix distribution of test data.
Nick Bowler [Sun, 27 Feb 2022 19:15:19 +0000 (14:15 -0500)]
Fix distribution of test data.

2 years agouobject: Simplify lookup_module function.
Nick Bowler [Sun, 27 Feb 2022 05:18:04 +0000 (00:18 -0500)]
uobject: Simplify lookup_module function.

We don't need this function to double as a C compiler test case.  Not
doing weird things with flexible array members seems to be much simpler.

2 years agoAdd a simple texture export testcase.
Nick Bowler [Sun, 27 Feb 2022 05:14:52 +0000 (00:14 -0500)]
Add a simple texture export testcase.

2 years agoPort tests to Autotest.
Nick Bowler [Sun, 27 Feb 2022 04:06:52 +0000 (23:06 -0500)]
Port tests to Autotest.

All my other projects use Autotest, which I like quite a lot better than
the Automake test harness.  So let's convert this project now, which has
only a couple dead simple scripts to convert.

2 years agoUpdate bootstrapping bits.
Nick Bowler [Sun, 27 Feb 2022 01:48:54 +0000 (20:48 -0500)]
Update bootstrapping bits.

Sync the bootstrap script to include updates from other packages,
and pull in fix-gnulib and fix-ltdl updates from dxcommon.

Stub out the silly warning flags configure test found in the
latest gnulib.

2 years agoDitch local orderonly trick.
Nick Bowler [Thu, 24 Feb 2022 04:20:34 +0000 (23:20 -0500)]
Ditch local orderonly trick.

The orderonly trick used here is missing various updates in fix-gnulib
that improve interoperability with various make implementations.

We can just rely on the logic in $(gnulib_headers) to get its version
of the order-only behaviour, particularly since every file including
these ones should have gnulib header dependencies.

2 years agoUse gen-options script and help formatting from dxcommon.
Nick Bowler [Thu, 24 Feb 2022 03:06:32 +0000 (22:06 -0500)]
Use gen-options script and help formatting from dxcommon.

These utilities make it easy to produce a much more useful help
output with descriptions and everything.

2 years agoUse AC_CONFIG_HEADERS rather than AC_CONFIG_HEADER.
Nick Bowler [Thu, 24 Feb 2022 03:02:20 +0000 (22:02 -0500)]
Use AC_CONFIG_HEADERS rather than AC_CONFIG_HEADER.

The former name has been supported since approximately forever ago and
the latter form is now formally deprecated (with a warning) in recent
versions of Autoconf.

2 years agoDisable deprecation warnings from Glib.
Nick Bowler [Thu, 24 Feb 2022 02:49:33 +0000 (21:49 -0500)]
Disable deprecation warnings from Glib.

Having glib spew out pages of warnings just because we happened to
build on a machine with a newer version installed, telling us to modify
perfectly working code to break compatibility and risk regressions for
no reason...  seems a bit daft.

Fortunately we can simply define a macro to shut it all up.

Doing this in config.h revealed that many source files don't include it,
which is a bug in its own right so fix that up at the same time.

2 years agoSync gnulib and dxcommon to latest versions.
Nick Bowler [Thu, 24 Feb 2022 02:09:40 +0000 (21:09 -0500)]
Sync gnulib and dxcommon to latest versions.

Lots of nice updates and hopefully no regressions.

2 years agotests: Fix libupkg-index-decode test failure on dash.
Nick Bowler [Thu, 24 Feb 2022 02:01:46 +0000 (21:01 -0500)]
tests: Fix libupkg-index-decode test failure on dash.

We need to quote the decode_val assignment which we pass to 'eval',
because $val may be the string (empty), and assignments of the form
decode_val=(empty) are rejected by dash and other shells.

4 years agoImprove incremental builds with unmodified GOB headers.
Nick Bowler [Fri, 31 Jan 2020 22:39:30 +0000 (17:39 -0500)]
Improve incremental builds with unmodified GOB headers.

It's nice to not touch header files which are unchanged during an
incremental build, because that will trigger pointless rebuilds of
other files.  Pass --no-touch-headers to gob2 which enables this
behaviour.

Add a dist-hook to update the header timestamps when distributing
so that everything is fully up-to-date in the tarball.

4 years agoImprove GOB rebuild rules for VPATH builds.
Nick Bowler [Fri, 31 Jan 2020 20:04:14 +0000 (15:04 -0500)]
Improve GOB rebuild rules for VPATH builds.

In a VPATH build, if make explicitly targets a .gobstamp in srcdir, the
.c and .h outputs currently end up in builddir while the .gobstamp ends
up in srcdir.

This behaviour can be triggered when distributed headers in srcdir are
referenced by the automatic dependency tracking and then the .gob file
is updated.

Ideally everything would always go in builddir whenever gob files are
rebuilt but it turns out this is rather difficult to get right: when
headers originally in srcdir are updated in builddir, make will not
detect all necessary rebuilds.

However we can avoid most problems by just ensuring all the files end
up wherever make is trying to update the gobstamp.  This will typically
be builddir from a clean build but may be srcdir if automatic dependency
tracking is used.  The gob2 interface is a bit annoying because we cannot
explicitly specify the output filename but it is fairly simple to work
around in the shell.

While we are here, make sure the .gobstamp timestamp precedes the
other generated files, as otherwise the deletion recovery rules will
be run every build.

4 years agoFix VPATH builds from clean checkout.
Nick Bowler [Fri, 31 Jan 2020 19:56:21 +0000 (14:56 -0500)]
Fix VPATH builds from clean checkout.

When doing a VPATH build from a fully clean checkout, the GOB outputs
end up in the build directory.  When this happens, #include "pcx.h"
won't find the header because this header is in srcdir.

The solution is to make sure we always #include relative to the top
src/ directory, which is already explicitly added to the compiler
search path.

4 years agoInitial Engine.Mesh implementation.
Nick Bowler [Fri, 31 Jan 2020 18:16:42 +0000 (13:16 -0500)]
Initial Engine.Mesh implementation.

This is very incomplete but let's take a first stab at mesh export.

There are very few objects in UT that actually use this class, most are
Engine.LodMesh which is still to be implemented.

4 years agoEnsure object property references are released.
Nick Bowler [Thu, 30 Jan 2020 19:27:56 +0000 (14:27 -0500)]
Ensure object property references are released.

It seems that g_object_set_property adds to the reference count of
object properties, so we must release our original reference when
deserializing.

Add finalizers for Engine.Texture and Engine.Palette to release
the palette memory.

4 years agoUse GLib detection macros from dxcommon.
Nick Bowler [Mon, 27 Jan 2020 23:44:38 +0000 (18:44 -0500)]
Use GLib detection macros from dxcommon.

4 years agoMake GOB2 optional.
Nick Bowler [Mon, 27 Jan 2020 20:00:16 +0000 (15:00 -0500)]
Make GOB2 optional.

When building from a distribution tarball, gob2 should not actually be
required because all its outputs are distributed.  Allow configure to
proceed in this case, and defer the failure until later, when make
actually tries to process a gob file.

And add a proper configure test for the dynamic type support in the
gob-dx fork, which we require.

4 years agoFix missing files in distribution tarballs.
Nick Bowler [Mon, 27 Jan 2020 19:58:03 +0000 (14:58 -0500)]
Fix missing files in distribution tarballs.

This probably used to work but several header files seem to have gotten
lost from the distribution, making the distribution unbuildable.

Easy enough to fix.

4 years agoFix build with more recent libmodplug.
Nick Bowler [Wed, 27 Feb 2019 18:35:39 +0000 (13:35 -0500)]
Fix build with more recent libmodplug.

Modern versions of libmodplug no longer put -I${includedir}/libmodplug
in the pkg-config file, which breaks our files that #include <modplug.h>.

Seems the expectation is for packges to #include <libmodplug/modplug.h>
instead, which should work totally fine with old versions too.  The new
libmodplug helper macro in dxcommon uses that, so just update the the
rest of the code accordingly.

5 years agoUse dxcommon version of the packing library.
Nick Bowler [Thu, 30 Apr 2015 04:45:21 +0000 (00:45 -0400)]
Use dxcommon version of the packing library.

This common code was moved to dxcommon a long time ago, remove our
local copy and reference the common version directly.

8 years agoFix silent-rules alignment in recent Automake.
Nick Bowler [Thu, 30 Apr 2015 04:06:51 +0000 (00:06 -0400)]
Fix silent-rules alignment in recent Automake.

Use compatibility helpers in dxcommon to fix the silent-rules output.
Drop support for ancient (pre-1.11) automake versions.

8 years agoFix bootstrapping with recent bits.
Nick Bowler [Thu, 30 Apr 2015 03:51:44 +0000 (23:51 -0400)]
Fix bootstrapping with recent bits.

I can no longer bootstrap this package on my systems for a few reasons:

- Libtool has changed how nonrecursive libltdl is integrated
- The version of Gnulib in use does not bootstrap with dash
- The dxcommon scripts use Perl modules that I no longer install.

Do the necessary dance to fix all those issues, and resolve all the
resulting fallout.

11 years agolibupkg: Kill upkg_export_class.
Nick Bowler [Fri, 13 Jul 2012 14:22:43 +0000 (10:22 -0400)]
libupkg: Kill upkg_export_class.

This function was quite broken, and crapped out on a number of the
objects in Engine.u.  Kill it off because we now have the machinery
to do this more properly.

11 years agoupkg: Pass the UPkg module struct into package_info.
Nick Bowler [Fri, 13 Jul 2012 14:20:58 +0000 (10:20 -0400)]
upkg: Pass the UPkg module struct into package_info.

11 years agouobject: Make module loader understand exports/imports.
Nick Bowler [Mon, 21 May 2012 01:34:42 +0000 (21:34 -0400)]
uobject: Make module loader understand exports/imports.

It's possible for a package to have an instance of a class defined in
that same package; therefore the module loader needs to know about this.
Bring the export class index up to the public struct so that it's
possible to tell the difference.

This makes it possible to export the textures defined in Engine.u.
There's still a few vestigial bugs left over here, but we can fix those
later.

11 years agouobject: Make logging more generic.
Nick Bowler [Sun, 20 May 2012 19:54:24 +0000 (15:54 -0400)]
uobject: Make logging more generic.

The logging functions can now be used on any GObject, not just UObject
subclasses.  In particular, it should be possible to call it on UPkg
instances which do not derive from UObject.

11 years agoupkg: Add some error checking around upkg_export_get_class.
Nick Bowler [Sun, 20 May 2012 17:29:44 +0000 (13:29 -0400)]
upkg: Add some error checking around upkg_export_get_class.

This avoids a segfault when it fails.

11 years agoengine: Implement Engine.Sound.
Nick Bowler [Sun, 20 May 2012 04:11:52 +0000 (00:11 -0400)]
engine: Implement Engine.Sound.

This one's pretty trivial; but now we can export sounds.

MMM-M-M-M-M-MONSTER KILL!

11 years agomusic: Check data size against actual file size.
Nick Bowler [Sun, 20 May 2012 04:08:12 +0000 (00:08 -0400)]
music: Check data size against actual file size.

Blindly setting the file size to something potentially larger than it
seems outright silly.  All this mucking about with the upkg_file struct
members should probably be eliminated eventually, but may as well do it
sanely for now.

11 years agoupkg: In info mode, don't fail outright if object load fails.
Nick Bowler [Sun, 20 May 2012 03:31:02 +0000 (23:31 -0400)]
upkg: In info mode, don't fail outright if object load fails.

We can still (potentially) display the file offsets even if the object
itself cannot be loaded, so we should do so.

11 years agouobject: Add support for float properties.
Nick Bowler [Sun, 20 May 2012 03:05:34 +0000 (23:05 -0400)]
uobject: Add support for float properties.

Since it's not too hard to add these, do so.  Add the DrawScale property
to Engine.Texture to demonstrate it.

11 years agouobject: Improve error handling in property decoding.
Nick Bowler [Sat, 19 May 2012 20:14:53 +0000 (16:14 -0400)]
uobject: Improve error handling in property decoding.

Verify that the encoded size is actually correct, and use the proper
logging method to report errors.

11 years agouobject: Initial support for object imports.
Nick Bowler [Sat, 19 May 2012 17:40:03 +0000 (13:40 -0400)]
uobject: Initial support for object imports.

This is missing a lot of features currently; in particular, imports will
get loaded multiple times, but we can at least resolve them and create
the relevant objects.

Add a DetailTexture property to Engine.Texture to demonstrate.

11 years agoupkg: Add support for listing package imports.
Nick Bowler [Wed, 16 May 2012 23:57:53 +0000 (19:57 -0400)]
upkg: Add support for listing package imports.

All we need is a way to get the import struct from libupkg and we can
list all the package imports pretty easily, so add that, and do so.

11 years agoupkg: Only print object properties if they are non-NULL.
Nick Bowler [Wed, 16 May 2012 23:56:42 +0000 (19:56 -0400)]
upkg: Only print object properties if they are non-NULL.

It's valid for a property to be unset, so we should not crash in this
case.

11 years agolibupkg: Make export parent handling match imports.
Nick Bowler [Wed, 16 May 2012 23:55:15 +0000 (19:55 -0400)]
libupkg: Make export parent handling match imports.

It seems pretty clear that this is meant to be a signed quantity like
other object references, although it really doesn't matter since it
should never be negative.  Nevertheless, we may as well keep
import/export handling as similar as possible.

11 years agolibupkg: Use parent pointers for imports.
Nick Bowler [Wed, 16 May 2012 23:49:44 +0000 (19:49 -0400)]
libupkg: Use parent pointers for imports.

This brings the import struct into alignment with the exports.  Move the
struct to the public header, too, as it will be needed.

11 years agouobject: Include package names in package fullname.
Nick Bowler [Wed, 16 May 2012 00:38:47 +0000 (20:38 -0400)]
uobject: Include package names in package fullname.

Now that we have access to the package in deserialize, we can include
its name.

11 years agouobject: Make the relevant UPkg available to objects.
Nick Bowler [Wed, 16 May 2012 00:29:08 +0000 (20:29 -0400)]
uobject: Make the relevant UPkg available to objects.

Instead of passing around raw "struct upkg" pointers, keep the
GTypeModule implementation around instead (which contains this
information).  This allows access to all package functions; in
particular, it allows access to the package name.

Modify implementations to get the raw "struct upkg" from the upkg_file
reference instead.

11 years agoupkg: Use proper library routines in package_export.
Nick Bowler [Wed, 16 May 2012 00:23:43 +0000 (20:23 -0400)]
upkg: Use proper library routines in package_export.

Not sure why this function contained a complete re-implementation of
u_object_new_from_package, but here we are.  Call the appropriate
library function to eliminate a pile of code.

11 years agolibupkg: Don't store upkg_priv pointer in struct upkg_file.
Nick Bowler [Wed, 16 May 2012 00:09:22 +0000 (20:09 -0400)]
libupkg: Don't store upkg_priv pointer in struct upkg_file.

If this is going to be stored in a public struct, make it actually
useful to users outside of libupkg by giving them a pointer type that
can actually be used.

11 years agolibuobject: Store hierarchical object names for UObjects.
Nick Bowler [Tue, 15 May 2012 02:15:01 +0000 (22:15 -0400)]
libuobject: Store hierarchical object names for UObjects.

Such names are useful for logging and, in general, displaying object
references in a human-readable manner.  This is only a partial
implementation, as package names are not yet available to the
deserialize method.

11 years agouobject: Add support for decoding boolean properties.
Nick Bowler [Tue, 15 May 2012 01:02:51 +0000 (21:02 -0400)]
uobject: Add support for decoding boolean properties.

Boolean properties have an encoded length of zero, but we were failing
spuriously due to an excessively broad error check.  Other than that, we
have already done all the necessary decoding for boolean properties, so
just wire up the appropriate GObject calls to make it happen.

11 years agolibupkg: Store export parent pointers directly.
Nick Bowler [Mon, 14 May 2012 21:47:14 +0000 (17:47 -0400)]
libupkg: Store export parent pointers directly.

Making users handle the package member directly leads to some fairly
ridiculous and somewhat tricky code.  Resolve them all at package load
time and store pointers directly in the upkg_export structure, which
should help simplify the callers.

At this point, we codify the "exports cannot have packages which are
imports" assumption, which appears to be valid.  It's not obvious how
name lookup could possibly succeed if this were not the case.

11 years agoupkg: Display object names in property listings.
Nick Bowler [Sat, 12 May 2012 02:09:40 +0000 (22:09 -0400)]
upkg: Display object names in property listings.

Not particularly useful right now since we can only display the last
component of the name, but it's a start.

11 years agobuild: Enable Gnulib conditional-dependencies. uobject
Nick Bowler [Sat, 12 May 2012 01:18:30 +0000 (21:18 -0400)]
build: Enable Gnulib conditional-dependencies.

This slightly improves configure time; may help more down the road if we
enable more modules.

11 years agobuild: Punt BUNDLED_LIBLDTL conditional.
Nick Bowler [Sat, 12 May 2012 01:14:03 +0000 (21:14 -0400)]
build: Punt BUNDLED_LIBLDTL conditional.

Now that fix-ltdl removes the unconditional builds of the bundled
libltdl, instead relying on normal prerequisites, there is no need for
this Automake conditional.

11 years agoengine: Fix off-by-one in PCX run-length encoder.
Nick Bowler [Fri, 11 May 2012 23:39:36 +0000 (19:39 -0400)]
engine: Fix off-by-one in PCX run-length encoder.

Runs of 64 bytes are invalid, but the encoder would emit them anyway
(which get subsequently interpreted as a run of 0).  This obviously
causes some textures to export incorrectly.

We can now export all of UTtech2.utx!

11 years agoengine: Add a unit test for the PCX run-length encoder.
Nick Bowler [Fri, 11 May 2012 23:30:57 +0000 (19:30 -0400)]
engine: Add a unit test for the PCX run-length encoder.

Since there ended up being an off-by-one bug here, we should test it.
We use the same hex decoder as decodeindex, so move that into a common
test library.

11 years agolibupkg: Fix minor type error in decodeindex test.
Nick Bowler [Fri, 11 May 2012 23:26:26 +0000 (19:26 -0400)]
libupkg: Fix minor type error in decodeindex test.

sopts is a string, so it should be a char[] rather than unsigned char[].

11 years agolibupkg: Make decodeindex test accept an empty string.
Nick Bowler [Fri, 11 May 2012 23:24:01 +0000 (19:24 -0400)]
libupkg: Make decodeindex test accept an empty string.

This test app should not reject empty input outright, because it should
be properly rejected by the function under test.

11 years agolibupkg: Actually fail if the index-decode test fails...
Nick Bowler [Fri, 11 May 2012 22:45:59 +0000 (18:45 -0400)]
libupkg: Actually fail if the index-decode test fails...

Oops.

11 years agobuild: Fix makefile rules for decode-index test program.
Nick Bowler [Fri, 11 May 2012 22:48:37 +0000 (18:48 -0400)]
build: Fix makefile rules for decode-index test program.

libupkg.la got moved as a result of the non-recursive build changes, but
it wasn't changed here.  Also fix a typo in the Gnulib prerequisites.

11 years agobuild: Non-recursively build the rest of the package.
Nick Bowler [Fri, 11 May 2012 01:53:19 +0000 (21:53 -0400)]
build: Non-recursively build the rest of the package.

11 years agobuild: Integrate libltdl non-recursively using fix-ltdl.
Nick Bowler [Thu, 10 May 2012 22:14:35 +0000 (18:14 -0400)]
build: Integrate libltdl non-recursively using fix-ltdl.

11 years agoengine: Add missing header to Makefile.am
Nick Bowler [Thu, 10 May 2012 02:32:20 +0000 (22:32 -0400)]
engine: Add missing header to Makefile.am

11 years agobuild: Integrate Gnulib non-recursively using fix-gnulib.
Nick Bowler [Thu, 10 May 2012 02:18:37 +0000 (22:18 -0400)]
build: Integrate Gnulib non-recursively using fix-gnulib.

11 years agognulib: Update to latest version.
Nick Bowler [Thu, 10 May 2012 01:43:43 +0000 (21:43 -0400)]
gnulib: Update to latest version.

11 years agomisc: Fix up paths in top-level .gitignore.
Nick Bowler [Thu, 10 May 2012 01:37:52 +0000 (21:37 -0400)]
misc: Fix up paths in top-level .gitignore.

Make paths explicitly match files in the top-level directory so that
similar paths in subdirectories are not unintentionally excluded.

11 years agouobject: First stab at a generic logging mechanism.
Nick Bowler [Wed, 9 May 2012 04:06:19 +0000 (00:06 -0400)]
uobject: First stab at a generic logging mechanism.

Let's build something on top of Glib's logging facilities which probably
work well enough for what we want to do.  Add a couple calls to the
texture class for starters.

11 years agotexture: Add initial support for texture exports.
Nick Bowler [Tue, 8 May 2012 23:53:20 +0000 (19:53 -0400)]
texture: Add initial support for texture exports.

After almost 3 years, we can finally export at least some textures!

11 years agoupkg: Improve messaging a bit.
Nick Bowler [Tue, 8 May 2012 23:45:18 +0000 (19:45 -0400)]
upkg: Improve messaging a bit.

11 years agouobject: Overhaul the UObject property decoding code.
Nick Bowler [Sat, 5 May 2012 02:53:02 +0000 (22:53 -0400)]
uobject: Overhaul the UObject property decoding code.

Mostly a total rewrite, this version actually handles struct and array
properties (read: advances something resembling the correct number of
bytes instead of trying to start the next property somewhere in the
middle of the last).  This version also has (hopefully) much clearer
tracking of file offsets.

11 years agoupkg: Print out object file offsets at high verbosity levels.
Nick Bowler [Fri, 4 May 2012 22:47:11 +0000 (18:47 -0400)]
upkg: Print out object file offsets at high verbosity levels.

When debugging deserialize methods, it can be useful to see the actual
location within the package file of the object being deserialized.  Add
a mode to print out these raw offsets when displaying object info at
high (-vvv) verbosity levels.

11 years agolibupkg: Add const qualifier to upkg_decode_index input buffer.
Nick Bowler [Fri, 4 May 2012 21:22:12 +0000 (17:22 -0400)]
libupkg: Add const qualifier to upkg_decode_index input buffer.

11 years agodocs: Add a README
Nick Bowler [Fri, 4 May 2012 01:15:34 +0000 (21:15 -0400)]
docs: Add a README

The main purpose of adding this now is to document where users can get
the patched GObject Builder tool required to build upkg.

11 years agolibupkg: Fix spurious success in upkg_decode_index.
Nick Bowler [Fri, 4 May 2012 00:28:52 +0000 (20:28 -0400)]
libupkg: Fix spurious success in upkg_decode_index.

Make the upkg_decode_index function fail if the input is truncated,
rather than successfully returning a bogus value.  As an added bonus,
this actually simplifies the code.

11 years agotests: Test some corner cases of upkg_decode_index.
Nick Bowler [Fri, 4 May 2012 00:24:48 +0000 (20:24 -0400)]
tests: Test some corner cases of upkg_decode_index.

It turns out that upkg_decode_index does not fail when there is not
a complete index encoding in the available data.  Add a test case (which
currently does not pass) to verify that the function fails in that
situation.

11 years agomusic: Fix obvious use of uninitialized variable.
Nick Bowler [Thu, 3 May 2012 04:51:08 +0000 (00:51 -0400)]
music: Fix obvious use of uninitialized variable.

11 years agoupkg: Fix missing return statement.
Nick Bowler [Fri, 1 Apr 2011 00:37:37 +0000 (20:37 -0400)]
upkg: Fix missing return statement.

11 years agoupkg: Add support for exporting individual objects.
Nick Bowler [Tue, 29 Mar 2011 02:20:40 +0000 (22:20 -0400)]
upkg: Add support for exporting individual objects.

11 years agopalette: Clean up deserialize a bit.
Nick Bowler [Tue, 29 Mar 2011 01:39:05 +0000 (21:39 -0400)]
palette: Clean up deserialize a bit.

13 years agoupkg: Handle errors from u_object_export_name.
Nick Bowler [Tue, 29 Mar 2011 01:37:03 +0000 (21:37 -0400)]
upkg: Handle errors from u_object_export_name.

As opposed to blindly proceeding with a nonsense filename...

13 years agoupkg: Print full object name when exporting.
Nick Bowler [Tue, 29 Mar 2011 00:41:00 +0000 (20:41 -0400)]
upkg: Print full object name when exporting.

13 years agolicense: Make autotools stuff available under WTFPL2.
Nick Bowler [Mon, 28 Mar 2011 23:40:45 +0000 (19:40 -0400)]
license: Make autotools stuff available under WTFPL2.

13 years agouobject: Make interface functions take UObjects directly.
Nick Bowler [Mon, 28 Mar 2011 23:35:28 +0000 (19:35 -0400)]
uobject: Make interface functions take UObjects directly.

This makes implementing the functions a little cleaner.

13 years agomusic: Migrate to GOB2.
Nick Bowler [Mon, 28 Mar 2011 22:55:07 +0000 (18:55 -0400)]
music: Migrate to GOB2.

13 years agouobject: Rename some interface-related identifiers.
Nick Bowler [Mon, 28 Mar 2011 22:53:36 +0000 (18:53 -0400)]
uobject: Rename some interface-related identifiers.

More changes to align with GOB2's expectations.

13 years agotexture: Migrate to GOB2.
Nick Bowler [Mon, 28 Mar 2011 22:51:23 +0000 (18:51 -0400)]
texture: Migrate to GOB2.

13 years agoengine: Start using GOB2 to generate GObject classes.
Nick Bowler [Fri, 25 Mar 2011 14:59:44 +0000 (10:59 -0400)]
engine: Start using GOB2 to generate GObject classes.

GOB2 allows us to eliminate a lot of boilerplate.  Unfortunately,
current versions of GOB2 don't directly support dynamic types, so you
will need a patched version of GOB2 as of this writing.  For now, just
the Palette class is built using GOB2.

13 years agoengine: Include object headers as <engine/xyz.h>.
Nick Bowler [Fri, 25 Mar 2011 00:57:22 +0000 (20:57 -0400)]
engine: Include object headers as <engine/xyz.h>.

This will work with VPATH builds even if the .h file is in the build
tree while the .c file is in the source tree, and vice versa.  For
non-VPATH builds, there should be no change in behaviour.

13 years agouobject: Rename U_OBJECT_TYPE to U_TYPE_OBJECT.
Nick Bowler [Wed, 23 Mar 2011 22:39:04 +0000 (18:39 -0400)]
uobject: Rename U_OBJECT_TYPE to U_TYPE_OBJECT.

Other tools, such as gob2, expect this naming convention.

13 years agouobject: Add initial support for object properties.
Nick Bowler [Wed, 23 Mar 2011 12:58:19 +0000 (08:58 -0400)]
uobject: Add initial support for object properties.

13 years agotexture: Add missing integer properties.
Nick Bowler [Tue, 22 Mar 2011 21:46:48 +0000 (17:46 -0400)]
texture: Add missing integer properties.

The limits for these properties were made up on the spot.

13 years agouobject: Add a helper function to load objects from packages.
Nick Bowler [Tue, 22 Mar 2011 00:11:55 +0000 (20:11 -0400)]
uobject: Add a helper function to load objects from packages.

13 years agoupkg: Print object properties in info mode.
Nick Bowler [Mon, 21 Mar 2011 13:40:38 +0000 (09:40 -0400)]
upkg: Print object properties in info mode.

13 years agotexture: Fix typo in get_property.
Nick Bowler [Mon, 21 Mar 2011 13:39:15 +0000 (09:39 -0400)]
texture: Fix typo in get_property.

These properties are unsigned ints, not booleans...

13 years agoupkg: Print class name in listings.
Nick Bowler [Mon, 21 Mar 2011 11:34:35 +0000 (07:34 -0400)]
upkg: Print class name in listings.

13 years agoengine: Implement Engine.Palette.
Nick Bowler [Sun, 13 Mar 2011 20:37:42 +0000 (16:37 -0400)]
engine: Implement Engine.Palette.

13 years agoupkg: Add an option to list packages.
Nick Bowler [Sun, 13 Mar 2011 18:06:54 +0000 (14:06 -0400)]
upkg: Add an option to list packages.

This new option will eventually replace the dual-purpose "info" option.