diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/doom/Makefile | 9 | ||||
-rw-r--r-- | apps/plugins/doom/hu_stuff.c | 26 | ||||
-rw-r--r-- | apps/plugins/doom/r_data.c | 11 |
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 @@ | |||
3 | # $Id$ | 3 | # $Id$ |
4 | # | 4 | # |
5 | # $Log$ | 5 | # $Log$ |
6 | # Revision 1.12 2006/12/13 05:46:51 kkurbjun | 6 | # Revision 1.13 2006/12/13 06:52:09 kkurbjun |
7 | # Free more plugin memory | ||
8 | # | ||
9 | # Revision 1.12 2006-12-13 05:46:51 kkurbjun | ||
7 | # Will it fit? | 10 | # Will it fit? |
8 | # | 11 | # |
9 | # Revision 1.11 2006-12-13 04:44:17 kkurbjun | 12 | # Revision 1.11 2006-12-13 04:44:17 kkurbjun |
@@ -53,11 +56,13 @@ endif | |||
53 | 56 | ||
54 | # The arm code compiles too large for the plugin buffer when set to optimize for speed | 57 | # The arm code compiles too large for the plugin buffer when set to optimize for speed |
55 | #ifeq ($(CC), arm-elf-gcc) | 58 | #ifeq ($(CC), arm-elf-gcc) |
56 | ifneq (,$(strip $(foreach tgt,IPOD_NANO IPOD_COLOR IPOD_VIDEO IPOD_MINI IPOD_3G IPOD_4G IRIVER_H10_5GB IRIVER_H10,$(findstring $(tgt),$(TARGET))))) | 59 | 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))))) |
57 | CFLAGS += -Os | 60 | CFLAGS += -Os |
58 | ifndef SIMVER | 61 | ifndef SIMVER |
62 | ifeq ($(TARGET), IRIVER_H100) | ||
59 | CFLAGS += -mstructure-size-boundary=8 | 63 | CFLAGS += -mstructure-size-boundary=8 |
60 | endif | 64 | endif |
65 | endif | ||
61 | else | 66 | else |
62 | CFLAGS += -O2 | 67 | CFLAGS += -O2 |
63 | endif | 68 | 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; | |||
161 | 161 | ||
162 | // font sets | 162 | // font sets |
163 | patchnum_t hu_font[HU_FONTSIZE]; | 163 | patchnum_t hu_font[HU_FONTSIZE]; |
164 | patchnum_t hu_font2[HU_FONTSIZE]; | 164 | patchnum_t *hu_font2; |
165 | patchnum_t hu_fontk[HU_FONTSIZE];//jff 3/7/98 added for graphic key indicators | 165 | patchnum_t *hu_fontk;//jff 3/7/98 added for graphic key indicators |
166 | patchnum_t hu_msgbg[9]; //jff 2/26/98 add patches for message background | 166 | patchnum_t hu_msgbg[9]; //jff 2/26/98 add patches for message background |
167 | 167 | ||
168 | // widgets | 168 | // widgets |
@@ -312,6 +312,8 @@ void HU_Init(void) | |||
312 | hud_coordstrx=malloc(32*sizeof(char)); | 312 | hud_coordstrx=malloc(32*sizeof(char)); |
313 | hud_coordstry=malloc(32*sizeof(char)); | 313 | hud_coordstry=malloc(32*sizeof(char)); |
314 | hud_coordstrz=malloc(32*sizeof(char)); | 314 | hud_coordstrz=malloc(32*sizeof(char)); |
315 | hu_fontk=malloc(HU_FONTSIZE*sizeof(patchnum_t)); | ||
316 | hu_font2=malloc(HU_FONTSIZE*sizeof(patchnum_t)); | ||
315 | 317 | ||
316 | // load the heads-up font | 318 | // load the heads-up font |
317 | j = HU_FONTSTART; | 319 | j = HU_FONTSTART; |
@@ -320,53 +322,53 @@ void HU_Init(void) | |||
320 | if ('0'<=j && j<='9') | 322 | if ('0'<=j && j<='9') |
321 | { | 323 | { |
322 | snprintf(buffer, sizeof(buffer), "DIG%d",j-48); | 324 | snprintf(buffer, sizeof(buffer), "DIG%d",j-48); |
323 | R_SetPatchNum(&hu_font2[i], buffer); | 325 | R_SetPatchNum(hu_font2 +i, buffer); |
324 | snprintf(buffer, sizeof(buffer), "STCFN%s%d", (j/10>0?"0":"00"), j); //NOTE ROCKHACK: "STCFN%.3d" | 326 | snprintf(buffer, sizeof(buffer), "STCFN%s%d", (j/10>0?"0":"00"), j); //NOTE ROCKHACK: "STCFN%.3d" |
325 | R_SetPatchNum(&hu_font[i], buffer); | 327 | R_SetPatchNum(&hu_font[i], buffer); |
326 | } | 328 | } |
327 | else if ('A'<=j && j<='Z') | 329 | else if ('A'<=j && j<='Z') |
328 | { | 330 | { |
329 | snprintf(buffer, sizeof(buffer), "DIG%c",j); | 331 | snprintf(buffer, sizeof(buffer), "DIG%c",j); |
330 | R_SetPatchNum(&hu_font2[i], buffer); | 332 | R_SetPatchNum(hu_font2 +i, buffer); |
331 | snprintf(buffer, sizeof(buffer), "STCFN%s%d", (j/10>0?"0":"00"), j); //NOTE ROCKHACK: "STCFN%.3d" | 333 | snprintf(buffer, sizeof(buffer), "STCFN%s%d", (j/10>0?"0":"00"), j); //NOTE ROCKHACK: "STCFN%.3d" |
332 | R_SetPatchNum(&hu_font[i], buffer); | 334 | R_SetPatchNum(&hu_font[i], buffer); |
333 | } | 335 | } |
334 | else if (j=='-') | 336 | else if (j=='-') |
335 | { | 337 | { |
336 | R_SetPatchNum(&hu_font2[i], "DIG45"); | 338 | R_SetPatchNum(hu_font2 +i, "DIG45"); |
337 | R_SetPatchNum(&hu_font[i], "STCFN045"); | 339 | R_SetPatchNum(&hu_font[i], "STCFN045"); |
338 | } | 340 | } |
339 | else if (j=='/') | 341 | else if (j=='/') |
340 | { | 342 | { |
341 | R_SetPatchNum(&hu_font2[i], "DIG47"); | 343 | R_SetPatchNum(hu_font2 +i, "DIG47"); |
342 | R_SetPatchNum(&hu_font[i], "STCFN047"); | 344 | R_SetPatchNum(&hu_font[i], "STCFN047"); |
343 | } | 345 | } |
344 | else if (j==':') | 346 | else if (j==':') |
345 | { | 347 | { |
346 | R_SetPatchNum(&hu_font2[i], "DIG58"); | 348 | R_SetPatchNum(hu_font2 +i, "DIG58"); |
347 | R_SetPatchNum(&hu_font[i], "STCFN058"); | 349 | R_SetPatchNum(&hu_font[i], "STCFN058"); |
348 | } | 350 | } |
349 | else if (j=='[') | 351 | else if (j=='[') |
350 | { | 352 | { |
351 | R_SetPatchNum(&hu_font2[i], "DIG91"); | 353 | R_SetPatchNum(hu_font2 +i, "DIG91"); |
352 | R_SetPatchNum(&hu_font[i], "STCFN091"); | 354 | R_SetPatchNum(&hu_font[i], "STCFN091"); |
353 | } | 355 | } |
354 | else if (j==']') | 356 | else if (j==']') |
355 | { | 357 | { |
356 | R_SetPatchNum(&hu_font2[i], "DIG93"); | 358 | R_SetPatchNum(hu_font2 +i, "DIG93"); |
357 | R_SetPatchNum(&hu_font[i], "STCFN093"); | 359 | R_SetPatchNum(&hu_font[i], "STCFN093"); |
358 | } | 360 | } |
359 | else if (j<97) | 361 | else if (j<97) |
360 | { | 362 | { |
361 | snprintf(buffer, sizeof(buffer), "STCFN%s%d", (j/10>0?"0":"00"), j); //NOTE ROCKHACK: "STCFN%.3d" | 363 | snprintf(buffer, sizeof(buffer), "STCFN%s%d", (j/10>0?"0":"00"), j); //NOTE ROCKHACK: "STCFN%.3d" |
362 | R_SetPatchNum(&hu_font2[i], buffer); | 364 | R_SetPatchNum(hu_font2 +i, buffer); |
363 | R_SetPatchNum(&hu_font[i], buffer); | 365 | R_SetPatchNum(&hu_font[i], buffer); |
364 | //jff 2/23/98 make all font chars defined, useful or not | 366 | //jff 2/23/98 make all font chars defined, useful or not |
365 | } | 367 | } |
366 | else if (j>122) | 368 | else if (j>122) |
367 | { | 369 | { |
368 | snprintf(buffer, sizeof(buffer), "STBR%d", j); //NOTE: "STBR%.3d" | 370 | snprintf(buffer, sizeof(buffer), "STBR%d", j); //NOTE: "STBR%.3d" |
369 | R_SetPatchNum(&hu_font2[i], buffer); | 371 | R_SetPatchNum(hu_font2 +i, buffer); |
370 | R_SetPatchNum(&hu_font[i], buffer); | 372 | R_SetPatchNum(&hu_font[i], buffer); |
371 | } | 373 | } |
372 | else | 374 | else |
@@ -382,7 +384,7 @@ void HU_Init(void) | |||
382 | // CPhipps - load patches for keys and double keys | 384 | // CPhipps - load patches for keys and double keys |
383 | for (i=0; i<6; i++) { | 385 | for (i=0; i<6; i++) { |
384 | snprintf(buffer, sizeof(buffer), "STKEYS%d", i); | 386 | snprintf(buffer, sizeof(buffer), "STKEYS%d", i); |
385 | R_SetPatchNum(&hu_fontk[i], buffer); | 387 | R_SetPatchNum(hu_fontk+i, buffer); |
386 | } | 388 | } |
387 | } | 389 | } |
388 | 390 | ||
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) | |||
694 | // By Lee Killough 2/21/98 | 694 | // By Lee Killough 2/21/98 |
695 | // | 695 | // |
696 | 696 | ||
697 | struct _cache { | ||
698 | unsigned char pct; | ||
699 | unsigned char playpal[256]; | ||
700 | } | ||
701 | cache; | ||
702 | |||
703 | int tran_filter_pct = 66; // filter percent | 697 | int tran_filter_pct = 66; // filter percent |
704 | 698 | ||
705 | #define TSC 12 /* number of fixed point digits in filter percent */ | 699 | #define TSC 12 /* number of fixed point digits in filter percent */ |
706 | 700 | ||
707 | void R_InitTranMap(int progress) | 701 | void R_InitTranMap(int progress) |
708 | { | 702 | { |
703 | struct _cache { | ||
704 | unsigned char pct; | ||
705 | unsigned char playpal[256]; | ||
706 | } | ||
707 | cache; | ||
709 | int lump = W_CheckNumForName("TRANMAP"); | 708 | int lump = W_CheckNumForName("TRANMAP"); |
710 | 709 | ||
711 | // If a tranlucency filter map lump is present, use it | 710 | // If a tranlucency filter map lump is present, use it |