Screenshots in software mode (menus) implemented.

This commit is contained in:
Steven Fuller 2001-12-06 01:33:14 +00:00 committed by Patryk Obara
parent 9f006f18fe
commit 9a32158ae8
3 changed files with 38 additions and 8 deletions

13
README
View file

@ -41,14 +41,19 @@ windows/vmware (read below to find out why), or download the AvP Alien demo.
If you are wanting to run the Alien demo (the installer is an .exe but you
can just use unzip to extract the files from the .exe), add -DALIEN_DEMO to
the CFLAGS line (the one that's uncommented) in the Makefile. Rename all game
files lowercase. Be sure to install SDL 1.2 (http://www.libsdl.org), nasm
0.98, and the latest OpenAL CVS (http://www.openal.org).
files lowercase. Be sure to install SDL 1.2 (http://www.libsdl.org) with
OpenGL support, nasm 0.98, and the latest OpenAL CVS (http://www.openal.org).
AvP requires a 3d card with OpenGL support to work.
Create the MPConfig and User_Profiles directories if they do not exist.
(Note: Windows profiles probably do not work in Linux and vice versa)
If you have the regular edition, add -DREGULAR_EDITION to CFLAGS.
If the version you want to use is not the Gold Edition, download
http://www.icculus.org/avp/english.txt.gz, extract it, and rename it
language.txt (Regular Ed.) or aenglish.txt (Alien Demo).
If you get "Aborted" after starting a new game the second time or so,
try recompiling with gcc-3.0.2. It seems to have fixed it for me, but I'll
try to find a workaround that works with gcc-2.95.
@ -67,10 +72,6 @@ MPConfig/ User_Profiles/
Support for the demo is not quite complete (some sounds are missing and some
text is incorrect/missing).
If the version you want to use is not the Gold Edition, download
http://www.icculus.org/avp/english.txt.gz, extract it, and rename it
language.txt (Regular Ed.) or aenglish.txt (Alien Demo).
Linux Port-specific commands:
- ALT-ENTER for fullscreen

2
TODO
View file

@ -2,7 +2,7 @@
[DONE] [08/26/01] Fix sound code.
[DONE] [11/10/01] Save/Load Game support.
[DONE] [11/25/01] CD Audio.
* Menus.
[DONE] [12/05/01] Menus.
* Progress bar.
* Make vidmodes work.
* Debug "pure virtual method called"

View file

@ -99,7 +99,36 @@ unsigned char *GetScreenShot24(int *width, int *height)
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glReadPixels(0, 0, surface->w, surface->h, GL_RGB, GL_BYTE, buf);
} else {
fprintf(stderr, "GetScreenShot24: add software mode 16->24!\n");
unsigned char *ptrd;
unsigned short int *ptrs;
int x, y;
if (SDL_MUSTLOCK(surface)) {
if (SDL_LockSurface(surface) < 0) {
free(buf);
return NULL; /* ... */
}
}
ptrd = buf;
for (y = 0; y < surface->h; y++) {
ptrs = (unsigned short *)(((unsigned char *)surface->pixels) + (surface->h-y-1)*surface->pitch);
for (x = 0; x < surface->w; x++) {
unsigned int c;
c = *ptrs;
ptrd[0] = (c & 0xF800)>>8;
ptrd[1] = (c & 0x07E0)>>3;
ptrd[2] = (c & 0x001F)<<3;
ptrs++;
ptrd += 3;
}
}
if (SDL_MUSTLOCK(surface)) {
SDL_UnlockSurface(surface);
}
}
*width = surface->w;