ObjFW  Check-in [71237f1a49]

Overview
Comment:OFMatrix4x4: Move values to ivars

This should work now that objects are properly aligned.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 71237f1a49ca953bfefad1aa6dcb47df44ff7c1f4f5b14b995a67e337cca950d
User & Date: js on 2024-03-28 15:58:47
Other Links: manifest | tags
Context
2024-03-28
18:29
Properly align objects on MS-DOS check-in: 5fd6d0a46d user: js tags: trunk
15:58
OFMatrix4x4: Move values to ivars check-in: 71237f1a49 user: js tags: trunk
14:33
OFStdIOStream: Handle colors properly on MS-DOS check-in: 831e85a953 user: js tags: trunk
Changes

Modified src/OFMatrix4x4.h from [49eeebb49a] to [e3aa63e106].

19
20
21
22
23
24
25
26

27
28
29
30
31
32
33
19
20
21
22
23
24
25

26
27
28
29
30
31
32
33







-
+








/**
 * @brief A 4x4 matrix of floats.
 */
OF_SUBCLASSING_RESTRICTED
@interface OFMatrix4x4: OFObject <OFCopying>
{
	float (*_values)[4];
	OF_ALIGN(16) float _values[4][4];
}

#ifdef OF_HAVE_CLASS_PROPERTIES
@property (readonly, class) OFMatrix4x4 *identityMatrix;
#endif

/**

Modified src/OFMatrix4x4.m from [9ade524fc2] to [67c177d7d9].

258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
258
259
260
261
262
263
264












265
266
267
268
269
270
271







-
-
-
-
-
-
-
-
-
-
-
-







		    transformVectors_3DNow)
	}

# undef REPLACE
}
#endif

+ (instancetype)alloc
{
	OFMatrix4x4 *instance;
	float (*values)[4];

	instance = OFAllocObject(self, 16 * sizeof(float), 16,
	    (void **)&values);
	instance->_values = values;

	return instance;
}

+ (OFMatrix4x4 *)identityMatrix
{
	return [[[OFMatrix4x4 alloc]
	    initWithValues: identityValues] autorelease];
}

+ (instancetype)matrixWithValues: (const float [4][4])values