git-svn-id: https://svn.eduke32.com/eduke32@1195 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-12-28 23:27:24 +00:00
parent 380ad7f536
commit e56fc49d8e
13 changed files with 131 additions and 88 deletions

View file

@ -44,6 +44,9 @@ LIBS=vorbisfile_static.lib vorbis_static.lib ogg_static.lib $(LIBS)
ASFLAGS=/nologo /coff /c ASFLAGS=/nologo /coff /c
EXESUFFIX=.exe EXESUFFIX=.exe
!ifdef DEBUG
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS
!endif
JMACTOBJ=$(OBJ)\util_lib.$o \ JMACTOBJ=$(OBJ)\util_lib.$o \
$(OBJ)\file_lib.$o \ $(OBJ)\file_lib.$o \

View file

@ -32,7 +32,7 @@ TARGETOPTS=/DNOASM
!ifdef DEBUG !ifdef DEBUG
# debugging options # debugging options
flags_cl=/Ot /Zi flags_cl=/Ot /Zi
flags_link=/DEBUG flags_link=/DEBUG
!else !else
# release options # release options
@ -48,6 +48,9 @@ LINK=link /opt:nowin98 /opt:ref /nologo
CFLAGS=$(CFLAGS) /nologo /MD /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(DXROOT)\include /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" # /I$(ENETROOT)\include" CFLAGS=$(CFLAGS) /nologo /MD /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(DXROOT)\include /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" # /I$(ENETROOT)\include"
ASFLAGS=/nologo /coff /c ASFLAGS=/nologo /coff /c
EXESUFFIX=.exe EXESUFFIX=.exe
!ifdef DEBUG
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS
!endif
ENGINEOBJS= \ ENGINEOBJS= \
!ifdef NOASM !ifdef NOASM

View file

@ -77,7 +77,6 @@ extern "C" {
#pragma pack(push,1); #pragma pack(push,1);
#endif #endif
//ceilingstat/floorstat: //ceilingstat/floorstat:
// bit 0: 1 = parallaxing, 0 = not "P" // bit 0: 1 = parallaxing, 0 = not "P"
// bit 1: 1 = groudraw, 0 = not // bit 1: 1 = groudraw, 0 = not

View file

@ -76,6 +76,7 @@ extern int editorgridextent; // in engine.c
extern double msens; extern double msens;
int graphicsmode = 0; int graphicsmode = 0;
extern int xyaspect; extern int xyaspect;
extern int totalclocklock;
int synctics = 0, lockclock = 0; int synctics = 0, lockclock = 0;
@ -1622,15 +1623,15 @@ void overheadeditor(void)
i = yxaspect; i = yxaspect;
Bmemset(show2dsector, 255, sizeof(show2dsector)); Bmemset(show2dsector, 255, sizeof(show2dsector));
Bmemset(show2dwall, 255, sizeof(show2dwall));
Bmemset(show2dsprite, 255, sizeof(show2dsprite));
setview(0, 0, xdim-1, ydim16-1); setview(0, 0, xdim-1, ydim16-1);
yxaspect = xyaspect = 65536; yxaspect = xyaspect = 65536;
j = ydim; j = ydim;
ydim -= scale(128, ydim, 768); ydim -= scale((MAXYDIM/6), ydim, MAXYDIM);
if (graphicsmode == 2)
totalclocklock = totalclock;
drawmapview(posx, posy, zoom, 1536); drawmapview(posx, posy, zoom, 1536);
yxaspect = i; yxaspect = i;
@ -3071,6 +3072,7 @@ SKIP:
posx = mousxplc; posx = mousxplc;
posy = mousyplc; posy = mousyplc;
} }
_printmessage16("Zoom: %d",zoom);
} }
if ((keystatus[buildkeys[BK_MOVEDOWN]] || (bstatus&32)) && (zoom > 8)) if ((keystatus[buildkeys[BK_MOVEDOWN]] || (bstatus&32)) && (zoom > 8))
{ {
@ -3082,6 +3084,7 @@ SKIP:
posx = mousxplc; posx = mousxplc;
posy = mousyplc; posy = mousyplc;
} }
_printmessage16("Zoom: %d",zoom);
} }
if (zoom < 8) zoom = 8; if (zoom < 8) zoom = 8;
if (zoom > 16384) zoom = 16384; if (zoom > 16384) zoom = 16384;
@ -4162,8 +4165,18 @@ SKIP:
} }
else else
{ {
graphicsmode = !graphicsmode; if (keystatus[buildkeys[BK_RUN]])
printmessage16("2D mode textures %s",graphicsmode?"enabled":"disabled"); {
if (--graphicsmode < 0)
graphicsmode = 2;
}
else
{
if (++graphicsmode > 2)
graphicsmode = 0;
}
printmessage16("2D mode textures %s",
(graphicsmode == 2)?"enabled w/ animation":graphicsmode?"enabled":"disabled");
keystatus[0x0e] = 0; keystatus[0x0e] = 0;
} }
} }

