Hendricks and I discussed "auto *" and we've come to the conclusion that it's bad form, so this corrects that.

git-svn-id: https://svn.eduke32.com/eduke32@7283 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-12-15 01:39:51 +00:00
parent 6258806a3a
commit 91096d2415
14 changed files with 84 additions and 84 deletions

View file

@ -71,7 +71,7 @@ static playbackstatus MV_GetNextVOCBlock(VoiceNode *voice)
return KeepPlaying; return KeepPlaying;
} }
auto *ptr = (uint8_t const *)voice->NextBlock; auto ptr = (uint8_t const *)voice->NextBlock;
voice->Paused = FALSE; voice->Paused = FALSE;

View file

@ -30,8 +30,8 @@
// 8-bit mono source, 16-bit mono output // 8-bit mono source, 16-bit mono output
void MV_Mix16BitMono(struct VoiceNode const * const voice, uint32_t length) void MV_Mix16BitMono(struct VoiceNode const * const voice, uint32_t length)
{ {
auto *const source = (uint8_t const *)voice->sound; auto const source = (uint8_t const *)voice->sound;
auto * dest = (int16_t *)MV_MixDestination; auto dest = (int16_t *)MV_MixDestination;
uint32_t position = voice->position; uint32_t position = voice->position;
uint32_t const rate = voice->RateScale; uint32_t const rate = voice->RateScale;
@ -54,8 +54,8 @@ void MV_Mix16BitMono(struct VoiceNode const * const voice, uint32_t length)
// 8-bit mono source, 16-bit stereo output // 8-bit mono source, 16-bit stereo output
void MV_Mix16BitStereo(struct VoiceNode const * const voice, uint32_t length) void MV_Mix16BitStereo(struct VoiceNode const * const voice, uint32_t length)
{ {
auto *const source = (uint8_t const *)voice->sound; auto const source = (uint8_t const *)voice->sound;
auto * dest = (int16_t *)MV_MixDestination; auto dest = (int16_t *)MV_MixDestination;
uint32_t position = voice->position; uint32_t position = voice->position;
uint32_t const rate = voice->RateScale; uint32_t const rate = voice->RateScale;
@ -80,8 +80,8 @@ void MV_Mix16BitStereo(struct VoiceNode const * const voice, uint32_t length)
// 16-bit mono source, 16-bit mono output // 16-bit mono source, 16-bit mono output
void MV_Mix16BitMono16(struct VoiceNode const * const voice, uint32_t length) void MV_Mix16BitMono16(struct VoiceNode const * const voice, uint32_t length)
{ {
auto *const source = (int16_t const *)voice->sound; auto const source = (int16_t const *)voice->sound;
auto * dest = (int16_t *)MV_MixDestination; auto dest = (int16_t *)MV_MixDestination;
uint32_t position = voice->position; uint32_t position = voice->position;
uint32_t const rate = voice->RateScale; uint32_t const rate = voice->RateScale;
@ -108,8 +108,8 @@ void MV_Mix16BitMono16(struct VoiceNode const * const voice, uint32_t length)
// 16-bit mono source, 16-bit stereo output // 16-bit mono source, 16-bit stereo output
void MV_Mix16BitStereo16(struct VoiceNode const * const voice, uint32_t length) void MV_Mix16BitStereo16(struct VoiceNode const * const voice, uint32_t length)
{ {
auto *const source = (int16_t const *)voice->sound; auto const source = (int16_t const *)voice->sound;
auto * dest = (int16_t *)MV_MixDestination; auto dest = (int16_t *)MV_MixDestination;
uint32_t position = voice->position; uint32_t position = voice->position;
uint32_t const rate = voice->RateScale; uint32_t const rate = voice->RateScale;
@ -139,8 +139,8 @@ void MV_Mix16BitStereo16(struct VoiceNode const * const voice, uint32_t length)
void MV_16BitReverb(char const *src, char *dest, const int16_t *volume, int32_t count) void MV_16BitReverb(char const *src, char *dest, const int16_t *volume, int32_t count)
{ {
auto *input = (uint16_t const *)src; auto input = (uint16_t const *)src;
auto *output = (int16_t *)dest; auto output = (int16_t *)dest;
do do
{ {

View file

@ -30,8 +30,8 @@
// 8-bit stereo source, 16-bit mono output // 8-bit stereo source, 16-bit mono output
void MV_Mix16BitMono8Stereo(struct VoiceNode const * const voice, uint32_t length) void MV_Mix16BitMono8Stereo(struct VoiceNode const * const voice, uint32_t length)
{ {
auto *const source = (uint8_t const *)voice->sound; auto const source = (uint8_t const *)voice->sound;
auto * dest = (int16_t *)MV_MixDestination; auto dest = (int16_t *)MV_MixDestination;
uint32_t position = voice->position; uint32_t position = voice->position;
uint32_t const rate = voice->RateScale; uint32_t const rate = voice->RateScale;
@ -56,8 +56,8 @@ void MV_Mix16BitMono8Stereo(struct VoiceNode const * const voice, uint32_t lengt
// 8-bit stereo source, 16-bit stereo output // 8-bit stereo source, 16-bit stereo output
void MV_Mix16BitStereo8Stereo(struct VoiceNode const * const voice, uint32_t length) void MV_Mix16BitStereo8Stereo(struct VoiceNode const * const voice, uint32_t length)
{ {
auto *const source = (uint8_t const *)voice->sound; auto const source = (uint8_t const *)voice->sound;
auto * dest = (int16_t *)MV_MixDestination; auto dest = (int16_t *)MV_MixDestination;
uint32_t position = voice->position; uint32_t position = voice->position;
uint32_t const rate = voice->RateScale; uint32_t const rate = voice->RateScale;
@ -83,8 +83,8 @@ void MV_Mix16BitStereo8Stereo(struct VoiceNode const * const voice, uint32_t len
// 16-bit stereo source, 16-bit mono output // 16-bit stereo source, 16-bit mono output
void MV_Mix16BitMono16Stereo(struct VoiceNode const * const voice, uint32_t length) void MV_Mix16BitMono16Stereo(struct VoiceNode const * const voice, uint32_t length)
{ {
auto *const source = (int16_t const *)voice->sound; auto const source = (int16_t const *)voice->sound;
auto * dest = (int16_t *)MV_MixDestination; auto dest = (int16_t *)MV_MixDestination;
uint32_t position = voice->position; uint32_t position = voice->position;
uint32_t const rate = voice->RateScale; uint32_t const rate = voice->RateScale;
@ -115,8 +115,8 @@ void MV_Mix16BitMono16Stereo(struct VoiceNode const * const voice, uint32_t leng
// 16-bit stereo source, 16-bit stereo output // 16-bit stereo source, 16-bit stereo output
void MV_Mix16BitStereo16Stereo(struct VoiceNode const * const voice, uint32_t length) void MV_Mix16BitStereo16Stereo(struct VoiceNode const * const voice, uint32_t length)
{ {
auto *const source = (int16_t const *)voice->sound; auto const source = (int16_t const *)voice->sound;
auto * dest = (int16_t *)MV_MixDestination; auto dest = (int16_t *)MV_MixDestination;
uint32_t position = voice->position; uint32_t position = voice->position;
uint32_t const rate = voice->RateScale; uint32_t const rate = voice->RateScale;

View file

@ -136,7 +136,7 @@ static void MV_GetVorbisCommentLoops(VoiceNode *voice, vorbis_comment *vc)
static size_t read_vorbis(void *ptr, size_t size, size_t nmemb, void *datasource) static size_t read_vorbis(void *ptr, size_t size, size_t nmemb, void *datasource)
{ {
auto *vorb = (vorbis_data *)datasource; auto vorb = (vorbis_data *)datasource;
errno = 0; errno = 0;
@ -169,7 +169,7 @@ static size_t read_vorbis(void *ptr, size_t size, size_t nmemb, void *datasource
static int seek_vorbis(void *datasource, ogg_int64_t offset, int whence) static int seek_vorbis(void *datasource, ogg_int64_t offset, int whence)
{ {
auto *vorb = (vorbis_data *)datasource; auto vorb = (vorbis_data *)datasource;
switch (whence) switch (whence)
{ {
@ -194,7 +194,7 @@ static int close_vorbis(void *datasource)
static long tell_vorbis(void *datasource) static long tell_vorbis(void *datasource)
{ {
auto *vorb = (vorbis_data *)datasource; auto vorb = (vorbis_data *)datasource;
return vorb->pos; return vorb->pos;
} }
@ -204,14 +204,14 @@ static ov_callbacks vorbis_callbacks = { read_vorbis, seek_vorbis, close_vorbis,
int32_t MV_GetVorbisPosition(VoiceNode *voice) int32_t MV_GetVorbisPosition(VoiceNode *voice)
{ {
auto * vd = (vorbis_data *) voice->rawdataptr; auto vd = (vorbis_data *) voice->rawdataptr;
return ov_pcm_tell(&vd->vf); return ov_pcm_tell(&vd->vf);
} }
void MV_SetVorbisPosition(VoiceNode *voice, int32_t position) void MV_SetVorbisPosition(VoiceNode *voice, int32_t position)
{ {
auto * vd = (vorbis_data *) voice->rawdataptr; auto vd = (vorbis_data *) voice->rawdataptr;
ov_pcm_seek(&vd->vf, position); ov_pcm_seek(&vd->vf, position);
} }
@ -227,7 +227,7 @@ static playbackstatus MV_GetNextVorbisBlock(VoiceNode *voice)
int bitstream; int bitstream;
int32_t bytesread = 0; int32_t bytesread = 0;
auto *vd = (vorbis_data *)voice->rawdataptr; auto vd = (vorbis_data *)voice->rawdataptr;
do do
{ {
#ifdef USING_TREMOR #ifdef USING_TREMOR
@ -370,7 +370,7 @@ int32_t MV_PlayVorbis(char *ptr, uint32_t length, int32_t loopstart, int32_t loo
return MV_Error; return MV_Error;
} }
auto *vd = (vorbis_data *)calloc(1, sizeof(vorbis_data)); auto vd = (vorbis_data *)calloc(1, sizeof(vorbis_data));
if (!vd) if (!vd)
{ {
@ -460,7 +460,7 @@ void MV_ReleaseVorbisVoice( VoiceNode * voice )
if (voice->wavetype != FMT_VORBIS) if (voice->wavetype != FMT_VORBIS)
return; return;
auto *vd = (vorbis_data *)voice->rawdataptr; auto vd = (vorbis_data *)voice->rawdataptr;
ov_clear(&vd->vf); ov_clear(&vd->vf);
free(vd); free(vd);

View file

@ -276,13 +276,13 @@ static void decodeSoundSectStereo(XASector *ssct, xa_data * xad)
int32_t MV_GetXAPosition(VoiceNode *voice) int32_t MV_GetXAPosition(VoiceNode *voice)
{ {
auto * xad = (xa_data *) voice->rawdataptr; auto xad = (xa_data *) voice->rawdataptr;
return xad->pos; return xad->pos;
} }
void MV_SetXAPosition(VoiceNode *voice, int32_t position) void MV_SetXAPosition(VoiceNode *voice, int32_t position)
{ {
auto * xad = (xa_data *) voice->rawdataptr; auto xad = (xa_data *) voice->rawdataptr;
if (position < XA_DATA_START || (size_t)position >= xad->length) if (position < XA_DATA_START || (size_t)position >= xad->length)
{ {
@ -304,7 +304,7 @@ static playbackstatus MV_GetNextXABlock
VoiceNode *voice VoiceNode *voice
) )
{ {
auto * xad = (xa_data *) voice->rawdataptr; auto xad = (xa_data *) voice->rawdataptr;
XASector ssct; XASector ssct;
int coding; int coding;
@ -477,7 +477,7 @@ int32_t MV_PlayXA(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend
void MV_ReleaseXAVoice( VoiceNode * voice ) void MV_ReleaseXAVoice( VoiceNode * voice )
{ {
auto * xad = (xa_data *) voice->rawdataptr; auto xad = (xa_data *) voice->rawdataptr;
if (voice->wavetype != FMT_XA) { if (voice->wavetype != FMT_XA) {
return; return;

View file

@ -20,19 +20,19 @@ typedef struct {
int32_t MV_GetXMPPosition(VoiceNode *voice) int32_t MV_GetXMPPosition(VoiceNode *voice)
{ {
auto * xmpd = (xmp_data *)voice->rawdataptr; auto xmpd = (xmp_data *)voice->rawdataptr;
return xmpd->time; return xmpd->time;
} }
void MV_SetXMPPosition(VoiceNode *voice, int32_t position) void MV_SetXMPPosition(VoiceNode *voice, int32_t position)
{ {
auto * xmpd = (xmp_data *)voice->rawdataptr; auto xmpd = (xmp_data *)voice->rawdataptr;
xmp_seek_time(xmpd->context, position); xmp_seek_time(xmpd->context, position);
} }
static playbackstatus MV_GetNextXMPBlock(VoiceNode *voice) static playbackstatus MV_GetNextXMPBlock(VoiceNode *voice)
{ {
auto * xmpd = (xmp_data *)voice->rawdataptr; auto xmpd = (xmp_data *)voice->rawdataptr;
struct xmp_frame_info mi; struct xmp_frame_info mi;
if (xmp_play_frame(xmpd->context) != 0) if (xmp_play_frame(xmpd->context) != 0)
@ -188,7 +188,7 @@ int32_t MV_PlayXMP(char *ptr, uint32_t length, int32_t loopstart, int32_t loopen
void MV_ReleaseXMPVoice(VoiceNode * voice) void MV_ReleaseXMPVoice(VoiceNode * voice)
{ {
auto * xmpd = (xmp_data *) voice->rawdataptr; auto xmpd = (xmp_data *) voice->rawdataptr;
if (voice->wavetype != FMT_XMP) if (voice->wavetype != FMT_XMP)
return; return;

View file

@ -64,7 +64,7 @@ static inline int64_t tabledivide64(int64_t const n, int32_t const d)
{ {
static libdivide_s64_t sdiv; static libdivide_s64_t sdiv;
static int32_t lastd; static int32_t lastd;
auto *const dptr = ((unsigned)d < DIVTABLESIZE) ? &divtable64[d] : &sdiv; auto const dptr = ((unsigned)d < DIVTABLESIZE) ? &divtable64[d] : &sdiv;
if (d == lastd || dptr != &sdiv) if (d == lastd || dptr != &sdiv)
goto skip; goto skip;
@ -78,7 +78,7 @@ static inline int32_t tabledivide32(int32_t const n, int32_t const d)
{ {
static libdivide_s32_t sdiv; static libdivide_s32_t sdiv;
static int32_t lastd; static int32_t lastd;
auto *const dptr = ((unsigned)d < DIVTABLESIZE) ? &divtable32[d] : &sdiv; auto const dptr = ((unsigned)d < DIVTABLESIZE) ? &divtable32[d] : &sdiv;
if (d == lastd || dptr != &sdiv) if (d == lastd || dptr != &sdiv)
goto skip; goto skip;

View file

@ -282,7 +282,7 @@ static int osdfunc_fileinfo(osdcmdptr_t parm)
int32_t siz = 0; int32_t siz = 0;
static constexpr int ReadSize = 65536; static constexpr int ReadSize = 65536;
auto *buf = (uint8_t *)Xmalloc(ReadSize); auto buf = (uint8_t *)Xmalloc(ReadSize);
do do
{ {
@ -1876,7 +1876,7 @@ void OSD_Dispatch(const char *cmd)
return; return;
} }
auto *name = token; auto name = token;
char const *parms[MAXPARMS] = {}; char const *parms[MAXPARMS] = {};
int numparms = 0; int numparms = 0;

View file

@ -374,7 +374,7 @@ void palettePostLoadTables(void)
void paletteFixTranslucencyMask(void) void paletteFixTranslucencyMask(void)
{ {
for (auto *thispalookup : palookup) for (auto thispalookup : palookup)
{ {
if (thispalookup == NULL) if (thispalookup == NULL)
continue; continue;
@ -385,7 +385,7 @@ void paletteFixTranslucencyMask(void)
// fix up translucency table so that transluc(255,x) // fix up translucency table so that transluc(255,x)
// and transluc(x,255) is black instead of purple. // and transluc(x,255) is black instead of purple.
for (auto *transluc : blendtable) for (auto transluc : blendtable)
{ {
if (transluc == NULL) if (transluc == NULL)
continue; continue;

View file

@ -282,8 +282,8 @@ void clearbuf(void *d, int32_t c, int32_t a)
#ifndef pragmas_have_copybuf #ifndef pragmas_have_copybuf
void copybuf(const void *s, void *d, int32_t c) void copybuf(const void *s, void *d, int32_t c)
{ {
auto *p = (const int32_t *) s; auto p = (const int32_t *) s;
auto *q = (int32_t *) d; auto q = (int32_t *) d;
while (c--) while (c--)
*q++ = *p++; *q++ = *p++;
@ -293,8 +293,8 @@ void copybuf(const void *s, void *d, int32_t c)
#ifndef pragmas_have_swaps #ifndef pragmas_have_swaps
void swapbuf4(void *a, void *b, int32_t c) void swapbuf4(void *a, void *b, int32_t c)
{ {
auto *p = (int32_t *) a; auto p = (int32_t *) a;
auto *q = (int32_t *) b; auto q = (int32_t *) b;
while ((c--) > 0) while ((c--) > 0)
{ {
@ -311,7 +311,7 @@ void clearbufbyte(void *D, int32_t c, int32_t a)
// Cringe City // Cringe City
constexpr int32_t m[4] = { 0xffl, 0xff00l, 0xff0000l, (int32_t)0xff000000l }; constexpr int32_t m[4] = { 0xffl, 0xff00l, 0xff0000l, (int32_t)0xff000000l };
int z = 0; int z = 0;
auto *p = (char *)D; auto p = (char *)D;
while ((c--) > 0) while ((c--) > 0)
{ {
@ -324,8 +324,8 @@ void clearbufbyte(void *D, int32_t c, int32_t a)
#ifndef pragmas_have_copybufbyte #ifndef pragmas_have_copybufbyte
void copybufbyte(const void *s, void *d, int32_t c) void copybufbyte(const void *s, void *d, int32_t c)
{ {
auto *src = (const char *)s; auto src = (const char *)s;
auto *dst = (char *)d; auto dst = (char *)d;
while (c--) while (c--)
*dst++ = *src++; *dst++ = *src++;
@ -378,8 +378,8 @@ void copybufreverse(const void *S, void *D, int32_t c)
#elif !defined pragmas_have_copybufreverse #elif !defined pragmas_have_copybufreverse
void copybufreverse(const void *s, void *d, int32_t c) void copybufreverse(const void *s, void *d, int32_t c)
{ {
auto *src = (const char *)s; auto src = (const char *)s;
auto *dst = (char *)d; auto dst = (char *)d;
while (c--) while (c--)
*dst++ = *src--; *dst++ = *src--;

View file

@ -6300,7 +6300,7 @@ void C_Compile(const char *fileName)
initprintf("Compiled %d bytes in %ums%s\n", (int)((intptr_t)g_scriptPtr - (intptr_t)apScript), initprintf("Compiled %d bytes in %ums%s\n", (int)((intptr_t)g_scriptPtr - (intptr_t)apScript),
timerGetTicks() - startcompiletime, C_ScriptVersionString(g_scriptVersion)); timerGetTicks() - startcompiletime, C_ScriptVersionString(g_scriptVersion));
for (auto *i : tables_free) for (auto i : tables_free)
hash_free(i); hash_free(i);
inthash_free(&h_varvar); inthash_free(&h_varvar);

View file

@ -103,7 +103,7 @@ void Gv_Clear(void)
for (auto & gameArray : aGameArrays) for (auto & gameArray : aGameArrays)
DO_FREE_AND_NULL(gameArray.szLabel); DO_FREE_AND_NULL(gameArray.szLabel);
for (auto *i : struct_tables) for (auto i : struct_tables)
hash_free(i); hash_free(i);
} }

View file

@ -366,7 +366,7 @@ static void ProcessGroups(CACHE1D_FIND_REC *srch)
static constexpr int ReadSize = 65536; static constexpr int ReadSize = 65536;
auto *buf = (uint8_t *)Xmalloc(ReadSize); auto buf = (uint8_t *)Xmalloc(ReadSize);
for (sidx = srch; sidx; sidx = sidx->next) for (sidx = srch; sidx; sidx = sidx->next)
{ {

View file

@ -2740,7 +2740,7 @@ static void Menu_PreInput(MenuEntry_t *entry)
case MENU_KEYBOARDKEYS: case MENU_KEYBOARDKEYS:
if (KB_KeyPressed(sc_Delete)) if (KB_KeyPressed(sc_Delete))
{ {
auto *column = (MenuCustom2Col_t*)entry->entry; auto column = (MenuCustom2Col_t*)entry->entry;
char key[2]; char key[2];
key[0] = ud.config.KeyboardKeys[M_KEYBOARDKEYS.currentEntry][0]; key[0] = ud.config.KeyboardKeys[M_KEYBOARDKEYS.currentEntry][0];
key[1] = ud.config.KeyboardKeys[M_KEYBOARDKEYS.currentEntry][1]; key[1] = ud.config.KeyboardKeys[M_KEYBOARDKEYS.currentEntry][1];
@ -2796,7 +2796,7 @@ static int32_t Menu_PreCustom2ColScreen(MenuEntry_t *entry)
{ {
if (g_currentMenu == MENU_KEYBOARDKEYS) if (g_currentMenu == MENU_KEYBOARDKEYS)
{ {
auto *column = (MenuCustom2Col_t*)entry->entry; auto column = (MenuCustom2Col_t*)entry->entry;
int32_t sc = KB_GetLastScanCode(); int32_t sc = KB_GetLastScanCode();
if (sc != sc_None) if (sc != sc_None)
@ -3909,7 +3909,7 @@ static void Menu_MaybeSetSelectionToChild(Menu_t * m, MenuID_t id)
{ {
if (m->type == Menu) if (m->type == Menu)
{ {
auto * menu = (MenuMenu_t *)m->object; auto menu = (MenuMenu_t *)m->object;
if (menu->currentEntry < menu->numEntries) if (menu->currentEntry < menu->numEntries)
{ {
@ -4072,7 +4072,7 @@ static void Menu_AboutToStartDisplaying(Menu_t * m)
break; break;
case Menu: case Menu:
{ {
auto *menu = (MenuMenu_t*)m->object; auto menu = (MenuMenu_t*)m->object;
// MenuEntry_t* currentry = menu->entrylist[menu->currentEntry]; // MenuEntry_t* currentry = menu->entrylist[menu->currentEntry];
// need this for MENU_SKILL // need this for MENU_SKILL
@ -4238,8 +4238,8 @@ int32_t Menu_IsTextInput(Menu_t *cm)
break; break;
case Menu: case Menu:
{ {
auto *menu = (MenuMenu_t *)cm->object; auto menu = (MenuMenu_t *)cm->object;
auto *entry = menu->entrylist[menu->currentEntry]; auto entry = menu->entrylist[menu->currentEntry];
return Menu_DetermineSpecialState(entry); return Menu_DetermineSpecialState(entry);
} }
break; break;
@ -4735,7 +4735,7 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
break; break;
case Option: case Option:
{ {
auto *object = (MenuOption_t*)entry->entry; auto object = (MenuOption_t*)entry->entry;
int32_t currentOption = Menu_FindOptionBinarySearch(object, object->data == NULL ? Menu_EntryOptionSource(entry, object->currentOption) : *object->data, 0, object->options->numOptions); int32_t currentOption = Menu_FindOptionBinarySearch(object, object->data == NULL ? Menu_EntryOptionSource(entry, object->currentOption) : *object->data, 0, object->options->numOptions);
if (currentOption >= 0) if (currentOption >= 0)
@ -4781,7 +4781,7 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
} }
case Custom2Col: case Custom2Col:
{ {
auto *object = (MenuCustom2Col_t*)entry->entry; auto object = (MenuCustom2Col_t*)entry->entry;
int32_t columnx[2] = { origin.x + x - ((status & MT_XRight) ? object->columnWidth : 0), origin.x + x + ((status & MT_XRight) ? 0 : object->columnWidth) }; int32_t columnx[2] = { origin.x + x - ((status & MT_XRight) ? object->columnWidth : 0), origin.x + x + ((status & MT_XRight) ? 0 : object->columnWidth) };
const int32_t columny = origin.y + y_upper + y - menu->scrollPos; const int32_t columny = origin.y + y_upper + y - menu->scrollPos;
@ -4855,7 +4855,7 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
} }
case RangeInt32: case RangeInt32:
{ {
auto *object = (MenuRangeInt32_t*)entry->entry; auto object = (MenuRangeInt32_t*)entry->entry;
int32_t s, p; int32_t s, p;
int32_t z = entry->font->cursorScale; int32_t z = entry->font->cursorScale;
@ -4954,7 +4954,7 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
} }
case RangeFloat: case RangeFloat:
{ {
auto *object = (MenuRangeFloat_t*)entry->entry; auto object = (MenuRangeFloat_t*)entry->entry;
int32_t s, p; int32_t s, p;
int32_t z = entry->font->cursorScale; int32_t z = entry->font->cursorScale;
@ -5154,7 +5154,7 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
#endif #endif
case String: case String:
{ {
auto *object = (MenuString_t*)entry->entry; auto object = (MenuString_t*)entry->entry;
vec2_t dim; vec2_t dim;
int32_t stringx = x; int32_t stringx = x;
@ -5440,7 +5440,7 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
{ {
case Verify: case Verify:
{ {
auto *object = (MenuVerify_t*)cm->object; auto object = (MenuVerify_t*)cm->object;
Menu_Pre(cm->menuID); Menu_Pre(cm->menuID);
@ -5455,7 +5455,7 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
case Message: case Message:
{ {
auto *object = (MenuMessage_t*)cm->object; auto object = (MenuMessage_t*)cm->object;
Menu_Pre(cm->menuID); Menu_Pre(cm->menuID);
@ -5470,7 +5470,7 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
case TextForm: case TextForm:
{ {
auto *object = (MenuTextForm_t*)cm->object; auto object = (MenuTextForm_t*)cm->object;
Menu_Pre(cm->menuID); Menu_Pre(cm->menuID);
@ -5505,7 +5505,7 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
case FileSelect: case FileSelect:
{ {
auto *object = (MenuFileSelect_t*)cm->object; auto object = (MenuFileSelect_t*)cm->object;
const int32_t MenuFileSelect_scrollbar_rightedge[2] = { 160<<16, 284<<16 }; const int32_t MenuFileSelect_scrollbar_rightedge[2] = { 160<<16, 284<<16 };
int32_t i, selected = 0; int32_t i, selected = 0;
@ -5629,7 +5629,7 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
case Panel: case Panel:
{ {
auto *object = (MenuPanel_t*)cm->object; auto object = (MenuPanel_t*)cm->object;
Menu_Pre(cm->menuID); Menu_Pre(cm->menuID);
@ -5650,7 +5650,7 @@ static void Menu_Run(Menu_t *cm, const vec2_t origin)
{ {
int32_t state; int32_t state;
auto *menu = (MenuMenu_t*)cm->object; auto menu = (MenuMenu_t*)cm->object;
MenuEntry_t *currentry = menu->entrylist[menu->currentEntry]; MenuEntry_t *currentry = menu->entrylist[menu->currentEntry];
state = Menu_DetermineSpecialState(currentry); state = Menu_DetermineSpecialState(currentry);
@ -5762,7 +5762,7 @@ static MenuEntry_t *Menu_RunInput_Menu_Movement(MenuMenu_t *menu, MenuMovement_t
static void Menu_RunInput_EntryLink_Activate(MenuEntry_t *entry) static void Menu_RunInput_EntryLink_Activate(MenuEntry_t *entry)
{ {
auto *link = (MenuLink_t*)entry->entry; auto link = (MenuLink_t*)entry->entry;
Menu_EntryLinkActivate(entry); Menu_EntryLinkActivate(entry);
@ -5888,7 +5888,7 @@ static int32_t Menu_RunInput_EntryOptionList_Activate(MenuEntry_t *entry, MenuOp
static void Menu_RunInput_EntryCustom2Col_Activate(MenuEntry_t *entry) static void Menu_RunInput_EntryCustom2Col_Activate(MenuEntry_t *entry)
{ {
auto *object = (MenuCustom2Col_t*)entry->entry; auto object = (MenuCustom2Col_t*)entry->entry;
Menu_Custom2ColScreen(/*entry*/); Menu_Custom2ColScreen(/*entry*/);
@ -6077,7 +6077,7 @@ static void Menu_RunInput_EntryRangeDouble_Movement(/*MenuEntry_t *entry, */Menu
static void Menu_RunInput_EntryString_Activate(MenuEntry_t *entry) static void Menu_RunInput_EntryString_Activate(MenuEntry_t *entry)
{ {
auto *object = (MenuString_t*)entry->entry; auto object = (MenuString_t*)entry->entry;
if (object->variable) if (object->variable)
strncpy(typebuf, object->variable, TYPEBUFSIZE); strncpy(typebuf, object->variable, TYPEBUFSIZE);
@ -6193,7 +6193,7 @@ static void Menu_RunInput(Menu_t *cm)
{ {
case Panel: case Panel:
{ {
auto *panel = (MenuPanel_t*)cm->object; auto panel = (MenuPanel_t*)cm->object;
if (I_ReturnTrigger() || Menu_RunInput_MouseReturn()) if (I_ReturnTrigger() || Menu_RunInput_MouseReturn())
{ {
@ -6224,7 +6224,7 @@ static void Menu_RunInput(Menu_t *cm)
case TextForm: case TextForm:
{ {
auto *object = (MenuTextForm_t*)cm->object; auto object = (MenuTextForm_t*)cm->object;
int32_t hitstate = I_EnterText(object->input, object->bufsize-1, 0); int32_t hitstate = I_EnterText(object->input, object->bufsize-1, 0);
if (hitstate == -1 || Menu_RunInput_MouseReturn()) if (hitstate == -1 || Menu_RunInput_MouseReturn())
@ -6252,7 +6252,7 @@ static void Menu_RunInput(Menu_t *cm)
case FileSelect: case FileSelect:
{ {
auto *object = (MenuFileSelect_t*)cm->object; auto object = (MenuFileSelect_t*)cm->object;
if (I_ReturnTrigger() || Menu_RunInput_MouseReturn()) if (I_ReturnTrigger() || Menu_RunInput_MouseReturn())
{ {
@ -6412,7 +6412,7 @@ static void Menu_RunInput(Menu_t *cm)
if (I_CheckAllInput()) if (I_CheckAllInput())
{ {
auto *message = (MenuMessage_t*)cm->object; auto message = (MenuMessage_t*)cm->object;
I_ClearAllInput(); I_ClearAllInput();
@ -6440,7 +6440,7 @@ static void Menu_RunInput(Menu_t *cm)
if (I_AdvanceTrigger() || KB_KeyPressed(sc_Y) || Menu_RunInput_MouseAdvance()) if (I_AdvanceTrigger() || KB_KeyPressed(sc_Y) || Menu_RunInput_MouseAdvance())
{ {
auto *verify = (MenuVerify_t*)cm->object; auto verify = (MenuVerify_t*)cm->object;
I_AdvanceTriggerClear(); I_AdvanceTriggerClear();
KB_ClearKeyDown(sc_Y); KB_ClearKeyDown(sc_Y);
@ -6460,7 +6460,7 @@ static void Menu_RunInput(Menu_t *cm)
{ {
int32_t state; int32_t state;
auto *menu = (MenuMenu_t*)cm->object; auto menu = (MenuMenu_t*)cm->object;
MenuEntry_t *currentry = menu->entrylist[menu->currentEntry]; MenuEntry_t *currentry = menu->entrylist[menu->currentEntry];
state = Menu_DetermineSpecialState(currentry); state = Menu_DetermineSpecialState(currentry);
@ -6488,7 +6488,7 @@ static void Menu_RunInput(Menu_t *cm)
break; break;
case Option: case Option:
{ {
auto *object = (MenuOption_t*)currentry->entry; auto object = (MenuOption_t*)currentry->entry;
if (currentry->flags & MEF_Disabled) if (currentry->flags & MEF_Disabled)
break; break;
@ -6544,7 +6544,7 @@ static void Menu_RunInput(Menu_t *cm)
break; break;
case RangeInt32: case RangeInt32:
{ {
auto *object = (MenuRangeInt32_t*)currentry->entry; auto object = (MenuRangeInt32_t*)currentry->entry;
if (currentry->flags & MEF_Disabled) if (currentry->flags & MEF_Disabled)
break; break;
@ -6569,7 +6569,7 @@ static void Menu_RunInput(Menu_t *cm)
} }
case RangeFloat: case RangeFloat:
{ {
auto *object = (MenuRangeFloat_t*)currentry->entry; auto object = (MenuRangeFloat_t*)currentry->entry;
if (currentry->flags & MEF_Disabled) if (currentry->flags & MEF_Disabled)
break; break;
@ -6689,7 +6689,7 @@ static void Menu_RunInput(Menu_t *cm)
{ {
if (currentry->type == String) if (currentry->type == String)
{ {
auto *object = (MenuString_t*)currentry->entry; auto object = (MenuString_t*)currentry->entry;
int32_t hitstate = I_EnterText(object->editfield, object->bufsize-1, object->flags); int32_t hitstate = I_EnterText(object->editfield, object->bufsize-1, object->flags);
@ -6713,7 +6713,7 @@ static void Menu_RunInput(Menu_t *cm)
{ {
if (currentry->type == Option) if (currentry->type == Option)
{ {
auto *object = (MenuOption_t*)currentry->entry; auto object = (MenuOption_t*)currentry->entry;
if (I_ReturnTrigger() || Menu_RunInput_MouseReturn()) if (I_ReturnTrigger() || Menu_RunInput_MouseReturn())
{ {