Thanks for flagging this up. This looks useful!
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
DrawingSurface* redline = Room.GetDrawingSurfaceForBackground(0);
DrawingSurface* backup = redline.CreateCopy();
redline.DrawingColor=63488;
redline.DrawLine(cCD.x, cCD.y-4, oIceCube.X+3, oIceCube.Y-3, 1);
oIceCube.SetView(22);
oIceCube.Animate(0, 20, eOnce, eBlock, eForwards);
while (SoundFX.IsPlaying) Wait(1);
redline.DrawSurface(backup);
backup.Release();
redline.Release();
Occupation | Job, or how they make ends meet/prosper. |
Age + Sex | At least which of the seven ages of man they fall into. Possibly birthdate. Oh, and gender. |
Species | Race or Species; Important in a Fantasy story |
Abilities | Notable strengths and skills |
Weaknesses | Addictions, Aversions, Disabilities; Frailties of Character and Body |
Goals | Especially in the story; what they are trying to do. |
Clothes | The clothes disclose the person. |
Appearance | Maybe have something to aim at in text; but this is basically the graphics. |
Possessions | On person and at home; Things they can use or have taken from them. |
Names | What they are called by different people. 'Real' name and nicknames, if any. |
Associates | Friends, Family, Pets, Colleagues. The people and animals in their life. |
Rivals | Opponents, Enemies |
History | Childhood. Defining episodes in their life. |
Home | Where they live; this says as much about them as their clothes. There home may be a room or rooms that are graphics in the game. |
Likes | From preferences to obsessions. Things they will gravitate to. |
Dislikes | From mild dislikes to full-blown phobias. Anything they are repelled by and will seek to avoid. |
Beliefs | Religion. Politics. Delusions. Principles. |
Coping | How they deal with conflict and change. |
Hobbies | Things that do for the love of it; Gardening, jigsaws, collecting stamps, whatever. |
Quirks | Habits and mannerisms; an annoying laugh, nose picking, playing with loose change in pocket etc. |
Personality | 'Nice','Whiny','Sarcastic' ; that sort of thing. |
Role | The functions they have in the game. |
// Get five buttons in the correct order
int RightButt[5];
int RBInd;
int result;
int GoodButt(int theButt) {
if(theButt==RightButt[RBInd]) {
if (RBInd==4) {
RBInd=0;
cEgo.Say("I've done it!");
return 3;
}
RBInd++;
cEgo.Say("So far so good!");
return 2;
}
int ButtErr=0;
while (ButtErr<5) {
if (theButt==RightButt[ButtErr]) {
RBInd=0;
cEgo.Say("Drat! Back to Square One.");
return 0; //Fail
}
ButtErr++;
}
cEgo.Say("That one didn't count.");
return 1; //Neutral choice; still good to go
}
function room_FirstLoad(){
RightButt[0]=oButt4.ID;
RightButt[1]=oButt9.ID;
RightButt[2]=oButt3.ID;
RightButt[3]=oButt1.ID;
RightButt[4]=oButt7.ID;
RBInd=0;
}
function oButt1_Interact(){
result=GoodButt(oButt1.ID);
}
function oButt2_Interact(){
result=GoodButt(oButt2.ID);
}
function oButt3_Interact(){
result=GoodButt(oButt3.ID);
}
function oButt4_Interact(){
result=GoodButt(oButt4.ID);
}
function oButt5_Interact(){
result=GoodButt(oButt5.ID);
}
function oButt6_Interact(){
result=GoodButt(oButt6.ID);
}
function oButt7_Interact(){
result=GoodButt(oButt7.ID);
}
function oButt8_Interact(){
result=GoodButt(oButt8.ID);
}
function oButt9_Interact(){
result=GoodButt(oButt9.ID);
}
DynamicSprite* theroom;
DrawingSurface* themask;
Hotspot* hot;
function noloopcheck DrawHots(int xfrom, int yfrom, int xto, int yto) {
int xcount;
int ycount;
xcount = xfrom;
while (xcount<xto) {
ycount = yfrom;
while (ycount<yto) {
hot = Hotspot.GetAtScreenXY(xcount, ycount);
if (hot.ID==0) themask.DrawingColor = 0;
else {
if (Room.ColorDepth==32) themask.DrawingColor = 65536+hot.ID;
else {
if (hot.ID<32) themask.DrawingColor = 31+hot.ID;
else themask.DrawingColor = 224+hot.ID;
}
}
themask.DrawPixel(xcount, ycount);
ycount++;
}
xcount++;
}
}
function GrabHotspots() {
bool isenabled[50];
int xviewstore = GetViewportX();
int yviewstore = GetViewportY();
theroom = DynamicSprite.CreateFromBackground();
themask = theroom.GetDrawingSurface();
int hcount = 1;
while (hcount<50) {
isenabled[hcount]=hotspot[hcount].Enabled;
hotspot[hcount].Enabled=true;
hcount++;
}
SetViewport(0, 0);
DrawHots(0, 0, theroom.Width, theroom.Height);
hcount = 1;
while (hcount<50) {
hotspot[hcount].Enabled=isenabled[hcount];
hcount++;
}
SetViewport(xviewstore, yviewstore);
themask.Release();
String filename;
filename = String.Format("Room%dHotspots.bmp",player.Room);
theroom.SaveToFile(filename);
theroom.Delete();
}
DynamicSprite* theroom;
DrawingSurface* themask;
Hotspot* hot;
function noloopcheck DrawHots(int xfrom, int yfrom, int xto, int yto) {
int xcount;
int ycount;
xcount = xfrom;
while (xcount<xto) {
ycount = yfrom;
while (ycount<yto) {
hot = Hotspot.GetAtScreenXY(xcount, ycount);
// To-do: Fix drawing colours to shades of blue so its easy to convert to gif and re-import.
themask.DrawingColor = hot.ID;
themask.DrawPixel(xcount, ycount);
ycount++;
}
xcount++;
}
}
function GrabHotspots() {
theroom = DynamicSprite.CreateFromBackground();
themask = theroom.GetDrawingSurface();
// To-do: Save hotspots.Enabled values and Viewport coordinates to restore later.
int hcount = 1;
while (hcount<50) {
hotspot[hcount].Enabled=true;
hcount++;
}
SetViewport(0, 0);
DrawHots(0, 0, theroom.Width, theroom.Height);
themask.Release();
theroom.SaveToFile("RoomHotspots.bmp");
theroom.Delete();
}
DynamicSprite* theroom;
DrawingSurface* themask;
int roomwidth;
int roomheight;
Hotspot* hot;
function DrawBlock(int xfrom, int yfrom, int xto, int yto) {
int xcount;
int ycount;
xcount = xfrom;
while (xcount<xto) {
ycount = yfrom;
while (ycount<yto) {
hot = Hotspot.GetAtScreenXY(xcount, ycount);
themask.DrawingColor = hot.ID;
themask.DrawPixel(xcount, ycount);
ycount++;
}
xcount++;
}
}
function BlocksAcross(int ystart) {
int thiswidth;
int thisheight=ystart+240;
if (roomheight<thisheight) thisheight = roomheight;
int xstart = 0;
thiswidth = 320;
if (roomwidth<thiswidth)thiswidth = roomwidth;
DrawBlock(xstart, ystart, thiswidth, thisheight);
if (thiswidth==roomwidth) return;
xstart+=320;
thiswidth +=320;
if (roomwidth<thiswidth)thiswidth = roomwidth;
DrawBlock(xstart, ystart, thiswidth, thisheight);
if (thiswidth==roomwidth) return;
xstart+=320;
thiswidth +=320;
if (roomwidth<thiswidth)thiswidth = roomwidth;
DrawBlock(xstart, ystart, thiswidth, thisheight);
if (thiswidth==roomwidth) return;
//repeat this if the room is any wider
}
function GrabHotspots() {
theroom = DynamicSprite.CreateFromBackground();
themask = theroom.GetDrawingSurface();
roomwidth=theroom.Width;
roomheight=theroom.Height;
// The next two operations mess up the game; Fix this later.
int hcount = 1;
while (hcount<50) {
hotspot[hcount].Enabled=true;
hcount++;
}
SetViewport(0, 0);
BlocksAcross(0);
if (roomheight>=240)BlocksAcross(240);
if (roomheight>=(240*2)) BlocksAcross(240*2);
// add lines if the room is any deeper
themask.Release();
theroom.SaveToFile("RoomHotspots.bmp");
theroom.Delete();
}
Quote from: Sunny Penguin on Tue 25/06/2013 02:53:12Well, yes.
When you know, you'll know.
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.140 seconds with 18 queries.