Giter Site home page Giter Site logo

Comments (2)

4ian avatar 4ian commented on April 28, 2024

Fixed in da872e8
I've also fixed a crash when floodfilling a tile using the same tile id (causing an infinite loop) and when using the pencil with the mouse at a position which is at the left or the top of the origin 0;0.

When possible, always try to use unsigned int to represent coordinates, it ensures that these numbers won't be negative 😃 The only tricky point with unsigned int is:

unsigned int a = 1;
if (a-1 >= 0) a--;
//here a == 0 as expected
if (a-1 >= 0) a--;
//here a was decreased because when doing a-1 with a ==0, the result was not -1 but the maximum value for unsigned int, so the condition in the if was *true*. And because of it, the -- operator was applied and so now a is equal to the maximum value for unsigned int.
//Instead, when dealing with unsigned int, you should always do:
if (a >= 1) a--;
//if you need to test if you can decrease an unsigned int.

from gdevelop.

victorlevasseur avatar victorlevasseur commented on April 28, 2024

Ok, thanks

2015-01-04 17:11 GMT+01:00 Florian Rival [email protected]:

Closed #67 #67.


Reply to this email directly or view it on GitHub
#67 (comment).

Victor LEVASSEUR
[email protected]

from gdevelop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.