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...


4 posters

    FF2 coding talk

    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty FF2 coding talk

    Post by lilmanjs Thu Jun 26, 2008 12:49 pm

    this is the topic for the FF2 coding talk. if you guys have ideas for the mod please say them in here and we can see if it fits with the theme of the mod.
    later,
    James



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty Re: FF2 coding talk

    Post by lilmanjs Fri Jul 18, 2008 3:38 pm

    so I'm having trouble getting the helpart and the endart. in the version.h file every other version of wolf3d has a way to compile with or without the readthis! section. how do I get the readthis! section and the endart to show up in my SDL port of Final Fight 1.



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Tue Jul 22, 2008 4:52 am

    I got your pm, I'll see what I can do. I'm doing this for the Wolfenstein Reloaded SDL port too, so I'm working on it.

    Once it's done, do you want me to plug it in your source code, or shall I try to explain the steps here?

    Edit: Readme works now...
    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty Re: FF2 coding talk

    Post by lilmanjs Tue Jul 22, 2008 1:01 pm

    just give me the the files I need for the readthis to be enabled in the Gt version.



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Fri Jul 25, 2008 5:58 am

    Ok. I will use original Wolf4SDL source files for it then.
    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty Re: FF2 coding talk

    Post by lilmanjs Fri Jul 25, 2008 11:29 am

    and please post what you have to do, since I bet a lot of people don't have the appogee version.



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Fri Aug 01, 2008 6:58 am

    I will, sorry that this is taking so long. By the way, you need to add a few vga pics to the vgagraph too.
    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty Re: FF2 coding talk

    Post by lilmanjs Fri Aug 01, 2008 12:49 pm

    ok. how would I go about doing that?



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Fri Aug 08, 2008 4:14 am

    My school will start again tuesday, I should have some free time to finish this monday. I've been working the whole summer so I really haven't felt like doing much else. I'll be away for the weekend, but I'll tackle this challenge right after.
    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty Re: FF2 coding talk

    Post by lilmanjs Fri Aug 22, 2008 1:25 pm

    so I've gotten the textured ceilings/floors to work in SDL, but how do I add in the extra wall slots for the floors and ceilings.



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    Raziel
    Raziel
    Seasoned Wolfer
    Seasoned Wolfer


    Male
    Number of posts : 361
    Age : 36
    Location : Israel
    Hobbie : Blasphemous Noise and Wolfenstein3D
    Registration date : 2007-07-08

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Raziel Sat Aug 23, 2008 12:33 pm

    You don't have to use all of the wall textures you know.. I dont use all anyway... You can choose some spare walls and make them as your ceiling/floor textures.. or just wait for BrotherTank to convert the 64+ walls tutorial.



    FF2 coding talk Banner10
    STORMING THE FRONT WITH A SCHMEISSER IN HAND!
    Raziel A.
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Sat Sep 06, 2008 10:21 am

    What is the current status of the code, have you changed it since my last updates?
    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty Re: FF2 coding talk

    Post by lilmanjs Sat Sep 06, 2008 12:19 pm

    all I've done since your last updates is change the menu colors to that yellow. other than that all I did was add in your coding updates and wait for more. also I'd love to know how to get textured menus in SDL.



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Sat Sep 06, 2008 12:23 pm

    Just send me the files you modified, I've allready added the split doorways code.
    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty Re: FF2 coding talk

    Post by lilmanjs Sat Sep 06, 2008 12:28 pm

    you don't need them, I can just do it again. and plus its just one file and I'd rather have a textured menu, rather than yellow.



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Sat Sep 06, 2008 2:01 pm

    All right.
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Sun Jan 11, 2009 12:43 am

    Here's the modified version of "wl_floorceiling.cpp" with split doorways installed. Smile

    Code:
    #include "version.h"

    #ifdef USE_FLOORCEILINGTEX

    #include "wl_def.h"
    #include "wl_shade.h"


    //
    // Codetech84's split doorways
    //
    unsigned GetSplitTexture (int u, int v, int x, int y, boolean vert)
    {
      unsigned ret;

      if (vert)
      {
          if (u < 32)
            ret = MAPSPOT(x-1,y,2);
          else
            ret = MAPSPOT(x+1,y,2);
      }
      else
      {
          if (v < 32)
            ret = MAPSPOT(x,y+1,2);
          else
            ret = MAPSPOT(x,y-1,2);
      }
      return ret;
    }



    // Textured Floor and Ceiling by DarkOne
    // With multi-textured floors and ceilings stored in lower and upper bytes of
    // according tile in third mapplane, respectively.
    void DrawFloorAndCeiling(byte *vbuf, unsigned vbufPitch, int min_wallheight)
    {
        fixed dist;                                // distance to row projection
        fixed tex_step;                            // global step per one screen pixel
        fixed gu, gv, du, dv;                      // global texture coordinates
        int u, v;                                  // local texture coordinates
        byte *toptex, *bottex;
        unsigned curtex=0, door;
        byte  tile;
        unsigned lasttoptex = 0xffffffff, lastbottex = 0xffffffff;
        boolean uv;

        int halfheight = viewheight >> 1;
        int y0 = min_wallheight >> 3;              // starting y value
        if(y0 > halfheight)
            return;                                // view obscured by walls
        if(!y0) y0 = 1;                            // don't let division by zero
        unsigned bot_offset0 = vbufPitch * (halfheight + y0);
        unsigned top_offset0 = vbufPitch * (halfheight - y0 - 1);

        // draw horizontal lines
        for(int y = y0, bot_offset = bot_offset0, top_offset = top_offset0;
            y < halfheight; y++, bot_offset += vbufPitch, top_offset -= vbufPitch)
        {
            dist = (heightnumerator / y) << 5;
            gu =  viewx + FixedMul(dist, viewcos);
            gv = -viewy + FixedMul(dist, viewsin);
            tex_step = (dist << 8) / viewwidth / 175;
            du =  FixedMul(tex_step, viewsin);
            dv = -FixedMul(tex_step, viewcos);
            gu -= (viewwidth >> 1) * du;
            gv -= (viewwidth >> 1) * dv; // starting point (leftmost)
    #ifdef USE_SHADING
            byte *curshades = shadetable[GetShade(y << 3)];
    #endif
            for(int x = 0, bot_add = bot_offset, top_add = top_offset;
                x < viewwidth; x++, bot_add++, top_add++)
            {
                uv = false;
                if(wallheight[x] >> 3 <= y)
                {
                    int curx = (gu >> TILESHIFT) & (MAPSIZE - 1);
                    int cury = (-(gv >> TILESHIFT) - 1) & (MAPSIZE - 1);
                                 
                    tile = tilemap[curx][cury];
                    if (tile & 0x80)
                    {
                      u = (gu >> (TILESHIFT - TEXTURESHIFT)) & (TEXTURESIZE - 1);
                      v = (gv >> (TILESHIFT - TEXTURESHIFT)) & (TEXTURESIZE - 1);
                      uv = true;
                     
                      curtex = GetSplitTexture(u,v, curx,cury, doorobjlist[tile & 0x7f].vertical);
                    }
                    else
                      curtex = MAPSPOT(curx, cury, 2);
                     
                    if(curtex)
                    {                                         
                        unsigned curtoptex = curtex >> 8;
                        if (curtoptex != lasttoptex)
                        {
                            lasttoptex = curtoptex;
                            toptex = PM_GetTexture(curtoptex);
                        }
                        unsigned curbottex = curtex & 0xff;
                        if (curbottex != lastbottex)
                        {
                            lastbottex = curbottex;
                            bottex = PM_GetTexture(curbottex);
                        }

                        if (!uv)
                        {
                          u = (gu >> (TILESHIFT - TEXTURESHIFT)) & (TEXTURESIZE - 1);
                          v = (gv >> (TILESHIFT - TEXTURESHIFT)) & (TEXTURESIZE - 1);
                          uv = true;
                        }
                        unsigned texoffs = (u << TEXTURESHIFT) + (TEXTURESIZE - 1) - v;
    #ifdef USE_SHADING
                        if(curtoptex)
                            vbuf[top_add] = curshades[toptex[texoffs]];
                        if(curbottex)
                            vbuf[bot_add] = curshades[bottex[texoffs]];
    #else
                        if(curtoptex)
                            vbuf[top_add] = toptex[texoffs];
                        if(curbottex)
                            vbuf[bot_add] = bottex[texoffs];
    #endif
                    }
                }
                gu += du;
                gv += dv;
            }
        }
    }

    #endif
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Sun Jan 11, 2009 2:01 am

    Here's the code for "not getting all weapons with chaingun". Smile

    Before trying any of the following, back-up your code. It should be all done and tested, but something might go wrong when it's installed.


    Add this to the gamestate structure in "wl_def.h":
    Code:
    weapontype  gotweapon;

    Replace your CheckWeaponChange in "wl_agent.cpp" with this:
    Code:
    /*
    ======================
    =
    = CheckWeaponChange
    =
    = Keys 1-5 change weapons
    =
    ======================
    */

    void CheckWeaponChange (void)
    {
        int i,newWeapon = -1;
        int start;   

    #ifdef _arch_dreamcast
        int joyx, joyy;
        IN_GetJoyFineDelta (&joyx, &joyy);
        if(joyx < -64)
            buttonstate[bt_prevweapon] = true;
        else if(joyx > 64)
            buttonstate[bt_nextweapon] = true;
    #endif

        if(buttonstate[bt_nextweapon] && !buttonheld[bt_nextweapon])
        {
            newWeapon = 0;
            buttonheld[bt_nextweapon] = true;
           
            if (gamestate.weapon == gamestate.bestweapon)
              start = 0; // jump to first weapon
            else
              start = gamestate.weapon+1; // jump to next weapon

            for (i=start; i<=gamestate.bestweapon; i++)
            {
              if (gamestate.gotweapon & (1<<i))
              {
                  newWeapon = i;
                  break;
              }
            }
        }
        else if(buttonstate[bt_prevweapon] && !buttonheld[bt_prevweapon])
        {
            newWeapon = 0;
            buttonheld[bt_prevweapon] = true;
           
            if (gamestate.weapon == 0)
              start = gamestate.bestweapon; // Jump to bestweapon
            else
              start = gamestate.weapon-1; // Jump to previous weapon

            for (i=start; i>=0; i--)
            {
              if (gamestate.gotweapon & (1<<i))
              {
                  newWeapon = i;
                  break;
              }
            }
        }
        else
        {
            for(int i = wp_knife; i <= gamestate.bestweapon; i++)
            {
                if ((gamestate.gotweapon & (1<<i)) && buttonstate[bt_readyknife + i - wp_knife])
                {
                    newWeapon = i;
                    break;
                }
            }
        }

        if(newWeapon != -1)
        {
            gamestate.weapon = gamestate.chosenweapon = (weapontype) newWeapon;
            DrawWeapon();
        }
    }

    Still in "wl_agent.cpp", modify your GiveWeapon routine to this:
    Code:
    void GiveWeapon (int weapon)
    {
        GiveAmmo (6);

        if (gamestate.bestweapon<weapon)
            gamestate.bestweapon = gamestate.weapon = gamestate.chosenweapon = (weapontype) weapon;
           
        gamestate.gotweapon = (weapontype) (gamestate.gotweapon | (1<<weapon)); // Make the new weapon available for player

        DrawWeapon ();
    }

    In "wl_state.cpp", modify the "KillActor" routine for SS to this:
    Code:
            case ssobj:
                GivePoints (500);
                NewState (ob,&s_ssdie1);
                if (!(gamestate.gotweapon & (1<<wp_machinegun)))
                    PlaceItemType (bo_machinegun,tilex,tiley);
                else
                    PlaceItemType (bo_clip2,tilex,tiley);
                break;

    In "wl_game.cpp", make the following modifications to your Died routine.
    Code:
    if (gamestate.lives > -1)
        {
            gamestate.health = 110;
            gamestate.weapon = gamestate.bestweapon
                = gamestate.chosenweapon = wp_pistol;
               
            gamestate.gotweapon = (weapontype)0;                                      // Take away all weapons
            gamestate.gotweapon = (weapontype) (gamestate.gotweapon | (1<<wp_knife));  // Give knife
            gamestate.gotweapon = (weapontype) (gamestate.gotweapon | (1<<wp_pistol)); // and pistol for free...
               
            gamestate.ammo = STARTAMMO;

    And in "wl_main.cpp" the following modifications to NewGame routine.
    Code:
    void NewGame (int difficulty,int episode)
    {
        memset (&gamestate,0,sizeof(gamestate));
        gamestate.difficulty = difficulty;
        gamestate.weapon = gamestate.bestweapon
                = gamestate.chosenweapon = wp_pistol;
       
        gamestate.gotweapon = (weapontype)0;                                      // Take away all weapons
        gamestate.gotweapon = (weapontype) (gamestate.gotweapon | (1<<wp_knife));  // Give knife
        gamestate.gotweapon = (weapontype) (gamestate.gotweapon | (1<<wp_pistol)); // and pistol for free...
               
        gamestate.health = 110;
        gamestate.ammo = STARTAMMO;
        gamestate.lives = 3;
        gamestate.nextextra = EXTRAPOINTS;
        gamestate.episode=episode;

        startgame = true;
    }

    And if you want, you can give the player the machinegun when they hit "MLI", it's in "wl_play.cpp".
    Code:
        //
        // SECRET CHEAT CODE: 'MLI'
        //
        if (Keyboard[sc_M] && Keyboard[sc_L] && Keyboard[sc_I])
        {
            gamestate.health = 110;
            gamestate.ammo = 200;
            gamestate.keys = 3;
            gamestate.score = 0;
            gamestate.TimeCount += 42000L;
            GiveWeapon (wp_machinegun);  // Give the machinegun
            GiveWeapon (wp_chaingun);


    Last edited by Codetech84 on Fri Feb 06, 2009 11:54 pm; edited 1 time in total
    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty Re: FF2 coding talk

    Post by lilmanjs Sun Jan 25, 2009 2:28 pm

    that's really great. I don't think that has been done in SDL yet, has it?



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Fri Feb 06, 2009 11:59 pm

    I can't take full credit because part of it came from the "bestweapon" tutorial, but I did my own version of the code and added support for next/previous weapon buttons.

    By the way I modified it a bit (Thanks to Metalor from DHW for reporting this):

    Change the following in "wl_main.cpp" and "wl_game.cpp":

    gamestate.gotweapon = 0;

    to

    gamestate.gotweapon = (weapontype)0;
    Dark_wizzie
    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!


    Female
    Number of posts : 5120
    Age : 30
    Location : California, USA
    Job : Investor
    Hobbie : Computers, chess, computer chess, fashion, and philosophy
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Dark_wizzie Wed Feb 11, 2009 4:38 pm

    Just out of curiosity, on a scale of 0 to 100% done, how much is done in making FF2?



    Wolf3d Haven
    Minute Logic Blog
    lilmanjs
    lilmanjs
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1143
    Age : 34
    Location : kansas, U.S.A
    Hobbie : playing wolf3d addons like crazy
    Message : what would we do without wolf3d?
    Registration date : 2007-04-17

    FF2 coding talk Empty Re: FF2 coding talk

    Post by lilmanjs Thu Feb 12, 2009 11:52 am

    Dark_wizzie wrote:Just out of curiosity, on a scale of 0 to 100% done, how much is done in making FF2?
    I'd say about 90% but then again I'm not the one finishing up the coding.



    FF2 coding talk TeamAardwolfV2PNG
    FF2 coding talk 57046cfmlabelbar
    Mods being worked on:
    The Mutant Uprising, Final Fight 2
    Mod ideas:
    Stargate SG-1 addon, Mega Man addon
    Team Aardwolf Mods:
    The Mutant Uprising, Ghost
    Mods being worked on with other people:
    Return to Castle Hollehammer with Raziel A. (Karharis)
    Award winning mods:
    The Final Fight
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Tue May 12, 2009 8:02 am

    Here's the code for removing the border overlaying the statusbar. Please make sure you made a backup of your wl_game.cpp before applying this tutorial.

    Open up wl_game.cpp, change your DrawPlayBorder to this:

    Code:
    void DrawPlayBorder (void)
    {
        const int px = scaleFactor; // size of one "pixel"

        if (bordercol != VIEWCOLOR)
            DrawStatusBorder(bordercol);

        if(viewheight == screenHeight) return;

        VWB_BarScaledCoord (0,0,screenWidth,screenHeight-px*STATUSLINES,bordercol);

        const int xl = screenWidth/2-viewwidth/2;
        const int yl = (screenHeight-px*STATUSLINES-viewheight)/2;
        VWB_BarScaledCoord (xl,yl,viewwidth,viewheight,0);

        if(xl != 0)
        {
            // Paint game view border lines
            VWB_BarScaledCoord(xl-px, yl-px, viewwidth+px, px, 0);                      // upper border
            VWB_BarScaledCoord(xl, yl+viewheight, viewwidth+px, px, bordercol-2);      // lower border
            VWB_BarScaledCoord(xl-px, yl-px, px, viewheight+px, 0);                    // left border
            VWB_BarScaledCoord(xl+viewwidth, yl-px, px, viewheight+2*px, bordercol-2);  // right border
            VWB_BarScaledCoord(xl-px, yl+viewheight, px, px, bordercol-3);              // lower left highlight
        }
        else
        {
            // Just paint a lower border line
            VWB_BarScaledCoord(0, yl+viewheight, viewwidth, px, bordercol-2);      // lower border
        }
    }

    Still in wl_game.cpp, make the following changes to ShowActStatus:

    Code:
    void ShowActStatus()
    {
        // Draw status bar without borders
        byte *source = grsegs[STATUSBARPIC];
        int    picnum = STATUSBARPIC - STARTPICS;
        int width = pictable[picnum].width;
        int height = pictable[picnum].height;
        int destx = (screenWidth-scaleFactor*320)/2 * scaleFactor;
        int desty = screenHeight - height * scaleFactor;
        VL_MemToScreenScaledCoord(source, width, height, 0, 0, destx, desty, width, height);

        ingame = false;
        DrawFace ();
        DrawHealth ();
        DrawLives ();
        DrawLevel ();
        DrawAmmo ();
        DrawKeys ();
        DrawWeapon ();
        DrawScore ();
        ingame = true;
    }
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Thu Sep 29, 2011 12:32 pm

    I applied all the changes in this thread to the latest Wolf4SDL revision (261) from the repository. Just so you know I'm on the case again.
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Fri Sep 30, 2011 1:03 am

    I updated the entire code of the FF2 that I have here to revision 261 of Wolf4SDL (From the SVN repository).

    Only thing left to ask is, where do you want it? Very Happy
    Codetech84
    Codetech84
    Don't Hurt Me!
    Don't Hurt Me!


    Male
    Number of posts : 65
    Age : 39
    Location : Rauma - Finland
    Registration date : 2007-04-05

    FF2 coding talk Empty Re: FF2 coding talk

    Post by Codetech84 Sun Oct 02, 2011 1:02 pm

    By the way, timing couldn't have been better. My PSU failed yesterday and I'm unable to work on anything right now.

    Sponsored content


    FF2 coding talk Empty Re: FF2 coding talk

    Post by Sponsored content


      Current date/time is Thu Mar 28, 2024 3:03 pm