document warnings that i cannot handle on my own
This commit is contained in:
parent
51b637a5e3
commit
efd4dc1d9e
|
@ -37,7 +37,7 @@ void TPlunger::Collision(TBall* ball, vector_type* nextPosition, vector_type* di
|
||||||
{
|
{
|
||||||
if (PinballTable->TiltLockFlag)
|
if (PinballTable->TiltLockFlag)
|
||||||
Message(1017, 0.0);
|
Message(1017, 0.0);
|
||||||
coef = RandFloat() * Boost * 0.1f + Boost;
|
coef = RandFloat() * Boost * 0.1f + Boost; //!! passed in coef is never used
|
||||||
maths::basic_collision(ball, nextPosition, direction, Elasticity, Smoothness, Threshold, coef);
|
maths::basic_collision(ball, nextPosition, direction, Elasticity, Smoothness, Threshold, coef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ int TPlunger::Message(int code, float value)
|
||||||
if (PullbackTimer_)
|
if (PullbackTimer_)
|
||||||
timer::kill(PullbackTimer_);
|
timer::kill(PullbackTimer_);
|
||||||
PullbackTimer_ = 0;
|
PullbackTimer_ = 0;
|
||||||
if (code == 1005)
|
if (code == 1005) //!!
|
||||||
loader::play_sound(SoundIndexP2);
|
loader::play_sound(SoundIndexP2);
|
||||||
auto bmp = ListBitmap->at(0);
|
auto bmp = ListBitmap->at(0);
|
||||||
auto zMap = ListZMap->at(0);
|
auto zMap = ListZMap->at(0);
|
||||||
|
|
|
@ -1019,7 +1019,7 @@ void control::LaunchRampControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
sound = control_soundwave21_tag.Component;
|
sound = control_soundwave21_tag.Component;
|
||||||
}
|
}
|
||||||
else if (someFlag <= 1 || someFlag > 3)
|
else if (someFlag <= 1 || someFlag > 3) //!! <1 ?
|
||||||
{
|
{
|
||||||
sound = control_soundwave24_tag.Component;
|
sound = control_soundwave24_tag.Component;
|
||||||
}
|
}
|
||||||
|
@ -2148,7 +2148,7 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (someFlag <= 1 || someFlag > 3)
|
if (someFlag <= 1 || someFlag > 3) //!! <1 ?
|
||||||
{
|
{
|
||||||
auto duration = control_soundwave41_tag.Component->Play();
|
auto duration = control_soundwave41_tag.Component->Play();
|
||||||
control_soundwave36_1_tag.Component->Play();
|
control_soundwave36_1_tag.Component->Play();
|
||||||
|
@ -2919,7 +2919,7 @@ void control::GameoverController(int code, TPinballComponent* caller)
|
||||||
|
|
||||||
if (missionMsg & 0x200)
|
if (missionMsg & 0x200)
|
||||||
{
|
{
|
||||||
int highscoreId = missionMsg % 4;
|
int highscoreId = missionMsg % 4; //!! %5 ?
|
||||||
int highScore = pb::highscore_table[highscoreId].Score;
|
int highScore = pb::highscore_table[highscoreId].Score;
|
||||||
auto nextHidhscoreId = highscoreId + 1;
|
auto nextHidhscoreId = highscoreId + 1;
|
||||||
if (highScore > 0)
|
if (highScore > 0)
|
||||||
|
@ -3923,10 +3923,8 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
||||||
if (light_on(&control_lite319_tag))
|
if (light_on(&control_lite319_tag))
|
||||||
control_lite319_tag.Component->Message(20, 0.0);
|
control_lite319_tag.Component->Message(20, 0.0);
|
||||||
if (!light_on(&control_lite317_tag))
|
if (!light_on(&control_lite317_tag))
|
||||||
{
|
|
||||||
control_lite317_tag.Component->Message(7, 0.0);
|
control_lite317_tag.Component->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
control_mission_text_box_tag.Component->Display(pinball::get_rc_string(104, 0), -1.0);
|
control_mission_text_box_tag.Component->Display(pinball::get_rc_string(104, 0), -1.0);
|
||||||
|
@ -4158,6 +4156,7 @@ void control::TimeWarpPartTwoController(int code, TPinballComponent* caller)
|
||||||
control_lite317_tag.Component->Message(20, 0.0);
|
control_lite317_tag.Component->Message(20, 0.0);
|
||||||
control_lite198_tag.Component->MessageField = 1;
|
control_lite198_tag.Component->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
|
//!! Display score?
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::UnselectMissionController(int code, TPinballComponent* caller)
|
void control::UnselectMissionController(int code, TPinballComponent* caller)
|
||||||
|
|
|
@ -58,7 +58,7 @@ int fullscrn::enableFullscreen()
|
||||||
if (!display_changed)
|
if (!display_changed)
|
||||||
{
|
{
|
||||||
SDL_SetWindowFullscreen(winmain::MainWindow, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
SDL_SetWindowFullscreen(winmain::MainWindow, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||||
display_changed = 1;
|
display_changed = 1; //!!
|
||||||
if (display_changed)
|
if (display_changed)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -318,5 +318,5 @@ std::vector<uint8_t>* midi::MdsToMidi(std::string file)
|
||||||
delete[] fileBuf;
|
delete[] fileBuf;
|
||||||
if (returnCode && midiOut)
|
if (returnCode && midiOut)
|
||||||
delete midiOut;
|
delete midiOut;
|
||||||
return midiOut;
|
return midiOut; //!! could be already deleted
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ int winmain::bQuit = 0;
|
||||||
int winmain::activated;
|
int winmain::activated;
|
||||||
int winmain::DispFrameRate = 0;
|
int winmain::DispFrameRate = 0;
|
||||||
int winmain::DispGRhistory = 0;
|
int winmain::DispGRhistory = 0;
|
||||||
int winmain::single_step = 0;
|
int winmain::single_step = 0; //!! is constant
|
||||||
int winmain::has_focus = 1;
|
int winmain::has_focus = 1;
|
||||||
int winmain::last_mouse_x;
|
int winmain::last_mouse_x;
|
||||||
int winmain::last_mouse_y;
|
int winmain::last_mouse_y;
|
||||||
|
@ -180,7 +180,7 @@ int winmain::WinMain(LPCSTR lpCmdLine)
|
||||||
if (!gfr_display)
|
if (!gfr_display)
|
||||||
{
|
{
|
||||||
auto plt = static_cast<ColorRgba*>(malloc(1024u));
|
auto plt = static_cast<ColorRgba*>(malloc(1024u));
|
||||||
auto pltPtr = &plt[10];
|
auto pltPtr = &plt[10]; // first 10 entries are system colors hardcoded in display_palette()
|
||||||
for (int i1 = 0, i2 = 0; i1 < 256 - 10; ++i1, i2 += 8)
|
for (int i1 = 0, i2 = 0; i1 < 256 - 10; ++i1, i2 += 8)
|
||||||
{
|
{
|
||||||
unsigned char blue = i2, redGreen = i2;
|
unsigned char blue = i2, redGreen = i2;
|
||||||
|
@ -215,8 +215,8 @@ int winmain::WinMain(LPCSTR lpCmdLine)
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
SDL_GetMouseState(&x, &y);
|
SDL_GetMouseState(&x, &y);
|
||||||
SDL_GetWindowSize(window, &w, &h);
|
SDL_GetWindowSize(window, &w, &h);
|
||||||
float dx = (last_mouse_x - x) / static_cast<float>(w);
|
float dx = static_cast<float>(last_mouse_x - x) / static_cast<float>(w);
|
||||||
float dy = (y - last_mouse_y) / static_cast<float>(h);
|
float dy = static_cast<float>(y - last_mouse_y) / static_cast<float>(h);
|
||||||
pb::ballset(dx, dy);
|
pb::ballset(dx, dy);
|
||||||
|
|
||||||
SDL_WarpMouseInWindow(window, last_mouse_x, last_mouse_y);
|
SDL_WarpMouseInWindow(window, last_mouse_x, last_mouse_y);
|
||||||
|
|
Loading…
Reference in New Issue