mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-15 08:02:34 -05:00
Hush up warnings by defining away functions/macros. This should be fixed if
actual functionality is wanted (by including the proper headers and making sure rockbox provides these functions). pow(), floor(), log() and exp() just feel veeeery floatish... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6417 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2505e7bf04
commit
4cc0b97609
5 changed files with 52 additions and 20 deletions
|
|
@ -83,6 +83,9 @@
|
||||||
#define ABS(x) (((x) >= 0) ? (x) : (-(x)))
|
#define ABS(x) (((x) >= 0) ? (x) : (-(x)))
|
||||||
|
|
||||||
|
|
||||||
|
#if 0 /* This code serves no useful purpose for Rockbox. Possibly the trace
|
||||||
|
thing could be defined for simulator... */
|
||||||
|
|
||||||
#ifdef DEBUGMODE
|
#ifdef DEBUGMODE
|
||||||
|
|
||||||
#ifndef ASSERT
|
#ifndef ASSERT
|
||||||
|
|
@ -105,6 +108,17 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#else /* 0 */
|
||||||
|
/* disable TRACE() and ASSERT() calls */
|
||||||
|
#define TRACE(...)
|
||||||
|
#define ASSERT(...)
|
||||||
|
|
||||||
|
/* now fake float function to hush the compiler */
|
||||||
|
#define pow(x,y) ((x)+(y))
|
||||||
|
#define floor(x) x
|
||||||
|
#define log(x) (x)
|
||||||
|
#define exp(x) (x)
|
||||||
|
#endif /* 0 */
|
||||||
|
|
||||||
#define DUMB_ID(a,b,c,d) (((unsigned int)(a) << 24) | \
|
#define DUMB_ID(a,b,c,d) (((unsigned int)(a) << 24) | \
|
||||||
((unsigned int)(b) << 16) | \
|
((unsigned int)(b) << 16) | \
|
||||||
|
|
|
||||||
|
|
@ -15,20 +15,26 @@ $(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h
|
$(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h
|
||||||
$(CC) -c -o $@ $< $(CFLAGS)
|
@echo "(dumb) CC $<"
|
||||||
|
@$(CC) -c -o $@ $< $(CFLAGS)
|
||||||
|
|
||||||
$(OBJDIR)/%.o: src/helpers/%.c include/dumb.h
|
$(OBJDIR)/%.o: src/helpers/%.c include/dumb.h
|
||||||
$(CC) -c -o $@ $< $(CFLAGS)
|
@echo "(dumb) CC $<"
|
||||||
|
@$(CC) -c -o $@ $< $(CFLAGS)
|
||||||
|
|
||||||
$(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h
|
$(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h
|
||||||
$(CC) -c -o $@ $< $(CFLAGS)
|
@echo "(dumb) CC $<"
|
||||||
|
@$(CC) -c -o $@ $< $(CFLAGS)
|
||||||
|
|
||||||
$(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \
|
$(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \
|
||||||
include/internal/aldumb.h include/internal/dumb.h
|
include/internal/aldumb.h include/internal/dumb.h
|
||||||
$(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
|
@echo "(dumb) CC $<"
|
||||||
|
@$(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
|
||||||
|
|
||||||
$(CORE_LIB_FILE): $(CORE_OBJECTS)
|
$(CORE_LIB_FILE): $(CORE_OBJECTS)
|
||||||
$(AR) rs $@ $^
|
@echo "(dumb) AR $<"
|
||||||
|
@$(AR) rs $@ $^
|
||||||
|
|
||||||
$(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS)
|
$(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS)
|
||||||
$(AR) rs $@ $^
|
@echo "(dumb) AR $<"
|
||||||
|
@$(AR) rs $@ $^
|
||||||
|
|
|
||||||
|
|
@ -141,16 +141,18 @@ void duh_sigrenderer_set_sigparam(
|
||||||
if (!sigrenderer) return;
|
if (!sigrenderer) return;
|
||||||
|
|
||||||
proc = sigrenderer->desc->sigrenderer_set_sigparam;
|
proc = sigrenderer->desc->sigrenderer_set_sigparam;
|
||||||
if (proc)
|
if (proc) {
|
||||||
(*proc)(sigrenderer->sigrenderer, id, value);
|
(*proc)(sigrenderer->sigrenderer, id, value);
|
||||||
else
|
return;
|
||||||
TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n",
|
}
|
||||||
(int)id,
|
|
||||||
value,
|
TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n",
|
||||||
(int)(sigrenderer->desc->type >> 24),
|
(int)id,
|
||||||
(int)(sigrenderer->desc->type >> 16),
|
value,
|
||||||
(int)(sigrenderer->desc->type >> 8),
|
(int)(sigrenderer->desc->type >> 24),
|
||||||
(int)(sigrenderer->desc->type));
|
(int)(sigrenderer->desc->type >> 16),
|
||||||
|
(int)(sigrenderer->desc->type >> 8),
|
||||||
|
(int)(sigrenderer->desc->type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -555,7 +555,7 @@ static long it_read_sample_data(int cmwt, IT_SAMPLE *sample, unsigned char conve
|
||||||
/** WARNING - unresolved business here... test with ModPlug? */
|
/** WARNING - unresolved business here... test with ModPlug? */
|
||||||
|
|
||||||
if (sample->flags & IT_SAMPLE_STEREO)
|
if (sample->flags & IT_SAMPLE_STEREO)
|
||||||
exit(37);
|
return -1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//#ifndef STEREO_SAMPLES_COUNT_AS_TWO
|
//#ifndef STEREO_SAMPLES_COUNT_AS_TWO
|
||||||
|
|
|
||||||
|
|
@ -78,12 +78,16 @@ static const char xm_has_memory[] = {
|
||||||
/* Effects marked with 'special' are handled specifically in itrender.c */
|
/* Effects marked with 'special' are handled specifically in itrender.c */
|
||||||
void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry)
|
void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry)
|
||||||
{
|
{
|
||||||
|
#ifdef SIMULATOR
|
||||||
const int log = 0;
|
const int log = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((!effect && !value) || (effect >= XM_N_EFFECTS))
|
if ((!effect && !value) || (effect >= XM_N_EFFECTS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef SIMULATOR
|
||||||
if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
|
if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Linearisation of the effect number... */
|
/* Linearisation of the effect number... */
|
||||||
if (effect == XM_E) {
|
if (effect == XM_E) {
|
||||||
|
|
@ -94,7 +98,9 @@ if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
|
||||||
value = LOW(value);
|
value = LOW(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SIMULATOR
|
||||||
if (log) printf(" - %2d %02X", effect, value);
|
if (log) printf(" - %2d %02X", effect, value);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0 // This should be handled in itrender.c!
|
#if 0 // This should be handled in itrender.c!
|
||||||
/* update effect memory */
|
/* update effect memory */
|
||||||
|
|
@ -227,7 +233,9 @@ if (log) printf(" - %2d %02X", effect, value);
|
||||||
entry->mask &= ~IT_ENTRY_EFFECT;
|
entry->mask &= ~IT_ENTRY_EFFECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SIMULATOR
|
||||||
if (log) printf(" - %2d %02X", effect, value);
|
if (log) printf(" - %2d %02X", effect, value);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Inverse linearisation... */
|
/* Inverse linearisation... */
|
||||||
if (effect >= SBASE && effect < SBASE+16) {
|
if (effect >= SBASE && effect < SBASE+16) {
|
||||||
|
|
@ -235,7 +243,9 @@ if (log) printf(" - %2d %02X", effect, value);
|
||||||
effect = IT_S;
|
effect = IT_S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SIMULATOR
|
||||||
if (log) printf(" - %c%02X\n", 'A'+effect-1, value);
|
if (log) printf(" - %c%02X\n", 'A'+effect-1, value);
|
||||||
|
#endif
|
||||||
|
|
||||||
entry->effect = effect;
|
entry->effect = effect;
|
||||||
entry->effectvalue = value;
|
entry->effectvalue = value;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue