Commit f3895b36 authored by Florian Schulze's avatar Florian Schulze

Modified Linux source.

parent 505f2014
25 Feb 2001 - 0.69
initial linux port, worked fine with freebsd too (chuck mason)
26 Feb 2001 - 0.69
made sound be played (chuck mason)
03 Mar 2001 - 0.70
fixing fps (longislandman)
changing player input: 4 player at one keyboard (tarzeau)
pack/unpack which packs/unpacks the leveldata (timecop)
?? Mar 2001 - 0.70
network code has been written (longislandman, jonatkins.org)
it werks but we won't release it until it's good for the masses,
for test and fun play come join #keen on irc.linux.com
(be sure to have one udp port open if you have a firewall,
and also have sdl-mixer, sdl and sdl-net)
16 Mar 2001 - 0.70
did a new screenshot http://jumpbump.mine.nu/port/jumpbumprocks.jpg
wrote a little faq http://jumpbump.mine.nu/port/jumpbumpfaq.txt
put online level-selector-menu http://jumpbump.mine.nu/port/jbmenu.tcl
(received from philippe brochard, thank you!)
20 Mar 2001 - 0.72
repackaged tarballs with network code jnb-net.tar.gz,
menusystem and unpack/pack
http://jumpbump.mine.nu/
http://freshmeat.net/projects/jumpnbump
http://winbe.linuxberg.com/x11html/preview/168332.html
http://linuxapps.com/?page=application&database=current&id=3594
http://www.linux.com/newsitem.phtml?sid=114&aid=11797
http://www.hardcorelinux.com/free-linux-games.htm
http://www.libsdl.org/games_db/games.php3#120
http://www.thelinuxpimp.com/main/article.php?sid=184
http://ee5lance.ee5.yz.yamagata-u.ac.jp/~zinnia/sdl/watch.html
http://outpost-coder.dyndns.org/partners.html
http://brainchilddesign.com/games/jumpnbump/index.html
http://www.pl-berichte.de/programme/index.html
http://providenet.linux.tucows.com/x11html/preview/168332.html
http://bloodybunnies.8m.com
http://gohanz.www7.50megs.com/jumpbump
http://www.geocities.com/bkron2000
jump n bump
is a game for the whole family. you are cute fluffy little bunnies
and hop on the other bunnies' heads.
at the beginning you are in the menu, where you have to jump
over the tree trunk if you want to play and walk right.
then you'll enter the arena. the aim is to jump on the
other bunnies heads...
a,w,d to steer dott
arrows to steer jiffy
j,i,l to steer fizz
4,8,6 to steer mijji (on the numeric pad)
thanks to sabrewulf (chuck mason) in irc.linux.com #keen
who did port this wonderful game! find him, longislandman
and me (tarzeau) on irc.linux.com
thanks also to longisland for working on network code
and timecop for the pack/unpacker
f10 change between windowed/fullscreen mode
(see the XF86Config-4, copy n paste the modeline 400x256
then add the mode "400x256" to whatever bpp you have by default, restart x)
example: add following line in Section "Monitor" of your
/etc/X11/XF86Config (or XF86Config-4)
Modeline "400x256" 22.00 400 416 480 504 256 259 262 269 doublescan
then in Section "Screen" if your DefaultDepth is 24 do be sure you have
something like:
Modes "1024x768" "640x480" "512x384" "400x256" "320x240"
esc/f12 exit
for compilation you will need:
do following on a debian gnu/linux system (www.debian.org)
apt-get install libsdl-dev libsdl-mixer-dev
sdl libraries are needed, you might find it at www.libsdl.org
you can find more levels at http://jumpbump.mine.nu/cgi-bin/jb.sh
which you can start with: ./jnb -dat levelname.dat
there's a screensaver mode as well:
jnb -fireworks -fullscreen
network play works like this, oh well here's an example
player 1: ./jnb -port 7777 -net 0 ip_or_hostname_of_player2 port_of_player2
player 2: ./jnb -port 7777 -net 1 ip_or_hostname_of_player1 port_of_player1
just take port 7777 for all ports and hope it's open and you aren't
firewalled (it's all udp!)
you can add -net 3 and -net 4 for 3rd and 4th player, and be sure
all the players use the same -dat level.dat
(the scoreboards is different on each player and strange things like
that, but longislandman is working on it (isn't it? longislandman? you alive?))
you can find the original dos game (which runs in dos/win9x (dosextender!))
at http://www.brainchilddesign.com/games/jumpnbump/index.html
if you like the game or have any ideas don't hesitate to contact me
tarzeau@space.ch
we need a -nosound parameter because:
From: "Jo eL" <jjshoe@hotmail.com>
Date: Sun, 04 Mar 2001 15:28:33 -0000
make a version which doesnt require sound
wont run for me
the network code is working (testing)
/join #keen on irc.linux.com
March 11 2001 (done by LongIslandMan, http://jonatkins.org)
# XF86Config-4 (XFree86 server configuration file) generated by Dexconf, the
# Debian X Configuration tool, using values from the debconf database.
#
# Edit this file with caution, and see the XF86Config manual page.
# (Type "man XF86Config" at the shell prompt.)
Section "Files"
FontPath "unix/:7100" # local font server
# if the local font server has problems, we can fall back on these
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/cyrillic"
FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/Type1"
FontPath "/usr/lib/X11/fonts/Speedo"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"
EndSection
Section "ServerFlags"
EndSection
Section "Module"
Load "ddc"
Load "GLcore"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "pex5"
Load "record"
Load "xie"
Load "bitmap"
Load "freetype"
Load "speedo"
Load "type1"
Load "vbe"
Load "int10"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "de_CH"
EndSection
Section "InputDevice"
Identifier "Generic Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/ttyS0"
Option "Protocol" "Microsoft"
EndSection
Section "Device"
Identifier "Generic Video Card"
Driver "nvidia"
EndSection
Section "Monitor"
Identifier "Generic Monitor"
HorizSync 28-57
VertRefresh 43-90
Option "DPMS"
#Modeline "320x240" 15.75 320 336 384 400 240 244 246 262 doublescan
Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 doublescan
Modeline "400x256" 22.00 400 416 480 504 256 259 262 269 doublescan
Modeline "512x384" 22.00 512 528 592 640 384 385 388 404 -hsync -vsync
#Modeline "320x240" 15.750 320 336 384 400 240 244 246 262 doublescan
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1152x864" "1024x768" "640x480" "320x240"
EndSubSection
SubSection "Display"
Depth 4
Modes "1152x864" "1024x768" "640x480" "320x240"
EndSubSection
SubSection "Display"
Depth 8
Modes "1152x864" "1024x768" "640x480" "320x240"
EndSubSection
SubSection "Display"
Depth 15
Modes "1152x864" "1024x768" "640x480" "320x240"
EndSubSection
SubSection "Display"
Depth 16
Modes "1152x864" "1024x768" "640x480" "320x240"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "640x480" "512x384" "400x256" "320x240"
#"1280x1024" "1152x864"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Generic Mouse"
EndSection
Section "DRI"
Mode 0666
EndSection
# end of XF86Config
#ifndef __CONFIG_H
#define __CONFIG_H
#undef DOS
#ifndef DOS
# define LINUX
#endif
#ifdef LINUX
# define NOSOUND
# define JNB_WIDTH 400
# define JNB_HEIGHT 256
#endif
/*
#define __USE_XOPEN
#define __USE_BSD
#define __USE_POSIX
*/
#endif
......@@ -7,9 +7,9 @@
1000000000000011110001
1000000000000000000011
1110011100000000000111
1000000000002200000001
1000000000022220000001
1044440000222222222001
1000000000003100000001
1000000000031110000001
1011110000311111111001
1000000000000000000001
1100000000000000000011
2222222214000001333111
......
#ifndef __GLOBALS_H
#define __GLOBALS_H
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <dpmi.h>
#include <sys/nearptr.h>
#include <pc.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <math.h>
#include <dj.h>
#ifdef DOS
# include <conio.h>
# include <dpmi.h>
# include <sys/nearptr.h>
# include <pc.h>
#endif
#ifdef USE_SDL
# include <sys/stat.h>
# include <SDL/SDL.h>
# include <SDL/SDL_mixer.h>
#endif
#ifndef USE_SDL
#define KEY_PL1_LEFT 0xcb
#define KEY_PL1_RIGHT 0xcd
#define KEY_PL1_JUMP 0xc8
#define KEY_PL2_LEFT 0x1e
#define KEY_PL2_RIGHT 0x20
#define KEY_PL2_JUMP 0x11
#else
#define KEY_PL1_LEFT SDLK_LEFT
#define KEY_PL1_RIGHT SDLK_RIGHT
#define KEY_PL1_JUMP SDLK_UP
#define KEY_PL2_LEFT SDLK_a
#define KEY_PL2_RIGHT SDLK_d
#define KEY_PL2_JUMP SDLK_w
#define KEY_PL3_LEFT SDLK_j
#define KEY_PL3_RIGHT SDLK_l
#define KEY_PL3_JUMP SDLK_i
#define KEY_PL4_LEFT SDLK_KP4
#define KEY_PL4_RIGHT SDLK_KP6
#define KEY_PL4_JUMP SDLK_KP8
#endif
#define NUM_POBS 200
#define NUM_OBJECTS 200
......@@ -127,18 +157,18 @@ char *rabbit_gobs;
char *font_gobs;
// main.c
/* main.c */
void steer_players(void);
void position_player(short player_num);
void fireworks(void);
void add_object(char type, short x, short y, long x_add, long y_add, short anim, short frame);
void update_objects(void);
char add_pob(int page, short x, short y, short image, char *pob_data);
void draw_pobs(char page);
void redraw_pob_backgrounds(char page);
char add_leftovers(char page, short x, short y, short image, char *pob_data);
void draw_leftovers(char page);
char add_pob(char page, short x, short y, short image, char *pob_data);
void draw_pobs(int page);
void redraw_pob_backgrounds(int page);
char add_leftovers(int page, short x, short y, short image, char *pob_data);
void draw_leftovers(int page);
char init_level(short level);
void deinit_level(void);
char init_program(int argc, char *argv[]);
......@@ -153,14 +183,14 @@ int dat_filelen(char *file_name, char *dat_name);
void write_calib_data(void);
// menu.c
/* menu.c */
char menu(void);
char menu_init(void);
void menu_deinit(void);
// gfx.c
/* gfx.c */
void open_screen(void);
void wait_vrt(void);
......@@ -177,16 +207,41 @@ short pob_hs_x(short image, char *pob_data);
short pob_hs_y(short image, char *pob_data);
char read_pcx(FILE * handle, char *buffer, long buf_len, char *pal);
// gfx.s
/* gfx.c */
void get_block(char page, long x, long y, long width, long height, char *buffer);
void put_block(char page, long x, long y, long width, long height, char *buffer);
#ifdef LINUX
long filelength(int handle);
void setpalette(int index, int count, char *palette);
void fillpalette(int red, int green, int blue);
void flippage(long page);
void fs_toggle();
char *get_vgaptr(long, long, long);
#endif
// interrpt.c
/* interrpt.c */
volatile char last_keys[50];
extern char last_keys[50];
char hook_keyb_handler(void);
void remove_keyb_handler(void);
char key_pressed(unsigned char key);
#ifdef LINUX
char intr_sysupdate();
#endif
/* sound-linux.c */
#ifdef LINUX
void load_song(FILE *, signed int);
void play_song();
void update_song();
void initsound();
void songquit();
#endif
#endif
pack:
pack -o /tmp/jumpbump.dat <file1> <file2> <file3> etc
or you can just put all the files in a dir, cd to that dir, and do
pack -o /tmp/jnb.dat *
and it will put all the files in the current dir inside the packfile.
Not much error checking, but most user stupidity is caught before bad
things happen. don't try things like pack -o stuff.dat ../file.c
because it will add "../file.c" as the filename in the packfile, which
will certainly fuck things up.
unpack:
unpack filename.dat
will unpack it in the current directory. there is no error checking, so
if you give it /proc/kcore as input, you will probably end up with a whole
bunch of files with really difficult to delete filenames.
take a look at the code, its actualy Mad Simple(tm). Just like I thought,
the files were not compressed. I commented pack.c sparsely, but unpack.c
is just so simple it doesn't need commenting.
Order of files in the .dat archive doesnt matter - bump.mod doesn't have
to be first, etc. Loader finds them just fine.
In order to make sense of the code, it needs to be split up into a lot of
little .c files, each dealing with a set of things. Also, DOS/whatever
support needs to be dropped, because it's impossible to understand shit
through a mess of #ifdef etc. Each .c would deal with say, .dat I/O, gfx,
players, AI, network, game init, music, etc. The way the shit is right
now its one hell of a huge mess that makes very little sense.
I am going to play around with modularizing the code and trying to
understand it, and hopefully make some sense out of it. Before it makes
sense its pointless trying to add things.
tc
little faq for jump n bump on linux
Q: -nosound option doesn't werk?
A: we know, it will be fixed some day... (contributions welcome)
Q: sound effects sound other than on the dos version!
A: i know, the *plop* (if you kill some bunnies) comes too late (lagged)
and sounds completely wrong too?
there's sound effects missing if you are near the flies and if
you jump into the water (the *splash* is missing)
Q: i can't download this or that level. you not have enough bandwith?
A: longislandman did a mirror try it from there
http://jonatkins.org/jumpnbump/levels/
he has got most of the levels i have (some are missing maybe)
Q: can i do my own level? how?
A: sure.. (oh i will explain some day later how et al..)
Q: do i need click each level one by one to save them? i want all of them?
A: no just go into your jumpnbump directory into data there type
wget --no-parent -r -l1 http://jumpbump.mine.nu/levels.bz2
mv jumpbump.mine.nu/*.bz2 .
rm -rf jumpbump.mine.nu
bunzip *.bz2
(oh well i didn't thest it :)
Q: my menuselector looks other than yours?
A: that's probably because i have tkstep8.0 and changed the first
line in jbrun.tcl to (wish8.0)
Q: i want to do a link to your homepage?
A: find banners here http://jumpbump.mine.nu/jbbanner1.jpg
here http://jumpbump.mine.nu/jbbanner2.jpg
and here http://jumpbump.mine.nu/jbbanner3.jpg
add something like this to your homepage:
<a href="http://jumpbump.mine.nu"><img src="http://jumpbump.mine.nu/jbbanner1.jpg" width="325" height="50">
This diff is collapsed.
#include "globals.h"
#define NUM_MESSAGES 24
#define NUM_MESSAGES 25
char *menu_background;
......@@ -14,6 +14,7 @@ char message[NUM_MESSAGES][70] = {
"Graphics by Martin Magnusson",
"and Andreas Brynervall.",
"Music by Anders Nilsson.",
"Linux port by Chuck Mason.",
"Visit our homepage at:",
"http://www.algonet.se/~mattiasb",
"Jump 'n Bump is e-mailware.",
......@@ -40,7 +41,7 @@ char menu(void)
int c1;
char esc_pressed;
char end_loop_flag, new_game_flag, fade_flag;
char mod_vol, mod_fade_direction;
char mod_vol = 0, mod_fade_direction = 0;
int cur_message;
int fade_dir, fade_count, fade_tick;
char fade_pal[48];
......@@ -57,9 +58,8 @@ char menu(void)
dj_set_nosound(0);
memset(fade_pal, 0, 48);
outportb(0x3c8, 240);
for (c1 = 0; c1 < 48; c1++)
outportb(0x3c9, fade_pal[c1]);
setpalette(240, 16, fade_pal);
fade_dir = 0;
fade_count = 0;
fade_tick = 0;
......@@ -76,6 +76,7 @@ char menu(void)
while (1) {
dj_mix();
intr_sysupdate();
if (key_pressed(1) == 1 && esc_pressed == 0) {
end_loop_flag = 1;
......@@ -107,7 +108,7 @@ char menu(void)
}
player[c1].enabled = 1;
}
if ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 0) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 0) || (c1 == 2 && joy.but1 == 0) || (c1 == 3 && ((main_info.num_mouse_buttons == 3 && mouse.but3 == 0) || (main_info.num_mouse_buttons == 2 && mouse.but1 == 0 && mouse.but2 == 0)))) {
if ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 0) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 0) || (c1 == 2 && key_pressed(KEY_PL3_JUMP) == 0) || (c1 == 3 && key_pressed(KEY_PL4_JUMP) == 0)) {
if (player[c1].y_add < 0) {
player[c1].y_add += 32768;
if (player[c1].y_add > 0)
......@@ -143,7 +144,7 @@ char menu(void)
player[c1].frame_tick = 0;
player[c1].image = player_anims[player[c1].anim].frame[player[c1].frame].image + player[c1].direction * 9;
}
if ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 0) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 0) || (c1 == 2 && joy.but1 == 0) || (c1 == 3 && ((main_info.num_mouse_buttons == 3 && mouse.but3 == 0) || (main_info.num_mouse_buttons == 2 && mouse.but1 == 0 && mouse.but2 == 0))))
if ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 0) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 0) || (c1 == 2 && key_pressed(KEY_PL3_JUMP) == 0) || (c1 == 3 && key_pressed(KEY_PL4_JUMP) == 0))
player[c1].jump_ready = 1;
}
}
......@@ -159,7 +160,7 @@ char menu(void)
}
}
} else {
if ((c1 == 0 && key_pressed(KEY_PL1_LEFT) == 1 && key_pressed(KEY_PL1_RIGHT) == 1) || (c1 == 1 && key_pressed(KEY_PL2_LEFT) == 1 && key_pressed(KEY_PL2_RIGHT) == 1) || (c1 == 2 && joy.x < -512 && joy.x > 512) || (c1 == 3 && mouse.but1 == 1 && mouse.but2 == 1)) {
if ((c1 == 0 && key_pressed(KEY_PL1_LEFT) == 1 && key_pressed(KEY_PL1_RIGHT) == 1) || (c1 == 1 && key_pressed(KEY_PL2_LEFT) == 1 && key_pressed(KEY_PL2_RIGHT) == 1) || (c1 == 2 && key_pressed(KEY_PL3_LEFT) == 1 && key_pressed(KEY_PL3_RIGHT) == 1) || (c1 == 3 && key_pressed(KEY_PL4_LEFT) == 1 && key_pressed(KEY_PL4_RIGHT) == 1)) {
if (player[c1].direction == 1) {
if ((player[c1].x >> 16) <= (165 + c1 * 2) || (player[c1].x >> 16) >= (208 + c1 * 2)) {
if (player[c1].x_add > 0) {
......@@ -213,7 +214,7 @@ char menu(void)
player[c1].image = player_anims[player[c1].anim].frame[player[c1].frame].image + player[c1].direction * 9;
}
}
} else if ((c1 == 0 && key_pressed(KEY_PL1_LEFT) == 1) || (c1 == 1 && key_pressed(KEY_PL2_LEFT) == 1) || (c1 == 2 && joy.x < -512) || (c1 == 3 && mouse.but1 == 1)) {
} else if ((c1 == 0 && key_pressed(KEY_PL1_LEFT) == 1) || (c1 == 1 && key_pressed(KEY_PL2_LEFT) == 1) || (c1 == 2 && key_pressed(KEY_PL3_LEFT) == 1) || (c1 == 3 && key_pressed(KEY_PL4_LEFT) == 1)) {
if ((player[c1].x >> 16) <= (165 + c1 * 2) || (player[c1].x >> 16) >= (208 + c1 * 2)) {
if (player[c1].x_add > 0) {
player[c1].x_add -= 16384;
......@@ -239,7 +240,7 @@ char menu(void)
player[c1].frame_tick = 0;
player[c1].image = player_anims[player[c1].anim].frame[player[c1].frame].image + player[c1].direction * 9;
}
} else if ((c1 == 0 && key_pressed(KEY_PL1_RIGHT) == 1) || (c1 == 1 && key_pressed(KEY_PL2_RIGHT) == 1) || (c1 == 2 && joy.x > 512) || (c1 == 3 && mouse.but2 == 1)) {
} else if ((c1 == 0 && key_pressed(KEY_PL1_RIGHT) == 1) || (c1 == 1 && key_pressed(KEY_PL2_RIGHT) == 1) || (c1 == 2 && key_pressed(KEY_PL3_RIGHT) == 1) || (c1 == 3 && key_pressed(KEY_PL4_RIGHT) == 1)) {
if ((player[c1].x >> 16) <= (165 + c1 * 2) || (player[c1].x >> 16) >= (208 + c1 * 2)) {
if (player[c1].x_add < 0) {
player[c1].x_add += 16384;
......@@ -299,7 +300,7 @@ char menu(void)
player[c1].image = player_anims[player[c1].anim].frame[player[c1].frame].image + player[c1].direction * 9;
}
}
if (player[c1].jump_ready == 1 && ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 1) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 1) || (c1 == 2 && joy.but1 == 1) || (c1 == 3 && ((main_info.num_mouse_buttons == 3 && mouse.but3 == 1) || (main_info.num_mouse_buttons == 2 && mouse.but1 == 1 && mouse.but2 == 1))))) {
if (player[c1].jump_ready == 1 && ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 1) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 1) || (c1 == 2 && key_pressed(KEY_PL3_JUMP) == 1) || (c1 == 3 && key_pressed(KEY_PL4_JUMP) == 1))) {
if ((player[c1].x >> 16) <= (165 + c1 * 2) || (player[c1].x >> 16) >= (208 + c1 * 2)) {
if ((player[c1].y >> 16) >= (160 + c1 * 2)) {
player[c1].y_add = -280000L;
......@@ -322,14 +323,14 @@ char menu(void)
}
}
}
if ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 0) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 0) || (c1 == 2 && joy.but1 == 0) || (c1 == 3 && ((main_info.num_mouse_buttons == 3 && mouse.but3 == 0) || (main_info.num_mouse_buttons == 2 && mouse.but1 == 0 && mouse.but2 == 0)))) {
if ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 0) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 0) || (c1 == 2 && key_pressed(KEY_PL3_JUMP) == 0) || (c1 == 3 && key_pressed(KEY_PL4_JUMP) == 0)) {
if (player[c1].y_add < 0) {
player[c1].y_add += 32768;
if (player[c1].y_add > 0)
player[c1].y_add = 0;
}
}
if ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 0) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 0) || (c1 == 2 && joy.but1 == 0) || (c1 == 3 && ((main_info.num_mouse_buttons == 3 && mouse.but3 == 0) || (main_info.num_mouse_buttons == 2 && (mouse.but1 == 0 || mouse.but2 == 0)))))
if ((c1 == 0 && key_pressed(KEY_PL1_JUMP) == 0) || (c1 == 1 && key_pressed(KEY_PL2_JUMP) == 0) || (c1 == 2 && key_pressed(KEY_PL3_JUMP) == 0) || (c1 == 3 && key_pressed(KEY_PL4_JUMP) == 0))
player[c1].jump_ready = 1;
player[c1].y_add += 12288;
if (player[c1].y_add > 36864 && player[c1].anim != 3) {
......@@ -445,9 +446,13 @@ char menu(void)
}
fade_count++;
} else {
/*
outportw(0x3c4, 0x0f02);
memset((char *) (0xa0000 + 220 * 100 + __djgpp_conventional_base), 0, 2000);
memset((char *) (0xa0000 + 32768 + 220 * 100 + __djgpp_conventional_base), 0, 2000);
/* clear 5 lines at x=0,y=220 in front and backbuffer */
*/memset((void *) get_vgaptr(0, 0, 220), 0, 8000);
cur_message++;
if (cur_message >= NUM_MESSAGES)
cur_message -= NUM_MESSAGES;
......@@ -481,23 +486,25 @@ char menu(void)
main_info.draw_page ^= 1;
main_info.view_page ^= 1;
#ifndef LINUX
outportw(0x3d4, (main_info.view_page << 23) + 0x0d);
outportw(0x3d4, ((main_info.view_page << 15) & 0xff00) + 0x0c);
#else
flippage(main_info.view_page);
#endif
/*
while ((inportb(0x3da) & 8) == 0)
dj_mix();
while ((inportb(0x3da) & 8) == 8)
dj_mix();
*/
if (fade_flag != 0) {
outportb(0x3c8, 0);
for (c1 = 0; c1 < 720; c1++)
outportb(0x3c9, menu_cur_pal[c1]);
setpalette(0, 240, menu_cur_pal);
}
outportb(0x3c8, 240);
for (c1 = 0; c1 < 48; c1++)
outportb(0x3c9, fade_pal[c1]);
setpalette(240, 16, fade_pal);
dj_mix();
......@@ -516,9 +523,7 @@ char menu_init(void)
FILE *handle;
int c1;
outportb(0x3c8, 0);
for (c1 = 0; c1 < 768; c1++)
outportb(0x3c9, 0);
fillpalette(0, 0, 0);
if ((handle = dat_open("menu.pcx", datfile_name, "rb")) == 0) {
strcpy(main_info.error_str, "Error loading 'menu.pcx', aborting...\n");
......@@ -570,7 +575,5 @@ char menu_init(void)
void menu_deinit(void)
{
dj_set_nosound(1);
}
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