[Scummvm-git-logs] scummvm master -> 92f40033829cb9cd30536b4c653d38aaae6cb3f5

sev- noreply at scummvm.org
Wed Aug 28 22:37:14 UTC 2024


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9250a52bca QDENGINE: Prevent crash when certain animation states are absent
1f313181a9 QDENGINE: Plugged in kartiny.dll
dc8872e9d0 QDENGINE: Moved VK_ constants to a header
92f4003382 QDENGINE: Fixed keys processing in kartiny.dll


Commit: 9250a52bcaee5c5f3077cfb1ff98db41134ad923
    https://github.com/scummvm/scummvm/commit/9250a52bcaee5c5f3077cfb1ff98db41134ad923
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-08-29T00:36:54+02:00

Commit Message:
QDENGINE: Prevent crash when certain animation states are absent

Fixes surgery minigame in maski

Changed paths:
    engines/qdengine/qdcore/qd_game_object_moving.cpp


diff --git a/engines/qdengine/qdcore/qd_game_object_moving.cpp b/engines/qdengine/qdcore/qd_game_object_moving.cpp
index 8130fc143a0..3ff9f3e2021 100644
--- a/engines/qdengine/qdcore/qd_game_object_moving.cpp
+++ b/engines/qdengine/qdcore/qd_game_object_moving.cpp
@@ -526,7 +526,8 @@ bool qdGameObjectMoving::stop_movement() {
 
 			if (qdAnimationSet * set = wst->animation_set()) {
 				qdAnimationInfo *inf = set->get_stop_animation_info(_direction_angle);
-				if (qdAnimation * anm = inf->animation()) {
+				qdAnimation *anm;
+				if (inf && (anm = inf->animation())) {
 					_movement_mode = MOVEMENT_MODE_END;
 					float phase = get_animation()->cur_time_rel();
 					_movement_mode_time = anm->length() * (1.f - phase);
@@ -666,9 +667,10 @@ Vect3f qdGameObjectMoving::get_future_r(float dt, bool &end_movement, bool real_
 		if (st && st->state_type() == qdGameObjectState::STATE_WALK) {
 			qdGameObjectStateWalk *wst = static_cast<qdGameObjectStateWalk *>(st);
 
-			if (qdAnimationSet * set = wst->animation_set()) {
+			if (qdAnimationSet *set = wst->animation_set()) {
 				qdAnimationInfo *inf = set->get_start_animation_info(_direction_angle);
-				if (qdAnimation * anm = inf->animation()) {
+				qdAnimation *anm;
+				if (inf && (anm = inf->animation())) {
 					if (real_moving) {
 						_movement_mode = MOVEMENT_MODE_START;
 						_movement_mode_time = anm->length();
@@ -1048,7 +1050,7 @@ bool qdGameObjectMoving::update_screen_pos() {
 				case MOVEMENT_MODE_MOVE:
 					offs_type = qdGameObjectStateWalk::OFFSET_WALK;
 					break;
-				case MOVEMENT_MODE_END:
+			case MOVEMENT_MODE_END:
 					offs_type = qdGameObjectStateWalk::OFFSET_END;
 					break;
 				}


Commit: 1f313181a98e386fae0ddc2c27d2d147a742ee86
    https://github.com/scummvm/scummvm/commit/1f313181a98e386fae0ddc2c27d2d147a742ee86
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-08-29T00:36:54+02:00

Commit Message:
QDENGINE: Plugged in kartiny.dll

Changed paths:
    engines/qdengine/qdcore/qd_minigame.cpp


diff --git a/engines/qdengine/qdcore/qd_minigame.cpp b/engines/qdengine/qdcore/qd_minigame.cpp
index c7115b76f49..26fe49bb247 100644
--- a/engines/qdengine/qdcore/qd_minigame.cpp
+++ b/engines/qdengine/qdcore/qd_minigame.cpp
@@ -266,7 +266,6 @@ bool qdMiniGame::load_interface() {
 
 		// maski
 		// Arkada_avtomat.dll
-		// kartiny.dll
 		// orchestra.dll
 		if (_dll_name == "Resource\\DLL\\tetris.dll") {
 			_interface = new qdTetrisMiniGame();
@@ -283,6 +282,9 @@ bool qdMiniGame::load_interface() {
 		} else if (_dll_name == "Resource\\DLL\\maski_21_random.dll") {
 			_interface = new qdMaski21MiniGame(true);
 			return true;
+		} else if (_dll_name == "Resource\\DLL\\kartiny.dll") {
+			_interface = new qdKartinyMiniGame();
+			return true;
 
 
 		// 3mice1


Commit: dc8872e9d0f6c09fa40fc91134fb967381ee8b87
    https://github.com/scummvm/scummvm/commit/dc8872e9d0f6c09fa40fc91134fb967381ee8b87
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-08-29T00:36:54+02:00

Commit Message:
QDENGINE: Moved VK_ constants to a header

Changed paths:
    engines/qdengine/system/input/keyboard_input.cpp
    engines/qdengine/system/input/keyboard_input.h


diff --git a/engines/qdengine/system/input/keyboard_input.cpp b/engines/qdengine/system/input/keyboard_input.cpp
index 541d6a8067c..c30c3ec5f7c 100644
--- a/engines/qdengine/system/input/keyboard_input.cpp
+++ b/engines/qdengine/system/input/keyboard_input.cpp
@@ -27,133 +27,6 @@
 
 namespace QDEngine {
 
-#define VK_LBUTTON        0x01
-#define VK_RBUTTON        0x02
-#define VK_CANCEL         0x03
-#define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
-
-#define VK_BACK           0x08
-#define VK_TAB            0x09
-
-#define VK_CLEAR          0x0C
-#define VK_RETURN         0x0D
-
-#define VK_SHIFT          0x10
-#define VK_CONTROL        0x11
-#define VK_MENU           0x12
-#define VK_PAUSE          0x13
-#define VK_CAPITAL        0x14
-
-
-#define VK_ESCAPE         0x1B
-
-#define VK_SPACE          0x20
-#define VK_PRIOR          0x21
-#define VK_NEXT           0x22
-#define VK_END            0x23
-#define VK_HOME           0x24
-#define VK_LEFT           0x25
-#define VK_UP             0x26
-#define VK_RIGHT          0x27
-#define VK_DOWN           0x28
-#define VK_SELECT         0x29
-#define VK_PRINT          0x2A
-#define VK_EXECUTE        0x2B
-#define VK_SNAPSHOT       0x2C
-#define VK_INSERT         0x2D
-#define VK_DELETE         0x2E
-#define VK_HELP           0x2F
-
-/* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
-/* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
-
-#define VK_LWIN           0x5B
-#define VK_RWIN           0x5C
-#define VK_APPS           0x5D
-
-#define VK_NUMPAD0        0x60
-#define VK_NUMPAD1        0x61
-#define VK_NUMPAD2        0x62
-#define VK_NUMPAD3        0x63
-#define VK_NUMPAD4        0x64
-#define VK_NUMPAD5        0x65
-#define VK_NUMPAD6        0x66
-#define VK_NUMPAD7        0x67
-#define VK_NUMPAD8        0x68
-#define VK_NUMPAD9        0x69
-#define VK_MULTIPLY       0x6A
-#define VK_ADD            0x6B
-#define VK_SEPARATOR      0x6C
-#define VK_SUBTRACT       0x6D
-#define VK_DECIMAL        0x6E
-#define VK_DIVIDE         0x6F
-#define VK_F1             0x70
-#define VK_F2             0x71
-#define VK_F3             0x72
-#define VK_F4             0x73
-#define VK_F5             0x74
-#define VK_F6             0x75
-#define VK_F7             0x76
-#define VK_F8             0x77
-#define VK_F9             0x78
-#define VK_F10            0x79
-#define VK_F11            0x7A
-#define VK_F12            0x7B
-#define VK_F13            0x7C
-#define VK_F14            0x7D
-#define VK_F15            0x7E
-#define VK_F16            0x7F
-#define VK_F17            0x80
-#define VK_F18            0x81
-#define VK_F19            0x82
-#define VK_F20            0x83
-#define VK_F21            0x84
-#define VK_F22            0x85
-#define VK_F23            0x86
-#define VK_F24            0x87
-
-#define VK_NUMLOCK        0x90
-#define VK_SCROLL         0x91
-
-/*
- * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
- * Used only as parameters to GetAsyncKeyState() and GetKeyState().
- * No other API or message will distinguish left and right keys in this way.
- */
-#define VK_LSHIFT         0xA0
-#define VK_RSHIFT         0xA1
-#define VK_LCONTROL       0xA2
-#define VK_RCONTROL       0xA3
-#define VK_LMENU          0xA4
-#define VK_RMENU          0xA5
-
-#define VK_ATTN           0xF6
-#define VK_CRSEL          0xF7
-#define VK_EXSEL          0xF8
-#define VK_EREOF          0xF9
-#define VK_PLAY           0xFA
-#define VK_ZOOM           0xFB
-#define VK_NONAME         0xFC
-#define VK_PA1            0xFD
-#define VK_OEM_CLEAR      0xFE
-
-
-// Some additional virtual keycodes...
-#define VK_OEM_COMMA	0xBC
-#define VK_OEM_PERIOD	0xBE
-#define VK_OEM_SCROLL	0x91
-#define VK_OEM_MINUS	0xBD
-#define VK_OEM_5_		0x0C
-#define VK_OEM_PLUS		0xBB
-#define VK_OEM_ALT		0x12
-
-#define VK_SLASH	0xBF
-#define VK_BKSLASH	0x5C
-#define VK_TILDE	0xC0
-#define VK_LBR		0x5B
-#define VK_RBR		0x5D
-
-
 static const int keyMapTable[] = {
 	Common::KEYCODE_BACKSPACE,		VK_BACK,
 	Common::KEYCODE_TAB,			VK_TAB,
diff --git a/engines/qdengine/system/input/keyboard_input.h b/engines/qdengine/system/input/keyboard_input.h
index b04fb10f40a..a48ceec68df 100644
--- a/engines/qdengine/system/input/keyboard_input.h
+++ b/engines/qdengine/system/input/keyboard_input.h
@@ -26,7 +26,133 @@
 
 namespace QDEngine {
 
-//! Обработчик ввода с клавиатуры.
+#define VK_LBUTTON        0x01
+#define VK_RBUTTON        0x02
+#define VK_CANCEL         0x03
+#define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
+
+#define VK_BACK           0x08
+#define VK_TAB            0x09
+
+#define VK_CLEAR          0x0C
+#define VK_RETURN         0x0D
+
+#define VK_SHIFT          0x10
+#define VK_CONTROL        0x11
+#define VK_MENU           0x12
+#define VK_PAUSE          0x13
+#define VK_CAPITAL        0x14
+
+
+#define VK_ESCAPE         0x1B
+
+#define VK_SPACE          0x20
+#define VK_PRIOR          0x21
+#define VK_NEXT           0x22
+#define VK_END            0x23
+#define VK_HOME           0x24
+#define VK_LEFT           0x25
+#define VK_UP             0x26
+#define VK_RIGHT          0x27
+#define VK_DOWN           0x28
+#define VK_SELECT         0x29
+#define VK_PRINT          0x2A
+#define VK_EXECUTE        0x2B
+#define VK_SNAPSHOT       0x2C
+#define VK_INSERT         0x2D
+#define VK_DELETE         0x2E
+#define VK_HELP           0x2F
+
+/* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
+/* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
+
+#define VK_LWIN           0x5B
+#define VK_RWIN           0x5C
+#define VK_APPS           0x5D
+
+#define VK_NUMPAD0        0x60
+#define VK_NUMPAD1        0x61
+#define VK_NUMPAD2        0x62
+#define VK_NUMPAD3        0x63
+#define VK_NUMPAD4        0x64
+#define VK_NUMPAD5        0x65
+#define VK_NUMPAD6        0x66
+#define VK_NUMPAD7        0x67
+#define VK_NUMPAD8        0x68
+#define VK_NUMPAD9        0x69
+#define VK_MULTIPLY       0x6A
+#define VK_ADD            0x6B
+#define VK_SEPARATOR      0x6C
+#define VK_SUBTRACT       0x6D
+#define VK_DECIMAL        0x6E
+#define VK_DIVIDE         0x6F
+#define VK_F1             0x70
+#define VK_F2             0x71
+#define VK_F3             0x72
+#define VK_F4             0x73
+#define VK_F5             0x74
+#define VK_F6             0x75
+#define VK_F7             0x76
+#define VK_F8             0x77
+#define VK_F9             0x78
+#define VK_F10            0x79
+#define VK_F11            0x7A
+#define VK_F12            0x7B
+#define VK_F13            0x7C
+#define VK_F14            0x7D
+#define VK_F15            0x7E
+#define VK_F16            0x7F
+#define VK_F17            0x80
+#define VK_F18            0x81
+#define VK_F19            0x82
+#define VK_F20            0x83
+#define VK_F21            0x84
+#define VK_F22            0x85
+#define VK_F23            0x86
+#define VK_F24            0x87
+
+#define VK_NUMLOCK        0x90
+#define VK_SCROLL         0x91
+
+/*
+ * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
+ * Used only as parameters to GetAsyncKeyState() and GetKeyState().
+ * No other API or message will distinguish left and right keys in this way.
+ */
+#define VK_LSHIFT         0xA0
+#define VK_RSHIFT         0xA1
+#define VK_LCONTROL       0xA2
+#define VK_RCONTROL       0xA3
+#define VK_LMENU          0xA4
+#define VK_RMENU          0xA5
+
+#define VK_ATTN           0xF6
+#define VK_CRSEL          0xF7
+#define VK_EXSEL          0xF8
+#define VK_EREOF          0xF9
+#define VK_PLAY           0xFA
+#define VK_ZOOM           0xFB
+#define VK_NONAME         0xFC
+#define VK_PA1            0xFD
+#define VK_OEM_CLEAR      0xFE
+
+
+// Some additional virtual keycodes...
+#define VK_OEM_COMMA	0xBC
+#define VK_OEM_PERIOD	0xBE
+#define VK_OEM_SCROLL	0x91
+#define VK_OEM_MINUS	0xBD
+#define VK_OEM_5_		0x0C
+#define VK_OEM_PLUS		0xBB
+#define VK_OEM_ALT		0x12
+
+#define VK_SLASH	0xBF
+#define VK_BKSLASH	0x5C
+#define VK_TILDE	0xC0
+#define VK_LBR		0x5B
+#define VK_RBR		0x5D
+
+
 class keyboardDispatcher {
 public:
 	//! Обработчик нажатий/отжатий кнопок.


Commit: 92f40033829cb9cd30536b4c653d38aaae6cb3f5
    https://github.com/scummvm/scummvm/commit/92f40033829cb9cd30536b4c653d38aaae6cb3f5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-08-29T00:36:54+02:00

Commit Message:
QDENGINE: Fixed keys processing in kartiny.dll

Changed paths:
    engines/qdengine/minigames/kartiny.h


diff --git a/engines/qdengine/minigames/kartiny.h b/engines/qdengine/minigames/kartiny.h
index aa015dfebae..b52d4a5430a 100644
--- a/engines/qdengine/minigames/kartiny.h
+++ b/engines/qdengine/minigames/kartiny.h
@@ -174,16 +174,16 @@ public:
 		if (!checkSolution() && _wasInited) {
 			_doneObj->set_state("false");
 
-			if (_engine->is_key_pressed(Common::KEYCODE_LEFT)
-					|| _engine->is_key_pressed(Common::KEYCODE_RIGHT)
-					|| _engine->is_key_pressed(Common::KEYCODE_UP)
-					|| _engine->is_key_pressed(Common::KEYCODE_DOWN)) {
+			if (_engine->is_key_pressed(VK_LEFT)
+					|| _engine->is_key_pressed(VK_RIGHT)
+					|| _engine->is_key_pressed(VK_UP)
+					|| _engine->is_key_pressed(VK_DOWN)) {
 				++_keyDownCounter;
 			} else {
 				_keyDownCounter = 0;
 			}
 
-			if (_engine->is_key_pressed(Common::KEYCODE_LEFT)) {
+			if (_engine->is_key_pressed(VK_LEFT)) {
 				switch (_stage) {
 				case 1:
 					moveLeft(_bg1_l2Obj);
@@ -202,7 +202,7 @@ public:
 				}
 			}
 
-			if (_engine->is_key_pressed(Common::KEYCODE_RIGHT)) {
+			if (_engine->is_key_pressed(VK_RIGHT)) {
 				switch (_stage) {
 				case 1:
 					moveRight(_bg1_l2Obj);
@@ -221,7 +221,7 @@ public:
 				}
 			}
 
-			if (_engine->is_key_pressed(Common::KEYCODE_UP)) {
+			if (_engine->is_key_pressed(VK_UP)) {
 				switch (_stage) {
 				case 1:
 					moveUp(_bg1_l2Obj);
@@ -240,7 +240,7 @@ public:
 				}
 			}
 
-			if (_engine->is_key_pressed(Common::KEYCODE_DOWN)) {
+			if (_engine->is_key_pressed(VK_DOWN)) {
 				switch (_stage) {
 				case 1:
 					moveDown(_bg1_l2Obj);




More information about the Scummvm-git-logs mailing list