Skip to content

Commit

Permalink
MegaZeux 2.68 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelva1984 committed Aug 11, 2008
1 parent 13e6bab commit 2eda533
Show file tree
Hide file tree
Showing 29 changed files with 2,362 additions and 484 deletions.
34 changes: 22 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,44 @@ TLINK = tlink
.asm.obj:
@$(TASM) /jWARN /MX /M5 /ZI /O /T $<,$@

obj = admath.obj arrowkey.obj beep.obj blink.obj block.obj boardmem.obj \
obj = arrowkey.obj beep.obj blink.obj block.obj boardmem.obj \
ceh.obj charset.obj char_ed.obj comp_chk.obj counter.obj cursor.obj \
data.obj data2.obj detect.obj dt_data.obj edit.obj edit_di.obj egacode.obj \
ems.obj error.obj ezboard.obj fill.obj game.obj game2.obj getkey.obj \
ems.obj error.obj ezboard.obj expr.obj fill.obj game.obj game2.obj getkey.obj \
graphics.obj helpsys.obj hexchar.obj idarray.obj idput.obj intake.obj \
main.obj meminter.obj meter.obj mouse.obj new_mod.obj palette.obj \
pal_ed.obj param.obj password.obj random.obj retrace.obj roballoc.obj \
runrobot.obj runrobo2.obj saveload.obj scrdisp.obj scrdump.obj sfx.obj \
sfx_edit.obj sprite.obj string.obj timer.obj window.obj
main.obj meminter.obj meter.obj mouse.obj mstring.obj mzm.obj new_mod.obj \
palette.obj pal_ed.obj param.obj password.obj random.obj retrace.obj \
roballoc.obj runrobot.obj runrobo2.obj saveload.obj scrdisp.obj scrdump.obj \
sfx.obj sfx_edit.obj sprite.obj string.obj timer.obj window.obj

#
# I'd rather this wasn't necessary, but I can't think of a way either in
# Make or DOS to convert the space separated list above into a + separated
# list. So it's just copy/pasted. This tr command helps:
# tr ' ' '+' << "EOF"
#
lobj = admath.obj+arrowkey.obj+beep.obj+blink.obj+block.obj+boardmem.obj+\
lobj = arrowkey.obj+beep.obj+blink.obj+block.obj+boardmem.obj+\
ceh.obj+charset.obj+char_ed.obj+comp_chk.obj+counter.obj+cursor.obj+\
data.obj+data2.obj+detect.obj+dt_data.obj+edit.obj+edit_di.obj+egacode.obj+\
ems.obj+error.obj+ezboard.obj+fill.obj+game.obj+game2.obj+getkey.obj+\
ems.obj+error.obj+ezboard.obj+expr.obj+fill.obj+game.obj+game2.obj+getkey.obj+\
graphics.obj+helpsys.obj+hexchar.obj+idarray.obj+idput.obj+intake.obj+\
main.obj+meminter.obj+meter.obj+mouse.obj+new_mod.obj+palette.obj+\
pal_ed.obj+param.obj+password.obj+random.obj+retrace.obj+roballoc.obj+\
runrobot.obj+runrobo2.obj+saveload.obj+scrdisp.obj+scrdump.obj+sfx.obj+\
sfx_edit.obj+sprite.obj+string.obj+timer.obj+window.obj
main.obj+meminter.obj+meter.obj+mouse.obj+mstring.obj+mzm.obj+new_mod.obj+\
palette.obj+pal_ed.obj+param.obj+password.obj+random.obj+retrace.obj+\
roballoc.obj+runrobot.obj+runrobo2.obj+saveload.obj+scrdisp.obj+scrdump.obj+\
sfx.obj+sfx_edit.obj+sprite.obj+string.obj+timer.obj+window.obj

all: megazeux.exe fix.exe getpw.exe killgbl.exe txt2hlp.exe ver1to2.exe

#
# Exo documented that as of 2.68, this file had to be compiled
# to assembly and then converted to machine code by tasm. This is
# because of the 387 "fsin" instruction which bcc doesn't understand.
#
# The -B flag achieves this, but must not be used project-wide.
#
counter.obj: counter.cpp
@$(CC) -B -c counter.cpp

megazeux.exe: $(obj)
@$(TLINK) /m/c/d/P-/L$(LIBPATH) @&&|
c0l.obj+$(lobj)+robo_ed.obj,megazeux,megazeux,mse_cl.lib+cl.lib
Expand Down
20 changes: 0 additions & 20 deletions admath.cpp

