Permalink
Commits on Aug 7, 2017
  1. Merge pull request #60 from fabianschuiki/sfml2_port

    fabianschuiki committed Aug 7, 2017
    Sfml2 port
  2. Merge pull request #59 from matthewharvey/sfml2_port

    fabianschuiki committed Aug 7, 2017
    Sfml2 port
Commits on Aug 6, 2017
  1. Fix rendering of Metro station

    matthewharvey committed Aug 6, 2017
    Kind of, as the "fir" still renders over top of the tunnel,
    but that may or may not be the original behaviour.
    Before this it was rendering in the entirely wrong place, so this
    is a step up.
  2. Fixing conditional rendering on the vertical edges

    matthewharvey committed Aug 6, 2017
    The logic was a little bit wrong, such that the sprites were
    disappearing when the far edge went over the side of the screen
    instead of waiting until the sprite had entirely disappeared.
  3. Fix conditional rendering of items

    matthewharvey committed Aug 6, 2017
    This section of code has absolutely baffled me for days. In the end,
    it was a simple change of coordinate system that was throwing me off.
    I have added a large comment explaining why the confusing change that
    I've added was necessary. Hopefully this discovery about inconsistent
    coordinate systems can be reconciled in the future. I suspect that
    this may have changed from SFML 1.6 to SFML 2.0+
  4. Add convenience function

    matthewharvey committed Aug 6, 2017
    This makes the units clearer, and by existing, makes the units for
    the other one clearer.
Commits on Jul 2, 2017
  1. Use the local variable instead of the class version

    matthewharvey committed May 14, 2017
    This is just a quick cleanup. Mostly pointless.
  2. Use functions instead of members

    matthewharvey committed Dec 20, 2016
    Just a small cleanup I noticed while fixing other things.
  3. Amending gitignore for my workflow

    matthewharvey committed Dec 18, 2016
    Kind of a shameless commit, but others use these temporary files
    in their workflow as well, so it isn't too bad.
Commits on Dec 11, 2016
  1. Fix the rendering of elevator queues

    matthewharvey committed Dec 11, 2016
    All people were being rendered at x = ~0, which was obviously a
    problem. Also they were assuming that the elevators started
    at 0, which was breaking underground elevators.
  2. Only add fire escape stairs on floors above ground

    matthewharvey committed Dec 11, 2016
    I'm not sure if there was anything else added in the real game,
    but I'm fairly sure there aren't any fire escapes underground
    or on the lobby.
  3. Fix positioning of elevators

    matthewharvey committed Dec 11, 2016
    Somewhere along the line (I think just with the SFML interface changes)
    elevators stopped moving, and this unifies the code that moves the
    elevator sprite and uses only the altitude variable to determine
    where that sprite should go.
    This also works for elevators that have cover basement floors, which
    is nice.
  4. Fix rendering of numbers on elevator shaft

    matthewharvey committed Dec 11, 2016
    I think I might have accidentally switched the logic
    around here and am now solving bugs of my own creation, but
    I can't figure out how the original logic would have worked
    so I'm ploughing ahead.
  5. Fix rendering of halls and cinemas

    matthewharvey committed Dec 11, 2016
    The position of the sprite was never being set.
    I'm still not sure whether animations are working
    for these items yet. They seemed to be at least kind of working.
  6. Removing useless debug log

    matthewharvey committed Dec 11, 2016
  7. Fix creating elevators to lower floors

    matthewharvey committed Dec 11, 2016
    Before, elevators were assumed to start at floor 0. The numbers still
    follow this assumption, which will need to be fixed later.
Commits on Dec 10, 2016
  1. Small refactor

    matthewharvey committed Dec 10, 2016
    If we are going to negate it whenever using it,
    then why not just negate it at the beginning.
  2. Fixing math in getMouseRegion for Items

    matthewharvey committed Dec 10, 2016
    The game was having trouble figuring out which item
    was underneath the cursor because this function was
    returning the wrong type of rectangle. This also makes
    it clear that the position is in game coordinates and
    not pixel coordinates.
    This fixes the extending of elevators, as well as some
    other things I'm sure.
  3. Marking overridden function as override

    matthewharvey committed Dec 10, 2016
    Just for safety
Commits on Jul 27, 2016
  1. Merge pull request #58 from matthewharvey/sfml2_port

    fabianschuiki committed Jul 27, 2016
    Sfml2 port
Commits on Jul 24, 2016
  1. Fix elevator rendering

    matthewharvey committed Jul 24, 2016
    The position of the Item is in game coordinates, and the
    position of the sprite is in pixel coordinates.
    There were some more conflicts with regards to this. I also
    fixed some things to make the elevator rendering line up properly.
    
    I'm fairly sure that this code can only handle elevators that are
    started at the lobby. This will need to be fixed at some point.
  2. Fixing rendering of GUI windows

    matthewharvey committed Jul 24, 2016
    The "black" colour element wasn't working for me. It was just
    rendering a black box over the time and map GUI boxes.
    Changing the colour of those to be the same method
    (using the background-color attribute) as the tool box.
Commits on Jun 20, 2016
  1. Making game information more readable

    matthewharvey committed Jun 20, 2016
    When reading the code for dealing with events I was very confused
    by what the numbers refered to, so I made an enum to give meaningful
    names to the numbers.
    I put it in the OT namespace but not the Item namespace because I
    didn't want to prefix that in front of all of the names in Game.cpp.
Commits on Jun 19, 2016
  1. Fix rendering of floors

    matthewharvey committed Jun 19, 2016
    I suspect that there are still some corner cases that will be
    messed up regarding floors, but for right now they render correctly
    in all of the basic cases that I cared to try.
    The fix involves making sure that we were setting the sprites to
    the right coordinates.
  2. Fix rendering of stairs

    matthewharvey committed Jun 19, 2016
    Again, must convert game coords to pixels.
  3. Fix rendering of restaurants

    matthewharvey committed Jun 19, 2016
    We must convert game coords of the position into pixel
    coords before rendering the sprite.
  4. Return size in game coords, not pixel coords

    matthewharvey committed Jun 19, 2016
    Also add a function that returns pixel coords when we want them.
    This new function is called from nowhere right now.
    Also make a function const that wasn't before.
  5. Fix rendering of FastFood

    matthewharvey committed Jun 19, 2016
    Position is in game coordinates, which must be converted into
    pixel coordinates for the sprite.