2001-09-18 Alexandre Duret-Lutz * configure.ac: Bump version to 0.13. * NEWS: Update for 0.13. * HACKING (Typenames): New section. 2001-09-18 Alexandre Duret-Lutz * src/lvl/README: Update typenames. 2001-09-18 Alexandre Duret-Lutz All typenames ending with`*_t' are officially reserved by POSIX. In the past I already had to rename `timer_t' into `htimer_t' (see 2000-08-27) to avoid name clash with NetBSD. Today I've discovered that `level_t' is defined in on alphaev56-dec-osf4.0d, so I've decided to get rid of this *_t naming definitively. The replacement convention, beginning typenames with a_ or an_, comes from http://gcc.gnu.org/ml/gcc/2001-06/msg01006.html. Each Typename from the first column is replaced by the name from the second column. anim_kind_t an_anim_kind anim_t an_anim bg_data_t a_bg_data color_rvb_t an_rvb_color copy_function_t a_copy_function cost_t a_cost dest_t a_dest dir8_t a_dir8 dir_mask8_t a_dir_mask8 dir_mask_t a_dir_mask dir_t a_dir entry_func_t an_entry_func explosion_info_t an_explosion_info explosion_t an_explosion extra_level_t an_extra_level extradir_info_t an_extradir_info extradir_list_t an_extradir_list fader_status_t a_fader_status fg_data_t a_fg_data filename_t a_filename fontdata_t a_fontdata gameid_t a_gameid htimer_t a_timer keycode_t a_keycode last_list_t a_last_list lemming_t a_lemming level_bits_t a_level_bits level_header_t a_level_header level_info_t a_level_info level_list_t a_level_list level_t a_level menu_entry_t a_menu_entry menu_t a_menu options_t an_option_set palette_t a_palette paragraph_t a_paragraph param_t a_param pcx_header_t a_pcx_header pcx_image_t a_pcx_image pixel_t a_pixel player_t a_player prefs_t a_pref_set private_read_data_t a_private_read_data prog_list_t a_prog_list read_data_t a_read_data s16_t a_s16 s32_t a_s32 s8_t a_s8 sound_track_t a_sound_track sprite_prog_list_t a_sprite_prog_list sprite_t a_sprite square_coord_pair_t a_square_corrd_pair square_coord_t a_square_coord square_index_t a_square_index strpair_t a_strpair tile_coord_pair_t a_tile_coord_pair tile_coord_t a_tile_coord tile_data_t a_tile_data tile_index_t a_tile_index tile_info_t a_tile_info tile_t a_tile tile_type8_t a_tile_type8 tile_type_t a_tile_type tunnel_t a_tunnel u16_t a_u16 u32_t a_u32 u8_t a_u8 var_entry_t a_var_entry width_t a_width word_t a_word * src/bonus.c, src/bonus.h, src/camera.c, src/camera.h, src/const.c, src/const.h, src/endscroll.c, src/endscroll.h, src/explosions.c, src/explosions.h, src/extras.c, src/extras.h, src/fader.c, src/fader.h, src/fontdata.c, src/fontdata.h, src/gameid.c, src/gameid.h, src/generic_list.h, src/hedlite.c, src/hedlite.h, src/helptext.c, src/helptext.h, src/hendian.c, src/hendian.h, src/heroes.c, src/heroes.h, src/heroeslvl.c, src/intro.c, src/items.c, src/items.h, src/levellst.c, src/levellst.h, src/menus.c, src/menus.h, src/musicfiles.c, src/musicfiles.h, src/parafmt.c, src/parafmt.h, src/pcx.c, src/pcx.h, src/people.h, src/people.tpl, src/pixelize.c, src/pixelize.h, src/prefs.def, src/prefs.tpl, src/readmake.c, src/readmake.h, src/render.c, src/render.h, src/renderdata.c, src/renderdata.h, src/savegame.h, src/scores.c, src/scores.h, src/scrtools.c, src/scrtools.h, src/sprglauto.c, src/sprglauto.h, src/sprglenz.c, src/sprglenz.h, src/sprite.c, src/sprite.h, src/spropaque.c, src/spropaque.h, src/sprprog.c, src/sprprog.h, src/sprprogwav.c, src/sprprogwav.h, src/sprrle.c, src/sprrle.h, src/sprshade.c, src/sprshade.h, src/sprtext.c, src/sprtext.h, src/sprunish.c, src/sprunish.h, src/sprzcol.c, src/sprzcol.h, src/structs.h, src/system.h, src/timer.c, src/timer.h, src/vars.c, src/visuals.c, src/visuals.h, src/lvl/de_body.c, src/lvl/de_head.c, src/lvl/free.c, src/lvl/in_body.c, src/lvl/load.c, src/lvl/loadmac.h, src/lvl/lvl.h, src/lvl/lvl_priv.h, src/lvl/privacc.c, src/media/keyb.h, src/media/keysdef.h, src/media/keyvalues.h, src/media/sfx.c, src/media/strack.c, src/media/strack.h, src/media/video.c, src/media/video.h, src/media/video_low.h, src/media/allegro/keyb.c, src/media/allegro/keyvalues.c, src/media/allegro/video.c, src/media/dummy/keyb.c, src/media/dummy/keyvalues.c, src/media/dummy/video.c, src/media/ggi/keyb.c, src/media/ggi/keyvalues.c, src/media/ggi/video.c, src/media/sdl/keyb.c, src/media/sdl/keyvalues.c, src/media/sdl/video.c: Update as explained. 2001-09-18 Alexandre Duret-Lutz * src/media/dummy/keyvalues.c: Don't include ggi.h. 2001-09-17 Alexandre Duret-Lutz * m4/h-allegro.m4: Hide Allegro support. Do not check for it unless explicitly requested. 2001-09-17 Alexandre Duret-Lutz * src/media/allegro/video.c (screen_rv): New variable. (init_video_low, uninit_video_low, vsynchro_low, vsynchro2_low): Use it. (set_pal): Fix buffer overrun. (set_pal_entry): Supply p.filter value to suppress compiler warning. 2001-09-15 Alexandre Duret-Lutz * src/media/README: New file. * src/sys/README: New file. * src/lvl/README: New file. * src/lvl/Makefile.inc (EXTRA_DIST): Add lvl/README. * src/sys/Makefile.inc (EXTRA_DIST): Add sys/README. * src/media/Makefile.inc (EXTRA_DIST): Add media/README. 2001-08-26 Alexandre Duret-Lutz * NEWS: Typo. 2001-08-26 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12f. 2001-08-26 Alexandre Duret-Lutz * arch/mingw32/cross.sh (CONFIGURE_OPTS): Remove --program-suffix, not needed. (cross_install): Strip heroeslvl.exe. * arch/mingw32/dest-readme-lib: Update. 2001-08-26 Alexandre Duret-Lutz * m4/libalt.m4 (adl_LIBALT_OK): Support options in the 6th argument. (adl_LIBALT_EITHER): Defaut to prepend the library flags, handle the APPEND option. * m4/h-media.m4 (heroes_MEDIALIB_SELECTION): Use the APPEND option for allm and sdlm. 2001-08-26 Alexandre Duret-Lutz * m4/generic.m4 (AC_PATH_GENERIC): Don't complain about a missing mumble-config if the installer has not used --with-mumble. 2001-08-25 Alexandre Duret-Lutz * doc/heroes.texi (Machines): Add OpenBSD, update MSVC. 2001-08-25 Alexandre Duret-Lutz * m4/h-joystick.m4 (heroes_CHECK_JOYSTICK_LIB): Typo. 2001-08-25 Alexandre Duret-Lutz * configure.ac: Prepend -lm to LIBS if libm is found, this fix a bug introduced on 2001-08-24. 2001-08-25 Alexandre Duret-Lutz * src/sys/Makefile.inc (EXTRA_DIST): Add main.h. 2001-08-25 Alexandre Duret-Lutz * TODO: Update. * ANNOUNCE: Prepare for 0.13. 2001-08-25 Alexandre Duret-Lutz * po/fr.po: Update. 2001-08-25 Alexandre Duret-Lutz * src/heroeslvl.c (version, usage, dir_to_string, type_to_char, print_type_keys, print_tunnels, anim_kind_to_str, print_tile_details, process, main): Use gettext. 2001-08-25 Alexandre Duret-Lutz * doc/heroes.texi (direntry): Add heroeslvl. (heroeslvl): New chapter. 2001-08-24 Alexandre Duret-Lutz * src/heroes.c (find_lemming_direction): Allow lemmings to be blocked under a trail (i.e. don't assert against that). 2001-08-24 Alexandre Duret-Lutz configure was still defining many HAVE_LIB* macro that are no longer needed since the move to src/media/. Only HAVE_LIBSDL_MIXER is used. This remove all the other, to cleanup config.h (and reduce the probability of config.h to change, which is good since all files depend upon config.h). * m4/h-display.m4 (heroes_CHECK_DISPLAY_LIB): Don't call heroes_CHECK_DISPLAY_LIB. * m4/checkpkg.m4 (AC_caolan_CHECK_PACKAGE): Don't define HAVE_LIB[]UP. * m4/h-sdl.m4 (heroes_CHECK_SDL): Don't define HAVE_LIBSDL. (heroes_CHECK_SDL_PRELIM): Merge into heroes_CHECK_SDL. * m4/h-mikmod.m4 (heroes_CHECK_MIKMOD): Don't define HAVE_LIBMIMOD. (heroes_CHECK_MIKMOD_PRELIM): Merge into heroes_CHECK_MIKMOD. * m4/h-sdlmixer.m4 (heroes_CHECK_SDL_MIXER): Define HAVE_LIBSDL_MIXER. * configure.ac: Don't define HAVE_LIBM. 2001-08-24 Alexandre Duret-Lutz This is the start of support for Allegro. It does not work yet (actually it segfault, and I've not yet understood why). Allegro do not use any naming convention for its symbols, neither does Heroes, so presently this lead to many conflicts that had to be resolved by renaming Heroes' symbols. :( * m4/h-allegro.m4: New file. * src/media/allegro/keyb.c: New file. * src/media/allegro/keyvalues.c: New file. * src/media/allegro/video.c: New file. * src/sys/allegro/main.c: New file. * m4/h-display.m4 (heroes_CHECK_DISPLAY_LIB): Call heroes_CHECK_ALLEGRO. * m4/h-media.m4 (heroes_MEDIALIB_SELECTION): Handle allm and allvkm. * m4/libalt.m4 (adl_LIBALT_EITHER): Typo. * m4/pkgeneric.m4 (AC_adl_PKG_GENERIC): Allow to not test for a function presence. * src/hedlite.c: Rename mouse_x and mouse_y into mouse_coord_x and mouse_coord_y. (save_pcx): Rename as ... (save_level_as_pcx): ... this. * src/intro.c: Rename set_color as set_pal_entry. * src/menus.c: Rename set_volume and set_palette as adjust_volume and force_palette. * src/prefs.tpl: Rename KEYCODE_MAX as HKEYCODE_MAX. * src/scrtools.c (set_palette): Rename as ... (force_palette): ... this. * src/scrtools.h: Idem. * src/media/Makefile.inc (EXTRA_LIBRARIES): Add media/libhallvkm.a. (media_libhallvkm_a_CFLAGS, media_libhallvkm_a_SOURCES, nodist_media_libhallvkm_a_SOURCES): New variables. (media/allegro/keysdef.c): New target. * src/media/keyb.c: Rename KEY_MAX into HKEY_MAX, mouse_x into mouse_coord_x, mouse_y into mouse_coord_y. * src/media/keyb.h: Likewise. * src/media/ggi/keyb.c: Likewise. * src/media/sdl/keyb.c: Likewise. * src/media/strack.h (set_volume): Rename as ... (adjust_volume): ... this. * src/media/dummy/strack.c: Likewise. * src/media/mikmod/strack.c: Likewise. * src/media/sdl_mixer/strack.c: Likewise. * src/media/video.h (set_color): Rename as ... (set_pal_entry): ... this. * src/media/dummy/video.c: Likewise. * src/media/ggi/video.c: Likewise. * src/media/sdl/video.c: Likewise. * src/sys/Makefile.inc (EXTRA_LIBRARIES): Add sys/libhallm.a. (sys_libhallm_a_CFLAGS, sys_libhallm_a_SOURCES): New variables. 2001-08-23 Alexandre Duret-Lutz Because some libraries need some special `main' arrangement (e.g. SDL sometime want to rename main() into SDL_main()), we need to turn main() into static libraries... *grin*. * m4/h-media.m4 (heroes_MEDIALIB_SELECTION): Handle stdm/sdlm selection. * src/Makefile.am (INCLUDES): Add -I$(srcdir)/sys. (EXTRA_LIBRARY): Define empty. (CLEANFILES): New. (EXTRA_DIST): Add and include sys/Makefile.inc. * src/heroes.c (main): Rename as ... (heroes_main): ... this. * src/sys/Makefile.inc: New file. * src/sys/main.h: New file. * src/sys/std/main.c: New file. * src/media/Makefile.inc (EXTRA_LIBRARY): Append (+=) instead of assigning (=). (CLEANFILES): Move to src/Makefile.am. 2001-08-22 Alexandre Duret-Lutz * tools/alpha.sh: Typo. 2001-08-22 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12e. * NEWS: Update. * tools/genpotfiles.sh: Grep the files in src/media/ too. 2001-08-22 Alexandre Duret-Lutz * src/lvl/de_body.c (ANIM_FRAME_DELAY): Add 1. * src/lvl/load.c (lvl_load_body_file): Typo. 2001-08-22 Alexandre Duret-Lutz This is a mega-combo-patch which break the files interfacing with the display/keyboard/mouse/sound/joystick libraries into separate directories. Instead of one file per medium, holding code for all supported libraries, we now have one directory per supported library. Many atomic static libraries are built and linked on demand from these directories (roughly one library per medium). This is a lot cleaner: there is no need to play with #ifdef/#ifndef anymore, configure will just decide which of these atomic libraries Heroes will be linked with. Configuration machinery. We now check for all library in a first step, and make a choice for the availble libraries in a second step (taking user preferences into account). * m4/h-media.m4: New file. * m4/libalt.m4: New file. * configure.ac: Replace display/joystick/sound library checks by a call to heroes_MEDIALIB_SELECTION. (Move these checks there.) Comment out the configuration summary. * m4/h-display.m4 (heroes_CHECK_DISPLAY_LIB_PRELIM): Delete. (heroes_CHECK_DISPLAY_LIB): Simplify, don't handle library exclusions. Call adl_LIBALT_OK. * m4/h-ggi.m4 (heroes_CHECK_GGI): Update user_selection_list_vkm. (heroes_CHECK_GGI_POST): Delete. * m4/h-joystick.m4 (heroes_CHECK_JOYSTICK_LIB): Simplify, don't handle library exclusions. Call adl_LIBALT_OK. Update user_selection_list_j. Don't define JOYSTICK_SUPPORT. * m4/h-mikmod.m4 (heroes_CHECK_MIKMOD): Update user_selection_list_s. * m4/h-sdlmixer.m4 (heroes_CHECK_SDL_MIXER): Update user_selection_list_vkm, user_selection_list_j, and user_selection_list_s. * m4/h-sdl.m4 (heroes_CHECK_SDL): Likewise. (heroes_CHECK_SDL_POST): Delete. * m4/h-sound.m4 (heroes_CHECK_SOUND_LIB_PRELIM): Delete. (heroes_CHECK_SOUND_LIB): Update user_selection_list_s, call adl_LIBALT_OK. Many files are moved from src/ to src/media/. The code also have to be adapted to the new API that this break required. Among the major API changes is the key definitions which used to be macros and are now variables, hence they cannot be used as case labels anymore. * src/display.c: Delete (replaced by src/media/video.c, src/media/sdl/video.c, src/media/ggi/video.c) * src/display.h: Delete (replaced by src/media/video.h). * src/joystick.c: Delete (replaced by src/media/sdl/joystick.c, src/media/gii/joystick.c). * src/joystick.h: Delete (replaced by src/media/joystick.h). * src/keyb.c: Delete (replaced by src/media/keyb.c, src/media/sdl/keyb.c, src/media/ggi/keyb.c). * src/keys_heroes.h: Delete (replaced by src/media/keyvalues.h, src/media/sdl/keyvalues.c, src/media/ggi/keyvalues.c). * src/keys_heroes.c: Likewise. * src/keysdef.h: Delete (replaced by src/media/keysdef.h) * src/keysdef.c: Delete. * src/sfx.c: Delete (replaced by src/media/sfx.c, src/media/mikmod/sfx.c, src/media/sdl_mixer/sfx.c). * src/sfx.h: Delete (replaced by src/media/sfx.h). * src/sound.c: Delete (replaced by src/media/strack.c, src/media/sdl_mixer/strack.c, src/media/mikmod/strack.c). * src/sound.h: Delete (replaced by src/media/strack.h) * src/Makefile.am (INCUDES): Add ./media. (CFLAGS): Suppress all meadia-library related CFLAGS. We can now use per-library CFLAGS. (heroes_LDADD): Replace hard-coded values by @LIBALT_LDADD@. (heroes_LDFLAGS): Likewise. (heroes_DEPENDENCIES): New variable. (heroes_SOURCES): Remove moved sources. (BUILT_SOURCES, DISTCLEANFILES): Remove keysdef-inc.h. [SDL, GGI] (keysdef-inc.h): Remove target. (paramfmt-check.o, parafmt-check): Simplify into ... (EXTRA_PROGRAMS, parafmt_check_SOURCES, parafmt_check_CFLAGS): ... these. (EXTRA_DIST): Add media/Makefile.inc and include it. * src/argv.h: Adjust includes. * src/camera.h: Likewise. * src/const.h: Likewise. * src/endscroll.c: Likewise. * src/errors.c: Likewise. * src/fontdata.h: Likewise. * src/intro.h: Likewise. * src/pcx.h: Likewise. * src/pixelize.c: Likewise. * src/pixelize.h: Likewise. * src/render.c: Likewise. * src/renderdata.h: Likewise. * src/scrtools.c: Likewise. * src/sprite.h: Likewise. * src/timer.c: Likewise. * src/visuals.c: Likewise * src/hedlite.c: Likewise. (display_level_map_fullscreen, gestclav): Adjust to new key definitions. * src/heroes.c (play_game): Likewise. * src/menus.c (move_upon, exec_menu, extra_menu, edito_selector, handle_reader_keys): Likewise. * src/system.h: Suppress all the media library selection stuff. * src/prefs.def: Use keys_pref_group () is name for the key group. * src/prefs.tpl: Support for function (or variable) as group names. Most of the following files are made from files deleted from src/. See the top of the preceding block for details. * src/media/Makefile.inc: New file. * src/media/joystick.h: New File. * src/media/keyb.c: New file. * src/media/keyb.h: New file. * src/media/keyb_low.h: New file. * src/media/keysdef.h: New file. * src/media/keyvalues.h: New file. * src/media/sfx.c: New file. * src/media/sfx.h: New file. * src/media/strack.c: New file. * src/media/strack.h: New file. * src/media/video.c: New file. * src/media/video.h: New file. * src/media/video_low.h: New file. * src/media/dummy/joystick.c: New file. * src/media/dummy/keyb.c: New file. * src/media/dummy/keysdef.c: New file. * src/media/dummy/keyvalues.c: New file. * src/media/dummy/sfx.c: New file. * src/media/dummy/strack.c: New file. * src/media/dummy/video.c: New file. * src/media/ggi/keyb.c: New file. * src/media/ggi/keyvalues.c: New file. * src/media/ggi/video.c: New file. * src/media/gii/joystick.c: New file. * src/media/mikmod/sfx.c: New file. * src/media/mikmod/strack.c: New file. * src/media/sdl/joystick.c: New file. * src/media/sdl/keyb.c: New file. * src/media/sdl/keyvalues.c: New file. * src/media/sdl/video.c: New file. * src/media/sdl_mixer/sfx.c: New file. * src/media/sdl_mixer/strack.c: New file. 2001-08-06 Alexandre Duret-Lutz * src/display.c (init_SDL): Don't initialize the sound device if we are not going to use it. Idem with the joystick. Reported by Jean. 2001-08-05 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12d. * NEWS: Update. 2001-08-05 Alexandre Duret-Lutz * src/levellst.c (cmp_levels): Sort the level names on the last digit first, so that they are played in this order: 010 020 030 ... 011 021 ..., and not this one 010 011 012 ... 2001-08-05 Alexandre Duret-Lutz * src/heroes.c (find_free_way): Autopilot still work against file trails for invincible players. 2001-08-05 Alexandre Duret-Lutz * src/structs.h (lemming_t) : Rename as ... (lemming_t) : ... these. * src/heroes.c (update_lemmings): Eve out most of the code to ... (find_lemming_direction): ... this new function. Disallow lemmings to enter tunnels (the change from 2001-07-13 unintentionally allowed this). Comment and cleanup. (load_level): Use find_lemming_direction. (update_player): Adjust to new names. * src/render.c (draw_lemming): Likewise. * src/lvl/lvl.h (DIR_TO_DIRMASK): New function. 2001-08-05 Alexandre Duret-Lutz * src/camera.c (compute_corner) : New variables. Fix computation of the maximum possition for the camera on non-wrapped levels. 2001-08-05 Alexandre Duret-Lutz * src/const.h (radar_target_pos, radar_current_pos): Delete. * src/const.c (radar_target_pos, radar_current_pos): Move ... * src/heroes.c (radar_target_pos, radar_current_pos): ... here. 2001-08-04 Alexandre Duret-Lutz * src/render.c (draw_score): Change prototype, takes row, col and score_shift. Use score_shift instead of the global radar_current_pos variable. Use IMGPOS wherever possible. * src/render.h (draw_score): Change protoype. * src/heroes.c (output_screen): Adjust calls to draw_score. 2001-08-04 Alexandre Duret-Lutz * src/render.c (draw_radar_frame): New function, eved out from draw_radar_map. (draw_radar_map): Call draw_radar_frame, don't use `dede', comment, fix drawing of full-wrapped levels (typo introduced on 2001-07-14). Take the radar_shift parameter instead of using the global radar_current_pos. * src/render.h (draw_radar_map): Adjust prototype. * src/heroes.c (output_screen): Supply new argument to draw_radar_map. 2001-08-04 Alexandre Duret-Lutz * src/levellst.c (cmp_levels): New function. (read_level_list): Sort the levels. 2001-08-02 Alexandre Duret-Lutz Fix issues observed on OpenBSD 2.9. * configure.ac: Check for setgid. * src/system.h (setgid, setgid): Define if needed. (seteuid, setegid): Define using setreuid and setregid if possible. * src/persona.c (sys_persona, user_persona): Test whether _POSIX_SAVED_IDS is *defined*, not its actual value. (user_persona_definitively): Use setuid and setgid instead of setreuid and setregid, the latter are obsolete. 2001-08-02 Alexandre Duret-Lutz Reestablish MinGW32 support. * lib/stpcpy.c: New file, from fileutils 4.1. * lib/Makefile.am (EXTRA_DIST): Add it. * tools/fetish-sync.sh (files): Add stpcpy.c. * src/Makefile.am (heroes_LDADD): Put SDL_MIXER_LIBS before SDL_MIXER since the former needs the latter. (heroeS_LDADD): Add INTLLIBS. * src/lvl/load.c (lvl_load_body_file): Type length as size_t, add rlength and use it. * src/system.h [!HAVE_SSIZE_T] (ssize_t): Define. [!HAVE_DECL_STPCPY] (stpcpy): Declare. [!HAVE_STRCASESTR] (strcasestr): Redeclare ... [!HAVE_DECL_STRCASESTR] (strcasestr): ... in this case. * configure.ac: Check for declaration of ssize_t, strcasestr, and stpcpy. Replace stpcpy if needed. 2001-08-01 Alexandre Duret-Lutz Some Autoconf internal functions have changed between 2.50 and 2.52. Add workarounds to be compatible with both versions. * m4/compat.m4: New file. * m4/checkpkg.m4: Use MY_TR_CPP * m4/findheader.m4: Use MY_VAR_POPDEF, MY_VAR_PUSHDEF, and MY_VAR_SET. * m4/h-obsolet.m4: Use MY_TR_SH. 2001-07-29 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12c. * NEWS: Update for 0.12c. 2001-07-29 Alexandre Duret-Lutz * src/heroes.c (main): Switch to sys_persona() before calling init_sound_engine() and init_video(), and back to user_persona() after. * src/persona.h (keep_sgid, keepsuid): New variables. * src/persona.c (keep_sgid, keepsuid): New variables. (user_persona_definitively): Use them. * src/userconf.c (read_userconf): Handle keepsuid: and keepsgid:. * src/etc/heroesrc (soundconf): Add commented lines for keepsuid and keepsgid. * doc/heroes.texi (heroesrc): Document keepsuid and keepsgid. 2001-07-29 Alexandre Duret-Lutz Build a man page for heroeslvl. * man/Makefile.am (heroeslvl.6): New target. (man_MANS): Add heroeslvl.6. (MAINTAINERCLEANFILES): Rewrite as $(man_MANS). 2001-07-29 Alexandre Duret-Lutz * configure.ac: Show a summary of CFLAGS and LIBS for each libraries. * m4/checkpkg.m4: Typo, s/_LDALL/_LDFLAGS/. * src/Makefile.am (heroes_LDFLAGS): Typo, s/_LIBS/_LDFLAGS/. 2001-07-29 Alexandre Duret-Lutz * configure.ac: Remove the jm_FUNC_REALLOC kludge. 2001-07-29 Alexandre Duret-Lutz Because intl/ and lib/ contains third party code which does not conform to the same level of "strictness" as the code in src/, enable some -Woptions in src/ only. * m4/gccwarn.m4 (CF_GCC_MORE_WARNINGS): New functions. (ad_GCC_WARNINGS): Call CF_GCC_MORE_WARNINGS, AC_SUBST() MORE_WARNINGS_CFGLAGS. * src/Makefile.am (CFLAGS): Add MORE_WARNINGS_CFGLAGS. 2001-07-29 Alexandre Duret-Lutz ``heroeslvl'' should not be linked with SDL or GGI as ``heroes''. So let's change configure to not add those libraries to LIBS, CFLAGS, etc. Use per-target LDFLAGS and LDADD instead. * m4/checkpkg.m4: Set and AC_SUBST() UP[]_LDFLAGS, UP[]_CFLAGS, and UP[]_LIBS. * m4/h-joystick.m4: Add $SDL_LIBS to $LIBS before testing. * m4/h-sdl.m4: Check for SDL_EnableKeyRepeat in the call to AC_adl_PKG_GENERIC. * m4/pkgeneric.m4: Revert LIBS and CFLAGS. * src/Makefile.am (CFLAGS, heroes_LDFLAGS): New. (heroes_LADADD): Update. * lib/Makefile.am (CFLAGS): New. 2001-07-27 Alexandre Duret-Lutz * src/heroes.c (main): Call read_sfx_conf after init_sound_engine (). * src/sfx.c (read_sfx_conf): Free sfxdir on error. 2001-07-27 Alexandre Duret-Lutz * src/lvl/de_body.c (decode_level_body): Free square_walls_in. 2001-07-27 Alexandre Duret-Lutz * src/locales.c: New file. * src/locales.h: New file. * src/Makefile.am (heroes_SOURCES): Add them. * src/heroes.c (main): Move locale initialization code to init_locales() in locales.c and call it. 2001-07-27 Alexandre Duret-Lutz * src/musicfiles.c: Cosmetics changes. (dir_name): Delete, include "dirname.h" instead. (read_sound_config_file): Adjust to the new dir_name(), i.e., add a `/' between the file name and the directory name. 2001-07-27 Alexandre Duret-Lutz ``heroes-sdl -G mumble'' didn't work because the string put in environment (SDL_VIDEODRIVER=mumble) was immediatly freed afterward. * src/display.c [HAVE_LIBSDL] (sdl_videodriver): New variable. [HAVE_LIBSDL] (set_display_params): Set sdl_videodriver, putenv() it, but don't free it. [HAVE_LIBSDL] (uninit_video): Free sdl_videodriver here. 2001-07-26 Alexandre Duret-Lutz * src/camera.c (compute_corner): Cleanup. * src/const.c (camera_center_x): Remove. * src/const.h (camera_center_x): Remove. * src/heroes.c (play_demo, play_game): Don't set camera_center_x. 2001-07-25 Alexandre Duret-Lutz * src/const.h (square2offset, invincible): Delete. * src/const.c (square2offset): Delete. (invincible): Move to ... * src/render.c (invincible): ... here. * src/heroes.c (load_level): Don't initialize square2offset. 2001-07-26 Alexandre Duret-Lutz A report from William Black about the vehicles-restricted-in-a-two-square-width-vertical-zone allowed to finally close this bug (reported by Jean in Dec 2000). * src/people.def: Add him. * BUGS: Update. 2001-07-25 Alexandre Duret-Lutz Check gettext version in upgettext.sh. Older versions can cause the bootstrap process to fail ungracefully. Suggested by Laurent Duperval . * tools/upgettext.sh (usage): Add -f. (checkversion): New function. Handle -f, call checkversion unless -f is given. 2001-07-24 Alexandre Duret-Lutz * tools/alpha.sh: Reorder and comment sections. 2001-07-24 Alexandre Duret-Lutz * configure.ac: Bump to 0.12b. * NEWS: Update for 0.12b. * doc/Makfile.am (.texi.html): Add --no-split, newer versions of makeinfo need this. 2001-07-23 Alexandre Duret-Lutz * doc/heroes.texi (Invoking): More documentation for -G and -F. * TODO: Update. 2001-07-23 Alexandre Duret-Lutz * tools/Makefile.inc: New file. * tools/Makefile.am: Delete. * tools/README: New file. * tools/exnews.pl: New file. * tools/alpha.sh: New file. * configure.ac: Don't create tool/Makefile.in. * Makefile.am: Include tools/Makefile.inc (SUBDIRS): Remove tools. (EXTRA_DIST): Add tools/Makefile.inc. 2001-07-22 Alexandre Duret-Lutz * src/lvl/free.c: New file. * src/lvl/Makefile.inc (lvl_libhlvl_a_SOURCES): Add lvl/free.c. * src/lvl/in_body.c (initialize_empty_level_body): New function. * src/lvl/lvl_priv.h (initialize_empty_level_body): New function. * src/lvl/load.c (lvl_load_file): Call it. * src/heroes.c (unload_level): Call lvl_free. * src/heroeslvl.c (process): Likewise. * src/levellst.c (read_level_dir): Likewise. 2001-07-22 Alexandre Duret-Lutz * src/levellst.c: New file. * src/levellst.h: New file. * src/Makefile.am (heroes_SOURCES): Add them. * src/extras.c (select_file): Rename as select_file_lvl and move to levellst.c. (browse_Extra_directories): Use select_file_lvl. * src/heroes.c (level_list, levellstchunk, levelinf, level_list_nbr): Remove, replaced by varables from levellst.h and .c. (level_full_list_Size, current_quest_level): Define as unsigned. (load_level_from_level, compute_level_full_list, random_level, load_random_wrapped_level, load_random_level, play_menu, load_demo, main_menu, main): Adjust to the new definitions. (read_level_list): Remove. * sr/rsc_files.gperf (end-scroller-txt, help-txt, levels-list-txt, text-conf-txt): Remove. 2001-07-22 Alexandre Duret-Lutz * src/lvl/load.c (lvl_load_body_mem, lvl_load_header_mem): New functions. (lvl_init_lvl_basic_fields): New function, extracted from... (lvl_load_header): ... here. Rename as ... (lvl_load_header_file): ... this. Use lvl_load_header_mem. (lvl_load_body): Rename as ... (lvl_load_body_file): ... this. Use lvl_load_header_file. (lvl_load_file): Try to load the file using mmap, before falling back to read. 2001-07-21 Alexandre Duret-Lutz * src/heroeslvl.c (process): Don't load full level if we can avoid it. 2001-07-21 Alexandre Duret-Lutz Add option -pi to display tile details. * src/heroeslvl.c (options_t): Add print_tile_details. (print_tile_details, anim_kind_to_str): New functions. (usage): Document -pi. (decode_print_options): Handle 'i'. (print_square_type, print_square_walls, print_square_directions): Print line numbers. (process): Call print_tile_details. 2001-07-19 Alexandre Duret-Lutz Gather camera handling code from heroes.c and const.c into camera.c. * src/camera.c: New file. * src/camera.h: New file. * src/Makefile.am (heroes_SOURCES): Add camera.c and camera.h. * src/const.c (camera_x, camera_y, corner_x, corner_y, corner, corner_dx, corner_dy, inert_x, inert_y, nbr_tiles_cols, nbr_tiles_rows): Move to camera.c. (camera_stop_x, camera_stop_y): Move to ... * src/render.c (draw_level): ... here. * src/const.h: Likewise. * src/scrtools.c: Likewise. * src/visuals.c: Likewise. * src/endscroll.c: Include camera.h. * src/heroes.c (compute_corner): Move to camera.c. (update_all): Extract the position_camera() function, now in camera.c. (output_screen): Call position_camera(). (play_demo, play_game): Extract and call init_camera(). * src/menus.c (background_menu): Extract and call lisajou_camera(). 2001-07-16 Alexandre Duret-Lutz * configure.ac: Bump to 0.12a. Call AM_PROG_CC_C_O. * NEWS: Update for 0.12a. * TODO: Likewise. * src/Makefile.am (EXTRA_DIST): Add etc/Makefile.inc and lvl/Makefile.inc. (AUTOMAKE_OPTIONS): New. * Makefile.am (EXTRA_DIST): Add arch/Makefile.inc and m4/Makefile.inc. 2001-07-15 Alexandre Duret-Lutz New bonus: fire trail. * src/helptext.c (help_text2, help_text4): Document it. * src/bonus.c (bonus_density, bonus_point): Fill in the fire trail column. (apply_bonus): Handle fire_trail. * src/structs.h (player_t) : New. * src/player.c (reinit_player): Zeroes player[p].fire_trail. (find_free_way): Disable autopilot against fire trails. (update_player): Handle fire_trail. 2001-07-15 Alexandre Duret-Lutz * src/heroes.c (compute_corner): Compute and cast tw and th once for all. (update_all): Fix camera position computation (typo from 2001-07-13). 2001-07-15 Alexandre Duret-Lutz Rewrite the way explosions are handled. There used to be two distinct explosion types: those from T_BOOM squares and those triggered by player death. Both where handled separately and in different ways. This is now homogeneous. Two noticeable differences are that death explosions are now harmful to other players and will propagate to neighbor T_BOOM squares. * src/const.c (last_explo, square_explosion, square_dead_explosion, explo_list_ptr, explo_list_pos_x, explo_list_pos_y, explo_nbr, square_explosion_type): Delete. * src/const.h: Likewise. * src/explosions.c (square_explo_state): New variable, replace suqare_explosion and square_dead_explosion. (square_explo_type): New variable, replace square_explosion_type. (explosion_info_t, explo_list, explo_list_max, explo_list_first_unused, explo_timer, explo_time, allocate_explosions, release_explosions, trigger_explosion, trigger_possible_explosion, update_explosions): New. * src/explosions.h (EXPLOSION_SLICES_PER_FRAMES, EXPLOSION_DELAY, EXPLOSION_IMMEDIATE, EXPLOSION_TRIGGERED, EXPLOSION_TRIGGER_NEIGHBORS, EXPLOSION_UNTRIGGERED, explosion_t, square_explo_state, square_explo_type, allocate_explosions, release_explosions, trigger_explosion, trigger_possible_explosion, update_explosions): New. * src/heroes.c (load_level): Adjust to call allocate_explosions(). (unload_level): Adjust to call release_explosions(). (erase_trail): Adjust to call trigger_explosion(). (ia_eval_dir_target_inline, ia_eval_dir_bonus_inline, ia_eval_dir_lemming_inline, ia_eval_dir_cash_inline, ia_eval_dir_color_inline, ia_goto_target_inline, ia_goto_bonus_inline, ia_goto_lemming_inline, ia_goto_color_inline, ia_goto_cash_inline): Adjust to use square_explo_state. (update_explo): Remove. (update_all): Call update_explosions() instead of update_explo(). * src/render.c: (render): Adjust to use square_explo_type and square_explo_state, suppress the separate rendering loop for players' death explosions. 2001-07-14 Alexandre Duret-Lutz * src/const.h (d2w, w2d, square_offset): Delete. (square2tile, square_offset2coord): Rename as ... (square_tile, square_coord): ... these. * src/const.c (d2w, w2d): Remove. (square2tile, square_offset2coord): Rename as ... (square_tile, square_coord): ... these. (square_offset): Move to ... * src/hedlite.c (square_offset): ... here. * src/heroes.c (load_level, unload_level, ia_eval_dist, update_player, update_all): Adapt to new names. (find_free_way, update_lemmings): Don't use w2d. * src/render.c (draw_radar_map): Adapt to new names. 2001-07-13 Alexandre Duret-Lutz Use the new level loading library to load levels in the game (not the level editor). This new loading code will export level infos differently, hence many places have to be adapted to the new representation. * lib/xstrduplwr.h: New file. * lib/xstrduplwr.c: New file. * lib/Makefile.am: Add them. * src/Makefile.am (LDADD): Rename as ... (heroeslvl_LDADD): ... this. Add lvl/libhlvl.a. * src/const.c (map_info, map_info_2xt, map_info_2yt, map_info_2xwrap, map_info_2ywrap, level_map, square_radar_wall, square_wall, square_wrap): Remove these variables. (lvl): New variable, which replace all the above. * src/const.h: Likewise. * src/bonus.c (add_bonus, mark_unreachable_places, init_bonuses_level): Adjust to use the new level representation. * src/heroes.c (ia_target_x, ia_targer_y, ia_wrap_x, ia_wrap_y): Declare as square_coord_t. (tunnel_square_io): Remove this variable. (add_color, add_cash, erase_player, reinit_player, load_level, compute_corner, shrink_trail, erase_trail, ia_eval_dist, ia_eval_dir_target_inline, ia_eval_dir_bonus_inline, ia_eval_dir_lemming_inline, ia_eval_dir_cash_inline, ia_eval_dir_color_inline, ia_eval_neighb_pos, ia_eval_dir_target, ia_eval_dir_lemming, ia_eval_dir_color, ia_eval_dir_cash, ia_eval_dir_bonus, ia_goto_target_inline, ia_goto_bonus_inline, ia_goto_lemming_inline, ia_goto_color_inline, ia_goto_cash_inline, ia_goto_target, ia_goto_nearest_bonus, ia_goto_nearest_lemming, ia_goto_nearest_color, ia_goto_nearest_cash, update_player, update_explo, update_lemmings, update_all): Adjust to use the new level representation. * src/menu.c (background_menu): Likewise. * src/render.c (draw_level): Likewise. * src/renderdata.c (init_render_data): Likewise. * src/struct.h (DONT_WRAP): Don't declare, it's done in lvl/lvl.h. (player_t) : Declare as dir_t. (lemming_t) : Likewise. * src/renderdata.h (tile_anim_kind): Move to ... * src/lvl/lvl.h (anim_kind_t): ... here. (lvl_tile_sprite_overlay_offset): New function. (lvl_animation_info): Return animation type too. * src/lvl/de_body.c (TILE_SPRITE): Rename as ... (TILE_OVERLAY): ... this. (TILE_SPRITE): New. (decode_level_body): Read the sprite overlay, handle animation types. * src/lvl/de_head.c (decode_level_header): Lowercasify the sprite map basename. * src/lvl/lvl_priv.h (tile_data_t) : New. * src/lvl/privacc.c (lvl_tile_type, lvl_tile_sprite_offset, lvl_tile_sprite_overlay_offset, lvl_animation_info): New functions. 2001-07-10 Alexandre Duret-Lutz Some directories do not deserve their own Makefile (it takes time to recurse directories, and it's ugly). Replace some `Makefile.am' files by some `Makefile.inc' included from the underlying `Makefile.am'. * src/etc/Makefile.inc: New file. * src/etc/Makefile.am: Delete. * src/Makefile.am: Include src/etc/Makefile.inc. * tools/genm4mam.sh: Create m4/Makefile.inc instead of m4/Makefile.am. * arch/Makefile.inc: New file. * arch/Makefile.am: Delete. * configure.ac: Don't create src/etc/Makefile, m4/Makefile, and arch/Makefile.am. * Makefile.am: Include arch/Makefile.am and m4/Makefile.inc. (SUBDIRS): Remove arch and m4. (configure.ac): Don't create m4/Makefile, arch/Makefile, and src/etc/Makefile. * HACKING: Adjust. 2001-07-10 Alexandre Duret-Lutz * src/lvl/Makefile.inc: New file. * src/lvl/de_body.c: New file. * src/lvl/de_head.c: New file. * src/lvl/in_body.c: New file. * src/lvl/load.c: New file. * src/lvl/loadmac.h: New file. * src/lvl/lvl.h: New file. * src/lvl/lvl_priv.h: New file. * src/lvl/privacc.c: New file. * src/heroeslvl.c: New file. * src/Makefile.am: include src/lvl/Makefile.inc. (bin_PROGRAMS): Add heroeslvl. (INCLUDE, heroeslvl_SOURCES, heroeslvl_LDADD): New variables. * src/system.h: Add O_BINARY support. 2001-07-10 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12. * HACKING: Update. * TODO: Update. * NEWS: Update. * m4/gettext.m4: Update from Debian's gettext 0.10.38-2. 2001-06-17 Alexandre Duret-Lutz These patches are no longer needed with gettext-0.10.38. * misc/04-intl.patch: Delete. * misc/04-m4.patch: Delete. * misc/06-intl.patch: Delete. * Makefile.am (EXTRA_DIST): Remove them. * m4/gettext.m4: Upgrade for gettext-0.10.38. * m4/glibc21.m4: Likewise. * m4/iconv.m4: Likewise. 2001-06-16 Alexandre Duret-Lutz Yet another couple of fixes suggested by Jean. * src/menus.c (draw_end_level_info): Center the title (winner). (info_mode_next_save_arrow_pos): New variable. (init_menus_sprites): Compute info_mode_next_save_arrow_pos. (draw_end_level_info): Use it. 2001-06-16 Alexandre Duret-Lutz Jean reported several times that some levels play without any sound. These five levels are affected | ~/usr/share/heroes/levels % grep heroes * | Binary file niv038.lvl matches | Binary file niv039.lvl matches | Binary file niv049.lvl matches | Binary file niv067.lvl matches | Binary file niv108.lvl matches because they use lowercase soundtrack aliases instead of uppercase as the others. This patch change the hashing function used to lookup soundtrack aliases so that uppercase and lowercase versions of the same aliase will be hashed to the same value. * src/musicfiles.c (hash_case_string): New function. (st_hasher, get_sound_track_from_alias): Use hash_case_string instead of hash_string. * BUGS: Remove related entry. 2001-06-16 Alexandre Duret-Lutz * src/menus.c (init_menus_sprites): Reverse the strings "NEW LEVEL" and "EXISTING LEVEL". Reported by Jean. (editor_menu): Lowercasify the level name before trying to open the file for preview. Add debug messages. 2001-06-16 Alexandre Duret-Lutz Rewrite editor_first_menu using the compile_menu machinery. This also get rid of a bug reported by Jean where the french translation for "NEW LEVEL" would have been larger than the distance between the waving arrows. * src/menus.c (edit_first_menu_txt, edit_first_new_txt, edit_first_load_txt): Remove. (editor_entries, editor_menu_data): New variables to replace the three above. (init_menus_sprites, uninit_menus_sprites): Adjust. (editor_first_menu): Use exec_menu. 2001-06-04 Alexandre Duret-Lutz * src/joystick.c [HAVE_SDL_JOYSTICKOPEN, HAVE_LIBGII] (get_joystick_state): Print debug messages for joystick events. * src/debugchn.def (joystick): Adjust documentation. 2001-06-03 Alexandre Duret-Lutz * lib/filelock.h: Change protoype. * lib/filelock.c: Likewise, supply flock() and _locking() implementations, not really tested. * m4/filelock.m4: New file. * m4/fopenlock.m4: Remove (obsolete). * src/scores.c: Adjust to new filelock and fileunlock prototypes. * src/savegame.c: Likewise. * src/savegame.c (write_save_records_locked, load_save_records): Seek to the beginning of file before unlocking. * src/scores.c (write_scores_locked, load_scores): Likewise. 2001-05-28 Alexandre Duret-Lutz * src/joystick.c [HAVE_LIBGII] (_get_joystick_state): Fix valuator reads. 2001-05-28 Alexandre Duret-Lutz * m4/relpaths.m4: Typos in comments. 2001-05-23 Alexandre Duret-Lutz * m4/normpath.m4: Cleanup for submission to the autoconf archive. * m4/relpaths.m4: Likewise. 2001-05-23 Alexandre Duret-Lutz * tools/autogen.sh: Recurse directories to find configure.{ac,in}. 2001-05-22 Alexandre Duret-Lutz * configure.ac: Bump version number to 0.11. * ANNOUNCE: Update for 0.11. * TODO: s/0.11/0.12/, how shame! * po/fr.po: Update. 2001-05-22 Alexandre Duret-Lutz * src/hedlite.c (create_levels_output_dir): Strip trailing slashes from level output directory, or it doesn't work with MinGW. * src/userdir.c (setup_userdir): Likewise with the userdir. 2001-05-22 Alexandre Duret-Lutz * arch/mingw32/cross.sh: Fix function declarations, the `function' keyword is not portable. (cross_install): Zip ChangeLog.00 too, delete charset.alias. 2001-05-21 Alexandre Duret-Lutz * configure.in: Move to ... * configure.ac: ... here. Make it dependent on autoconf 2.50. * tools/autogen.sh: Be configure.ac aware. * tools/upgettext.sh: Likewise. * HACKING: s/configure.in/configure.ac/. * man/Makefile.am (heroes.6): Likewise. 2001-05-21 Alexandre Duret-Lutz * arch/Makefile.am: Remove the commented rules to please automake 1.4f (which bugs on trailing backslashes in comments). After all we can get the old rules back from CVS. 2001-05-21 Alexandre Duret-Lutz * ChangeLog.00: New file. * Makefile.am (EXTRA_DIST): Add ChangeLog.00. 2001-05-21 Alexandre Duret-Lutz Don't install charset.alias on glibc 2.1 systems. This is base on the patch that Bruno Haible applied on the Gettext CVS version to address the issue. * m4/glibc21.m4: New file. * m4/gettext.m4 (AM_GNU_GETTEXT): Require jm_GLIBC21. * misc/06-intl.patch: New file. * Makefile.am (EXTRA_DIST): Add misc/06-intl.patch. 2001-05-21 Alexandre Duret-Lutz * configure.in: Bump version number to 0.10b. * NEWS: Update for 0.10b. * HACKING: Update fetish files. 2001-05-20 Alexandre Duret-Lutz * src/etc/heroesrc (soundconf): Don't say preferences can be global. * doc/heroes.texi (Global score file): Likewise. 2001-05-20 Alexandre Duret-Lutz Allow the user to use other score or save files. * src/savegame.c (reinit_save_records_if_needed): New. * src/savegame.h (reinit_save_records_if_needed): New. * src/scores.c (reinit_scores_if_needed): New. * src/scores.h (reinit_scores_if_needed): New. * src/heroes.c (main): Call them. * src/scores.c (load_scores): Don't unlock the file if it's not open. * src/savegame.c (load_save_records): Likewise. 2001-05-20 Alexandre Duret-Lutz Change the way global file access and file locking is done. Before this patch whenever an update of a global file was requested the game had to a) switch personna if needed to access the file b) open the file c) lock it d) update the file e) close the file With this patch the global files are now open when the game begin, using the system persona, the game then switch to the user persona definitively, be keep the global file open for the whole life of the game. Updating a file now just consist of a) seeking to the beginning of the file b) locking the file c) updating the file d) unlocking the file The rationnal for this change is that it allows to drop all privileges definitively after the global files are open. Later, when scripting capability will be added to Heroes, it is important that the user cannot switch persona at will :) * lib/fopenlock.c: Delete. * lib/fopenlock.h: Delete. * lib/filelock.c: New file. * lib/filelock.h: New file. * lib/Makefile.am (libheroes_a_SOURCES, noinst_HEADERS): Replace fopenlock.c and fopenlock.h by filelock.c and filelock.h. * src/persona.c (user_persona_definitively): New function. (sys_persona_if_needed): Export. (persona_fopenlock): Remove. * src/persona.h (user_persona_definitively): New function. (sys_persona_if_needed): Export. (persona_fopenlock): Remove. * src/savegame.c (init_save_records): New. (save_games_file): Remove, adjust all callers to use name instead. (write_save_records): Rename as ... (write_save_records_locked): ... this. Don't close the file. (write_save_records): New, call write_save_records_lock. (load_save_records_open): Rewrite and rename as ... (load_save_records_seek): ... this. Adjust all callers. (load_save_records): Don't close the file, but unlock it. (load_save_records_and_keep_locked): Don't create the file. (free_save_records): Close the file here. * src/savegame.h (init_save_records): New. (write_save_records_locked): New. * src/scores.c (init_scores): New. (score_file): Remove, adjust all callers to use name instead. (write_scores): Rename as ... (write_scores_locked): ... this. Don't close the file. (write_scores): New, call write_scores_locked. (load_scores_open): Rewrite and rename as ... (load_scores_seek): ... this. Adjust all callers. (load_scores): Don't close the file, but unlock it. (load_scores_and_keep_locked): Don't create the file. (free_scores): Close the file here. * src/scores.h (init_scores): New. (write_scores_locked): New. * src/heroes.c (play_menu): Use write_scores_locked() instead of write_scores(). (main): Call init_scores(), init_save_records(), and user_persona_definitively(). 2001-05-20 Alexandre Duret-Lutz Hopefully, Heroes now works back with MinGW. * lib/stripslash.c: New file from fileutils-4.1. * lib/stripslash.h: New file. * src/relocalte.c (check_installation): Strip slashes before calling isdir. (try_to_explore_path): Check path_env against ';', not path. * tools/fetish-sync.sh (files): Add stripslash.c. * lib/dirname.c (dir_name): Compute append_dot using path, not newpath. * Makefile.am (SUBDIRS): Make intl before lib because lib needs libintl.h. * arch/mingw32/dest-readme-lib: Update to SDL 1.2.0 and SDL_mixer 1.2.0. * arch/mingw32/cross.sh: Likewise. * arch/mingw32/dest-run-bat: Update for i18n and relocation. * arch/mingw32/dest-readme-txt: Likewise. 2001-05-19 Alexandre Duret-Lutz * m4/h-paths.m4: Adjust the definition of localedir to the one used by recent gettexts, and put more comments about issues regarding localedir. 2001-05-19 Alexandre Duret-Lutz * m4/dos.m4: New file, from fileutils-4.1, patched to check for __WIN32__, _WIN32, and __MSDOS__. * tools/fetish-sync.sh (files): Add dos.m4. * configure.in: Call jm_AC_DOS. 2001-05-19 Alexandre Duret-Lutz * po/it.po: New revision from Alessandro. 2001-05-19 Alexandre Duret-Lutz * src/menus.c (handle_reader_keys): Typo. 2001-05-19 Alexandre Duret-Lutz * src/relocate.c (try_to_explore_path): Support semicolon separated paths. 2001-05-19 Alexandre Duret-Lutz * src/visuals.c: s/gauche/left/; s/droite/right/ (vertical_zoom_wave): Fix display of last line. Reported by Jean. 2001-05-17 Alexandre Duret-Lutz * doc/heroes.texi: Various fixes suggested by Jean. 2001-05-08 Alexandre Duret-Lutz * configure.in: Bump version to 0.10a. * NEWS: Update for 0.10a. 2001-05-08 Alexandre Duret-Lutz * src/relocate.c (try_to_derive_argv0): Don't free path if null. 2001-05-08 Alexandre Duret-Lutz * src/items.c (catch_this): Remove. (tutorial_arrow): New. (init_item, unit_items): Handle tutorial_arrow instead of catch_this. * src/items.h (catch_this): Remove. (tutorial_arrow, NBR_ARROW_FRAMES): New. * src/render.c (draw_level): Change the tutorial arror rendering the draw loops with the new arrow. * src/rsc_files.gperf (arrow-img): New. * src/system.h (M_PI, M_PI_2, M_PI_4): New. 2001-05-06 Alexandre Duret-Lutz * src/helptext.c (help_text1): Draw the two pictures in the background and label them using textat commands. * src/readmake.c (flag_error): New function. (compile_reader_data): Handle textat commands and use flag_error. 2001-05-06 Alexandre Duret-Lutz * configure.in: Bump version number to 0.10. * NEWS: Update for 0.10. * GNUmakefile (src/debughash.gperf): New target. (cvsboot): Require src/debughash.gperf. * po/fr.po: Update. 2001-05-06 Alexandre Duret-Lutz * Makefile.am: Avoid non-portable use of $< and $@ in explicit rules. * doc/Makefile.am: Likewise. * man/Makefile.am: Likewise. * src/Makefile.am: Likewise. * Makefile.am (MAINTAINERCLEANFILES): New target. (DISTCLEANFILES): Remove (intl/libintl.h is now removed from intl/Makefile). * man/Makefile.am (MAINTAINERCLEANFILES): New target. * src/Makefile.am (MAINTAINERCLEANFILES): New target. 2001-05-06 Alexandre Duret-Lutz * arch/Makefile.am: Comment out all the VisualC stuff. It's out of date. 2001-05-05 Alexandre Duret-Lutz * GNUmakefile (src/people.c): New target. (cvsboot): Require src/people.c. 2001-05-05 Alexandre Duret-Lutz * ANNOUNCE: Update for 0.10. * TODO: Likewise. 2001-05-05 Alexandre Duret-Lutz Update copyright year for recently modified files. * src/debugmsg.c: Copyright 2001. * src/misc.c: Likewise. * src/misc.h: Likewise. * src/pcx.c: Likewise. * src/rsc_files.c: Likewise. * src/rsc_files.gperf: Likewise. * src/rsc_files_hash.h: Likewise. * src/userconf.h: Likewise. * src/userconf.c: Likewise. * tools/autogen.sh: Likewise. * tools/cvsboot.sh: Likewise. * tools/fetish-sync.sh: Likewise. 2001-05-05 Alexandre Duret-Lutz * src/pcx.c (delta): Remove. (pcx_load): Remove call to delta, and do some cosmetic cleanups. 2001-05-05 Alexandre Duret-Lutz Get rid of new gcc-3.0 warnings. * src/const.c (draw_glenz_box): Remove `operation possibly undefined warning'. * src/pcx.c (delta): Likewise. * src/render.c (draw_radar_map, draw_score, draw_logo_info): Likewise. * src/heroes.c (output_screen): Likewise. (play_game): Set default value for 0 to suppress a warning. 2001-05-05 Alexandre Duret-Lutz * GNUmakefile: New file. * Makefile.am (EXTRA_DIST): Add GNUmakefile. * HACKING: Update. 2001-05-05 Alexandre Duret-Lutz * m4/gnu-source.m4: New file. * tools/fetish-sync.sh (files): Add m4/gnu-source.m4. * configure.in: Call AC__GNU_SOURCE. 2001-05-04 Alexandre Duret-Lutz Change the CREDIT screen to thanks ALL people. * src/people.h: New file. * src/people.tpl: Generate people.c. * src/Makefile.am (heroes_SOURCES): Add people.h add people.c. (people.c): New target. * src/menu.c (people_text): New variable. (credit_menu): Remove variable. (init_menus_sprites, uninit_menus_sprites): Handle people_text, remove reference to credit_menu. (handle_reader_keys): New functions. (jukebox_keys): Call handle_reader_keys. (jukebox_menu): Display people_text instead of credit_menu. * src/people.def: Add Eugenia Loli-Queru, Ian Dalton, and Pascal Rigaux. * src/relocate.c (try_to_explore_path): Oops, exit the loop if needed. 2001-05-03 Alexandre Duret-Lutz Generate AUTHORS, THANKS, and the associated section of the documentation from a central file (src/people.def). * AUTHORS: Delete. * THANKS: Delete. * Makefile (AUTHORS, THANKS): New targets. * src/people.def: New file. * src/people.tpl: New file. * src/Makefile.am (heroes_SOURCES): Add people.def or people.tpl. * doc/Makefile.am (heroes_TEXINFOS, MAINTAINERCLEANFILES): Add people.texi. (people.texi): New target. * doc/heroes.texi (Authors, Contributors): Replaces these sections ... (People): ... with this one, which includes people.texi. 2001-05-03 Alexandre Duret-Lutz * configure.in: Ask AM_GNU_GETTEXT to check for ngettext. Reported by Jean. 2001-05-01 Alexandre Duret-Lutz * configure.in: Bump version number to 0.9b. * NEWS: Update for 0.9b 2001-05-01 Alexandre Duret-Lutz * doc/heroes.texi (Relocatable package): New section. * tools/readme.sed: Adjust summary. 2001-05-01 Alexandre Duret-Lutz Better relocation: use argv0 and PATH to guess the location of data files. * configure.in: Check for memrchr. * lib/dirname.c: New file. * lib/dirname.h: New file. * lib/memrchr.c: New file. * lib/Makefile.am (EXTRA_DIST): Add memrchr. (noinst_HEADERS): Add dirname.h. (libheroes_a_SOURCES): Add dirname.c. * src/relocate.c (try_to_derive_argv0, try_backward_relative_bindir, try_to_explore_path): New functions. (relocate_data): Call this function. Take a argv0 argument. * src/relocate.h (relocate_data): Take a argv0 argument. * src/heroes.c (main): Adjust call to relocate_data. 2001-05-01 Alexandre Duret-Lutz From Alessandro Dotti . * po/it.po: New revision. 2001-04-30 Alexandre Duret-Lutz Italian translations. From Alessandro Dotti . * configure.in (ALL_LINGUAS): Add it. * po/it.po: New file. 2001-04-29 Alexandre Duret-Lutz * src/savegame.c (write_save_one_record): New function. * src/savegame.h (write_save_one_record): Likewise. * src/heroes.c (play_game): Use it. 2001-04-29 Alexandre Duret-Lutz * src/scores.c (insert_scores): New function. * src/scores.h (insert_scores): Likewise. * src/heroes.c (play_menu): Use it. 2001-04-29 Alexandre Duret-Lutz * po/fr.po: Update. 2001-04-29 Alexandre Duret-Lutz * src/relocate.c (relocate_data): Typo. 2001-04-29 Alexandre Duret-Lutz * src/menus.c (game_menu): Use ngettext to handle plural. * src/heroes.c (update_player): Likewise. * src/system.h (ngettext): Define replacement macro. 2001-04-28 Alexandre Duret-Lutz * src/etc/heroesrc (soundconf): Suggest to use ifdef suid-or-sgid to protect the definition of global paths. * src/userconf.c (read_userconf): Handle ifdef/endif. 2001-04-28 Alexandre Duret-Lutz * src/vars.h: New file. * src/vars.c: New file. * src/Makefile.am (heroes_SOURCES): Add vars.c and vars.h. * src/argv.c (list): Handle --list=variables. * src/heroes.c (main): Un/initialize variables. * src/persona.c (init_persiona): define sgid/suid/suid-or-sgid variables. 2001-04-25 Alexandre Duret-Lutz * tools/upgettext.sh: Fix function declarations, the `function' keyword is not portable. * tools/cvsboot.sh: Likewise. * tools/autogen.sh: Likewise. 2001-04-25 Alexandre Duret-Lutz * misc/01-intl.patch: New file. * misc/04-intl.patch: New file. * misc/04-m4.patch: New file. * misc/05-po.patch: New file. * Makefile.am (EXTRA_DIST): Add all the above files. * tools/upgettext.sh: Patch the gettext files using all the above patch, except 04-m4.patch (already applied). * tools/Makefile.am (EXTRA_DIST): Add upgettext.sh. 2001-04-24 Alexandre Duret-Lutz * gettext.m4: Check for getegid(). 2001-04-24 Alexandre Duret-Lutz Drop the fetish copy of gettext and switch to gettext-0.10.37, released a few days ago. The main reason for the change is that the change needed to run the old gettext on MinGW are already present in 0.10.37. * m4/lcmessage.m4: Update to gettext-0.10.37. * m4/progtest.m4: Likewise. * tools/cvsboot.sh: Run tools.upgettext.sh. * tools/fetish-sync.sh: Remove the gettext files, we are now using stock gettext. * ABOUT-NLS: Delete, installed by gettextize. * intl/ChangeLog: Likewise. * intl/Makefile.in: Likewise. * intl/VERSION: Likewise. * intl/bindtextdom.c: Likewise. * intl/cat-compat.c: Likewise. * intl/dcgettext.c: Likewise. * intl/dgettext.c: Likewise. * intl/explodename.c: Likewise. * intl/finddomain.c: Likewise. * intl/gettext.c: Likewise. * intl/gettext.h: Likewise. * intl/gettextP.h: Likewise. * intl/hash-string.h: Likewise. * intl/intl-compat.c: Likewise. * intl/l10nflist.c: Likewise. * intl/libgettext.h: Likewise. * intl/linux-msg.sed: Likewise. * intl/loadinfo.h: Likewise. * intl/loadmsgcat.c: Likewise. * intl/localealias.c: Likewise. * intl/po2tbl.sed.in: Likewise. * intl/textdomain.c: Likewise. * intl/xopen-msg.sed: Likewise. * po/Makefile.in.in: Likewise. * m4/libintl.m4: Delete, gettext use gettext.m4. * m4/codeset.m4: New file, from gettext-0.10.37. * m4/gettext.m4: Likewise. * m4/iconv.m4: Likewise. * m4/isc-posix.m4: Likewise. * tools/upgettext.m4: New file. * HACKING: Reflect changes. 2001-04-21 Alexandre Duret-Lutz * configure.in: Bump version number to 0.9a. * Makefile.am (null_AM_MAKEFLAGS): Set AUTOGEN to false. * src/Makefile.am (heroes_SOURCES): Add debugchn.def, debugchn.tpl, prefs.def and prefs.tpl. * lib/Makefile.am (noinst_HEADERS): Typo. * doc/Makefile.am (CLEANFILES): New. * src/system.h: Don't declare keycode_t as u32_t. * doc/heroes.texi (Machines): Add BeOS. Reported by Todd Allendorf . 2001-04-21 Alexandre Duret-Lutz * m4/checkpkg.m4: Prepend new libraries, instead of appending them. * m4/ftruncate.m4: Check for chsize and define HAVE_CHSIZE, always link ftruncate.o if ftruncate() is missing. * lib/fopenlock.c (fopenlock): Don't lock the file if fcntl locking is not available. * NEWS: Prepare for 0.9a. * arch/mingw32/cross.sh (BUILDNAME): s/i386/i586/ to follow Debian change. * HACKING: Needs autogen. 2001-04-17 Alexandre Duret-Lutz * src/persona.c (user_persona, sys_persona): Typo. * src/display.c (get_directbuffers): Argument v is not a pointer. * src/joystick.c (joystick): Not a pointer. 2001-04-16 Alexandre Duret-Lutz * src/prefs.tpl (load_preferences): Free buf. 2001-04-15 Alexandre Duret-Lutz * lib/basename.c: New file. * lib/basename.h: New file. * lib/Makefile.am (noinst_HEADERS): Add basename.h. (libheroes_a_SOURCES): Add basename.c. * tools/fetish-sync: Add basename.c. * HACKING: Likewise. * src/debugmsg.c (dmsg_init): Basename-ify the program name. 2001-04-15 Alexandre Duret-Lutz Ahem... output debug messages on stdout, as said in HACKING. * src/debugmsg.c (dmsg): s/stderr/stdout/. 2001-04-15 Alexandre Duret-Lutz * lib/isdir.c: New file. * lib/isdir.h: New file. * lib/Makefile.am (noinst_HEADERS): Add isdir.h. (libheroes_a_SOURCES): Add isdir.c. * tools/fetish-sync.sh: Add lib/isdir.c * HACKING: Add lib/isdir.c. * src/relocate.c (check_installation): New. (relocate_data): Call check_installation. 2001-04-10 Alexandre Duret-Lutz Compute make $(data-dir) and $(locale-dir) relative to $(prefix), and handle HEROES_PREFIX to override $(prefix). The next step is to compute/guess HEROES_PREFIX. * src/relocate.c: New file. * src/relocate.h: New file. * doc/heroes.texi (Example): Document HEROES_PREFIX. * m4/h-paths.m4: New file. * configure.in: Asjust to use heroes_COMPUTE_PATHS. * src/Makefile.am (localedir, DEFS): Remove. (heroes_SOURCES): Add relocate.c and relocate.h. * src/heroes.c: Adjust to call relocate_data. * src/resc_files.gperf (data-dir): Use FORWARD_RELATIVE_PKGDATADIR. (locale-dir): Use FORWARD_RELATIVE_LOCALEDIR. (prefix): New. 2001-04-18 Alexandre Duret-Lutz Merge with autogen-pending-BRANCH, I thought I would wait until Autogen 5.1.5 is released, but I give up (most of my upcomming patches would introduce conflicts in one branch or the other. There is a prerelease of autogen available here: ftp://autogen.sourceforge.net/pub/autogen/ Version 5.1.4d is a minimum. |2001-03-21 Alexandre Duret-Lutz | | * src/prefs.tpl: Use the ".name" notation to designate | locale variables in AutoGen >= 5.1.5 (not yet released). | |2001-03-18 Alexandre Duret-Lutz | | Basic protection against people that don't have AutoGen. | | * configure.in: Define AUTOGEN using AM_MISSING_PROG, fix | other AM_MISSING_PROG uses. | * doc/Makefile.am: Use $(AUTOGEN). | * src/Makefile.am: Likewise. | |2001-03-18 Alexandre Duret-Lutz | | * HACKING (Auto-generated files): Add src/prefs.c and src/prefs.h. | |2001-03-18 Alexandre Duret-Lutz | | * doc/heroes.texi (Heroes options): Document --list=preferences. | * src/argv.c (showprefs): New variable. | (list): Handle --list=preferences. Return a boolean | to indicate whether the action is finished or has been delayed. | (parse_argv): Adapt to follow this latter convention. | * src/argv.h (showprefs): New variable. | * src/heroes.c (main): Output the preferences if requested. | |2001-03-18 Alexandre Duret-Lutz | | Save preferences in text form. Generate the i/o code | automatically from a description of the preferences. | | * src/options.c: Delete. | * src/options.h: Delete. | * src/prefs.def: New file. | * src/prefs.tpl: New file. | * src/Makefile.am (heroes_SOURCES): Remove options.c and options.h, | add prefs.c and prefs.h. | (BUILT_SOURCES): Add prefs.c and prefs.h. | (prefs.h, prefs.c): New files. | * src/const.c: Include prefs.h instead of options.h. | * src/menus.c: Likewise. | * src/render.c: Likewise. | * src/scrtools.c: Likewise. | * src/sfx.c: Likewise. | * src/sound.c: Likewise. | * src/heroes.c: Likewise, also transform call to write_options, | reinit_options, load_options, and free_options to their new names: | save_preferences, reinit_preferences, load_preferences, | free_preferences. | * src/rsc_files.gperf: Remove options-file, add pref-file. | * src/system.h (PREF_INPUT_GROUP): New macro. | |2001-03-11 Alexandre Duret-Lutz | | Centralize the definition of debug channels into src/debugchn.def. | Use AutoGen the generate the hash table, the channel enumeration, | and the documentation. | | * doc/Makefile.am (heroes_TEXINFOS): New. | (MAINTAINERCLEANFILES): New. | (debugchn.texi): New. | * doc/heroes.texi (Environment variables): Remove the debug channels | table, include debugchn.texi instead. | * src/Makefile.am (heroes_SOURCES): Add debugchn.h. | (BUILT_SOURCES): Add debugchn.h and debughash.gperf. | (debughash.gperf, debugchn.h): New. | * src/debughash.gperf: Remove from CVS (now generated). | * src/debugmsg.h: Don't declare the channels, include debugchn.h | instead. | * src/debugchn.def: New file. | * src/debugchn.tpl: New file. | 2001-04-18 Alexandre Duret-Lutz * THANKS: Update Jos Boersema's email, the old bounced and I just came across this new one in the archive for the bug-texinfo mailing list. 2001-04-17 Alexandre Duret-Lutz * src/menus.c (enter_your_name): Work directly with keycodes to not misinterpret extended keys (sush as shift keys) as standard characters. Reported by Janos Holanyi . 2001-04-07 Alexandre Duret-Lutz * m4/getoptlong.m4: Update for submission to the Autoconf macro archive. 2001-04-01 Alexandre Duret-Lutz * m4/normpath.m4: New file. * m4/relpaths.m4: New file. * m4/stdrelpaths.m4: New file. 2001-03-29 Alexandre Duret-Lutz * configure.in: Check for uid_t, gid_t, getegid, setegid, and setregid. * src/persona.c: Use setregid and setreuid when setegid and seteuid are not found. * src/system.h (seteuid, setegid, setreuid, setreguid, geteuid, getuid, getegid, getgid): New replacement macros. 2001-03-26 Alexandre Duret-Lutz Keep track of secure (trusted) resources, and only change personna when handling such resources. * src/rsc_files_hash.h: Add a secure attribute. * src/rsc_files.gperf: Supply `true' for all secure attributes. * src/Makefile.am (rsc_files_hash.c): Adjust to initialize the secure member of empty hash entries to false. * src/userconf.c: Take a secure argument. * src/usercong.h: Adjust accordingly. * src/rsc_files.c (set_rsc_file): Take a secure argument. (rsc_expand, get_rsc_file, get_non_null_rsc_file): Rename to ... (rsc_expand_secure, get_rsc_file_secure, get_non_null_rsc_file_secure): ... these, and take a secure argument. (rsc_expand, get_rsc_file, get_non_null_rsc_file): New function, written using the above. * src/rsc_files.h: Adjust accordingly. * src/heroes.c (main): Adjust set_rsc_file, and read_userconf calls. * src/persona.c (sys_persona_if_needed): Make sure we handle secure resources. * doc/heroes.texi (Global score file): Update accordingly. Bug fix: persona_fopenlock already takes care of switching persona if needed. * src/scores.c (load_scores_and_keep_locked): Don't call sys_persona. 2001-03-20 Alexandre Duret-Lutz Support for relocatable locales. * src/heroes.c (main): Check for HEROES_LOCALE_DIR or HEROES_LOCALEDIR and set the locale-dir resource accodingly. Use this resource to initialize the locales. * src/rsc_files.gperf (locale-dir): New entry. * src/Makefile.am (rsc_files_hash.c): Adapt key indexes. * doc/heroes.texi (Environment variables): Document HEROES_LOCAL_DIR, and note the --list=resources can be used to check the value of data-dir and locale-dir. 2001-03-25 Alexandre Duret-Lutz Support for set-group-id and set-user-id access to a global score/savedgames file. * src/persona.c: New file. * src/persona.h: New file. * src/Makefile.am (heroes_SOURCES): Add persona.c and persona.h. * src/heroes.c (main): Call init_persona. * src/rsc_files.gperf (sys-dir): New. * src/savegame.c (write_save_records, load_save_records_open, load_scores_and_keep_locked): Adapt to use persona_fopenlock. And don't output the data unless the file has been succesfully opened. * src/scores.c (write_scores, load_scores_open, load_scores_and_keep_locked): Likewise. * doc/heroes.texi (Sharing a global score file): Document more. * src/etc/heroesrc: Adapt to new resources names. 2001-03-25 Alexandre Duret-Lutz Truncate scores and saved-games files, before writing to them. * lib/ftruncate.c: New file (from fileutils-4.0.39). * m4/ftruncate.m4: Likewise. * lib/Makefile.am (EXTRA_DIST): Add ftruncate.c. * tools/fetish-sync.sh (files): Add lib/ftruncate.c and m4/ftruncate.m4. * HACKING: Likewise. * configure.in: Call jm_FUNC_FTRUNCATE. * src/savegame.c (write_save_records): Truncate the file. * src/scores.c (write_scores): Likewise. 2001-03-25 Alexandre Duret-Lutz Replace game magics by game IDs, which serve the same purpose but are 128bits values. See comments in src/gameid.h. * src/gameid.h: New file. * src/gameid.c: New file. * src/Makefile.am (heroes_SOURCES): Add gameid.c and gameid.h. * src/const.c (game_magic): Replace by ... (game_id): ... this new variable. * src/const.h: Likewise. * src/heroes.c (play_menu, play_game): Adapt to use game IDs. * src/menus.c (draw_saved_games_info): Likewise. * src/savegame.c (clear_save_records, write_save_records, load_save_records_read): Likewise. (load_save_records_error): New function. (compute_magic, set_magic, find_magic): Remove. * src/savegame.h: Adjust. * src/scores.c (find_score_by_gameid): New function. (clear_scores, write_scores, load_scores_read): Adapt to yse game IDs. (load_scores_error): New function. * src/scores.h: Adjust. 2001-03-24 Alexandre Duret-Lutz * src/savegame.h: Copyright 2001. * src/savegame.c: Likewise. (load_save_records_read): Skip the initial space in the name. * src/score.c (load_scores_read): Likewise. (clear_scores): Don't set unused attributes. * src/score.h (top_score): Remove unused attributes. 2001-03-24 Alexandre Duret-Lutz Save the games as text. * src/rsc_files.gperf (games-file): Remove. (saved-games-file): New. * src/savegame.c (saves_file): Rename as ... (saved_games_file): ... this. Adjust all calls. (check_save_records, bswap_save_records): Remove. (write_save_records, load_save_records_read): Write and read the saved games as text. (load_save_records, load_save_records_and_keep_locked): Adjust to open the saved games file as text file. Create the file if needed. * src/savegame.h (saved_game): Declare used as bool. 2001-03-24 Alexandre Duret-Lutz Save the scores as text. * src/misc.c (chomp): New function. * src/misc.h (chomp): New function. * src/rsc_files.gperf (scores-file): Remove. (score-file): New. * src/scores.c (scores_file): Rename as ... (score_file): ... this. Adjust all calls. (check_scores, bswap_scores): Remove. (write_scores, load_scores_read): Write and read the scores as text. (load_scores, load_scores_and_keep_locked): Adjust to open the score as text file. Create the file if needed. 2001-03-24 Alexandre Duret-Lutz Adapt score and save records loading/saving to locking. Not perfect yet. * src/heroes.c (play_menu): Adapt to use load_scores_and_keep_locked. (play_game): Adapt to use load_save_records_and_keep_locked. (main): Don't load scores and save records, but save them right after clearing them if it was requested. * src/menus.c (scores_menu): Load scores to be up to date. * src/savegame.c (compute_magic): Likewise. (load_save_records): Move the x10sav cheat to ... (clear_save_records): ... here. (load_save_records): Split into ... (load_save_records_open, load_save_records_read): ... these new functions. (load_save_records_and_keep_locked): New function. (write_save_records): Adjust. * src/struct.h (save_game): Move ... * src/savegame.h (save_game): ... here. (load_save_records_and_keep_locked): New function. * src/scores.c (load_scores): Split into ... (load_scores_open, load_scores_read): ... these new functions. (load_scores_and_keep_locked): New function. (write_scores): Adjust. * src/struct.h (top_scores): Move ... * src/scores.h (top_scores): ... here. (load_scores_and_keep_locked): New function. 2001-03-23 Alexandre Duret-Lutz Introduce file locking support (as well as portability issues, I guess...). * lib/fopenlock.c: New file. * lib/fopenlock.h: New file. * lib/Makefile.am (noinst_HEADERS): Add fopenlock.h. (libheroes_a_SOURCES): Add fopenlock.c. * m4/fopenlock.m4: New file. * m4/Makefile.am (EXTRA_DIST): Add fopenlock.m4. * configure.in: Use adl_FUNC_FOPENLOCK. 2001-03-20 Alexandre Duret-Lutz * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2. 2001-03-16 Alexandre Duret-Lutz * src/system.h (KEYCODE_MAX): New macro. 2001-03-12 Alexandre Duret-Lutz * src/options.h (extrasel): Move ... * src/menus.h (extrasel): ... here. * src/options.c (extrasel): Move ... * src/menus.c (extrasel): ... here. 2001-03-19 Alexandre Duret-Lutz From Hermann J. Beckers . * po/de.po: New version. 2001-03-14 Alexandre Duret-Lutz From Hermann J. Beckers . * po/de.po: New version. 2001-03-10 Alexandre Duret-Lutz * HACKING (Console output): New section. 2001-03-10 Alexandre Duret-Lutz From Hermann J. Beckers . * po/de.po: New version. 2001-03-09 Alexandre Duret-Lutz German translations. From Hermann J. Beckers . * configure.in (ALL_LINGUAS): Add `de'. * po/de.po: New file. * THANKS: Add Hermann. * doc/heroes.texi: Likewise. 2001-02-28 Alexandre Duret-Lutz * m4/mkdir.m4: Update for submission to the Autoconf macro archive. 2001-02-24 Alexandre Duret-Lutz * configure.in: Bump to version 0.9. * NEWS: Update for 0.9. * doc/heroes.texi (configure options): Make the --enable-debug recommendation clearer. 2001-02-23 Alexandre Duret-Lutz * src/helptext.c (help_text3): Remove a doubled `the'. Reported by Jos Boersema . * po/nl.po: Update accordingly. * po/fr.po: Update accordingly, mark as `0.9 compliant'. 2001-02-22 Alexandre Duret-Lutz * arch/mingw32/cross.sh (cross_pack): Work around a strange behavior of zip, rooting the archive on `/heroes/' instead of `heroes/'. Reported by Jean. 2001-02-22 Alexandre Duret-Lutz * arch/mingw32/cross.sh (cross_install): zip the changelog, instead of gzip'ing it. Suggested by Jean. (cross_pack): Typo. * arch/ming32/dest-readme-txt: Add more text, suggest -F, give the bug-report address. * arch/ming32/dest-readme-lib: Update to newer libs. 2001-02-22 Alexandre Duret-Lutz * doc/heroes.texi (Machines): Describe the Win32/VisualC files as obsolete. 2001-02-22 Alexandre Duret-Lutz From Jean Delvare . * HACKING: Typo. * ChangeLog: Likewise. * src/menus.c (init_menus_sprites): Likewise. 2001-02-21 Alexandre Duret-Lutz * BUGS: Sync up with the recent bug reports from the lists. 2001-02-20 Alexandre Duret-Lutz * Makefile.am (distcheck-hook): Add my-distcheck-nodisplay. (my-distcheck-nodisplay): New target. * HACKING: Update accordingly (distcheck now makes four builds). 2001-02-19 Alexandre Duret-Lutz * configure.in: Bump to version 0.8f. * NEWS: Update for 0.8f. * src/Makefile.am: Copyright 2001. * src/keysdef.c: Likewise. * Makefile.am: Likewise. * po/fr.po: Update. * po/nl.po: Update. 2001-02-19 Alexandre Duret-Lutz * src/menus.c (keyboard_menu): Regenerate keyname sprites for conflicting keys. Reported by Jean Delvare . 2001-02-19 Alexandre Duret-Lutz Make sure no sticky bits go into the distribution. Reported by Jean Delvare . * Makefile.am (dist-hook): New. 2001-02-19 Alexandre Duret-Lutz From Jean Delvare . * NEWS: s/two players game/two player game/. * doc/heroes.texi: Likewise. 2001-02-19 Alexandre Duret-Lutz * src/argv.c (version): Set copyright year to 2001. Reported by Jean Delvare . 2001-02-19 Alexandre Duret-Lutz Make sure the manual pages are up-to-date before releasing. Reported by Jean Delvare . * man/Makefile.am (man-distcheck): New target. * Makefile.am (man-distcheck): New target. (distcheck-hook): Depend upon man-distcheck. 2001-02-18 Alexandre Duret-Lutz Support for --disable-display. * doc/heroes.texi (configure options): Document --disable-display. * m4/h-ggi.m4 (heroes_CHECK_GGI_POST): New. * m4/h-display.m4: Handle --disable-display. Call heroes_CHECK_GGI_POST. * m4/h-sound.m4: sound_lib default to . * src/Makefile.am (CLEANFILES): Remove keysdef-inc.h. (DISTCLEANFILES): Add keysdef-inc.h. (keysdef-inc.h): Don't depend upon $(CONFIG_HEADER); create keysdef-inc.h when neither GGI nor SDL are used. * src/display.h [!HAVE_LIBSDL && !HAVE_LIBGGI] (set_display_params, set_full_screen_mode, init_video, uninit_video, set_color, vsynchro, vsynchro2, set_pal): Define new empty macros. * src/keyb.c [!HAVE_LIBSDL && !HAVE_LIBGGI] (update_mouse_state): Define new empty macro. (uninit_keyboard_map): Define only once. * src/keyb.h [!HAVE_LIBSDL && !HAVE_LIBGGI] (process_input_events, get_key, key_ready, init_mouse, mouse_show, mouse_hide): Define new empty macros. * src/keys_heroes.h [!HAVE_LIBSDL && !HAVE_LIBGGI]: Define keys. * src/keysdef.c: Suppress RCS Id. * src/system.h [!HAVE_LIBSDL && !HAVE_LIBGGI] (keycode_t): Define. 2001-02-17 Alexandre Duret-Lutz * NEWS: s/Dutsh/Dutch/ * ANNOUNCE: Prepare for 0.9. * TODO: Likewise. 2001-02-16 Alexandre Duret-Lutz Heroes binaries to compiled with gcc 2.7.* failed pack struct correctly. * src/system.h: Undefine __attribute__ after xalloc.h inclusion. This is needed because we want to use __attribute__ ((packed)) on gcc 2.7.* while xalloc.h inhibit it for gcc <= 2.8. 2001-02-14 Alexandre Duret-Lutz From Jean Delvare. Spelling mistakes. * src/heroes.c (play_game): s/chose/choose/. * src/sprglenz.h: Likewise. * src/menus.c (init_menus_sprites): Likewise. s/TWO PLAYER/TWO PLAYERS/. 2001-02-13 Alexandre Duret-Lutz * configure.in: Bump to 0.8e. * NEWS: Update for 0.8e. * po/fr.po: Update. 2001-02-13 Alexandre Duret-Lutz * src/const.c (tunnel_square_io): Move to ... * src/heroes.c (tunnel_square_io): ... here. * src/const.c (radar_trail_color, radar_wall_color): Move to ... * src/render.c (radar_trail_color, radar_wall_color): ... here. * src/const.c (mode_names): Move to ... * src/menus.c (mode_names): ... here. * src/const.h (tunnel_square_io, radar_trail_color, radar_wall_color, mode_names): Remove. 2001-02-13 Alexandre Duret-Lutz * TODO: Update. 2001-02-13 Alexandre Duret-Lutz * src/display.c [HAVE_LIBGGI] (setup_WWWxHHHxB_display): Ask for GT_8BIT if possible. 2001-02-13 Alexandre Duret-Lutz * lib/xmalloc.c: Update from fileutils-4.0.39. 2001-02-13 Alexandre Duret-Lutz * src/display.c (set_color, set_pal): Don't set palette on visu if it is not palletized. 2001-02-13 Alexandre Duret-Lutz Revert an error I did when adapting Jean's patch. * src/menus.c (keyboard_menu): Don't strip keyname which are 7 letter wide, only thos which are longer. 2001-02-12 Alexandre Duret-Lutz Adapted from Jean Delvare . * src/menus.c (keyboard_menu): Strip wide keynames to 6 letters. 2001-02-12 Alexandre Duret-Lutz From Jos Boersema . * po/nl.po: Update. 2001-02-11 Alexandre Duret-Lutz * src/scrtools.c (set_pal_with_luminance): Perform gamma correction, use set_pal rather than set_palette. * src/options.c (reinit_options): Use 6 as default luminance value. * src/menu.c (screen_menu): Use 13 steps for the luminance option. 2001-02-11 Alexandre Duret-Lutz Important revamp of the LibGGI display driver to not use the `render_visu' intermediate buffer when crossblitting is unneeded, perform double buffering and locking. * src/display.c (screen_rv): Move to ... [HAVE_LIBSDL] (screen_rv): ... here. [HAVE_LIBGGI] (db, current_frame): New variables. [HAVE_LIBGGI] (setup_320x200x8_display, setup_320x200xB_display, setup_WWWxHHHxB_display, get_directbuffers): New functions. [HAVE_LIBGGI] (init_video): Revise, using the above functions. [HAVE_LIBGGI] (set_color, set_pal): Don't set paletter on render_visu when render_visu == NULL. [HAVE_LIBGGI] (vsynchro): Rewrite as a call to vsynchro2. [HAVE_LIBGGI] (vsynchro2): Revise to perform double buffering, locking, and write to visu or render_visu. 2001-02-08 Alexandre Duret-Lutz From Jos Boersema . * po/nl.po: Update. 2001-02-07 Alexandre Duret-Lutz * NEWS: Update for 0.8d. 2001-02-06 Alexandre Duret-Lutz * doc/heroes.texi (configure options): Say that --enable-debug will check the translated message. * HACKING: Add a section `Translating message catalogs'. 2001-02-06 Alexandre Duret-Lutz * src/sprtext.c (compile_sprtext, compile_sprtext_color): Don't compile undrawable letters. 2001-02-06 Alexandre Duret-Lutz * po/fr.po: Update for 0.8d. * po/nl.po: Merge. 2001-02-06 Alexandre Duret-Lutz * src/argv.c: Add comments for translators. * src/const.c: Likewise. * src/display.c: Likewise. * src/menus.c: Likewise. * src/readmake.c: Likewise. 2001-02-06 Alexandre Duret-Lutz Report unprintable messages before crashing... * src/system.h (XCALLOC_ARRAY): New. * src/fontdata.c (initialize_menu_font, initialize_deck_font, initialize_bonus_font, initialize_help_font): Use XCALLOC_VAR instead of XMALLOC_VAR and memset. This actually suppress a mistake because memset was called mistakenly. [DEBUG] (check_message_is_drawable): New function. * src/fontdata.h (check_message_is_drawable): New. * src/sprtext.c (compile_sprtext, compile_sprtext_color): Call check_message_is_drawable. 2001-02-05 Alexandre Duret-Lutz Dutch translation from Jos Boersema . * po/nl.po: New file. * configure.in (ALL_LINGAS): Add nl. * doc/heroes.texi (Contributors): Add Jos Boersema. * THANKS: Likewise. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c (affplan, afftests): Rename as ... (draw_level_map, draw_collide_tests): ... these. (planfull): Rename as ... (display_level_map_fullscreen): ... this. (joueanim): Rename as ... (display_level_map_animated): ... this. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c (partiel4c, carre, framept): Rename as ... (copy_tile_pcx, draw_check_point, frame_dashed): ... these. (affgt, majg, majd): Rename as ... (draw_left_panel, update_left_panel, update_middle_panel): ... these. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c (partiel4, partiel2): Rename both as ... (rectangle_copy): ... this. Adjust all calls. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c (fatalog): Remove. (hmain): Replace calls to fatalog by calls to emsg, gettextize the messages. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c: Cosmetic changes, comment removal. * src/structs.h (type_name, spd_test, dir_test): Move to ... * src/hedlite.c (type_name, spd_test, dir_test): ... here. 2001-02-02 Alexandre Duret-Lutz * configure.in: Bump to 0.8d. 2001-02-01 Alexandre Duret-Lutz * configure.in: Bump to 0.8c. * NEWS: Update for 0.8c, plus a missing entry in 0.8a. * po/fr.po: Update. 2001-02-01 Alexandre Duret-Lutz * src/fader.c (cancel_fader): New function pulled out from run_fader. (run_fader): Use it. * src/fader.h (cancel_fader): New. * src/scrtools.c (set_palette): New function. (set_pal_with_luminance): Use it instead of set_pal. * src/menus.c (pause_menu, quit_yes_no): Likewise. * src/scrtools.h (set_palette): New. 2001-02-01 Alexandre Duret-Lutz Use the same animated background as in the "endscroll" in pase_menu and quit_yes_no, since it is no longer possible the shade the screen. * src/endscroll.c (background_img, render_background): Rename as ... (dummy_background_img, dummy_moving_background_render): ... this, and export. (copy_background): Adjust accordingly. (end_scroll): Split into ... (dummy_moving_background_init, dummy_backgournd_uninit, end_scroll): ... these. * src/endscroll.h (dummy_backgournd_img, dummy_moving_background_init, dummy_backgournd_uninit, dummy_moving_background_render): New. * src/menus.c (pause_menu, quit_yes_no): Use dummy_moving_background_render. 2001-01-31 Alexandre Duret-Lutz Remove obsolete code (that was already commented out). * src/hedlite.c (gestclav) [PORT]: Remove. * src/heroes.c (unload_level, main) [PORT]: Remove. 2001-01-31 Alexandre Duret-Lutz Handle the middle button if the level editor, fix some compiler warning as well as two bugs. * src/keyb.c (enable_mouse, mouse_pos_x, mouse_pos_y, mouse_button_left, mouse_button_right): Mark as static. (mouse3): New function. (mouse_button_middle): New variable. (mous12): Also test for mouse_button_middle. [HAVE_LIBGGI] (update_mouse_state): Update mouse_button_middle. [HAVE_LIBSDL] (handle_mouse_events): Likewise. * src/keyb.h (mouse3): New. * src/heroes.c (ia_eval_dir_bonus_inline): Add back missing call to ia_eval_dir_bonus, removed by mistake on 2000-11-14 (0.6d). (ia_eval_dir_bonus): Move variable around. * src/hedlite.c (hmain): Rename variable i as k, and move it in near the event loop. Enable the third mouse button. (framept): s/320/xbuf/ (bugfix). * src/menus.c (keyboard_menu): Supply initial value for t. (scores_menu): Supply initial value for rolldec. * src/sfx.c (read_sfx_conf): Don't test for fconf in error handling, it's not always set. * src/sprtext.c (compile_sprtext, compile_sprtext_color): Supply initial value for text_width. * doc/heroes.texi (editor-clicks): Document the middle button. 2001-01-31 Alexandre Duret-Lutz * HACKING: Strip down. 2001-01-31 Alexandre Duret-Lutz * doc/heroes.texi: s/Burrow/Burrows/. * THANKS: Likewise. 2001-01-30 Alexandre Duret-Lutz Missing copyright updates from previous patches. * doc/heroes.texi: Copyright 2001. * src/menus.c: Likewise. * src/render.h: Likewise. * src/scrtools.h: Likewise. 2001-01-30 Alexandre Duret-Lutz * src/helptext.c (help_text1): Point users at the arrow keys. Suggested by Daniel Burrows. 2001-01-30 Alexandre Duret-Lutz * src/display.c (screen): Remove variable. [HAVE_LIBGGI, HAVE_LIBSDL] (init_video, uninit_video): Don't handle screen anymore. * src/display.h (screen): Remove variable. * src/menus.c (pause_menu, quit_yes_no): Comment calls to backup_screen, they need a replacement. * src/scrtools.c (vsynch, backup_screen, aff_buffer): Remove functions. * src/scrtools.h (vsynch, backup_screen, aff_buffer): Likewise. 2001-01-30 Alexandre Duret-Lutz * src/render.c (display_buffer_moving): Remove. * src/render.c (display_buffer_moving): Remove. * src/scrtools.c (flush_display_moving): New function. * src/scrtools.h (flush_display_moving): New function. * src/heroes.c (play_game): Use flush_display_moving instead of display_buffer_moving. 2001-01-30 Alexandre Duret-Lutz * src/render.c (display_two_buffers_moving_and_clear, display_two_buffers_moving): Remove. * src/render.h (display_two_buffers_moving_and_clear, display_two_buffers_moving): Remove * src/scrtools.c (flush_display2_moving): New function. * src/scrtools.h (flush_display2_moving): New function. * src/heroes.c (play_demo, play_game): Use flush_display2_moving instead of display_two_buffers_moving_and_clear or display_two_buffers_moving. 2001-01-30 Alexandre Duret-Lutz * src/display.c (stretch_twofold, stretch_twofold_even, stretch_threefold, stretch_threefold_even, stretch_fourfold, stretch_fourfold_even, copy_screen_even, copy_screen, copy_display): Take destination and width as arguments. [HAVE_LIBSDL, HAVE_LIBGGI] (vsynchro): Adapt call to copy_display. [HAVE_LIBSDL, HAVE_LIBGGI] (vsynchro2): New function. * src/display.h (vsynchro2): Likewise. * src/render.c (display_buffer_tmp1): Remove. (display_two_buffer): Remove. * src/render.h (display_buffer_tmp1): Remove. (display_two_buffer): Remove. * src/srctools.c (flush_display2): New function. * src/srctools.h (flush_display2): New function. * src/heroes.c (play_demo, play_game): Replace calls to display_two_buffer with calls to flush_display2. 2001-01-29 Alexandre Duret-Lutz Get rid of `screen' in heroes.c and menus.c. * src/heroes.c (main_menu): Rewrite the two pixelize blocks using a local `pixbuf' buffer instead of using screen. * src/menus.c (enter_your_name): Likewise. 2001-01-29 Alexandre Duret-Lutz Get rid of `screen' in hedlite.c. * src/hedlite.c (hedit_buffer): New variable. (partiel4, partiel2, frame, framept, draw_text, transpac, affgt, affplan, majg, departfix, planfull, joueanim, gestclav): Use hedit_buffer instead of screen. (hmain): Likewise. Allocate and free hedit_buffer. 2001-01-29 Alexandre Duret-Lutz Get rid of `screen' in intro.c. * src/intro.c (antialias): Rewrite, assuming a xbuf-wide buffer, drawing only in the first 320 pixels of a line. Take the height as second argument, not a number of pixels. (intro_buffer): New variable. (copy_vehicle_1, copy_vehicle_2, compute_erase_data): Adapt to use intro_buffer instead of screen, flush_display instead of vsynch. (show_intro): Likewise. Adapt call to antialias. (play_intro): Allocate intro_buffer. 2001-01-21 Alexandre Duret-Lutz * m4/debug.m4: Default to -g, use -ggdb3 if enabled, and nothing if disabled. * doc/heroes.texi: Update the corresponding documentation. 2001-01-21 Alexandre Duret-Lutz * intl/ChangeLog: Update from fileutils-4.0.37. * intl/gettextP.h: Likewise. * lib/hash.c: Likewise. * po/Makefile.in.in: Likewise. 2001-01-20 Alexandre Duret-Lutz * configure.in: Call adl_WITH_MPATROL. * m4/memdebug.m4 (adl_WITH_MPATROL, adl_CHECK_MEMORY_USAGE, adl_CHECK_MPATROL_LIBS, adl_CHECK_MPATROL, adl_WITH_MPATROL): New. (adl_ENABLE_MEM_DEBUG): Call adl_CHECK_MPATROL too. (adl_CHECK_DMALLOC): Use AC_CHECK_HEADERS, not AC_CHECK_HEADER. * src/system.h [HAVE_MPATROL_H]: Include mpatrol.h. * doc/heroes.texi (configure options): Describle --with-mpatrol. 2001-01-16 Alexandre Duret-Lutz * doc/heroes.texi (Machines): Document the existence of arch/mingw32. 2001-01-16 Alexandre Duret-Lutz * src/mingw32/cross.sh: Set LIBS to libs needed to link staticaly. Don't set CC, it's detected. Output zip file is now $PACKAGE-$VERSION-XXX-ming32.zip. Adjust `cross.sh all' to halt after the first failure any subtarget. 2001-01-15 Alexandre Duret-Lutz Remove the (broken & undocumented) support for screenshots. * src/argv.c (snap): Remove. (long_options): Remove snap. * src/argv.h (snap): Remove. * src/heroes.c (write_rle, save_pcx): Remove. (get_input_direction): Remove call to save_pcx. 2001-01-15 Alexandre Duret-Lutz Flush the display directly wherever we can avoid to write in `screen'. There are still some places that use `screen' (intro, level-editor, two-player display) and need to be further worked. * src/display.c (stretch_twofold, stretch_twofold_even, stretch_threefold, stretch_threefold_even, stretch_fourfold, stretch_fourfold_even, copy_screen, copy_display): Qualify the source argument as const. [HAVE_LIBSDL,HAVE_LIBGGI] (vsynchro): Likewise. (erase_odd_line): Delete. (copy_screen_event): New. (copy_display): Use copy_screen_event instead of erase_odd_line. * src/display.h (vsynchro): Qualify the source argument as const. * src/scrtools.c (flush_display): New. (vsynch): Rewrite using flush_display. * src/scrtools.c (flush_display): New. * src/endscroll.c (end_scroll): Adapt to use flush_display. * src/heroes (play_menu, play_demo, main_menu, play_game): Likewise. * src/menus.c (display_menu, control_menu, keyboard_menu, sound_menu, screen_menu, game_menu, extra_menu, quit_menu, editor_selector, editor_menu, editor_first_menu, jukebox_draw, pause_menu, quit_yes_no, enter_your_name, scores_menu, help_menu): Likewise. 2001-01-14 Alexandre Duret-Lutz Make `screen' an xbuf*ybuf sized buffer, and adapt all code accordingly. Also prepare the display.c code to not always works from `screen' (the idea is that since the render buffers are also xbuf*ybuf we might avoid doing the copy to `screen' to save some time). * src/const.c (square_offset_320): Remove. * src/const.h (square_offset_320): Remove. (xbuf, ybuf, sbuf): Move to ... * src/display.h (xbuf, ybuf, sbuf): ... here. (vsynchro): Take the source as a parameter. * src/display.c (stretch_twofold, stretch_twofold_even, stretch_threefold, stretch_threefold_even, stretch_fourfold, stretch_fourfold_even, erase_odd_lines, copy_screen, copy_display): Arrange to take the source buffer as a parameter (for a future optimization), and consider the source as an xbuf wide buffer. [HAVE_LIBGGI, HAVE_LIBSDL] (init_video): Always allocate screen (this is only temporary). [HAVE_LIBSDL] (uninit_video): Always free screen. [HAVE_LIBGGI, HAVE_LIBSDL] (vsynchro): Take the source buffer as a new argument, and adjust the call to copy_display. * src/const.c (scdec320): Rename as ... (square_offser_320): ... this. (partiel4, copy_tile, copy_tile_transp, copy_square_transp, partiel2, frame, framept, draw_text, transpa, transpac, carre, affgt, majd, affplan, majg, departfix, planfull, joueanim, hmain): Adjust to consider screen as a xbuf-wide buffer, and supply new the source argument to vsynchro(). * src/heroes.c (play_menu): Adjust to consider screen as a xbuf-wide buffer * src/intro.c (img2vram): Remove. (copy_vehicle_1, copy_vehicle_2, compute_erase_data): Adjust to work in xbuf-wide buffers. (show_intro): Likewise. Use copy_image_to_scr_area instead of img2vram. * src/pixelize.c (pixelize_1, pixelize_2_inline, pixelize_4_inline, pixelize_8_inline, pixelize_16_inline, pixelize_16_inline_2, pixelize_32_inline, pixelize_32_inline_2, pixelize_32, pixelize_64_inline, pixelize_64_inline_2, pixelize_64): Ajust to output in xbuf-wide buffers. (pixelize): Cosmetic change. * src/render.c (display_buffer_tmp1, display_buffer_moving, display_two_ubffers, display_two_buffers_moving, display_two_buffers_moving_and_clear): Ajust to output in xbuf-wide buffers. * src/scrtools.c (vsynch): Supply the source argument to vsynchro. (backup_screen): Adjust to work from xbuf-wide buffer. (add_buffer): Adjust to output in a xbuf-wide buffer. * src/struct.h [__HEDIT__] (square_offset_320, square_offset, d2w, w2d): Remove. * src/visuals.c (flip_buffer): Cosmetic changes. 2001-01-12 Alexandre Duret-Lutz * src/timer.c (reset_htimer) [!HAVE_GETTIMEOFDAY]: Typo from 2000-12-31's patch. 2001-01-11 Alexandre Duret-Lutz mtrace() support. * configure.in: Call add_WITH_MTRACE. * doc/heroes.texi: Describe --with-mtrace. * m4/memdebug.m4 (adl_WITH_MTRACE,adl_CHECK_MTRACE): New. (adl_CHECK_MALLOC,adl_CHECK_EFENCE): Cleanup. (adl_ENABLE_MEMDEBUG): Call adl_CHECK_MTRACE. * src/heroes.c (main): Call mtrace(). * src/system.h: Include mcheck.h if needed. 2001-01-10 Alexandre Duret-Lutz * NEWS: Update for version 0.8b. * m4/README: State the h-* files are Heroes specific. 2001-01-10 Alexandre Duret-Lutz * po/fr.po: Update. 2001-01-10 Alexandre Duret-Lutz * HACKING: Update. 2001-01-10 Alexandre Duret-Lutz * m4/mkdir.m4: Use #if instead of #ifdef. * m4/memdebug.m4: Likewise. 2001-01-09 Alexandre Duret-Lutz Distribute the html documentation. Check that Heroes can build with SDL and GGI before making a distribution. * Makefile.am (distcheck-hook, null_AM_MAKEFLAGS, t, my-distcheck-ggi, my-distcheck-sdl): New. * doc/Makefile.am (CLEANFILE): Rename as ... (EXTRA_DIST): ... this, to ship heroes.html. * m4/h-obsolete.m4: Remove test for with-sdl_mixer. 2001-01-09 Alexandre Duret-Lutz * m4/h-sdl.m4: Rename HAVE_SDL into HAVE_LIBSDL. * src/display.c: Likewise. * src/keyb.c: Likewise. * src/keys_heroes.h: Likewise. * src/system.h: Likewise. Also adapt #ifdef/#ifndef usage to follow autoconf recommendation (i.e. using #if). 2001-01-09 Alexandre Duret-Lutz * src/menus.c (draw_play_menu): Move arrows closer to the screen border to give more space to translations. 2001-01-08 Alexandre Duret-Lutz Rename HAVE_PKG_GGI as HAVE_LIBGGI, HAVE_PKG_GII as HAVE_LIBGII, HAVE_PKG_SDK_MIXER as HAVE_LIBSDL_MIXER, originally all these six macros were definied. * m4/checkpkg.m4: Use AC_CHECK_LIB's third argument to prvent definition of HAVE_LIBxxx. Define HAVE_LIBxxx instead of HAVE_PKGxxx, and provide a template help string for config.h. * m4/h-ggi.m4: Suppress AH_TEMPLATE call. * m4/h-joystick.m4: Likewise. * m4/h-sdlmixer.m4: Likewise. * src/display.c: Rename macros as stated above. * src/joystick.c: Likewise. * src/keyb.c: Likewise. * src/keys_heroes.h: Likewise. * src/system.h: Likewise. 2001-01-06 Alexandre Duret-Lutz * doc/heroes.texi (configure options): Describe --enable-devel. s/disable-debug/enable-debug/ s/disable-optimization/disable-optimizations/ * m4/devel.m4: New file. * configure.in: Call adl_ENABLE_DEVEL. 2001-01-04 Alexandre Duret-Lutz * man/Makefile.am (heroes.6): Be more verbose in game description. * src/argv.c (print_help): Change game description. 2001-01-03 Alexandre Duret-Lutz * po/Makefile.in.in (update-po): Merge po-files in temporary files in the build directory, and update the source directory only when the merged catalog differs from the original. This fix the know `make distcheck' failure due to `make update-po' being called on a read-only tree. 2001-01-02 Alexandre Duret-Lutz * doc/heroes.texi (configure options): Update to recent changes. * m4/debug.m4: Default to no. 2001-01-01 Alexandre Duret-Lutz Add files needed to cross compile and build a package for mingw32. * arch/mingw32/cross.sh: New file. * arch/mingw32/dest-readme-lib: New file. * arch/mingw32/dest-readme-txt: New file. * arch/mingw32/dest-run-bat: New file. * arch/Makefile.am (EXTRA_DIST): Add mingw32{cross.sh,dest-readme-txt,dest-readme-lib,dest-run-bat}. 2001-01-01 Alexandre Duret-Lutz * configure.in: Bump to 0.8b. Copyright 2001. 2001-01-01 Alexandre Duret-Lutz * NEWS: Update for 0.8a. * TODO: Update. * tools/Makefile.am (EXTRA_DIST): Typo. 2000-XX-XX Older entries belong to ChangeLog.00. * HACKING: Update help2man URL. 2001-09-21 Alexandre Duret-Lutz * src/people.def (Romuald Genevois): Update www. 2001-09-21 Alexandre Duret-Lutz * tools/readme.sed: Update License. * doc/heroes.texi (Getting Heroes): Update Metalab link, now Ibiblio. (Libraries): Update the LibMikMod home page. 2001-09-21 Alexandre Duret-Lutz Change the license from 'GPL version 2 or any later version' to 'GPL version 2'. * Makefile.am, configure.ac, arch/Makefile.inc, doc/Makefile.am, lib/Makefile.am, man/Makefile.am, src/Makefile.am, src/argv.c, src/argv.h, src/bonus.c, src/bonus.h, src/bytesex.h, src/camera.c, src/camera.h, src/const.c, src/const.h, src/debughash.h, src/debugmsg.c, src/debugmsg.h, src/endscroll.c, src/endscroll.h, src/errors.c, src/errors.h, src/explosions.c, src/explosions.h, src/extras.c, src/extras.h, src/fader.c, src/fader.h, src/fastmem.h, src/font.h, src/font_help.h, src/fontdata.c, src/fontdata.h, src/gameid.c, src/gameid.h, src/generic_list.h, src/hedlite.c, src/hedlite.h, src/helptext.c, src/helptext.h, src/hendian.c, src/hendian.h, src/heroes.c, src/heroes.h, src/heroeslvl.c, src/intro.c, src/intro.h, src/items.c, src/items.h, src/levellst.c, src/levellst.h, src/locales.c, src/locales.h, src/menus.c, src/menus.h, src/misc.c, src/misc.h, src/musicfiles.c, src/musicfiles.h, src/parafmt.c, src/parafmt.h, src/pcx.c, src/pcx.h, src/people.h, src/persona.c, src/persona.h, src/pixelize.c, src/pixelize.h, src/readmake.c, src/readmake.h, src/relocate.c, src/relocate.h, src/render.c, src/render.h, src/renderdata.c, src/renderdata.h, src/rsc_files.c, src/rsc_files.h, src/rsc_files_hash.h, src/savegame.c, src/savegame.h, src/scores.c, src/scores.h, src/scrtools.c, src/scrtools.h, src/sprglauto.c, src/sprglauto.h, src/sprglenz.c, src/sprglenz.h, src/sprite.c, src/sprite.h, src/spropaque.c, src/spropaque.h, src/sprprog.c, src/sprprog.h, src/sprprogwav.c, src/sprprogwav.h, src/sprrle.c, src/sprrle.h, src/sprshade.c, src/sprshade.h, src/sprtext.c, src/sprtext.h, src/sprunish.c, src/sprunish.h, src/sprzcol.c, src/sprzcol.h, src/structs.h, src/system.h, src/timer.c, src/timer.h, src/userconf.c, src/userconf.h, src/userdir.c, src/userdir.h, src/vars.c, src/vars.h, src/visuals.c, src/visuals.h, src/etc/Makefile.inc, src/lvl/Makefile.inc, src/lvl/de_body.c, src/lvl/de_head.c, src/lvl/free.c, src/lvl/in_body.c, src/lvl/load.c, src/lvl/loadmac.h, src/lvl/lvl.h, src/lvl/lvl_priv.h, src/lvl/privacc.c, src/media/Makefile.inc, src/media/joystick.h, src/media/keyb.c, src/media/keyb.h, src/media/keyb_low.h, src/media/keysdef.h, src/media/keyvalues.h, src/media/sfx.c, src/media/sfx.h, src/media/strack.c, src/media/strack.h, src/media/video.c, src/media/video.h, src/media/video_low.h, src/media/allegro/keyb.c, src/media/allegro/keyvalues.c src/media/allegro/video.c, src/media/dummy/joystick.c, src/media/dummy/keyb.c, src/media/dummy/keysdef.c, src/media/dummy/keyvalues.c, src/media/dummy/sfx.c, src/media/dummy/strack.c, src/media/dummy/video.c, src/media/ggi/keyvalues.c, src/media/ggi/video.c, src/media/gii/joystick.c, src/media/mikmod/sfx.c, src/media/mikmod/strack.c, src/media/sdl/joystick.c, src/media/sdl/keyb.c, src/media/sdl/keyvalues.c, src/media/sdl/video.c, src/media/sdl_mixer/sfx.c, src/media/sdl_mixer/strack.c, src/sys/Makefile.inc, src/sys/main.h, src/sys/allegro/main.c, src/sys/std/main.c, tools/Makefile.inc: Change license. * README: Update the license section. 2001-09-21 Alexandre Duret-Lutz * src/levellst.c (print_level_list): New function. * src/levellst.h (print_level_list): New function. * src/heroes.c (heroes_main): Call print_level_list(). * src/argv.h (showlevels): New variable. * src/argv.c (showlevels): New variable. (list): Handle --list=levels. * doc/heroes.texi (Invoking heroes): Document --list=levels. 2001-09-21 Alexandre Duret-Lutz * src/argv.c (print_help): Take a 'status' argument and use it as exit value. (parse_argv): Return -1 instead of 1 when the game must quit but not with a non-null exit status. (heroes_main): Handle return values of parse_argv(). 2001-09-20 Alexandre Duret-Lutz * configure.ac: Rewrite the configuration report. 2001-09-20 Alexandre Duret-Lutz * m4/h-display.m4 (heroes_CHECK_DISPLAY_LIB): Typo preventing SDL_mixer to be checked for when Allegro is not used. Reported by Daniel Burrows . * m4/h-sdl.m4 (heroes_CHECK_SDL): Don't force-append sdlj and sdls in the user selections (so that for instance --with-sdl does still allow giij or miks to be used without user hints) * m4/h-sdlmixer.m4 (heroes_CHECK_SDL_MIXER): Don't append sdlvkm and sdlj for similar reason. * m4/h-joystick.m4 (heroes_CHECK_JOYSTICK_LIB) : Add sdlj to the user selection. 2001-09-18 Alexandre Duret-Lutz * configure.ac: Bump version to 0.13. * NEWS: Update for 0.13. * HACKING (Typenames): New section. 2001-09-18 Alexandre Duret-Lutz * src/lvl/README: Update typenames. 2001-09-18 Alexandre Duret-Lutz All typenames ending with`*_t' are officially reserved by POSIX. In the past I already had to rename `timer_t' into `htimer_t' (see 2000-08-27) to avoid name clash with NetBSD. Today I've discovered that `level_t' is defined in on alphaev56-dec-osf4.0d, so I've decided to get rid of this *_t naming definitively. The replacement convention, beginning typenames with a_ or an_, comes from http://gcc.gnu.org/ml/gcc/2001-06/msg01006.html. Each Typename from the first column is replaced by the name from the second column. anim_kind_t an_anim_kind anim_t an_anim bg_data_t a_bg_data color_rvb_t an_rvb_color copy_function_t a_copy_function cost_t a_cost dest_t a_dest dir8_t a_dir8 dir_mask8_t a_dir_mask8 dir_mask_t a_dir_mask dir_t a_dir entry_func_t an_entry_func explosion_info_t an_explosion_info explosion_t an_explosion extra_level_t an_extra_level extradir_info_t an_extradir_info extradir_list_t an_extradir_list fader_status_t a_fader_status fg_data_t a_fg_data filename_t a_filename fontdata_t a_fontdata gameid_t a_gameid htimer_t a_timer keycode_t a_keycode last_list_t a_last_list lemming_t a_lemming level_bits_t a_level_bits level_header_t a_level_header level_info_t a_level_info level_list_t a_level_list level_t a_level menu_entry_t a_menu_entry menu_t a_menu options_t an_option_set palette_t a_palette paragraph_t a_paragraph param_t a_param pcx_header_t a_pcx_header pcx_image_t a_pcx_image pixel_t a_pixel player_t a_player prefs_t a_pref_set private_read_data_t a_private_read_data prog_list_t a_prog_list read_data_t a_read_data s16_t a_s16 s32_t a_s32 s8_t a_s8 sound_track_t a_sound_track sprite_prog_list_t a_sprite_prog_list sprite_t a_sprite square_coord_pair_t a_square_corrd_pair square_coord_t a_square_coord square_index_t a_square_index strpair_t a_strpair tile_coord_pair_t a_tile_coord_pair tile_coord_t a_tile_coord tile_data_t a_tile_data tile_index_t a_tile_index tile_info_t a_tile_info tile_t a_tile tile_type8_t a_tile_type8 tile_type_t a_tile_type tunnel_t a_tunnel u16_t a_u16 u32_t a_u32 u8_t a_u8 var_entry_t a_var_entry width_t a_width word_t a_word * src/bonus.c, src/bonus.h, src/camera.c, src/camera.h, src/const.c, src/const.h, src/endscroll.c, src/endscroll.h, src/explosions.c, src/explosions.h, src/extras.c, src/extras.h, src/fader.c, src/fader.h, src/fontdata.c, src/fontdata.h, src/gameid.c, src/gameid.h, src/generic_list.h, src/hedlite.c, src/hedlite.h, src/helptext.c, src/helptext.h, src/hendian.c, src/hendian.h, src/heroes.c, src/heroes.h, src/heroeslvl.c, src/intro.c, src/items.c, src/items.h, src/levellst.c, src/levellst.h, src/menus.c, src/menus.h, src/musicfiles.c, src/musicfiles.h, src/parafmt.c, src/parafmt.h, src/pcx.c, src/pcx.h, src/people.h, src/people.tpl, src/pixelize.c, src/pixelize.h, src/prefs.def, src/prefs.tpl, src/readmake.c, src/readmake.h, src/render.c, src/render.h, src/renderdata.c, src/renderdata.h, src/savegame.h, src/scores.c, src/scores.h, src/scrtools.c, src/scrtools.h, src/sprglauto.c, src/sprglauto.h, src/sprglenz.c, src/sprglenz.h, src/sprite.c, src/sprite.h, src/spropaque.c, src/spropaque.h, src/sprprog.c, src/sprprog.h, src/sprprogwav.c, src/sprprogwav.h, src/sprrle.c, src/sprrle.h, src/sprshade.c, src/sprshade.h, src/sprtext.c, src/sprtext.h, src/sprunish.c, src/sprunish.h, src/sprzcol.c, src/sprzcol.h, src/structs.h, src/system.h, src/timer.c, src/timer.h, src/vars.c, src/visuals.c, src/visuals.h, src/lvl/de_body.c, src/lvl/de_head.c, src/lvl/free.c, src/lvl/in_body.c, src/lvl/load.c, src/lvl/loadmac.h, src/lvl/lvl.h, src/lvl/lvl_priv.h, src/lvl/privacc.c, src/media/keyb.h, src/media/keysdef.h, src/media/keyvalues.h, src/media/sfx.c, src/media/strack.c, src/media/strack.h, src/media/video.c, src/media/video.h, src/media/video_low.h, src/media/allegro/keyb.c, src/media/allegro/keyvalues.c, src/media/allegro/video.c, src/media/dummy/keyb.c, src/media/dummy/keyvalues.c, src/media/dummy/video.c, src/media/ggi/keyb.c, src/media/ggi/keyvalues.c, src/media/ggi/video.c, src/media/sdl/keyb.c, src/media/sdl/keyvalues.c, src/media/sdl/video.c: Update as explained. 2001-09-18 Alexandre Duret-Lutz * src/media/dummy/keyvalues.c: Don't include ggi.h. 2001-09-17 Alexandre Duret-Lutz * m4/h-allegro.m4: Hide Allegro support. Do not check for it unless explicitly requested. 2001-09-17 Alexandre Duret-Lutz * src/media/allegro/video.c (screen_rv): New variable. (init_video_low, uninit_video_low, vsynchro_low, vsynchro2_low): Use it. (set_pal): Fix buffer overrun. (set_pal_entry): Supply p.filter value to suppress compiler warning. 2001-09-15 Alexandre Duret-Lutz * src/media/README: New file. * src/sys/README: New file. * src/lvl/README: New file. * src/lvl/Makefile.inc (EXTRA_DIST): Add lvl/README. * src/sys/Makefile.inc (EXTRA_DIST): Add sys/README. * src/media/Makefile.inc (EXTRA_DIST): Add media/README. 2001-08-26 Alexandre Duret-Lutz * NEWS: Typo. 2001-08-26 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12f. 2001-08-26 Alexandre Duret-Lutz * arch/mingw32/cross.sh (CONFIGURE_OPTS): Remove --program-suffix, not needed. (cross_install): Strip heroeslvl.exe. * arch/mingw32/dest-readme-lib: Update. 2001-08-26 Alexandre Duret-Lutz * m4/libalt.m4 (adl_LIBALT_OK): Support options in the 6th argument. (adl_LIBALT_EITHER): Defaut to prepend the library flags, handle the APPEND option. * m4/h-media.m4 (heroes_MEDIALIB_SELECTION): Use the APPEND option for allm and sdlm. 2001-08-26 Alexandre Duret-Lutz * m4/generic.m4 (AC_PATH_GENERIC): Don't complain about a missing mumble-config if the installer has not used --with-mumble. 2001-08-25 Alexandre Duret-Lutz * doc/heroes.texi (Machines): Add OpenBSD, update MSVC. 2001-08-25 Alexandre Duret-Lutz * m4/h-joystick.m4 (heroes_CHECK_JOYSTICK_LIB): Typo. 2001-08-25 Alexandre Duret-Lutz * configure.ac: Prepend -lm to LIBS if libm is found, this fix a bug introduced on 2001-08-24. 2001-08-25 Alexandre Duret-Lutz * src/sys/Makefile.inc (EXTRA_DIST): Add main.h. 2001-08-25 Alexandre Duret-Lutz * TODO: Update. * ANNOUNCE: Prepare for 0.13. 2001-08-25 Alexandre Duret-Lutz * po/fr.po: Update. 2001-08-25 Alexandre Duret-Lutz * src/heroeslvl.c (version, usage, dir_to_string, type_to_char, print_type_keys, print_tunnels, anim_kind_to_str, print_tile_details, process, main): Use gettext. 2001-08-25 Alexandre Duret-Lutz * doc/heroes.texi (direntry): Add heroeslvl. (heroeslvl): New chapter. 2001-08-24 Alexandre Duret-Lutz * src/heroes.c (find_lemming_direction): Allow lemmings to be blocked under a trail (i.e. don't assert against that). 2001-08-24 Alexandre Duret-Lutz configure was still defining many HAVE_LIB* macro that are no longer needed since the move to src/media/. Only HAVE_LIBSDL_MIXER is used. This remove all the other, to cleanup config.h (and reduce the probability of config.h to change, which is good since all files depend upon config.h). * m4/h-display.m4 (heroes_CHECK_DISPLAY_LIB): Don't call heroes_CHECK_DISPLAY_LIB. * m4/checkpkg.m4 (AC_caolan_CHECK_PACKAGE): Don't define HAVE_LIB[]UP. * m4/h-sdl.m4 (heroes_CHECK_SDL): Don't define HAVE_LIBSDL. (heroes_CHECK_SDL_PRELIM): Merge into heroes_CHECK_SDL. * m4/h-mikmod.m4 (heroes_CHECK_MIKMOD): Don't define HAVE_LIBMIMOD. (heroes_CHECK_MIKMOD_PRELIM): Merge into heroes_CHECK_MIKMOD. * m4/h-sdlmixer.m4 (heroes_CHECK_SDL_MIXER): Define HAVE_LIBSDL_MIXER. * configure.ac: Don't define HAVE_LIBM. 2001-08-24 Alexandre Duret-Lutz This is the start of support for Allegro. It does not work yet (actually it segfault, and I've not yet understood why). Allegro do not use any naming convention for its symbols, neither does Heroes, so presently this lead to many conflicts that had to be resolved by renaming Heroes' symbols. :( * m4/h-allegro.m4: New file. * src/media/allegro/keyb.c: New file. * src/media/allegro/keyvalues.c: New file. * src/media/allegro/video.c: New file. * src/sys/allegro/main.c: New file. * m4/h-display.m4 (heroes_CHECK_DISPLAY_LIB): Call heroes_CHECK_ALLEGRO. * m4/h-media.m4 (heroes_MEDIALIB_SELECTION): Handle allm and allvkm. * m4/libalt.m4 (adl_LIBALT_EITHER): Typo. * m4/pkgeneric.m4 (AC_adl_PKG_GENERIC): Allow to not test for a function presence. * src/hedlite.c: Rename mouse_x and mouse_y into mouse_coord_x and mouse_coord_y. (save_pcx): Rename as ... (save_level_as_pcx): ... this. * src/intro.c: Rename set_color as set_pal_entry. * src/menus.c: Rename set_volume and set_palette as adjust_volume and force_palette. * src/prefs.tpl: Rename KEYCODE_MAX as HKEYCODE_MAX. * src/scrtools.c (set_palette): Rename as ... (force_palette): ... this. * src/scrtools.h: Idem. * src/media/Makefile.inc (EXTRA_LIBRARIES): Add media/libhallvkm.a. (media_libhallvkm_a_CFLAGS, media_libhallvkm_a_SOURCES, nodist_media_libhallvkm_a_SOURCES): New variables. (media/allegro/keysdef.c): New target. * src/media/keyb.c: Rename KEY_MAX into HKEY_MAX, mouse_x into mouse_coord_x, mouse_y into mouse_coord_y. * src/media/keyb.h: Likewise. * src/media/ggi/keyb.c: Likewise. * src/media/sdl/keyb.c: Likewise. * src/media/strack.h (set_volume): Rename as ... (adjust_volume): ... this. * src/media/dummy/strack.c: Likewise. * src/media/mikmod/strack.c: Likewise. * src/media/sdl_mixer/strack.c: Likewise. * src/media/video.h (set_color): Rename as ... (set_pal_entry): ... this. * src/media/dummy/video.c: Likewise. * src/media/ggi/video.c: Likewise. * src/media/sdl/video.c: Likewise. * src/sys/Makefile.inc (EXTRA_LIBRARIES): Add sys/libhallm.a. (sys_libhallm_a_CFLAGS, sys_libhallm_a_SOURCES): New variables. 2001-08-23 Alexandre Duret-Lutz Because some libraries need some special `main' arrangement (e.g. SDL sometime want to rename main() into SDL_main()), we need to turn main() into static libraries... *grin*. * m4/h-media.m4 (heroes_MEDIALIB_SELECTION): Handle stdm/sdlm selection. * src/Makefile.am (INCLUDES): Add -I$(srcdir)/sys. (EXTRA_LIBRARY): Define empty. (CLEANFILES): New. (EXTRA_DIST): Add and include sys/Makefile.inc. * src/heroes.c (main): Rename as ... (heroes_main): ... this. * src/sys/Makefile.inc: New file. * src/sys/main.h: New file. * src/sys/std/main.c: New file. * src/media/Makefile.inc (EXTRA_LIBRARY): Append (+=) instead of assigning (=). (CLEANFILES): Move to src/Makefile.am. 2001-08-22 Alexandre Duret-Lutz * tools/alpha.sh: Typo. 2001-08-22 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12e. * NEWS: Update. * tools/genpotfiles.sh: Grep the files in src/media/ too. 2001-08-22 Alexandre Duret-Lutz * src/lvl/de_body.c (ANIM_FRAME_DELAY): Add 1. * src/lvl/load.c (lvl_load_body_file): Typo. 2001-08-22 Alexandre Duret-Lutz This is a mega-combo-patch which break the files interfacing with the display/keyboard/mouse/sound/joystick libraries into separate directories. Instead of one file per medium, holding code for all supported libraries, we now have one directory per supported library. Many atomic static libraries are built and linked on demand from these directories (roughly one library per medium). This is a lot cleaner: there is no need to play with #ifdef/#ifndef anymore, configure will just decide which of these atomic libraries Heroes will be linked with. Configuration machinery. We now check for all library in a first step, and make a choice for the availble libraries in a second step (taking user preferences into account). * m4/h-media.m4: New file. * m4/libalt.m4: New file. * configure.ac: Replace display/joystick/sound library checks by a call to heroes_MEDIALIB_SELECTION. (Move these checks there.) Comment out the configuration summary. * m4/h-display.m4 (heroes_CHECK_DISPLAY_LIB_PRELIM): Delete. (heroes_CHECK_DISPLAY_LIB): Simplify, don't handle library exclusions. Call adl_LIBALT_OK. * m4/h-ggi.m4 (heroes_CHECK_GGI): Update user_selection_list_vkm. (heroes_CHECK_GGI_POST): Delete. * m4/h-joystick.m4 (heroes_CHECK_JOYSTICK_LIB): Simplify, don't handle library exclusions. Call adl_LIBALT_OK. Update user_selection_list_j. Don't define JOYSTICK_SUPPORT. * m4/h-mikmod.m4 (heroes_CHECK_MIKMOD): Update user_selection_list_s. * m4/h-sdlmixer.m4 (heroes_CHECK_SDL_MIXER): Update user_selection_list_vkm, user_selection_list_j, and user_selection_list_s. * m4/h-sdl.m4 (heroes_CHECK_SDL): Likewise. (heroes_CHECK_SDL_POST): Delete. * m4/h-sound.m4 (heroes_CHECK_SOUND_LIB_PRELIM): Delete. (heroes_CHECK_SOUND_LIB): Update user_selection_list_s, call adl_LIBALT_OK. Many files are moved from src/ to src/media/. The code also have to be adapted to the new API that this break required. Among the major API changes is the key definitions which used to be macros and are now variables, hence they cannot be used as case labels anymore. * src/display.c: Delete (replaced by src/media/video.c, src/media/sdl/video.c, src/media/ggi/video.c) * src/display.h: Delete (replaced by src/media/video.h). * src/joystick.c: Delete (replaced by src/media/sdl/joystick.c, src/media/gii/joystick.c). * src/joystick.h: Delete (replaced by src/media/joystick.h). * src/keyb.c: Delete (replaced by src/media/keyb.c, src/media/sdl/keyb.c, src/media/ggi/keyb.c). * src/keys_heroes.h: Delete (replaced by src/media/keyvalues.h, src/media/sdl/keyvalues.c, src/media/ggi/keyvalues.c). * src/keys_heroes.c: Likewise. * src/keysdef.h: Delete (replaced by src/media/keysdef.h) * src/keysdef.c: Delete. * src/sfx.c: Delete (replaced by src/media/sfx.c, src/media/mikmod/sfx.c, src/media/sdl_mixer/sfx.c). * src/sfx.h: Delete (replaced by src/media/sfx.h). * src/sound.c: Delete (replaced by src/media/strack.c, src/media/sdl_mixer/strack.c, src/media/mikmod/strack.c). * src/sound.h: Delete (replaced by src/media/strack.h) * src/Makefile.am (INCUDES): Add ./media. (CFLAGS): Suppress all meadia-library related CFLAGS. We can now use per-library CFLAGS. (heroes_LDADD): Replace hard-coded values by @LIBALT_LDADD@. (heroes_LDFLAGS): Likewise. (heroes_DEPENDENCIES): New variable. (heroes_SOURCES): Remove moved sources. (BUILT_SOURCES, DISTCLEANFILES): Remove keysdef-inc.h. [SDL, GGI] (keysdef-inc.h): Remove target. (paramfmt-check.o, parafmt-check): Simplify into ... (EXTRA_PROGRAMS, parafmt_check_SOURCES, parafmt_check_CFLAGS): ... these. (EXTRA_DIST): Add media/Makefile.inc and include it. * src/argv.h: Adjust includes. * src/camera.h: Likewise. * src/const.h: Likewise. * src/endscroll.c: Likewise. * src/errors.c: Likewise. * src/fontdata.h: Likewise. * src/intro.h: Likewise. * src/pcx.h: Likewise. * src/pixelize.c: Likewise. * src/pixelize.h: Likewise. * src/render.c: Likewise. * src/renderdata.h: Likewise. * src/scrtools.c: Likewise. * src/sprite.h: Likewise. * src/timer.c: Likewise. * src/visuals.c: Likewise * src/hedlite.c: Likewise. (display_level_map_fullscreen, gestclav): Adjust to new key definitions. * src/heroes.c (play_game): Likewise. * src/menus.c (move_upon, exec_menu, extra_menu, edito_selector, handle_reader_keys): Likewise. * src/system.h: Suppress all the media library selection stuff. * src/prefs.def: Use keys_pref_group () is name for the key group. * src/prefs.tpl: Support for function (or variable) as group names. Most of the following files are made from files deleted from src/. See the top of the preceding block for details. * src/media/Makefile.inc: New file. * src/media/joystick.h: New File. * src/media/keyb.c: New file. * src/media/keyb.h: New file. * src/media/keyb_low.h: New file. * src/media/keysdef.h: New file. * src/media/keyvalues.h: New file. * src/media/sfx.c: New file. * src/media/sfx.h: New file. * src/media/strack.c: New file. * src/media/strack.h: New file. * src/media/video.c: New file. * src/media/video.h: New file. * src/media/video_low.h: New file. * src/media/dummy/joystick.c: New file. * src/media/dummy/keyb.c: New file. * src/media/dummy/keysdef.c: New file. * src/media/dummy/keyvalues.c: New file. * src/media/dummy/sfx.c: New file. * src/media/dummy/strack.c: New file. * src/media/dummy/video.c: New file. * src/media/ggi/keyb.c: New file. * src/media/ggi/keyvalues.c: New file. * src/media/ggi/video.c: New file. * src/media/gii/joystick.c: New file. * src/media/mikmod/sfx.c: New file. * src/media/mikmod/strack.c: New file. * src/media/sdl/joystick.c: New file. * src/media/sdl/keyb.c: New file. * src/media/sdl/keyvalues.c: New file. * src/media/sdl/video.c: New file. * src/media/sdl_mixer/sfx.c: New file. * src/media/sdl_mixer/strack.c: New file. 2001-08-06 Alexandre Duret-Lutz * src/display.c (init_SDL): Don't initialize the sound device if we are not going to use it. Idem with the joystick. Reported by Jean. 2001-08-05 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12d. * NEWS: Update. 2001-08-05 Alexandre Duret-Lutz * src/levellst.c (cmp_levels): Sort the level names on the last digit first, so that they are played in this order: 010 020 030 ... 011 021 ..., and not this one 010 011 012 ... 2001-08-05 Alexandre Duret-Lutz * src/heroes.c (find_free_way): Autopilot still work against file trails for invincible players. 2001-08-05 Alexandre Duret-Lutz * src/structs.h (lemming_t) : Rename as ... (lemming_t) : ... these. * src/heroes.c (update_lemmings): Eve out most of the code to ... (find_lemming_direction): ... this new function. Disallow lemmings to enter tunnels (the change from 2001-07-13 unintentionally allowed this). Comment and cleanup. (load_level): Use find_lemming_direction. (update_player): Adjust to new names. * src/render.c (draw_lemming): Likewise. * src/lvl/lvl.h (DIR_TO_DIRMASK): New function. 2001-08-05 Alexandre Duret-Lutz * src/camera.c (compute_corner) : New variables. Fix computation of the maximum possition for the camera on non-wrapped levels. 2001-08-05 Alexandre Duret-Lutz * src/const.h (radar_target_pos, radar_current_pos): Delete. * src/const.c (radar_target_pos, radar_current_pos): Move ... * src/heroes.c (radar_target_pos, radar_current_pos): ... here. 2001-08-04 Alexandre Duret-Lutz * src/render.c (draw_score): Change prototype, takes row, col and score_shift. Use score_shift instead of the global radar_current_pos variable. Use IMGPOS wherever possible. * src/render.h (draw_score): Change protoype. * src/heroes.c (output_screen): Adjust calls to draw_score. 2001-08-04 Alexandre Duret-Lutz * src/render.c (draw_radar_frame): New function, eved out from draw_radar_map. (draw_radar_map): Call draw_radar_frame, don't use `dede', comment, fix drawing of full-wrapped levels (typo introduced on 2001-07-14). Take the radar_shift parameter instead of using the global radar_current_pos. * src/render.h (draw_radar_map): Adjust prototype. * src/heroes.c (output_screen): Supply new argument to draw_radar_map. 2001-08-04 Alexandre Duret-Lutz * src/levellst.c (cmp_levels): New function. (read_level_list): Sort the levels. 2001-08-02 Alexandre Duret-Lutz Fix issues observed on OpenBSD 2.9. * configure.ac: Check for setgid. * src/system.h (setgid, setgid): Define if needed. (seteuid, setegid): Define using setreuid and setregid if possible. * src/persona.c (sys_persona, user_persona): Test whether _POSIX_SAVED_IDS is *defined*, not its actual value. (user_persona_definitively): Use setuid and setgid instead of setreuid and setregid, the latter are obsolete. 2001-08-02 Alexandre Duret-Lutz Reestablish MinGW32 support. * lib/stpcpy.c: New file, from fileutils 4.1. * lib/Makefile.am (EXTRA_DIST): Add it. * tools/fetish-sync.sh (files): Add stpcpy.c. * src/Makefile.am (heroes_LDADD): Put SDL_MIXER_LIBS before SDL_MIXER since the former needs the latter. (heroeS_LDADD): Add INTLLIBS. * src/lvl/load.c (lvl_load_body_file): Type length as size_t, add rlength and use it. * src/system.h [!HAVE_SSIZE_T] (ssize_t): Define. [!HAVE_DECL_STPCPY] (stpcpy): Declare. [!HAVE_STRCASESTR] (strcasestr): Redeclare ... [!HAVE_DECL_STRCASESTR] (strcasestr): ... in this case. * configure.ac: Check for declaration of ssize_t, strcasestr, and stpcpy. Replace stpcpy if needed. 2001-08-01 Alexandre Duret-Lutz Some Autoconf internal functions have changed between 2.50 and 2.52. Add workarounds to be compatible with both versions. * m4/compat.m4: New file. * m4/checkpkg.m4: Use MY_TR_CPP * m4/findheader.m4: Use MY_VAR_POPDEF, MY_VAR_PUSHDEF, and MY_VAR_SET. * m4/h-obsolet.m4: Use MY_TR_SH. 2001-07-29 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12c. * NEWS: Update for 0.12c. 2001-07-29 Alexandre Duret-Lutz * src/heroes.c (main): Switch to sys_persona() before calling init_sound_engine() and init_video(), and back to user_persona() after. * src/persona.h (keep_sgid, keepsuid): New variables. * src/persona.c (keep_sgid, keepsuid): New variables. (user_persona_definitively): Use them. * src/userconf.c (read_userconf): Handle keepsuid: and keepsgid:. * src/etc/heroesrc (soundconf): Add commented lines for keepsuid and keepsgid. * doc/heroes.texi (heroesrc): Document keepsuid and keepsgid. 2001-07-29 Alexandre Duret-Lutz Build a man page for heroeslvl. * man/Makefile.am (heroeslvl.6): New target. (man_MANS): Add heroeslvl.6. (MAINTAINERCLEANFILES): Rewrite as $(man_MANS). 2001-07-29 Alexandre Duret-Lutz * configure.ac: Show a summary of CFLAGS and LIBS for each libraries. * m4/checkpkg.m4: Typo, s/_LDALL/_LDFLAGS/. * src/Makefile.am (heroes_LDFLAGS): Typo, s/_LIBS/_LDFLAGS/. 2001-07-29 Alexandre Duret-Lutz * configure.ac: Remove the jm_FUNC_REALLOC kludge. 2001-07-29 Alexandre Duret-Lutz Because intl/ and lib/ contains third party code which does not conform to the same level of "strictness" as the code in src/, enable some -Woptions in src/ only. * m4/gccwarn.m4 (CF_GCC_MORE_WARNINGS): New functions. (ad_GCC_WARNINGS): Call CF_GCC_MORE_WARNINGS, AC_SUBST() MORE_WARNINGS_CFGLAGS. * src/Makefile.am (CFLAGS): Add MORE_WARNINGS_CFGLAGS. 2001-07-29 Alexandre Duret-Lutz ``heroeslvl'' should not be linked with SDL or GGI as ``heroes''. So let's change configure to not add those libraries to LIBS, CFLAGS, etc. Use per-target LDFLAGS and LDADD instead. * m4/checkpkg.m4: Set and AC_SUBST() UP[]_LDFLAGS, UP[]_CFLAGS, and UP[]_LIBS. * m4/h-joystick.m4: Add $SDL_LIBS to $LIBS before testing. * m4/h-sdl.m4: Check for SDL_EnableKeyRepeat in the call to AC_adl_PKG_GENERIC. * m4/pkgeneric.m4: Revert LIBS and CFLAGS. * src/Makefile.am (CFLAGS, heroes_LDFLAGS): New. (heroes_LADADD): Update. * lib/Makefile.am (CFLAGS): New. 2001-07-27 Alexandre Duret-Lutz * src/heroes.c (main): Call read_sfx_conf after init_sound_engine (). * src/sfx.c (read_sfx_conf): Free sfxdir on error. 2001-07-27 Alexandre Duret-Lutz * src/lvl/de_body.c (decode_level_body): Free square_walls_in. 2001-07-27 Alexandre Duret-Lutz * src/locales.c: New file. * src/locales.h: New file. * src/Makefile.am (heroes_SOURCES): Add them. * src/heroes.c (main): Move locale initialization code to init_locales() in locales.c and call it. 2001-07-27 Alexandre Duret-Lutz * src/musicfiles.c: Cosmetics changes. (dir_name): Delete, include "dirname.h" instead. (read_sound_config_file): Adjust to the new dir_name(), i.e., add a `/' between the file name and the directory name. 2001-07-27 Alexandre Duret-Lutz ``heroes-sdl -G mumble'' didn't work because the string put in environment (SDL_VIDEODRIVER=mumble) was immediatly freed afterward. * src/display.c [HAVE_LIBSDL] (sdl_videodriver): New variable. [HAVE_LIBSDL] (set_display_params): Set sdl_videodriver, putenv() it, but don't free it. [HAVE_LIBSDL] (uninit_video): Free sdl_videodriver here. 2001-07-26 Alexandre Duret-Lutz * src/camera.c (compute_corner): Cleanup. * src/const.c (camera_center_x): Remove. * src/const.h (camera_center_x): Remove. * src/heroes.c (play_demo, play_game): Don't set camera_center_x. 2001-07-25 Alexandre Duret-Lutz * src/const.h (square2offset, invincible): Delete. * src/const.c (square2offset): Delete. (invincible): Move to ... * src/render.c (invincible): ... here. * src/heroes.c (load_level): Don't initialize square2offset. 2001-07-26 Alexandre Duret-Lutz A report from William Black about the vehicles-restricted-in-a-two-square-width-vertical-zone allowed to finally close this bug (reported by Jean in Dec 2000). * src/people.def: Add him. * BUGS: Update. 2001-07-25 Alexandre Duret-Lutz Check gettext version in upgettext.sh. Older versions can cause the bootstrap process to fail ungracefully. Suggested by Laurent Duperval . * tools/upgettext.sh (usage): Add -f. (checkversion): New function. Handle -f, call checkversion unless -f is given. 2001-07-24 Alexandre Duret-Lutz * tools/alpha.sh: Reorder and comment sections. 2001-07-24 Alexandre Duret-Lutz * configure.ac: Bump to 0.12b. * NEWS: Update for 0.12b. * doc/Makfile.am (.texi.html): Add --no-split, newer versions of makeinfo need this. 2001-07-23 Alexandre Duret-Lutz * doc/heroes.texi (Invoking): More documentation for -G and -F. * TODO: Update. 2001-07-23 Alexandre Duret-Lutz * tools/Makefile.inc: New file. * tools/Makefile.am: Delete. * tools/README: New file. * tools/exnews.pl: New file. * tools/alpha.sh: New file. * configure.ac: Don't create tool/Makefile.in. * Makefile.am: Include tools/Makefile.inc (SUBDIRS): Remove tools. (EXTRA_DIST): Add tools/Makefile.inc. 2001-07-22 Alexandre Duret-Lutz * src/lvl/free.c: New file. * src/lvl/Makefile.inc (lvl_libhlvl_a_SOURCES): Add lvl/free.c. * src/lvl/in_body.c (initialize_empty_level_body): New function. * src/lvl/lvl_priv.h (initialize_empty_level_body): New function. * src/lvl/load.c (lvl_load_file): Call it. * src/heroes.c (unload_level): Call lvl_free. * src/heroeslvl.c (process): Likewise. * src/levellst.c (read_level_dir): Likewise. 2001-07-22 Alexandre Duret-Lutz * src/levellst.c: New file. * src/levellst.h: New file. * src/Makefile.am (heroes_SOURCES): Add them. * src/extras.c (select_file): Rename as select_file_lvl and move to levellst.c. (browse_Extra_directories): Use select_file_lvl. * src/heroes.c (level_list, levellstchunk, levelinf, level_list_nbr): Remove, replaced by varables from levellst.h and .c. (level_full_list_Size, current_quest_level): Define as unsigned. (load_level_from_level, compute_level_full_list, random_level, load_random_wrapped_level, load_random_level, play_menu, load_demo, main_menu, main): Adjust to the new definitions. (read_level_list): Remove. * sr/rsc_files.gperf (end-scroller-txt, help-txt, levels-list-txt, text-conf-txt): Remove. 2001-07-22 Alexandre Duret-Lutz * src/lvl/load.c (lvl_load_body_mem, lvl_load_header_mem): New functions. (lvl_init_lvl_basic_fields): New function, extracted from... (lvl_load_header): ... here. Rename as ... (lvl_load_header_file): ... this. Use lvl_load_header_mem. (lvl_load_body): Rename as ... (lvl_load_body_file): ... this. Use lvl_load_header_file. (lvl_load_file): Try to load the file using mmap, before falling back to read. 2001-07-21 Alexandre Duret-Lutz * src/heroeslvl.c (process): Don't load full level if we can avoid it. 2001-07-21 Alexandre Duret-Lutz Add option -pi to display tile details. * src/heroeslvl.c (options_t): Add print_tile_details. (print_tile_details, anim_kind_to_str): New functions. (usage): Document -pi. (decode_print_options): Handle 'i'. (print_square_type, print_square_walls, print_square_directions): Print line numbers. (process): Call print_tile_details. 2001-07-19 Alexandre Duret-Lutz Gather camera handling code from heroes.c and const.c into camera.c. * src/camera.c: New file. * src/camera.h: New file. * src/Makefile.am (heroes_SOURCES): Add camera.c and camera.h. * src/const.c (camera_x, camera_y, corner_x, corner_y, corner, corner_dx, corner_dy, inert_x, inert_y, nbr_tiles_cols, nbr_tiles_rows): Move to camera.c. (camera_stop_x, camera_stop_y): Move to ... * src/render.c (draw_level): ... here. * src/const.h: Likewise. * src/scrtools.c: Likewise. * src/visuals.c: Likewise. * src/endscroll.c: Include camera.h. * src/heroes.c (compute_corner): Move to camera.c. (update_all): Extract the position_camera() function, now in camera.c. (output_screen): Call position_camera(). (play_demo, play_game): Extract and call init_camera(). * src/menus.c (background_menu): Extract and call lisajou_camera(). 2001-07-16 Alexandre Duret-Lutz * configure.ac: Bump to 0.12a. Call AM_PROG_CC_C_O. * NEWS: Update for 0.12a. * TODO: Likewise. * src/Makefile.am (EXTRA_DIST): Add etc/Makefile.inc and lvl/Makefile.inc. (AUTOMAKE_OPTIONS): New. * Makefile.am (EXTRA_DIST): Add arch/Makefile.inc and m4/Makefile.inc. 2001-07-15 Alexandre Duret-Lutz New bonus: fire trail. * src/helptext.c (help_text2, help_text4): Document it. * src/bonus.c (bonus_density, bonus_point): Fill in the fire trail column. (apply_bonus): Handle fire_trail. * src/structs.h (player_t) : New. * src/player.c (reinit_player): Zeroes player[p].fire_trail. (find_free_way): Disable autopilot against fire trails. (update_player): Handle fire_trail. 2001-07-15 Alexandre Duret-Lutz * src/heroes.c (compute_corner): Compute and cast tw and th once for all. (update_all): Fix camera position computation (typo from 2001-07-13). 2001-07-15 Alexandre Duret-Lutz Rewrite the way explosions are handled. There used to be two distinct explosion types: those from T_BOOM squares and those triggered by player death. Both where handled separately and in different ways. This is now homogeneous. Two noticeable differences are that death explosions are now harmful to other players and will propagate to neighbor T_BOOM squares. * src/const.c (last_explo, square_explosion, square_dead_explosion, explo_list_ptr, explo_list_pos_x, explo_list_pos_y, explo_nbr, square_explosion_type): Delete. * src/const.h: Likewise. * src/explosions.c (square_explo_state): New variable, replace suqare_explosion and square_dead_explosion. (square_explo_type): New variable, replace square_explosion_type. (explosion_info_t, explo_list, explo_list_max, explo_list_first_unused, explo_timer, explo_time, allocate_explosions, release_explosions, trigger_explosion, trigger_possible_explosion, update_explosions): New. * src/explosions.h (EXPLOSION_SLICES_PER_FRAMES, EXPLOSION_DELAY, EXPLOSION_IMMEDIATE, EXPLOSION_TRIGGERED, EXPLOSION_TRIGGER_NEIGHBORS, EXPLOSION_UNTRIGGERED, explosion_t, square_explo_state, square_explo_type, allocate_explosions, release_explosions, trigger_explosion, trigger_possible_explosion, update_explosions): New. * src/heroes.c (load_level): Adjust to call allocate_explosions(). (unload_level): Adjust to call release_explosions(). (erase_trail): Adjust to call trigger_explosion(). (ia_eval_dir_target_inline, ia_eval_dir_bonus_inline, ia_eval_dir_lemming_inline, ia_eval_dir_cash_inline, ia_eval_dir_color_inline, ia_goto_target_inline, ia_goto_bonus_inline, ia_goto_lemming_inline, ia_goto_color_inline, ia_goto_cash_inline): Adjust to use square_explo_state. (update_explo): Remove. (update_all): Call update_explosions() instead of update_explo(). * src/render.c: (render): Adjust to use square_explo_type and square_explo_state, suppress the separate rendering loop for players' death explosions. 2001-07-14 Alexandre Duret-Lutz * src/const.h (d2w, w2d, square_offset): Delete. (square2tile, square_offset2coord): Rename as ... (square_tile, square_coord): ... these. * src/const.c (d2w, w2d): Remove. (square2tile, square_offset2coord): Rename as ... (square_tile, square_coord): ... these. (square_offset): Move to ... * src/hedlite.c (square_offset): ... here. * src/heroes.c (load_level, unload_level, ia_eval_dist, update_player, update_all): Adapt to new names. (find_free_way, update_lemmings): Don't use w2d. * src/render.c (draw_radar_map): Adapt to new names. 2001-07-13 Alexandre Duret-Lutz Use the new level loading library to load levels in the game (not the level editor). This new loading code will export level infos differently, hence many places have to be adapted to the new representation. * lib/xstrduplwr.h: New file. * lib/xstrduplwr.c: New file. * lib/Makefile.am: Add them. * src/Makefile.am (LDADD): Rename as ... (heroeslvl_LDADD): ... this. Add lvl/libhlvl.a. * src/const.c (map_info, map_info_2xt, map_info_2yt, map_info_2xwrap, map_info_2ywrap, level_map, square_radar_wall, square_wall, square_wrap): Remove these variables. (lvl): New variable, which replace all the above. * src/const.h: Likewise. * src/bonus.c (add_bonus, mark_unreachable_places, init_bonuses_level): Adjust to use the new level representation. * src/heroes.c (ia_target_x, ia_targer_y, ia_wrap_x, ia_wrap_y): Declare as square_coord_t. (tunnel_square_io): Remove this variable. (add_color, add_cash, erase_player, reinit_player, load_level, compute_corner, shrink_trail, erase_trail, ia_eval_dist, ia_eval_dir_target_inline, ia_eval_dir_bonus_inline, ia_eval_dir_lemming_inline, ia_eval_dir_cash_inline, ia_eval_dir_color_inline, ia_eval_neighb_pos, ia_eval_dir_target, ia_eval_dir_lemming, ia_eval_dir_color, ia_eval_dir_cash, ia_eval_dir_bonus, ia_goto_target_inline, ia_goto_bonus_inline, ia_goto_lemming_inline, ia_goto_color_inline, ia_goto_cash_inline, ia_goto_target, ia_goto_nearest_bonus, ia_goto_nearest_lemming, ia_goto_nearest_color, ia_goto_nearest_cash, update_player, update_explo, update_lemmings, update_all): Adjust to use the new level representation. * src/menu.c (background_menu): Likewise. * src/render.c (draw_level): Likewise. * src/renderdata.c (init_render_data): Likewise. * src/struct.h (DONT_WRAP): Don't declare, it's done in lvl/lvl.h. (player_t) : Declare as dir_t. (lemming_t) : Likewise. * src/renderdata.h (tile_anim_kind): Move to ... * src/lvl/lvl.h (anim_kind_t): ... here. (lvl_tile_sprite_overlay_offset): New function. (lvl_animation_info): Return animation type too. * src/lvl/de_body.c (TILE_SPRITE): Rename as ... (TILE_OVERLAY): ... this. (TILE_SPRITE): New. (decode_level_body): Read the sprite overlay, handle animation types. * src/lvl/de_head.c (decode_level_header): Lowercasify the sprite map basename. * src/lvl/lvl_priv.h (tile_data_t) : New. * src/lvl/privacc.c (lvl_tile_type, lvl_tile_sprite_offset, lvl_tile_sprite_overlay_offset, lvl_animation_info): New functions. 2001-07-10 Alexandre Duret-Lutz Some directories do not deserve their own Makefile (it takes time to recurse directories, and it's ugly). Replace some `Makefile.am' files by some `Makefile.inc' included from the underlying `Makefile.am'. * src/etc/Makefile.inc: New file. * src/etc/Makefile.am: Delete. * src/Makefile.am: Include src/etc/Makefile.inc. * tools/genm4mam.sh: Create m4/Makefile.inc instead of m4/Makefile.am. * arch/Makefile.inc: New file. * arch/Makefile.am: Delete. * configure.ac: Don't create src/etc/Makefile, m4/Makefile, and arch/Makefile.am. * Makefile.am: Include arch/Makefile.am and m4/Makefile.inc. (SUBDIRS): Remove arch and m4. (configure.ac): Don't create m4/Makefile, arch/Makefile, and src/etc/Makefile. * HACKING: Adjust. 2001-07-10 Alexandre Duret-Lutz * src/lvl/Makefile.inc: New file. * src/lvl/de_body.c: New file. * src/lvl/de_head.c: New file. * src/lvl/in_body.c: New file. * src/lvl/load.c: New file. * src/lvl/loadmac.h: New file. * src/lvl/lvl.h: New file. * src/lvl/lvl_priv.h: New file. * src/lvl/privacc.c: New file. * src/heroeslvl.c: New file. * src/Makefile.am: include src/lvl/Makefile.inc. (bin_PROGRAMS): Add heroeslvl. (INCLUDE, heroeslvl_SOURCES, heroeslvl_LDADD): New variables. * src/system.h: Add O_BINARY support. 2001-07-10 Alexandre Duret-Lutz * configure.ac: Bump version to 0.12. * HACKING: Update. * TODO: Update. * NEWS: Update. * m4/gettext.m4: Update from Debian's gettext 0.10.38-2. 2001-06-17 Alexandre Duret-Lutz These patches are no longer needed with gettext-0.10.38. * misc/04-intl.patch: Delete. * misc/04-m4.patch: Delete. * misc/06-intl.patch: Delete. * Makefile.am (EXTRA_DIST): Remove them. * m4/gettext.m4: Upgrade for gettext-0.10.38. * m4/glibc21.m4: Likewise. * m4/iconv.m4: Likewise. 2001-06-16 Alexandre Duret-Lutz Yet another couple of fixes suggested by Jean. * src/menus.c (draw_end_level_info): Center the title (winner). (info_mode_next_save_arrow_pos): New variable. (init_menus_sprites): Compute info_mode_next_save_arrow_pos. (draw_end_level_info): Use it. 2001-06-16 Alexandre Duret-Lutz Jean reported several times that some levels play without any sound. These five levels are affected | ~/usr/share/heroes/levels % grep heroes * | Binary file niv038.lvl matches | Binary file niv039.lvl matches | Binary file niv049.lvl matches | Binary file niv067.lvl matches | Binary file niv108.lvl matches because they use lowercase soundtrack aliases instead of uppercase as the others. This patch change the hashing function used to lookup soundtrack aliases so that uppercase and lowercase versions of the same aliase will be hashed to the same value. * src/musicfiles.c (hash_case_string): New function. (st_hasher, get_sound_track_from_alias): Use hash_case_string instead of hash_string. * BUGS: Remove related entry. 2001-06-16 Alexandre Duret-Lutz * src/menus.c (init_menus_sprites): Reverse the strings "NEW LEVEL" and "EXISTING LEVEL". Reported by Jean. (editor_menu): Lowercasify the level name before trying to open the file for preview. Add debug messages. 2001-06-16 Alexandre Duret-Lutz Rewrite editor_first_menu using the compile_menu machinery. This also get rid of a bug reported by Jean where the french translation for "NEW LEVEL" would have been larger than the distance between the waving arrows. * src/menus.c (edit_first_menu_txt, edit_first_new_txt, edit_first_load_txt): Remove. (editor_entries, editor_menu_data): New variables to replace the three above. (init_menus_sprites, uninit_menus_sprites): Adjust. (editor_first_menu): Use exec_menu. 2001-06-04 Alexandre Duret-Lutz * src/joystick.c [HAVE_SDL_JOYSTICKOPEN, HAVE_LIBGII] (get_joystick_state): Print debug messages for joystick events. * src/debugchn.def (joystick): Adjust documentation. 2001-06-03 Alexandre Duret-Lutz * lib/filelock.h: Change protoype. * lib/filelock.c: Likewise, supply flock() and _locking() implementations, not really tested. * m4/filelock.m4: New file. * m4/fopenlock.m4: Remove (obsolete). * src/scores.c: Adjust to new filelock and fileunlock prototypes. * src/savegame.c: Likewise. * src/savegame.c (write_save_records_locked, load_save_records): Seek to the beginning of file before unlocking. * src/scores.c (write_scores_locked, load_scores): Likewise. 2001-05-28 Alexandre Duret-Lutz * src/joystick.c [HAVE_LIBGII] (_get_joystick_state): Fix valuator reads. 2001-05-28 Alexandre Duret-Lutz * m4/relpaths.m4: Typos in comments. 2001-05-23 Alexandre Duret-Lutz * m4/normpath.m4: Cleanup for submission to the autoconf archive. * m4/relpaths.m4: Likewise. 2001-05-23 Alexandre Duret-Lutz * tools/autogen.sh: Recurse directories to find configure.{ac,in}. 2001-05-22 Alexandre Duret-Lutz * configure.ac: Bump version number to 0.11. * ANNOUNCE: Update for 0.11. * TODO: s/0.11/0.12/, how shame! * po/fr.po: Update. 2001-05-22 Alexandre Duret-Lutz * src/hedlite.c (create_levels_output_dir): Strip trailing slashes from level output directory, or it doesn't work with MinGW. * src/userdir.c (setup_userdir): Likewise with the userdir. 2001-05-22 Alexandre Duret-Lutz * arch/mingw32/cross.sh: Fix function declarations, the `function' keyword is not portable. (cross_install): Zip ChangeLog.00 too, delete charset.alias. 2001-05-21 Alexandre Duret-Lutz * configure.in: Move to ... * configure.ac: ... here. Make it dependent on autoconf 2.50. * tools/autogen.sh: Be configure.ac aware. * tools/upgettext.sh: Likewise. * HACKING: s/configure.in/configure.ac/. * man/Makefile.am (heroes.6): Likewise. 2001-05-21 Alexandre Duret-Lutz * arch/Makefile.am: Remove the commented rules to please automake 1.4f (which bugs on trailing backslashes in comments). After all we can get the old rules back from CVS. 2001-05-21 Alexandre Duret-Lutz * ChangeLog.00: New file. * Makefile.am (EXTRA_DIST): Add ChangeLog.00. 2001-05-21 Alexandre Duret-Lutz Don't install charset.alias on glibc 2.1 systems. This is base on the patch that Bruno Haible applied on the Gettext CVS version to address the issue. * m4/glibc21.m4: New file. * m4/gettext.m4 (AM_GNU_GETTEXT): Require jm_GLIBC21. * misc/06-intl.patch: New file. * Makefile.am (EXTRA_DIST): Add misc/06-intl.patch. 2001-05-21 Alexandre Duret-Lutz * configure.in: Bump version number to 0.10b. * NEWS: Update for 0.10b. * HACKING: Update fetish files. 2001-05-20 Alexandre Duret-Lutz * src/etc/heroesrc (soundconf): Don't say preferences can be global. * doc/heroes.texi (Global score file): Likewise. 2001-05-20 Alexandre Duret-Lutz Allow the user to use other score or save files. * src/savegame.c (reinit_save_records_if_needed): New. * src/savegame.h (reinit_save_records_if_needed): New. * src/scores.c (reinit_scores_if_needed): New. * src/scores.h (reinit_scores_if_needed): New. * src/heroes.c (main): Call them. * src/scores.c (load_scores): Don't unlock the file if it's not open. * src/savegame.c (load_save_records): Likewise. 2001-05-20 Alexandre Duret-Lutz Change the way global file access and file locking is done. Before this patch whenever an update of a global file was requested the game had to a) switch personna if needed to access the file b) open the file c) lock it d) update the file e) close the file With this patch the global files are now open when the game begin, using the system persona, the game then switch to the user persona definitively, be keep the global file open for the whole life of the game. Updating a file now just consist of a) seeking to the beginning of the file b) locking the file c) updating the file d) unlocking the file The rationnal for this change is that it allows to drop all privileges definitively after the global files are open. Later, when scripting capability will be added to Heroes, it is important that the user cannot switch persona at will :) * lib/fopenlock.c: Delete. * lib/fopenlock.h: Delete. * lib/filelock.c: New file. * lib/filelock.h: New file. * lib/Makefile.am (libheroes_a_SOURCES, noinst_HEADERS): Replace fopenlock.c and fopenlock.h by filelock.c and filelock.h. * src/persona.c (user_persona_definitively): New function. (sys_persona_if_needed): Export. (persona_fopenlock): Remove. * src/persona.h (user_persona_definitively): New function. (sys_persona_if_needed): Export. (persona_fopenlock): Remove. * src/savegame.c (init_save_records): New. (save_games_file): Remove, adjust all callers to use name instead. (write_save_records): Rename as ... (write_save_records_locked): ... this. Don't close the file. (write_save_records): New, call write_save_records_lock. (load_save_records_open): Rewrite and rename as ... (load_save_records_seek): ... this. Adjust all callers. (load_save_records): Don't close the file, but unlock it. (load_save_records_and_keep_locked): Don't create the file. (free_save_records): Close the file here. * src/savegame.h (init_save_records): New. (write_save_records_locked): New. * src/scores.c (init_scores): New. (score_file): Remove, adjust all callers to use name instead. (write_scores): Rename as ... (write_scores_locked): ... this. Don't close the file. (write_scores): New, call write_scores_locked. (load_scores_open): Rewrite and rename as ... (load_scores_seek): ... this. Adjust all callers. (load_scores): Don't close the file, but unlock it. (load_scores_and_keep_locked): Don't create the file. (free_scores): Close the file here. * src/scores.h (init_scores): New. (write_scores_locked): New. * src/heroes.c (play_menu): Use write_scores_locked() instead of write_scores(). (main): Call init_scores(), init_save_records(), and user_persona_definitively(). 2001-05-20 Alexandre Duret-Lutz Hopefully, Heroes now works back with MinGW. * lib/stripslash.c: New file from fileutils-4.1. * lib/stripslash.h: New file. * src/relocalte.c (check_installation): Strip slashes before calling isdir. (try_to_explore_path): Check path_env against ';', not path. * tools/fetish-sync.sh (files): Add stripslash.c. * lib/dirname.c (dir_name): Compute append_dot using path, not newpath. * Makefile.am (SUBDIRS): Make intl before lib because lib needs libintl.h. * arch/mingw32/dest-readme-lib: Update to SDL 1.2.0 and SDL_mixer 1.2.0. * arch/mingw32/cross.sh: Likewise. * arch/mingw32/dest-run-bat: Update for i18n and relocation. * arch/mingw32/dest-readme-txt: Likewise. 2001-05-19 Alexandre Duret-Lutz * m4/h-paths.m4: Adjust the definition of localedir to the one used by recent gettexts, and put more comments about issues regarding localedir. 2001-05-19 Alexandre Duret-Lutz * m4/dos.m4: New file, from fileutils-4.1, patched to check for __WIN32__, _WIN32, and __MSDOS__. * tools/fetish-sync.sh (files): Add dos.m4. * configure.in: Call jm_AC_DOS. 2001-05-19 Alexandre Duret-Lutz * po/it.po: New revision from Alessandro. 2001-05-19 Alexandre Duret-Lutz * src/menus.c (handle_reader_keys): Typo. 2001-05-19 Alexandre Duret-Lutz * src/relocate.c (try_to_explore_path): Support semicolon separated paths. 2001-05-19 Alexandre Duret-Lutz * src/visuals.c: s/gauche/left/; s/droite/right/ (vertical_zoom_wave): Fix display of last line. Reported by Jean. 2001-05-17 Alexandre Duret-Lutz * doc/heroes.texi: Various fixes suggested by Jean. 2001-05-08 Alexandre Duret-Lutz * configure.in: Bump version to 0.10a. * NEWS: Update for 0.10a. 2001-05-08 Alexandre Duret-Lutz * src/relocate.c (try_to_derive_argv0): Don't free path if null. 2001-05-08 Alexandre Duret-Lutz * src/items.c (catch_this): Remove. (tutorial_arrow): New. (init_item, unit_items): Handle tutorial_arrow instead of catch_this. * src/items.h (catch_this): Remove. (tutorial_arrow, NBR_ARROW_FRAMES): New. * src/render.c (draw_level): Change the tutorial arror rendering the draw loops with the new arrow. * src/rsc_files.gperf (arrow-img): New. * src/system.h (M_PI, M_PI_2, M_PI_4): New. 2001-05-06 Alexandre Duret-Lutz * src/helptext.c (help_text1): Draw the two pictures in the background and label them using textat commands. * src/readmake.c (flag_error): New function. (compile_reader_data): Handle textat commands and use flag_error. 2001-05-06 Alexandre Duret-Lutz * configure.in: Bump version number to 0.10. * NEWS: Update for 0.10. * GNUmakefile (src/debughash.gperf): New target. (cvsboot): Require src/debughash.gperf. * po/fr.po: Update. 2001-05-06 Alexandre Duret-Lutz * Makefile.am: Avoid non-portable use of $< and $@ in explicit rules. * doc/Makefile.am: Likewise. * man/Makefile.am: Likewise. * src/Makefile.am: Likewise. * Makefile.am (MAINTAINERCLEANFILES): New target. (DISTCLEANFILES): Remove (intl/libintl.h is now removed from intl/Makefile). * man/Makefile.am (MAINTAINERCLEANFILES): New target. * src/Makefile.am (MAINTAINERCLEANFILES): New target. 2001-05-06 Alexandre Duret-Lutz * arch/Makefile.am: Comment out all the VisualC stuff. It's out of date. 2001-05-05 Alexandre Duret-Lutz * GNUmakefile (src/people.c): New target. (cvsboot): Require src/people.c. 2001-05-05 Alexandre Duret-Lutz * ANNOUNCE: Update for 0.10. * TODO: Likewise. 2001-05-05 Alexandre Duret-Lutz Update copyright year for recently modified files. * src/debugmsg.c: Copyright 2001. * src/misc.c: Likewise. * src/misc.h: Likewise. * src/pcx.c: Likewise. * src/rsc_files.c: Likewise. * src/rsc_files.gperf: Likewise. * src/rsc_files_hash.h: Likewise. * src/userconf.h: Likewise. * src/userconf.c: Likewise. * tools/autogen.sh: Likewise. * tools/cvsboot.sh: Likewise. * tools/fetish-sync.sh: Likewise. 2001-05-05 Alexandre Duret-Lutz * src/pcx.c (delta): Remove. (pcx_load): Remove call to delta, and do some cosmetic cleanups. 2001-05-05 Alexandre Duret-Lutz Get rid of new gcc-3.0 warnings. * src/const.c (draw_glenz_box): Remove `operation possibly undefined warning'. * src/pcx.c (delta): Likewise. * src/render.c (draw_radar_map, draw_score, draw_logo_info): Likewise. * src/heroes.c (output_screen): Likewise. (play_game): Set default value for 0 to suppress a warning. 2001-05-05 Alexandre Duret-Lutz * GNUmakefile: New file. * Makefile.am (EXTRA_DIST): Add GNUmakefile. * HACKING: Update. 2001-05-05 Alexandre Duret-Lutz * m4/gnu-source.m4: New file. * tools/fetish-sync.sh (files): Add m4/gnu-source.m4. * configure.in: Call AC__GNU_SOURCE. 2001-05-04 Alexandre Duret-Lutz Change the CREDIT screen to thanks ALL people. * src/people.h: New file. * src/people.tpl: Generate people.c. * src/Makefile.am (heroes_SOURCES): Add people.h add people.c. (people.c): New target. * src/menu.c (people_text): New variable. (credit_menu): Remove variable. (init_menus_sprites, uninit_menus_sprites): Handle people_text, remove reference to credit_menu. (handle_reader_keys): New functions. (jukebox_keys): Call handle_reader_keys. (jukebox_menu): Display people_text instead of credit_menu. * src/people.def: Add Eugenia Loli-Queru, Ian Dalton, and Pascal Rigaux. * src/relocate.c (try_to_explore_path): Oops, exit the loop if needed. 2001-05-03 Alexandre Duret-Lutz Generate AUTHORS, THANKS, and the associated section of the documentation from a central file (src/people.def). * AUTHORS: Delete. * THANKS: Delete. * Makefile (AUTHORS, THANKS): New targets. * src/people.def: New file. * src/people.tpl: New file. * src/Makefile.am (heroes_SOURCES): Add people.def or people.tpl. * doc/Makefile.am (heroes_TEXINFOS, MAINTAINERCLEANFILES): Add people.texi. (people.texi): New target. * doc/heroes.texi (Authors, Contributors): Replaces these sections ... (People): ... with this one, which includes people.texi. 2001-05-03 Alexandre Duret-Lutz * configure.in: Ask AM_GNU_GETTEXT to check for ngettext. Reported by Jean. 2001-05-01 Alexandre Duret-Lutz * configure.in: Bump version number to 0.9b. * NEWS: Update for 0.9b 2001-05-01 Alexandre Duret-Lutz * doc/heroes.texi (Relocatable package): New section. * tools/readme.sed: Adjust summary. 2001-05-01 Alexandre Duret-Lutz Better relocation: use argv0 and PATH to guess the location of data files. * configure.in: Check for memrchr. * lib/dirname.c: New file. * lib/dirname.h: New file. * lib/memrchr.c: New file. * lib/Makefile.am (EXTRA_DIST): Add memrchr. (noinst_HEADERS): Add dirname.h. (libheroes_a_SOURCES): Add dirname.c. * src/relocate.c (try_to_derive_argv0, try_backward_relative_bindir, try_to_explore_path): New functions. (relocate_data): Call this function. Take a argv0 argument. * src/relocate.h (relocate_data): Take a argv0 argument. * src/heroes.c (main): Adjust call to relocate_data. 2001-05-01 Alexandre Duret-Lutz From Alessandro Dotti . * po/it.po: New revision. 2001-04-30 Alexandre Duret-Lutz Italian translations. From Alessandro Dotti . * configure.in (ALL_LINGUAS): Add it. * po/it.po: New file. 2001-04-29 Alexandre Duret-Lutz * src/savegame.c (write_save_one_record): New function. * src/savegame.h (write_save_one_record): Likewise. * src/heroes.c (play_game): Use it. 2001-04-29 Alexandre Duret-Lutz * src/scores.c (insert_scores): New function. * src/scores.h (insert_scores): Likewise. * src/heroes.c (play_menu): Use it. 2001-04-29 Alexandre Duret-Lutz * po/fr.po: Update. 2001-04-29 Alexandre Duret-Lutz * src/relocate.c (relocate_data): Typo. 2001-04-29 Alexandre Duret-Lutz * src/menus.c (game_menu): Use ngettext to handle plural. * src/heroes.c (update_player): Likewise. * src/system.h (ngettext): Define replacement macro. 2001-04-28 Alexandre Duret-Lutz * src/etc/heroesrc (soundconf): Suggest to use ifdef suid-or-sgid to protect the definition of global paths. * src/userconf.c (read_userconf): Handle ifdef/endif. 2001-04-28 Alexandre Duret-Lutz * src/vars.h: New file. * src/vars.c: New file. * src/Makefile.am (heroes_SOURCES): Add vars.c and vars.h. * src/argv.c (list): Handle --list=variables. * src/heroes.c (main): Un/initialize variables. * src/persona.c (init_persiona): define sgid/suid/suid-or-sgid variables. 2001-04-25 Alexandre Duret-Lutz * tools/upgettext.sh: Fix function declarations, the `function' keyword is not portable. * tools/cvsboot.sh: Likewise. * tools/autogen.sh: Likewise. 2001-04-25 Alexandre Duret-Lutz * misc/01-intl.patch: New file. * misc/04-intl.patch: New file. * misc/04-m4.patch: New file. * misc/05-po.patch: New file. * Makefile.am (EXTRA_DIST): Add all the above files. * tools/upgettext.sh: Patch the gettext files using all the above patch, except 04-m4.patch (already applied). * tools/Makefile.am (EXTRA_DIST): Add upgettext.sh. 2001-04-24 Alexandre Duret-Lutz * gettext.m4: Check for getegid(). 2001-04-24 Alexandre Duret-Lutz Drop the fetish copy of gettext and switch to gettext-0.10.37, released a few days ago. The main reason for the change is that the change needed to run the old gettext on MinGW are already present in 0.10.37. * m4/lcmessage.m4: Update to gettext-0.10.37. * m4/progtest.m4: Likewise. * tools/cvsboot.sh: Run tools.upgettext.sh. * tools/fetish-sync.sh: Remove the gettext files, we are now using stock gettext. * ABOUT-NLS: Delete, installed by gettextize. * intl/ChangeLog: Likewise. * intl/Makefile.in: Likewise. * intl/VERSION: Likewise. * intl/bindtextdom.c: Likewise. * intl/cat-compat.c: Likewise. * intl/dcgettext.c: Likewise. * intl/dgettext.c: Likewise. * intl/explodename.c: Likewise. * intl/finddomain.c: Likewise. * intl/gettext.c: Likewise. * intl/gettext.h: Likewise. * intl/gettextP.h: Likewise. * intl/hash-string.h: Likewise. * intl/intl-compat.c: Likewise. * intl/l10nflist.c: Likewise. * intl/libgettext.h: Likewise. * intl/linux-msg.sed: Likewise. * intl/loadinfo.h: Likewise. * intl/loadmsgcat.c: Likewise. * intl/localealias.c: Likewise. * intl/po2tbl.sed.in: Likewise. * intl/textdomain.c: Likewise. * intl/xopen-msg.sed: Likewise. * po/Makefile.in.in: Likewise. * m4/libintl.m4: Delete, gettext use gettext.m4. * m4/codeset.m4: New file, from gettext-0.10.37. * m4/gettext.m4: Likewise. * m4/iconv.m4: Likewise. * m4/isc-posix.m4: Likewise. * tools/upgettext.m4: New file. * HACKING: Reflect changes. 2001-04-21 Alexandre Duret-Lutz * configure.in: Bump version number to 0.9a. * Makefile.am (null_AM_MAKEFLAGS): Set AUTOGEN to false. * src/Makefile.am (heroes_SOURCES): Add debugchn.def, debugchn.tpl, prefs.def and prefs.tpl. * lib/Makefile.am (noinst_HEADERS): Typo. * doc/Makefile.am (CLEANFILES): New. * src/system.h: Don't declare keycode_t as u32_t. * doc/heroes.texi (Machines): Add BeOS. Reported by Todd Allendorf . 2001-04-21 Alexandre Duret-Lutz * m4/checkpkg.m4: Prepend new libraries, instead of appending them. * m4/ftruncate.m4: Check for chsize and define HAVE_CHSIZE, always link ftruncate.o if ftruncate() is missing. * lib/fopenlock.c (fopenlock): Don't lock the file if fcntl locking is not available. * NEWS: Prepare for 0.9a. * arch/mingw32/cross.sh (BUILDNAME): s/i386/i586/ to follow Debian change. * HACKING: Needs autogen. 2001-04-17 Alexandre Duret-Lutz * src/persona.c (user_persona, sys_persona): Typo. * src/display.c (get_directbuffers): Argument v is not a pointer. * src/joystick.c (joystick): Not a pointer. 2001-04-16 Alexandre Duret-Lutz * src/prefs.tpl (load_preferences): Free buf. 2001-04-15 Alexandre Duret-Lutz * lib/basename.c: New file. * lib/basename.h: New file. * lib/Makefile.am (noinst_HEADERS): Add basename.h. (libheroes_a_SOURCES): Add basename.c. * tools/fetish-sync: Add basename.c. * HACKING: Likewise. * src/debugmsg.c (dmsg_init): Basename-ify the program name. 2001-04-15 Alexandre Duret-Lutz Ahem... output debug messages on stdout, as said in HACKING. * src/debugmsg.c (dmsg): s/stderr/stdout/. 2001-04-15 Alexandre Duret-Lutz * lib/isdir.c: New file. * lib/isdir.h: New file. * lib/Makefile.am (noinst_HEADERS): Add isdir.h. (libheroes_a_SOURCES): Add isdir.c. * tools/fetish-sync.sh: Add lib/isdir.c * HACKING: Add lib/isdir.c. * src/relocate.c (check_installation): New. (relocate_data): Call check_installation. 2001-04-10 Alexandre Duret-Lutz Compute make $(data-dir) and $(locale-dir) relative to $(prefix), and handle HEROES_PREFIX to override $(prefix). The next step is to compute/guess HEROES_PREFIX. * src/relocate.c: New file. * src/relocate.h: New file. * doc/heroes.texi (Example): Document HEROES_PREFIX. * m4/h-paths.m4: New file. * configure.in: Asjust to use heroes_COMPUTE_PATHS. * src/Makefile.am (localedir, DEFS): Remove. (heroes_SOURCES): Add relocate.c and relocate.h. * src/heroes.c: Adjust to call relocate_data. * src/resc_files.gperf (data-dir): Use FORWARD_RELATIVE_PKGDATADIR. (locale-dir): Use FORWARD_RELATIVE_LOCALEDIR. (prefix): New. 2001-04-18 Alexandre Duret-Lutz Merge with autogen-pending-BRANCH, I thought I would wait until Autogen 5.1.5 is released, but I give up (most of my upcomming patches would introduce conflicts in one branch or the other. There is a prerelease of autogen available here: ftp://autogen.sourceforge.net/pub/autogen/ Version 5.1.4d is a minimum. |2001-03-21 Alexandre Duret-Lutz | | * src/prefs.tpl: Use the ".name" notation to designate | locale variables in AutoGen >= 5.1.5 (not yet released). | |2001-03-18 Alexandre Duret-Lutz | | Basic protection against people that don't have AutoGen. | | * configure.in: Define AUTOGEN using AM_MISSING_PROG, fix | other AM_MISSING_PROG uses. | * doc/Makefile.am: Use $(AUTOGEN). | * src/Makefile.am: Likewise. | |2001-03-18 Alexandre Duret-Lutz | | * HACKING (Auto-generated files): Add src/prefs.c and src/prefs.h. | |2001-03-18 Alexandre Duret-Lutz | | * doc/heroes.texi (Heroes options): Document --list=preferences. | * src/argv.c (showprefs): New variable. | (list): Handle --list=preferences. Return a boolean | to indicate whether the action is finished or has been delayed. | (parse_argv): Adapt to follow this latter convention. | * src/argv.h (showprefs): New variable. | * src/heroes.c (main): Output the preferences if requested. | |2001-03-18 Alexandre Duret-Lutz | | Save preferences in text form. Generate the i/o code | automatically from a description of the preferences. | | * src/options.c: Delete. | * src/options.h: Delete. | * src/prefs.def: New file. | * src/prefs.tpl: New file. | * src/Makefile.am (heroes_SOURCES): Remove options.c and options.h, | add prefs.c and prefs.h. | (BUILT_SOURCES): Add prefs.c and prefs.h. | (prefs.h, prefs.c): New files. | * src/const.c: Include prefs.h instead of options.h. | * src/menus.c: Likewise. | * src/render.c: Likewise. | * src/scrtools.c: Likewise. | * src/sfx.c: Likewise. | * src/sound.c: Likewise. | * src/heroes.c: Likewise, also transform call to write_options, | reinit_options, load_options, and free_options to their new names: | save_preferences, reinit_preferences, load_preferences, | free_preferences. | * src/rsc_files.gperf: Remove options-file, add pref-file. | * src/system.h (PREF_INPUT_GROUP): New macro. | |2001-03-11 Alexandre Duret-Lutz | | Centralize the definition of debug channels into src/debugchn.def. | Use AutoGen the generate the hash table, the channel enumeration, | and the documentation. | | * doc/Makefile.am (heroes_TEXINFOS): New. | (MAINTAINERCLEANFILES): New. | (debugchn.texi): New. | * doc/heroes.texi (Environment variables): Remove the debug channels | table, include debugchn.texi instead. | * src/Makefile.am (heroes_SOURCES): Add debugchn.h. | (BUILT_SOURCES): Add debugchn.h and debughash.gperf. | (debughash.gperf, debugchn.h): New. | * src/debughash.gperf: Remove from CVS (now generated). | * src/debugmsg.h: Don't declare the channels, include debugchn.h | instead. | * src/debugchn.def: New file. | * src/debugchn.tpl: New file. | 2001-04-18 Alexandre Duret-Lutz * THANKS: Update Jos Boersema's email, the old bounced and I just came across this new one in the archive for the bug-texinfo mailing list. 2001-04-17 Alexandre Duret-Lutz * src/menus.c (enter_your_name): Work directly with keycodes to not misinterpret extended keys (sush as shift keys) as standard characters. Reported by Janos Holanyi . 2001-04-07 Alexandre Duret-Lutz * m4/getoptlong.m4: Update for submission to the Autoconf macro archive. 2001-04-01 Alexandre Duret-Lutz * m4/normpath.m4: New file. * m4/relpaths.m4: New file. * m4/stdrelpaths.m4: New file. 2001-03-29 Alexandre Duret-Lutz * configure.in: Check for uid_t, gid_t, getegid, setegid, and setregid. * src/persona.c: Use setregid and setreuid when setegid and seteuid are not found. * src/system.h (seteuid, setegid, setreuid, setreguid, geteuid, getuid, getegid, getgid): New replacement macros. 2001-03-26 Alexandre Duret-Lutz Keep track of secure (trusted) resources, and only change personna when handling such resources. * src/rsc_files_hash.h: Add a secure attribute. * src/rsc_files.gperf: Supply `true' for all secure attributes. * src/Makefile.am (rsc_files_hash.c): Adjust to initialize the secure member of empty hash entries to false. * src/userconf.c: Take a secure argument. * src/usercong.h: Adjust accordingly. * src/rsc_files.c (set_rsc_file): Take a secure argument. (rsc_expand, get_rsc_file, get_non_null_rsc_file): Rename to ... (rsc_expand_secure, get_rsc_file_secure, get_non_null_rsc_file_secure): ... these, and take a secure argument. (rsc_expand, get_rsc_file, get_non_null_rsc_file): New function, written using the above. * src/rsc_files.h: Adjust accordingly. * src/heroes.c (main): Adjust set_rsc_file, and read_userconf calls. * src/persona.c (sys_persona_if_needed): Make sure we handle secure resources. * doc/heroes.texi (Global score file): Update accordingly. Bug fix: persona_fopenlock already takes care of switching persona if needed. * src/scores.c (load_scores_and_keep_locked): Don't call sys_persona. 2001-03-20 Alexandre Duret-Lutz Support for relocatable locales. * src/heroes.c (main): Check for HEROES_LOCALE_DIR or HEROES_LOCALEDIR and set the locale-dir resource accodingly. Use this resource to initialize the locales. * src/rsc_files.gperf (locale-dir): New entry. * src/Makefile.am (rsc_files_hash.c): Adapt key indexes. * doc/heroes.texi (Environment variables): Document HEROES_LOCAL_DIR, and note the --list=resources can be used to check the value of data-dir and locale-dir. 2001-03-25 Alexandre Duret-Lutz Support for set-group-id and set-user-id access to a global score/savedgames file. * src/persona.c: New file. * src/persona.h: New file. * src/Makefile.am (heroes_SOURCES): Add persona.c and persona.h. * src/heroes.c (main): Call init_persona. * src/rsc_files.gperf (sys-dir): New. * src/savegame.c (write_save_records, load_save_records_open, load_scores_and_keep_locked): Adapt to use persona_fopenlock. And don't output the data unless the file has been succesfully opened. * src/scores.c (write_scores, load_scores_open, load_scores_and_keep_locked): Likewise. * doc/heroes.texi (Sharing a global score file): Document more. * src/etc/heroesrc: Adapt to new resources names. 2001-03-25 Alexandre Duret-Lutz Truncate scores and saved-games files, before writing to them. * lib/ftruncate.c: New file (from fileutils-4.0.39). * m4/ftruncate.m4: Likewise. * lib/Makefile.am (EXTRA_DIST): Add ftruncate.c. * tools/fetish-sync.sh (files): Add lib/ftruncate.c and m4/ftruncate.m4. * HACKING: Likewise. * configure.in: Call jm_FUNC_FTRUNCATE. * src/savegame.c (write_save_records): Truncate the file. * src/scores.c (write_scores): Likewise. 2001-03-25 Alexandre Duret-Lutz Replace game magics by game IDs, which serve the same purpose but are 128bits values. See comments in src/gameid.h. * src/gameid.h: New file. * src/gameid.c: New file. * src/Makefile.am (heroes_SOURCES): Add gameid.c and gameid.h. * src/const.c (game_magic): Replace by ... (game_id): ... this new variable. * src/const.h: Likewise. * src/heroes.c (play_menu, play_game): Adapt to use game IDs. * src/menus.c (draw_saved_games_info): Likewise. * src/savegame.c (clear_save_records, write_save_records, load_save_records_read): Likewise. (load_save_records_error): New function. (compute_magic, set_magic, find_magic): Remove. * src/savegame.h: Adjust. * src/scores.c (find_score_by_gameid): New function. (clear_scores, write_scores, load_scores_read): Adapt to yse game IDs. (load_scores_error): New function. * src/scores.h: Adjust. 2001-03-24 Alexandre Duret-Lutz * src/savegame.h: Copyright 2001. * src/savegame.c: Likewise. (load_save_records_read): Skip the initial space in the name. * src/score.c (load_scores_read): Likewise. (clear_scores): Don't set unused attributes. * src/score.h (top_score): Remove unused attributes. 2001-03-24 Alexandre Duret-Lutz Save the games as text. * src/rsc_files.gperf (games-file): Remove. (saved-games-file): New. * src/savegame.c (saves_file): Rename as ... (saved_games_file): ... this. Adjust all calls. (check_save_records, bswap_save_records): Remove. (write_save_records, load_save_records_read): Write and read the saved games as text. (load_save_records, load_save_records_and_keep_locked): Adjust to open the saved games file as text file. Create the file if needed. * src/savegame.h (saved_game): Declare used as bool. 2001-03-24 Alexandre Duret-Lutz Save the scores as text. * src/misc.c (chomp): New function. * src/misc.h (chomp): New function. * src/rsc_files.gperf (scores-file): Remove. (score-file): New. * src/scores.c (scores_file): Rename as ... (score_file): ... this. Adjust all calls. (check_scores, bswap_scores): Remove. (write_scores, load_scores_read): Write and read the scores as text. (load_scores, load_scores_and_keep_locked): Adjust to open the score as text file. Create the file if needed. 2001-03-24 Alexandre Duret-Lutz Adapt score and save records loading/saving to locking. Not perfect yet. * src/heroes.c (play_menu): Adapt to use load_scores_and_keep_locked. (play_game): Adapt to use load_save_records_and_keep_locked. (main): Don't load scores and save records, but save them right after clearing them if it was requested. * src/menus.c (scores_menu): Load scores to be up to date. * src/savegame.c (compute_magic): Likewise. (load_save_records): Move the x10sav cheat to ... (clear_save_records): ... here. (load_save_records): Split into ... (load_save_records_open, load_save_records_read): ... these new functions. (load_save_records_and_keep_locked): New function. (write_save_records): Adjust. * src/struct.h (save_game): Move ... * src/savegame.h (save_game): ... here. (load_save_records_and_keep_locked): New function. * src/scores.c (load_scores): Split into ... (load_scores_open, load_scores_read): ... these new functions. (load_scores_and_keep_locked): New function. (write_scores): Adjust. * src/struct.h (top_scores): Move ... * src/scores.h (top_scores): ... here. (load_scores_and_keep_locked): New function. 2001-03-23 Alexandre Duret-Lutz Introduce file locking support (as well as portability issues, I guess...). * lib/fopenlock.c: New file. * lib/fopenlock.h: New file. * lib/Makefile.am (noinst_HEADERS): Add fopenlock.h. (libheroes_a_SOURCES): Add fopenlock.c. * m4/fopenlock.m4: New file. * m4/Makefile.am (EXTRA_DIST): Add fopenlock.m4. * configure.in: Use adl_FUNC_FOPENLOCK. 2001-03-20 Alexandre Duret-Lutz * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2. 2001-03-16 Alexandre Duret-Lutz * src/system.h (KEYCODE_MAX): New macro. 2001-03-12 Alexandre Duret-Lutz * src/options.h (extrasel): Move ... * src/menus.h (extrasel): ... here. * src/options.c (extrasel): Move ... * src/menus.c (extrasel): ... here. 2001-03-19 Alexandre Duret-Lutz From Hermann J. Beckers . * po/de.po: New version. 2001-03-14 Alexandre Duret-Lutz From Hermann J. Beckers . * po/de.po: New version. 2001-03-10 Alexandre Duret-Lutz * HACKING (Console output): New section. 2001-03-10 Alexandre Duret-Lutz From Hermann J. Beckers . * po/de.po: New version. 2001-03-09 Alexandre Duret-Lutz German translations. From Hermann J. Beckers . * configure.in (ALL_LINGUAS): Add `de'. * po/de.po: New file. * THANKS: Add Hermann. * doc/heroes.texi: Likewise. 2001-02-28 Alexandre Duret-Lutz * m4/mkdir.m4: Update for submission to the Autoconf macro archive. 2001-02-24 Alexandre Duret-Lutz * configure.in: Bump to version 0.9. * NEWS: Update for 0.9. * doc/heroes.texi (configure options): Make the --enable-debug recommendation clearer. 2001-02-23 Alexandre Duret-Lutz * src/helptext.c (help_text3): Remove a doubled `the'. Reported by Jos Boersema . * po/nl.po: Update accordingly. * po/fr.po: Update accordingly, mark as `0.9 compliant'. 2001-02-22 Alexandre Duret-Lutz * arch/mingw32/cross.sh (cross_pack): Work around a strange behavior of zip, rooting the archive on `/heroes/' instead of `heroes/'. Reported by Jean. 2001-02-22 Alexandre Duret-Lutz * arch/mingw32/cross.sh (cross_install): zip the changelog, instead of gzip'ing it. Suggested by Jean. (cross_pack): Typo. * arch/ming32/dest-readme-txt: Add more text, suggest -F, give the bug-report address. * arch/ming32/dest-readme-lib: Update to newer libs. 2001-02-22 Alexandre Duret-Lutz * doc/heroes.texi (Machines): Describe the Win32/VisualC files as obsolete. 2001-02-22 Alexandre Duret-Lutz From Jean Delvare . * HACKING: Typo. * ChangeLog: Likewise. * src/menus.c (init_menus_sprites): Likewise. 2001-02-21 Alexandre Duret-Lutz * BUGS: Sync up with the recent bug reports from the lists. 2001-02-20 Alexandre Duret-Lutz * Makefile.am (distcheck-hook): Add my-distcheck-nodisplay. (my-distcheck-nodisplay): New target. * HACKING: Update accordingly (distcheck now makes four builds). 2001-02-19 Alexandre Duret-Lutz * configure.in: Bump to version 0.8f. * NEWS: Update for 0.8f. * src/Makefile.am: Copyright 2001. * src/keysdef.c: Likewise. * Makefile.am: Likewise. * po/fr.po: Update. * po/nl.po: Update. 2001-02-19 Alexandre Duret-Lutz * src/menus.c (keyboard_menu): Regenerate keyname sprites for conflicting keys. Reported by Jean Delvare . 2001-02-19 Alexandre Duret-Lutz Make sure no sticky bits go into the distribution. Reported by Jean Delvare . * Makefile.am (dist-hook): New. 2001-02-19 Alexandre Duret-Lutz From Jean Delvare . * NEWS: s/two players game/two player game/. * doc/heroes.texi: Likewise. 2001-02-19 Alexandre Duret-Lutz * src/argv.c (version): Set copyright year to 2001. Reported by Jean Delvare . 2001-02-19 Alexandre Duret-Lutz Make sure the manual pages are up-to-date before releasing. Reported by Jean Delvare . * man/Makefile.am (man-distcheck): New target. * Makefile.am (man-distcheck): New target. (distcheck-hook): Depend upon man-distcheck. 2001-02-18 Alexandre Duret-Lutz Support for --disable-display. * doc/heroes.texi (configure options): Document --disable-display. * m4/h-ggi.m4 (heroes_CHECK_GGI_POST): New. * m4/h-display.m4: Handle --disable-display. Call heroes_CHECK_GGI_POST. * m4/h-sound.m4: sound_lib default to . * src/Makefile.am (CLEANFILES): Remove keysdef-inc.h. (DISTCLEANFILES): Add keysdef-inc.h. (keysdef-inc.h): Don't depend upon $(CONFIG_HEADER); create keysdef-inc.h when neither GGI nor SDL are used. * src/display.h [!HAVE_LIBSDL && !HAVE_LIBGGI] (set_display_params, set_full_screen_mode, init_video, uninit_video, set_color, vsynchro, vsynchro2, set_pal): Define new empty macros. * src/keyb.c [!HAVE_LIBSDL && !HAVE_LIBGGI] (update_mouse_state): Define new empty macro. (uninit_keyboard_map): Define only once. * src/keyb.h [!HAVE_LIBSDL && !HAVE_LIBGGI] (process_input_events, get_key, key_ready, init_mouse, mouse_show, mouse_hide): Define new empty macros. * src/keys_heroes.h [!HAVE_LIBSDL && !HAVE_LIBGGI]: Define keys. * src/keysdef.c: Suppress RCS Id. * src/system.h [!HAVE_LIBSDL && !HAVE_LIBGGI] (keycode_t): Define. 2001-02-17 Alexandre Duret-Lutz * NEWS: s/Dutsh/Dutch/ * ANNOUNCE: Prepare for 0.9. * TODO: Likewise. 2001-02-16 Alexandre Duret-Lutz Heroes binaries to compiled with gcc 2.7.* failed pack struct correctly. * src/system.h: Undefine __attribute__ after xalloc.h inclusion. This is needed because we want to use __attribute__ ((packed)) on gcc 2.7.* while xalloc.h inhibit it for gcc <= 2.8. 2001-02-14 Alexandre Duret-Lutz From Jean Delvare. Spelling mistakes. * src/heroes.c (play_game): s/chose/choose/. * src/sprglenz.h: Likewise. * src/menus.c (init_menus_sprites): Likewise. s/TWO PLAYER/TWO PLAYERS/. 2001-02-13 Alexandre Duret-Lutz * configure.in: Bump to 0.8e. * NEWS: Update for 0.8e. * po/fr.po: Update. 2001-02-13 Alexandre Duret-Lutz * src/const.c (tunnel_square_io): Move to ... * src/heroes.c (tunnel_square_io): ... here. * src/const.c (radar_trail_color, radar_wall_color): Move to ... * src/render.c (radar_trail_color, radar_wall_color): ... here. * src/const.c (mode_names): Move to ... * src/menus.c (mode_names): ... here. * src/const.h (tunnel_square_io, radar_trail_color, radar_wall_color, mode_names): Remove. 2001-02-13 Alexandre Duret-Lutz * TODO: Update. 2001-02-13 Alexandre Duret-Lutz * src/display.c [HAVE_LIBGGI] (setup_WWWxHHHxB_display): Ask for GT_8BIT if possible. 2001-02-13 Alexandre Duret-Lutz * lib/xmalloc.c: Update from fileutils-4.0.39. 2001-02-13 Alexandre Duret-Lutz * src/display.c (set_color, set_pal): Don't set palette on visu if it is not palletized. 2001-02-13 Alexandre Duret-Lutz Revert an error I did when adapting Jean's patch. * src/menus.c (keyboard_menu): Don't strip keyname which are 7 letter wide, only thos which are longer. 2001-02-12 Alexandre Duret-Lutz Adapted from Jean Delvare . * src/menus.c (keyboard_menu): Strip wide keynames to 6 letters. 2001-02-12 Alexandre Duret-Lutz From Jos Boersema . * po/nl.po: Update. 2001-02-11 Alexandre Duret-Lutz * src/scrtools.c (set_pal_with_luminance): Perform gamma correction, use set_pal rather than set_palette. * src/options.c (reinit_options): Use 6 as default luminance value. * src/menu.c (screen_menu): Use 13 steps for the luminance option. 2001-02-11 Alexandre Duret-Lutz Important revamp of the LibGGI display driver to not use the `render_visu' intermediate buffer when crossblitting is unneeded, perform double buffering and locking. * src/display.c (screen_rv): Move to ... [HAVE_LIBSDL] (screen_rv): ... here. [HAVE_LIBGGI] (db, current_frame): New variables. [HAVE_LIBGGI] (setup_320x200x8_display, setup_320x200xB_display, setup_WWWxHHHxB_display, get_directbuffers): New functions. [HAVE_LIBGGI] (init_video): Revise, using the above functions. [HAVE_LIBGGI] (set_color, set_pal): Don't set paletter on render_visu when render_visu == NULL. [HAVE_LIBGGI] (vsynchro): Rewrite as a call to vsynchro2. [HAVE_LIBGGI] (vsynchro2): Revise to perform double buffering, locking, and write to visu or render_visu. 2001-02-08 Alexandre Duret-Lutz From Jos Boersema . * po/nl.po: Update. 2001-02-07 Alexandre Duret-Lutz * NEWS: Update for 0.8d. 2001-02-06 Alexandre Duret-Lutz * doc/heroes.texi (configure options): Say that --enable-debug will check the translated message. * HACKING: Add a section `Translating message catalogs'. 2001-02-06 Alexandre Duret-Lutz * src/sprtext.c (compile_sprtext, compile_sprtext_color): Don't compile undrawable letters. 2001-02-06 Alexandre Duret-Lutz * po/fr.po: Update for 0.8d. * po/nl.po: Merge. 2001-02-06 Alexandre Duret-Lutz * src/argv.c: Add comments for translators. * src/const.c: Likewise. * src/display.c: Likewise. * src/menus.c: Likewise. * src/readmake.c: Likewise. 2001-02-06 Alexandre Duret-Lutz Report unprintable messages before crashing... * src/system.h (XCALLOC_ARRAY): New. * src/fontdata.c (initialize_menu_font, initialize_deck_font, initialize_bonus_font, initialize_help_font): Use XCALLOC_VAR instead of XMALLOC_VAR and memset. This actually suppress a mistake because memset was called mistakenly. [DEBUG] (check_message_is_drawable): New function. * src/fontdata.h (check_message_is_drawable): New. * src/sprtext.c (compile_sprtext, compile_sprtext_color): Call check_message_is_drawable. 2001-02-05 Alexandre Duret-Lutz Dutch translation from Jos Boersema . * po/nl.po: New file. * configure.in (ALL_LINGAS): Add nl. * doc/heroes.texi (Contributors): Add Jos Boersema. * THANKS: Likewise. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c (affplan, afftests): Rename as ... (draw_level_map, draw_collide_tests): ... these. (planfull): Rename as ... (display_level_map_fullscreen): ... this. (joueanim): Rename as ... (display_level_map_animated): ... this. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c (partiel4c, carre, framept): Rename as ... (copy_tile_pcx, draw_check_point, frame_dashed): ... these. (affgt, majg, majd): Rename as ... (draw_left_panel, update_left_panel, update_middle_panel): ... these. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c (partiel4, partiel2): Rename both as ... (rectangle_copy): ... this. Adjust all calls. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c (fatalog): Remove. (hmain): Replace calls to fatalog by calls to emsg, gettextize the messages. 2001-02-04 Alexandre Duret-Lutz * src/hedlite.c: Cosmetic changes, comment removal. * src/structs.h (type_name, spd_test, dir_test): Move to ... * src/hedlite.c (type_name, spd_test, dir_test): ... here. 2001-02-02 Alexandre Duret-Lutz * configure.in: Bump to 0.8d. 2001-02-01 Alexandre Duret-Lutz * configure.in: Bump to 0.8c. * NEWS: Update for 0.8c, plus a missing entry in 0.8a. * po/fr.po: Update. 2001-02-01 Alexandre Duret-Lutz * src/fader.c (cancel_fader): New function pulled out from run_fader. (run_fader): Use it. * src/fader.h (cancel_fader): New. * src/scrtools.c (set_palette): New function. (set_pal_with_luminance): Use it instead of set_pal. * src/menus.c (pause_menu, quit_yes_no): Likewise. * src/scrtools.h (set_palette): New. 2001-02-01 Alexandre Duret-Lutz Use the same animated background as in the "endscroll" in pase_menu and quit_yes_no, since it is no longer possible the shade the screen. * src/endscroll.c (background_img, render_background): Rename as ... (dummy_background_img, dummy_moving_background_render): ... this, and export. (copy_background): Adjust accordingly. (end_scroll): Split into ... (dummy_moving_background_init, dummy_backgournd_uninit, end_scroll): ... these. * src/endscroll.h (dummy_backgournd_img, dummy_moving_background_init, dummy_backgournd_uninit, dummy_moving_background_render): New. * src/menus.c (pause_menu, quit_yes_no): Use dummy_moving_background_render. 2001-01-31 Alexandre Duret-Lutz Remove obsolete code (that was already commented out). * src/hedlite.c (gestclav) [PORT]: Remove. * src/heroes.c (unload_level, main) [PORT]: Remove. 2001-01-31 Alexandre Duret-Lutz Handle the middle button if the level editor, fix some compiler warning as well as two bugs. * src/keyb.c (enable_mouse, mouse_pos_x, mouse_pos_y, mouse_button_left, mouse_button_right): Mark as static. (mouse3): New function. (mouse_button_middle): New variable. (mous12): Also test for mouse_button_middle. [HAVE_LIBGGI] (update_mouse_state): Update mouse_button_middle. [HAVE_LIBSDL] (handle_mouse_events): Likewise. * src/keyb.h (mouse3): New. * src/heroes.c (ia_eval_dir_bonus_inline): Add back missing call to ia_eval_dir_bonus, removed by mistake on 2000-11-14 (0.6d). (ia_eval_dir_bonus): Move variable around. * src/hedlite.c (hmain): Rename variable i as k, and move it in near the event loop. Enable the third mouse button. (framept): s/320/xbuf/ (bugfix). * src/menus.c (keyboard_menu): Supply initial value for t. (scores_menu): Supply initial value for rolldec. * src/sfx.c (read_sfx_conf): Don't test for fconf in error handling, it's not always set. * src/sprtext.c (compile_sprtext, compile_sprtext_color): Supply initial value for text_width. * doc/heroes.texi (editor-clicks): Document the middle button. 2001-01-31 Alexandre Duret-Lutz * HACKING: Strip down. 2001-01-31 Alexandre Duret-Lutz * doc/heroes.texi: s/Burrow/Burrows/. * THANKS: Likewise. 2001-01-30 Alexandre Duret-Lutz Missing copyright updates from previous patches. * doc/heroes.texi: Copyright 2001. * src/menus.c: Likewise. * src/render.h: Likewise. * src/scrtools.h: Likewise. 2001-01-30 Alexandre Duret-Lutz * src/helptext.c (help_text1): Point users at the arrow keys. Suggested by Daniel Burrows. 2001-01-30 Alexandre Duret-Lutz * src/display.c (screen): Remove variable. [HAVE_LIBGGI, HAVE_LIBSDL] (init_video, uninit_video): Don't handle screen anymore. * src/display.h (screen): Remove variable. * src/menus.c (pause_menu, quit_yes_no): Comment calls to backup_screen, they need a replacement. * src/scrtools.c (vsynch, backup_screen, aff_buffer): Remove functions. * src/scrtools.h (vsynch, backup_screen, aff_buffer): Likewise. 2001-01-30 Alexandre Duret-Lutz * src/render.c (display_buffer_moving): Remove. * src/render.c (display_buffer_moving): Remove. * src/scrtools.c (flush_display_moving): New function. * src/scrtools.h (flush_display_moving): New function. * src/heroes.c (play_game): Use flush_display_moving instead of display_buffer_moving. 2001-01-30 Alexandre Duret-Lutz * src/render.c (display_two_buffers_moving_and_clear, display_two_buffers_moving): Remove. * src/render.h (display_two_buffers_moving_and_clear, display_two_buffers_moving): Remove * src/scrtools.c (flush_display2_moving): New function. * src/scrtools.h (flush_display2_moving): New function. * src/heroes.c (play_demo, play_game): Use flush_display2_moving instead of display_two_buffers_moving_and_clear or display_two_buffers_moving. 2001-01-30 Alexandre Duret-Lutz * src/display.c (stretch_twofold, stretch_twofold_even, stretch_threefold, stretch_threefold_even, stretch_fourfold, stretch_fourfold_even, copy_screen_even, copy_screen, copy_display): Take destination and width as arguments. [HAVE_LIBSDL, HAVE_LIBGGI] (vsynchro): Adapt call to copy_display. [HAVE_LIBSDL, HAVE_LIBGGI] (vsynchro2): New function. * src/display.h (vsynchro2): Likewise. * src/render.c (display_buffer_tmp1): Remove. (display_two_buffer): Remove. * src/render.h (display_buffer_tmp1): Remove. (display_two_buffer): Remove. * src/srctools.c (flush_display2): New function. * src/srctools.h (flush_display2): New function. * src/heroes.c (play_demo, play_game): Replace calls to display_two_buffer with calls to flush_display2. 2001-01-29 Alexandre Duret-Lutz Get rid of `screen' in heroes.c and menus.c. * src/heroes.c (main_menu): Rewrite the two pixelize blocks using a local `pixbuf' buffer instead of using screen. * src/menus.c (enter_your_name): Likewise. 2001-01-29 Alexandre Duret-Lutz Get rid of `screen' in hedlite.c. * src/hedlite.c (hedit_buffer): New variable. (partiel4, partiel2, frame, framept, draw_text, transpac, affgt, affplan, majg, departfix, planfull, joueanim, gestclav): Use hedit_buffer instead of screen. (hmain): Likewise. Allocate and free hedit_buffer. 2001-01-29 Alexandre Duret-Lutz Get rid of `screen' in intro.c. * src/intro.c (antialias): Rewrite, assuming a xbuf-wide buffer, drawing only in the first 320 pixels of a line. Take the height as second argument, not a number of pixels. (intro_buffer): New variable. (copy_vehicle_1, copy_vehicle_2, compute_erase_data): Adapt to use intro_buffer instead of screen, flush_display instead of vsynch. (show_intro): Likewise. Adapt call to antialias. (play_intro): Allocate intro_buffer. 2001-01-21 Alexandre Duret-Lutz * m4/debug.m4: Default to -g, use -ggdb3 if enabled, and nothing if disabled. * doc/heroes.texi: Update the corresponding documentation. 2001-01-21 Alexandre Duret-Lutz * intl/ChangeLog: Update from fileutils-4.0.37. * intl/gettextP.h: Likewise. * lib/hash.c: Likewise. * po/Makefile.in.in: Likewise. 2001-01-20 Alexandre Duret-Lutz * configure.in: Call adl_WITH_MPATROL. * m4/memdebug.m4 (adl_WITH_MPATROL, adl_CHECK_MEMORY_USAGE, adl_CHECK_MPATROL_LIBS, adl_CHECK_MPATROL, adl_WITH_MPATROL): New. (adl_ENABLE_MEM_DEBUG): Call adl_CHECK_MPATROL too. (adl_CHECK_DMALLOC): Use AC_CHECK_HEADERS, not AC_CHECK_HEADER. * src/system.h [HAVE_MPATROL_H]: Include mpatrol.h. * doc/heroes.texi (configure options): Describle --with-mpatrol. 2001-01-16 Alexandre Duret-Lutz * doc/heroes.texi (Machines): Document the existence of arch/mingw32. 2001-01-16 Alexandre Duret-Lutz * src/mingw32/cross.sh: Set LIBS to libs needed to link staticaly. Don't set CC, it's detected. Output zip file is now $PACKAGE-$VERSION-XXX-ming32.zip. Adjust `cross.sh all' to halt after the first failure any subtarget. 2001-01-15 Alexandre Duret-Lutz Remove the (broken & undocumented) support for screenshots. * src/argv.c (snap): Remove. (long_options): Remove snap. * src/argv.h (snap): Remove. * src/heroes.c (write_rle, save_pcx): Remove. (get_input_direction): Remove call to save_pcx. 2001-01-15 Alexandre Duret-Lutz Flush the display directly wherever we can avoid to write in `screen'. There are still some places that use `screen' (intro, level-editor, two-player display) and need to be further worked. * src/display.c (stretch_twofold, stretch_twofold_even, stretch_threefold, stretch_threefold_even, stretch_fourfold, stretch_fourfold_even, copy_screen, copy_display): Qualify the source argument as const. [HAVE_LIBSDL,HAVE_LIBGGI] (vsynchro): Likewise. (erase_odd_line): Delete. (copy_screen_event): New. (copy_display): Use copy_screen_event instead of erase_odd_line. * src/display.h (vsynchro): Qualify the source argument as const. * src/scrtools.c (flush_display): New. (vsynch): Rewrite using flush_display. * src/scrtools.c (flush_display): New. * src/endscroll.c (end_scroll): Adapt to use flush_display. * src/heroes (play_menu, play_demo, main_menu, play_game): Likewise. * src/menus.c (display_menu, control_menu, keyboard_menu, sound_menu, screen_menu, game_menu, extra_menu, quit_menu, editor_selector, editor_menu, editor_first_menu, jukebox_draw, pause_menu, quit_yes_no, enter_your_name, scores_menu, help_menu): Likewise. 2001-01-14 Alexandre Duret-Lutz Make `screen' an xbuf*ybuf sized buffer, and adapt all code accordingly. Also prepare the display.c code to not always works from `screen' (the idea is that since the render buffers are also xbuf*ybuf we might avoid doing the copy to `screen' to save some time). * src/const.c (square_offset_320): Remove. * src/const.h (square_offset_320): Remove. (xbuf, ybuf, sbuf): Move to ... * src/display.h (xbuf, ybuf, sbuf): ... here. (vsynchro): Take the source as a parameter. * src/display.c (stretch_twofold, stretch_twofold_even, stretch_threefold, stretch_threefold_even, stretch_fourfold, stretch_fourfold_even, erase_odd_lines, copy_screen, copy_display): Arrange to take the source buffer as a parameter (for a future optimization), and consider the source as an xbuf wide buffer. [HAVE_LIBGGI, HAVE_LIBSDL] (init_video): Always allocate screen (this is only temporary). [HAVE_LIBSDL] (uninit_video): Always free screen. [HAVE_LIBGGI, HAVE_LIBSDL] (vsynchro): Take the source buffer as a new argument, and adjust the call to copy_display. * src/const.c (scdec320): Rename as ... (square_offser_320): ... this. (partiel4, copy_tile, copy_tile_transp, copy_square_transp, partiel2, frame, framept, draw_text, transpa, transpac, carre, affgt, majd, affplan, majg, departfix, planfull, joueanim, hmain): Adjust to consider screen as a xbuf-wide buffer, and supply new the source argument to vsynchro(). * src/heroes.c (play_menu): Adjust to consider screen as a xbuf-wide buffer * src/intro.c (img2vram): Remove. (copy_vehicle_1, copy_vehicle_2, compute_erase_data): Adjust to work in xbuf-wide buffers. (show_intro): Likewise. Use copy_image_to_scr_area instead of img2vram. * src/pixelize.c (pixelize_1, pixelize_2_inline, pixelize_4_inline, pixelize_8_inline, pixelize_16_inline, pixelize_16_inline_2, pixelize_32_inline, pixelize_32_inline_2, pixelize_32, pixelize_64_inline, pixelize_64_inline_2, pixelize_64): Ajust to output in xbuf-wide buffers. (pixelize): Cosmetic change. * src/render.c (display_buffer_tmp1, display_buffer_moving, display_two_ubffers, display_two_buffers_moving, display_two_buffers_moving_and_clear): Ajust to output in xbuf-wide buffers. * src/scrtools.c (vsynch): Supply the source argument to vsynchro. (backup_screen): Adjust to work from xbuf-wide buffer. (add_buffer): Adjust to output in a xbuf-wide buffer. * src/struct.h [__HEDIT__] (square_offset_320, square_offset, d2w, w2d): Remove. * src/visuals.c (flip_buffer): Cosmetic changes. 2001-01-12 Alexandre Duret-Lutz * src/timer.c (reset_htimer) [!HAVE_GETTIMEOFDAY]: Typo from 2000-12-31's patch. 2001-01-11 Alexandre Duret-Lutz mtrace() support. * configure.in: Call add_WITH_MTRACE. * doc/heroes.texi: Describe --with-mtrace. * m4/memdebug.m4 (adl_WITH_MTRACE,adl_CHECK_MTRACE): New. (adl_CHECK_MALLOC,adl_CHECK_EFENCE): Cleanup. (adl_ENABLE_MEMDEBUG): Call adl_CHECK_MTRACE. * src/heroes.c (main): Call mtrace(). * src/system.h: Include mcheck.h if needed. 2001-01-10 Alexandre Duret-Lutz * NEWS: Update for version 0.8b. * m4/README: State the h-* files are Heroes specific. 2001-01-10 Alexandre Duret-Lutz * po/fr.po: Update. 2001-01-10 Alexandre Duret-Lutz * HACKING: Update. 2001-01-10 Alexandre Duret-Lutz * m4/mkdir.m4: Use #if instead of #ifdef. * m4/memdebug.m4: Likewise. 2001-01-09 Alexandre Duret-Lutz Distribute the html documentation. Check that Heroes can build with SDL and GGI before making a distribution. * Makefile.am (distcheck-hook, null_AM_MAKEFLAGS, t, my-distcheck-ggi, my-distcheck-sdl): New. * doc/Makefile.am (CLEANFILE): Rename as ... (EXTRA_DIST): ... this, to ship heroes.html. * m4/h-obsolete.m4: Remove test for with-sdl_mixer. 2001-01-09 Alexandre Duret-Lutz * m4/h-sdl.m4: Rename HAVE_SDL into HAVE_LIBSDL. * src/display.c: Likewise. * src/keyb.c: Likewise. * src/keys_heroes.h: Likewise. * src/system.h: Likewise. Also adapt #ifdef/#ifndef usage to follow autoconf recommendation (i.e. using #if). 2001-01-09 Alexandre Duret-Lutz * src/menus.c (draw_play_menu): Move arrows closer to the screen border to give more space to translations. 2001-01-08 Alexandre Duret-Lutz Rename HAVE_PKG_GGI as HAVE_LIBGGI, HAVE_PKG_GII as HAVE_LIBGII, HAVE_PKG_SDK_MIXER as HAVE_LIBSDL_MIXER, originally all these six macros were definied. * m4/checkpkg.m4: Use AC_CHECK_LIB's third argument to prvent definition of HAVE_LIBxxx. Define HAVE_LIBxxx instead of HAVE_PKGxxx, and provide a template help string for config.h. * m4/h-ggi.m4: Suppress AH_TEMPLATE call. * m4/h-joystick.m4: Likewise. * m4/h-sdlmixer.m4: Likewise. * src/display.c: Rename macros as stated above. * src/joystick.c: Likewise. * src/keyb.c: Likewise. * src/keys_heroes.h: Likewise. * src/system.h: Likewise. 2001-01-06 Alexandre Duret-Lutz * doc/heroes.texi (configure options): Describe --enable-devel. s/disable-debug/enable-debug/ s/disable-optimization/disable-optimizations/ * m4/devel.m4: New file. * configure.in: Call adl_ENABLE_DEVEL. 2001-01-04 Alexandre Duret-Lutz * man/Makefile.am (heroes.6): Be more verbose in game description. * src/argv.c (print_help): Change game description. 2001-01-03 Alexandre Duret-Lutz * po/Makefile.in.in (update-po): Merge po-files in temporary files in the build directory, and update the source directory only when the merged catalog differs from the original. This fix the know `make distcheck' failure due to `make update-po' being called on a read-only tree. 2001-01-02 Alexandre Duret-Lutz * doc/heroes.texi (configure options): Update to recent changes. * m4/debug.m4: Default to no. 2001-01-01 Alexandre Duret-Lutz Add files needed to cross compile and build a package for mingw32. * arch/mingw32/cross.sh: New file. * arch/mingw32/dest-readme-lib: New file. * arch/mingw32/dest-readme-txt: New file. * arch/mingw32/dest-run-bat: New file. * arch/Makefile.am (EXTRA_DIST): Add mingw32{cross.sh,dest-readme-txt,dest-readme-lib,dest-run-bat}. 2001-01-01 Alexandre Duret-Lutz * configure.in: Bump to 0.8b. Copyright 2001. 2001-01-01 Alexandre Duret-Lutz * NEWS: Update for 0.8a. * TODO: Update. * tools/Makefile.am (EXTRA_DIST): Typo. 2000-XX-XX Older entries belong to ChangeLog.00.