Final adjustments

This commit is contained in:
Vladislav Khorev 2018-09-23 17:51:25 +05:00
parent d7f4b0c773
commit 5cedf0730b
3 changed files with 46 additions and 16 deletions

View File

@ -93,7 +93,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\opensteer\include;..\replaceLoki</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DO_SCALE2X;WIN32;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>IMMEDIATELY_PLAY;DO_SCALE2X;WIN32;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
@ -129,7 +129,7 @@
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\opensteer\include;..\replaceLoki</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>IMMEDIATELY_PLAY;DO_SCALE2X;WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>

View File

@ -771,10 +771,13 @@ activeWeapon = chooseWeapon;
if (rot < 0.0f)
rot += 360.0f;
static const float accelerationK = 0.00002;
#ifdef NDEBUG
static const float accelerationK = 0.00004;
static const float slowK = 0.02;
#else
static const float accelerationK = 0.00004;
static const float slowK = 0.1;
#endif
switch(m_control.getMove()) {
@ -833,10 +836,15 @@ activeWeapon = chooseWeapon;
{
OpenGL::Camera & cam = OpenGL::CameraHolder::Instance();
static const float camVelocityK = 300.0;
static const float camVelocityK = 700.0;
cam.getEye().y = 10 + velocity*camVelocityK;
if (cam.getEye().y >= 12)
{
cam.getEye().y = 12;
}
}

View File

@ -68,7 +68,7 @@ OpenGTA::CityView *city = NULL;
GUI::Label * fps_label = NULL;
//Xperimental -- Vladislav Khorev vladislav.khorev@fishrungames.com
int city_num = 0;
int city_num = 2;
const char* styles_8[3] = { "STYLE001.GRY", "STYLE002.GRY", "STYLE003.GRY" };
const char* styles_24[3] = { "STYLE001.G24", "STYLE002.G24", "STYLE003.G24" };
@ -605,16 +605,17 @@ void updateAnim() {
void create_car_at(const Vector3D v) {
int carId;
if (city_num == 0)
{
carId = 18;
}
else
{
carId = 74;
}
//OpenGTA::Car& cx = OpenGTA::SpriteManagerHolder::Instance().getCar(2909);
//OpenGTA::Car c(cx);
//c.pos.x -= 1.0;
//Car(const Vector3D & _pos, float _rot, uint32_t id, uint8_t _type, int16_t _remap = -1);
//OpenGTA::Car c2(Vector3D(7.25000000, 2.06562519, 90.2031250), 180, 999999, 18, 0);
OpenGTA::Car c2(Vector3D(v.x, v.y, v.z), 180, 999999, 18, 0);
OpenGTA::Car c2(Vector3D(v.x, v.y, v.z), 180, 999999, carId, 0);
OpenGTA::SpriteManagerHolder::Instance().add(c2);
}
@ -1246,6 +1247,27 @@ void run_main() {
GUI::Manager & guiManager = GUI::ManagerHolder::Instance();
//Xperimental -- initial init -- Vladislav Khorev vladislav.khorev@fishrungames.com
#ifdef IMMEDIATELY_PLAY
follow_toggle = true;
city->setViewMode(false);
Vector3D p(cam.getEye());
create_ped_at(p);
cam.setVectors(Vector3D(p.x, 10, p.z), Vector3D(p.x, 9.0f, p.z), Vector3D(0, 0, -1));
cam.setFollowMode(OpenGTA::SpriteManagerHolder::Instance().getPedById(0xffffffff).pos);
cam.setCamGravity(true);
Vector3D px(cam.getEye() + Vector3D(2.0, 0.0, 2.0));
create_car_at(px);
#endif
while(!global_Done && !global_EC) {
while (SDL_PollEvent(&event)) {
switch(event.type) {