diff options
| author | Paul Gilbert | 2011-07-03 15:32:27 +1000 | 
|---|---|---|
| committer | Paul Gilbert | 2011-07-03 15:32:27 +1000 | 
| commit | 900e8cbf5b95ceea36c44296bc0de12e32687745 (patch) | |
| tree | aeec6a80d257c53eaa09ecb1d9ac29a9d7cc54e6 | |
| parent | 156c2d020fca74bb901e547a04ae2a9e2f8ec8cc (diff) | |
| download | scummvm-rg350-900e8cbf5b95ceea36c44296bc0de12e32687745.tar.gz scummvm-rg350-900e8cbf5b95ceea36c44296bc0de12e32687745.tar.bz2 scummvm-rg350-900e8cbf5b95ceea36c44296bc0de12e32687745.zip | |
CGE: Fixed GCC compiler warnings
| -rw-r--r-- | engines/cge/bitmap.cpp | 13 | ||||
| -rw-r--r-- | engines/cge/text.cpp | 2 | 
2 files changed, 12 insertions, 3 deletions
| diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp index e4e0a37eb3..c94b8503cf 100644 --- a/engines/cge/bitmap.cpp +++ b/engines/cge/bitmap.cpp @@ -102,9 +102,18 @@ Bitmap::Bitmap(uint16 w, uint16 h, uint8 fill)  	*(uint16 *) v = CPY | dsiz;                     // data chunk hader  	memset(v + 2, fill, dsiz);                      // data bytes  	*(uint16 *)(v + lsiz - 2) = SKP | ((SCR_WID / 4) - dsiz);  // gap -	memcpy(v + lsiz, v, psiz - lsiz);               // tricky replicate lines + +	// Replicate lines +	byte *destP; +	for (destP = v + lsiz; destP < (v + psiz); destP += lsiz) +		Common::copy(v, v + lsiz, destP); +  	*(uint16 *)(v + psiz - 2) = EOI;                // plane trailer uint16 -	memcpy(v + psiz, v, 3 * psiz);                  // tricky replicate planes + +	// Repliccate planes +	for (destP = v + psiz; destP < (v + 4 * psiz); destP += psiz) +		Common::copy(v, v + psiz, destP); +  	HideDesc *b = (HideDesc *)(v + 4 * psiz);  	b->skip = (SCR_WID - _w) >> 2;  	b->hide = _w >> 2; diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp index 85ef17f4cf..e17688c6ee 100644 --- a/engines/cge/text.cpp +++ b/engines/cge/text.cpp @@ -63,7 +63,7 @@ void TEXT::Clear(int from, int upto) {  	for (p = Cache, q = p + Size; p < q; p++) {  		if (p->Ref && p->Ref >= from && p->Ref < upto) {  			p->Ref = 0; -			delete p->Txt; +			delete[] p->Txt;  			p->Txt = NULL;  		}  	} | 
