IDE 1.8.6 / 1.8.7 Compilation Issues

(Pharap) #21

That’s annoying. There ought to be a way to signal ‘copy the value, but don’t write back to the variable’.

(Scott) #22

@filmote, @Mr.Blinky, @Pharap,

I’ve incorporated @Mr.Blinky’s PR that contains the fixes (and optimisations) to drawPixel() for this problem. PRs by @Pharap, adding a new generateRandomSeed() function and enhancements for collision detection features, are also included.

The new version is labelled 5.2.0 and is on the master branch in the GitHub repository.

I’ve done some quick testing but would appreciate it if any of you, or anyone else, would test it with code that exhibited the problem and any other code that you see fit.

If everything appears to be OK with the changes, I’ll tag and release it.


(Simon) #23

Nice work … I will give it a go soon.

What are these?

(Scott) #24

Just some minor changes that @Pharap contributed:

  • Added default and fully initialising constructors for the Point and Rect objects.
  • Made the collide() functions static.

(Pharap) #25

Basically the following is now valid:

// 1) Point(x, y) ctor
Point point = Point(1, 2);

// 2) Point() ctor
Point pointB = Point();

// 3) Rect(x, y, w, h) ctor
Rect rect = Rect(2, 3, 4, 5);

// 4) Rect() ctor
Rect rectB = Rect();

// 5) static collide(Point, Rect) overload
if(Arduboy2::collide(point, rect))
	// ect

// 6) static collide(Rect, Rect) overload
if(Arduboy2::collide(rectB, rect))
	// ect

Arduboy2 - The now recommended alternative to the Arduboy Library