Page 1 of 1

OMJ's code helping

PostPosted: 26 Dec 2016, 18:39
by Officer-Michael John
There is some code that I could not even not at all well to add. E.G:Parallax Sky.

Re: OMJ's code helping

PostPosted: 27 Dec 2016, 01:39
by linuxwolf
Enable it in version.h.

Re: OMJ's code helping

PostPosted: 27 Dec 2016, 13:03
by Officer-Michael John
I enabled. I don't know,that how to I can adding other parallax sky on level?

Re: OMJ's code helping

PostPosted: 27 Dec 2016, 13:57
by linuxwolf
I can't remember but I think one of the corner tiles controls which page(s) are used for parallax sky.

Re: OMJ's code helping

PostPosted: 27 Dec 2016, 16:27
by Officer-Michael John
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

Re: OMJ's code helping

PostPosted: 28 Dec 2016, 14:40
by Officer-Michael John
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? :(

Re: OMJ's code helping

PostPosted: 28 Dec 2016, 19:22
by Tricob1974
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.

Re: OMJ's code helping

PostPosted: 28 Dec 2016, 19:58
by Officer-Michael John
Okay. I write an other topics.

Re: OMJ's code helping

PostPosted: 29 Aug 2018, 16:00
by Officer-Michael John
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;                   

Re: OMJ's code helping

PostPosted: 31 Aug 2018, 22:31
by Tricob1974
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.

Re: OMJ's code helping

PostPosted: 01 Sep 2018, 13:52
by Officer-Michael John
Tricob1974 wrote:
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.


On old it was problem,that I did many topic. Then what I do,that I ask help?

Re: OMJ's code helping

PostPosted: 02 Sep 2018, 16:34
by Tricob1974
If you have asked for help but didn't get help, then you are on your own.

Re: OMJ's code helping

PostPosted: 02 Sep 2018, 17:32
by Officer-Michael John
Tricob1974 wrote:If you have asked for help but didn't get help, then you are on your own.


That's will be hard to Me. I added a 2nd player all work. But,the problem on a level I added 2nd Player then it didn't start with own pistol if I only die.