Permalink
Browse files

MegaZeux 2.81c release.

  • Loading branch information...
1 parent 46281e8 commit bec081d0d4f07280780af4f93e2024dff7f2b85f @ajs1984 committed Aug 11, 2008
Showing with 1,040 additions and 623 deletions.
  1. +2 −2 Makefile.in
  2. +1 −1 arch/Makefile.linux
  3. +7 −2 config.txt
  4. +29 −0 docs/changelog.txt
  5. BIN mzx_help.fil
  6. +36 −35 src/audio.cpp
  7. +2 −0 src/board.cpp
  8. +19 −3 src/configure.cpp
  9. +1 −0 src/configure.h
  10. +160 −126 src/counter.cpp
  11. +1 −0 src/counter.h
  12. +0 −3 src/data.cpp
  13. +245 −261 src/data.h
  14. +21 −11 src/edit.cpp
  15. +1 −1 src/event.h
  16. +2 −2 src/game.cpp
  17. +2 −1 src/game2.cpp
  18. +372 −30 src/graphics.cpp
  19. +3 −0 src/graphics.h
  20. +12 −11 src/idarray.cpp
  21. +1 −1 src/idarray.h
  22. +1 −1 src/idput.cpp
  23. +4 −1 src/intake.cpp
  24. +2 −0 src/robo_ed.cpp
  25. +4 −2 src/robot.cpp
  26. +9 −30 src/runrobo2.cpp
  27. +8 −4 src/sfx.cpp
  28. +57 −90 src/sprite.cpp
  29. +33 −5 src/world.cpp
  30. +5 −0 src/world.h
