This commit is contained in:
parent
b36566b6c2
commit
46f936c1c4
@ -444,26 +444,21 @@ void CMapScene::renderChapterArrows()
|
|||||||
sb=CGameScene::getSpriteBank();
|
sb=CGameScene::getSpriteBank();
|
||||||
fh=sb->getFrameHeader(FRM__MAP_ARROW);
|
fh=sb->getFrameHeader(FRM__MAP_ARROW);
|
||||||
|
|
||||||
x=256;
|
|
||||||
if(m_currentChapterSelection>0&&isChapterOpen(m_currentChapterSelection-1))
|
if(m_currentChapterSelection>0&&isChapterOpen(m_currentChapterSelection-1))
|
||||||
{
|
{
|
||||||
int selected=false;
|
int scale;
|
||||||
y=MAP_ARROW_PREVIOUS_Y-fh->H;
|
scale=m_currentIconSelection==MAP_ICON_PREVIOUS_CHAPTER?383:256;
|
||||||
if(m_currentIconSelection==MAP_ICON_PREVIOUS_CHAPTER)
|
y=MAP_ARROW_PREVIOUS_Y-(fh->H/2);
|
||||||
{
|
x=256-(fh->W/2);
|
||||||
selected=true;
|
ft4=sb->printFT4Scaled(fh,x,y,0,0,0,scale);
|
||||||
}
|
|
||||||
ft4=sb->printFT4Scaled(fh,x,y,0,0,0,selected?512:256);
|
|
||||||
}
|
}
|
||||||
if(m_currentChapterSelection<5&&isChapterOpen(m_currentChapterSelection+1))
|
if(m_currentChapterSelection<5&&isChapterOpen(m_currentChapterSelection+1))
|
||||||
{
|
{
|
||||||
int selected=false;
|
int scale;
|
||||||
y=MAP_ARROW_NEXT_Y-fh->H;
|
scale=m_currentIconSelection==MAP_ICON_NEXT_CHAPTER?383:256;
|
||||||
if(m_currentIconSelection==MAP_ICON_NEXT_CHAPTER)
|
y=MAP_ARROW_NEXT_Y-(fh->H/2);
|
||||||
{
|
x=256-(fh->W/2);
|
||||||
selected=true;
|
ft4=sb->printFT4Scaled(fh,x,y,0,1,0,scale);
|
||||||
}
|
|
||||||
ft4=sb->printFT4Scaled(fh,x,y,0,1,0,selected?512:256);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -650,6 +645,11 @@ void CMapScene::think(int _frames)
|
|||||||
case MAP_ICON_PREVIOUS_CHAPTER:
|
case MAP_ICON_PREVIOUS_CHAPTER:
|
||||||
m_currentChapterSelection--;
|
m_currentChapterSelection--;
|
||||||
generateMapScreenImage();
|
generateMapScreenImage();
|
||||||
|
if(m_currentChapterSelection==0)
|
||||||
|
{
|
||||||
|
m_currentIconSelection=MAP_ICON_LEVEL_1;
|
||||||
|
m_pointerIcon->setTarget(getPointerTargetPosition());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MAP_ICON_LEVEL_1:
|
case MAP_ICON_LEVEL_1:
|
||||||
@ -675,6 +675,18 @@ void CMapScene::think(int _frames)
|
|||||||
case MAP_ICON_NEXT_CHAPTER:
|
case MAP_ICON_NEXT_CHAPTER:
|
||||||
m_currentChapterSelection++;
|
m_currentChapterSelection++;
|
||||||
generateMapScreenImage();
|
generateMapScreenImage();
|
||||||
|
if(m_currentChapterSelection==5||!isChapterOpen(m_currentChapterSelection+1))
|
||||||
|
{
|
||||||
|
for(int i=MAP_ICON_LEVEL_BONUS;i>MAP_ICON_LEVEL_1;i--)
|
||||||
|
{
|
||||||
|
if(isLevelOpen(m_currentChapterSelection,i-1))
|
||||||
|
{
|
||||||
|
m_currentIconSelection=i;
|
||||||
|
m_pointerIcon->setTarget(getPointerTargetPosition());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -714,7 +726,6 @@ void CMapScene::generateMapScreenImage()
|
|||||||
|
|
||||||
LZNP_Decode((u8*)m_packedBackgroundImage,(u8*)m_screenImage);
|
LZNP_Decode((u8*)m_packedBackgroundImage,(u8*)m_screenImage);
|
||||||
|
|
||||||
m_currentIconSelection=MAP_ICON_LEVEL_1;
|
|
||||||
for(i=0;i<MAP_NUM_LEVELS_PER_CHAPTER;i++)
|
for(i=0;i<MAP_NUM_LEVELS_PER_CHAPTER;i++)
|
||||||
{
|
{
|
||||||
if(isLevelOpen(m_currentChapterSelection,i))
|
if(isLevelOpen(m_currentChapterSelection,i))
|
||||||
@ -722,8 +733,6 @@ void CMapScene::generateMapScreenImage()
|
|||||||
copyImageToScreen(s_mapLevelData[m_currentChapterSelection][i].m_Gfx,s_mapLevelPositions[i].vx,s_mapLevelPositions[i].vy,MAP_LEVEL_WIDTH,MAP_LEVEL_HEIGHT);
|
copyImageToScreen(s_mapLevelData[m_currentChapterSelection][i].m_Gfx,s_mapLevelPositions[i].vx,s_mapLevelPositions[i].vy,MAP_LEVEL_WIDTH,MAP_LEVEL_HEIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pointerIcon->snapToTarget(getPointerTargetPosition());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ private:
|
|||||||
MAP_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT=10,
|
MAP_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT=10,
|
||||||
MAP_INSTRUCTIONS_Y_SPACE_BETWEEN_LINES=13,
|
MAP_INSTRUCTIONS_Y_SPACE_BETWEEN_LINES=13,
|
||||||
|
|
||||||
MAP_ARROW_PREVIOUS_Y=50,
|
MAP_ARROW_PREVIOUS_Y=45,
|
||||||
MAP_ARROW_NEXT_Y=190,
|
MAP_ARROW_NEXT_Y=180,
|
||||||
|
|
||||||
MAP_NUM_CHAPTERS=5,
|
MAP_NUM_CHAPTERS=5,
|
||||||
MAP_NUM_LEVELS_PER_CHAPTER=5,
|
MAP_NUM_LEVELS_PER_CHAPTER=5,
|
||||||
|
Loading…
Reference in New Issue
Block a user