Skip to content

Commit bec081d

Browse files
committed
MegaZeux 2.81c release.
1 parent 46281e8 commit bec081d

30 files changed

+1040
-623
lines changed

Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ GDM2S3M = contrib/gdm2s3m/src
99
MODPLUG = contrib/libmodplug/src
1010

1111
# default target name
12-
TARGET = mzx281b
13-
VERSION = 2.81b
12+
TARGET = mzx281c
13+
VERSION = 2.81c
1414

1515
ifneq ("${DATE}", "0")
1616
VERSTRING = ${VERSION}\ \(`date +%Y%m%d`\)

arch/Makefile.linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ STRIP = strip --strip-unneeded
1010

1111
# standard libraries
1212
LIBS = ../${GDM2S3M}/libgdm2s3m.a ../${MODPLUG}/libmodplug.a \
13-
-L${PREFIX}/lib -lSDL -lpthread -lvorbisfile -lvorbis -logg -lX11
13+
-L${PREFIX}/lib -lSDL -lpthread -lvorbisfile -lvorbis -logg
1414

1515
# linux os specific install target
1616
install:

config.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# You may also try a resolution like 640x700 that multiplies
3131
# the width, then set the multiplier..
3232

33-
#force_resolution = 640,350
33+
#force_resolution = 640,700
3434

3535
# Make it so the display is stretched by this amount (must be
3636
# integer). This is useful for getting resolutions like 640x700
@@ -43,6 +43,12 @@
4343

4444
#fullscreen = 0
4545

46+
# Forces the screen to be rendered in 32bpp instead of 8bpp. Is
47+
# slower but may be more compatible, try it if you're getting
48+
# visual problems (particularly in fullscreen)
49+
50+
#force_32bpp = 0
51+
4652

4753
### Audio options ###
4854

@@ -282,4 +288,3 @@ modplug_resample_mode = cubic
282288
# GUI set.
283289

284290
#mask_midchars = 1
285-

docs/changelog.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
December 14, 2005 - MZX 2.81c
2+
3+
+ Oops, accidentally broke shift + F2. Fixed that..
4+
+ Also accidentally broke &+counter& for full hex representation. Fixed.
5+
+ Fixed memory leak problem with playing certain WAVs in a loop.
6+
+ Fixed inconsistency of bad viewport sizes behaving differently on
7+
current versions from old DOS versions.
8+
+ Accidentally broke joystick stuff in config.txt (has to do with way
9+
configure options were being read), fixed.
10+
+ Fixed bug causing crash when loading MZBs larger than the current board
11+
size.
12+
+ Made cursor hidden in alt + V in editor.
13+
+ String comparison failed with nulls in the strings, fixed. Also
14+
should be slightly more optimal.
15+
+ Fixed bug when using negative numbers for if sprite_colliding "counter"
16+
+ Fixed math operations (inc, dec, etc) not working on string indeces.
17+
+ Added ability to force screen to 32bpp. Fixes some slight rendering
18+
issues, and if you have problems with fullscreen let me know if this
19+
helps (try it without first though). See force_32bpp in config.txt.
20+
+ Fixed sprite clipping bug with respect to overlay.
21+
+ Fixed bug where pressing enter on things besides robots, scrolls/signs,
22+
or sensors in the editor would clear whatever was underneath it.
23+
+ Accidentally broke SFX with optional PC speaker chains (played both,
24+
should only play PC speaker when digital music is off, fixes Bernard
25+
the Bard)
26+
+ Made last character in char selection for F3 and alt + C remembered
27+
(note that they're remembered in two different places for both)
28+
+ Accidentally broke life animations, fixed
29+
130
November 26, 2005 - MZX 2.81b
231

332
+ Fixed inability to make proper .savs of worlds with strings (they'd

mzx_help.fil

9.9 KB
Binary file not shown.

src/audio.cpp

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ Uint32 mp_mix_data(audio_stream *a_src, Sint32 *buffer, Uint32 len)
313313
mp_stream->s.stream_offset;
314314
Uint8 *read_buffer = (Uint8 *)mp_stream->s.output_data +
315315
mp_stream->s.stream_offset;
316+
Uint32 r_val = 0;
316317

317318
read_len =
318319
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)
325326
// ending..
326327

327328
if(a_src->repeat)
329+
{
328330
a_src->set_position(a_src, a_src->get_position(a_src));
331+
}
329332
else
333+
{
330334
memset(read_buffer + read_len, 0, read_wanted - read_len);
335+
r_val = 1;
336+
}
331337

332338
read_len = 0;
333339
}
334340

335341
sampled_mix_data((sampled_stream *)mp_stream, buffer, len);
336342

337-
/*
338-
if(read_len == 0)
339-
return 1;
340-
*/
341-
342-
return 0;
343+
return r_val;
343344
}
344345

345346
void mp_set_volume(audio_stream *a_src, Uint32 volume)
@@ -1274,7 +1275,7 @@ void end_sample()
12741275
audio_stream *current_astream = audio.stream_list_base;
12751276
audio_stream *next_astream;
12761277

