fix errors

This commit is contained in:
IntelOrca 2015-02-08 03:19:24 +00:00
parent 1298031fd2
commit 63ad70a0f3
10 changed files with 27 additions and 41 deletions

View File

@ -135,6 +135,8 @@
<ClCompile Include="..\src\world\footpath.c" />
<ClCompile Include="..\src\world\fountain.c" />
<ClCompile Include="..\src\world\map.c" />
<ClCompile Include="..\src\world\mapgen.c" />
<ClCompile Include="..\src\world\map_helpers.c" />
<ClCompile Include="..\src\world\park.c" />
<ClCompile Include="..\src\world\sprite.c" />
</ItemGroup>
@ -199,6 +201,8 @@
<ClInclude Include="..\src\world\climate.h" />
<ClInclude Include="..\src\world\footpath.h" />
<ClInclude Include="..\src\world\map.h" />
<ClInclude Include="..\src\world\mapgen.h" />
<ClInclude Include="..\src\world\map_helpers.h" />
<ClInclude Include="..\src\world\park.h" />
<ClInclude Include="..\src\world\scenery.h" />
<ClInclude Include="..\src\world\sprite.h" />

View File

@ -332,7 +332,6 @@
</ClCompile>
<ClCompile Include="..\lib\lodepng\lodepng.c" />
<ClCompile Include="..\lib\lodepng\lodepng.c" />
<ClCompile Include="..\lib\lodepng\lodepng.c" />
<ClCompile Include="..\src\cmdline.c">
<Filter>Source</Filter>
</ClCompile>
@ -344,7 +343,7 @@
<ClCompile Include="..\src\world\fountain.c">
<Filter>Source\World</Filter>
</ClCompile>
<ClCompile Include="..\lib\libspeex\resample.c;..\lib\lodepng\lodepng.c" />
<ClCompile Include="..\lib\lodepng\lodepng.c" />
<ClCompile Include="..\src\world\banner.c">
<Filter>Source\World</Filter>
</ClCompile>
@ -423,6 +422,12 @@
<Filter>Source\Windows</Filter>
</ClCompile>
<ClCompile Include="..\lib\lodepng\lodepng.c" />
<ClCompile Include="..\src\world\map_helpers.c">
<Filter>Source\World</Filter>
</ClCompile>
<ClCompile Include="..\src\world\mapgen.c">
<Filter>Source\World</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\management\award.h">
@ -614,5 +619,11 @@
<ClInclude Include="..\src\rct1.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="..\src\world\mapgen.h">
<Filter>Source\World</Filter>
</ClInclude>
<ClInclude Include="..\src\world\map_helpers.h">
<Filter>Source\World</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -7,12 +7,12 @@
<LocalDebuggerCommand>$(TargetDir)\openrct2.exe</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
<LocalDebuggerCommandArguments>edit</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommand>$(TargetDir)\openrct2.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>
</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>edit</LocalDebuggerCommandArguments>
</PropertyGroup>
</Project>

View File

@ -1080,11 +1080,6 @@ static void input_update_tooltip(rct_window *w, int widgetIndex, int x, int y)
return;
window_close_by_class(WC_TOOLTIP);
}
if (key == SDL_SCANCODE_R) {
mapgen_generate();
gfx_invalidate_screen();
}
}
@ -1175,7 +1170,6 @@ void game_handle_keyboard_input()
keyboard_shortcut_handle(key);
}
}
}
if (RCT2_GLOBAL(RCT2_ADDRESS_ON_TUTORIAL, uint8) == 0)

View File

@ -29,6 +29,7 @@
#include "platform/platform.h"
#include "platform/osinterface.h"
#include "util/sawyercoding.h"
#include "world/mapgen.h"
int gOpenRCT2StartupAction = STARTUP_ACTION_TITLE;
char gOpenRCT2StartupActionPath[512] = { 0 };
@ -77,10 +78,12 @@ void openrct2_launch()
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_PLAYING;
break;
case STARTUP_ACTION_EDIT:
if (strlen(gOpenRCT2StartupActionPath) == 0)
if (strlen(gOpenRCT2StartupActionPath) == 0) {
editor_load();
else
mapgen_generate();
} else {
editor_load_landscape(gOpenRCT2StartupActionPath);
}
break;
}

View File

@ -232,30 +232,6 @@ int rct2_open_file(const char *path)
return 0;
}
void check_cmdline_arg()
{
int argc;
char **argv;
char *args;
args = RCT2_GLOBAL(0x009AC310, char*);
if (args == (char*)0xFFFFFFFF)
return;
RCT2_GLOBAL(0x009AC310, char*) = (char*)0xFFFFFFFF;
argv = CommandLineToArgvA(args, &argc);
if (argc > 0) {
if (_stricmp(argv[0], "edit") == 0) {
if (argc >= 1)
editor_load_landscape(argv[1]);
} else {
rct2_open_file(argv[0]);
}
}
LocalFree(argv);
}
/**
*
* rct2: 0x00674C95

View File

@ -19,12 +19,10 @@
*****************************************************************************/
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#include <string.h>
#include <time.h>
#include "addresses.h"
#include "../addresses.h"
#include "map.h"
#include "map_helpers.h"
#include "mapgen.h"
@ -108,7 +106,7 @@ void mapgen_generate()
while (map_smooth(1, 1, mapSize - 1, mapSize - 1)) { }
mapgen_set_water_level(6 + (rand() % 4) * 2);
mapgen_place_trees();
// mapgen_place_trees();
}
const uint8 GrassTrees[] = { 21, 22, 27, 31, 42, 69, 71, 82, 84, 94, 95, 109 };