View file

@ -4204,12 +4204,12 @@ static void fillpolygon(int npoints)
if (day2 > day1) if (day2 > day1)
{ {
x1 += mulscale12((day1<<12)+4095-y1,xinc); x1 += mulscale12((day1<<12)+4095-y1,xinc);
for (y=day1;y<day2;y++) { *dotp2[y]++ = (x1>>12); x1 += xinc; } for (y=day1;y<day2;y++) { if (!dotp2[y]) { x1 += xinc; continue; } *dotp2[y]++ = (x1>>12); x1 += xinc; }
} }
else else
{ {
x2 += mulscale12((day2<<12)+4095-y2,xinc); x2 += mulscale12((day2<<12)+4095-y2,xinc);
for (y=day2;y<day1;y++) { *dotp1[y]++ = (x2>>12); x2 += xinc; } for (y=day2;y<day1;y++) { if (!dotp1[y]) { x2 += xinc; continue; } *dotp1[y]++ = (x2>>12); x2 += xinc; }
} }
} }
} }
@ -11459,8 +11459,8 @@ int printext16(int xpos, int ypos, short col, short backcol, char *name, char fo
i++; i++;
if (name[i] == 'O') // ^O resets formatting if (name[i] == 'O') // ^O resets formatting
{ {
col = ocol; col = editorcolors[ocol];
backcol = obackcol; backcol = editorcolors[obackcol];
continue; continue;
} }
if (isdigit(name[i])) if (isdigit(name[i]))

View file

@ -391,7 +391,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
#endif #endif
// install signal handlers // install signal handlers
#if !defined(_MSC_VER) || !defined(DEBUGGINGAIDS)
signal(SIGSEGV, SignalHandler); signal(SIGSEGV, SignalHandler);
#endif
if (RegisterWindowClass()) return -1; if (RegisterWindowClass()) return -1;
@ -3345,7 +3347,9 @@ static int SetupOpenGL(int width, int height, int bitspp)
{ {
if (!Bstrcmp(glinfo.renderer,"Intel 865G")) if (!Bstrcmp(glinfo.renderer,"Intel 865G"))
err = 0; err = 0;
if (!Bstrcmp(glinfo.renderer,"Intel 945GM")) else if (!Bstrcmp(glinfo.renderer,"Intel 945GM"))
err = 0;
else if (!Bstrcmp(glinfo.renderer,"Intel 965/963 Graphics Media Accelerator"))
err = 0; err = 0;
else err = 1; else err = 1;
} }

View file

@ -7684,7 +7684,7 @@ int A_CheckSwitchTile(int i)
// ACCESSSWITCH and ACCESSSWITCH2 are only active in 1 state so deal with them separately // ACCESSSWITCH and ACCESSSWITCH2 are only active in 1 state so deal with them separately
if ((PN == ACCESSSWITCH) || (PN == ACCESSSWITCH2)) return 1; if ((PN == ACCESSSWITCH) || (PN == ACCESSSWITCH2)) return 1;
//loop to catch both states of switches //loop to catch both states of switches
for (j=0;j<=1;j++) for (j=1;j>=0;j--)
{ {
switch (DynamicTileMap[PN-j]) switch (DynamicTileMap[PN-j])
{ {
@ -7756,15 +7756,18 @@ void G_MoveWorld(void)
do do
{ {
i = headspritestat[k]; i = headspritestat[k];
if (i < 0) continue; while (i > 0)
do
{ {
if (A_CheckSpriteFlags(i,SPRITE_NOEVENTCODE))
{
i = nextspritestat[i];
continue;
}
j = nextspritestat[i]; j = nextspritestat[i];
pl=A_FindPlayer(&sprite[i],&p); pl=A_FindPlayer(&sprite[i],&p);
X_OnEvent(EVENT_GAME,i, pl, p); X_OnEvent(EVENT_GAME,i, pl, p);
i = j; i = j;
} }
while (i >= 0);
} }
while (k--); while (k--);
} }

View file

@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <shellapi.h> #include <shellapi.h>
#endif #endif
#define BUILDDATE " 20081219" #define BUILDDATE " 20081226"
#define VERSION " 1.2.0devel" #define VERSION " 1.2.0devel"
static int floor_over_floor; static int floor_over_floor;
@ -5908,12 +5908,14 @@ static void Keys3d(void)
{ {
if (repeatpanalign == 0) if (repeatpanalign == 0)
{ {
while (updownunits--)wall[searchwall].yrepeat = changechar(wall[searchwall].yrepeat,changedir,smooshyalign,1); while (updownunits--)
wall[searchwall].yrepeat = changechar(wall[searchwall].yrepeat,changedir,smooshyalign,1);
message("Wall %d repeat: %d, %d",searchwall,wall[searchwall].xrepeat,wall[searchwall].yrepeat); message("Wall %d repeat: %d, %d",searchwall,wall[searchwall].xrepeat,wall[searchwall].yrepeat);
} }
else else
{ {
while (updownunits--)wall[searchwall].ypanning = changechar(wall[searchwall].ypanning,changedir,smooshyalign,0); while (updownunits--)
wall[searchwall].ypanning = changechar(wall[searchwall].ypanning,changedir,smooshyalign,0);
message("Wall %d panning: %d, %d",searchwall,wall[searchwall].xpanning,wall[searchwall].ypanning); message("Wall %d panning: %d, %d",searchwall,wall[searchwall].xpanning,wall[searchwall].ypanning);
} }
} }
@ -5921,12 +5923,14 @@ static void Keys3d(void)
{ {
if (searchstat == 1) if (searchstat == 1)
{ {
while (updownunits--)sector[searchsector].ceilingypanning = changechar(sector[searchsector].ceilingypanning,changedir,smooshyalign,0); while (updownunits--)
sector[searchsector].ceilingypanning = changechar(sector[searchsector].ceilingypanning,changedir,smooshyalign,0);
message("Sector %d ceiling panning: %d, %d",searchsector,sector[searchsector].ceilingxpanning,sector[searchsector].ceilingypanning); message("Sector %d ceiling panning: %d, %d",searchsector,sector[searchsector].ceilingxpanning,sector[searchsector].ceilingypanning);
} }
else else
{ {
while (updownunits--)sector[searchsector].floorypanning = changechar(sector[searchsector].floorypanning,changedir,smooshyalign,0); while (updownunits--)
sector[searchsector].floorypanning = changechar(sector[searchsector].floorypanning,changedir,smooshyalign,0);
message("Sector %d floor panning: %d, %d",searchsector,sector[searchsector].floorxpanning,sector[searchsector].floorypanning); message("Sector %d floor panning: %d, %d",searchsector,sector[searchsector].floorxpanning,sector[searchsector].floorypanning);
} }
} }
@ -7225,6 +7229,11 @@ char vgapal16[4*256] =
*/ */
extern int getclosestcol(int r, int g, int b); extern int getclosestcol(int r, int g, int b);
vgapal16[9*4+0] = 63;
vgapal16[9*4+1] = 31;
vgapal16[9*4+2] = 7;
/* orange */ /* orange */
vgapal16[31*4+0] = 20; // blue vgapal16[31*4+0] = 20; // blue
vgapal16[31*4+1] = 45; // green vgapal16[31*4+1] = 45; // green
@ -8783,7 +8792,7 @@ void ExtPreCheckKeys(void) // just before drawrooms
{ {
for (i=0;i<numsprites;i++) for (i=0;i<numsprites;i++)
{ {
if ((sprite[i].cstat & 48) != 0) continue; if ((sprite[i].cstat & 48) != 0 || sprite[i].statnum == MAXSTATUS) continue;
picnum = sprite[i].picnum; picnum = sprite[i].picnum;
ang = flags = frames = shade = 0; ang = flags = frames = shade = 0;
@ -8856,9 +8865,12 @@ void ExtPreCheckKeys(void) // just before drawrooms
} }
} }
if (frames==2) picnum+=((((4-(totalclock>>5)))&1)*5); if (graphicsmode == 2)
if (frames==4) picnum+=((((4-(totalclock>>5)))&3)*5); {
if (frames==5) picnum+=(((totalclock>>5)%5))*5; if (frames==2) picnum+=((((4-(totalclock>>5)))&1)*5);
if (frames==4) picnum+=((((4-(totalclock>>5)))&3)*5);
if (frames==5) picnum+=(((totalclock>>5)%5))*5;
}
if (tilesizx[picnum] == 0) if (tilesizx[picnum] == 0)
picnum -= 5; //Hack, for actors picnum -= 5; //Hack, for actors
@ -8878,7 +8890,12 @@ void ExtPreCheckKeys(void) // just before drawrooms
shade = 6; shade = 6;
} }
rotatesprite((halfxdim16+xp1)<<16,(midydim16+yp1)<<16,zoom<<5,ang,picnum, xp1 += halfxdim16;
yp1 += midydim16;
if (xp1 < 4 || xp1 > xdim-6 || yp1 < 4 || yp1 > ydim16-6)
continue;
rotatesprite(xp1<<16,yp1<<16,zoom<<5,ang,picnum,
shade,sprite[i].pal,flags,0,0,xdim-1,ydim16-1); shade,sprite[i].pal,flags,0,0,xdim-1,ydim16-1);
} }
} }

