Subversion Repositories eduke32

Rev

Rev 4963 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4963 Rev 5065
Line 140... Line 140...
140
    {
140
    {
141
        OSD_Printf("OSD_CvarModified(): null cvar?!\n");
141
        OSD_Printf("OSD_CvarModified(): null cvar?!\n");
142
        return 0;
142
        return 0;
143
    }
143
    }
144
144
-
 
145
    int rv = 0;
-
 
146
145
    switch (cvar->c.type & (CVAR_BOOL|CVAR_INT|CVAR_UINT|CVAR_FLOAT|CVAR_DOUBLE))
147
    switch (cvar->c.type & (CVAR_BOOL|CVAR_INT|CVAR_UINT|CVAR_FLOAT|CVAR_DOUBLE|CVAR_STRING))
146
    {
148
    {
147
    case CVAR_BOOL:
149
    case CVAR_BOOL:
148
    case CVAR_INT:
150
    case CVAR_INT:
149
        return (cvar->dval.i != *(int32_t *)cvar->c.vptr);
151
        rv = (cvar->dval.i != *(int32_t *)cvar->c.vptr); break;
150
    case CVAR_UINT:
152
    case CVAR_UINT:
151
        return (cvar->dval.uint != *(uint32_t *)cvar->c.vptr);
153
        rv = (cvar->dval.uint != *(uint32_t *)cvar->c.vptr); break;
152
    case CVAR_FLOAT:
154
    case CVAR_FLOAT:
153
        return (cvar->dval.f != *(float *)cvar->c.vptr);
155
        rv = (cvar->dval.f != *(float *)cvar->c.vptr); break;
154
    case CVAR_DOUBLE:
156
    case CVAR_DOUBLE:
155
        return (cvar->dval.d != *(double *)cvar->c.vptr);
157
        rv = (cvar->dval.d != *(double *)cvar->c.vptr); break;
-
 
158
    case CVAR_STRING:
-
 
159
        rv = 1; break;
156
    default:
160
    default:
157
        EDUKE32_UNREACHABLE_SECTION(return 0);
161
        EDUKE32_UNREACHABLE_SECTION(break);
158
    }
162
    }
-
 
163
-
 
164
    return rv;
159
}
165
}
160
166
161
// color code format is as follows:
167
// color code format is as follows:
162
// ^## sets a color, where ## is the palette number
168
// ^## sets a color, where ## is the palette number
163
// ^S# sets a shade, range is 0-7 equiv to shades 0-14
169
// ^S# sets a shade, range is 0-7 equiv to shades 0-14