Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions doc/manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ You also must return to a base when the last enemy goes down.
The bases may also be destroyed along with all the other terrain, but
they regenerate in time.
The game can be paused with key F11 (and unpaused with the same key).
You can also save a screenshot by pressing key F12 (fileformat is
640x480x256 RIX and filename is KOPSSHOT.RIX). The game can be run in
windowed mode if started with parameter -c1.
The game can be run in windowed mode if started with parameter -c1.

.------------------------------------------------------------------------.
| 3.1 Weapons |
Expand Down
16 changes: 0 additions & 16 deletions src/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
/* #define VRC */
/* #define RASTER */

#define SCREENSHOTS

int isqrt(int num)
{
return (int)sqrt((double)num);
Expand Down Expand Up @@ -904,20 +902,6 @@ void game()
}
}

/*
* f12 saves screen to SHOT.RIX
*/
#ifdef SCREENSHOTS
if (key(K_F12)) {
gamepause = 1;
savescreenrix("kopsshot.rix");
while (key(K_F12)) {
update();
}
gamepause = 0;
}
#endif

/*
* game pause
*/
Expand Down
85 changes: 0 additions & 85 deletions src/gamefunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,88 +809,3 @@ void newboom(int xp, int yp, char type, char transp, char speed)
boom[nextboom].speed = speed;
nextboom = (nextboom + 1) % MAXBOOMS;
}

void savescreenrix(char *fname)
{
FILE *fp;
Uint8 r, g, b;
int a;
Uint8 *tmp;
Uint8 *tpic = NULL;

fp = fopen(fname, "wb");
tmp = (Uint8 *)malloc(307200);
if (tmp == NULL) {
jerror("SAVESCREENRIX/screen.malloc: No memory", 307200);
}
tpic = (Uint8 *)malloc(WINW * WINH + 4);
if (tpic == NULL) {
jerror("SAVESCREENRIX/tpic.malloc: No memory", WINW * WINH + 4);
}
util_loadpcx((char *)tpic, FILLERPICFILE, WINW * WINH);
if (gamewindowcolorrand) {
for (a = 0; a < WINW * WINH; a++) {
*(tpic + a) -= 8;
}
}
jcblockclip(0, 0, 320, 240, 0, 0, 639, 479, 640, tmp, tpic);
jcblockclip(320, 0, 320, 240, 0, 0, 639, 479, 640, tmp, tpic);
jcblockclip(0, 240, 320, 240, 0, 0, 639, 479, 640, tmp, tpic);
jcblockclip(320, 240, 320, 240, 0, 0, 639, 479, 640, tmp, tpic);
free(tpic);
tpic = NULL;

if (plr[0].active) {
for (a = 0; a < WINH; a++) {
memcpy(tmp + (a + 240) * 640 + 320, plr[0].scr + a * WINW, WINW);
}
}
if (plr[1].active) {
for (a = 0; a < WINH; a++) {
memcpy(tmp + a * 640, plr[1].scr + a * WINW, WINW);
}
}
if (plr[2].active) {
for (a = 0; a < WINH; a++) {
memcpy(tmp + a * 640 + 320, plr[2].scr + a * WINW, WINW);
}
}
if (plr[3].active) {
for (a = 0; a < WINH; a++) {
memcpy(tmp + (a + 240) * 640, plr[3].scr + a * WINW, WINW);
}
}
b = 0x52;
fwrite(&b, 1, 1, fp);
b = 0x49;
fwrite(&b, 1, 1, fp);
b = 0x58;
fwrite(&b, 1, 1, fp);
b = 0x33;
fwrite(&b, 1, 1, fp);
b = 0x80;
fwrite(&b, 1, 1, fp);
b = 0x02;
fwrite(&b, 1, 1, fp);
b = 0xE0;
fwrite(&b, 1, 1, fp);
b = 0x01;
fwrite(&b, 1, 1, fp);
b = 0xAF;
fwrite(&b, 1, 1, fp);
b = 0x00;
fwrite(&b, 1, 1, fp);
for (a = 0; a < 256; a++) {
// outp(0x3c7,a); r=inp(0x3c9); g=inp(0x3c9); b=inp(0x3c9);
r = palette[a].r >> 2;
g = palette[a].g >> 2;
b = palette[a].b >> 2;
fwrite(&r, 1, 1, fp);
fwrite(&g, 1, 1, fp);
fwrite(&b, 1, 1, fp);
}
fwrite(tmp, 307200, 1, fp);
free(tmp);
tmp = NULL;
fclose(fp);
}
1 change: 0 additions & 1 deletion src/gamefunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ extern void newammocrap(int nro, int type);
extern void newpickammo();
extern void newcrap(int xp, int yp, int type);
extern void newboom(int xp, int yp, int type, int transp, int speed);
extern void savescreenrix(char *fname);

#endif /* !GAMEFUNC_H_INCLUDED */