I got the
I have no idea where to start.
Spoiler
letter from the emo and need to find the hideout.
[close]
Spoiler
Can I get rid of the guard somehow? The emo watched my so he's probably near the elderly home.
[close]
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 MenuDynamicSprite*t;
void _compose_tile(int x, int y, DrawingSurface*d1, DrawingSurface*d2, DrawingSurface*d3, DrawingSurface*d4) {
DynamicSprite*temp;
DrawingSurface*ds = t.GetDrawingSurface();
ds.Clear(Game.GetColorFromRGB(255, 0, 255));
temp = DynamicSprite.CreateFromDrawingSurface(d1, x, y, tiledims, tiledims);
ds.DrawImage(0, 0, temp.Graphic);
temp = DynamicSprite.CreateFromDrawingSurface(d2, x, y, tiledims, tiledims);
ds.DrawImage(0, 0, temp.Graphic);
temp = DynamicSprite.CreateFromDrawingSurface(d3, x, y, tiledims, tiledims);
ds.DrawImage(0, 0, temp.Graphic);
temp = DynamicSprite.CreateFromDrawingSurface(d4, x, y, tiledims, tiledims);
ds.DrawImage(0, 0, temp.Graphic);
ds.Release();
temp.Delete();
}
void _str_vs::ReDraw(bool update_guis) {
if (!this.maploaded) return;
DrawingSurface*rds = Room.GetDrawingSurfaceForBackground();
rds.DrawingColor = this.bgc;
rds.DrawRectangle(this.x, this.y, this.x+this.w-1, this.y+this.h-1);
DynamicSprite*map = DynamicSprite.Create(this.tw, this.th, false); // holds final map
DrawingSurface*ds = map.GetDrawingSurface();
ds.Clear(0);
ds.DrawingColor = 15;
t = DynamicSprite.Create(tiledims, tiledims, false);
// update character layers Z1&Z2
this.DrawCharTiles();
// draw all layers together
DrawingSurface*l1 = L1.GetDrawingSurface();
DrawingSurface*l2 = L2.GetDrawingSurface();
DrawingSurface*z1 = Z1.GetDrawingSurface();
DrawingSurface*z2 = Z2.GetDrawingSurface();
int x, y, i, zp, zm;
int xx, yy;
while (y < mapheight) {
x = 0;
while (x < mapwidth) {
i = y * mapwidth + x;
xx = x*tiledims;
yy = y*tiledims;
zp = Tile[i].zplane;
zm = Tile[i].zmode;
if (zp == eZplaneN) {
if (zm == 0) _compose_tile(xx, yy, z1, l1, l2, z2); // (Z1 sprites below ground)
else if (zm == 1) _compose_tile(xx, yy, l1, z1, z2, l2); // (high ground above all sprites)
}
else if (zp == eZplane1) {
if (zm == 0) _compose_tile(xx, yy, l1, l2, z1, z2); // (all ground below sprites)
else if (zm == 1) _compose_tile(xx, yy, l1, z1, l2, z2); // (high ground above Z1 sprites)
}
else if (zp == eZplane2) {
if (zm == 0) _compose_tile(xx, yy, z1, z2, l1, l2); // (all ground above sprites)
else if (zm == 1) _compose_tile(xx, yy, z1, l1, z2, l2); // (ground over sprite)
}
else if (zp == eZplaneT) {
if (zm == 0) _compose_tile(xx, yy, l1, z1, l2, z2); // (all ground above sprites)
else if (zm == 1) _compose_tile(xx, yy, z1, z2, l1, l2); // (all ground above sprites)
}
ds.DrawImage(xx, yy, t.Graphic);
if (zm) ds.DrawPixel(xx+1, yy+1);
x++;
}
y++;
}
ds.Release();
t.Delete();
// canvas change to reflect viewscreen size and offset
map.ChangeCanvasSize(this.w, this.h, this.ox, this.oy);
rds.DrawImage(this.x, this.y, map.Graphic);
rds.Release();
}
VARIABLE = CreateCounter();The next step is setting up the counter. Add a Gui, then call:
Counter[VARIABLE].Setup(GUI*gui_to_use, int width_in_digits, int initial_value = 0, int delay = 5);The Gui is resized automatically, initial_value and delay are optional.
Counter[VARIABLE].SetAppearance(FontType font, int font_color, int bg_color);The border is drawn using the font color.
Counter[VARIABLE].SetValue(int v); .ScrollBy(int by); .ScrollTo(int target);SetValue changes the counter immediately to v, ScrollBy scrolls by times, ScrollTo scrolls to target. Obviously, ScrollBy() allows for negative values. Currently, it's not possible to scroll below 0 or above 10^digits-1 though.
bool ReadMap(String filename) {
File*f;
String fs;
[# SNIP (DynamicSprite is read and displayed fine) SNIP #]
fs = String.Format("tiles/%s#map001.map", filename);
error = "Map file not found";
if (!File.Exists(fs)) return false;
f = File.Open(fs, eFileRead);
error = "Error opening map file";
if (f == null) return false;
int width = f.ReadDoubleword();
...
my_sprite=DynS.Rotate(my_sprite, 10); // rotates my_sprite by 10 degrees
ds.DrawImage(100+my_sprite.XO(), 100+my_sprite.YO(), my_sprite.Graphic);
else lightness=Maths.ArcCos(v[hr].dot(rr))/(Maths.Pi);
lightness=1.0-lightness;
lightness=lightness*light.lightness;
int are, g, b;
are=FloatToInt(IntToFloat(s[fnd].cr)*Maths.RaiseToPower(lightness, red), eRoundNearest);
g=FloatToInt(IntToFloat(s[fnd].cg)*lightness*red, eRoundNearest);
b=FloatToInt(IntToFloat(s[fnd].cb)*lightness*red, eRoundNearest);
RawSetColorRGB(are, g, b);
RawDrawRectangle(x, y, x+renderstep-1, y+renderstep-1);
...
JjNn
YyNn
a_button_give 5 802 803 Dd
0 1 2 Gg
a_button_pick_up 2 800 801 Ee
1 7 8 Pp
...
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.057 seconds with 16 queries.