View
@@ -9,8 +9,8 @@ GDM2S3M = contrib/gdm2s3m/src
MODPLUG = contrib/libmodplug/src
# default target name
-TARGET = mzx281b
-VERSION = 2.81b
+TARGET = mzx281c
+VERSION = 2.81c
ifneq ("${DATE}", "0")
VERSTRING = ${VERSION}\ \(`date +%Y%m%d`\)
View
@@ -10,7 +10,7 @@ STRIP = strip --strip-unneeded
# standard libraries
LIBS = ../${GDM2S3M}/libgdm2s3m.a ../${MODPLUG}/libmodplug.a \
- -L${PREFIX}/lib -lSDL -lpthread -lvorbisfile -lvorbis -logg -lX11
+ -L${PREFIX}/lib -lSDL -lpthread -lvorbisfile -lvorbis -logg
# linux os specific install target
install:
View
@@ -30,7 +30,7 @@
# You may also try a resolution like 640x700 that multiplies
# the width, then set the multiplier..
-#force_resolution = 640,350
+#force_resolution = 640,700
# Make it so the display is stretched by this amount (must be
# integer). This is useful for getting resolutions like 640x700
@@ -43,6 +43,12 @@
#fullscreen = 0
+# Forces the screen to be rendered in 32bpp instead of 8bpp. Is
+# slower but may be more compatible, try it if you're getting
+# visual problems (particularly in fullscreen)
+
+#force_32bpp = 0
+
### Audio options ###
@@ -282,4 +288,3 @@ modplug_resample_mode = cubic
# GUI set.
#mask_midchars = 1
-
View
@@ -1,3 +1,32 @@
+December 14, 2005 - MZX 2.81c
+
++ Oops, accidentally broke shift + F2. Fixed that..
++ Also accidentally broke &+counter& for full hex representation. Fixed.
++ Fixed memory leak problem with playing certain WAVs in a loop.
++ Fixed inconsistency of bad viewport sizes behaving differently on
+ current versions from old DOS versions.
++ Accidentally broke joystick stuff in config.txt (has to do with way
+ configure options were being read), fixed.
++ Fixed bug causing crash when loading MZBs larger than the current board
+ size.
++ Made cursor hidden in alt + V in editor.
++ String comparison failed with nulls in the strings, fixed. Also
+ should be slightly more optimal.
++ Fixed bug when using negative numbers for if sprite_colliding "counter"
++ Fixed math operations (inc, dec, etc) not working on string indeces.
++ Added ability to force screen to 32bpp. Fixes some slight rendering
+ issues, and if you have problems with fullscreen let me know if this
+ helps (try it without first though). See force_32bpp in config.txt.
++ Fixed sprite clipping bug with respect to overlay.
++ Fixed bug where pressing enter on things besides robots, scrolls/signs,
+ or sensors in the editor would clear whatever was underneath it.
++ Accidentally broke SFX with optional PC speaker chains (played both,
+ should only play PC speaker when digital music is off, fixes Bernard
+ the Bard)
++ Made last character in char selection for F3 and alt + C remembered
+ (note that they're remembered in two different places for both)
++ Accidentally broke life animations, fixed
+
November 26, 2005 - MZX 2.81b
+ Fixed inability to make proper .savs of worlds with strings (they'd
View
Binary file not shown.
View
@@ -313,6 +313,7 @@ Uint32 mp_mix_data(audio_stream *a_src, Sint32 *buffer, Uint32 len)
mp_stream->s.stream_offset;
Uint8 *read_buffer = (Uint8 *)mp_stream->s.output_data +
mp_stream->s.stream_offset;
+ Uint32 r_val = 0;
read_len =
ModPlug_Read(mp_stream->module_data, read_buffer, read_wanted);
@@ -325,21 +326,21 @@ Uint32 mp_mix_data(audio_stream *a_src, Sint32 *buffer, Uint32 len)
// ending..
if(a_src->repeat)
+ {
a_src->set_position(a_src, a_src->get_position(a_src));
+ }
else
+ {
memset(read_buffer + read_len, 0, read_wanted - read_len);
+ r_val = 1;
+ }
read_len = 0;
}
sampled_mix_data((sampled_stream *)mp_stream, buffer, len);
-/*
- if(read_len == 0)
- return 1;
-*/
-
- return 0;
+ return r_val;
}
void mp_set_volume(audio_stream *a_src, Uint32 volume)
@@ -1274,7 +1275,7 @@ void end_sample()
audio_stream *current_astream = audio.stream_list_base;
audio_stream *next_astream;
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
while(current_astream)
{
@@ -1290,7 +1291,7 @@ void end_sample()
}
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
}
void jump_mod(int order)
@@ -1301,9 +1302,9 @@ void jump_mod(int order)
if(audio.primary_stream && audio.primary_stream->set_order)
{
- SDL_LockMutex(audio.audio_mutex);
- audio.primary_stream->set_order(audio.primary_stream, order);
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
+ audio.primary_stream->set_order(audio.primary_stream, order);
+ SDL_UnlockMutex(audio.audio_mutex);
}
}
@@ -1313,9 +1314,9 @@ int get_order()
{
int order;
- SDL_LockMutex(audio.audio_mutex);
- order = audio.primary_stream->get_order(audio.primary_stream);
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
+ order = audio.primary_stream->get_order(audio.primary_stream);
+ SDL_UnlockMutex(audio.audio_mutex);
return order;
}
@@ -1329,12 +1330,12 @@ void volume_mod(int vol)
{
if(audio.primary_stream)
{
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
audio.primary_stream->set_volume(audio.primary_stream,
vol * audio.music_volume / 8);
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
}
}
@@ -1376,13 +1377,13 @@ void shift_frequency(int freq)
if(audio.primary_stream && freq >= 16)
{
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
((sampled_stream *)audio.primary_stream)->
set_frequency((sampled_stream *)audio.primary_stream,
freq);
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
}
}
@@ -1392,10 +1393,10 @@ int get_frequency()
{
int freq;
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
freq = ((sampled_stream *)audio.primary_stream)->
get_frequency((sampled_stream *)audio.primary_stream);
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
return freq;
}
@@ -1412,9 +1413,9 @@ void set_position(int pos)
if(audio.primary_stream && audio.primary_stream->set_position)
{
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
audio.primary_stream->set_position(audio.primary_stream, pos);
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
}
}
@@ -1424,7 +1425,7 @@ int get_position()
{
int pos;
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
pos = audio.primary_stream->get_position(audio.primary_stream);
SDL_UnlockMutex(audio.audio_mutex);
@@ -1438,19 +1439,19 @@ int get_position()
void sound(int frequency, int duration)
{
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
audio.pcs_stream->playing = 1;
audio.pcs_stream->frequency = frequency;
audio.pcs_stream->note_duration = duration;
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
}
void nosound(int duration)
{
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
audio.pcs_stream->playing = 0;
- audio.pcs_stream->note_duration = duration;
- SDL_UnlockMutex(audio.audio_mutex);
+ audio.pcs_stream->note_duration = duration;
+ SDL_UnlockMutex(audio.audio_mutex);
}
int filelength(FILE *fp)
@@ -1547,16 +1548,16 @@ void convert_sam_to_wav(char *source_name, char *dest_name)
void set_music_on(int val)
{
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
audio.music_on = val;
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
}
void set_sfx_on(int val)
{
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
audio.sfx_on = val;
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
}
// These don't have to be locked because only the same thread can
@@ -1589,9 +1590,9 @@ int get_sfx_volume()
void set_music_volume(int volume)
{
- SDL_LockMutex(audio.audio_mutex);
+ SDL_LockMutex(audio.audio_mutex);
audio.music_volume = volume;
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
}
void set_sound_volume(int volume)
@@ -1623,7 +1624,7 @@ void set_sfx_volume(int volume)
audio.sfx_volume = volume;
audio.pcs_stream->a.set_volume((audio_stream *)audio.pcs_stream,
volume * 255 / 8);
- SDL_UnlockMutex(audio.audio_mutex);
+ SDL_UnlockMutex(audio.audio_mutex);
}
View
@@ -52,6 +52,8 @@ void replace_current_board(World *mzx_world, char *name)
src_board = load_board_allocate_direct(input_mzb, 0);
optimize_null_objects(src_board);
+ set_update_done_current(mzx_world);
+
if(src_board->robot_list)
src_board->robot_list[0] = &(mzx_world->global_robot);
View
@@ -413,9 +413,17 @@ void pause_on_unfocus(config_info *conf, char *name, char *value,
void include_config(config_info *conf, char *name, char *value,
char *extended_data)
{
+ // This one's for the original include N form
set_config_from_file(conf, name + 7);
}
+void include2_config(config_info *conf, char *name, char *value,
+ char *extended_data)
+{
+ // This one's for the include = N form
+ set_config_from_file(conf, value);
+}
+
void config_set_sfx_volume(config_info *conf, char *name,
char *value, char *extended_data)
{
@@ -442,6 +450,12 @@ void config_set_audio_freq(config_info *conf, char *name,
conf->output_frequency = strtol(value, NULL, 10);
}
+void config_force_32bpp(config_info *conf, char *name,
+ char *value, char *extended_data)
+{
+ conf->force_32bpp = strtol(value, NULL, 10);
+}
+
config_entry config_options[] =
{
@@ -468,13 +482,14 @@ config_entry config_options[] =
{ "disassemble_base", config_disassemble_base },
{ "disassemble_extras", config_disassemble_extras },
{ "enable_oversampling", config_enable_oversampling },
+ { "force_32bpp", config_force_32bpp },
{ "force_height_multiplier", config_set_multiplier },
{ "force_resolution", config_set_resolution },
{ "fullscreen", config_set_fullscreen },
+ { "include", include2_config },
{ "include*", include_config },
- { "include=*", include_config },
- { "joy?1-2axis?1-2", joy_axis_set },
- { "joy?1-2button?1-2", joy_button_set },
+ { "joy!axis!", joy_axis_set },
+ { "joy!button!", joy_button_set },
{ "macro_*", config_macro },
{ "mask_midchars", config_mask_midchars },
{ "modplug_resample_mode", config_mp_resample_mode },
@@ -525,6 +540,7 @@ config_info default_options =
640,
350,
1,
+ 0,
// Audio options
44100,
View
@@ -30,6 +30,7 @@ struct _config_info
int resolution_x;
int resolution_y;
int height_multiplier;
+ int force_32bpp;
// Audio options
int output_frequency;
Oops, something went wrong.

0 comments on commit bec081d

Please sign in to comment.