Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 4988 → Rev 4989

/polymer/eduke32/source/game.c
60,6 → 60,10
#include "input.h"
#include "compat.h"
 
#ifdef __ANDROID__
#include "android.h"
#endif
 
#ifdef LUNATIC
# include "lunatic_game.h"
#endif
2884,6 → 2888,10
int32_t g_logoFlags = 255;
#endif
 
#ifdef __ANDROID__
int inExtraScreens = 0;
#endif
 
static void G_DisplayExtraScreens(void)
{
int32_t flags = G_GetLogoFlags();
2893,6 → 2901,9
 
if (!DUKEBETA && (!VOLUMEALL || flags & LOGO_SHAREWARESCREENS))
{
#ifdef __ANDROID__
inExtraScreens = 1;
#endif
setview(0,0,xdim-1,ydim-1);
flushperms();
//g_player[myconnectindex].ps->palette = palette;
2910,10 → 2921,17
fadepaltile(0,0,0, 63,0,-7,3290);
while (!I_CheckAllInput())
G_HandleAsync();
 
#ifdef __ANDROID__
inExtraScreens = 0;
#endif
}
 
if (flags & LOGO_TENSCREEN)
{
#ifdef __ANDROID__
inExtraScreens = 1;
#endif
setview(0,0,xdim-1,ydim-1);
flushperms();
//g_player[myconnectindex].ps->palette = palette;
2928,6 → 2946,9
 
fadepaltile(0,0,0, 0,63,7, TENSCREEN);
I_ClearAllInput();
#ifdef __ANDROID__
inExtraScreens = 0;
#endif
}
}
 
2976,8 → 2997,6
}
}
 
uninitgroupfile();
 
Bfflush(NULL);
 
exit(0);
3666,6 → 3685,9
}
else
{
#ifdef __ANDROID__
CONTROL_Android_ScrollMap(&ud.fola,& ud.folx,&ud.foly,&pp->zoom);
#else
if (!ud.pause_on)
{
ud.fola += ud.folavel>>3;
3672,6 → 3694,7
ud.folx += (ud.folfvel*sintable[(512+2048-ud.fola)&2047])>>14;
ud.foly += (ud.folfvel*sintable[(512+1024-512-ud.fola)&2047])>>14;
}
#endif
cposx = ud.folx;
cposy = ud.foly;
cang = ud.fola;
4413,6 → 4436,11
 
if (pub > 0 || getrendermode() >= REND_POLYMOST) // JBF 20040101: redraw background always
{
#ifdef __ANDROID__
// HACK: this is needed or else we get leftover UI texture crap where we'd get HOM on PC
clearallviews(0L);
#endif
 
#ifndef EDUKE32_TOUCH_DEVICES
if (ud.screen_size >= 8)
#endif
7502,8 → 7530,11
#endif
 
t->picnum = TILE_VIEWSCR;
t->xrepeat = t->xrepeat & 1 ? (t->xrepeat>>2) + 1 : t->xrepeat>>2;
t->yrepeat = t->yrepeat & 1 ? (t->yrepeat>>2) + 1 : t->yrepeat>>2;
 
#if VIEWSCREENFACTOR > 0
t->xrepeat = (t->xrepeat>>VIEWSCREENFACTOR) + (t->xrepeat & 1);
t->yrepeat = (t->yrepeat>>VIEWSCREENFACTOR) + (t->yrepeat & 1);
#endif
}
 
break;
9164,6 → 9195,18
if (ud.overhead_on == 3) ud.overhead_on = 0;
ud.last_overhead = ud.overhead_on;
}
 
#ifdef __ANDROID__
if (ud.overhead_on == 1)
ud.scrollmode = 0;
else if (ud.overhead_on == 2)
{
ud.scrollmode = 1;
ud.folx = g_player[screenpeek].ps->opos.x;
ud.foly = g_player[screenpeek].ps->opos.y;
ud.fola = g_player[screenpeek].ps->oang;
}
#endif
g_restorePalette = 1;
G_UpdateScreenArea();
}
10735,6 → 10778,7
G_Cleanup();
FreeGroups();
OSD_Cleanup();
uninitgroupfile();
Bfflush(NULL);
}
 
11067,7 → 11111,10
G_GameExit("Failed loading art.");
}
Bchdir(cwd);
#ifndef __ANDROID__ //This crashes on *some* Android devices. Small onetime memory leak. TODO fix above function
Bfree(cwd);
#endif
 
}
else if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
G_GameExit("Failed loading art.");
11409,7 → 11456,7
if (Bstrcmp(setupfilename, SETUPFILENAME))
initprintf("Using config file \"%s\".\n",setupfilename);
 
G_ExtPreStartupWindow();
G_ScanGroups();
 
#ifdef STARTUP_SETUP_WINDOW
if (i < 0 || (!g_noSetup && (ud.configversion != BYTEVERSION_JF || ud.config.ForceSetup)) || g_commandSetup)
11429,7 → 11476,7
}
 
flushlogwindow = 0;
G_ExtPostStartupWindow(!g_noAutoLoad && !ud.config.NoAutoLoad);
G_LoadGroups(!g_noAutoLoad && !ud.config.NoAutoLoad);
// flushlogwindow = 1;
 
if (!usecwd)