Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


Well I'm currently away from home, and will be for a week. As for where I am, well I'm in a city called Leicester and living in my brothers house.

Because of this I doubt I'll get any programming done because:
1. I didn't bring my laptop
2. I'm on a mac

However there is a chance that I will do something. If I can get xCode installed then maybe I could get my engine/game working on a mac. Of course this will take a lot of time so then again maybe not.

Anyway here is some code which I converted from blitzMax to c++

void LightMap(int x, int y, int radius)
float a1, a2;
int tx, ty, k;

for (a1 = 0.0f; a1 < 90.0f; a1 += 0.5f)
a2 = a1 * 4.0f;

for (k = 0; k < radius; k ++)
tx = x + (cos(a2) * k) + (tileset.width / 2.0f); // Needs to be centred so add 1/2 tile width/height
ty = y - (sin(a2) * k) + (tileset.height / 2.0f);

tx = tx / tileset.width;
ty = ty / tileset.height;

if (tx > 0 && tx < width && ty > 0 && ty < height)
tile[tx][ty].explored = true;

if (tile[tx][ty].vBlock == true)
tile[tx][ty].fogged = false;

-- Not sure if it works, this is just a rough interpretation of the code. I have a working version at home.
Sign in to follow this  


Recommended Comments

Original post by Ravuya
You can get Xcode from the developer site (

Spending your vacation porting software, erm, well...

Thanks. I all ready had it downloaded but I need to wait for my brother to get back from work for the admin password.

Share this comment

Link to comment
It should be the password of whatever user account you're currently using, assuming it's an adminstrator and you know the password.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now