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       

[Wolf4SDL Help] Inserting a second palette (like in SoD)
Page 1 of 1
DieHard Wolfers Forum Index -> SDL 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
Andy_Nonymous
Moderator
<B>Moderator</B>


Joined: 02 Apr 2003
Last Visit: 17 Feb 2015

Topics: 99
Posts: 589
Location: New Jersey, USA
usa.gif

PostPosted: Sun Jun 01, 2008 8:55 am
   Subject: [Wolf4SDL Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

It's been hinted at in other threads that it is possible to have multiple palettes in the game for the purpose of using them for particular graphics (eg. title screen), and in Spear of Destiny it is indeed done.

How can one get a new palette into the VGAGRAPH file? FloEdit lets you import and export palettes, but the format of the files is unknown to me; Flo lists it as "binary." I would prefer to use ChaosEdit and/or WDC to do this, but if they can do it, it is well-hidden! Beer

Andy

Edit: typo
Edit 2: added Wolf4SDL to subject line


Last edited by Andy_Nonymous on Mon Jun 02, 2008 1:41 pm; edited 1 time in total
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 15 Oct 2018

Topics: 46
Posts: 2314
Location: USA
usa.gif

PostPosted: Sun Jun 01, 2008 4:39 pm
   Subject: Re: [Wolf4SDL Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

WDC can do it, or at least should be able to. Just go to the View menu and select "Color Palettes" (or click the painters palette button) and add your new palette. If you have troubles when you try it out, let me know.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Andy_Nonymous
Moderator
<B>Moderator</B>


Joined: 02 Apr 2003
Last Visit: 17 Feb 2015

Topics: 99
Posts: 589
Location: New Jersey, USA
usa.gif

PostPosted: Sun Jun 01, 2008 5:08 pm
   Subject: [Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Adam,

I inserted the second palette as you describe above, it shows in the grid under the word "Replacement" and then I assume I must compile the VGAGRAPH file. When I do that I get an error that says:

CompileVGAGraph Error

Error 1510 in CompileVgaGraph: Added chunk had no file: PAL1

Let's suppose this had been a successful operation. Where would the new palette be? A new chunk added to the very end of the VGAGRAPH file? How could I view this added chunk?

I'm using v1.14.372

Andy
AlumiuN
DieHard Wolfer
DieHard Wolfer


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

Topics: 38
Posts: 2499
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Sun Jun 01, 2008 6:10 pm
   Subject: Re: [Wolf4SDL Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Alternatively, you could throw the second\third\etc. palette in 'gamepal3d.cpp' as, say, 'gamepal2[]', 'gamepal3[]', etc. and compile it that way, using VL_SetPalette to change them (at least I think that's the command). Although I suppose then that whatever uses a different palette to the first will look different in WDC... Razz

EDIT: Oh, wait... 'PAL1' has no file? You didn't delete the palette file before you recompiled, did you?
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 15 Oct 2018

Topics: 46
Posts: 2314
Location: USA
usa.gif

PostPosted: Sun Jun 01, 2008 7:18 pm
   Subject: [Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Go to Picture Tools->VGAGRAPH Chunks to see where WDC adds the palette. When I did it, it went at the end of VGAGRAPH.

Things compiled correctly when I added an extra palette to a project that had none before. Like AluminiuM asked, did you delete the file? With the way WDC is set up, all files must remain where they were when added.

I'd like to have to time to start over and make a completely new version of WDC... but time never shows up and I have other things eating it up when it does.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Andy_Nonymous
Moderator
<B>Moderator</B>


Joined: 02 Apr 2003
Last Visit: 17 Feb 2015

Topics: 99
Posts: 589
Location: New Jersey, USA
usa.gif

PostPosted: Mon Jun 02, 2008 1:48 am
   Subject: [Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I neither deleted the palette file nor moved it. I tried again with a vanilla GT v1.4 Wolfenstein and I get the same error. The last chunk in the list does say PALETTE, but the vga files do not get updated.
Andy_Nonymous
Moderator
<B>Moderator</B>


Joined: 02 Apr 2003
Last Visit: 17 Feb 2015

Topics: 99
Posts: 589
Location: New Jersey, USA
usa.gif

PostPosted: Mon Jun 02, 2008 1:40 pm
   Subject: [Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

OK, I got WDC to insert the new palette. I had to use the "Add Chunk" item under Import/Export; "Insert File" appeared to do the same, but compiling the VGA files failed with the aforementioned error message.

I see it listed as the last chunk: 149 PALETTE, WDC compiles it 100%, VGA files are updated.

I then add this palette to the chunks in GFXV_WL6.H (in blue):
::: CODE :::
    T_ENDART6,                           // 148
    TITLEPALETTE,   
    ENUMEND
} graphicnums;

I then change WL_MAIN.CPP to use the spear code for the original title screen, simply changing the palette:
::: CODE :::
//#ifdef SPEAR
            SDL_Color pal[256];
            CA_CacheGrChunk (TITLEPALETTE);
            VL_ConvertPalette(grsegs[TITLEPALETTE], pal, 256);

            CA_CacheGrChunk (TITLEPIC);
            VWB_DrawPic (0,0,TITLEPIC);
            UNCACHEGRCHUNK (TITLEPIC);

//            CA_CacheGrChunk (TITLE2PIC);   // original title screen is not split like SoD's
//            VWB_DrawPic (0,80,TITLE2PIC);
//            UNCACHEGRCHUNK (TITLE2PIC);
            VW_UpdateScreen ();
            VL_FadeIn(0,255,pal,30);

            UNCACHEGRCHUNK (TITLEPALETTE);
//#else
//            CA_CacheScreen (TITLEPIC);
//            VW_UpdateScreen ();
//            VW_FadeIn();
//#endif
            if (IN_UserInput(TickBase*15))
                break;
            VW_FadeOut();


Rebuild all, just to be sure, no warnings.

It fails at runtime when the title screen should come up. No error messages, it just throws me back into Windows.

Except for the added palette chunk in the VGAGRAPH file, this is all vanilla Wolf4SDL code and data.

What am I doing wrong? Confused

Andy
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 15 Oct 2018

Topics: 46
Posts: 2314
Location: USA
usa.gif

PostPosted: Mon Jun 02, 2008 1:56 pm
   Subject: Re: [Wolf4SDL Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I'd have to check out how GFXV_WL6.H looks in W4SDL. PM me how your entire file looks...

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 15 Oct 2018

Topics: 46
Posts: 2314
Location: USA
usa.gif

PostPosted: Mon Jun 02, 2008 2:47 pm
   Subject: Re: [Wolf4SDL Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

OK, got your email. I think you need to increment NUMCHUNKS by one also. I think it should be 150. You might also be able to just set NUMCHUNKS to ENUMEND and be fine no matter how many things you add to that list.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Andy_Nonymous
Moderator
<B>Moderator</B>


Joined: 02 Apr 2003
Last Visit: 17 Feb 2015

Topics: 99
Posts: 589
Location: New Jersey, USA
usa.gif

PostPosted: Mon Jun 02, 2008 3:06 pm
   Subject: [Wolf4SDL Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sweet! That did the trick! Thanks for your help, Adam! Laughing

Andy
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 15 Oct 2018

Topics: 46
Posts: 2314
Location: USA
usa.gif

PostPosted: Mon Jun 02, 2008 3:59 pm
   Subject: Re: [Wolf4SDL Help] Inserting a second palette (like in SoD)
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

And thanks for pointing out that problem in WDC, too. I don't think "Insert File" should even be enabled. I'll have to check and fix that.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> SDL 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 Announcement: Wolf4SDL released
Author: Ripper
522 215998 Mon May 22, 2017 2:04 pm
Tricob View latest post
No new posts [help] Adding teleporters in wolf4sdl
Author: Mortimer
35 11311 Fri May 26, 2017 8:19 am
Military View latest post
No new posts [WOLF4SDL Help] Blake Stone Style doors
Author: Haasboy
3 3089 Sun Jul 20, 2008 7:56 am
Haasboy View latest post
No new posts [Help] Problem with Checkweaponchange function (wolf4sdl)
Author: Mortimer
4 3288 Sat May 17, 2008 11:26 am
Mortimer View latest post
No new posts [help] Wolf4sdl's implemented tutorials
Author: Mortimer
6 3373 Tue May 06, 2008 1:15 pm
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