Skip to content

Commit

Permalink
MegaZeux 2.81c release.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelva1984 committed Aug 11, 2008
1 parent 46281e8 commit bec081d
Show file tree
Hide file tree
Showing 30 changed files with 1,040 additions and 623 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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`\)
Expand Down
2 changes: 1 addition & 1 deletion arch/Makefile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 7 additions & 2 deletions config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ###

Expand Down Expand Up @@ -282,4 +288,3 @@ modplug_resample_mode = cubic
# GUI set.

#mask_midchars = 1

29 changes: 29 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file modified mzx_help.fil
Binary file not shown.
71 changes: 36 additions & 35 deletions src/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down Expand Up @@ -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)
{
Expand All @@ -1290,7 +1291,7 @@ void end_sample()
}


SDL_UnlockMutex(audio.audio_mutex);
SDL_UnlockMutex(audio.audio_mutex);
}

void jump_mod(int order)
Expand All @@ -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);
}
}

Expand All @@ -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;
}
Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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;
}
Expand All @@ -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);
}
}

Expand All @@ -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);

Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}


2 changes: 2 additions & 0 deletions src/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
22 changes: 19 additions & 3 deletions src/configure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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[] =
{
Expand All @@ -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 },
Expand Down Expand Up @@ -525,6 +540,7 @@ config_info default_options =
640,
350,
1,
0,

// Audio options
44100,
Expand Down
1 change: 1 addition & 0 deletions src/configure.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ struct _config_info
int resolution_x;
int resolution_y;
int height_multiplier;
int force_32bpp;

// Audio options
int output_frequency;
Expand Down
Loading

0 comments on commit bec081d

Please sign in to comment.