]> git.draconx.ca Git - upkg.git/blobdiff - src/engine/texture.gob
Stop using gnulib's flexmember module.
[upkg.git] / src / engine / texture.gob
index 8e7bb4a54dc5be0fb93009bcf8f6486c7fc188a7..cc6b2712f776f89e63a576f05b4f532608ca474e 100644 (file)
@@ -1,23 +1,27 @@
 %alltop{
 /*
- *  upkg: tool for manipulating Unreal Tournament packages.
- *  Copyright © 2009-2011 Nick Bowler
+ * upkg: tool for manipulating Unreal Tournament packages.
+ * Copyright © 2009-2012, 2020, 2022 Nick Bowler
  *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 %}
 
+%ctop{
+#include <config.h>
+%}
+
 %{
 #include <stdio.h>
 #include <stdlib.h>
@@ -25,8 +29,8 @@
 #include <uobject/loadable.h>
 #include <uobject/exportable.h>
 #include <engine/palette.h>
-#include "pack.h"
-#include "pcx.h"
+#include <engine/pcx.h>
+#include <pack.h>
 %}
 
 %h{
@@ -36,7 +40,7 @@ struct engine_texture_data {
        unsigned long width, height;
 
        unsigned long datalen;
-       unsigned char data[];
+       unsigned char data[FLEXIBLE_ARRAY_MEMBER];
 };
 
 %}
@@ -117,7 +121,10 @@ class Engine:Texture from U:Object (dynamic)
        private unsigned VClamp;
        private unsigned VBits;
 
-       private Engine:Palette *Palette;
+       private float DrawScale;
+
+       private Engine:Palette *Palette = NULL destroywith g_object_unref;
+       private Engine:Texture *DetailTexture = NULL destroywith g_object_unref;
 
        private struct engine_texture_data **mipmap_data;
        private unsigned char mipmap_count;
@@ -269,10 +276,23 @@ class Engine:Texture from U:Object (dynamic)
                , link
                );
 
+       property FLOAT DrawScale
+               ( nick = "Draw Scale"
+               , blurb = "Relative size to parent surface"
+               , link
+               );
+
        property OBJECT Palette
                ( nick = "Palette"
                , blurb = "Reference to the texture's palette."
                , object_type = Engine:Palette
                , link
                );
+
+       property OBJECT DetailTexture
+               ( nick = "Detail Texture"
+               , blurb = "Reference to the corresponding detail texture."
+               , object_type = Engine:Texture
+               , link
+               );
 }