#define TYPE_GAME 2
#define TYPE_BOTH 3
-mempool_t *menu_mempool;
-
int NehGameType;
enum m_state_e m_state;
menuplyr_bottom = -1;
if ((f = FS_LoadFile("gfx/menuplyr.lmp", tempmempool, true)))
{
- data = LoadLMPAs8Bit (f, 0, 0);
+ data = LoadLMP (f, 0, 0, true);
menuplyr_width = image_width;
menuplyr_height = image_height;
Mem_Free(f);
- menuplyr_pixels = Mem_Alloc(menu_mempool, menuplyr_width * menuplyr_height);
- menuplyr_translated = Mem_Alloc(menu_mempool, menuplyr_width * menuplyr_height * 4);
+ menuplyr_pixels = Mem_Alloc(cl_mempool, menuplyr_width * menuplyr_height);
+ menuplyr_translated = Mem_Alloc(cl_mempool, menuplyr_width * menuplyr_height * 4);
memcpy(menuplyr_pixels, data, menuplyr_width * menuplyr_height);
Mem_Free(data);
}
M_Print(16, menu_height - 8, m_return_reason);
y = 48;
visible = (menu_height - 16 - y) / 8 / 2;
- start = bound(0, slist_cursor - (visible >> 1), hostcache_viewcount - visible);
- end = min(start + visible, hostcache_viewcount);
+ start = bound(0, slist_cursor - (visible >> 1), serverlist_viewcount - visible);
+ end = min(start + visible, serverlist_viewcount);
p = Draw_CachePic("gfx/p_multi.lmp");
M_DrawPic((640 - p->width) / 2, 4, "gfx/p_multi.lmp");
for (n = start;n < end;n++)
{
DrawQ_Fill(menu_x, menu_y + y, 640, 16, n == slist_cursor ? (0.5 + 0.2 * sin(realtime * M_PI)) : 0, 0, 0, 0.5, 0);
- M_Print(0, y, hostcache_viewset[n]->line1);y += 8;
- M_Print(0, y, hostcache_viewset[n]->line2);y += 8;
+ M_Print(0, y, serverlist_viewlist[n]->line1);y += 8;
+ M_Print(0, y, serverlist_viewlist[n]->line2);y += 8;
}
}
else if (realtime - masterquerytime < 3)
S_LocalSound ("sound/misc/menu1.wav");
slist_cursor--;
if (slist_cursor < 0)
- slist_cursor = hostcache_viewcount - 1;
+ slist_cursor = serverlist_viewcount - 1;
break;
case K_DOWNARROW:
case K_RIGHTARROW:
S_LocalSound ("sound/misc/menu1.wav");
slist_cursor++;
- if (slist_cursor >= hostcache_viewcount)
+ if (slist_cursor >= serverlist_viewcount)
slist_cursor = 0;
break;
case K_ENTER:
S_LocalSound ("sound/misc/menu2.wav");
- if (hostcache_viewcount)
- Cbuf_AddText(va("connect \"%s\"\n", hostcache_viewset[slist_cursor]->info.cname));
+ if (serverlist_viewcount)
+ Cbuf_AddText(va("connect \"%s\"\n", serverlist_viewlist[slist_cursor]->info.cname));
break;
default:
void M_Init (void)
{
- menu_mempool = Mem_AllocPool("Menu", 0, NULL);
menuplyr_load = true;
menuplyr_pixels = NULL;
{
// reset key_dest
key_dest = key_game;
-
- Mem_FreePool (&menu_mempool);
}
void M_Restart(void)
prog->error_cmd = MP_Error;
// allocate the mempools
- prog->edicts_mempool = Mem_AllocPool(M_NAME " edicts mempool", 0, NULL);
- prog->edictstring_mempool = Mem_AllocPool( M_NAME " edict string mempool", 0, NULL);
prog->progs_mempool = Mem_AllocPool(M_PROG_FILENAME, 0, NULL);
PRVM_LoadProgs(M_PROG_FILENAME, m_numrequiredfunc, m_required_func);