aboutsummaryrefslogtreecommitdiff
path: root/laichzeit
diff options
context:
space:
mode:
Diffstat (limited to 'laichzeit')
-rw-r--r--laichzeit/brlyt.c92
-rw-r--r--laichzeit/brlyt.h20
2 files changed, 111 insertions, 1 deletions
diff --git a/laichzeit/brlyt.c b/laichzeit/brlyt.c
index e670487..46afb35 100644
--- a/laichzeit/brlyt.c
+++ b/laichzeit/brlyt.c
@@ -131,6 +131,35 @@ int LaichLyt_StartPic(BRLYT* brlyt, char* name)
return AddEntryToBRLYT(brlyt, entry);
}
+int LaichLyt_StartWnd(BRLYT* brlyt, char* name)
+{
+ LYTEntry entry;
+ entry.type = LYT_TYPE_WND;
+ entry.done = 0;
+ entry.tag.wnd.pane.alpha = 255;
+ entry.tag.wnd.pane.alpha2 = 0;
+ memset(entry.tag.wnd.pane.name, 0, 24);
+ strncpy(entry.tag.wnd.pane.name, name, 24);
+ entry.tag.wnd.pane.x = 0;
+ entry.tag.wnd.pane.y = 0;
+ entry.tag.wnd.pane.z = 0;
+ entry.tag.wnd.pane.rot_x = 0;
+ entry.tag.wnd.pane.rot_x = 0;
+ entry.tag.wnd.pane.angle = 0;
+ entry.tag.wnd.pane.xmag = 0;
+ entry.tag.wnd.pane.ymag = 0;
+ entry.tag.wnd.pane.width = 0;
+ entry.tag.wnd.pane.height = 0;
+ entry.tag.wnd.pane.done = 0;
+ entry.tag.wnd.colors[0] = RGBA8(0, 0, 0, 255);
+ entry.tag.wnd.colors[1] = RGBA8(0, 0, 0, 255);
+ entry.tag.wnd.colors[2] = RGBA8(0, 0, 0, 255);
+ entry.tag.wnd.colors[3] = RGBA8(0, 0, 0, 255);
+ entry.tag.wnd.count = 0;
+ entry.tag.wnd.texcoords = NULL;
+ entry.tag.wnd.done = 0;
+ return AddEntryToBRLYT(brlyt, entry);
+
int LaichLyt_StartMat(BRLYT* brlyt)
{
LYTEntry entry;
@@ -321,6 +350,36 @@ void LaichLyt_PicAlpha(BRLYT* brlyt, int pic, \
alpha, alpha2);
}
+void LaichLyt_WndCoords(BRLYT* brlyt, int wnd, \
+ float x, float y, float z)
+{
+ LaichLyt_IntPaneCoords(&(brlyt->entries[wnd].tag.wnd.pane), \
+ x, y, z);
+}
+void LaichLyt_WndRotation(BRLYT* brlyt, int wnd, \
+ float rot_x, float rot_y, float angle)
+{
+ LaichLyt_IntPaneRotation(&(brlyt->entries[wnd].tag.wnd.pane), \
+ rot_x, rot_y, angle);
+}
+void LaichLyt_WndZoom(BRLYT* brlyt, int wnd, \
+ float xmag, float ymag)
+{
+ LaichLyt_IntPaneZoom(&(brlyt->entries[wnd].tag.wnd.pane), \
+ xmag, ymag);
+}
+void LaichLyt_WndSize(BRLYT* brlyt, int wnd, \
+ float width, float height)
+{
+ LaichLyt_IntPaneSize(&(brlyt->entries[wnd].tag.wnd.pane), \
+ width, height);
+}
+void LaichLyt_WndAlpha(BRLYT* brlyt, int wnd, \
+ u8 alpha, u8 alpha2)
+{
+ LaichLyt_IntPaneAlpha(&(brlyt->entries[wnd].tag.wnd.pane), \
+ alpha, alpha2);
+}
void LaichLyt_TextFont(BRLYT* brlyt, int text, \
LYTFont font)
@@ -363,6 +422,29 @@ void LaichLyt_PicAddTexCoord(BRLYT* brlyt, int pic, \
AddTexCoordToPic(brlyt, pic, coord);
}
+void LaichLyt_WndColors(BRLYT* brlyt, int wnd, \
+ u32 color1, u32 color2, u32 color3, u32 color4)
+{
+ brlyt->entries[wnd].tag.wnd.colors[0] = color1;
+ brlyt->entries[wnd].tag.wnd.colors[1] = color2;
+ brlyt->entries[wnd].tag.wnd.colors[2] = color3;
+ brlyt->entries[wnd].tag.wnd.colors[3] = color4;
+}
+
+void LaichLyt_WndAddTexCoord(BRLYT* brlyt, int wnd, \
+ float coords[8])
+{
+ LYTTexCoord coord;
+ int i;
+ for(i = 0; i < 8; i++)
+ coord.coords[i] = coords[i];
+ AddTexCoordToWnd(brlyt, wnd, coord);
+}
+
+
+void LaichLyt_GroupAddSub(BRLYT* brlyt, int group, \
+ char* subname)
+{
void LaichLyt_GroupAddSub(BRLYT* brlyt, int group, \
char* subname)
@@ -400,6 +482,11 @@ static void LaichLyt_EndEntry(BRLYT* brlyt, int tag)
brlyt->entries[tag].tag.pic.done = 1;
brlyt->entries[tag].tag.pic.pane.done = 1;
break;
+
+ case LYT_TYPE_WND:
+ brlyt->entries[tag].tag.wnd.done = 1;
+ brlyt->entries[tag].tag.wnd.pane.done = 1;
+ break;
default: // lolwut
return;
@@ -417,6 +504,11 @@ void LaichLyt_EndMat(BRLYT* brlyt, int mat)
LaichLyt_EndEntry(brlyt, mat);
}
+void LaichLyt_EndWnd(BRLYT* brlyt, int wnd)
+{
+ LaichLyt_endEntry(brlyt, wnd);
+}
+
void LaichLyt_EndPic(BRLYT* brlyt, int pic)
{
LaichLyt_EndEntry(brlyt, pic);
diff --git a/laichzeit/brlyt.h b/laichzeit/brlyt.h
index 37ae86f..565d69d 100644
--- a/laichzeit/brlyt.h
+++ b/laichzeit/brlyt.h
@@ -274,6 +274,7 @@ BRLYT* LaichLyt_Start(float width, float height);
int LaichLyt_StartPane (BRLYT* brlyt, char* name);
int LaichLyt_StartText (BRLYT* brlyt, char* name);
int LaichLyt_StartPic (BRLYT* brlyt, char* name);
+int LaichLyt_StartWnd (BRLYT* brlyt, char* name);
int LaichLyt_StartMat (BRLYT* brlyt);
int LaichLyt_StartGroup(BRLYT* brlyt, char* name);
@@ -289,7 +290,7 @@ void LaichLyt_PaneSize(BRLYT* brlyt, int pane, \
void LaichLyt_PaneAlpha(BRLYT* brlyt, int pane, \
u8 alpha, u8 alpha2);
-/* Panes exist in Text and Pic tags, so we gotta create those too!*/
+/* Panes exist in Text and Pic and Wnd tags, so we gotta create those too!*/
void LaichLyt_TextCoords(BRLYT* brlyt, int text, \
float x, float y, float z);
void LaichLyt_TextRotation(BRLYT* brlyt, int text, \
@@ -310,6 +311,16 @@ void LaichLyt_PicSize(BRLYT* brlyt, int pic, \
float width, float height);
void LaichLyt_PicAlpha(BRLYT* brlyt, int pic, \
u8 alpha, u8 alpha2);
+void LaichLyt_WndCoords(BRLYT* brlyt, int wnd, \
+ float x, float y, float z);
+void LaichLyt_WndRotation(BRLYT* brlyt, int wnd, \
+ float rot_x, float rot_y, float angle);
+void LaichLyt_WndZoom(BRLYT* brlyt, int wnd, \
+ float xmag, float ymag);
+void LaichLyt_WndSize(BRLYT* brlyt, int wnd, \
+ float width, float height);
+void LaichLyt_WndAlpha(BRLYT* brlyt, int wnd, \
+ u8 alpha, u8 alpha2);
/* Text stuff */
void LaichLyt_TextFont(BRLYT* brlyt, int text, \
@@ -325,6 +336,12 @@ void LaichLyt_PicColors(BRLYT* brlyt, int pic, \
void LaichLyt_PicAddTexCoord(BRLYT* brlyt, int pic, \
float coords[8]);
+/* Wnd stuff */
+void LaichLyt_WndColors(BRLYT* brlyt, int wnd, \
+ u32 color1, u32 color2, u32 color3, u32 color4);
+void LaichLyt_WndAddTexCoord(BRLYT* brlyt, int wnd, \
+ float coords[8]);
+
/* Group stuff */
void LaichLyt_GroupAddSub(BRLYT* brlyt, int group, \
char* subname);
@@ -362,6 +379,7 @@ void LaichLyt_MatAddStage10(BRLYT* brlyt, int mat, \
void LaichLyt_EndGroup(BRLYT* brlyt, int group);
void LaichLyt_EndMat (BRLYT* brlyt, int mat );
+void LaichLyt_EndWnd (BRLYT* brlyt, int wnd );
void LaichLyt_EndPic (BRLYT* brlyt, int pic );
void LaichLyt_EndText (BRLYT* brlyt, int text );
void LaichLyt_EndPane (BRLYT* brlyt, int pane );