From d909181936acd9bafd731a535dd97ebc4ba0161d Mon Sep 17 00:00:00 2001
From: kramm <kramm>
Date: Sun, 4 Nov 2001 16:35:50 +0000
Subject: [PATCH] added support for definebutton{sound,cxform}

---
 src/reloc.c |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/src/reloc.c b/src/reloc.c
index 56831aa..7cdf8e1 100644
--- a/src/reloc.c
+++ b/src/reloc.c
@@ -46,6 +46,37 @@ void map_ids_mem(u8*mem, int length)
 
     switch(newtag->id)
     {
+	case TAGID_DEFINEBUTTONCXFORM: {
+	    int t;
+	    maponeid(&newtag->data[0]); //button id
+	    reader_init (newtag->data, newtag->length);
+	    for(t=0;t<4;t++) {
+		int flags;
+		maponeid(&newtag->data[0]);
+		readu16(); //sound id
+		flags = readu8();
+		if(flags&1)
+		    readu32(); // in point
+		if(flags&2)
+		    readu32(); // out points
+		if(flags&4)
+		    readu16(); // loop count
+		if(flags&8)
+		{
+		    int npoints = readu8();
+		    int s;
+		    for(s=0;s<npoints;s++)
+		    {
+			readu32();
+			readu16();
+			readu16();
+		    }
+		}
+	    }
+        } break;
+	case TAGID_DEFINEBUTTONSOUND:
+	    maponeid(&newtag->data[0]); //button id
+	break;
 	case TAGID_PLACEOBJECT:
 	    maponeid(&newtag->data[0]);
         break;
-- 
1.7.10.4