Skip to content

Commit

Permalink
MegaZeux 2.51s3.2 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelva1984 committed Aug 11, 2008
1 parent 268b6ee commit e5f250b
Show file tree
Hide file tree
Showing 12 changed files with 125 additions and 20 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
@@ -1,3 +1,10 @@
2.51s3.2 release:
+ Removed password protection (no use for it because of Getpw)
+ New counter: BIMesg. Set to 0 to turn off messages like "Ouch!"
+ Source code *PATCH* can be found at: www.geocities.com/obinator256/galaxy.html
(you must unzip the patch in the source directory, overwriting the original files)


2.51s3.1 release:
+ Fixed damage table, now works correctly
+ Fixed unworking alt+s
Expand Down
2 changes: 1 addition & 1 deletion README.1ST
@@ -1,6 +1,6 @@

IMPORTANT NOTICE:
PLEASE READ THIS FILE BEFORE TRYING TO USE MZX 2.51S3.1! YOU ALREADY DID,
PLEASE READ THIS FILE BEFORE TRYING TO USE MZX 2.51S3.2! YOU ALREADY DID,
DIDN'T YOU? YOU RAN THE PROGRAM AND IT DIDN'T WORK AND NOW YOU'RE ALL
UPSET AND YOU THINK IT'S OUR FAULT, DON'T YOU? HA HA HA! SEE IF I HELP
YOU OUT! I'M GUESSING THE SOUND DOESN'T WORK, RIGHT? TOO BAD! MAYBE
Expand Down
7 changes: 7 additions & 0 deletions counter.cpp
Expand Up @@ -36,8 +36,11 @@
#include "game.h"
#include "game2.h"

void set_built_in_messages(int param);

int player_restart_x=0,player_restart_y=0,gridxsize=1,gridysize=1;
int myscrolledx=0,myscrolledy=0;

