Дополнение к статье "Добавляем третий логотип". Делать 4-ый логотип только после того, как сделаете 3-ий! Открываем Micro.java. Видим такие строки:
Code
public void init()
{
long l = 3000L;
Thread.yield();
m_di = new i(this);
Display.getDisplay(this).setCurrent(m_di);
m_di._doIV(1);
for(; !m_di.isShown(); _avJ());
long l2;
for(; l > 0L; l -= l2)
l2 = _avJ();
m_di._doIV(2);
long l3;
for(long l1 = 3000L; l1 > 0L; l1 -= l3)
l3 = _avJ();
while(m_longI < 10)
_avJ();
m_di._doIV(3);
long l4;
for(long l5 = 3000L; l5 > 0L; l5 -= l4)
l4 = _avJ();
while(m_longI < 10)
_avJ();
m_di._doIV(0);
m_intZ = true;
}
После:
Code
m_di._doIV(3);
long l4;
for(long l5 = 3000L; l5 > 0L; l5 -= l4)
l4 = _avJ();
while(m_longI < 10)
_avJ();
Добавляем:
Code
m_di._doIV(4);
long l5;
for(long l9 = 3000L; l9 > 0L; l9 -= l5)
l5 = _avJ();
while(m_longI < 10)
_avJ();
Можно изменить время показа каждой картинки, изменяя 3000L.
Теперь открываем i.java. После:
Code
public class i extends Canvas
implements CommandListener
{
Добавляем:
Code
private Image m_do4Image;
После
Code
public i(Micro micro)
{
Вставляем:
Добавляем
Code
m_do4Image = Image.createImage("/4logo.png");
К:
Code
try
{
m_pImage = Image.createImage("/splash.png");
m_abcImage = Image.createImage("/3logo.png");
m_doImage = Image.createImage("/logo.png");
}
После
Вставляем:
Находим
Code
if(m_oI == 1)
{
m_CGraphics.setColor(255, 255, 255);//Цвет фона 1 лого
m_CGraphics.fillRect(0, 0, getWidth(), getHeight());
if(m_doImage != null)
{
m_CGraphics.drawImage(m_doImage, getWidth() / 2, getHeight() / 2, 3);
_aGraphicsIIV(m_CGraphics, 16, getWidth() - m_FaI[16] - 5, getHeight() - m_tryaI[16] - 7);
_aGraphicsIIV(m_CGraphics, 17, getWidth() - m_FaI[17] - 4, getHeight() - m_tryaI[17] - m_tryaI[16] - 9);
}
}
if(m_oI == 2)
{
m_CGraphics.setColor(255, 255, 255);//Цвет фона 2 лого
m_CGraphics.fillRect(0, 0, getWidth(), getHeight());
if(m_pImage != null)
m_CGraphics.drawImage(m_pImage, getWidth() / 2, getHeight() / 2, 3);
}
if(m_oI == 3)
{
m_CGraphics.setColor(255, 255, 255);//Цвет фона 3 лого
m_CGraphics.fillRect(0, 0, getWidth(), getHeight());
if(m_abcImage != null)
m_CGraphics.drawImage(m_abcImage, getWidth() / 2, getHeight() / 2, 3);
}
int j = (int)(((long)(Micro.m_longI << 16) << 32) / 0xa0000L >> 16);
_aIZV(j, true);
Заменяем все это на:
Code
if(m_oI == 1)
{
m_CGraphics.setColor(255, 255, 255);//Цвет фона 1 лого
m_CGraphics.fillRect(0, 0, getWidth(), getHeight());
if(m_doImage != null)
{
m_CGraphics.drawImage(m_doImage, getWidth() / 2, getHeight() / 2, 3);
_aGraphicsIIV(m_CGraphics, 16, getWidth() - m_FaI[16] - 5, getHeight() - m_tryaI[16] - 7);
_aGraphicsIIV(m_CGraphics, 17, getWidth() - m_FaI[17] - 4, getHeight() - m_tryaI[17] - m_tryaI[16] - 9);
}
}
if(m_oI == 2)
{
m_CGraphics.setColor(255, 255, 255);//Цвет фона 2 лого
m_CGraphics.fillRect(0, 0, getWidth(), getHeight());
if(m_pImage != null)
m_CGraphics.drawImage(m_pImage, getWidth() / 2, getHeight() / 2, 3);
}
if(m_oI == 3)
{
m_CGraphics.setColor(255, 255, 255);//Цвет фона 3 лого
m_CGraphics.fillRect(0, 0, getWidth(), getHeight());
if(m_abcImage != null)
m_CGraphics.drawImage(m_abcImage, getWidth() / 2, getHeight() / 2, 3);
}
if(m_oI == 4)
{
m_CGraphics.setColor(255, 255, 255);//Цвет фона 4 лого
m_CGraphics.fillRect(0, 0, getWidth(), getHeight());
if(m_do4Image != null)
m_CGraphics.drawImage(m_do4Image, getWidth() / 2, getHeight() / 2, 3);
}
int j = (int)(((long)(Micro.m_longI << 16) << 32) / 0xa0000L >> 16);
_aIZV(j, true);
Также можно изменить цвет фона за логотипами, изменяя (255, 255, 255).
Вот и все. Теперь у вас будет 4 лого при загрузке игры. И еще, не забудьте загрузить 4logo.png в \res
Автор: Васяня & Alex55