From d780df962844083f36019d0597552f0d63385eb0 Mon Sep 17 00:00:00 2001 From: megazig Date: Thu, 12 Mar 2009 00:40:37 -0500 Subject: cleanup --- brlyt.c | 39 --------------------------------------- brlyt.h | 9 --------- 2 files changed, 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> 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 -- cgit v1.3.1