aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegazig <megazig@megazig-desktop.(none)>2009-03-12 00:40:37 -0500
committermegazig <megazig@megazig-desktop.(none)>2009-03-12 00:40:37 -0500
commitd780df962844083f36019d0597552f0d63385eb0 (patch)
treea8e1c6ce4491ee9af17567e7f73dfccb4858d247
parentec87ac7cb576eac0b88e2c3d1c42097276542cab (diff)
cleanup
-rw-r--r--brlyt.c39
-rw-r--r--brlyt.h9
2 files changed, 0 insertions, 48 deletions
diff --git a/brlyt.c b/brlyt.c
index 422eb81..b61fe49 100644
--- a/brlyt.c
+++ b/brlyt.c
@@ -38,8 +38,6 @@ char pas1_magic[] = "pas1";
static size_t BRLYT_fileoffset = 0;
-//linked_list_materials materials;
-
static int FourCCsMatch(fourcc cc1, fourcc cc2)
{
dbgprintf("FourCCs\n");
@@ -88,17 +86,6 @@ float float_swap_bytes(float float1)
return *newFloat;
}
-unsigned short short_swap_bytes(unsigned short short1)
-{
- unsigned char *short1c; short1c = (unsigned char*)&short1;
-
- unsigned char charTemp = 0x00;
- charTemp = short1c[0]; short1c[0] = short1c[1]; short1c[1] = charTemp;
-
- unsigned short *newShort; newShort = (unsigned short*)short1c;
- return *newShort;
-}
-
unsigned int bit_extract(unsigned int num, unsigned int start, unsigned int end)
{
if (end == 100) end = start;
@@ -125,32 +112,6 @@ unsigned int bit_extract(unsigned int num, unsigned int start, unsigned int end)
return ret;
}
-/*
-void get_opt(char* chunk, int startpos, bool enabled, int size, char* item_type)
-{
- //parse_data is your memcopy from chunk to struct_item_type
- ret = parse_data(chunk[startpos:startpos+size], item_type)
- BRLYTReadDataFromMemory(&ibrlyt_item_type, BRLYT_file, sizeof(brlyt_item_type));
- return ret, startpos + size
-}
-
-void get_array(char *chunk, int startpos, int array_size, int item_size, char *item_type):
-{
- ar = []
- int pos = startpos;
-
- int n = 0;
- for (n;n<array_size;n++)
- {
- //ar.append(get_opt(chunk, pos, True, item_size, item_type)[0])
- //get_opt(chunk, pos, True, item_size, item_type);
- BRLYT_ReadDataFromMemory(&brlyt_item_type, BRLYT_file, sizeof(brlyt_item_type));
- pos += item_size;
- }
- return ar, pos
-}
-*/
-
int BRLYT_ReadEntries(u8* brlyt_file, size_t file_size, brlyt_header header, brlyt_entry* entries)
{
/* BRLYT_fileoffset = be16(header.lyt_offset);
diff --git a/brlyt.h b/brlyt.h
index bb7afe8..a1950f2 100644
--- a/brlyt.h
+++ b/brlyt.h
@@ -13,15 +13,6 @@
#include "types.h"
-//#define BIGENDSHORT(y) ((y >> 24) & 0xFF00) + ((y >>8) & 0x00FF)
-//#define BIGENDINT(y) ( ( y << 24 ) & 0xFF000000) + ( ( y << 8 ) & 0x00FF0000 ) + ( ( y >> 8 ) & 0x0000FF00 ) + ( ( y >> 24 ) & 0x000000FF )
-
-//struct linked_list_materials
-//{
-// char name[12];
-// struct linked_list_materials *next;
-//};
-
typedef struct
{
fourcc magic; // RLYT