[Scummvm-git-logs] scummvm master -> 1562255b7c56e80aabf00997bb992880ab186656

sev- sev at scummvm.org
Sat Mar 27 18:13:49 UTC 2021


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

Summary:
25ca2ea07b AGS: Use int64 instead of "long long"
f2cbf19786 TINSEL: Use ScummVM data types
1562255b7c SLUDGE: Use ScummVM data types


Commit: 25ca2ea07bae60b76302d3ebfc6d555e3572b41b
    https://github.com/scummvm/scummvm/commit/25ca2ea07bae60b76302d3ebfc6d555e3572b41b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-03-27T19:11:42+01:00

Commit Message:
AGS: Use int64 instead of "long long"

Changed paths:
    engines/ags/engine/ac/timer.cpp


diff --git a/engines/ags/engine/ac/timer.cpp b/engines/ags/engine/ac/timer.cpp
index 4481abbe39..ba33907fea 100644
--- a/engines/ags/engine/ac/timer.cpp
+++ b/engines/ags/engine/ac/timer.cpp
@@ -88,7 +88,7 @@ bool waitingForNextTick() {
 	if (is_lagging) {
 #if AGS_PLATFORM_DEBUG && defined (__GNUC__)
 		auto missed_ticks = ((now - _G(last_tick_time)) / _G(tick_duration));
-		warning("Lagging! Missed %lld ticks!\n", (long long)missed_ticks);
+		warning("Lagging! Missed %lld ticks!\n", (int64)missed_ticks);
 /*		void *array[10];
 		auto size = backtrace(array, 10);
 		backtrace_symbols_fd(array, size, STDOUT_FILENO);


Commit: f2cbf1978617143d3b88b364d521c19cd231e568
    https://github.com/scummvm/scummvm/commit/f2cbf1978617143d3b88b364d521c19cd231e568
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-03-27T19:12:11+01:00

Commit Message:
TINSEL: Use ScummVM data types

Changed paths:
    engines/tinsel/adpcm.cpp


diff --git a/engines/tinsel/adpcm.cpp b/engines/tinsel/adpcm.cpp
index 2c48d6405c..e004595450 100644
--- a/engines/tinsel/adpcm.cpp
+++ b/engines/tinsel/adpcm.cpp
@@ -44,14 +44,14 @@ void Tinsel_ADPCMStream::readBufferTinselHeader() {
 		// Negate
 		start = ~(start | 0xC0) + 1;
 
-		_status.predictor = (unsigned long long int)1 << start;
+		_status.predictor = (uint64)1 << start;
 	} else {
 		// Lower 6 bit are positive
 
 		// Truncate
 		start &= 0x1F;
 
-		_status.predictor = ((double) 1.0) / ((unsigned long long int)1 << start);
+		_status.predictor = ((double) 1.0) / ((uuint64)1 << start);
 	}
 
 	_status.K0 = TinselFilterTable[filterVal][0];


Commit: 1562255b7c56e80aabf00997bb992880ab186656
    https://github.com/scummvm/scummvm/commit/1562255b7c56e80aabf00997bb992880ab186656
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-03-27T19:12:32+01:00

Commit Message:
SLUDGE: Use ScummVM data types

Changed paths:
    engines/sludge/movie.cpp


diff --git a/engines/sludge/movie.cpp b/engines/sludge/movie.cpp
index 7cb292df9a..315c0a08f3 100644
--- a/engines/sludge/movie.cpp
+++ b/engines/sludge/movie.cpp
@@ -56,12 +56,12 @@ typedef struct audioQueue {
 
 audioQueue audioQ;
 
-Uint32 movieStartTick, movieCurrentTime;
+uint32 movieStartTick, movieCurrentTime;
 
-long long audioNsPerByte;
-long long audioNsPlayed;
-long long audioNsBuffered;
-long long audioBufferLen;
+int64 audioNsPerByte;
+int64 audioNsPlayed;
+int64 audioNsBuffered;
+int64 audioBufferLen;
 bool movieSoundPlaying = false;
 int movieAudioIndex;
 GLuint yTextureName = 0;
@@ -93,7 +93,7 @@ void audio_queue_init(audioQueue *q) {
 	q->cond = SDL_CreateCond();
 
 }
-int audio_queue_put(audioQueue *q, char *buffer, uint size, long long time_ms) {
+int audio_queue_put(audioQueue *q, char *buffer, uint size, int64 time_ms) {
 
 	audioBuffers *audioBuf = new audioBuffers;
 	if (!audioBuf)
@@ -155,7 +155,7 @@ int video_queue_put(videoQueue *q, GLubyte *ytex,
 		GLubyte *utex,
 		GLubyte *vtex,
 		GLsizei w, GLsizei h,
-		long long time_ms) {
+		int64 time_ms) {
 
 	videoBuffers *videoBuf = new videoBuffers;
 	if (!videoBuf)
@@ -266,7 +266,7 @@ static uint64_t xiph_lace_value(byte **np) {
 }
 
 vorbis_dsp_state vorbisDspState;
-long long audioChannels;
+int64 audioChannels;
 
 bool fakeAudio = false;
 
@@ -341,7 +341,7 @@ int playMovie(int fileNumber) {
 		return 0;
 	}
 
-	long long pos = 0;
+	int64 pos = 0;
 
 	EBMLHeader ebmlHeader;
 
@@ -349,7 +349,7 @@ int playMovie(int fileNumber) {
 
 	mkvparser::Segment *pSegment;
 
-	long long ret = mkvparser::Segment::CreateInstance(&reader, pos, pSegment);
+	int64 ret = mkvparser::Segment::CreateInstance(&reader, pos, pSegment);
 	if (ret) {
 		fatal("Movie error: Segment::CreateInstance() failed.\n");
 	}
@@ -360,21 +360,21 @@ int playMovie(int fileNumber) {
 	}
 
 	//const SegmentInfo* const pSegmentInfo = pSegment->GetInfo();
-	//const long long timeCodeScale = pSegmentInfo->GetTimeCodeScale();
-	//const long long duration_ns = pSegmentInfo->GetDuration();
+	//const int64 timeCodeScale = pSegmentInfo->GetTimeCodeScale();
+	//const int64 duration_ns = pSegmentInfo->GetDuration();
 	//const char* const pTitle = pSegmentInfo->GetTitleAsUTF8();
 	//const char* const pMuxingApp = pSegmentInfo->GetMuxingAppAsUTF8();
 	//const char* const pWritingApp = pSegmentInfo->GetWritingAppAsUTF8();
 
 	const mkvparser::Tracks *pTracks = pSegment->GetTracks();
 
-	unsigned long i = 0;
-	const unsigned long j = pTracks->GetTracksCount();
+	uint32 i = 0;
+	const uint32 j = pTracks->GetTracksCount();
 
 	enum {VIDEO_TRACK = 1, AUDIO_TRACK = 2};
 	int videoTrack = -1;
 	int audioTrack = -1;
-	long long audioBitDepth;
+	int64 audioBitDepth;
 	double audioSampleRate;
 	ogg_packet oggPacket;
 	vorbis_info vorbisInfo;
@@ -387,8 +387,8 @@ int playMovie(int fileNumber) {
 		if (pTrack == NULL)
 		continue;
 
-		const long long trackType = pTrack->GetType();
-		//const unsigned long long trackUid = pTrack->GetUid();
+		const int64 trackType = pTrack->GetType();
+		//const unsigned int64 trackUid = pTrack->GetUid();
 		//const char* pTrackName = pTrack->GetNameAsUTF8();
 
 		if (trackType == VIDEO_TRACK && videoTrack < 0) {
@@ -396,8 +396,8 @@ int playMovie(int fileNumber) {
 			const VideoTrack *const pVideoTrack =
 			static_cast<const VideoTrack *>(pTrack);
 
-			const long long width = pVideoTrack->GetWidth();
-			const long long height = pVideoTrack->GetHeight();
+			const int64 width = pVideoTrack->GetWidth();
+			const int64 height = pVideoTrack->GetHeight();
 
 			const double rate = pVideoTrack->GetFrameRate();
 
@@ -515,8 +515,8 @@ int playMovie(int fileNumber) {
 	glDepthMask(GL_FALSE);
 	glDisable(GL_DEPTH_TEST);
 
-	//const long long timeCode = pCluster->GetTimeCode();
-	long long time_ns = pCluster->GetTime();
+	//const int64 timeCode = pCluster->GetTimeCode();
+	int64 time_ns = pCluster->GetTime();
 
 	const BlockEntry *pBlockEntry = pCluster->GetFirst();
 
@@ -528,10 +528,10 @@ int playMovie(int fileNumber) {
 		pBlockEntry = pCluster->GetFirst();
 	}
 	const Block *pBlock = pBlockEntry->GetBlock();
-	long long trackNum = pBlock->GetTrackNumber();
+	int64 trackNum = pBlock->GetTrackNumber();
 	unsigned long tn = static_cast<unsigned long>(trackNum);
 	const Track *pTrack = pTracks->GetTrackByNumber(tn);
-	long long trackType = pTrack->GetType();
+	int64 trackType = pTrack->GetType();
 	int frameCount = pBlock->GetFrameCount();
 	time_ns = pBlock->GetTime(pCluster);
 
@@ -616,7 +616,7 @@ int playMovie(int fileNumber) {
 
 				const Block::Frame &theFrame = pBlock->GetFrame(frameCounter);
 				const long size = theFrame.len;
-				//                const long long offset = theFrame.pos;
+				//                const int64 offset = theFrame.pos;
 
 				if (size > sizeof(frame)) {
 					if (frame) delete [] frame;




More information about the Scummvm-git-logs mailing list