🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.games.duke3d
Article #78620

QUERY: programming duke graphics help...woes :S

#78620
From: KevinGPO
Date: Fri, 03 Feb 2006 13:12
32 lines
2417 bytes
I just programming Duke Nukem 3D source code and trying to understand
the drawing graphics routines. In the (game folder) game.c: main()
function somewhere halfway down there's displayrooms() and
displayrest(). I understand displayrooms() handles the 3D rendering,
while displayrest() handles map-mode, first-person weapon-holding hand,
& status bar.

What I want to do is program to display the actual sprites of all map
objects during map-view-mode.

In displayrest() function definition calls drawmapview() for colored
map, and drawoverheadmap() for the wire-frame map.

In file menues.c: drawoverheadmap() function there's a call to
rotatesprite() to draw the colorful duke sprite in the middle of the
screen. How can we use the same function to draw the other map sprites
at their correct locations in map-view-mode?



Other queries:
1. What is significant with show2dsector[i>>3]&(1<<(i&7)) ? I see this
pattern all over the place to test/decide whether to show a map object
or not. However I do not understand why bit-shift to the right 3
places, and bitmask AND on 7, then bit-shift to left by 1 place?

2. What is significant with calling the sintable[(spr->ang)&2047] with
2047 all the time?



Anyone's help most appreciated.
Technical Details
Message-ID: <1138972342.009774.60130@g44g2000cwa.googlegroups.com>
Path: mbox-mo1.pugleaf.net!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail
From: "KevinGPO" <kevingpo@hotmail.com>
Newsgroups: alt.games.duke3d.editing,alt.games.duke3d
Subject: QUERY: programming duke graphics help...woes :S
Date: 3 Feb 2006 05:12:22 -0800
Organization: http://groups.google.com
Lines: 33
Message-ID: <1138972342.009774.60130@g44g2000cwa.googlegroups.com>
NNTP-Posting-Host: 217.37.215.49
Mime-Version: 1.0
X-Trace: posting.google.com 1138972351 8204 127.0.0.1 (3 Feb 2006 13:12:31 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 3 Feb 2006 13:12:31 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8) Gecko/20051111 Firefox/1.5,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 SERVERSB
Complaints-To: groups-abuse@google.com
Injection-Info: g44g2000cwa.googlegroups.com; posting-host=217.37.215.49; posting-account=i1weRw0AAADIC_TOUJYyIL-bIKGkrSnn
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit