Commit 237ec21a authored by Steven Fuller's avatar Steven Fuller

* Fixed problem with pressing START in map mode (it would flash and go back)

* Fixed topsprite in GL mode
* Tried (but failed) to fix key holding (when you win/die, you can exit the
screen too quickly)
parent 3e9c0037
......@@ -289,7 +289,7 @@ void IO_ClearViewBuffer()
/* glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); */
glClear(GL_DEPTH_BUFFER_BIT);
/* IO_AttackShape disables depth */
glDisable(GL_DEPTH_TEST);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
......@@ -508,25 +508,34 @@ void DrawSprite(thing_t *t)
void DrawTopSprite()
{
GLfloat z = -128.0 / (GLfloat)topspritescale;
GLfloat z;
if (topspritescale) {
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
z = -128.0 / (GLfloat)topspritescale;
if (LastTexture != sprtex[topspritenum]) {
LastTexture = sprtex[topspritenum];
glBindTexture(GL_TEXTURE_2D, sprtex[topspritenum]);
}
glDisable(GL_DEPTH_TEST);
glBegin(GL_QUADS);
glTexCoord2f(1.0, 0.0); glVertex3f( 0.5, 1, z);
glTexCoord2f(1.0, 1.0); glVertex3f( 0.5, -1, z);
glTexCoord2f(0.0, 1.0); glVertex3f(-0.5, -1, z);
glTexCoord2f(0.0, 0.0); glVertex3f(-0.5, 1, z);
glEnd();
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
if (LastTexture != sprtex[topspritenum]) {
LastTexture = sprtex[topspritenum];
glBindTexture(GL_TEXTURE_2D, sprtex[topspritenum]);
}
glBegin(GL_QUADS);
glTexCoord2f(1.0, 0.0); glVertex3f( 0.5, 1, z);
glTexCoord2f(1.0, 1.0); glVertex3f( 0.5, -1, z);
glTexCoord2f(0.0, 1.0); glVertex3f(-0.5, -1, z);
glTexCoord2f(0.0, 0.0); glVertex3f(-0.5, 1, z);
glEnd();
glPopMatrix();
glPopMatrix();
glEnable(GL_DEPTH_TEST);
}
}
Word *src1,*src2,*dest; /* Used by the sort */
......
......@@ -79,7 +79,7 @@ void RunAutoMap(void)
oldjoy &= joystick1;
newjoy = joystick1 ^ oldjoy;
if (newjoy & (JOYPAD_START|JOYPAD_SELECT|JOYPAD_A|JOYPAD_B|JOYPAD_X|JOYPAD_Y)) {
if (newjoy & (JOYPAD_SELECT|JOYPAD_A|JOYPAD_B|JOYPAD_X|JOYPAD_Y)) {
playstate = EX_STILLPLAYING;
}
if (newjoy & JOYPAD_UP && vy) {
......
This is not yet finished, but:
Wolfenstein 3D is an id Software game. This is a port of the Macintosh
Wolfenstein 3D is an Id Software game. This is a port of the Macintosh
version that was released by MacPlay in 1994. You can find information about
the source release at: http://www.maccentral.com/news/0001/24.wolf3d.shtml
WolfReadMe.txt, from that Mac Wolf3d source release, is also included with
......@@ -13,7 +13,7 @@ to Linux before, so when I found the source to the Macintosh version, I
thought "Why not?" So here it is. My goal is to implement everything the
Macintosh version had, and then somehow improve on that.
To use this, you need the resource fork from the First Encounter (the two
To use this, you need the resource fork from the First Encounter (the three
level shareware version) or the Second Encounter (the for-sell version).
You can find the First Encounter on many web sites (Search for: Macintosh
Wolfenstein 3D download) and you can get the Second Encounter on eBay (I
......@@ -54,8 +54,8 @@ resource fork.
Status of the port:
You can play the game, but not save, load, change difficulty, hear sounds
and music, use the mouse, and change window size. View TODO for the
specifics.
and music, use the mouse and joystics, and change window size. View TODO for
the specifics.
Specifically:
swolf3d : The SVGAlib Version. Only supports 320x200x256 at the moment, so
......@@ -70,7 +70,8 @@ use it so I can have menus and dialogs without having to create them in Xlib.
Any suggestions?
glwolf3d: The OpenGL Version (written using Xlib w/ GLX). I like it. Not
all graphics are currently shown.
all graphics are currently shown (So when you have a blank screen, press
enter a few times to get passed the screens).
Note: The available targets (binaries) may change over time as I decide
which APIs work the best, etc.
......@@ -90,7 +91,7 @@ Macintosh version) for answering my inquiries.
Steven Fuller <relnev@users.sourceforge.net>
http://wolf3d.sourceforge.net/
----------------------------
TODO (Stuff to Write About):
......
......@@ -11,15 +11,14 @@ TODO:
640x400 or 480 is supported?)
* Finish moving all 2D code to SoftDraw.c
* Finish OpenGL
- Check if topsprite drawing is correct
+ Status bars, Introscreens [DrawShape]
- Not sure exactly yet how I will implement this yet.
- Not exactly sure how I will implement this yet.
- Correct viewing frustum
+ Allow window resizing
- Only bother with 640x480 versions of GameShapes. Minimum for GLQuake
was 640x480, and you could get lower resolutions with software.
- Allow window resizing
- Could use the LastTexture to have less glBegin/Ends (would need to know
where to stop though (try IO_DisplayViewBuffer).
- When all drawing is implemented, remove any unnecessary state/matrix
changes.
* Save/Load Games
* Documentation
* Sound!
......@@ -37,6 +36,9 @@ BUGS:
forth, and walls 'swim' when you move around, or sprites pop into different
sizes when are far enough and get closer/farther away
- Possibly caused by 8.8 imprecision?
* Automap may not be "just right" in OpenGL. Some walls are clipped on the
left side for example.
* If you die/win, and have a key held down, screen passes by too fast
IDEAS:
* Menu Keys
......
......@@ -140,9 +140,12 @@ angle_t PointToAngle(fixed_t x, fixed_t y)
void GameOver(void)
{
FlushKeys();
topspritenum = S_GAMEOVER; /* Game over words */
topspritescale = 8; /* Start the scale factor */
do {
WaitTick();
RenderView(); /* Draw the 3-d view */
topspritescale+=8;
} while (topspritescale<120);
......@@ -173,10 +176,13 @@ void GameOver(void)
void VictoryScale(void)
{
FlushKeys();
topspritenum = S_VICTORY;
topspritescale = 16;
do {
WaitTick();
RenderView();
topspritescale += 16;
} while (topspritescale<240);
......@@ -461,6 +467,7 @@ skipbrief:
nextmap = MapListPtr->InfoArray[gamestate.mapon].NextLevel; /* Normal warp? */
} /* If warped, then nextmap is preset */
if (nextmap == 0xffff) { /* Last level? */
FlushKeys();
VictoryScale(); /* You win!! */
ReleaseMap(); /* Unload the map */
Intermission(); /* Display the wrapup... */
......
/*
Copyright (C) 1992-1994 Id Software, Inc.
Copyright (C) 2000 Steven Fuller <relnev@atdot.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
......
......@@ -31,7 +31,6 @@ Byte *gfxbuf;
void keyboard_handler(int key, int press);
int main(int argc, char *argv[])
{
if (argc != 2) {
......@@ -195,7 +194,9 @@ static int keys[128];
void FlushKeys()
{
while (keyboard_update()) ;
keyboard_clearstate();
gamestate.keys = 0;
joystick1 = 0;
memset(keys, 0, sizeof(keys));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment