iAway

Published August 10, 2007
Advertisement
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)				{					break;			        }				else				{					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.
Previous Entry Mouse DrIvEn CrAzY!
Next Entry beeer
0 likes 3 comments

Comments

Ravuya
You can get Xcode from the developer site (developer.apple.com).

Spending your vacation porting software, erm, well...
August 10, 2007 09:07 AM
diablo_tk
Quote:Original post by Ravuya
You can get Xcode from the developer site (developer.apple.com).

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.
August 10, 2007 10:35 AM
Ravuya
It should be the password of whatever user account you're currently using, assuming it's an adminstrator and you know the password.
August 10, 2007 10:58 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Well...

1034 views

Updgrade

1054 views

giff (t)

1125 views

Also

1165 views

...

557 views

Is this thing on?

900 views

Rewrite Done

1001 views

R

1041 views

Codename

914 views

Playground

871 views
Advertisement