View file

@ -850,7 +850,8 @@ enum SpriteFlags_t {
SPRITE_PROJECTILE = 8, SPRITE_PROJECTILE = 8,
SPRITE_DECAL = 16, SPRITE_DECAL = 16,
SPRITE_BADGUY = 32, SPRITE_BADGUY = 32,
SPRITE_NOPAL = 64 SPRITE_NOPAL = 64,
SPRITE_NOEVENTCODE = 128,
}; };
extern short SpriteCacheList[MAXTILES][3]; extern short SpriteCacheList[MAXTILES][3];

View file

@ -1211,12 +1211,12 @@ void faketimerhandler(void)
bufferjitter -= ((2 - i) >> 2); bufferjitter -= ((2 - i) >> 2);
} }
#else #else
if (((g_player[myconnectindex].movefifoend-1)&(TIMERUPDATESIZ-1)) == 0) if (((g_player[myconnectindex].movefifoend-1)&(TIMERUPDATESIZ-1)) == 0)
{ {
i = mymaxlag-bufferjitter; mymaxlag = 0; i = mymaxlag-bufferjitter; mymaxlag = 0;
if (i > 0) bufferjitter += ((3+i)>>2); if (i > 0) bufferjitter += ((3+i)>>2);
else if (i < 0) bufferjitter -= ((1-i)>>2); else if (i < 0) bufferjitter -= ((1-i)>>2);
} }
#endif #endif
if (g_networkBroadcastMode == 1) if (g_networkBroadcastMode == 1)
@ -1264,26 +1264,26 @@ void faketimerhandler(void)
g_player[i].myminlag = 0x7fffffff; g_player[i].myminlag = 0x7fffffff;
} }
#else #else
if (((g_player[myconnectindex].movefifoend-1)&(TIMERUPDATESIZ-1)) == 0) if (((g_player[myconnectindex].movefifoend-1)&(TIMERUPDATESIZ-1)) == 0)
{ {
if (myconnectindex != connecthead) if (myconnectindex != connecthead)
{ {
i = g_player[connecthead].myminlag-otherminlag; i = g_player[connecthead].myminlag-otherminlag;
if (klabs(i) > 8) i >>= 1; if (klabs(i) > 8) i >>= 1;
else if (klabs(i) > 2) i = ksgn(i); else if (klabs(i) > 2) i = ksgn(i);
else i = 0; else i = 0;
totalclock -= TICSPERFRAME*i; totalclock -= TICSPERFRAME*i;
g_player[connecthead].myminlag -= i; otherminlag += i; g_player[connecthead].myminlag -= i; otherminlag += i;
} }
if (myconnectindex == connecthead) if (myconnectindex == connecthead)
for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i]) for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
packbuf[j++] = min(max(g_player[i].myminlag,-128),127); packbuf[j++] = min(max(g_player[i].myminlag,-128),127);
for(i=connecthead;i>=0;i=connectpoint2[i]) for(i=connecthead;i>=0;i=connectpoint2[i])
g_player[i].myminlag = 0x7fffffff; g_player[i].myminlag = 0x7fffffff;
} }
#endif #endif
osyn = (input_t *)&inputfifo[(g_player[myconnectindex].movefifoend-2)&(MOVEFIFOSIZ-1)][myconnectindex]; osyn = (input_t *)&inputfifo[(g_player[myconnectindex].movefifoend-2)&(MOVEFIFOSIZ-1)][myconnectindex];
nsyn = (input_t *)&inputfifo[(g_player[myconnectindex].movefifoend-1)&(MOVEFIFOSIZ-1)][myconnectindex]; nsyn = (input_t *)&inputfifo[(g_player[myconnectindex].movefifoend-1)&(MOVEFIFOSIZ-1)][myconnectindex];