1277-
SDL_LockMutex(audio.audio_mutex);
1278+
SDL_LockMutex(audio.audio_mutex);
12781279

12791280
while(current_astream)
12801281
{
@@ -1290,7 +1291,7 @@ void end_sample()
12901291
}
12911292

12921293

1293-
SDL_UnlockMutex(audio.audio_mutex);
1294+
SDL_UnlockMutex(audio.audio_mutex);
12941295
}
12951296

12961297
void jump_mod(int order)
@@ -1301,9 +1302,9 @@ void jump_mod(int order)
13011302

13021303
if(audio.primary_stream && audio.primary_stream->set_order)
13031304
{
1304-
SDL_LockMutex(audio.audio_mutex);
1305-
audio.primary_stream->set_order(audio.primary_stream, order);
1306-
SDL_UnlockMutex(audio.audio_mutex);
1305+
SDL_LockMutex(audio.audio_mutex);
1306+
audio.primary_stream->set_order(audio.primary_stream, order);
1307+
SDL_UnlockMutex(audio.audio_mutex);
13071308
}
13081309
}
13091310

@@ -1313,9 +1314,9 @@ int get_order()
13131314
{
13141315
int order;
13151316

1316-
SDL_LockMutex(audio.audio_mutex);
1317-
order = audio.primary_stream->get_order(audio.primary_stream);
1318-
SDL_UnlockMutex(audio.audio_mutex);
1317+
SDL_LockMutex(audio.audio_mutex);
1318+
order = audio.primary_stream->get_order(audio.primary_stream);
1319+
SDL_UnlockMutex(audio.audio_mutex);
13191320

13201321
return order;
13211322
}
@@ -1329,12 +1330,12 @@ void volume_mod(int vol)
13291330
{
13301331
if(audio.primary_stream)
13311332
{
1332-
SDL_LockMutex(audio.audio_mutex);
1333+
SDL_LockMutex(audio.audio_mutex);
13331334

13341335
audio.primary_stream->set_volume(audio.primary_stream,
13351336
vol * audio.music_volume / 8);
13361337

1337-
SDL_UnlockMutex(audio.audio_mutex);
1338+
SDL_UnlockMutex(audio.audio_mutex);
13381339
}
13391340
}
13401341

@@ -1376,13 +1377,13 @@ void shift_frequency(int freq)
13761377

13771378
if(audio.primary_stream && freq >= 16)
13781379
{
1379-
SDL_LockMutex(audio.audio_mutex);
1380+
SDL_LockMutex(audio.audio_mutex);
13801381

13811382
((sampled_stream *)audio.primary_stream)->
13821383
set_frequency((sampled_stream *)audio.primary_stream,
13831384
freq);
13841385

1385-
SDL_UnlockMutex(audio.audio_mutex);
1386+
SDL_UnlockMutex(audio.audio_mutex);
13861387
}
13871388
}
13881389

@@ -1392,10 +1393,10 @@ int get_frequency()
13921393
{
13931394
int freq;
13941395

1395-
SDL_LockMutex(audio.audio_mutex);
1396+
SDL_LockMutex(audio.audio_mutex);
13961397
freq = ((sampled_stream *)audio.primary_stream)->
13971398
get_frequency((sampled_stream *)audio.primary_stream);
1398-
SDL_UnlockMutex(audio.audio_mutex);
1399+
SDL_UnlockMutex(audio.audio_mutex);
13991400

14001401
return freq;
14011402
}
@@ -1412,9 +1413,9 @@ void set_position(int pos)
14121413

14131414
if(audio.primary_stream && audio.primary_stream->set_position)
14141415
{
1415-
SDL_LockMutex(audio.audio_mutex);
1416+
SDL_LockMutex(audio.audio_mutex);
14161417
audio.primary_stream->set_position(audio.primary_stream, pos);
1417-
SDL_UnlockMutex(audio.audio_mutex);
1418+
SDL_UnlockMutex(audio.audio_mutex);
14181419
}
14191420
}
14201421

