There is no case, we can spend more days on this same path and it will be the same. I can understand a code doing reverse engineering, I can understand certain things, but this is beyond me. I want to spend my time doing 3d things for the game, not fighting against code.
Code: Select all
grf {
grfid: "NML\44";
name: string(STR_REALHOUSETOWN_NAME);
desc: string(STR_REALHOUSETOWN_DESC);
version: 0;
min_compatible_version: 0;
}
cargotable {
PASS, MAIL, GOOD, FOOD , RCYC
}
/*Road North East*/
spriteset (spriteset_realhousetown_northeast, "realhousetown.png") {
[98, 8, 44, 36, -22, 0, NOCROP]
}
alternative_sprites (spriteset_realhousetown_northeast, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, "realhousetown_32.png") {
[0, 0, 256, 256, -109, -154, NOCROP]
}
spritelayout spritelayout_realhousetown_northeast {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhousetown_northeast;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xextent: 8;
yextent: 16;
zextent: 27;
xoffset: 4;
yoffset: 2;
zoffset: 0;
hide_sprite: 0;
}
}
/*Road South East*/
spriteset (spriteset_realhousetown_southeast, "realhousetown.png") {
[98, 8, 44, 36, -22, 0, NOCROP]
}
alternative_sprites (spriteset_realhousetown_southeast, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, "realhousetown_32.png") {
[259, 0, 256, 256, -109, -154, NOCROP]
}
spritelayout spritelayout_realhousetown_southeast {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhousetown_southeast;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xextent: 8;
yextent: 16;
zextent: 27;
xoffset: 4;
yoffset: 2;
zoffset: 0;
hide_sprite: 0;
}
}
/*Road South West*/
spriteset (spriteset_realhousetown_southwest, "realhousetown.png") {
[98, 8, 44, 36, -22, 0, NOCROP]
}
alternative_sprites (spriteset_realhousetown_southwest, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, "realhousetown_32.png") {
[518, 0, 256, 256, -109, -154, NOCROP]
}
spritelayout spritelayout_realhousetown_southwest{
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhousetown_southwest;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xextent: 8;
yextent: 16;
zextent: 27;
xoffset: 4;
yoffset: 2;
zoffset: 0;
hide_sprite: 0;
}
}
/*Road North West*/
spriteset (spriteset_realhousetown_northwest, "realhousetown.png") {
[98, 8, 44, 36, -22, 0, NOCROP]
}
alternative_sprites (spriteset_realhousetown_northwest, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, "realhousetown_32.png") {
[777, 0, 256, 256, -109, -154, NOCROP]
}
spritelayout spritelayout_realhousetown_northwest {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhousetown_northwest;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xextent: 8;
yextent: 16;
zextent: 27;
xoffset: 4;
yoffset: 2;
zoffset: 0;
hide_sprite: 0;
}
}
/* North, South... */
/* North Corner */
spriteset (spriteset_realhousetown_northcorner, "realhousetown.png") {
[98, 8, 44, 36, -22, 0, NOCROP]
}
alternative_sprites (spriteset_realhousetown_northcorner, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, "realhousetown_32.png") {
[0, 259, 256, 256, -109, -154, NOCROP]
}
spritelayout spritelayout_realhousetown_northcorner {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhousetown_northcorner;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xextent: 8;
yextent: 16;
zextent: 27;
xoffset: 4;
yoffset: 2;
zoffset: 0;
hide_sprite: 0;
}
}
/* East Corner */
spriteset (spriteset_realhousetown_eastcorner, "realhousetown.png") {
[98, 8, 44, 36, -22, 0, NOCROP]
}
alternative_sprites (spriteset_realhousetown_eastcorner, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, "realhousetown_32.png") {
[259, 259, 256, 256, -109, -154, NOCROP]
}
spritelayout spritelayout_realhousetown_eastcorner {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhousetown_eastcorner;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xextent: 8;
yextent: 16;
zextent: 27;
xoffset: 4;
yoffset: 2;
zoffset: 0;
hide_sprite: 0;
}
}
/* South Corner */
spriteset (spriteset_realhousetown_southcorner, "realhousetown.png") {
[98, 8, 44, 36, -22, 0, NOCROP]
}
alternative_sprites (spriteset_realhousetown_southcorner, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, "realhousetown_32.png") {
[518, 259, 256, 256, -109, -154, NOCROP]
}
spritelayout spritelayout_realhousetown_southcorner{
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhousetown_southcorner;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xextent: 8;
yextent: 16;
zextent: 27;
xoffset: 4;
yoffset: 2;
zoffset: 0;
hide_sprite: 0;
}
}
/* West Corner */
spriteset (spriteset_realhousetown_westcorner, "realhousetown.png") {
[98, 8, 44, 36, -22, 0, NOCROP]
}
alternative_sprites (spriteset_realhousetown_westcorner, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, "realhousetown_32.png") {
[777, 259, 256, 256, -109, -154, NOCROP]
}
spritelayout spritelayout_realhousetown_westcorner {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhousetown_westcorner;
recolour_mode: RECOLOUR_REMAP;
palette: PALETTE_USE_DEFAULT;
xextent: 8;
yextent: 16;
zextent: 27;
xoffset: 4;
yoffset: 2;
zoffset: 0;
hide_sprite: 0;
}
}
/* Switches */
switch (FEAT_HOUSES, SELF, switch_combined, animation_frame,
nearby_tile_class( 0, -1) == TILE_CLASS_ROAD | // this line has value 1 if true, 0 if false
nearby_tile_class(-1, 0) == TILE_CLASS_ROAD << 1 | // this line has value 2 if true, 0 if false
nearby_tile_class( 0, 1) == TILE_CLASS_ROAD << 2 | // this line has value 4 if true, 0 if false
nearby_tile_class( 1, 0) == TILE_CLASS_ROAD << 3 // this line has value 8 if true, 0 if false
)
{
0: spritelayout_realhousetown_northcorner;
1: spritelayout_realhousetown_northwest;
2: spritelayout_realhousetown_northeast;
4: spritelayout_realhousetown_southeast;
8: spritelayout_realhousetown_southwest;
3: spritelayout_realhousetown_northcorner;
5: spritelayout_realhousetown_southeast;
6: spritelayout_realhousetown_eastcorner;
9: spritelayout_realhousetown_westcorner;
10: spritelayout_realhousetown_southwest;
12: spritelayout_realhousetown_southcorner;
7: spritelayout_realhousetown_northeast;
11: spritelayout_realhousetown_northwest;
13: spritelayout_realhousetown_southwest;
14: spritelayout_realhousetown_southeast;
15: spritelayout_realhousetown_southeast;
}
/* Switches End */
item (FEAT_HOUSES, item_realhousetown, -1, HOUSE_SIZE_1X1) {
property {
substitute: 2;
override: 2;
population: 90;
mail_multiplier: 30;
accepted_cargos: [[PASS, 4], [MAIL, 3], [GOOD, 3]];
probability: 10;
years_available: [1855, 2050];
name: string(STR_REALHOUSETOWN_HOUSE);
availability_mask: [ALL_TOWNZONES, ALL_CLIMATES];
building_flags : bitmask(HOUSE_FLAG_ANIMATE);
animation_info : [ANIMATION_LOOPING, 1];
}
graphics {
default: switch_combined;
anim_control: switch_combined;
}
}