[Scummvm-git-logs] scummvm master -> e0e7077261811b0967d0619777fbd0f35ee0bdf6

Strangerke noreply at scummvm.org
Sat May 31 21:32:26 UTC 2025


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

Summary:
2240fe31ae M4: RIDDLE: Remove various useless includes
e0e7077261 M4: RIDDLE: Some cleanup in ws_timer


Commit: 2240fe31ae678674e680fc5046fc0aca274ca967
    https://github.com/scummvm/scummvm/commit/2240fe31ae678674e680fc5046fc0aca274ca967
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-05-31T22:31:58+01:00

Commit Message:
M4: RIDDLE: Remove various useless includes

Changed paths:
    engines/m4/riddle/flags.cpp
    engines/m4/riddle/hotkeys.cpp
    engines/m4/riddle/hotkeys.h
    engines/m4/riddle/riddle.cpp
    engines/m4/riddle/vars.cpp
    engines/m4/riddle/walker.h
    engines/m4/wscript/ws_load.h
    engines/m4/wscript/ws_timer.h
    engines/m4/wscript/wscript.cpp
    engines/m4/wscript/wst_regs.h


diff --git a/engines/m4/riddle/flags.cpp b/engines/m4/riddle/flags.cpp
index ab2bff2a1cf..968e1546958 100644
--- a/engines/m4/riddle/flags.cpp
+++ b/engines/m4/riddle/flags.cpp
@@ -21,9 +21,6 @@
 
 #include "m4/riddle/flags.h"
 #include "m4/riddle/vars.h"
