git » fp-git.git » commit 2810fd2

broken all the code

author ecalot
2006-06-13 18:57:32 UTC
committer ecalot
2006-06-13 18:57:32 UTC
parent 0acac5bd481e0d5651af2956fbf4ec07a7147c97

broken all the code

PR/src/Makefile +2 -1
PR/src/include/palette.h +1 -1
PR/src/lib/layers/pallist.c +23 -0

diff --git a/PR/src/Makefile b/PR/src/Makefile
index 6f7d8c5..65e1bce 100644
--- a/PR/src/Makefile
+++ b/PR/src/Makefile
@@ -58,7 +58,8 @@ COMPRESS = .lzg_compress.o .lzg_decompress.o .rle_compress.o .rle_decompress.o .
 LAYERS   = .dat.o .memory.o .list.o .reslist.o .pallist.o .disk.o .idlist.o .autodetect.o .stringformat.o .resourcematch.o .auxiliary.o
 FORMAT   = .bmp.o .mid.o .pal.o .wav.o .plv.o
 OBJECT   = .object.o .pop2_256c.o .pop2_4bit.o .pop1_4bit.o .image2.o .image16.o .image256.o .binary.o .sounds.o .level.o
-CONSOLE  = .main.o .filedir.o
+CONSOLE  = 
+#.main.o .filedir.o
 MAIN     = .pr.o
 
 EXEOBJ   = $(MAIN) $(XML) $(COMPRESS) $(ACTIONS) $(LAYERS) $(OBJECT) $(FORMAT) $(PORTS) $(CONSOLE)
diff --git a/PR/src/include/palette.h b/PR/src/include/palette.h
index 4152dec..3656224 100644
--- a/PR/src/include/palette.h
+++ b/PR/src/include/palette.h
@@ -87,7 +87,7 @@ tColor* objPalette_pop2_ncolorsGetColors(void* o);
 
 /* Hooks */
 
-#define PAL_COLORS_eResTypePop2PaletteNColors 256
+#define PAL_COLORS_eResTypePop2PaletteNColors /*256*/ (int)(pal.obj)
 #define PAL_COLORS_eResTypePop1Palette4bits 16
 #define PAL_COLORS_eResTypePop1PaletteMono 2
 
diff --git a/PR/src/lib/layers/pallist.c b/PR/src/lib/layers/pallist.c
index f8609fd..aeec6e3 100644
--- a/PR/src/lib/layers/pallist.c
+++ b/PR/src/lib/layers/pallist.c
@@ -112,3 +112,26 @@ int pl_add(tPL* pl, tObject* o, tResourceId resid, tPriority p) {
 	return 1;
 }
 
+void showobj(tObject o) {
+	printf("object type=%d colors=%d\n",o.type,paletteGetColors(o));
+}
+
+int main(int a,char** b) {
+	tObject tests[]={
+		{eResTypeNone,NULL},
+		{eResTypePop2PaletteNColors,(void*)((int)320)},
+		{eResTypePop1Palette4bits,NULL}
+	};
+	tResourceId ress[]={
+		{0,"POP1",4},
+		{2,"LALA",6}
+	};
+	
+	printf("hello world\n");
+	showobj(tests[1]);
+	
+
+
+	return 0;
+}
+