View file

@ -51,6 +51,7 @@ void X_ScriptInfo(void)
if (script) if (script)
{ {
intptr_t *p; intptr_t *p;
if (insptr)
for (p=insptr-20;p<insptr+20;p++) for (p=insptr-20;p<insptr+20;p++)
{ {
if (*p>>12&&(*p&0xFFF)<CON_END) if (*p>>12&&(*p&0xFFF)<CON_END)
@ -58,14 +59,15 @@ void X_ScriptInfo(void)
else else
initprintf(" %d",*p); initprintf(" %d",*p);
} }
initprintf("current actor: %d (%d)\n",g_i,g_sp->picnum); if (g_i)
initprintf("current actor: %d (%d)\n",g_i,g_sp->picnum);
initprintf("g_errorLineNum: %d, g_tw: %d\n",g_errorLineNum,g_tw); initprintf("g_errorLineNum: %d, g_tw: %d\n",g_errorLineNum,g_tw);
} }
} }
void X_OnEvent(int iEventID, int iActor, int iPlayer, int lDist) void X_OnEvent(int iEventID, int iActor, int iPlayer, int lDist)
{ {
if ((iEventID<0 || iEventID >= MAXGAMEEVENTS) && g_scriptSanityChecks) if (iEventID<0 || iEventID >= MAXGAMEEVENTS)
{ {
OSD_Printf(CON_ERROR "invalid event ID",g_errorLineNum,keyw[g_tw]); OSD_Printf(CON_ERROR "invalid event ID",g_errorLineNum,keyw[g_tw]);
return; return;

View file

@ -304,44 +304,41 @@ void Gv_WriteSave(FILE *fil)
void Gv_DumpValues(FILE *fp) void Gv_DumpValues(FILE *fp)
{ {
int i; int i;
if (!fp) if (!fp)
{
return; return;
}
fprintf(fp,"// Current Game Definitions\n\n"); fprintf(fp,"// Current Game Definitions\n\n");
for (i=0;i<g_gameVarCount;i++) for (i=0;i<g_gameVarCount;i++)
{ {
if (aGameVars[i].dwFlags & (GAMEVAR_SECRET)) if (aGameVars[i].dwFlags & (GAMEVAR_SECRET))
{
continue; // do nothing... continue; // do nothing...
}
else
{
fprintf(fp,"gamevar %s ",aGameVars[i].szLabel);
if (aGameVars[i].dwFlags & (GAMEVAR_INTPTR)) fprintf(fp,"gamevar %s ",aGameVars[i].szLabel);
fprintf(fp,"%d",*((int*)aGameVars[i].val.lValue));
else if (aGameVars[i].dwFlags & (GAMEVAR_SHORTPTR)) if (aGameVars[i].dwFlags & (GAMEVAR_INTPTR))
fprintf(fp,"%d",*((short*)aGameVars[i].val.lValue)); fprintf(fp,"%d",*((int*)aGameVars[i].val.lValue));
else if (aGameVars[i].dwFlags & (GAMEVAR_CHARPTR)) else if (aGameVars[i].dwFlags & (GAMEVAR_SHORTPTR))
fprintf(fp,"%d",*((char*)aGameVars[i].val.lValue)); fprintf(fp,"%d",*((short*)aGameVars[i].val.lValue));
else else if (aGameVars[i].dwFlags & (GAMEVAR_CHARPTR))
fprintf(fp,"%" PRIdPTR "",aGameVars[i].val.lValue); fprintf(fp,"%d",*((char*)aGameVars[i].val.lValue));
if (aGameVars[i].dwFlags & (GAMEVAR_PERPLAYER)) else
fprintf(fp," GAMEVAR_PERPLAYER"); fprintf(fp,"%" PRIdPTR "",aGameVars[i].val.lValue);
else if (aGameVars[i].dwFlags & (GAMEVAR_PERACTOR)) if (aGameVars[i].dwFlags & (GAMEVAR_PERPLAYER))
fprintf(fp," GAMEVAR_PERACTOR"); fprintf(fp," GAMEVAR_PERPLAYER");
else else if (aGameVars[i].dwFlags & (GAMEVAR_PERACTOR))
fprintf(fp," %d",aGameVars[i].dwFlags & (GAMEVAR_USER_MASK)); fprintf(fp," GAMEVAR_PERACTOR");
fprintf(fp," // "); else
if (aGameVars[i].dwFlags & (GAMEVAR_SYSTEM)) fprintf(fp," %d",aGameVars[i].dwFlags & (GAMEVAR_USER_MASK));
fprintf(fp," (system)"); fprintf(fp," // ");
if (aGameVars[i].dwFlags & (GAMEVAR_INTPTR|GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR)) if (aGameVars[i].dwFlags & (GAMEVAR_SYSTEM))
fprintf(fp," (pointer)"); fprintf(fp," (system)");
if (aGameVars[i].dwFlags & (GAMEVAR_READONLY)) if (aGameVars[i].dwFlags & (GAMEVAR_INTPTR|GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR))
fprintf(fp," (read only)"); fprintf(fp," (pointer)");
fprintf(fp,"\n"); if (aGameVars[i].dwFlags & (GAMEVAR_READONLY))
} fprintf(fp," (read only)");
fprintf(fp,"\n");
} }
fprintf(fp,"\n// end of game definitions\n"); fprintf(fp,"\n// end of game definitions\n");
} }
@ -465,10 +462,11 @@ int Gv_NewVar(const char *pszLabel, int lValue, unsigned int dwFlags)
Bstrcpy(aGameVars[i].szLabel,pszLabel); Bstrcpy(aGameVars[i].szLabel,pszLabel);
aGameVars[i].dwFlags=dwFlags; aGameVars[i].dwFlags=dwFlags;
if (aGameVars[i].val.plValues) if (aGameVars[i].dwFlags & GAMEVAR_USER_MASK)
{ {
// only free if not system // only free if not system
Bfree(aGameVars[i].val.plValues); if (aGameVars[i].val.plValues)
Bfree(aGameVars[i].val.plValues);
aGameVars[i].val.plValues=NULL; aGameVars[i].val.plValues=NULL;
} }
} }

View file

@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#include "duke3d.h" #include "duke3d.h"
const char *s_buildDate = "20081219"; const char *s_buildDate = "20081226";
char *MusicPtr = NULL; char *MusicPtr = NULL;
int g_musicSize; int g_musicSize;