Revision: 2711 Author: lewis Date: 2013-03-25 18:49:32 -0700 (Mon, 25 Mar 2013) Log Message: ----------- VMMaker 4.11.4 (VMMaker-tpr.313, VMMaker-dtl.314) Move BitBltSimulation (ie BitBltPlugin) to be a subclass of SmartSyntaxInterpreterPlugin and copy the PixelValuePeekPlugin primitivePixelValueAtX:y: code into it. Also updated the class comment a little to include newly added combination rules. Well, new about ten years ago. A resulting VM runs the tests in BitBltTests ok. Remove PixelValuePeekPlugin because primitivePixelValueAt is now in BitBltSimulation Modified Paths: -------------- trunk/src/ckformat.c trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c trunk/src/plugins/AioPlugin/AioPlugin.c trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c trunk/src/plugins/B2DPlugin/B2DPlugin.c trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c trunk/src/plugins/BitBltPlugin/BitBltPlugin.c trunk/src/plugins/CameraPlugin/CameraPlugin.c trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c trunk/src/plugins/CroquetPlugin/CroquetPlugin.c trunk/src/plugins/DBusPlugin/DBusPlugin.c trunk/src/plugins/DSAPrims/DSAPrims.c trunk/src/plugins/DropPlugin/DropPlugin.c trunk/src/plugins/FFTPlugin/FFTPlugin.c trunk/src/plugins/FT2Plugin/FT2Plugin.c trunk/src/plugins/FileCopyPlugin/FileCopyPlugin.c trunk/src/plugins/FilePlugin/FilePlugin.c trunk/src/plugins/FloatArrayPlugin/FloatArrayPlugin.c trunk/src/plugins/FloatMathPlugin/FloatMathPlugin.c trunk/src/plugins/GeniePlugin/GeniePlugin.c trunk/src/plugins/HostWindowPlugin/HostWindowPlugin.c trunk/src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c trunk/src/plugins/JPEGReaderPlugin/JPEGReaderPlugin.c trunk/src/plugins/JoystickTabletPlugin/JoystickTabletPlugin.c trunk/src/plugins/Klatt/Klatt.c trunk/src/plugins/LargeIntegers/LargeIntegers.c trunk/src/plugins/LocalePlugin/LocalePlugin.c trunk/src/plugins/MIDIPlugin/MIDIPlugin.c trunk/src/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c trunk/src/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c trunk/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c trunk/src/plugins/RePlugin/RePlugin.c trunk/src/plugins/RomePlugin/RomePlugin.c trunk/src/plugins/ScratchPlugin/ScratchPlugin.c trunk/src/plugins/SecurityPlugin/SecurityPlugin.c trunk/src/plugins/SerialPlugin/SerialPlugin.c trunk/src/plugins/SocketPlugin/SocketPlugin.c trunk/src/plugins/SoundCodecPrims/SoundCodecPrims.c trunk/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c trunk/src/plugins/SoundPlugin/SoundPlugin.c trunk/src/plugins/Squeak3D/Squeak3D.c trunk/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c trunk/src/plugins/SqueakSSL/SqueakSSL.c trunk/src/plugins/StarSqueakPlugin/StarSqueakPlugin.c trunk/src/plugins/UUIDPlugin/UUIDPlugin.c trunk/src/plugins/UnicodePlugin/UnicodePlugin.c trunk/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c trunk/src/plugins/WeDoPlugin/WeDoPlugin.c trunk/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c trunk/src/plugins/ZipPlugin/ZipPlugin.c trunk/src/vm/interp.c trunk/src/vm/interp.h trunk/src/vm/sqNamedPrims.h Removed Paths: ------------- trunk/src/plugins/PixelValuePeekPlugin/ Modified: trunk/src/ckformat.c =================================================================== --- trunk/src/ckformat.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/ckformat.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -5,7 +5,7 @@ /* Usage: ckformat imageFileName */ /* --- DO NOT EDIT THIS FILE --- */ -/* --- Automatically generated from class ImageFormat 2013-03-23T23:29:31.367-05:00--- */ +/* --- Automatically generated from class ImageFormat 2013-03-25T21:44:02.506-05:00--- */ /* --- Source code is in package ImageFormat in the VMMaker repository --- */ /* --- DO NOT EDIT THIS FILE --- */ Modified: trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c =================================================================== --- trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:14 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:45 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - ADPCMCodecPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + ADPCMCodecPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "ADPCMCodecPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "ADPCMCodecPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -70,9 +70,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "ADPCMCodecPlugin 23 March 2013 (i)" + "ADPCMCodecPlugin 25 March 2013 (i)" #else - "ADPCMCodecPlugin 23 March 2013 (e)" + "ADPCMCodecPlugin 25 March 2013 (e)" #endif ; Modified: trunk/src/plugins/AioPlugin/AioPlugin.c =================================================================== --- trunk/src/plugins/AioPlugin/AioPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/AioPlugin/AioPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,6 +1,6 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:30 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:44:01 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from UnixAioPlugin VMConstruction-Plugins-AioPlugin-dtl.14 uuid: 965d54b7-4309-42fd-adb0-64400d3c780b */ @@ -88,9 +88,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "AioPlugin 23 March 2013 (i)" + "AioPlugin 25 March 2013 (i)" #else - "AioPlugin 23 March 2013 (e)" + "AioPlugin 25 March 2013 (e)" #endif ; Modified: trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c =================================================================== --- trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:14 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:45 pm */ /* Automatically generated by - SmartSyntaxPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + SmartSyntaxPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - AsynchFilePlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + AsynchFilePlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "AsynchFilePlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "AsynchFilePlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -67,9 +67,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "AsynchFilePlugin 23 March 2013 (i)" + "AsynchFilePlugin 25 March 2013 (i)" #else - "AsynchFilePlugin 23 March 2013 (e)" + "AsynchFilePlugin 25 March 2013 (e)" #endif ; static void * sCOAFfn; Modified: trunk/src/plugins/B2DPlugin/B2DPlugin.c =================================================================== --- trunk/src/plugins/B2DPlugin/B2DPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/B2DPlugin/B2DPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:16 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:48 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - BalloonEnginePlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + BalloonEnginePlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "BalloonEnginePlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "BalloonEnginePlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -421,9 +421,9 @@ static void * loadBBFn; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "B2DPlugin 23 March 2013 (i)" + "B2DPlugin 25 March 2013 (i)" #else - "B2DPlugin 23 March 2013 (e)" + "B2DPlugin 25 March 2013 (e)" #endif ; static int* objBuffer; Modified: trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c =================================================================== --- trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:23 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:54 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - B3DAcceleratorPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + B3DAcceleratorPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "B3DAcceleratorPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "B3DAcceleratorPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -97,9 +97,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "B3DAcceleratorPlugin 23 March 2013 (i)" + "B3DAcceleratorPlugin 25 March 2013 (i)" #else - "B3DAcceleratorPlugin 23 March 2013 (e)" + "B3DAcceleratorPlugin 25 March 2013 (e)" #endif ; Modified: trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c =================================================================== --- trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:14 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:46 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - BMPReadWriterPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + BMPReadWriterPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "BMPReadWriterPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "BMPReadWriterPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -58,9 +58,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "BMPReadWriterPlugin 23 March 2013 (i)" + "BMPReadWriterPlugin 25 March 2013 (i)" #else - "BMPReadWriterPlugin 23 March 2013 (e)" + "BMPReadWriterPlugin 25 March 2013 (e)" #endif ; Modified: trunk/src/plugins/BitBltPlugin/BitBltPlugin.c =================================================================== --- trunk/src/plugins/BitBltPlugin/BitBltPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/BitBltPlugin/BitBltPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:17 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:49 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + SmartSyntaxPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - BitBltSimulation * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + BitBltSimulation VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "BitBltSimulation * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "BitBltSimulation VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -144,6 +144,7 @@ EXPORT(sqInt) primitiveCopyBits(void); EXPORT(sqInt) primitiveDisplayString(void); EXPORT(sqInt) primitiveDrawLoop(void); +EXPORT(sqInt) primitivePixelValueAt(void); EXPORT(sqInt) primitiveWarpBits(void); #pragma export off static sqInt queryDestSurface(sqInt handle); @@ -244,9 +245,9 @@ }; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "BitBltPlugin 23 March 2013 (i)" + "BitBltPlugin 25 March 2013 (i)" #else - "BitBltPlugin 23 March 2013 (e)" + "BitBltPlugin 25 March 2013 (e)" #endif ; static sqInt nWords; @@ -293,8 +294,8 @@ values obtained from the left and right fringes. */ static sqInt OLDrgbDiffwith(sqInt sourceWord, sqInt destinationWord) { - sqInt diff; - sqInt pixMask; + sqInt diff; + sqInt pixMask; if (destDepth < 16) { @@ -332,22 +333,22 @@ values obtained from the left and right fringes. */ static sqInt OLDtallyIntoMapwith(sqInt sourceWord, sqInt destinationWord) { - sqInt i; - sqInt mapIndex; - sqInt pixMask; - sqInt shiftWord; - sqInt d; - sqInt destPix; - sqInt mask; - sqInt srcPix; - sqInt d1; - sqInt destPix1; - sqInt mask3; - sqInt srcPix1; - sqInt d2; - sqInt destPix2; - sqInt mask4; - sqInt srcPix2; + sqInt pixMask; + sqInt mapIndex; + sqInt i; + sqInt shiftWord; + sqInt d; + sqInt destPix; + sqInt srcPix; + sqInt mask; + sqInt d1; + sqInt destPix1; + sqInt srcPix1; + sqInt mask3; + sqInt d2; + sqInt destPix2; + sqInt srcPix2; + sqInt mask4; if (!((cmFlags & (ColorMapPresent | ColorMapIndexedPart)) == (ColorMapPresent | ColorMapIndexedPart))) { return destinationWord; @@ -519,12 +520,12 @@ component. The high byte of the result will be 0. */ static sqInt alphaBlendwith(sqInt sourceWord, sqInt destinationWord) { - sqInt alpha; - sqInt blend; - sqInt colorMask; - sqInt result; - sqInt shift; - sqInt unAlpha; + sqInt unAlpha; + sqInt colorMask; + sqInt blend; + sqInt result; + sqInt shift; + sqInt alpha; /* High 8 bits of source pixel */ @@ -585,21 +586,21 @@ colormaps, as is the case with WarpBlt. */ static sqInt alphaBlendConstwithpaintMode(sqInt sourceWord, sqInt destinationWord, sqInt paintMode) { - sqInt bitsPerColor; - sqInt blend; - sqInt destPixVal; - sqInt destShifted; - sqInt i; - sqInt j; - sqInt maskShifted; - sqInt pixBlend; - sqInt pixMask; - sqInt result; - sqInt rgbMask; - sqInt shift; - sqInt sourcePixVal; - sqInt sourceShifted; - sqInt unAlpha; + sqInt sourcePixVal; + sqInt j; + sqInt bitsPerColor; + sqInt unAlpha; + sqInt sourceShifted; + sqInt pixMask; + sqInt blend; + sqInt rgbMask; + sqInt result; + sqInt shift; + sqInt destShifted; + sqInt maskShifted; + sqInt i; + sqInt destPixVal; + sqInt pixBlend; if (destDepth < 16) { return destinationWord; @@ -666,13 +667,13 @@ e.g., it is assumed that the source color is already scaled. */ static sqInt alphaBlendScaledwith(sqInt sourceWord, sqInt destinationWord) { - sqInt a; - sqInt b; - sqInt dstMask; - sqInt g; - sqInt r; - sqInt srcMask; - sqInt unAlpha; + sqInt unAlpha; + sqInt g; + sqInt srcMask; + sqInt a; + sqInt dstMask; + sqInt r; + sqInt b; /* Do NOT inline this into optimized loops */ @@ -724,24 +725,24 @@ */ static sqInt alphaSourceBlendBits16(void) { - sqInt deltaX; - sqInt deltaY; - sqInt destWord; - sqInt ditherBase; - sqInt ditherIndex; - sqInt ditherThreshold; - sqInt dstIndex; - sqInt dstMask; - sqInt dstY; - sqInt sourceWord; - sqInt srcAlpha; - sqInt srcIndex; - sqInt srcShift; - sqInt srcY; - sqInt addThreshold; - sqInt addThreshold1; - sqInt dstValue; - sqInt dstValue1; + sqInt ditherBase; + sqInt ditherThreshold; + sqInt srcShift; + sqInt sourceWord; + sqInt srcIndex; + sqInt deltaX; + sqInt dstIndex; + sqInt srcAlpha; + sqInt dstMask; + sqInt deltaY; + sqInt srcY; + sqInt destWord; + sqInt dstY; + sqInt ditherIndex; + sqInt addThreshold; + sqInt addThreshold1; + sqInt dstValue; + sqInt dstValue1; /* This particular method should be optimized in itself */ @@ -868,15 +869,15 @@ */ static sqInt alphaSourceBlendBits32(void) { - sqInt deltaX; - sqInt deltaY; - sqInt destWord; - sqInt dstIndex; - sqInt dstY; - sqInt sourceWord; - sqInt srcAlpha; - sqInt srcIndex; - sqInt srcY; + sqInt sourceWord; + sqInt srcIndex; + sqInt deltaX; + sqInt dstIndex; + sqInt srcAlpha; + sqInt deltaY; + sqInt srcY; + sqInt destWord; + sqInt dstY; /* This particular method should be optimized in itself */ @@ -963,23 +964,23 @@ */ static sqInt alphaSourceBlendBits8(void) { - sqInt adjust; - sqInt deltaX; - sqInt deltaY; - sqInt destWord; - sqInt dstIndex; - sqInt dstMask; - sqInt dstY; - sqInt mapperFlags; - unsigned int *mappingTable; - sqInt sourceWord; - sqInt srcAlpha; - sqInt srcIndex; - sqInt srcShift; - sqInt srcY; - sqInt pv; - sqInt val; - sqInt dstValue; + sqInt srcShift; + sqInt sourceWord; + sqInt srcIndex; + sqInt deltaX; + unsigned int *mappingTable; + sqInt dstIndex; + sqInt adjust; + sqInt mapperFlags; + sqInt srcAlpha; + sqInt dstMask; + sqInt deltaY; + sqInt srcY; + sqInt destWord; + sqInt dstY; + sqInt pv; + sqInt val; + sqInt dstValue; mappingTable = default8To32Table(); mapperFlags = cmFlags & (~ColorMapNewStyle); @@ -1193,17 +1194,17 @@ /* This function is exported for the Balloon engine */ EXPORT(sqInt) copyBits(void) { - sqInt done; - sqInt gammaLookupTableOop; - sqInt ungammaLookupTableOop; - sqInt t; - sqInt endBits; - sqInt pixPerM1; - sqInt startBits; - sqInt dWid; - sqInt dxLowBits; - sqInt pixPerM11; - sqInt sxLowBits; + sqInt done; + sqInt ungammaLookupTableOop; + sqInt gammaLookupTableOop; + sqInt t; + sqInt endBits; + sqInt startBits; + sqInt pixPerM1; + sqInt dxLowBits; + sqInt sxLowBits; + sqInt dWid; + sqInt pixPerM11; clipRange(); if ((bbW <= 0) || (bbH <= 0)) { @@ -1464,35 +1465,35 @@ /* This version of the inner loop assumes noSource = false. */ static sqInt copyLoop(void) { - sqInt destWord; - sqInt hInc; - sqInt halftoneWord; - sqInt i; - sqInt (*mergeFnwith)(sqInt, sqInt); - sqInt mergeWord; - sqInt notSkewMask; - sqInt prevWord; - sqInt skewMask; - sqInt skewWord; - sqInt thisWord; - sqInt unskew; - sqInt word; - sqInt y; - sqInt idx; - sqInt idx1; - sqInt idx2; - sqInt idx3; - sqInt idx4; - sqInt idx5; - sqInt idx6; - sqInt idx7; - sqInt idx8; - sqInt idx9; - sqInt idx10; - sqInt idx11; - sqInt idx12; - sqInt idx13; - sqInt idx14; + sqInt mergeWord; + sqInt skewWord; + sqInt skewMask; + sqInt halftoneWord; + sqInt unskew; + sqInt (*mergeFnwith)(sqInt, sqInt); + sqInt hInc; + sqInt destWord; + sqInt word; + sqInt prevWord; + sqInt y; + sqInt i; + sqInt thisWord; + sqInt notSkewMask; + sqInt idx; + sqInt idx1; + sqInt idx2; + sqInt idx3; + sqInt idx4; + sqInt idx5; + sqInt idx6; + sqInt idx7; + sqInt idx8; + sqInt idx9; + sqInt idx10; + sqInt idx11; + sqInt idx12; + sqInt idx13; + sqInt idx14; mergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1])); mergeFnwith; @@ -1675,20 +1676,20 @@ positive, and perload and skew are unused */ static sqInt copyLoopNoSource(void) { - sqInt destWord; - sqInt halftoneWord; - sqInt i; - sqInt (*mergeFnwith)(sqInt, sqInt); - sqInt mergeWord; - sqInt word; - sqInt idx; - sqInt idx1; - sqInt idx2; - sqInt idx3; - sqInt idx4; - sqInt idx5; - sqInt idx6; - sqInt idx7; + sqInt mergeWord; + sqInt halftoneWord; + sqInt (*mergeFnwith)(sqInt, sqInt); + sqInt destWord; + sqInt word; + sqInt i; + sqInt idx; + sqInt idx1; + sqInt idx2; + sqInt idx3; + sqInt idx4; + sqInt idx5; + sqInt idx6; + sqInt idx7; mergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1])); mergeFnwith; @@ -1776,43 +1777,43 @@ to inline pickSourcePixels we could optimize the loop instead. */ static sqInt copyLoopPixMap(void) { - sqInt destPixMask; - sqInt destWord; - sqInt dstShift; - sqInt dstShiftInc; - sqInt dstShiftLeft; - sqInt endBits; - sqInt halftoneWord; - sqInt i; - sqInt mapperFlags; - sqInt (*mergeFnwith)(sqInt, sqInt); - sqInt mergeWord; - sqInt nPix; - sqInt nSourceIncs; - sqInt scrStartBits; - sqInt skewWord; - sqInt sourcePixMask; - sqInt srcShift; - sqInt srcShiftInc; - sqInt startBits; - sqInt words; - sqInt idx; - sqInt idx1; - sqInt value; - sqInt idx2; - sqInt idx3; - sqInt destPix; - sqInt destWord1; - sqInt dstShift1; - sqInt nPix1; - sqInt sourcePix; - sqInt sourceWord; - sqInt srcShift1; - sqInt pv; - sqInt idx4; - sqInt val; - sqInt idx11; - sqInt idx21; + sqInt mapperFlags; + sqInt srcShiftInc; + sqInt dstShiftLeft; + sqInt sourcePixMask; + sqInt nSourceIncs; + sqInt skewWord; + sqInt words; + sqInt destWord; + sqInt startBits; + sqInt (*mergeFnwith)(sqInt, sqInt); + sqInt dstShift; + sqInt i; + sqInt halftoneWord; + sqInt mergeWord; + sqInt destPixMask; + sqInt dstShiftInc; + sqInt srcShift; + sqInt endBits; + sqInt nPix; + sqInt scrStartBits; + sqInt idx; + sqInt idx1; + sqInt value; + sqInt idx2; + sqInt idx3; + sqInt sourcePix; + sqInt srcShift1; + sqInt sourceWord; + sqInt dstShift1; + sqInt destPix; + sqInt nPix1; + sqInt destWord1; + sqInt pv; + sqInt idx4; + sqInt val; + sqInt idx11; + sqInt idx21; mergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1])); mergeFnwith; @@ -1998,7 +1999,7 @@ ]. */ static unsigned int * default8To32Table(void) { - static unsigned int theTable[256] = { + static unsigned int theTable[256] = { 0x0, 0xFF000001, 0xFFFFFFFF, 0xFF808080, 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0xFF00FFFF, 0xFFFFFF00, 0xFFFF00FF, 0xFF202020, 0xFF404040, 0xFF606060, 0xFF9F9F9F, 0xFFBFBFBF, 0xFFDFDFDF, 0xFF080808, 0xFF101010, 0xFF181818, 0xFF282828, 0xFF303030, 0xFF383838, 0xFF484848, 0xFF505050, @@ -2047,8 +2048,8 @@ /* Return the integer value of the given field of the given object. If the field contains a Float, truncate it and return its integral part. Fail if the given field does not contain a small integer or Float, or if the truncated Float is out of the range of small integers. */ static sqInt fetchIntOrFloatofObject(sqInt fieldIndex, sqInt objectPointer) { - sqInt fieldOop; - double floatValue; + double floatValue; + sqInt fieldOop; fieldOop = interpreterProxy->fetchPointerofObject(fieldIndex, objectPointer); if ((fieldOop & 1)) { @@ -2066,8 +2067,8 @@ /* Return the integer value of the given field of the given object. If the field contains a Float, truncate it and return its integral part. Fail if the given field does not contain a small integer or Float, or if the truncated Float is out of the range of small integers. */ static sqInt fetchIntOrFloatofObjectifNil(sqInt fieldIndex, sqInt objectPointer, sqInt defaultValue) { - sqInt fieldOop; - double floatValue; + double floatValue; + sqInt fieldOop; fieldOop = interpreterProxy->fetchPointerofObject(fieldIndex, objectPointer); if ((fieldOop & 1)) { @@ -2160,13 +2161,13 @@ } static sqInt initDither8Lookup(void) { - sqInt b; - sqInt t; - sqInt value; - sqInt out; - sqInt pv; - sqInt threshold; - sqInt value1; + sqInt t; + sqInt b; + sqInt value; + sqInt pv; + sqInt threshold; + sqInt value1; + sqInt out; for (b = 0; b <= 255; b += 1) { for (t = 0; t <= 15; t += 1) { @@ -2234,18 +2235,18 @@ -- once it works! */ static sqInt loadBitBltFromwarping(sqInt bbObj, sqInt aBool) { - sqInt ok; - sqInt formPointer; - sqInt formPointer1; - sqInt destBitsSize; - sqInt sourceBitsSize; - sqInt cmOop; - sqInt cmSize; - sqInt oldStyle; - sqInt oop; - sqInt halftoneBits; - sqInt mapOop; - sqInt mapOop1; + sqInt ok; + sqInt formPointer; + sqInt formPointer1; + sqInt destBitsSize; + sqInt sourceBitsSize; + sqInt oop; + sqInt cmOop; + sqInt cmSize; + sqInt oldStyle; + sqInt halftoneBits; + sqInt mapOop; + sqInt mapOop1; bitBltOop = bbObj; isWarping = aBool; @@ -2600,13 +2601,13 @@ */ static sqInt lockSurfaces(void) { - sqInt b; - sqInt destHandle; - sqInt (*fn)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt); - sqInt l; - sqInt r; - sqInt sourceHandle; - sqInt t; + sqInt destHandle; + sqInt sourceHandle; + sqInt t; + sqInt (*fn)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt); + sqInt r; + sqInt b; + sqInt l; hasSurfaceLock = 0; if (destBits == 0) { @@ -2697,9 +2698,9 @@ Used for erasing, eg, brush shapes prior to ORing in a color */ static sqInt partitionedANDtonBitsnPartitions(sqInt word1, sqInt word2, sqInt nBits, sqInt nParts) { - sqInt i; - sqInt mask; - sqInt result; + sqInt result; + sqInt i; + sqInt mask; /* partition mask starts at the right */ @@ -2726,11 +2727,11 @@ words as unsigned int in those cases where comparisions are done (jmv) */ static sqInt partitionedAddtonBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts) { - sqInt i; - unsigned int mask; - unsigned int maskedWord1; - unsigned int result; - unsigned int sum; + unsigned int result; + unsigned int sum; + unsigned int maskedWord1; + sqInt i; + unsigned int mask; /* partition mask starts at the right */ @@ -2763,9 +2764,9 @@ words as unsigned int in those cases where comparisions are done (jmv) */ static sqInt partitionedMaxwithnBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts) { - sqInt i; - unsigned int mask; - unsigned int result; + unsigned int result; + sqInt i; + unsigned int mask; /* partition mask starts at the right */ @@ -2789,9 +2790,9 @@ words as unsigned int in those cases where comparisions are done (jmv) */ static sqInt partitionedMinwithnBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts) { - sqInt i; - unsigned int mask; - unsigned int result; + unsigned int result; + sqInt i; + unsigned int mask; /* partition mask starts at the right */ @@ -2817,10 +2818,10 @@ always be zero (jmv) */ static sqInt partitionedMulwithnBitsnPartitions(sqInt word1, sqInt word2, sqInt nBits, sqInt nParts) { - sqInt dMask; - sqInt product; - sqInt result; - sqInt sMask; + sqInt dMask; + sqInt result; + sqInt product; + sqInt sMask; /* partition mask starts at the right */ @@ -2857,11 +2858,11 @@ words as unsigned int in those cases where comparisions are done (jmv) */ static sqInt partitionedSubfromnBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts) { - sqInt i; - unsigned int mask; - unsigned int p1; - unsigned int p2; - unsigned int result; + unsigned int p2; + unsigned int result; + unsigned int p1; + sqInt i; + unsigned int mask; /* partition mask starts at the right */ @@ -2891,11 +2892,11 @@ /* Clear all pixels in destinationWord for which the pixels of sourceWord have the same values. Used to clear areas of some constant color to zero. */ static sqInt pixClearwith(sqInt sourceWord, sqInt destinationWord) { - sqInt i; - sqInt mask; - sqInt nBits; - sqInt pv; - sqInt result; + sqInt pv; + sqInt nBits; + sqInt result; + sqInt i; + sqInt mask; if (destDepth == 32) { if (sourceWord == destinationWord) { @@ -2925,9 +2926,9 @@ } static sqInt pixMaskwith(sqInt sourceWord, sqInt destinationWord) { - sqInt i; - sqInt mask; - sqInt result; + sqInt result; + sqInt i; + sqInt mask; /* begin partitionedAND:to:nBits:nPartitions: */ mask = maskTable[destDepth]; @@ -2952,11 +2953,11 @@ /* Swap the pixels in destWord */ static sqInt pixSwapwith(sqInt sourceWord, sqInt destWord) { - sqInt highMask; - sqInt i; - sqInt lowMask; - sqInt result; - sqInt shift; + sqInt result; + sqInt shift; + sqInt lowMask; + sqInt highMask; + sqInt i; if (destPPW == 1) { return destWord; @@ -2988,7 +2989,7 @@ /* Invoke the copyBits primitive. If the destination is the display, then copy it to the screen. */ EXPORT(sqInt) primitiveCopyBits(void) { - sqInt rcvr; + sqInt rcvr; rcvr = interpreterProxy->stackValue(interpreterProxy->methodArgumentCount()); if (!(loadBitBltFromwarping(rcvr, 0))) { @@ -3011,23 +3012,23 @@ } EXPORT(sqInt) primitiveDisplayString(void) { - sqInt ascii; - sqInt bbObj; - sqInt charIndex; - sqInt glyphIndex; - sqInt glyphMap; - sqInt kernDelta; - sqInt left; - sqInt maxGlyph; - sqInt quickBlt; - char *sourcePtr; - sqInt sourceString; - sqInt startIndex; - sqInt stopIndex; - sqInt xTable; - sqInt endBits; - sqInt pixPerM1; - sqInt startBits; + sqInt charIndex; + char *sourcePtr; + sqInt stopIndex; + sqInt bbObj; + sqInt xTable; + sqInt maxGlyph; + sqInt quickBlt; + sqInt glyphIndex; + sqInt glyphMap; + sqInt left; + sqInt kernDelta; + sqInt startIndex; + sqInt ascii; + sqInt sourceString; + sqInt endBits; + sqInt startBits; + sqInt pixPerM1; if (!((interpreterProxy->methodArgumentCount()) == 6)) { return interpreterProxy->primitiveFail(); @@ -3129,19 +3130,19 @@ /* Invoke the line drawing primitive. */ EXPORT(sqInt) primitiveDrawLoop(void) { - sqInt rcvr; - sqInt xDelta; - sqInt yDelta; - sqInt P; - sqInt affB; - sqInt affL; - sqInt affR; - sqInt affT; - sqInt dx1; - sqInt dy1; - sqInt i; - sqInt px; - sqInt py; + sqInt yDelta; + sqInt rcvr; + sqInt xDelta; + sqInt P; + sqInt affT; + sqInt dx1; + sqInt px; + sqInt affR; + sqInt affL; + sqInt py; + sqInt i; + sqInt affB; + sqInt dy1; rcvr = interpreterProxy->stackValue(2); xDelta = interpreterProxy->stackIntegerValue(1); @@ -3252,14 +3253,108 @@ } +/* returns the single pixel at x@y. + It does not handle LSB bitmaps right now. + If x or y are < 0, return 0 to indicate transparent (cf BitBlt>bitPeekerFromForm: usage). + Likewise if x>width or y>depth. + Fail if the rcvr doesn't seem to be a Form, or x|y seem wrong */ + +EXPORT(sqInt) primitivePixelValueAt(void) { + sqInt pixel; + sqInt rcvr; + sqInt shift; + sqInt depth; + sqInt bitmap; + sqInt ppW; + sqInt word; + sqInt stride; + sqInt mask; + sqInt xVal; + sqInt yVal; + sqInt _return_value; + + xVal = interpreterProxy->stackIntegerValue(1); + yVal = interpreterProxy->stackIntegerValue(0); + rcvr = interpreterProxy->stackValue(2); + if (interpreterProxy->failed()) { + return null; + } + if ((xVal < 0) || (yVal < 0)) { + _return_value = ((0 << 1) | 1); + if (interpreterProxy->failed()) { + return null; + } + interpreterProxy->popthenPush(3, _return_value); + return null; + } + rcvr = interpreterProxy->stackValue(interpreterProxy->methodArgumentCount()); + if (!((interpreterProxy->isPointers(rcvr)) && ((interpreterProxy->slotSizeOf(rcvr)) >= 4))) { + interpreterProxy->primitiveFail(); + return null; + } + bitmap = interpreterProxy->fetchPointerofObject(FormBitsIndex, rcvr); + width = interpreterProxy->fetchIntegerofObject(FormWidthIndex, rcvr); + height = interpreterProxy->fetchIntegerofObject(FormHeightIndex, rcvr); + + /* if width/height/depth are not integer, fail */ + + depth = interpreterProxy->fetchIntegerofObject(FormDepthIndex, rcvr); + if (interpreterProxy->failed()) { + return null; + } + if ((xVal >= width) || (yVal >= height)) { + _return_value = ((0 << 1) | 1); + if (interpreterProxy->failed()) { + return null; + } + interpreterProxy->popthenPush(3, _return_value); + return null; + } + if (depth < 0) { + interpreterProxy->primitiveFail(); + return null; + } + + /* pixels in each word */ + + ppW = 32 / depth; + + /* how many words per rox of pixels */ + + stride = (width + (ppW - 1)) / ppW; + + /* load the word that contains our target */ + + word = interpreterProxy->fetchLong32ofObject((yVal * stride) + (xVal / ppW), bitmap); + + /* make a mask to isolate the pixel within that word */ + + mask = ((usqInt) 4294967295U) >> (32 - depth); + + /* this is the tricky MSB part - we mask the xVal to find how far into the word we need, then add 1 for the pixel we're looking for, then * depth to get the bit shift */ + + shift = 32 - (((xVal & (ppW - 1)) + 1) * depth); + + /* shift, mask and dim the lights */ + + pixel = (((usqInt) word) >> shift) & mask; + _return_value = interpreterProxy->positive32BitIntegerFor(pixel); + if (interpreterProxy->failed()) { + return null; + } + interpreterProxy->popthenPush(3, _return_value); + return null; +} + + /* Invoke the warpBits primitive. If the destination is the display, then copy it to the screen. */ EXPORT(sqInt) primitiveWarpBits(void) { - sqInt rcvr; - sqInt ns; - sqInt endBits; - sqInt pixPerM1; - sqInt startBits; + sqInt rcvr; + sqInt ns; + sqInt endBits; + sqInt startBits; + sqInt pixPerM1; rcvr = interpreterProxy->stackValue(interpreterProxy->methodArgumentCount()); if (!(loadBitBltFromwarping(rcvr, 1))) { @@ -3396,22 +3491,22 @@ /* This particular method should be optimized in itself */ static sqInt rgbComponentAlpha16(void) { - sqInt deltaX; - sqInt deltaY; - sqInt destWord; - sqInt ditherBase; - sqInt ditherIndex; - sqInt ditherThreshold; - sqInt dstIndex; - sqInt dstMask; - sqInt dstY; - sqInt sourceWord; - sqInt srcAlpha; - sqInt srcIndex; - sqInt srcShift; - sqInt srcY; - sqInt addThreshold; - sqInt dstValue; + sqInt ditherBase; + sqInt ditherThreshold; + sqInt srcShift; + sqInt sourceWord; + sqInt srcIndex; + sqInt deltaX; + sqInt dstIndex; + sqInt srcAlpha; + sqInt dstMask; + sqInt deltaY; + sqInt srcY; + sqInt destWord; + sqInt dstY; + sqInt ditherIndex; + sqInt addThreshold; + sqInt dstValue; /* So we can pre-decrement */ @@ -3513,15 +3608,15 @@ */ static sqInt rgbComponentAlpha32(void) { - register int deltaX; - sqInt deltaY; - sqInt destWord; - register int dstIndex; - sqInt dstY; - register int sourceWord; - sqInt srcAlpha; - register int srcIndex; - sqInt srcY; + register int sourceWord; + register int srcIndex; + register int deltaX; + register int dstIndex; + sqInt srcAlpha; + sqInt deltaY; + sqInt srcY; + sqInt destWord; + sqInt dstY; /* This particular method should be optimized in itself */ @@ -3598,21 +3693,21 @@ /* Do NOT inline this into optimized loops */ static sqInt rgbComponentAlpha32with(sqInt sourceWord, sqInt destinationWord) { - sqInt a; - sqInt aA; - sqInt aB; - sqInt aG; - sqInt aR; - sqInt alpha; - sqInt answer; - sqInt b; - sqInt d; - sqInt dstMask; - sqInt g; - sqInt r; - sqInt s; - sqInt srcAlpha; - sqInt srcColor; + sqInt g; + sqInt srcColor; + sqInt aG; + sqInt d; + sqInt a; + sqInt aA; + sqInt aR; + sqInt dstMask; + sqInt srcAlpha; + sqInt r; + sqInt b; + sqInt aB; + sqInt alpha; + sqInt answer; + sqInt s; alpha = sourceWord; if (alpha == 0) { @@ -3700,23 +3795,23 @@ */ static sqInt rgbComponentAlpha8(void) { - sqInt adjust; - sqInt deltaX; - sqInt deltaY; - sqInt destWord; - sqInt dstIndex; - sqInt dstMask; - sqInt dstY; - sqInt mapperFlags; - unsigned int *mappingTable; - sqInt sourceWord; - sqInt srcAlpha; - sqInt srcIndex; - sqInt srcShift; - sqInt srcY; - sqInt pv; - sqInt val; - sqInt dstValue; + sqInt srcShift; + sqInt sourceWord; + sqInt srcIndex; + sqInt deltaX; + unsigned int *mappingTable; + sqInt dstIndex; + sqInt adjust; + sqInt mapperFlags; + sqInt srcAlpha; + sqInt dstMask; + sqInt deltaY; + sqInt srcY; + sqInt destWord; + sqInt dstY; + sqInt pv; + sqInt val; + sqInt dstValue; /* This particular method should be optimized in itself */ @@ -3850,19 +3945,19 @@ /* Do NOT inline this into optimized loops */ static sqInt rgbComponentAlphawith(sqInt sourceWord, sqInt destinationWord) { - sqInt alpha; - sqInt nBits; - sqInt nParts; - sqInt i; - sqInt mask; - sqInt p1; - sqInt p2; - sqInt result; - sqInt v; - sqInt d; - sqInt destPix; - sqInt mask3; - sqInt srcPix; + sqInt alpha; + sqInt nBits; + sqInt nParts; + sqInt p2; + sqInt result; + sqInt p1; + sqInt i; + sqInt v; + sqInt mask; + sqInt d; + sqInt destPix; + sqInt srcPix; + sqInt mask3; alpha = sourceWord; if (alpha == 0) { @@ -3942,16 +4037,16 @@ For non-rgb, return the number of differing pixels. */ static sqInt rgbDiffwith(sqInt sourceWord, sqInt destinationWord) { - sqInt bitsPerColor; - sqInt destPixVal; - sqInt destShifted; - sqInt diff; - sqInt i; - sqInt maskShifted; - sqInt pixMask; - sqInt rgbMask; - sqInt sourcePixVal; - sqInt sourceShifted; + sqInt sourcePixVal; + sqInt bitsPerColor; + sqInt diff; + sqInt sourceShifted; + sqInt pixMask; + sqInt rgbMask; + sqInt destShifted; + sqInt i; + sqInt maskShifted; + sqInt destPixVal; pixMask = maskTable[destDepth]; if (destDepth == 16) { @@ -3994,10 +4089,10 @@ /* Convert the given pixel value with nBitsIn bits for each color component to a pixel value with nBitsOut bits for each color component. Typical values for nBitsIn/nBitsOut are 3, 5, or 8. */ static sqInt rgbMapfromto(sqInt sourcePixel, sqInt nBitsIn, sqInt nBitsOut) { - sqInt d; - sqInt destPix; - sqInt mask; - sqInt srcPix; + sqInt d; + sqInt destPix; + sqInt srcPix; + sqInt mask; if (((d = nBitsOut - nBitsIn)) > 0) { @@ -4095,7 +4190,7 @@ } static sqInt rgbMinInvertwith(sqInt wordToInvert, sqInt destinationWord) { - sqInt sourceWord; + sqInt sourceWord; sourceWord = ~wordToInvert; if (destDepth < 16) { @@ -4161,7 +4256,7 @@ /* Note: This is coded so that is can be run from Squeak. */ EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) { - sqInt ok; + sqInt ok; interpreterProxy = anInterpreter; ok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR; @@ -4176,8 +4271,8 @@ /* WARNING: For WarpBlt w/ smoothing the source depth is wrong here! */ static sqInt setupColorMasks(void) { - sqInt bits; - sqInt targetBits; + sqInt bits; + sqInt targetBits; bits = (targetBits = 0); if (sourceDepth <= 8) { @@ -4212,10 +4307,10 @@ /* Setup color masks for converting an incoming RGB pixel value from srcBits to targetBits. */ static sqInt setupColorMasksFromto(sqInt srcBits, sqInt targetBits) { - sqInt deltaBits; - sqInt mask; - static unsigned int masks[4] = {0, 0, 0, 0}; - static int shifts[4] = {0, 0, 0, 0}; + static int shifts[4] = {0, 0, 0, 0}; + static unsigned int masks[4] = {0, 0, 0, 0}; + sqInt deltaBits; + sqInt mask; ; deltaBits = targetBits - srcBits; @@ -4264,20 +4359,20 @@ to be performed at setup. */ static sqInt tallyIntoMapwith(sqInt sourceWord, sqInt destinationWord) { - sqInt destShifted; - sqInt i; - sqInt mapIndex; - sqInt maskShifted; - sqInt pixMask; - sqInt pixVal; - sqInt d; - sqInt destPix; - sqInt mask; - sqInt srcPix; - sqInt d1; - sqInt destPix1; - sqInt mask3; - sqInt srcPix1; + sqInt pixMask; + sqInt mapIndex; + sqInt destShifted; + sqInt i; + sqInt maskShifted; + sqInt pixVal; + sqInt d; + sqInt destPix; + sqInt srcPix; + sqInt mask; + sqInt d1; + sqInt destPix1; + sqInt srcPix1; + sqInt mask3; if (!((cmFlags & (ColorMapPresent | ColorMapIndexedPart)) == (ColorMapPresent | ColorMapIndexedPart))) { return destinationWord; @@ -4395,10 +4490,10 @@ /* See the comment in lockSurfaces. Similar rules apply. That is, the area provided in ioUnlockSurface can be used to determine the dirty region after drawing. If a source is unlocked, then the area will be (0,0,0,0) to indicate that no portion is dirty. */ static sqInt unlockSurfaces(void) { - sqInt destHandle; - sqInt destLocked; - sqInt (*fn)(sqInt, sqInt, sqInt, sqInt, sqInt); - sqInt sourceHandle; + sqInt destHandle; + sqInt sourceHandle; + sqInt (*fn)(sqInt, sqInt, sqInt, sqInt, sqInt); + sqInt destLocked; if (hasSurfaceLock) { if (unlockSurfaceFn == 0) { @@ -4440,60 +4535,60 @@ source, thus producing a general affine transformation. */ static sqInt warpLoop(void) { - sqInt deltaP12x; - sqInt deltaP12y; - sqInt deltaP43x; - sqInt deltaP43y; - sqInt destWord; - sqInt dstShiftInc; - sqInt dstShiftLeft; - sqInt endBits; - sqInt halftoneWord; - sqInt i; - sqInt mapperFlags; - sqInt (*mergeFnwith)(sqInt, sqInt); - sqInt mergeWord; - sqInt nPix; - sqInt nSteps; - sqInt pAx; - sqInt pAy; - sqInt pBx; - sqInt pBy; - sqInt skewWord; - sqInt smoothingCount; - sqInt sourceMapOop; - sqInt startBits; - sqInt words; - sqInt xDelta; - sqInt yDelta; - sqInt idx; - sqInt idx1; - sqInt value; - sqInt idx2; - sqInt idx3; - sqInt i1; - sqInt words1; - sqInt destPix; - sqInt destWord1; - sqInt dstMask; - sqInt nPix1; - sqInt sourcePix; - sqInt pv; - sqInt xx; - sqInt yy; - sqInt sourcePix1; - sqInt sourceWord; - sqInt srcIndex; - sqInt x; - sqInt y; - sqInt val; - sqInt xx1; - sqInt yy1; - sqInt sourcePix2; - sqInt sourceWord1; - sqInt srcIndex1; - sqInt x1; - sqInt y1; + sqInt mapperFlags; + sqInt dstShiftLeft; + sqInt words; + sqInt skewWord; + sqInt nSteps; + sqInt deltaP43y; + sqInt destWord; + sqInt startBits; + sqInt (*mergeFnwith)(sqInt, sqInt); + sqInt deltaP43x; + sqInt pBy; + sqInt i; + sqInt yDelta; + sqInt halftoneWord; + sqInt mergeWord; + sqInt pAy; + sqInt dstShiftInc; + sqInt pBx; + sqInt sourceMapOop; + sqInt xDelta; + sqInt pAx; + sqInt deltaP12y; + sqInt endBits; + sqInt nPix; + sqInt deltaP12x; + sqInt smoothingCount; + sqInt idx; + sqInt idx1; + sqInt value; + sqInt idx2; + sqInt idx3; + sqInt i1; + sqInt words1; + sqInt sourcePix; + sqInt nPix1; + sqInt destPix; + sqInt dstMask; + sqInt destWord1; + sqInt pv; + sqInt xx; + sqInt yy; + sqInt sourcePix1; + sqInt sourceWord; + sqInt srcIndex; + sqInt x; + sqInt y; + sqInt val; + sqInt xx1; + sqInt yy1; + sqInt sourcePix2; + sqInt sourceWord1; + sqInt srcIndex1; + sqInt x1; + sqInt y1; mergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1])); mergeFnwith; @@ -4851,32 +4946,32 @@ This version is only called from WarpBlt with smoothingCount > 1 */ static sqInt warpPickSmoothPixelsxDeltahyDeltahxDeltavyDeltavsourceMapsmoothingdstShiftInc(sqInt nPixels, sqInt xDeltah, sqInt yDeltah, sqInt xDeltav, sqInt yDeltav, sqInt sourceMap, sqInt n, sqInt dstShiftInc) { - sqInt a; - sqInt b; - sqInt destWord; - sqInt dstMask; - sqInt g; - sqInt i; - sqInt j; - sqInt k; - sqInt nPix; - sqInt r; - sqInt rgb; - sqInt x; - sqInt xdh; - sqInt xdv; - sqInt xx; - sqInt y; - sqInt ydh; - sqInt ydv; - sqInt yy; - sqInt sourcePix; - sqInt sourceWord; - sqInt srcIndex; - sqInt x1; - sqInt y1; - sqInt pv; - sqInt val; + sqInt k; + sqInt destWord; + sqInt xdh; + sqInt j; + sqInt ydh; + sqInt i; + sqInt xdv; + sqInt dstMask; + sqInt ydv; + sqInt rgb; + sqInt y; + sqInt b; + sqInt yy; + sqInt g; + sqInt x; + sqInt a; + sqInt r; + sqInt nPix; + sqInt xx; + sqInt sourcePix; + sqInt sourceWord; + sqInt srcIndex; + sqInt x1; + sqInt y1; + sqInt pv; + sqInt val; /* nope - too much stuff in here */ @@ -5027,16 +5122,17 @@ void* BitBltPlugin_exports[][3] = { + {"BitBltPlugin", "primitiveCopyBits", (void*)primitiveCopyBits}, {"BitBltPlugin", "copyBits", (void*)copyBits}, {"BitBltPlugin", "moduleUnloaded", (void*)moduleUnloaded}, {"BitBltPlugin", "primitiveDrawLoop", (void*)primitiveDrawLoop}, {"BitBltPlugin", "primitiveDisplayString", (void*)primitiveDisplayString}, {"BitBltPlugin", "initialiseModule", (void*)initialiseModule}, {"BitBltPlugin", "loadBitBltFrom", (void*)loadBitBltFrom}, - {"BitBltPlugin", "primitiveCopyBits", (void*)primitiveCopyBits}, {"BitBltPlugin", "setInterpreter", (void*)setInterpreter}, + {"BitBltPlugin", "primitiveWarpBits", (void*)primitiveWarpBits}, {"BitBltPlugin", "getModuleName", (void*)getModuleName}, - {"BitBltPlugin", "primitiveWarpBits", (void*)primitiveWarpBits}, + {"BitBltPlugin", "primitivePixelValueAt", (void*)primitivePixelValueAt}, {"BitBltPlugin", "copyBitsFromtoat", (void*)copyBitsFromtoat}, {NULL, NULL, NULL} }; Modified: trunk/src/plugins/CameraPlugin/CameraPlugin.c =================================================================== --- trunk/src/plugins/CameraPlugin/CameraPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/CameraPlugin/CameraPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:24 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:55 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - CameraPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + CameraPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "CameraPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "CameraPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -64,9 +64,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "CameraPlugin 23 March 2013 (i)" + "CameraPlugin 25 March 2013 (i)" #else - "CameraPlugin 23 March 2013 (e)" + "CameraPlugin 25 March 2013 (e)" #endif ; Modified: trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c =================================================================== --- trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:24 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:55 pm */ /* Automatically generated by - SmartSyntaxPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + SmartSyntaxPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - ClipboardExtendedPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + ClipboardExtendedPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "ClipboardExtendedPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "ClipboardExtendedPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -61,9 +61,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "ClipboardExtendedPlugin 23 March 2013 (i)" + "ClipboardExtendedPlugin 25 March 2013 (i)" #else - "ClipboardExtendedPlugin 23 March 2013 (e)" + "ClipboardExtendedPlugin 25 March 2013 (e)" #endif ; Modified: trunk/src/plugins/CroquetPlugin/CroquetPlugin.c =================================================================== --- trunk/src/plugins/CroquetPlugin/CroquetPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/CroquetPlugin/CroquetPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:18 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:49 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - CroquetPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + CroquetPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "CroquetPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "CroquetPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -70,9 +70,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "CroquetPlugin 23 March 2013 (i)" + "CroquetPlugin 25 March 2013 (i)" #else - "CroquetPlugin 23 March 2013 (e)" + "CroquetPlugin 25 March 2013 (e)" #endif ; Modified: trunk/src/plugins/DBusPlugin/DBusPlugin.c =================================================================== --- trunk/src/plugins/DBusPlugin/DBusPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/DBusPlugin/DBusPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,6 +1,6 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:24 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:56 pm */ /* Automatically generated by - SmartSyntaxPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + SmartSyntaxPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from DBusPlugin DBus-Plugin-dtl.35 uuid: 2ae30f08-4793-4acb-876b-c443a5f5e665 */ @@ -143,9 +143,9 @@ static DBusMessageIter messageIter[DBUS_MAXIMUM_TYPE_RECURSION_DEPTH]; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "DBusPlugin 23 March 2013 (i)" + "DBusPlugin 25 March 2013 (i)" #else - "DBusPlugin 23 March 2013 (e)" + "DBusPlugin 25 March 2013 (e)" #endif ; static DBusMessage* writeMessage; Modified: trunk/src/plugins/DSAPrims/DSAPrims.c =================================================================== --- trunk/src/plugins/DSAPrims/DSAPrims.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/DSAPrims/DSAPrims.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:18 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:49 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - DSAPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + DSAPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "DSAPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "DSAPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -67,9 +67,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "DSAPrims 23 March 2013 (i)" + "DSAPrims 25 March 2013 (i)" #else - "DSAPrims 23 March 2013 (e)" + "DSAPrims 25 March 2013 (e)" #endif ; static sqInt remainderDigitCount; Modified: trunk/src/plugins/DropPlugin/DropPlugin.c =================================================================== --- trunk/src/plugins/DropPlugin/DropPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/DropPlugin/DropPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:18 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:50 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - DropPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + DropPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d */ -static char __buildInfo[] = "DropPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 " __DATE__ ; +static char __buildInfo[] = "DropPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d " __DATE__ ; @@ -62,9 +62,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "DropPlugin 23 March 2013 (i)" + "DropPlugin 25 March 2013 (i)" #else - "DropPlugin 23 March 2013 (e)" + "DropPlugin 25 March 2013 (e)" #endif ; Modified: trunk/src/plugins/FFTPlugin/FFTPlugin.c =================================================================== --- trunk/src/plugins/FFTPlugin/FFTPlugin.c 2013-03-24 03:41:24 UTC (rev 2710) +++ trunk/src/plugins/FFTPlugin/FFTPlugin.c 2013-03-26 01:49:32 UTC (rev 2711) @@ -1,10 +1,10 @@ -/* Smalltalk from Squeak4.3 with VMMaker 4.11.3 translated as C source on 23 March 2013 11:29:18 pm */ +/* Smalltalk from Squeak4.3 with VMMaker 4.11.4 translated as C source on 25 March 2013 9:43:50 pm */ /* Automatically generated by - VMPluginCodeGenerator * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + VMPluginCodeGenerator VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d from - FFTPlugin * VMMaker-dtl.311 uuid: 8c63ed2e-f458-42a0-966a-c43a34a79329 + FFTPlugin VMMaker-dtl.314 uuid: 27bc9a3b-01be-47b3-8e3a-b5f5554a389d @@ Diff output truncated at 50000 characters. @@ |
Free forum by Nabble | Edit this page |