summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2006-12-13 06:52:10 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2006-12-13 06:52:10 +0000
commit29a13872d747ec8754195ed607ca1627b577e2e2 (patch)
tree9bda085f31b3f1b44e920452139ddd46842dba4f /apps/plugins
parent4084b5d478f079dbe0b30a42cf63fac1d2f118da (diff)
Free more plugin memory
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11743 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/doom/Makefile9
-rw-r--r--apps/plugins/doom/hu_stuff.c26
-rw-r--r--apps/plugins/doom/r_data.c11
3 files changed, 26 insertions, 20 deletions
diff --git a/apps/plugins/doom/Makefile b/apps/plugins/doom/Makefile
index 16a47ee08b..3565612709 100644
--- a/apps/plugins/doom/Makefile
+++ b/apps/plugins/doom/Makefile
@@ -3,7 +3,10 @@
# $Id$
#
# $Log$
-# Revision 1.12 2006/12/13 05:46:51 kkurbjun
+# Revision 1.13 2006/12/13 06:52:09 kkurbjun
+# Free more plugin memory
+#
+# Revision 1.12 2006-12-13 05:46:51 kkurbjun
# Will it fit?
#
# Revision 1.11 2006-12-13 04:44:17 kkurbjun
@@ -53,11 +56,13 @@ endif
# The arm code compiles too large for the plugin buffer when set to optimize for speed
#ifeq ($(CC), arm-elf-gcc)
-ifneq (,$(strip $(foreach tgt,IPOD_NANO IPOD_COLOR IPOD_VIDEO IPOD_MINI IPOD_3G IPOD_4G IRIVER_H10_5GB IRIVER_H10,$(findstring $(tgt),$(TARGET)))))
+ifneq (,$(strip $(foreach tgt,SANSA_E200 IPOD_NANO IPOD_COLOR IPOD_VIDEO IPOD_MINI IPOD_3G IPOD_4G IRIVER_H10_5GB IRIVER_H10,$(findstring $(tgt),$(TARGET)))))
CFLAGS += -Os
ifndef SIMVER
+ifeq ($(TARGET), IRIVER_H100)
CFLAGS += -mstructure-size-boundary=8
endif
+endif
else
CFLAGS += -O2
endif
diff --git a/apps/plugins/doom/hu_stuff.c b/apps/plugins/doom/hu_stuff.c
index 747be18df0..5361435fd5 100644
--- a/apps/plugins/doom/hu_stuff.c
+++ b/apps/plugins/doom/hu_stuff.c
@@ -161,8 +161,8 @@ static player_t* plr;
// font sets
patchnum_t hu_font[HU_FONTSIZE];
-patchnum_t hu_font2[HU_FONTSIZE];
-patchnum_t hu_fontk[HU_FONTSIZE];//jff 3/7/98 added for graphic key indicators
+patchnum_t *hu_font2;
+patchnum_t *hu_fontk;//jff 3/7/98 added for graphic key indicators
patchnum_t hu_msgbg[9]; //jff 2/26/98 add patches for message background
// widgets
@@ -312,6 +312,8 @@ void HU_Init(void)
hud_coordstrx=malloc(32*sizeof(char));
hud_coordstry=malloc(32*sizeof(char));
hud_coordstrz=malloc(32*sizeof(char));
+ hu_fontk=malloc(HU_FONTSIZE*sizeof(patchnum_t));
+ hu_font2=malloc(HU_FONTSIZE*sizeof(patchnum_t));
// load the heads-up font
j = HU_FONTSTART;
@@ -320,53 +322,53 @@ void HU_Init(void)
if ('0'<=j && j<='9')
{
snprintf(buffer, sizeof(buffer), "DIG%d",j-48);
- R_SetPatchNum(&hu_font2[i], buffer);
+ R_SetPatchNum(hu_font2 +i, buffer);
snprintf(buffer, sizeof(buffer), "STCFN%s%d", (j/10>0?"0":"00"), j); //NOTE ROCKHACK: "STCFN%.3d"
R_SetPatchNum(&hu_font[i], buffer);
}
else if ('A'<=j && j<='Z')
{
snprintf(buffer, sizeof(buffer), "DIG%c",j);
- R_SetPatchNum(&hu_font2[i], buffer);
+ R_SetPatchNum(hu_font2 +i, buffer);
snprintf(buffer, sizeof(buffer), "STCFN%s%d", (j/10>0?"0":"00"), j); //NOTE ROCKHACK: "STCFN%.3d"
R_SetPatchNum(&hu_font[i], buffer);
}
else if (j=='-')
{
- R_SetPatchNum(&hu_font2[i], "DIG45");
+ R_SetPatchNum(hu_font2 +i, "DIG45");
R_SetPatchNum(&hu_font[i], "STCFN045");
}
else if (j=='/')
{
- R_SetPatchNum(&hu_font2[i], "DIG47");
+ R_SetPatchNum(hu_font2 +i, "DIG47");
R_SetPatchNum(&hu_font[i], "STCFN047");
}
else if (j==':')
{
- R_SetPatchNum(&hu_font2[i], "DIG58");
+ R_SetPatchNum(hu_font2 +i, "DIG58");
R_SetPatchNum(&hu_font[i], "STCFN058");
}
else if (j=='[')
{
- R_SetPatchNum(&hu_font2[i], "DIG91");
+ R_SetPatchNum(hu_font2 +i, "DIG91");
R_SetPatchNum(&hu_font[i], "STCFN091");
}
else if (j==']')
{
- R_SetPatchNum(&hu_font2[i], "DIG93");
+ R_SetPatchNum(hu_font2 +i, "DIG93");
R_SetPatchNum(&hu_font[i], "STCFN093");
}
else if (j<97)
{
snprintf(buffer, sizeof(buffer), "STCFN%s%d", (j/10>0?"0":"00"), j); //NOTE ROCKHACK: "STCFN%.3d"
- R_SetPatchNum(&hu_font2[i], buffer);
+ R_SetPatchNum(hu_font2 +i, buffer);
R_SetPatchNum(&hu_font[i], buffer);
//jff 2/23/98 make all font chars defined, useful or not
}
else if (j>122)
{
snprintf(buffer, sizeof(buffer), "STBR%d", j); //NOTE: "STBR%.3d"
- R_SetPatchNum(&hu_font2[i], buffer);
+ R_SetPatchNum(hu_font2 +i, buffer);
R_SetPatchNum(&hu_font[i], buffer);
}
else
@@ -382,7 +384,7 @@ void HU_Init(void)
// CPhipps - load patches for keys and double keys
for (i=0; i<6; i++) {
snprintf(buffer, sizeof(buffer), "STKEYS%d", i);
- R_SetPatchNum(&hu_fontk[i], buffer);
+ R_SetPatchNum(hu_fontk+i, buffer);
}
}
diff --git a/apps/plugins/doom/r_data.c b/apps/plugins/doom/r_data.c
index 7cbe6706e7..f6328dac17 100644
--- a/apps/plugins/doom/r_data.c
+++ b/apps/plugins/doom/r_data.c
@@ -694,18 +694,17 @@ int R_ColormapNumForName(const char *name)
// By Lee Killough 2/21/98
//
-struct _cache {
- unsigned char pct;
- unsigned char playpal[256];
-}
-cache;
-
int tran_filter_pct = 66; // filter percent
#define TSC 12 /* number of fixed point digits in filter percent */
void R_InitTranMap(int progress)
{
+ struct _cache {
+ unsigned char pct;
+ unsigned char playpal[256];
+}
+cache;
int lump = W_CheckNumForName("TRANMAP");
// If a tranlucency filter map lump is present, use it