Wolf3d Haven Forum

Please log in or register. Smile

Join the forum, it's quick and easy

Wolf3d Haven Forum

Please log in or register. Smile

Wolf3d Haven Forum

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


2 posters

    OMJ‘s source code helping

    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty OMJ‘s source code helping

    Post by Officer-Michael John Sun Jan 17, 2016 1:09 am

    I need a source code helping:

    1.Sitting guard than in Western Wall 1 with 8 direction
    2.Dark making weapon than in Batman No Man‘s Land
    3.Ambient sound than in Batman VS Bane or Project:Eisenritter
    4.Drugs than in The Lost Relic (54-100%:damage,1-53%:health giving)
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sun Jan 17, 2016 2:40 am

    1. Code in a new state s_grdsit, copied from s_grdstand. Add 8 directional art to VSWAP and update wl_def.h with the relevant SPR_GRD_SIT_1, SPR_GRD_SIT_2, etc, enumeration constants.
    2. Why do you want this weapon?
    3. BvsB checks ceiling tile code when playing ambient sounds. Otherwise its just randomized sound play. To get ceiling tile code its MAPSPOT(x, y, 2) >> 8.
    4. Code in the new bonus item for drugs. Update T_Player() with call to TakeDamage() when drug takes effect. Use tic timers to control drug effect over time.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sun Jan 17, 2016 3:25 am

    1.Working than in Western Wall 1?
    2.EMP Gun
    3.In what file I adding?
    4.How to I adding on T_Player part?
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sun Jan 17, 2016 7:19 am

    1. Yes why not? I gave you the starting point. To me a sitting guard is the same as standing one, except different art.
    2. Adding dark shading is not a small effort. You better finish other tasks first.
    3. Add a new API call UpdateAmbient() to wl_play.cpp, PlayLoop() function after the loop processing DoActor(). It will run every frame.
    4. T_Player() is defined in wl_agent.cpp. Another way to implement this effect is spawn an invisible object with its own state. Then you don't need to do timer stuff.

    Code:
    namespace Drug          
    {  
        statetype s_idle = {false,SPR_DEMO,0,NULL,NULL,&s_idle};
        statetype s_effect = {false,SPR_DEMO,30,NULL,(statefunc)A_Effect,&s_effect};
        
        void A_Effect(objtype *ob)
        {                                                                          
            TakeDamage(10 + (US_RndT() % 10));                                    
        }                                                                          
            
        void Spawn(void)                                                          
        {                                                                          
            SpawnNewObj(0, 0, &s_idle);
            newobj->active = ac_yes;                                              
            newobj->flags |= FL_NEVERMARK;
        }                                                                          
            
        void A_Start(objtype *ob)
        {
            NewState(ob, &s_effect);
        }

        void A_Stop(objtype *ob)
        {  
            NewState(ob, &s_idle);
        }
    }

    You can make different types of drugs by making copies of that namespace.

    The same technique could be used to trigger ambient sounds.

    Code:
    namespace Ambient
    {
        statetype s_delay = {false,SPR_DEMO,240,NULL,(statefunc)A_Play,&s_delay};

        void A_Play(objtype *ob)
        { 
            if (US_RndT() < 32)
            { 
                SD_PlaySound (AMBIENTSND);
            }
        }

        void Spawn(void)
        { 
            SpawnNewObj(0, 0, &s_delay);
            newobj->active = ac_yes;
            newobj->flags |= FL_NEVERMARK;
        }
    }

    None of the code I have posted here has been tested or compiled.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sun Jan 17, 2016 8:44 am

    1.I get an errors
    2.I make an update
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sun Jan 17, 2016 9:02 am

    I didn't declare some functions before they were used but thats easily fixed.

    Good luck and have fun.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sun Jan 17, 2016 12:57 pm

    1.Why I get always an errors on compiled? [Linker error] ... s_grdstand X2
    3.How to adding a more Ambient sounds on level than in Project:Eisenritter (level 2)?
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Mon Jan 18, 2016 1:56 am

    1. You must have defined s_grdstand twice. Make sure you only have one s_grdstand in project.
    2. You can check the level number before spawning the Ambient object.

    Code:
    namespace Ambient
    {
        statetype s_delay = {false,SPR_DEMO,240,NULL,(statefunc)A_Play,&s_delay};

        void A_Play(objtype *ob)
        {
            if (US_RndT() < 32)
            {
                SD_PlaySound (AMBIENTSND);
            }
        }

        void Spawn(void)
        {
            SpawnNewObj(0, 0, &s_delay);
            newobj->active = ac_yes;
            newobj->flags |= FL_NEVERMARK;
        }

        bool CheckLevel(void)
        {
            return gamestate.mapon == 1;
        }
    }

    void InitActorList (void)
    {
        int i;

    //
    // init the actor lists
    //
        memset(objlist, 0, sizeof(objlist));
        objcount = 0;
        lastobjindex = 0;

    //
    // give the player the first free spots
    //
        GetNewActor ();
        player = newobj;

        if (Ambient::CheckLevel())
        {
            Ambient::Spawn();
        }
        Drug::Spawn();
    }
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Mon Jan 18, 2016 3:15 am

    I making:

    WL_ACT2.CPP:

    Code:
    extern  statetype s_grdsit;

    extern  statetype s_grdpath1;
    extern  statetype s_grdpath1s;
    extern  statetype s_grdpath2;
    extern  statetype s_grdpath3;
    extern  statetype s_grdpath3s;
    extern  statetype s_grdpath4;

    extern  statetype s_grdpain;
    extern  statetype s_grdpain1;

    extern  statetype s_grdgiveup;

    extern  statetype s_grdshoot1;
    extern  statetype s_grdshoot2;
    extern  statetype s_grdshoot3;
    extern  statetype s_grdshoot4;

    extern  statetype s_grdchase1;
    extern  statetype s_grdchase1s;
    extern  statetype s_grdchase2;
    extern  statetype s_grdchase3;
    extern  statetype s_grdchase3s;
    extern  statetype s_grdchase4;

    extern  statetype s_grddie1;
    extern  statetype s_grddie1d;
    extern  statetype s_grddie2;
    extern  statetype s_grddie3;
    extern  statetype s_grddie4;

    statetype s_grdsit              = {false,SPR_GRD_SIT_1,0,(statefunc)T_Stand,NULL,&s_grdsit};

    statetype s_grdpath1            = {true,SPR_GRD_W1_1,20,(statefunc)T_Path,NULL,&s_grdpath1s};
    statetype s_grdpath1s          = {true,SPR_GRD_W1_1,5,NULL,NULL,&s_grdpath2};
    statetype s_grdpath2            = {true,SPR_GRD_W2_1,15,(statefunc)T_Path,NULL,&s_grdpath3};
    statetype s_grdpath3            = {true,SPR_GRD_W3_1,20,(statefunc)T_Path,NULL,&s_grdpath3s};
    statetype s_grdpath3s          = {true,SPR_GRD_W3_1,5,NULL,NULL,&s_grdpath4};
    statetype s_grdpath4            = {true,SPR_GRD_W4_1,15,(statefunc)T_Path,NULL,&s_grdpath1};

    statetype s_grdpain            = {2,SPR_GRD_PAIN_1,10,NULL,NULL,&s_grdchase1};
    statetype s_grdpain1            = {2,SPR_GRD_PAIN_2,10,NULL,NULL,&s_grdchase1};

    statetype s_grdshoot1          = {false,SPR_GRD_SHOOT1,20,NULL,NULL,&s_grdshoot2};
    statetype s_grdshoot2          = {false,SPR_GRD_SHOOT2,20,NULL,(statefunc)T_Shoot,&s_grdshoot3};
    statetype s_grdshoot3          = {false,SPR_GRD_SHOOT3,20,NULL,NULL,&s_grdchase1};

    statetype s_grdchase1          = {true,SPR_GRD_W1_1,10,(statefunc)T_Chase,NULL,&s_grdchase1s};
    statetype s_grdchase1s          = {true,SPR_GRD_W1_1,3,NULL,NULL,&s_grdchase2};
    statetype s_grdchase2          = {true,SPR_GRD_W2_1,8,(statefunc)T_Chase,NULL,&s_grdchase3};
    statetype s_grdchase3          = {true,SPR_GRD_W3_1,10,(statefunc)T_Chase,NULL,&s_grdchase3s};
    statetype s_grdchase3s          = {true,SPR_GRD_W3_1,3,NULL,NULL,&s_grdchase4};
    statetype s_grdchase4          = {true,SPR_GRD_W4_1,8,(statefunc)T_Chase,NULL,&s_grdchase1};

    statetype s_grddie1            = {false,SPR_GRD_DIE_1,15,NULL,(statefunc)A_DeathScream,&s_grddie2};
    statetype s_grddie2            = {false,SPR_GRD_DIE_2,15,NULL,NULL,&s_grddie3};
    statetype s_grddie3            = {false,SPR_GRD_DIE_3,15,NULL,NULL,&s_grddie4};
    statetype s_grddie4            = {false,SPR_GRD_DEAD,0,NULL,NULL,&s_grddie4};

    void SpawnStand (enemy_t which, int tilex, int tiley, int dir)
    {
        word *map;
        word tile;

        switch (which)
        {
            case en_guard:
                SpawnNewObj (tilex,tiley,&s_grdsit);
                newobj->speed = SPDPATROL;
                if (!loadedgame)
                    gamestate.killtotal++;
                break;
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Mon Jan 18, 2016 4:38 am

    Code:
    extern  statetype s_grdstand;
    extern  statetype s_grdsit;

    statetype s_grdstand            = {true,SPR_GRD_S_1,0,(statefunc)T_Stand,NULL,&s_grdstand};
    statetype s_grdsit              = {true,SPR_GRD_SIT_1,0,(statefunc)T_Stand,NULL,&s_grdsit};

    void SpawnStand (enemy_t which, int tilex, int tiley, int dir)
    {
        const bool isSitting = ((tilex + tiley) & 1) != 0;

        switch (which)
        {
            case en_guard:
                SpawnNewObj (tilex,tiley,
                    isSitting ? &s_grdsit : &s_grdstand);
                newobj->speed = SPDPATROL;
                if (!loadedgame)
                    gamestate.killtotal++;
                break;
        }

        // ...
    }

    Try it. Depending where you place object, guard will be sitting or standing. Don't delete s_grdstand.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Mon Jan 18, 2016 11:33 am

    1. I like it a sitting guard with 8 direction and if the guards watching a BJ and then standing up dropping a chair (Itemtype, tilex, tiley) than in Western Wall 1.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Mon Jan 18, 2016 11:59 am

    I will help you with it in my next post.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Mon Jan 18, 2016 2:41 pm

    Code:
    void T_Stand (objtype *ob)
    {
        if (SightPlayer (ob))
        {
            const bool isSitting = ((ob->tilex + ob->tiley) & 1) != 0;
            if (isSitting)
            {
                PlaceItemType(bo_chair, ob->tilex, ob->tiley);
            }
        }
    }
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Thu Jan 21, 2016 3:03 am

    1.Working
    5. How to adding in good an Armor (Takedamage part) in Wolf4SDL than in Batman No Man's Land?

    I use a BrotherTank's Armor routine with God mode cheat:

    Code:
    void TakeDamage (int points,objtype *attacker)
    {
        int hpoints;
        LastAttacker = attacker;
        if (gamestate.victoryflag) return;
        if (gamestate.difficulty==gd_baby) points>>=2;
       
        if (!godmode)
        {
          if (gamestate.armor >=1)
            {
              hpoints = (gamestate.armor * points) / 100;
              points -= hpoints;
              gamestate.armor -=hpoints;
              if (gamestate.armor < 0 ) gamestate.armor = 0;
              DrawWeapon (); // Your routine to update armors value on status bar
            }
          gamestate.health -= points;
          StartDamageFlash (points);
      }

        if (gamestate.health<=0)
        {
            gamestate.health = 0;
            playstate = ex_died;
            killerobj = attacker;
        }

        if (godmode != 2)
            StartDamageFlash (points);

        DrawHealth ();
        DrawFace ();

        //
        // MAKE BJ'S EYES BUG IF MAJOR DAMAGE!
        //
    #ifdef SPEAR
        if (points > 30 && gamestate.health!=0 && !godmode && viewsize != 21)
        {
            StatusDrawFace(BJOUCHPIC);
            facecount = 0;
        }
    #endif
    }

    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Thu Jan 21, 2016 3:35 am

    NML code:

    Code:
    void TakeDamage (int points,objtype *attacker)
    {
        int damage;

        LastAttacker = attacker;

        if (gamestate.victoryflag)
            return;
        if (gamestate.difficulty==gd_baby)
        {
            if (points != 0)
            {
                points = (points >= 4 ? points >> 2 : 1);
            }
        }

        if (!godmode)
        {
            if (gamestate.armor > 0)
            {
                const int ARMOR_PROTECTION = 65;
                if (points >= gamestate.armor)
                {
                    gamestate.health -= (gamestate.armor * (100 - ARMOR_PROTECTION)) / 100;
                    points -= gamestate.armor;
                    gamestate.armor = 0;
                }
                else // points < gamestate.armor
                {
                    damage = (points * (100 - ARMOR_PROTECTION)) / 100;
                    damage = (damage > 0 ? damage : 1);
                    gamestate.health -= damage;
                    gamestate.armor -= points;
                    points = 0;
                }
                DrawScore (); // draws armor

                gamestate.health -= points;
            }
            else
            {
                gamestate.health -= points;
            }
        }

        if (gamestate.health<=0)
        {
            gamestate.health = 0;
            playstate = ex_died;
            killerobj = attacker;
        }

        if (godmode != 2)
        {
            StartDamageFlash (points);
        }

        DrawHealth ();
        DrawFace ();

        //
        // MAKE BJ'S EYES BUG IF MAJOR DAMAGE!
        //
    #ifdef SPEAR
        if (points > 30 && gamestate.health!=0 && !godmode && viewsize < 21)
        {
            StatusDrawFace(BJOUCHPIC);
            facecount = 0;
        }
    #endif
    }
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Thu Jan 21, 2016 8:05 am

    3. I added an Ambient sound function,nut I get an errors on compiled:

    Code:
    /*
    ===================
    =
    = PlayLoop
    =
    ===================
    */
    int32_t funnyticount;


    void PlayLoop (void)
    {
    #if defined(USE_FEATUREFLAGS) && defined(USE_CLOUDSKY)
        if(GetFeatureFlags() & FF_CLOUDSKY)
            InitSky();
    #endif

    #ifdef USE_SHADING
        InitLevelShadeTable();
    #endif

        playstate = ex_stillplaying;
        lasttimecount = GetTimeCount();
        frameon = 0;
        anglefrac = 0;
        facecount = 0;
        funnyticount = 0;
        memset (buttonstate, 0, sizeof (buttonstate));
        ClearPaletteShifts ();

        if (MousePresent && IN_IsInputGrabbed())
            IN_CenterMouse();        // Clear accumulated mouse movement

        if (demoplayback)
            IN_StartAck ();

        do
        {
            PollControls ();

    //
    // actor thinking
    //
            madenoise = false;

            MoveDoors ();
            MovePWalls ();

            for (obj = player; obj; obj = obj->next)
                DoActor (obj);

            UpdatePaletteShifts ();

            ThreeDRefresh ();

            //
            // MAKE FUNNY FACE IF BJ DOESN'T MOVE FOR AWHILE
            //
    #ifdef SPEAR
            funnyticount += tics;
            if (funnyticount > 30l * 70)
            {
                funnyticount = 0;
                if(viewsize != 21)
                    StatusDrawFace(BJWAITING1PIC + (US_RndT () & 1));
                facecount = 0;
            }
    #endif

            gamestate.TimeCount += tics;

            UpdateSoundLoc ();      // JAB
            if (screenfaded)
                VW_FadeIn ();

            CheckKeys ();

    //
    // debug aids
    //
            if (singlestep)
            {
                VW_WaitVBL (singlestep);
                lasttimecount = GetTimeCount();
            }
            if (extravbls)
                VW_WaitVBL (extravbls);

            if (demoplayback)
            {
                if (IN_CheckAck ())
                {
                    IN_ClearKeysDown ();
                    playstate = ex_abort;
                }
            }
        }
        while (!playstate && !startgame);

        if (playstate != ex_died)
            FinishPaletteShifts ();
    }

    //
    // ambient sound
    //
    namespace Ambient
    {
        statetype s_delay = {false,SPR_DEMO,240,NULL,(statefunc)A_Play,&s_delay};

        void A_Play(objtype *ob)
        {
            if (US_RndT() < 32)
            {
                SD_PlaySound (DEATHSCREAM4SND);
            }
        }

        void Spawn(void)
        {
            SpawnNewObj(0, 0, &s_delay);
            newobj->active = ac_yes;
            newobj->flags |= FL_NEVERMARK;
        }

        bool CheckLevel(void)
        {
            return gamestate.episode == 0 && mapon == 0;
        }
    }

    void InitActorList (void)
    {
        int i;

    //
    // init the actor lists
    //
        memset(objlist, 0, sizeof(objlist));
        objcount = 0;
        lastobjindex = 0;

    //
    // give the player the first free spots
    //
        GetNewActor ();
        player = newobj;

        if (Ambient::CheckLevel())
        {
            Ambient::Spawn();
        }
    }
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Thu Jan 21, 2016 11:55 am

    Paste errors please.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Thu Jan 21, 2016 12:14 pm

    Here it is the errors:

    1367 61 D:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp 'A_Play' was not declared in this scope 
      D:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp In function 'void InitActorList()': 
    1390 6 D:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp redefinition of 'void InitActorList()' 
    793 6 D:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp 'void InitActorList()' previously defined here 
    1399 5 D:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp 'lastobjindex' was not declared in this scope 
      D:\Wolf 3D mods\The Big Fight Beinning\Makefile.win [Build Error]  [wl_play.o] Error 1
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Fri Jan 22, 2016 12:44 am

    Code:
    namespace Ambient
    {
        void A_Play(objtype *ob);

        statetype s_delay = {false,SPR_DEMO,240,NULL,(statefunc)A_Play,&s_delay};

        void A_Play(objtype *ob)
        {
            if (US_RndT() < 32)
            {
                SD_PlaySound (AMBIENTSND);
            }
        }

        void Spawn(void)
        {
            SpawnNewObj(0, 0, &s_delay);
            newobj->active = ac_yes;
            newobj->flags |= FL_NEVERMARK;
        }

        bool CheckLevel(void)
        {
            return gamestate.mapon == 1;
        }
    }

    void InitActorList (void)
    {
        int i;

    //
    // init the actor lists
    //
        memset(objlist, 0, sizeof(objlist));
        objcount = 0;

    //
    // give the player the first free spots
    //
        GetNewActor ();
        player = newobj;

        if (Ambient::CheckLevel())
        {
            Ambient::Spawn();
        }
        Drug::Spawn();
    }

    Also, DONT add InitActorList(). MODIFY existing one by adding this:

    Code:
        if (Ambient::CheckLevel())
        {
            Ambient::Spawn();
        }
        Drug::Spawn();
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Fri Jan 22, 2016 1:49 am

    I get now an errors:

     F:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp In function `void InitActorList()': 
    1393 F:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp redefinition of `void InitActorList()' 
    794 F:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp `void InitActorList()' previously defined here 
    1412 F:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp `Drug' has not been declared 
    1412 F:\Wolf 3D mods\The Big Fight Beinning\wl_play.cpp `Spawn' undeclared (first use this function) 
      (Each undeclared identifier is reported only once for each function it appears in.) 
     F:\Wolf 3D mods\The Big Fight Beinning\Makefile.win [Build Error]  [wl_play.o] Error 1
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Fri Jan 22, 2016 2:43 am

    You need to think about what the code is doing. Those errors are easy to fix.


    Hint. add this to wl_def.h:

    Code:
    namespace Ambient
    {
        void Spawn(void);

        bool CheckLevel(void);
    }

    Also, you didn't take my advice. You have TWO InitActorList() in same file. This is wrong coding.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Fri Jan 22, 2016 3:31 am

    Then how to I doing?
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Fri Jan 22, 2016 1:38 pm

    Could you please place your project on bitbucket and give me access? Its free.

    my email is linuxwolf6@gmail.com. Thanks.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sat Jan 23, 2016 1:47 am

    I send to you a my mod. And you fixed please a mounted weapon,portable medikit pic than in Operation:Eisenfaust Origins.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sat Jan 23, 2016 1:56 am

    It will be much easier to collaborate on bitbucket. Please learn it.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sat Jan 23, 2016 1:06 pm

    You know fixing an errors?
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sat Jan 23, 2016 3:18 pm

    Okay I'm not helping you because you didn't take my advice regarding bitbucket. Done.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sat Jan 23, 2016 9:19 pm

    I don‘t know how to using a Bitbucket. I know using a Dropbox. Because share easy as on Bitbucket. Me need a you helping. Because I don‘t know fixing a problem.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sat Jan 23, 2016 10:20 pm

    Sorry I can't help.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sun Jan 24, 2016 12:23 pm

    Because you work on team mod? I don‘t like quarring with you. I need a source code helps because I alone don‘t fixing an errors. Unfortunately. Sad
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sun Jan 24, 2016 2:51 pm

    If I have to code in your mod then the least you could do is make it easy for me by using git and bitbucket. Last time I tried to use dropbox with you the mod crashed and I couldn't fix it. Don't want to waste another couple days on that approach.

    I also work on team mods, yes. Very busy already. I think you're better off trying to figure it out yourself. I already gave you lots of help and pointers.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sun Jan 24, 2016 11:12 pm

    You're right.You also need to fix the errors. The only reason I ask for your help sometimes because Andy had disappeared and no one knows what happened to him. Help me with the coding? For I could facilitate your job. I am happy to help others if you need it.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Mon Jan 25, 2016 12:19 am

    I don't really need to do anything actually. I will not fix your errors. I am only giving advice, nothing more. First you need to make your files available on bitbucket if you want my help. Otherwise forget it.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sat Jan 30, 2016 3:13 am

    I gave it to an Ambient sounds in WL_PLAY.CPP:

    What problem?

    Code:
    /*
    ===================
    =
    = PlayLoop
    =
    ===================
    */
    int32_t funnyticount;
    int32_t ambientcount;


    void PlayLoop (void)
    {
    #if defined(USE_FEATUREFLAGS) && defined(USE_CLOUDSKY)
        if(GetFeatureFlags() & FF_CLOUDSKY)
            InitSky();
    #endif

    #ifdef USE_SHADING
        InitLevelShadeTable();
    #endif

        playstate = ex_stillplaying;
        lasttimecount = GetTimeCount();
        frameon = 0;
        anglefrac = 0;
        facecount = 0;
        funnyticount = 0;
        memset (buttonstate, 0, sizeof (buttonstate));
        ClearPaletteShifts ();

        if (MousePresent && IN_IsInputGrabbed())
            IN_CenterMouse();        // Clear accumulated mouse movement

        if (demoplayback)
            IN_StartAck ();

        do
        {
            PollControls ();

    //
    // actor thinking
    //
            madenoise = false;

            MoveDoors ();
            MovePWalls ();

            for (obj = player; obj; obj = obj->next)
                DoActor (obj);           

            UpdatePaletteShifts ();

            ThreeDRefresh ();

            //
            // MAKE FUNNY FACE IF BJ DOESN'T MOVE FOR AWHILE
            //
    #ifdef SPEAR
            funnyticount += tics;
            if (funnyticount > 30l * 70)
            {
                funnyticount = 0;
                if(viewsize != 21)
                    StatusDrawFace(BJWAITING1PIC + (US_RndT () & 1));
                facecount = 0;
            }
    #endif

      //
      // PLAY AMBIENT SOUNDS DURING PARTICULAR LEVELS
      //
                if (gamestate.episode == 0 && mapon == 0)
                ambientcount += tics;
             if(ambientcount >= 30l*70)   // every second
             {
                ambientcount = 0;
                {
                int sounds[3]=
                {
              AIRPLANESND,
              WOLFHOWLSND,
             };
             
             if (!SD_SoundPlaying())
                PlaySoundLocGlobal ((sounds[US_RndT()%2]),player->tilex,player->tiley);
                }
                break;
               
                if (gamestate.episode == 0 && mapon == 6)
                ambientcount += tics;
             if(ambientcount >= 30l*70)   // every second
             {
                ambientcount = 0;
                if (!SD_SoundPlaying())
                SD_PlaySound(SEWERSND);
                }
                break;
               
                if (gamestate.episode == 0 && mapon == 9)
                ambientcount += tics;
             if(ambientcount >= 15l*70)   // every second
             {
                ambientcount = 0;
                if (!SD_SoundPlaying())
                SD_PlaySound(SCHABBSHASND);
                }
        }

            gamestate.TimeCount += tics;

            UpdateSoundLoc ();      // JAB
            if (screenfaded)
                VW_FadeIn ();

            CheckKeys ();

    //
    // debug aids
    //
            if (singlestep)
            {
                VW_WaitVBL (singlestep);
                lasttimecount = GetTimeCount();
            }
            if (extravbls)
                VW_WaitVBL (extravbls);

            if (demoplayback)
            {
                if (IN_CheckAck ())
                {
                    IN_ClearKeysDown ();
                    playstate = ex_abort;
                }
            }
        }
        while (!playstate && !startgame);

        if (playstate != ex_died)
            FinishPaletteShifts ();
    }
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sat Jan 30, 2016 4:29 am

    Looks like a hacky solution to me.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sat Jan 30, 2016 7:18 am

    I probaly a this routine:http://www.areyep.com/Codingtips/ambientsounds.html for SDL doing,but not good
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sat Jan 30, 2016 1:26 pm

    Tutorial is probably fine. Its your implementation.

    Besides I gave you Ambient class before but you haven't used it.

    You need to think when you code.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Sun Jan 31, 2016 2:13 am

    Previously, it has been tried before with this code would have written this guide.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Sun Jan 31, 2016 2:31 am

    We're going around in circles. Don't rely on tutorials. Write your own code. And think.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Mon Feb 01, 2016 9:27 am

    I write an own code. Or than in Operation:Eisenfaust Origins or Project:TotenEisenritter how to adding in WL_PLAY.CPP in good?
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Tue Feb 02, 2016 12:53 am

    I don't know how those mods implemented it so I can't answer your question.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Tue Feb 02, 2016 1:14 am

    I running and not working an Ambient sound than in Operation:Eisenfasut Origins.
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Tue Feb 02, 2016 2:40 am

    OMJ you should make a topic giving all features you want in a mod and wait for someone to code whole thing for you.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Tue Feb 02, 2016 6:58 am

    I write a new topics with required features?
    linuxwolf
    linuxwolf
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 160
    Age : 42
    Location : Australia
    Hobbie : Games
    Registration date : 2011-12-25

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by linuxwolf Wed Feb 03, 2016 12:19 am

    Yes please. And add lots of detail. Do NOT mention other mods.
    Officer-Michael John
    Officer-Michael John
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 332
    Age : 26
    Hobbie : Video and Wolf 3D mode making
    Registration date : 2014-08-04

    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Officer-Michael John Thu Feb 04, 2016 12:17 pm

    I write a new topics on OMJ‘s code changes wishing list name. I added in The Big Fight Beinning mod.

    + You mate know calling a BJ than in Shadow Genesis. (Snake know calling a BJ).
    + You mate know killing an enemy than in Operation Body Count
    + BJ frightened if watch a one horror thing. Exaple:Undead enemy. (I added in The Old Relics)

    Sponsored content


    OMJ‘s source code helping Empty Re: OMJ‘s source code helping

    Post by Sponsored content


      Current date/time is Thu Nov 07, 2024 5:48 pm