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       

[solved] How to convert an SDL ceiling to the DOS format?
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
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 Sep 15, 2013 11:26 am
   Subject: [solved] How to convert an SDL ceiling to the DOS format?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

I know this is back-asswards, but I'd like to know how to do this in C/C++

Let's say I have a ceiling color value of 133, read from a map tile. I want to be able to plug that into the DOS EXE so it will display the correct color ceiling. I can do it easily in SDL because there it just uses straight values in drawing the ceilings.

In DOS, because we are using assembly code and for some reason, need to duplicate each color (or else get striped ceilings), it looks like the following needs to be done:

1) convert the decimal value to hex

2) concatenate the hex value with itself

3) plug this result into 'ceiling' in WL_DRAW.C

In this example, 133 is 0x85, and I want to use 0x8585 to draw the DOS version ceiling.

How do I code this in C/C++? And does this even make sense? Laughing


Last edited by Andy_Nonymous on Mon Sep 16, 2013 10:58 am; edited 1 time in total
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 13 Jan 2018

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

PostPosted: Sun Sep 15, 2013 12:41 pm
   Subject: Re: [solved] How to convert an SDL ceiling to the DOS format?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

There's a few code examples here:
http://diehardwolfers.areyep.com/viewtopic.php?t=3594

For reference: 133*256 + 133 (ceiling<<8 + ceiling) = 0x8585
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 Sep 15, 2013 3:42 pm
   Subject: [help] How to convert an SDL ceiling to the DOS format?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Thanks again, Chris! Smile
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 Sticky: [Info] Compiling the Source Code...
Author: Guest
52 2298 Sat Feb 10, 2007 12:38 pm
Harry sr View latest post
No new posts [Info] Make a Single shot kill an enemy
Author: Guest
12 442 Sun Jun 20, 2004 3:12 pm
Guest View latest post
No new posts [Code] Run with Stamina - TekZK
Author: BrotherTank
8 2741 Sun May 16, 2004 12:54 am
Codetech84 View latest post
This topic is locked: you cannot edit posts or make replies. [Info] Source code for Darkone's NewWolf Classic
Author: Raistlin
1 1499 Tue Feb 10, 2004 10:18 am
BrotherTank View latest post
No new posts [Info] Slideshows Between Levels? - SoD side of Code
Author: Hair Machine
2 1242 Fri Dec 26, 2003 11:02 am
jamez 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