Третий логотип

Материал из Gravity Defied Wiki
Перейти к: навигация, поиск

Открываем Micro.java. Видим такие строки:

    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(0);
        m_intZ = true;
    }

После:

        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();

Можно изменить время показа каждой картинки, изменяя 3000L.

Теперь открываем i.java После

public class i extends Canvas
    implements CommandListener
{

Добавляем

    private Image m_abcImage;

После

    public i(Micro micro)
    {

Вставляем

        m_abcImage = null; 

Добавляем

            m_abcImage = Image.createImage("/3logo.png");

К

        try
        {
            m_pImage = Image.createImage("/splash.png");
            m_doImage = Image.createImage("/logo.png");
        }

После

        if(j == 0)
        {

Вставляем

            m_abcImage = null;

Находим

            if(m_oI == 1)
            {
                m_CGraphics.setColor(255, 255, 255);
                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);
                }
            } else
            {
                m_CGraphics.setColor(255, 255, 255);
                m_CGraphics.fillRect(0, 0, getWidth(), getHeight());
                if(m_pImage != null)
                    m_CGraphics.drawImage(m_pImage, getWidth() / 2, getHeight() / 2, 3);
            }
            int j = (int)(((long)(Micro.m_longI << 16) << 32) / 0xa0000L >> 16);
            _aIZV(j, true);

Заменяем все это на

            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);

Также можно изменить цвет фона за логотипами, изменяя (255, 255, 255).

Вот и все. Теперь у вас будет 3 лого при загрузке игры. И еще, не забудьте загрузить 3logo.png в \res


by alex55