• View unanswered postsView active topics

  • OMJ's code helping

    Discuss Wolf3D and Wolf3D modding/ports

    Postby Officer-Michael John 26 Dec 2016, 18:39

    There is some code that I could not even not at all well to add. E.G:Parallax Sky.
    Officer-Michael John
    User avatar

     
    Posts: 170
    Location: Hungary

        

    Postby linuxwolf 27 Dec 2016, 01:39

    Enable it in version.h.
    linuxwolf
    User avatar
    Team RayCast member
    Team RayCast member
     
    Posts: 5110
    Location: Australia

        

    Postby Officer-Michael John 27 Dec 2016, 13:03

    I enabled. I don't know,that how to I can adding other parallax sky on level?
    Officer-Michael John
    User avatar

     
    Posts: 170
    Location: Hungary

        

    Postby linuxwolf 27 Dec 2016, 13:57

    I can't remember but I think one of the corner tiles controls which page(s) are used for parallax sky.
    linuxwolf
    User avatar
    Team RayCast member
    Team RayCast member
     
    Posts: 5110
    Location: Australia

        

    Postby Officer-Michael John 27 Dec 2016, 16:27

    I tryed so adding:

    Code: Select all
    // The lower left tile of every map determines the start texture of the parallax sky.
    static int GetParallaxStartTexture()
    {
        int startTex = ffDataBottomLeft;
        assert(startTex >= 0 && startTex < 139);
        return startTex;
    }

    #else

    static int GetParallaxStartTexture()
    {
        int startTex;
        switch(gamestate.episode * 10 + mapon)
        {
            case  0: startTex = 139; break;
            default: startTex =  0; break;
        }
        assert(startTex >= 0 && startTex < 139);
        return startTex;
    }

    #endif
    Officer-Michael John
    User avatar

     
    Posts: 170
    Location: Hungary

        

    Postby Officer-Michael John 28 Dec 2016, 14:40

    There is an annoying problem. I like adding a custom palette,but I don't know adding because where once the error occurred (WDC). Where's the other error (NUMCHUNKS). How can this be corrected? :(
    Officer-Michael John
    User avatar

     
    Posts: 170
    Location: Hungary

        

    Postby Tricob1974 28 Dec 2016, 19:22

    OMJ, the Parallax Sky is turned on using something in the maps, not something in the source code. As for the palette problem, please start a different thread for that. Don't bounce from one topic to another in the same thread. It's confusing.
    Tricob1974
    Team RayCast member
    Team RayCast member
     
    Posts: 1388
    Location: Huntsville, Alabama

        

    Postby Officer-Michael John 28 Dec 2016, 19:58

    Okay. I write an other topics.
    Officer-Michael John
    User avatar

     
    Posts: 170
    Location: Hungary

        

    Postby Officer-Michael John 29 Aug 2018, 16:00

    On Simpsons mod I added double pistol. On Last image I see other weapon's image. I added an other attack code (I found on DHW). It works,but it doesn't fastly and progress as in series.

    WL_AGENT.CPP:

    Code: Select all
    { {5,0,1},{7,1,3},{3,0,2},{7,1,4},{3,-1,1} },

                    case -1:
                            ob->state = &s_player;
                            if (!gamestate.ammo && gamestate.weapon == wp_pistol ||
                                !gamestate.ammo && gamestate.weapon == wp_machinegun ||
                                !gamestate.ammo && gamestate.weapon == wp_chaingun ||
                                !gamestate.ammo && gamestate.weapon == wp_dpistol ||
                           !gamestate.shells && gamestate.weapon == wp_shotgun ||
                           !gamestate.shells && gamestate.weapon == wp_dshotgun ||
                                !gamestate.clip && gamestate.weapon == wp_assault)
                            {
                                    gamestate.weapon = gamestate.chosenweapon = wp_knife;
                                    DrawWeapon ();
                            }
                            else
                            {
    //                                if (gamestate.weapon != gamestate.chosenweapon)
    //                                {
                                            gamestate.weapon = gamestate.chosenweapon;
                                            DrawWeapon ();
    //                                }
                            }
                            gamestate.attackframe = gamestate.weaponframe = 0;
                            return;

                    case 4:
                    case 6:
                            if (!gamestate.ammo && !gamestate.shells && !gamestate.clip)
                                    break;
                            if (buttonstate[bt_attack])
                                    gamestate.attackframe -= 2;
                    case 1:
                    case 5:
                            if (!gamestate.ammo && gamestate.weapon == wp_pistol ||
                                !gamestate.ammo && gamestate.weapon == wp_machinegun ||
                                !gamestate.ammo && gamestate.weapon == wp_chaingun ||
                                !gamestate.ammo && gamestate.weapon == wp_dpistol ||
                           !gamestate.shells && gamestate.weapon == wp_shotgun ||
                           !gamestate.shells && gamestate.weapon == wp_dshotgun ||
                                !gamestate.clip && gamestate.weapon == wp_assault)
                            {       // can only happen with chain gun
                                    gamestate.attackframe++;
                                    break;
                            }
                            GunAttack (ob);
                            if (gamestate.chosenweapon == wp_pistol)
                            {
                                gamestate.ammo--;
                                DrawAmmo ();
                            }
                            if (gamestate.chosenweapon == wp_machinegun)
                            {
                                gamestate.ammo--;
                                DrawAmmo ();
                            }
                            if (gamestate.chosenweapon == wp_chaingun)
                            {
                                gamestate.ammo--;
                                DrawAmmo ();
                            }
                            if (gamestate.chosenweapon == wp_dpistol)
                            {
                                gamestate.ammo--;
                                DrawAmmo ();
                            }
                            if (gamestate.chosenweapon == wp_shotgun)
                            {
                                gamestate.shells--;
                                DrawAmmo ();
                            }
                            if (gamestate.chosenweapon == wp_dshotgun)
                            {
                                gamestate.shells--;
                                DrawAmmo ();
                            }
                            if (gamestate.chosenweapon == wp_assault)
                            {
                                gamestate.clip--;
                                DrawAmmo ();
                            }
                            break;

                    case 2:
                            KnifeAttack (ob);
                            break;

                    case 3:
                    case 7:
                            if (ChkAtkAmmo(gamestate.weapon) && buttonstate[bt_attack])
                                    gamestate.attackframe -= 2;
                            break;         
                       
                    case 8:       
                    case 9:
                            buttonstate[bt_attack] = false;
                            break;                       
                           
                    case 10:
                            SD_PlaySound (EVASND);
                            break;                   
    Officer-Michael John
    User avatar

     
    Posts: 170
    Location: Hungary

        

    Postby Tricob1974 31 Aug 2018, 22:31

    Tricob1974 wrote:Don't bounce from one topic to another in the same thread. It's confusing.
    Seeing as OMJ is disobeying this request, I encourage everyone to ignore this thread until he gets back on-topic. He can always create a new topic on this question if he wants an answer.
    Tricob1974
    Team RayCast member
    Team RayCast member
     
    Posts: 1388
    Location: Huntsville, Alabama

        

    Next

    Return to General Wolf3D/modding Discussion and tutorials


    Who is online

    Users browsing this forum: No registered users and 1 guest