-#include "m4/core/term.h"
-#include "m4/adv_r/adv.h"
-#include "m4/adv_r/adv_inv.h"
 
 namespace M4 {
 namespace Riddle {
diff --git a/engines/m4/riddle/hotkeys.cpp b/engines/m4/riddle/hotkeys.cpp
index 4d49e7e64a1..31152254ffe 100644
--- a/engines/m4/riddle/hotkeys.cpp
+++ b/engines/m4/riddle/hotkeys.cpp
@@ -22,7 +22,6 @@
 #include "m4/riddle/hotkeys.h"
 #include "m4/riddle/vars.h"
 #include "m4/gui/gui_sys.h"
-#include "m4/adv_r/other.h"
 
 namespace M4 {
 namespace Riddle {
diff --git a/engines/m4/riddle/hotkeys.h b/engines/m4/riddle/hotkeys.h
index d68d3f27aa9..c00edff6839 100644
--- a/engines/m4/riddle/hotkeys.h
+++ b/engines/m4/riddle/hotkeys.h
@@ -23,9 +23,7 @@
 #ifndef M4_RIDDLE_HOTKEYS_H
 #define M4_RIDDLE_HOTKEYS_H
 
-#include "m4/m4_types.h"
 #include "m4/gui/hotkeys.h"
-#include "m4/core/mouse.h"
 
 namespace M4 {
 namespace Riddle {
diff --git a/engines/m4/riddle/riddle.cpp b/engines/m4/riddle/riddle.cpp
index d065a2ad5ac..d2923c241e8 100644
--- a/engines/m4/riddle/riddle.cpp
+++ b/engines/m4/riddle/riddle.cpp
@@ -27,7 +27,6 @@
 #include "m4/riddle/console.h"
 #include "m4/riddle/vars.h"
 #include "m4/adv_r/other.h"
-#include "m4/core/errors.h"
 #include "m4/console.h"
 
 namespace M4 {
diff --git a/engines/m4/riddle/vars.cpp b/engines/m4/riddle/vars.cpp
index 8e3ac4dd80e..e011a5976d3 100644
--- a/engines/m4/riddle/vars.cpp
+++ b/engines/m4/riddle/vars.cpp
@@ -20,7 +20,6 @@
  */
 
 #include "common/debug.h"
-#include "common/events.h"
 #include "m4/riddle/vars.h"
 #include "m4/riddle/inventory.h"
 #include "m4/gui/gui_sys.h"
diff --git a/engines/m4/riddle/walker.h b/engines/m4/riddle/walker.h
index bf2145e2f99..c5227bdb87d 100644
--- a/engines/m4/riddle/walker.h
+++ b/engines/m4/riddle/walker.h
@@ -22,7 +22,6 @@
 #ifndef M4_RIDDLE_WALKER_H
 #define M4_RIDDLE_WALKER_H
 
-#include "common/array.h"
 #include "m4/adv_r/adv_walk.h"
 
 namespace M4 {
diff --git a/engines/m4/wscript/ws_load.h b/engines/m4/wscript/ws_load.h
index 1f0fd9ebc07..3a2a020e0b5 100644
--- a/engines/m4/wscript/ws_load.h
+++ b/engines/m4/wscript/ws_load.h
@@ -27,7 +27,6 @@
 #include "m4/fileio/sys_file.h"
 #include "m4/mem/reloc.h"
 #include "m4/wscript/ws_machine.h"
-#include "m4/wscript/ws_univ.h"
 
 namespace M4 {
 
diff --git a/engines/m4/wscript/ws_timer.h b/engines/m4/wscript/ws_timer.h
index 1b9fe92491e..fde2cb30719 100644
--- a/engines/m4/wscript/ws_timer.h
+++ b/engines/m4/wscript/ws_timer.h
@@ -23,7 +23,6 @@
 #ifndef M4_WSCRIPT_WS_TIMER_H
 #define M4_WSCRIPT_WS_TIMER_H
 
-#include "m4/m4_types.h"
 #include "m4/wscript/ws_machine.h"
 
 namespace M4 {
diff --git a/engines/m4/wscript/wscript.cpp b/engines/m4/wscript/wscript.cpp
index a16cf5f4751..1ef8b96a785 100644
--- a/engines/m4/wscript/wscript.cpp
+++ b/engines/m4/wscript/wscript.cpp
@@ -19,7 +19,6 @@
  *
  */
 
-#include "common/textconsole.h"
 #include "m4/wscript/wscript.h"
 
 namespace M4 {
diff --git a/engines/m4/wscript/wst_regs.h b/engines/m4/wscript/wst_regs.h
index 9bb7a61ec8b..f20171a7dd6 100644
--- a/engines/m4/wscript/wst_regs.h
+++ b/engines/m4/wscript/wst_regs.h
@@ -23,8 +23,6 @@
 #ifndef M4_WSCRIPT_WST_REGS_H
 #define M4_WSCRIPT_WST_REGS_H
 
-#include "m4/m4_types.h"
-
 namespace M4 {
 
 enum {


Commit: e0e7077261811b0967d0619777fbd0f35ee0bdf6
    https://github.com/scummvm/scummvm/commit/e0e7077261811b0967d0619777fbd0f35ee0bdf6
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-05-31T22:32:19+01:00

Commit Message:
M4: RIDDLE: Some cleanup in ws_timer

Changed paths:
    engines/m4/wscript/ws_timer.cpp


diff --git a/engines/m4/wscript/ws_timer.cpp b/engines/m4/wscript/ws_timer.cpp
index e74c463590d..1939703e25c 100644
--- a/engines/m4/wscript/ws_timer.cpp
+++ b/engines/m4/wscript/ws_timer.cpp
@@ -32,9 +32,7 @@ bool ws_InitWSTimer(void) {
 }
 
 void ws_KillTime() {
-	onTimeReq *tempTime;
-
-	tempTime = _GWS(firstTimeReq);
+	onTimeReq *tempTime = _GWS(firstTimeReq);
 	while (tempTime) {
 		_GWS(firstTimeReq) = _GWS(firstTimeReq)->next;
 		dispose_timeRequest(tempTime);
@@ -53,10 +51,8 @@ static void dispose_timeRequest(onTimeReq *timeReq) {
 }
 
 void ws_MakeOnTimeReq(int32 wakeUpTime, machine *myXM, int32 pcOffset, int32 pcCount) {
-	onTimeReq *newTimeReq, *tempTimeReq;
-
 	// Create a new time request struct and set it's fields
-	newTimeReq = new_timeRequest();
+	onTimeReq *newTimeReq = new_timeRequest();
 	newTimeReq->myTime = wakeUpTime;
 	newTimeReq->myXM = myXM;
 	newTimeReq->pcOffset = pcOffset;
@@ -73,7 +69,7 @@ void ws_MakeOnTimeReq(int32 wakeUpTime, machine *myXM, int32 pcOffset, int32 pcC
 		_GWS(firstTimeReq) = newTimeReq;
 	} else {
 		// Else it belongs in the middle/end of a non-empty list...
-		tempTimeReq = _GWS(firstTimeReq);
+		onTimeReq *tempTimeReq = _GWS(firstTimeReq);
 		while (tempTimeReq->next && (tempTimeReq->next->myTime < newTimeReq->myTime)) {
 			tempTimeReq = tempTimeReq->next;
 		}
@@ -84,14 +80,12 @@ void ws_MakeOnTimeReq(int32 wakeUpTime, machine *myXM, int32 pcOffset, int32 pcC
 }
 
 void ws_CancelOnTimeReqs(machine *m) {
-	onTimeReq *tempTimeReq, *prevTimeReq;
-
 	if (!m)
 		return;
 
 	// Pass through the linked list, removing any requests for machine* m.
-	prevTimeReq = _GWS(firstTimeReq);
-	tempTimeReq = _GWS(firstTimeReq);
+	onTimeReq *prevTimeReq = _GWS(firstTimeReq);
+	onTimeReq *tempTimeReq = _GWS(firstTimeReq);
 
 	while (tempTimeReq) {
 		// If tempTimeReq is one to be cancelled...
@@ -119,17 +113,13 @@ void ws_CancelOnTimeReqs(machine *m) {
 }
 
 void ws_CheckTimeReqs(int32 curTime) {
-	onTimeReq *tempTimeReq;
-	machine *myXM;
-	int32 pcOffset, pcCount;
-
 	// Loop through the list, answering all expired time requests
-	tempTimeReq = _GWS(firstTimeReq);
+	onTimeReq *tempTimeReq = _GWS(firstTimeReq);
 	while (tempTimeReq && (tempTimeReq->myTime <= curTime)) {
 		// Extract all important information from request
-		myXM = tempTimeReq->myXM;
-		pcOffset = tempTimeReq->pcOffset;
-		pcCount = tempTimeReq->pcCount;
+		machine *myXM = tempTimeReq->myXM;
+		int32 pcOffset = tempTimeReq->pcOffset;
+		int32 pcCount = tempTimeReq->pcCount;
 
 		// Remove it from the list and dispose
 		_GWS(firstTimeReq) = _GWS(firstTimeReq)->next;




More information about the Scummvm-git-logs mailing list