This file was deleted.

7 changes: 0 additions & 7 deletions admath.h

This file was deleted.

48 changes: 40 additions & 8 deletions block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,25 @@
// ( ) Paint block
// ( ) Copy to/from overlay
// ( ) Save as ANSi
// ( ) Save as MZM - I added this one. - Exo
//
// _OK_ _Cancel_
//
//--------------------------

char bdi_types[3]={ DE_RADIO,DE_BUTTON,DE_BUTTON };
char bdi_xs[3]={ 2,5,15 };
char bdi_ys[3]={ 2,11,11 };
char bdi_ys[3]={ 2,12,12 };
char far *bdi_strs[3]={ "Copy block\nMove block\nClear block\nFlip block\n\
Mirror block\nPaint block\nCopy to/from overlay\nSave as ANSi",
Mirror block\nPaint block\nCopy to/from overlay\nSave as ANSi\nSave as MZM",
"OK","Cancel" };
int bdi_p1s[3]={ 8,0,-1 };
int bdi_p1s[3]={ 9,0,-1 };
int bdi_p2s[1]={ 20 };
int block_op=0;
void far *bdi_storage[1]={ &block_op };

dialog bdi={
26,4,53,17,"Choose block command",3,
26,3,53,17,"Choose block command",3,
bdi_types,
bdi_xs,
bdi_ys,
Expand Down Expand Up @@ -324,17 +325,17 @@ int export_type(void) {

char imdi_types[3]={ DE_RADIO,DE_BUTTON,DE_BUTTON };
char imdi_xs[3]={ 2,5,15 };
char imdi_ys[3]={ 3,11,11 };
char imdi_ys[3]={ 3,12,12 };
char far *imdi_strs[3]={ "Board file (MZB)\nCharacter set (CHR)\n\
Ansi display (ANS)\nWorld file (MZX)\nPalette (PAL)\nSound effects (SFX)\n\
Ansi (choose pos.)",
Ansi (choose pos.)\nMZM (choose pos.)",
"OK","Cancel" };
int imdi_p1s[3]={ 7,0,-1 };
int imdi_p1s[3]={ 8,0,-1 };
int imdi_p2s[1]={ 19 };
void far *imdi_storage[1]={ NULL };

dialog imdi={
26,4,53,17,"Import:",3,
26,3,53,17,"Import:",3,
imdi_types,
imdi_xs,
imdi_ys,
Expand Down Expand Up @@ -641,3 +642,34 @@ int import_ansi_obj_type(void) {
pop_context();
return iao_type;
}

char imzdi_types[3]={ DE_RADIO,DE_BUTTON,DE_BUTTON };
char imzdi_xs[3]={ 6,5,15 };
char imzdi_ys[3]={ 5,11,11 };
char far *imzdi_strs[3]={ "Board\nOverlay\n", "OK", "Cancel" };
int imzdi_p1s[3]={ 2,0,-1 };
int imzdi_p2s[1]={ 12 };
int imz_type = 0;
void far *imzdi_storage[1]={ &imz_type };

dialog imzdi={
26,4,53,17,"Import MZM as-",3,
imzdi_types,
imzdi_xs,
imzdi_ys,
imzdi_strs,
imzdi_p1s,
imzdi_p2s,
imzdi_storage,0 };

int import_mzm_obj_type(void)
{
set_context(78);
if(run_dialog(&imzdi,current_pg_seg)) {
pop_context();
return -1;
}
pop_context();
return imz_type;
}

1 change: 1 addition & 0 deletions block.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ int import_type(void);
void import_ansi(char far *filename,char obj_type,int &curr_thing,
int &curr_param,int start_x=0,int start_y=0);
int import_ansi_obj_type(void);
int import_mzm_obj_type(void);

#endif
4 changes: 1 addition & 3 deletions const.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@
#define NUM_COUNTERS 1020 // This is a decent # for now. Spid
#define NUM_STATUS_CNTRS 6
//The first n counters are reserved for internal use (GEMS, etc)
// I added strings to reserved. - Exo
#define RESERVED_COUNTERS 19
#define STRING_BASE 9
#define RESERVED_COUNTERS 9
//ID number for storage of the only copy of the current robot/scroll/sensor
#define TEMP_STORAGE 0
//ID number for storage of the global robot
Expand Down
Loading

0 comments on commit 2eda533

Please sign in to comment.