Im canadian and pronounce it "ah-bowt"...I have cousins in newfoundland though and they definitely pronounce it "a-boot"...sounds pretty silly that way actually.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
bool InsideBounds_ISO(this Character*, int iX1, int iY1, int iX2, int iY2) //iMinX's vector (x,y) and iMax's vector(x,y)
{
int iXs;
int iYs;
int iXp;
int iYp;
if (sCarDirection != "Null")
{
if (sCarDirection == "NW" || sCarDirection == "SE") //calibrate
{
iXs = -10;
iYs = 10;
}
else if (sCarDirection == "SW")// || sCarDirection == "NE")
{
//Display("SW");
iXs = -10; //should be -13 at bottom of lane, -10 at top of lane: investigate
iYs = 10;
}
else // N,S,E,W //calibrate
{
iXs = 10;
iYs = -10;
}
iXp = this.x + iXs; //if using 42x42 sprite car
iYp = this.y + iYs; //if using 42x42 sprite car
}
//String debug = String.Format("x: %d y: %d", iXp, iYp);
//lblHotspot.Text = debug;
// d is vector from X1;Y1 to X2;Y2
float dx = IntToFloat(iX2 - iX1), dy = IntToFloat(iY2 - iY1);
// a is vector from X1;Y1 to top corner
// b is vector from X1;Y1 to bottom corner (a + b = d)
float bx = (m*dx - dy)/(2.0*m);
float ax = dx - bx;
float ay = m * ax, by = -m * bx;
// express character coords using a & b
// p is vector from X1,Y1 to character
float px = IntToFloat(iXp - iX1), py = IntToFloat(iYp - iY1);
float det = ay*bx - ax*by;
// p = k*a + l*b
float k = (bx*py - by*px)/det;
float l = (ay*px - ax*py)/det;
// => if both k & l are inside [0;1], character is inside parallelogram
return (k >= 0.0 && k <= 1.0 && l >= 0.0 && l <= 1.0);
}
//in the driving map room.asc:
function on_key_press(int keycode)
{
if (IsKeyPressed(375)) //LEFT TURN
{
setTurnTimerValue(0);
if (bLeftKeyHOLD == false) carDrive_LEFT(eManual, 0);
}
}
// in my driving module:
void setTurnTimerValue(int iMode)
{
if (iMode == 0) //Left
{
if (fDrive_Angle == 210.0 || fDrive_Angle == 30.0) iTurnTimer = 17; //NW or SE
else if (fDrive_Angle == 330.0 || fDrive_Angle == 150.0) iTurnTimer = 20; //NE or SW
else
{
iTurnTimer = 0;
return;
}
}
}
function repeatedly_execute()
{
if (!bAutomatic) //Manual
{
//TURN MANUAL
if (IsKeyPressed(375)) processQuickTurn_Left(1);
else
{
iHoldKeyPressLeft = 0;
if (bLeftKeyHOLD) bLeftKeyHOLD = false;
}
}
#define KEYHOLD 15 //in the .ash
void processQuickTurn_Left(int iMode)
{
if (iMode == 1) //Manual
{
if (iHoldKeyPressLeft >= KEYHOLD)
{
if (!bLeftKeyHOLD) bLeftKeyHOLD = true;
//value of iTurnTimer is set in the room, at "on_key_press"
if (iHoldKeyPressLeft < iTurnTimer)
{
rotateCar_TAP(-30.0); //script that rotates the car by 30 degree increments
iHoldKeyPressLeft++;
}
}
iHoldKeyPressLeft++;
}
}
//when a hotspot in the room is clicked on (to test):
dsCurrentMap = Room.GetDrawingSurfaceForBackground();
dsMapBackup = dsCurrentMap.CreateCopy();
dsCurrentMap.DrawImage(512, 384, 3875);
dsCurrentMap.Release();
Wait(1); //all the above doesnt show the sprite
//however, when I un-comment out the lines below, now the sprite appears (with the yellow line):
/*
DrawingSurface *surface2 = Room.GetDrawingSurfaceForBackground();
surface2.DrawingColor = 14;
surface2.DrawLine(0, 0, 512, 384, 5);
surface2.Release();
*/
dsCurrentMap = Room.GetDrawingSurfaceForBackground();
dsCurrentMap.DrawImage(512, 384, 3648);
dsMapBackup = dsCurrentMap.CreateCopy();
dsCurrentMap.DrawSurface(dsMapBackup);
dsCurrentMap.Release();
dsMapBackup.Release();
DrawingSurface *surface2 = Room.GetDrawingSurfaceForBackground();
surface2.DrawingColor = 14;
surface2.DrawLine(0, 0, 2000, 1750, 5);
surface2.Release();
//global
DrawingSurface *dsCurrentMap;
export dsCurrentMap;
DrawingSurface *dsMapBackup;
export dsMapBackup;
void drawLabelsOnCityMap(int iX, int iY, int iMapLabels)
{
dsCurrentMap = Room.GetDrawingSurfaceForBackground();
dsMapBackup = dsCurrentMap.CreateCopy();
dsCurrentMap.DrawImage(0, 0, iMapLabels, 0);
dsCurrentMap.Release();
}
//when button is pressed:
void manageStreetNamesOverlay(int iRoom)
{
int iOverlayLabelSprite;
if (iRoom == 299) iOverlayLabelSprite = 3639;
//else if (iRoom ==) iOverlayLabelSprite =;
if (bStreetNamesOn && !bStreetActivated) //Show Labels
{
Display("Draw labels onto background"); //debug line
Wait(40);
drawLabelsOnCityMap(0, 0, iOverlayLabelSprite);
//SetBackgroundFrame(1); //WITH DUPLICATE ROOM + LABELS PNG
bStreetActivated = true;
}
else if (!bStreetNamesOn && bStreetActivated) //Hide Labels
{
Display("Remove map labels..."); //debug line
Wait(40);
//**do "revert to original background image (dsMapBackup) script" and place it here
//SetBackgroundFrame(0); //WITH DUPLICATE ROOM + LABELS PNG
bStreetActivated = false;
}
}
void getCarDirection()
{
// leaving out the in-between angles for now, do later
if (iCarSprite == 4452) sCarDirection = "N"; // 270º
else if (iCarSprite == 4541) sCarDirection = "E"; // 360º
else if (iCarSprite == 4272) sCarDirection = "S"; // 90º
else if (iCarSprite == 4362) sCarDirection = "W"; // 180º
else if (iCarSprite == 4500) sCarDirection = "NE"; // 330º
else if (iCarSprite == 4402) sCarDirection = "NW"; // 210º
else if (iCarSprite == 4222) sCarDirection = "SE"; // 30º
else if (iCarSprite == 4320) sCarDirection = "SW"; // 150º
else sCarDirection = "Null";
}
//at top of the bounds script
int iXs;
int iYs;
int iXp;
int iYp;
if (sCarDirection != "Null")
{
if (sCarDirection == "S" || sCarDirection == "SE" ||sCarDirection == "SW")
{
iXs = -10;
iYs = 10;
}
else if (sCarDirection == "N" || sCarDirection == "NE" ||sCarDirection == "NW")
{
iXs = 10;
iYs = -10;
}
iXp = this.x + iXs; //if using 42x42 sprite car
iYp = this.y + iYs; //if using 42x42 sprite car
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.074 seconds with 14 queries.