@@ -1424,7 +1425,7 @@ int get_position()
14241425
{
14251426
int pos;
14261427

1427-
SDL_LockMutex(audio.audio_mutex);
1428+
SDL_LockMutex(audio.audio_mutex);
14281429
pos = audio.primary_stream->get_position(audio.primary_stream);
14291430
SDL_UnlockMutex(audio.audio_mutex);
14301431

@@ -1438,19 +1439,19 @@ int get_position()
14381439

14391440
void sound(int frequency, int duration)
14401441
{
1441-
SDL_LockMutex(audio.audio_mutex);
1442+
SDL_LockMutex(audio.audio_mutex);
14421443
audio.pcs_stream->playing = 1;
14431444
audio.pcs_stream->frequency = frequency;
14441445
audio.pcs_stream->note_duration = duration;
1445-
SDL_UnlockMutex(audio.audio_mutex);
1446+
SDL_UnlockMutex(audio.audio_mutex);
14461447
}
14471448

14481449
void nosound(int duration)
14491450
{
1450-
SDL_LockMutex(audio.audio_mutex);
1451+
SDL_LockMutex(audio.audio_mutex);
14511452
audio.pcs_stream->playing = 0;
1452-
audio.pcs_stream->note_duration = duration;
1453-
SDL_UnlockMutex(audio.audio_mutex);
1453+
audio.pcs_stream->note_duration = duration;
1454+
SDL_UnlockMutex(audio.audio_mutex);
14541455
}
14551456

14561457
int filelength(FILE *fp)
@@ -1547,16 +1548,16 @@ void convert_sam_to_wav(char *source_name, char *dest_name)
15471548

15481549
void set_music_on(int val)
15491550
{
1550-
SDL_LockMutex(audio.audio_mutex);
1551+
SDL_LockMutex(audio.audio_mutex);
15511552
audio.music_on = val;
1552-
SDL_UnlockMutex(audio.audio_mutex);
1553+
SDL_UnlockMutex(audio.audio_mutex);
15531554
}
15541555

15551556
void set_sfx_on(int val)
15561557
{
1557-
SDL_LockMutex(audio.audio_mutex);
1558+
SDL_LockMutex(audio.audio_mutex);
15581559
audio.sfx_on = val;
1559-
SDL_UnlockMutex(audio.audio_mutex);
1560+
SDL_UnlockMutex(audio.audio_mutex);
15601561
}
15611562

15621563
// These don't have to be locked because only the same thread can
@@ -1589,9 +1590,9 @@ int get_sfx_volume()
15891590

15901591
void set_music_volume(int volume)
15911592
{
1592-
SDL_LockMutex(audio.audio_mutex);
1593+
SDL_LockMutex(audio.audio_mutex);
15931594
audio.music_volume = volume;
1594-
SDL_UnlockMutex(audio.audio_mutex);
1595+
SDL_UnlockMutex(audio.audio_mutex);
15951596
}
15961597

15971598
void set_sound_volume(int volume)
@@ -1623,7 +1624,7 @@ void set_sfx_volume(int volume)
16231624
audio.sfx_volume = volume;
16241625
audio.pcs_stream->a.set_volume((audio_stream *)audio.pcs_stream,
16251626
volume * 255 / 8);
1626-
SDL_UnlockMutex(audio.audio_mutex);
1627+
SDL_UnlockMutex(audio.audio_mutex);
16271628
}
16281629

16291630

src/board.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ void replace_current_board(World *mzx_world, char *name)
5252
src_board = load_board_allocate_direct(input_mzb, 0);
5353
optimize_null_objects(src_board);
5454

55+
set_update_done_current(mzx_world);
56+
5557
if(src_board->robot_list)
5658
src_board->robot_list[0] = &(mzx_world->global_robot);
5759

src/configure.cpp

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,17 @@ void pause_on_unfocus(config_info *conf, char *name, char *value,
413413
void include_config(config_info *conf, char *name, char *value,
414414
char *extended_data)
415415
{
416+
// This one's for the original include N form
416417
set_config_from_file(conf, name + 7);
417418
}
418419

420+
void include2_config(config_info *conf, char *name, char *value,
421+
char *extended_data)
422+
{
423+
// This one's for the include = N form
424+
set_config_from_file(conf, value);
425+
}
426+
419427
void config_set_sfx_volume(config_info *conf, char *name,
420428
char *value, char *extended_data)
421429
{
@@ -442,6 +450,12 @@ void config_set_audio_freq(config_info *conf, char *name,
442450
conf->output_frequency = strtol(value, NULL, 10);
443451
}
444452

453+
void config_force_32bpp(config_info *conf, char *name,
454+
char *value, char *extended_data)
455+
{
456+
conf->force_32bpp = strtol(value, NULL, 10);
457+
}
458+
445459

446460
config_entry config_options[] =
447461
{
@@ -468,13 +482,14 @@ config_entry config_options[] =
468482
{ "disassemble_base", config_disassemble_base },
469483
{ "disassemble_extras", config_disassemble_extras },
470484
{ "enable_oversampling", config_enable_oversampling },
485+
{ "force_32bpp", config_force_32bpp },
471486
{ "force_height_multiplier", config_set_multiplier },
472487
{ "force_resolution", config_set_resolution },
473488
{ "fullscreen", config_set_fullscreen },
489+
{ "include", include2_config },
474490
{ "include*", include_config },
475-
{ "include=*", include_config },
476-
{ "joy?1-2axis?1-2", joy_axis_set },
477-
{ "joy?1-2button?1-2", joy_button_set },
491+
{ "joy!axis!", joy_axis_set },
492+
{ "joy!button!", joy_button_set },
478493
{ "macro_*", config_macro },
479494
{ "mask_midchars", config_mask_midchars },
480495
{ "modplug_resample_mode", config_mp_resample_mode },
@@ -525,6 +540,7 @@ config_info default_options =
525540
640,
526541
350,
527542
1,
543+
0,
528544

529545
// Audio options
530546
44100,

src/configure.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ struct _config_info
3030
int resolution_x;
3131
int resolution_y;
3232
int height_multiplier;
33+
int force_32bpp;
3334

3435
// Audio options
3536
int output_frequency;

0 commit comments

Comments
 (0)