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:
2009-05-09 14:11:39 +00:00
parent 7bc95dc7c8
commit 28f4368651
38 changed files with 1435 additions and 636 deletions

View File

@@ -195,13 +195,13 @@ short cd_create_custom_dialog(WindowPtr parent, Str255 strs[6],short pic_num,sho
void oops_error(short error, short code, short mode){ // mode is 0 for scened, 1 for game, 2 for pced
Str255 error_str1, error_str2;
static const char* progname[] = {"the scenario editor", "Blades of Exile", "the PC editor"};
static const char* filetname[] = {"scenario", "game", "game"};
static const char* progname[3] = {"the scenario editor", "Blades of Exile", "the PC editor"};
static const char* filetname[3] = {"scenario", "game", "game"};
SysBeep(50);
SysBeep(50);
SysBeep(50);
sprintf("The program encountered an error while loading/saving/creating the %s. To prevent future problems, the program will now terminate. Trying again may solve the problem.", filetname[mode]);
sprintf((char*)error_str1,"The program encountered an error while loading/saving/creating the %s. To prevent future problems, the program will now terminate. Trying again may solve the problem.", filetname[mode]);
sprintf((char *) error_str2,"Giving %s more memory might also help. Be sure to back your %s up often. Error number: %d.",progname[mode],filetname[mode],error);
if(code != 0)
sprintf((char*) error_str2,"%s Result code: %i.",error_str2,code);

View File

@@ -263,8 +263,8 @@ header_posix_ustar generateTarHeader(const std::string& fileName, unsigned long
sprintf(header.mode,"%07o",0600);
//leave uid filled with NULs
//leave gid filled with NULs
sprintf(header.size,"%011o",fileSize);
sprintf(header.mtime,"%011o",time(NULL));
sprintf(header.size,"%011llo",fileSize);
sprintf(header.mtime,"%011lo",time(NULL));
memset(header.checksum,' ',8);
header.typeflag[0]=directory?'5':'0';
//leave linkname filled with NULs
@@ -1390,7 +1390,7 @@ bool load_party_v2(FSSpec file_to_load, bool town_restore, bool in_scen, bool ma
/* Split the tar archive into its component files */
while(!gzeof(party_file)){
gzread(party_file, &header, sizeof(header));
sscanf(header.size, "%o", &tar_size);
sscanf(header.size, "%lo", &tar_size);
tar_name = header.name;
buf = new char[tar_size];
gzread(party_file, buf, tar_size);