Numerous changes to terrain and trim. The changes to the scneario editor work as expected.
- New way of drawing walkway (doesn't work yet) - New way of drawing roads (doesn't yet work correctly) - New way of drawing trim (not tested yet) - New way of handling marked specials (works in editor but not in game) - New way of handling two-space rubble in the editor (works as expected) - Merged several terrain special properties - Deprecated several terrain graphics - Completed (probably) the import & convert code for old-format terrain - Probably other things that I have forgotten that have something to do with terrain - A few other little things, bugfixes, etc git-svn-id: http://openexile.googlecode.com/svn/trunk@56 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -9,13 +9,22 @@
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
extern cScenario scenario;
|
||||
|
||||
__attribute__((deprecated))
|
||||
void cTinyTown::append(legacy::tiny_tr_type& old){
|
||||
int i,j;
|
||||
cField the_field;
|
||||
the_field.type = 1;
|
||||
for (i = 0; i < 32; i++)
|
||||
for (j = 0; j < 32; j++) {
|
||||
_terrain[i][j] = old.terrain[i][j];
|
||||
_lighting[i / 8][j] = old.lighting[i / 8][j];
|
||||
_lighting[i / 8][j] = old.lighting[i / 8][j];
|
||||
if(scenario.ter_types[_terrain[i][j]].i == 3000) { // marker to indicate it used to be a special spot
|
||||
the_field.loc.x = i;
|
||||
the_field.loc.y = j;
|
||||
preset_fields.push_back(the_field);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 16; i++) {
|
||||
_room_rect[i].top = old.room_rect[i].top;
|
||||
@@ -47,10 +56,17 @@ void cTinyTown::append(legacy::tiny_tr_type& old){
|
||||
__attribute__((deprecated))
|
||||
void cMedTown::append(legacy::ave_tr_type& old){
|
||||
int i,j;
|
||||
cField the_field;
|
||||
the_field.type = 1;
|
||||
for (i = 0; i < 48; i++)
|
||||
for (j = 0; j < 48; j++) {
|
||||
_terrain[i][j] = old.terrain[i][j];
|
||||
_lighting[i / 8][j] = old.lighting[i / 8][j];
|
||||
_lighting[i / 8][j] = old.lighting[i / 8][j];
|
||||
if(scenario.ter_types[_terrain[i][j]].i == 3000) { // marker to indicate it used to be a special spot
|
||||
the_field.loc.x = i;
|
||||
the_field.loc.y = j;
|
||||
preset_fields.push_back(the_field);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 16; i++) {
|
||||
_room_rect[i].top = old.room_rect[i].top;
|
||||
@@ -82,10 +98,17 @@ void cMedTown::append(legacy::ave_tr_type& old){
|
||||
__attribute__((deprecated))
|
||||
void cBigTown::append(legacy::big_tr_type& old){
|
||||
int i,j;
|
||||
cField the_field;
|
||||
the_field.type = 1;
|
||||
for (i = 0; i < 64; i++)
|
||||
for (j = 0; j < 64; j++) {
|
||||
_terrain[i][j] = old.terrain[i][j];
|
||||
_lighting[i / 8][j] = old.lighting[i / 8][j];
|
||||
_lighting[i / 8][j] = old.lighting[i / 8][j];
|
||||
if(scenario.ter_types[_terrain[i][j]].i == 3000) { // marker to indicate it used to be a special spot
|
||||
the_field.loc.x = i;
|
||||
the_field.loc.y = j;
|
||||
preset_fields.push_back(the_field);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 16; i++) {
|
||||
_room_rect[i].top = old.room_rect[i].top;
|
||||
|
Reference in New Issue
Block a user