Get rid of C-style operators
authorunc0rr
Wed, 24 Oct 2012 00:35:27 +0400
changeset 7804 9122461ae32b
parent 7803 7c4d83f8ac23
child 7805 2a249a4faf5b
Get rid of C-style operators
hedgewars/uMisc.pas
hedgewars/uVideoRec.pas
--- a/hedgewars/uMisc.pas	Tue Oct 23 12:09:15 2012 -0400
+++ b/hedgewars/uMisc.pas	Wed Oct 24 00:35:27 2012 +0400
@@ -206,9 +206,9 @@
                 for i0:= 0 to k-1 do
                     for j0:= 0 to k-1 do
                     begin
-                        r+= img[4*(width*(i*k+i0) + j*k+j0)+0];
-                        g+= img[4*(width*(i*k+i0) + j*k+j0)+1];
-                        b+= img[4*(width*(i*k+i0) + j*k+j0)+2];
+                        inc(r, img[4*(width*(i*k+i0) + j*k+j0)+0]);
+                        inc(g, img[4*(width*(i*k+i0) + j*k+j0)+1]);
+                        inc(b, img[4*(width*(i*k+i0) + j*k+j0)+2]);
                     end;
                 img[4*(w*i + j)+0]:= r div (k*k);
                 img[4*(w*i + j)+1]:= g div (k*k);
--- a/hedgewars/uVideoRec.pas	Tue Oct 23 12:09:15 2012 -0400
+++ b/hedgewars/uVideoRec.pas	Wed Oct 24 00:35:27 2012 +0400
@@ -96,23 +96,26 @@
     // store some description in output file
     desc:= '';
     if UserNick <> '' then
-        desc+= 'Player: ' + UserNick + #10;
+        desc:= desc + 'Player: ' + UserNick + #10;
     if recordFileName <> '' then
-        desc+= 'Record: ' + recordFileName + #10;
+        desc:= desc + 'Record: ' + recordFileName + #10;
     if cMapName <> '' then
-        desc+= 'Map: ' + cMapName + #10;
+        desc:= desc + 'Map: ' + cMapName + #10;
     if Theme <> '' then
-        desc+= 'Theme: ' + Theme + #10;
-    desc+= 'prefix[' + RecPrefix + ']prefix';
-    desc+= #0;
+        desc:= desc + 'Theme: ' + Theme + #10;
+    desc:= desc + 'prefix[' + RecPrefix + ']prefix';
+
+    filename:= UserPathPrefix + '/VideoTemp/' + RecPrefix;
+    soundFilePath:= UserPathPrefix + '/VideoTemp/' + RecPrefix + '.sw';
 
-    filename:= UserPathPrefix + '/VideoTemp/' + RecPrefix + #0;
-    soundFilePath:= UserPathPrefix + '/VideoTemp/' + RecPrefix + '.sw' + #0;
-    cAVFormat+= #0;
-    cAudioCodec+= #0;
-    cVideoCodec+= #0;
-    AVWrapper_Init(@AddFileLogRaw, @filename[1], @desc[1], @soundFilePath[1], @cAVFormat[1], @cVideoCodec[1], @cAudioCodec[1],
-                   cScreenWidth, cScreenHeight, cVideoFramerateNum, cVideoFramerateDen, cVideoQuality);
+    AVWrapper_Init(@AddFileLogRaw
+        , PChar(ansistring(filename))
+        , PChar(ansistring(desc))
+        , PChar(ansistring(soundFilePath))
+        , PChar(ansistring(cAVFormat))
+        , PChar(ansistring(cVideoCodec))
+        , PChar(ansistring(cAudioCodec))
+        , cScreenWidth, cScreenHeight, cVideoFramerateNum, cVideoFramerateDen, cVideoQuality);
 
     numPixels:= cScreenWidth*cScreenHeight;
     YCbCr_Planes[0]:= GetMem(numPixels);