char was_zapped=0;
extern char mid_prefix;
void prefix_xy(int&fx,int&fy,int&mx,int&my,int&lx,int&ly,int robotx,
Expand Down Expand Up @@ -159,6 +162,10 @@ void set_counter(char far *name,int value,unsigned char id) {
// This should PROBABLY be a variable, instead of a counter,
// but I DID have a reason for using a counter, if I ever
// remember it. Spid
if(!str_cmp(name,"BIMESG")) {
if (value==1) set_built_in_messages(1);
if (value==0) set_built_in_messages(0);
} //Don't return! Spid
if(!str_cmp(name,"MOUSEX")) {
if(value>79) value=79;
if(value<0) value=0;
Expand Down
2 changes: 2 additions & 0 deletions data.h
Expand Up @@ -137,6 +137,7 @@ extern unsigned char lazwall_start;//Local
extern int scroll_x;//Local // Something is SERIOUSLY wrong with these two, counter.cpp
extern int scroll_y;//Local // can't even see them! Spid


extern unsigned int locked_x;//Local (-1 or 65535 for none)
extern unsigned int locked_y;//Local (-1 or 65535 for none)
extern unsigned char protection_method;
Expand Down Expand Up @@ -174,6 +175,7 @@ extern Scroll far *scrolls;
extern Counter far *counters;
extern Sensor far *sensors;


extern char far *music_devices[NUM_DEVICES+1];
extern char far *music_MSEs[NUM_DEVICES];
extern unsigned int mixing_rates[NUM_DEVICES][3];
Expand Down
13 changes: 13 additions & 0 deletions develop.txt
@@ -0,0 +1,13 @@
How to compile Mzx2.51s3.2
--------------------------

Get Turbo C++ version 3.0
Get Turbo Asm version 3.0 (hard to find, search for tasm3.zip)
Get the Bells, whistles and Sound boards library (easy to find)
Put " PATH = C:\TC\BIN ; %PATH% " in your autoexc.bat (change the directory to where you've put TC)
Open the TurboC ide
Open Megazeux.prj
Put the bwsb libs in C:\tc\lib
Put the bwsb headers in C:\tc\include
Put Turbo asm into C:\tc\bin
BUILD ALL the whole thing
15 changes: 15 additions & 0 deletions ezboard.cpp
Expand Up @@ -39,6 +39,10 @@
#include "game.h"
#include "counter.h"

void set_built_in_messages(int param);

int built_in_messages;

// The way boards work-
// There is the current board, in memory, and all other boards, in memory.
// They are stored in conventional, EMS, or temp files. The current board
Expand Down Expand Up @@ -265,6 +269,7 @@ void clear_world(char clear_curr_file) {
//Clear global robot
clear_robot(GLOBAL_ROBOT);
robots[GLOBAL_ROBOT].used=1;
set_built_in_messages(1);
//Clear all other global parameters
mem_cpy((char far *)id_chars,(char far *)def_id_chars,324);
mem_cpy((char far *)bullet_color,(char far *)def_id_chars+324,3);
Expand Down Expand Up @@ -350,3 +355,13 @@ void clear_zero_objects(void) {
clear_scroll(0);
clear_sensor(0);
}

void set_built_in_messages(int param)
{
built_in_messages = param;
}

int get_built_in_messages(void)
{
return (built_in_messages);
}
1 change: 1 addition & 0 deletions ezboard.h
Expand Up @@ -35,5 +35,6 @@ void clear_current(char adopt_settings=0);
void clear_world(char clear_curr_file=1);
void clear_game_params(void);
void clear_zero_objects(void);
extern int built_in_messages; // Stupid place to put this, as it belongs to data.h

#endif
16 changes: 10 additions & 6 deletions game.cpp
Expand Up @@ -67,6 +67,8 @@
#include "blink.h"
#include "cursor.h"

int get_built_in_messages(void);

char far *main_menu= "F1/H - Help\n"
"Enter- Menu\n"
"Esc - Exit to DOS\n"
Expand Down Expand Up @@ -592,13 +594,15 @@ void update_variables(char slowed) {

void set_mesg(char far *str) {
enter_func("set_mesg");
//Sets the current message
if(str_len(str)>80) {
mem_cpy(bottom_mesg,str,80);
bottom_mesg[80]=0;
if (get_built_in_messages()){
//Sets the current message
if(str_len(str)>80) {
mem_cpy(bottom_mesg,str,80);
bottom_mesg[80]=0;
}
else str_cpy(bottom_mesg,str);
b_mesg_timer=160;
}
else str_cpy(bottom_mesg,str);
b_mesg_timer=160;
exit_func();
}

Expand Down
60 changes: 54 additions & 6 deletions help.doc
Expand Up @@ -34,7 +34,7 @@ $~A
>#MEGAZEUX.HLP:1st:MegaZeux Limitations
>#IFYOUFIN.HLP:1st:If You Find a Bug...
>Please:Registration Info- MegaZeux is Not Free
>#NEWINVER.HLP:1st:NEW in Version 2.51s3.1! (Changes Since Version 1.03)
>#NEWINVER.HLP:1st:NEW in Version 2.51s3.2! (Changes Since Version 1.03)

$** Credits and Acknowledgments **

Expand Down Expand Up @@ -147,7 +147,7 @@ $~EWelcome to MegaZeux! Use the arrow keys to Scroll
$~Ethis text, and ESC when you are done reading.

$~BPress END to learn about the NEW FEATURES in
$~BMegaZeux 2.51s3.1!
$~BMegaZeux 2.51s3.2!

As you may already know, MegaZeux is a game system which
allows you to play almost limitless worlds in EGA graphics
Expand Down Expand Up @@ -181,7 +181,7 @@ ESC now to exit to the game.
>#CONTROLS.HLP:091:Controls
>#THEWORLD.HLP:1st:The World Editor

>#NEWINVER.HLP:1st:WHAT'S NEW in version 2.51s3.1!
>#NEWINVER.HLP:1st:WHAT'S NEW in version 2.51s3.2!
#CONTROLS.HLP
:091:Controls

Expand Down Expand Up @@ -605,13 +605,15 @@ ammo to your supplies. The amount may be different for
different piles. Some worlds or sections of worlds may have
weapons with infinite ammunition.

~BBomb ~0
~BBomb ~0


Each bomb you grab adds another to your supply. The sound made
when you grab the bomb will be high-pitched for a high strength
bomb, and low-pitched for a low strength bomb.

~BKey ~A
~BKey ~A


Collect keys to open locks, doors, and gates later on. The key
and the lock/etc. must match colors, and a key will only work
Expand Down Expand Up @@ -5275,6 +5277,47 @@ effects.
The direction the player is facing- 0 1 2 3 for N S E W. Used to
determine which player character to display.

~BMOUSEX
~BMOUSEY

The position of the mouse cursor on the screen.

~BMBOARDX
~BMBOARDY

The position of the mouse cursor on the board.

~BBUTTONS

The mouse buttons.
0 - No button pressed
1 - Left button pressed
2 - Right button pressed
3 - Left and Right button pressed
4-7 - As 0-3 with Middle button pressed

~BCURSORSTATE

Turns the hardware mouse cursor on/off
0 - Off
1 - On

~BSCROLLEDX
~BSCROLLEDY

The position of the left corner of the screen

~BPLAYERX
~BPLAYERY

The player's position

~BBIMESG

Turns the built-in messages (such as "Ouch!") on/off.
0 - Off
1 - On(default)

>#ROBOTICR.HLP:087:Robotic Reference Manual
>#MAIN.HLP:072:Table of Contents
#USINGTHE.HLP
Expand Down Expand Up @@ -5895,7 +5938,7 @@ Formatting' section for more advanced programming.
#NEWINVER.HLP
:1st:NEW in Version 2.51! (Changes Since Version 1.03)

For information on mzx s3.1, read readme.1st.
For information on mzx s3.2, read readme.1st.

$~ENEW in version 2.51- ALL NEW music/sound code! 32-channels;
$~Ebug-free; support for stereo, 16-bit, GUS, and PAS-16;
Expand All @@ -5912,6 +5955,11 @@ Note- This is a direct translation from the file WHATSNEW.251,
included with MegaZeux. If you haven't used version 1.03 or
before, you probably won't understand much of this list.

~E2.51s3.2 release:

+ Removed password protection
+ Added new counter BIMesg to turn off built-in messages (Such as "Ouch!")

~E2.51s3.1 release:

+ Fixed damage table, now works correctly
Expand Down
9 changes: 5 additions & 4 deletions main.cpp
Expand Up @@ -74,13 +74,14 @@ char *unreg_exit_mesg=

#else
char *reg_exit_mesg=
"Thank you for registering MegaZeux.\n\n\n\r"
"Thank you for playing MegaZeux.\n\n\n\r"
"Read the files megazeux.doc and readme.1st if you need help.\n\n\r"
"Contributors to MZX2.51 version S3.1:\n\n\r"
"Contributors to MZX2.51 version S3.2:\n\n\r"
"Charles Goetzman - mzx s1 base and misc. code\n\r"
"MenTaLguY - anti-flicker code, mouse buffering, mod \"*\"\n\r"
"Ben Zeigler - under bug fix and getting the thing to run\n\r"
"CapnKev - refresh screen code\n\n\r"
"CapnKev - refresh screen code\n\r"
"MadBrain - password and message hack\n\n\r"
"Visit zeux.org for newer versions of this software\n\n\r$";

#endif
Expand Down Expand Up @@ -148,7 +149,7 @@ int main(int argc,char **argv) {
draw_window_box(2,1,77,3,0xB800,120,127,113,0);
draw_window_box(2,4,77,16,0xB800,120,127,113,0);
draw_window_box(2,17,77,23,0xB800,120,127,113,0);
write_string("MegaZeux version 2.51S3.1",27,2,127,0xB800);
write_string("MegaZeux version 2.51S3.2",27,2,127,0xB800);
// #ifdef BETA
write_string("BETA- PLEASE DISTRIBUTE",27,17,127,0xB800);
// #endif
Expand Down
6 changes: 3 additions & 3 deletions password.cpp
Expand Up @@ -112,7 +112,7 @@ unsigned char get_pw_xor_code(void) {
//and returns non-0 if wrong.
char check_pw(void) {
char temp[16]="";
if(protection_method==0) return 0;
return 0;
if(password[0]==0) return 0;
set_context(95);
retry:
Expand Down Expand Up @@ -155,8 +155,8 @@ char check_pw(void) {
char pdi_types[4]={ DE_RADIO,DE_INPUT,DE_BUTTON,DE_BUTTON };
char pdi_xs[4]={ 2,2,7,20 };
char pdi_ys[4]={ 2,7,9,9 };
char far *pdi_strs[4]={ "No protection\nNo-save protection (anti-ripoff)\n\
No-edit protection\nNo-play protection","Password: ","OK","Cancel" };
char far *pdi_strs[4]={ "No protection\nNo protection \n\
No protection \nNo protection ","Password: ","OK","Cancel" };
int pdi_p1s[4]={ 4,15,0,-1 };
int pdi_p2s[2]={ 32,0 };
void far *pdi_storage[2]={ NULL,NULL };
Expand Down
7 changes: 7 additions & 0 deletions runrobo2.cpp
Expand Up @@ -56,6 +56,9 @@ extern int topindex,backindex;

#pragma warn -sig

void set_built_in_messages(int param);
int get_built_in_messages(void);

// side-effects: mangles the input string
// bleah; this is so unreadable; just a very quick dirty hack
static void magic_load_mod(char far *filename) {
Expand All @@ -81,6 +84,7 @@ void run_robot(int id,int x,int y) {
char gotoed;//Set to 1 if we shouldn't advance cmd since we went to a lbl
int old_pos;//Old position to verify gotos DID something
int _bl[4]={ 0,0,0,0 };//Whether blocked in a given direction (2=OUR bullet)
int t12; // New * "" command (changes Built_In_Messages to be sure to display the messages)
unsigned char far *robot;
unsigned char far *cmd_ptr;//Points to current command
char done=0;//Set to 1 on a finishing command
Expand Down Expand Up @@ -1289,7 +1293,10 @@ void run_robot(int id,int x,int y) {
move_dir(x,y,t1);
goto breaker;
case 102://Mesg
t12 = get_built_in_messages();
set_built_in_messages(1);
set_mesg(tr_msg(&cmd_ptr[2],id));
set_built_in_messages(t12);
break;
case 103:
case 104:
Expand Down

0 comments on commit e5f250b

Please sign in to comment.