diff --git a/Changes.txt b/Changes.txt index ca6f1dc288..dc25dbe729 100644 --- a/Changes.txt +++ b/Changes.txt @@ -1,57 +1,57 @@ REVISION HISTORY ================ -VERSION 3.3.2, September 2014 - -Bug Fixes: -- Restored letterboxed-by-design game mode (broken in 3.3.0 update-1). -- Fixed misinterpreted 320x200 resolution type when running very old games - (broken in 3.3.0 update-1). -- Fixed bug in script interpreter that could cause misinterpretation of value provided by plugin. -- Fixed "--setup" command line argument not working if it is not the first argument. -- Fixed WinSetup dialog not sized properly when larger fonts (DPI) option is used in - Windows display settings. - -Log additions: -- Write the game data version and the list of supported graphic modes to the log. +VERSION 3.3.3, December 2014 -Manual: -- Fixed Speech.VoiceMode example. - - -VERSION 3.3.0 hotfix-3, July 2014 +Features: +- "Number dialog options" game setting now let you choose between "Disable", "Keyboard shortcuts + only" and "Draw numbers and use keyboard shortcuts" instead of being just "on"/"off". +- The built-in shortcut for showing runtime information has been changed from "Ctrl + V" to + "Ctrl + Alt + V". Bug Fixes: -- Provided error handling for several exceptional cases on graphics mode initialization (program - should at least close normally, showing comprehensible error message). -- Fixed crash in legacy built-in inventory screen. -- Fixed screen size was incorrectly calculated in letterbox mode when the scrolling room is loaded - (this could cause some GUIs or Overlays refuse to take requested position, and also slightly - affected "box in/out" translation effect). +- Fixed audio-related crash on some Linux and Linux-derived systems caused by improper use of mutexes. +- Fixed division by zero and color value overflow cases in alpha blender. +- Fixed voice audio breaking playing on very rare occasions when clip format is OGG or MP3. + The fix is imperfect, and there's very short pause occuring at same point of playback. The voice + will continue playing though. +- Fixed character walking in hi-res games when the destination has negative Y coordinate. +- Fixed black borders not drawn in screen corners by Direct3D renderer. +- Corrected interpretation for games made with AGS 3.0 - 3.2 to let them assign empty loop + in SetObjectFrame(). +Engine log: +- Do not log out supported gfx modes twice if the secondary color depth is equal to primary one. -VERSION 3.3.0 update-1, May 2014 -Features: -- Reimplemented alternate display modes, now side-borders and top/bottom borders work properly for - all game resolutions. - - -VERSION 3.3.0 hotfix-2, April 2014 +VERSION 3.3.2, September 2014 Features: +- Reimplemented alternate display modes, now side-borders and top/bottom borders work properly for + all game and screen resolutions. - Added config option to run pre-3.1.0 lo-res games in hi-res mode. Bug Fixes: +- Fixed Editor crashing when user types "#define" in script. - Fixed error in game compilation after user moves item folders up or down in the project tree. - Fixed bug which could make Character.Transparency and Object.Transparency properties return slightly incorrect values. - Fixed bug that could let user to load corrupted savedgame, which in turn could cause more trouble. +- Provided error handling for several exceptional cases on graphics mode initialization (program + should at least close normally, showing comprehensible error message). +- Fixed crash in legacy built-in inventory screen. +- Fixed bug in script interpreter that could cause misinterpretation of value provided by plugin. +- Fixed "--setup" command line argument not working if it is not the first argument. +- Fixed WinSetup dialog not sized properly when larger fonts (DPI) option is used in + Windows display settings. +Log additions: +- Write the game data version and the list of supported graphic modes to the log. -VERSION 3.3.0 hotfix-1, March 2014 +Manual: +- Fixed Speech.VoiceMode example. -Bug Fixes: -- Fixed Editor crashing when user types "#define" in script. + +NOTE: VERSION 3.3.1 was cancelled and never released: the WIP build was renamed to 3.4.0. VERSION 3.3.0, February 2014: diff --git a/Common/ac/gamestructdefines.h b/Common/ac/gamestructdefines.h index b5c47afde3..e152a304dd 100644 --- a/Common/ac/gamestructdefines.h +++ b/Common/ac/gamestructdefines.h @@ -128,4 +128,12 @@ inline bool IsHiRes(GameResolutionType resolution) Size ResolutionTypeToSize(GameResolutionType resolution, bool letterbox = false); +// Automatic numbering of dialog options (OPT_DIALOGNUMBERED) +enum DialogOptionNumbering +{ + kDlgOptNoNumbering = -1, + kDlgOptKeysOnly = 0, // implicit key shortcuts + kDlgOptNumbering = 1 // draw option indices and use key shortcuts +}; + #endif // __AGS_CN_AC__GAMESTRUCTDEFINES_H diff --git a/Editor/AGS.Editor/DataFileWriter.cs b/Editor/AGS.Editor/DataFileWriter.cs index ea658fb57d..8305fd4d6e 100644 --- a/Editor/AGS.Editor/DataFileWriter.cs +++ b/Editor/AGS.Editor/DataFileWriter.cs @@ -405,7 +405,7 @@ private static void WriteGameSetupStructBase_Aligned(BinaryWriter writer, Game g options[NativeConstants.GameOptions.OPT_LEFTTORIGHTEVAL] = (game.Settings.LeftToRightPrecedence ? 1 : 0); options[NativeConstants.GameOptions.OPT_LETTERBOX] = (game.Settings.LetterboxMode ? 1 : 0); options[NativeConstants.GameOptions.OPT_MOUSEWHEEL] = (game.Settings.MouseWheelEnabled ? 1 : 0); - options[NativeConstants.GameOptions.OPT_DIALOGNUMBERED] = (game.Settings.NumberDialogOptions ? 1 : 0); + options[NativeConstants.GameOptions.OPT_DIALOGNUMBERED] = (int)game.Settings.NumberDialogOptions; options[NativeConstants.GameOptions.OPT_PIXPERFECT] = (game.Settings.PixelPerfect ? 1 : 0); options[NativeConstants.GameOptions.OPT_FADETYPE] = (int)game.Settings.RoomTransition; options[NativeConstants.GameOptions.OPT_RUNGAMEDLGOPTS] = (game.Settings.RunGameLoopsWhileDialogOptionsDisplayed ? 1 : 0); diff --git a/Editor/AGS.Native/agsnative.cpp b/Editor/AGS.Native/agsnative.cpp index 1f73160e23..e255ac1e11 100644 --- a/Editor/AGS.Native/agsnative.cpp +++ b/Editor/AGS.Native/agsnative.cpp @@ -3780,7 +3780,7 @@ Game^ load_old_game_dta_file(const char *fileName) game->Settings->LetterboxMode = (thisgame.options[OPT_LETTERBOX] != 0); game->Settings->MaximumScore = thisgame.totalscore; game->Settings->MouseWheelEnabled = (thisgame.options[OPT_MOUSEWHEEL] != 0); - game->Settings->NumberDialogOptions = (thisgame.options[OPT_DIALOGNUMBERED] != 0); + game->Settings->NumberDialogOptions = (thisgame.options[OPT_DIALOGNUMBERED] != 0) ? DialogOptionsNumbering::Normal : DialogOptionsNumbering::KeyShortcutsOnly; game->Settings->PixelPerfect = (thisgame.options[OPT_PIXPERFECT] != 0); game->Settings->PlaySoundOnScore = thisgame.options[OPT_SCORESOUND]; game->Settings->Resolution = (GameResolutions)thisgame.GetDefaultResolution(); @@ -4894,7 +4894,7 @@ void save_game_to_dta_file(Game^ game, const char *fileName) thisgame.options[OPT_LETTERBOX] = game->Settings->LetterboxMode; thisgame.totalscore = game->Settings->MaximumScore; thisgame.options[OPT_MOUSEWHEEL] = game->Settings->MouseWheelEnabled; - thisgame.options[OPT_DIALOGNUMBERED] = game->Settings->NumberDialogOptions; + thisgame.options[OPT_DIALOGNUMBERED] = (int)game->Settings->NumberDialogOptions; thisgame.options[OPT_PIXPERFECT] = game->Settings->PixelPerfect; thisgame.options[OPT_SCORESOUND] = 0; // saved elsewhere now to make it 32-bit SetGameResolution(game); diff --git a/Editor/AGS.Types/AGS.Types.csproj b/Editor/AGS.Types/AGS.Types.csproj index b4ac2a1964..a8543b61b0 100644 --- a/Editor/AGS.Types/AGS.Types.csproj +++ b/Editor/AGS.Types/AGS.Types.csproj @@ -236,11 +236,13 @@ + + diff --git a/Editor/AGS.Types/Attributes/DeserializeConvertValueAttribute.cs b/Editor/AGS.Types/Attributes/DeserializeConvertValueAttribute.cs new file mode 100644 index 0000000000..be53365d74 --- /dev/null +++ b/Editor/AGS.Types/Attributes/DeserializeConvertValueAttribute.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace AGS.Types +{ + /// + /// Defines a conversion for particular values of the property type. + /// + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Delegate, + AllowMultiple = true)] + public class DeserializeConvertValueAttribute : Attribute + { + public DeserializeConvertValueAttribute(string convertFrom, string convertTo) + : base() + { + this.ConvertFrom = convertFrom; + this.ConvertTo = convertTo; + } + + public string ConvertFrom { get; private set; } + public string ConvertTo { get; private set; } + + public string Convert(string value) + { + return (ConvertFrom == value) ? ConvertTo : value; + } + } +} diff --git a/Editor/AGS.Types/Enums/DialogOptionsNumbering.cs b/Editor/AGS.Types/Enums/DialogOptionsNumbering.cs new file mode 100644 index 0000000000..b09d35df11 --- /dev/null +++ b/Editor/AGS.Types/Enums/DialogOptionsNumbering.cs @@ -0,0 +1,18 @@ +using System; +using System.ComponentModel; +using System.Text; + +namespace AGS.Types +{ + [DeserializeConvertValue("False", "KeyShortcutsOnly")] + [DeserializeConvertValue("True", "Normal")] + public enum DialogOptionsNumbering + { + [Description("Disable")] + None = -1, + [Description("Keyboard shortcuts only")] + KeyShortcutsOnly = 0, + [Description("Draw numbers and use keyboard shortcuts")] + Normal = 1, + } +} diff --git a/Editor/AGS.Types/SerializeUtils.cs b/Editor/AGS.Types/SerializeUtils.cs index fabf5e56f6..2d9acb853f 100644 --- a/Editor/AGS.Types/SerializeUtils.cs +++ b/Editor/AGS.Types/SerializeUtils.cs @@ -154,7 +154,19 @@ public static void DeserializeFromXML(object obj, XmlNode node) } continue; } - else if (!prop.CanWrite) + + // Process any existing value conversions; this helps to upgrade game from older version + DeserializeConvertValueAttribute[] conversions = + (DeserializeConvertValueAttribute[])prop.PropertyType.GetCustomAttributes(typeof(DeserializeConvertValueAttribute), true); + if (conversions.Length > 0) + { + foreach (DeserializeConvertValueAttribute conversion in conversions) + { + elementValue = conversion.Convert(elementValue); + } + } + + if (!prop.CanWrite) { // do nothing, read-only } diff --git a/Editor/AGS.Types/Settings.cs b/Editor/AGS.Types/Settings.cs index 6e110daa00..0b9ef4e4ce 100644 --- a/Editor/AGS.Types/Settings.cs +++ b/Editor/AGS.Types/Settings.cs @@ -63,7 +63,7 @@ public Settings() private SpeechStyle _speechStyle = SpeechStyle.Lucasarts; private int _globalSpeechAnimationDelay = 5; private bool _useGlobalSpeechAnimationDelay = false; - private bool _numberDialogOptions = false; + private DialogOptionsNumbering _numberDialogOptions = DialogOptionsNumbering.KeyShortcutsOnly; private bool _dialogOptionsBackwards = false; private SpeechPortraitSide _speechPortraitSide = SpeechPortraitSide.Left; private int _textWindowGUI = 0; @@ -676,9 +676,10 @@ public bool LegacySpeechAnimationSpeed [DisplayName("Number dialog options")] [Description("Dialog options become numbered bullet points, and the numeric keys can be used to select them")] - [DefaultValue(false)] + [DefaultValue(DialogOptionsNumbering.None)] [Category("Dialog")] - public bool NumberDialogOptions + [TypeConverter(typeof(EnumTypeConverter))] + public DialogOptionsNumbering NumberDialogOptions { get { return _numberDialogOptions; } set { _numberDialogOptions = value; } diff --git a/Engine/ac/dialog.cpp b/Engine/ac/dialog.cpp index 4f7e564ded..69c669f894 100644 --- a/Engine/ac/dialog.cpp +++ b/Engine/ac/dialog.cpp @@ -367,7 +367,7 @@ int write_dialog_options(Bitmap *ds, bool ds_has_alpha, int dlgxp, int curyp, in draw_gui_sprite_v330(ds, game.dialog_bullet, dlgxp, curyp, ds_has_alpha); } int cc; - if (game.options[OPT_DIALOGNUMBERED]) { + if (game.options[OPT_DIALOGNUMBERED] == kDlgOptNumbering) { char tempbfr[20]; int actualpicwid = 0; if (game.dialog_bullet > 0) @@ -506,7 +506,7 @@ void DialogOptions::Prepare(int _dlgnum, bool _runGameLoopsInBackground) bullet_wid = spritewidth[game.dialog_bullet]+3; // numbered options, leave space for the numbers - if (game.options[OPT_DIALOGNUMBERED]) + if (game.options[OPT_DIALOGNUMBERED] == kDlgOptNumbering) bullet_wid += wgettextwidth_compensate("9. ", usingfont); said_text = 0; @@ -910,7 +910,9 @@ bool DialogOptions::Run() run_function_on_non_blocking_thread(&runDialogOptionKeyPressHandlerFunc); } // Allow selection of options by keyboard shortcuts - else if ((gkey >= '1') && (gkey <= '9')) { + else if (game.options[OPT_DIALOGNUMBERED] >= kDlgOptKeysOnly && + gkey >= '1' && gkey <= '9') + { gkey -= '1'; if (gkey < numdisp) { chose = disporder[gkey]; diff --git a/Engine/ac/draw.cpp b/Engine/ac/draw.cpp index 041dcbf5da..ea2befd5d9 100644 --- a/Engine/ac/draw.cpp +++ b/Engine/ac/draw.cpp @@ -678,8 +678,8 @@ void render_black_borders(int atx, int aty) if (aty > 0) { // letterbox borders - blankImage->SetStretch(play.viewport.GetWidth(), aty); - gfxDriver->DrawSprite(0, -aty, blankImage); + blankImage->SetStretch(game.size.Width, aty); + gfxDriver->DrawSprite(-atx, -aty, blankImage); gfxDriver->DrawSprite(0, play.viewport.GetHeight(), blankImage); } if (atx > 0) diff --git a/Engine/ac/global_game.cpp b/Engine/ac/global_game.cpp index 03715caffd..979f67c202 100644 --- a/Engine/ac/global_game.cpp +++ b/Engine/ac/global_game.cpp @@ -605,7 +605,7 @@ int IsKeyPressed (int keycode) { #ifdef ALLEGRO_KEYBOARD_HANDLER if (keyboard_needs_poll()) poll_keyboard(); - if (keycode >= 300) { + if (keycode >= AGS_EXT_KEY_SHIFT) { // function keys are 12 lower in allegro 4 if ((keycode>=359) & (keycode<=368)) keycode-=12; // F11-F12 @@ -629,9 +629,9 @@ int IsKeyPressed (int keycode) { else if (keycode==372) keycode=345; else if (keycode==373) keycode=346; // insert - else if (keycode == AGS_KEYCODE_INSERT) keycode = KEY_INSERT + 300; + else if (keycode == AGS_KEYCODE_INSERT) keycode = KEY_INSERT + AGS_EXT_KEY_SHIFT; // delete - else if (keycode == AGS_KEYCODE_DELETE) keycode = KEY_DEL + 300; + else if (keycode == AGS_KEYCODE_DELETE) keycode = KEY_DEL + AGS_EXT_KEY_SHIFT; // deal with shift/ctrl/alt if (keycode == 403) keycode = KEY_LSHIFT; @@ -639,7 +639,7 @@ int IsKeyPressed (int keycode) { else if (keycode == 405) keycode = KEY_LCONTROL; else if (keycode == 406) keycode = KEY_RCONTROL; else if (keycode == 407) keycode = KEY_ALT; - else keycode -= 300; + else keycode -= AGS_EXT_KEY_SHIFT; if (rec_iskeypressed(keycode)) return 1; diff --git a/Engine/ac/keycode.h b/Engine/ac/keycode.h index 2a822da87f..e14df00ddf 100644 --- a/Engine/ac/keycode.h +++ b/Engine/ac/keycode.h @@ -24,6 +24,8 @@ #define EXTENDED_KEY_CODE 0 #endif +#define AGS_EXT_KEY_SHIFT 300 + #define AGS_KEYCODE_INSERT 382 #define AGS_KEYCODE_DELETE 383 #define AGS_KEYCODE_ALT_TAB 399 diff --git a/Engine/ac/path.cpp b/Engine/ac/path.cpp index 4f26c4f426..1fb1ce44bd 100644 --- a/Engine/ac/path.cpp +++ b/Engine/ac/path.cpp @@ -27,7 +27,7 @@ void convert_move_path_to_high_res(MoveList *ml) { short lowPart = (ml->pos[i] & 0x0000ffff) * current_screen_resolution_multiplier; short highPart = ((ml->pos[i] >> 16) & 0x0000ffff) * current_screen_resolution_multiplier; - ml->pos[i] = (highPart << 16) | lowPart; + ml->pos[i] = ((int)highPart << 16) | (lowPart & 0x0000ffff); ml->xpermove[i] *= current_screen_resolution_multiplier; ml->ypermove[i] *= current_screen_resolution_multiplier; diff --git a/Engine/ac/record.cpp b/Engine/ac/record.cpp index 09700978e2..2755eb8616 100644 --- a/Engine/ac/record.cpp +++ b/Engine/ac/record.cpp @@ -498,7 +498,7 @@ int my_readkey() { }*/ if ((gott & 0x00ff) == EXTENDED_KEY_CODE) { - gott = scancode + 300; + gott = scancode + AGS_EXT_KEY_SHIFT; // convert Allegro KEY_* numbers to scan codes // (for backwards compatibility we can't just use the diff --git a/Engine/gfx/blender.cpp b/Engine/gfx/blender.cpp index d10ca1f38d..8649388015 100644 --- a/Engine/gfx/blender.cpp +++ b/Engine/gfx/blender.cpp @@ -175,10 +175,6 @@ unsigned long _additive_alpha_copysrc_blender(unsigned long x, unsigned long y, // assign new alpha value as a multiplication of translucenses. // combined_alpha = front.alpha + back.alpha * (1 - front.alpha); // combined_rgb = (front.rgb * front.alpha + back.rgb * (1 - front.alpha) * back.alpha) / combined_alpha; -// -// NOTE: Allegro does not call blender callback when source alpha is zero, therefore -// we do not check this case here; this should be kept in mind if a need arises to -// use this function elsewise. unsigned long _argb2argb_blender(unsigned long src_col, unsigned long dst_col, unsigned long src_alpha) { unsigned long dst_g, dst_alpha; @@ -189,6 +185,8 @@ unsigned long _argb2argb_blender(unsigned long src_col, unsigned long dst_col, u src_alpha = geta32(src_col); if (src_alpha) src_alpha++; + else + return dst_col; dst_alpha = geta32(dst_col); if (dst_alpha) dst_alpha++; @@ -204,8 +202,8 @@ unsigned long _argb2argb_blender(unsigned long src_col, unsigned long dst_col, u dst_col = (((src_col & 0xFF00FF) - (dst_col & 0xFF00FF)) * src_alpha / 256 + dst_col) & 0xFF00FF; // dst_alpha now contains the final alpha - // we assume that final alpha will never be zero (see note above) - dst_alpha = src_alpha + (dst_alpha * (256 - src_alpha) / 256); + // we assume that final alpha will never be zero + dst_alpha = 256 - (256 - src_alpha) * (256 - dst_alpha) / 256; // src_alpha is now the final alpha factor made for being multiplied by, // instead of divided by: this makes it possible to use it in faster // calculation below diff --git a/Engine/gui/cscidialog.cpp b/Engine/gui/cscidialog.cpp index 29b17c478e..36bc0c9f8d 100644 --- a/Engine/gui/cscidialog.cpp +++ b/Engine/gui/cscidialog.cpp @@ -18,6 +18,7 @@ #include "ac/gamesetup.h" #include "ac/gamestate.h" #include "ac/gui.h" +#include "ac/keycode.h" #include "ac/mouse.h" #include "ac/record.h" #include "ac/runtime_defines.h" @@ -158,7 +159,7 @@ int WINAPI _export CSCIWaitMessage(Bitmap *ds, CSCIMessage * cscim) if (kbhit()) { int keywas = getch(); if (keywas == 0) - keywas = getch() + 300; + keywas = getch() + AGS_EXT_KEY_SHIFT; if (keywas == 13) { cscim->id = finddefaultcontrol(CNF_DEFAULT); diff --git a/Engine/libsrc/almp3/almp3.c b/Engine/libsrc/almp3/almp3.c index 0dec005f38..1846d4465c 100644 --- a/Engine/libsrc/almp3/almp3.c +++ b/Engine/libsrc/almp3/almp3.c @@ -1609,7 +1609,6 @@ int almp3_poll_mp3stream(ALMP3_MP3STREAM *mp3) { free_audio_stream_buffer(mp3->audiostream); /* if this was not the last block, buffer underrun */ if (!last_block) { - almp3_stop_mp3stream(mp3); return ALMP3_POLL_BUFFERUNDERRUN; } /* else we just finished playing, we need to wait for audio to stop */ @@ -1644,7 +1643,6 @@ int almp3_poll_mp3stream(ALMP3_MP3STREAM *mp3) { free_audio_stream_buffer(mp3->audiostream); /* if this was not the last block, buffer underrun */ if (!last_block) { - almp3_stop_mp3stream(mp3); return ALMP3_POLL_BUFFERUNDERRUN; } /* else we just finished playing, we need to wait for audio to stop */ @@ -1717,7 +1715,6 @@ int almp3_poll_mp3stream(ALMP3_MP3STREAM *mp3) { if (mp3->data_cursor >= mp3->databuf_len) { /* if this was not the last block, buffer underrun */ if (!last_block) { - almp3_stop_mp3stream(mp3); return ALMP3_POLL_BUFFERUNDERRUN; } /* else we just finished playing, we need to wait for audio to stop */ diff --git a/Engine/libsrc/alogg/alogg.c b/Engine/libsrc/alogg/alogg.c index 892f62c884..e402ef5318 100644 --- a/Engine/libsrc/alogg/alogg.c +++ b/Engine/libsrc/alogg/alogg.c @@ -1019,7 +1019,6 @@ int alogg_poll_oggstream(ALOGG_OGGSTREAM *ogg) { free_audio_stream_buffer(ogg->audiostream); /* if this was not the last block, buffer underrun */ if (!last_block) { - alogg_stop_oggstream(ogg); return ALOGG_POLL_BUFFERUNDERRUN; } /* else we just finished playing, we need to wait for audio to stop */ diff --git a/Engine/main/game_run.cpp b/Engine/main/game_run.cpp index a406648aac..3382f3c206 100644 --- a/Engine/main/game_run.cpp +++ b/Engine/main/game_run.cpp @@ -242,7 +242,7 @@ void check_controls() { int was_playing = play.playback; int kgn = getch(); - if (kgn==0) kgn=getch()+300; + if (kgn==0) kgn=getch()+AGS_EXT_KEY_SHIFT; // if (kgn==367) restart_game(); // if (kgn==2) Display("numover: %d character movesped: %d, animspd: %d",numscreenover,playerchar->walkspeed,playerchar->animspeed); // if (kgn==2) CreateTextOverlay(50,60,170,FONT_SPEECH,14,"This is a test screen overlay which shouldn't disappear"); @@ -346,7 +346,9 @@ void check_controls() { script_debug(5,0); play.debug_mode--; }*/ - else if ((kgn == 22) && (play.wait_counter < 1) && (is_text_overlay == 0) && (restrict_until == 0)) { + else if ((kgn == 22 + AGS_EXT_KEY_SHIFT && (key[KEY_LCONTROL] || key[KEY_RCONTROL]) ) && + (play.wait_counter < 1) && (is_text_overlay == 0) && (restrict_until == 0)) + { // make sure we can't interrupt a Wait() // and desync the music to cutscene play.debug_mode++; diff --git a/Engine/media/audio/clip_myogg.cpp b/Engine/media/audio/clip_myogg.cpp index cba4d43d48..e0691b4ba1 100644 --- a/Engine/media/audio/clip_myogg.cpp +++ b/Engine/media/audio/clip_myogg.cpp @@ -63,13 +63,16 @@ int MYOGG::poll() alogg_free_oggstream_buffer(stream, free_val); } } - if (alogg_poll_oggstream(stream) == ALOGG_POLL_PLAYJUSTFINISHED) { + + int ret = alogg_poll_oggstream(stream); + if (ret == ALOGG_OK || ret == ALOGG_POLL_BUFFERUNDERRUN) + get_pos_ms(); // call this to keep the last_but_one stuff up to date + else { + // finished playing or error done = 1; if (psp_audio_multithreaded) internal_destroy(); } - else get_pos_ms(); // call this to keep the last_but_one stuff up to date - return done; } diff --git a/Engine/plugin/agsplugin.cpp b/Engine/plugin/agsplugin.cpp index 3a5dc7bcdc..3fa436ee9b 100644 --- a/Engine/plugin/agsplugin.cpp +++ b/Engine/plugin/agsplugin.cpp @@ -27,6 +27,7 @@ #include "ac/global_audio.h" #include "ac/global_plugin.h" #include "ac/global_walkablearea.h" +#include "ac/keycode.h" #include "ac/mouse.h" #include "ac/movelist.h" #include "ac/objectcache.h" @@ -351,7 +352,7 @@ void IAGSEngine::PollSystem () { if (rec_kbhit()) { int kp = rec_getch(); - if (kp == 0) kp = rec_getch()+300; + if (kp == 0) kp = rec_getch()+AGS_EXT_KEY_SHIFT; pl_run_plugin_hooks (AGSE_KEYPRESS, kp); } diff --git a/Manual/ags.tex b/Manual/ags.tex index 60f93a4c69..f6e9ca41fe 100644 --- a/Manual/ags.tex +++ b/Manual/ags.tex @@ -924,7 +924,7 @@ \subsection{Game options}\index{options}\index{Anti-aliasing fonts}\index{Crossf \bf{NOTE:} Not all mice have mouse wheels, and the DOS engine does not support the mouse wheel at all. Therefore, your game should never require the mouse wheel in order to be playable - it should only be used as a handy extra. -\item \bf{Number dialog options} - adds an index number before each dialog option when +\item \bf{Number dialog options} - enables keyboard shortcuts to choose dialog options (keys 1-9) and adds an index number before each dialog option when they are displayed to the player. For example, \begin{verbatim} 1. Hello there! @@ -10814,7 +10814,7 @@ \subsection{SetGameOption}\label{SetGameOption}% }\row{{ OPT_TURNBEFOREWALK } & { Characters turn before walking (0 or 1) } }\row{{ OPT_HANDLEINVCLICKS } & { Handle inventory clicks in script (0 or 1) } }\row{{ OPT_MOUSEWHEEL } & { Enable mouse wheel support (0 or 1) } -}\row{{ OPT_DIALOGNUMBERED } & { Number dialog options (0 or 1) } +}\row{{ OPT_DIALOGNUMBERED } & { Number dialog options (-1=disabled, 0=shortcuts only, 1=drawn numbers) } }\row{{ OPT_DIALOGUPWARDS } & { Dialog options go upwards on GUI (0 or 1) } }\row{{ OPT_CROSSFADEMUSIC } & { Crossfade music tracks (0=no, 1=slow, 2=slowish, 3=medium, 4=fast) } }\row{{ OPT_ANTIALIASFONTS } & { Anti-alias rendering of TTF fonts (0 or 1) } diff --git a/debian/changelog b/debian/changelog index c1cfb25369..d0e6c2c67f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ags (3.30.0-1) UNRELEASED; urgency=low +ags (3.3.2.0-1) UNRELEASED; urgency=low * some release