Permalink
Browse files

MegaZeux 2.68 release.

  • Loading branch information...
1 parent 13e6bab commit 2eda5339dec8c06d58f92b2c1e05808a5e3b2a07 @ajs1984 committed Aug 11, 2008
Showing with 2,362 additions and 484 deletions.
  1. +22 −12 Makefile
  2. +0 −20 admath.cpp
  3. +0 −7 admath.h
  4. +40 −8 block.cpp
  5. +1 −0 block.h
  6. +1 −3 const.h
  7. +698 −324 counter.cpp
  8. +6 −0 counter.h
  9. +1 −1 data2.cpp
  10. +50 −3 edit.cpp
  11. +499 −0 expr.cpp
  12. +31 −0 expr.h
  13. +6 −1 ezboard.cpp
  14. +21 −0 filef268.txt
  15. +2 −2 game2.asm
  16. +3 −5 game_run.cpp
  17. +2 −2 main.cpp
  18. +2 −2 main_run.cpp
  19. +2 −1 megazeux.cfg
  20. +191 −0 mstring.cpp
  21. +31 −0 mstring.h
  22. +30 −0 mzim.txt
  23. +248 −0 mzm.cpp
  24. +24 −0 mzm.h
  25. +32 −0 mzm.txt
  26. +279 −82 runrobo2.cpp
  27. +41 −6 runrobot.cpp
  28. +98 −4 saveload.cpp
  29. +1 −1 sprite.h
View
@@ -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
View
@@ -1,20 +0,0 @@
-#include "admath.h"
-
-int sqrt(int a)
-{
- int loc =128;
- int x = loc * loc;
- int level = 6;
- while((level >= 0) && (x != a))
- {
- if(a > x) loc += (1<<level);
- else loc -= (1<<level);
- level --;
- x = loc * loc;
- }
- int test = (loc * loc)-a;
- if (test >= loc) loc --;
- else if (test < (loc * -1)) loc ++;
- return loc;
-
-}
View
@@ -1,7 +0,0 @@
-#ifndef __ADMATH_H
-#define __ADMATH_H
-
-
-int sqrt(int);
-
-#endif
View
@@ -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,
@@ -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,
@@ -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;
+}
+
View
@@ -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
View
@@ -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
Oops, something went wrong.

0 comments on commit 2eda533

Please sign in to comment.