DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

I think my static object lists are a mess right now
Page 1 of 1
DieHard Wolfers Forum Index -> Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Military
DieHard Guard
DieHard Guard


Joined: 10 Oct 2015
Last Visit: 23 Dec 2017

Topics: 20
Posts: 298

blank.gif

PostPosted: Sun Jul 17, 2016 4:31 am
   Subject: I think my static object lists are a mess right now
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

The way I have been adding the new static objects is... a pretty bad way, basically. It was chaotic, and while it still worked... it now stopped, seemingly. Maybe those of you who are more familiar with the code can tell what I did wrong.

wl.game.cpp:
::: CODE :::

static void ScanInfoPlane(void)
{
    unsigned x,y;
    int      tile;
    word     *start;

    start = mapsegs[1];
    for (y=0;y<mapheight;y++)
    {
        for (x=0;x<mapwidth;x++)
        {
            tile = *start++;
            if (!tile)
                continue;

            switch (tile)
            {
                case 19:
                case 20:
                case 21:
                case 22:
                    SpawnPlayer(x,y,NORTH+tile-19);
                    break;

                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:
                case 29:
                case 30:

                case 31:
                case 32:
                case 33:
                case 34:
                case 35:
                case 36:
                case 37:
                case 38:

                case 39:
                case 40:
                case 41:
                case 42:
                case 43:
                case 44:
                case 45:
                case 46:

                case 47:
                case 48:
                case 49:
                case 50:
                case 51:
                case 52:
                case 53:
                case 54:

                case 55:
                case 56:
                case 57:
                case 58:
                case 59:
                case 60:
                case 61:
                case 62:

                case 63:
                case 64:
                case 65:
                case 66:
                case 67:
                case 68:
                case 69:
                case 70:
                case 71:
                case 72:
#ifdef SPEAR
                case 73:                        // TRUCK AND SPEAR!
                case 74:
#elif defined(USE_DIR3DSPR)
                case 73: //bars
                case 74: //bars
                case 75: //window
                case 76: //window
                //case 77: //crate
                //case 78: //crate
                //case 79: //crate
                //case 80: //crate
#endif
                    SpawnStatic(x,y,tile-23);
                    break;

                case 77:
                    SpawnStatic(x,y,tile-23);   //Spawn 4 crate sides
                    SpawnStatic(x,y,tile-22);
                    SpawnStatic(x,y,tile-21);
                    SpawnStatic(x,y,tile-20);
                    break;
                case 78:    // sign 1
                case 79:    // sign 2
                    SpawnStatic(x,y,tile-23); 
                    break;



wl.act1.cpp:
::: CODE :::
struct
{
    short      picnum;
    wl_stat_t  type;
    uint32_t   specialFlags;    // they are ORed to the statobj_t flags
} statinfo[] =
{
    {SPR_STAT_0},                           // puddle          spr1v
    {SPR_STAT_1,block},                     // Green Barrel    "
    {SPR_STAT_2,block},                     // Table/chairs    "
    {SPR_STAT_3,block,FL_FULLBRIGHT},       // Floor lamp      "
    {SPR_STAT_4,none,FL_FULLBRIGHT},        // Chandelier      "
    {SPR_STAT_5,block},                     // Hanged man      "
    {SPR_STAT_6,bo_alpo},                   // Bad food        "
    {SPR_STAT_7,block},                     // Red pillar      "
    //
    // NEW PAGE
    //
    {SPR_STAT_8,block},                     // Tree            spr2v
    {SPR_STAT_9},                           // Skeleton flat   "
    {SPR_STAT_10,block},                    // Sink            " (SOD:gibs)
    {SPR_STAT_11,block},                    // Potted plant    "
    {SPR_HYPO1,block},                      // Urn             "
    {SPR_STAT_13,block},                    // Bare table      "
    {SPR_STAT_14,none,FL_FULLBRIGHT},       // Ceiling light   "
    #ifndef SPEAR
    {SPR_STAT_15},                          // Kitchen stuff   "
    #else
    {SPR_STAT_15,block},                    // Gibs!
    #endif
    //
    // NEW PAGE
    //
    {SPR_STAT_16,block},                    // suit of armor   spr3v
    {SPR_STAT_17,block},                    // Hanging cage    "
    {SPR_STAT_18,block},                    // SkeletoninCage  "
    {SPR_STAT_19},                          // Skeleton relax  "
    {SPR_STAT_20,bo_key1},                  // Key 1           "
    {SPR_STAT_21,bo_key2},                  // Key 2           "
    {SPR_STAT_22,block},                    // stuff             (SOD:gibs)
    {SPR_STAT_23},                          // stuff
    //
    // NEW PAGE
    //
    {SPR_STAT_24,bo_food},                  // Good food       spr4v
    {SPR_STAT_25,bo_firstaid},              // First aid       "
    {SPR_STAT_26,bo_clip},                  // Clip            "
    {SPR_STAT_27,bo_machinegun},            // Machine gun     "
    {SPR_STAT_28,bo_chaingun},              // Gatling gun     "
    {SPR_STAT_29,bo_cross},                 // Cross           "
    {SPR_STAT_30,bo_chalice},               // Chalice         "
    {SPR_STAT_31,bo_bible},                 // Bible           "
    //
    // NEW PAGE
    //
    {SPR_STAT_32,bo_crown},                 // crown           spr5v
    {SPR_STAT_33,bo_fullheal,FL_FULLBRIGHT},// one up          "
    {SPR_STAT_34,bo_gibs},                  // gibs            "
    {SPR_STAT_35,block},                    // barrel          "
    {SPR_STAT_36,block},                    // well            "
    {SPR_STAT_37,block},                    // Empty well      "
    {SPR_STAT_38,bo_gibs},                  // Gibs 2          "
    {SPR_STAT_39,block},                    // flag            "
    //
    // NEW PAGE
    //
    #ifndef SPEAR
    {SPR_STAT_40,block},                    // Call Apogee          spr7v
    #else
    {SPR_STAT_40},                          // Red light
    #endif
    //
    // NEW PAGE
    //
    {SPR_STAT_41},                          // junk            "
    {SPR_STAT_42},                          // junk            "
    {SPR_STAT_43},                          // junk            "
    #ifndef SPEAR
    {SPR_STAT_44,bo_backpack},              // backpack        "
    #else
    {SPR_STAT_44,block},                    // Gibs!
    #endif
    {SPR_STAT_45,block},                    // stove           " (SOD:gibs)
    {SPR_STAT_46,block},                    // spears          " (SOD:gibs)
    {SPR_STAT_47},                          // vines           "
    //
    // NEW PAGE
    //
    #ifdef SPEAR
    {SPR_STAT_48,block},                    // marble pillar
    {SPR_STAT_49,bo_25clip},                // bonus 25 clip
    {SPR_STAT_50,block},                    // truck
    {SPR_STAT_51,bo_spear},                 // SPEAR OF DESTINY!
    #endif

    {SPR_STAT_26,bo_clip2},                 // bonus 32 clip           "
#ifdef USE_DIR3DSPR

    {SPR_HYPO3,block,FL_DIR_VERT_MID},      //steel bars vertical
    {SPR_HYPO3,block,FL_DIR_HORIZ_MID},     //steel bars horizontal
    {SPR_HYPO4,block,FL_DIR_VERT_MID},      //wooden window vertical
    {SPR_HYPO4,block,FL_DIR_HORIZ_MID},     //wooden window horizontal
    {SPR_HYPO1,block,FL_DIR_VERT_FW},     //3d crate experiment
    {SPR_HYPO1,none,FL_DIR_HORIZ_FW},     //3d crate experiment
    {SPR_HYPO1,none,FL_DIR_VERT_BW},     //3d crate experiment
    {SPR_HYPO1,none,FL_DIR_HORIZ_BW},     //3d crate experiment
#endif

    {SPR_STAT_12,bo_25clip},
 #ifdef USE_DIR3DSPR
    {SPR_FAT_SHOOT3,none,FL_DIR_HORIZ_MID},    //Episode 2 warning sign
    {SPR_FAT_SHOOT4,none,FL_DIR_HORIZ_MID},    //Episode 4 warning sign
 #endif
    {-1}                                    // terminator
};


- the commented out crates were a failed experiment

- the not commented out crates were some other experiment and nothing seemed to happen until I added the 32 clip and the clip was inside a crate, and I couldn't get this to go away, or maybe I was just exasperated and I just made the crate invisible and non-blocking. I do realize how stupid it is.

- one issue I had was that the 3d objects and and the ammo box both ended up one ID farther than I expected, so object 71 is a chalice with an ammo clip sprite? and 76 is nothing, while objects from 72 to 75 are the desired 3d sprites, and object 77 is the ammo box I wanted to add. It's weird, but I've already put objects on maps using those IDs, so at this point I would prefer it to stay this way.

- and the final issue, the two "warning signs", or case 78 and 79. Those simply doesn't work, they aren't appearing under those IDs or anywhere else. I'm clueless.

wl.game and wl.act1 are the only files that define decorative static 3d sprites, right?
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 3:39 ago.

Topics: 37
Posts: 2411
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Sun Jul 17, 2016 2:08 pm
   Subject: Re: I think my static object lists are a mess right now
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Barry wrote:
wl.game and wl.act1 are the only files that define decorative static 3d sprites, right?


Unless I'm forgetting something, yes.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 1:04 ago.

Topics: 161
Posts: 8030
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sun Jul 17, 2016 2:48 pm
   Subject: Re: I think my static object lists are a mess right now
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Do you have the "#spear" parameter enabled? If not, it will skip some of the code you've posted here.
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 13 Jan 2018

Topics: 55
Posts: 2118
Location: Canada
blank.gif

PostPosted: Sun Jul 17, 2016 8:46 pm
   Subject: Re: I think my static object lists are a mess right now
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Military wrote:
so object 71 is a chalice with an ammo clip sprite?

It depends. You can control what it hides inside depending on where you place it and where you placed your objects on the previous map. This object 71 is only available in Wolf3d v1.4 though. Mapedit sometimes calls it the Mock Ammo (or Cloaked).
Military
DieHard Guard
DieHard Guard


Joined: 10 Oct 2015
Last Visit: 23 Dec 2017

Topics: 20
Posts: 298

blank.gif

PostPosted: Mon Jul 18, 2016 2:11 am
   Subject: Re: I think my static object lists are a mess right now
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Tricob wrote:
Do you have the "#spear" parameter enabled? If not, it will skip some of the code you've posted here.

But the #ifdef 's here only comment out the spear objects that are unused in my wolfenstein mods. I don't think there's any ifdef here leaking over the other objects?

Chris wrote:
Military wrote:
so object 71 is a chalice with an ammo clip sprite?

It depends. You can control what it hides inside depending on where you place it and where you placed your objects on the previous map. This object 71 is only available in Wolf3d v1.4 though. Mapedit sometimes calls it the Mock Ammo (or Cloaked).


Now that's interesting. I wonder what in the code makes this thing exist.

Though even more so I wonder why my new objects (the last two at least) won't show up. Is no one seeing any issues with the code? Could there be some other reason?
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 3:39 ago.

Topics: 37
Posts: 2411
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Mon Jul 18, 2016 3:43 am
   Subject: Re: I think my static object lists are a mess right now
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Military wrote:
Though even more so I wonder why my new objects (the last two at least) won't show up. Is no one seeing any issues with the code? Could there be some other reason?


You did remember to add the relevant cases to the WL_GAME section?
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 13 Jan 2018

Topics: 55
Posts: 2118
Location: Canada
blank.gif

PostPosted: Mon Jul 18, 2016 5:04 am
   Subject: Re: I think my static object lists are a mess right now
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Military wrote:
Though even more so I wonder why my new objects (the last two at least) won't show up. Is no one seeing any issues with the code?

When I count your wl_act1.cpp lines, bo_25clip should be case 80, and the last two objects should be case 81 and 82.
Military
DieHard Guard
DieHard Guard


Joined: 10 Oct 2015
Last Visit: 23 Dec 2017

Topics: 20
Posts: 298

blank.gif

PostPosted: Tue Jul 19, 2016 3:21 am
   Subject: Re: I think my static object lists are a mess right now
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

It seems now that I remembered about wl_act1 when adding the new objects, but not when commenting out the four crate object... I'll have to try commenting it out in a consistent way and see how it helps.
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Info] Breakable or Exploding Objects (colums or barrels)
Author: wolf3dbreaker
37 6802 Tue Feb 08, 2005 5:44 am
Guest View latest post
No new posts [Info] Assigning Static Objects problem.
Author: Guest
1 104 Sun Jul 06, 2003 1:25 pm
Guest View latest post
No new posts [Info] Alarm Sounding in game?? WSJ...??
Author: Guest
7 308 Tue Jun 17, 2003 10:04 pm
Reivax44 View latest post
No new posts [Info] Silent Gun? - Adding a Silencer
Author: Guest
4 194 Fri Apr 18, 2003 8:34 am
BrotherTank View latest post
No new posts [Info] Adding Locked Doors
Author: Guest
3 243 Thu Apr 17, 2003 6:30 am
Ripper View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group