diff --git a/GitHub/Don't_push/Don't_push.sln b/Don't_push/Don't_push.sln similarity index 100% rename from GitHub/Don't_push/Don't_push.sln rename to Don't_push/Don't_push.sln diff --git a/GitHub/Don't_push/Don't_push/Don't_push.vcxproj b/Don't_push/Don't_push/Don't_push.vcxproj similarity index 100% rename from GitHub/Don't_push/Don't_push/Don't_push.vcxproj rename to Don't_push/Don't_push/Don't_push.vcxproj diff --git a/GitHub/Don't_push/Don't_push/Don't_push.vcxproj.filters b/Don't_push/Don't_push/Don't_push.vcxproj.filters similarity index 100% rename from GitHub/Don't_push/Don't_push/Don't_push.vcxproj.filters rename to Don't_push/Don't_push/Don't_push.vcxproj.filters diff --git a/GitHub/Don't_push/Don't_push/assets/img/Presentation1.pdn b/Don't_push/Don't_push/assets/img/Presentation1.pdn similarity index 70% rename from GitHub/Don't_push/Don't_push/assets/img/Presentation1.pdn rename to Don't_push/Don't_push/assets/img/Presentation1.pdn index a42b29e..bd18fab 100644 Binary files a/GitHub/Don't_push/Don't_push/assets/img/Presentation1.pdn and b/Don't_push/Don't_push/assets/img/Presentation1.pdn differ diff --git a/Don't_push/Don't_push/assets/img/Presentation1.png b/Don't_push/Don't_push/assets/img/Presentation1.png new file mode 100644 index 0000000..6e46140 Binary files /dev/null and b/Don't_push/Don't_push/assets/img/Presentation1.png differ diff --git a/GitHub/Don't_push/Don't_push/assets/img/Presentation2.pdn b/Don't_push/Don't_push/assets/img/Presentation2.pdn similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/Presentation2.pdn rename to Don't_push/Don't_push/assets/img/Presentation2.pdn diff --git a/GitHub/Don't_push/Don't_push/assets/img/Presentation2.png b/Don't_push/Don't_push/assets/img/Presentation2.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/Presentation2.png rename to Don't_push/Don't_push/assets/img/Presentation2.png diff --git a/GitHub/Don't_push/Don't_push/assets/img/Presentation3.pdn b/Don't_push/Don't_push/assets/img/Presentation3.pdn similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/Presentation3.pdn rename to Don't_push/Don't_push/assets/img/Presentation3.pdn diff --git a/GitHub/Don't_push/Don't_push/assets/img/Presentation3.png b/Don't_push/Don't_push/assets/img/Presentation3.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/Presentation3.png rename to Don't_push/Don't_push/assets/img/Presentation3.png diff --git a/Don't_push/Don't_push/assets/img/back_str.png b/Don't_push/Don't_push/assets/img/back_str.png new file mode 100644 index 0000000..0f0d937 Binary files /dev/null and b/Don't_push/Don't_push/assets/img/back_str.png differ diff --git a/Don't_push/Don't_push/assets/img/bouninngennA.png b/Don't_push/Don't_push/assets/img/bouninngennA.png new file mode 100644 index 0000000..9766ebb Binary files /dev/null and b/Don't_push/Don't_push/assets/img/bouninngennA.png differ diff --git a/Don't_push/Don't_push/assets/img/bouninngennA_fall.png b/Don't_push/Don't_push/assets/img/bouninngennA_fall.png new file mode 100644 index 0000000..55d9c59 Binary files /dev/null and b/Don't_push/Don't_push/assets/img/bouninngennA_fall.png differ diff --git a/Don't_push/Don't_push/assets/img/bouninngennB.png b/Don't_push/Don't_push/assets/img/bouninngennB.png new file mode 100644 index 0000000..8c96abe Binary files /dev/null and b/Don't_push/Don't_push/assets/img/bouninngennB.png differ diff --git a/Don't_push/Don't_push/assets/img/bouninngennB_fall.png b/Don't_push/Don't_push/assets/img/bouninngennB_fall.png new file mode 100644 index 0000000..96932da Binary files /dev/null and b/Don't_push/Don't_push/assets/img/bouninngennB_fall.png differ diff --git a/GitHub/Don't_push/Don't_push/assets/img/gake.png b/Don't_push/Don't_push/assets/img/gake.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/gake.png rename to Don't_push/Don't_push/assets/img/gake.png diff --git a/Don't_push/Don't_push/assets/img/herikoputa-.png b/Don't_push/Don't_push/assets/img/herikoputa-.png new file mode 100644 index 0000000..55300b7 Binary files /dev/null and b/Don't_push/Don't_push/assets/img/herikoputa-.png differ diff --git a/GitHub/Don't_push/Don't_push/assets/img/hunn.png b/Don't_push/Don't_push/assets/img/hunn.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/hunn.png rename to Don't_push/Don't_push/assets/img/hunn.png diff --git a/GitHub/Don't_push/Don't_push/assets/img/kunai.png b/Don't_push/Don't_push/assets/img/kunai.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/kunai.png rename to Don't_push/Don't_push/assets/img/kunai.png diff --git a/GitHub/Don't_push/Don't_push/assets/img/kuruma.png b/Don't_push/Don't_push/assets/img/kuruma.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/kuruma.png rename to Don't_push/Don't_push/assets/img/kuruma.png diff --git a/GitHub/Don't_push/Don't_push/assets/img/seoinage.png b/Don't_push/Don't_push/assets/img/seoinage.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/seoinage.png rename to Don't_push/Don't_push/assets/img/seoinage.png diff --git a/GitHub/Don't_push/Don't_push/assets/img/t.txt b/Don't_push/Don't_push/assets/img/t.txt similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/t.txt rename to Don't_push/Don't_push/assets/img/t.txt diff --git a/GitHub/Don't_push/Don't_push/assets/img/tori.png b/Don't_push/Don't_push/assets/img/tori.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/img/tori.png rename to Don't_push/Don't_push/assets/img/tori.png diff --git a/GitHub/Don't_push/Don't_push/assets/music/copyright.txt b/Don't_push/Don't_push/assets/music/copyright.txt similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/music/copyright.txt rename to Don't_push/Don't_push/assets/music/copyright.txt diff --git a/GitHub/Don't_push/Don't_push/assets/music/flower garden.wav b/Don't_push/Don't_push/assets/music/flower garden.wav similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/music/flower garden.wav rename to Don't_push/Don't_push/assets/music/flower garden.wav diff --git a/GitHub/Don't_push/Don't_push/assets/music/title.wav b/Don't_push/Don't_push/assets/music/title.wav similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/music/title.wav rename to Don't_push/Don't_push/assets/music/title.wav diff --git a/GitHub/Don't_push/Don't_push/assets/status_img/end.png b/Don't_push/Don't_push/assets/status_img/end.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/status_img/end.png rename to Don't_push/Don't_push/assets/status_img/end.png diff --git a/GitHub/Don't_push/Don't_push/assets/status_img/game.png b/Don't_push/Don't_push/assets/status_img/game.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/status_img/game.png rename to Don't_push/Don't_push/assets/status_img/game.png diff --git a/GitHub/Don't_push/Don't_push/assets/status_img/title.png b/Don't_push/Don't_push/assets/status_img/title.png similarity index 100% rename from GitHub/Don't_push/Don't_push/assets/status_img/title.png rename to Don't_push/Don't_push/assets/status_img/title.png diff --git a/GitHub/Don't_push/Don't_push/source/DxGraphicHandle.cpp b/Don't_push/Don't_push/source/DxGraphicHandle.cpp similarity index 100% rename from GitHub/Don't_push/Don't_push/source/DxGraphicHandle.cpp rename to Don't_push/Don't_push/source/DxGraphicHandle.cpp diff --git a/GitHub/Don't_push/Don't_push/source/DxGraphicHandle.h b/Don't_push/Don't_push/source/DxGraphicHandle.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/DxGraphicHandle.h rename to Don't_push/Don't_push/source/DxGraphicHandle.h diff --git a/GitHub/Don't_push/Don't_push/source/DxHandleException.h b/Don't_push/Don't_push/source/DxHandleException.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/DxHandleException.h rename to Don't_push/Don't_push/source/DxHandleException.h diff --git a/GitHub/Don't_push/Don't_push/source/DxSoundHandle.cpp b/Don't_push/Don't_push/source/DxSoundHandle.cpp similarity index 100% rename from GitHub/Don't_push/Don't_push/source/DxSoundHandle.cpp rename to Don't_push/Don't_push/source/DxSoundHandle.cpp diff --git a/GitHub/Don't_push/Don't_push/source/DxSoundHandle.h b/Don't_push/Don't_push/source/DxSoundHandle.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/DxSoundHandle.h rename to Don't_push/Don't_push/source/DxSoundHandle.h diff --git a/GitHub/Don't_push/Don't_push/source/Dxkeystate.cpp b/Don't_push/Don't_push/source/Dxkeystate.cpp similarity index 100% rename from GitHub/Don't_push/Don't_push/source/Dxkeystate.cpp rename to Don't_push/Don't_push/source/Dxkeystate.cpp diff --git a/GitHub/Don't_push/Don't_push/source/Dxkeystate.h b/Don't_push/Don't_push/source/Dxkeystate.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/Dxkeystate.h rename to Don't_push/Don't_push/source/Dxkeystate.h diff --git a/GitHub/Don't_push/Don't_push/source/config.h b/Don't_push/Don't_push/source/config.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/config.h rename to Don't_push/Don't_push/source/config.h diff --git a/GitHub/Don't_push/Don't_push/source/continue.cpp b/Don't_push/Don't_push/source/continue.cpp similarity index 100% rename from GitHub/Don't_push/Don't_push/source/continue.cpp rename to Don't_push/Don't_push/source/continue.cpp diff --git a/GitHub/Don't_push/Don't_push/source/continue.h b/Don't_push/Don't_push/source/continue.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/continue.h rename to Don't_push/Don't_push/source/continue.h diff --git a/GitHub/Don't_push/Don't_push/source/define.h b/Don't_push/Don't_push/source/define.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/define.h rename to Don't_push/Don't_push/source/define.h diff --git a/GitHub/Don't_push/Don't_push/source/end.cpp b/Don't_push/Don't_push/source/end.cpp similarity index 100% rename from GitHub/Don't_push/Don't_push/source/end.cpp rename to Don't_push/Don't_push/source/end.cpp diff --git a/GitHub/Don't_push/Don't_push/source/end.h b/Don't_push/Don't_push/source/end.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/end.h rename to Don't_push/Don't_push/source/end.h diff --git a/GitHub/Don't_push/Don't_push/source/flying_mare.cpp b/Don't_push/Don't_push/source/flying_mare.cpp similarity index 100% rename from GitHub/Don't_push/Don't_push/source/flying_mare.cpp rename to Don't_push/Don't_push/source/flying_mare.cpp diff --git a/GitHub/Don't_push/Don't_push/source/flying_mare.h b/Don't_push/Don't_push/source/flying_mare.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/flying_mare.h rename to Don't_push/Don't_push/source/flying_mare.h diff --git a/Don't_push/Don't_push/source/game.cpp b/Don't_push/Don't_push/source/game.cpp new file mode 100644 index 0000000..3620e84 --- /dev/null +++ b/Don't_push/Don't_push/source/game.cpp @@ -0,0 +1,156 @@ +#include "game.h" +#include "Dxkeystate.h" +#include "DxLib.h" +#include "define.h" +#include "power_bar.h" +#include + +game_c::game_c(const dxle::pointi & p) : m_first_(p), m_window_s_(static_cast(WINDOW_WIDTH), static_cast(WINDOW_HEIGHT)), +m_p_(p), m_state_(), m_back_img_(dxle::Graph2D::MakeScreen(m_window_s_.x, m_window_s_.y)) +{ + this->m_img_ = make_image_array(); + this->m_status_img_ = make_status_image_array(); + this->m_sound_ = make_sound_array(); + this->m_back_img_.DrawnOn([this]() {m_img_["gake"].DrawExtendGraph({}, m_window_s_, false); }); + this->m_bouninngennA_ = dxle::Graph2D::MakeScreen(this->m_img_["bouninngennA"].GetGraphSize().x / 3, this->m_img_["bouninngennA"].GetGraphSize().y / 3, true); + this->m_bouninngennB_ = dxle::Graph2D::MakeScreen(this->m_img_["bouninngennB"].GetGraphSize().x / 3, this->m_img_["bouninngennB"].GetGraphSize().y / 3, true); + this->m_bouninngennA_.DrawnOn([this]() {this->m_img_["bouninngennA"].DrawExtendGraph({}, { this->m_img_["bouninngennA"].GetGraphSize().x / 3, this->m_img_["bouninngennA"].GetGraphSize().y / 3 }, true); }); + this->m_bouninngennB_.DrawnOn([this]() {this->m_img_["bouninngennB"].DrawExtendGraph({}, { this->m_img_["bouninngennB"].GetGraphSize().x / 3, this->m_img_["bouninngennB"].GetGraphSize().y / 3 }, true); }); +} + +game_c::~game_c() { + for (auto& s : this->m_sound_) s.second.stop(); +} + +const sound_arr_t & game_c::get_sound() const NOEXCEPT { + return this->m_sound_; +} + +const img_arr_t & game_c::get_status_img() const NOEXCEPT { + return this->m_status_img_; +} + +const img_arr_t & game_c::get_img() const NOEXCEPT { + return this->m_img_; +} + +bool game_c::normal_con_f() const NOEXCEPT { return -1 != ProcessMessage() && 0 == ScreenFlip() && 0 == ClearDrawScreen(); } + +void game_c::move_x() NOEXCEPT{ + static CONSTEXPR_OR_CONST int CHARACTER_MOVE_SPEED = 4; + this->m_state_.update(); + if (m_state_.left()) this->m_p_.x -= CHARACTER_MOVE_SPEED; + if (m_state_.right()) this->m_p_.x += CHARACTER_MOVE_SPEED; +} + +#ifdef _MSC_VER +#pragma warning (push) +#pragma warning (disable: 4706) //warning C4706: 条件式の比較値は、代入の結果になっています。 +#endif +Status game_c::game_main() { + this->m_state_.fllush(); + this->m_sound_["flower garden"].play(DxSoundMode::LOOP); + bool is_normal_state =true; + while ((is_normal_state = normal_con_f()) && m_state_.update() && !m_state_[KEY_INPUT_Z] && !m_state_.esc()) { + this->move_x(); + this->m_back_img_.DrawGraph({}, false); + this->m_img_["bouninngennB"].DrawGraph(this->m_p_, true); + } + if (!is_normal_state) throw std::runtime_error("ProcessMessage() return -1."); + if (m_state_.esc()) throw normal_exit(); + return Status::CONTINUE; +} +#ifdef _MSC_VER +#pragma warning (pop) +#endif +class circular_motion +{ +public: + circular_motion() = delete; + circular_motion(const dxle::pointi& center_pos, const dxle::pointi& first_pos, double angular_v) NOEXCEPT; + circular_motion(const circular_motion&) = delete; + circular_motion(circular_motion&&) = delete; + circular_motion& operator=(const circular_motion&) = delete; + circular_motion& operator=(circular_motion&&) = delete; + bool update() NOEXCEPT; + bool draw(const dxle::Graph2D::Texture2D& img) const; + dxle::pointd get_pos() const NOEXCEPT; +private: + const dxle::pointi m_center_; + const double m_r_; + const double m_first_rad_; + double m_angular_v_;// rad./sec. Dextrorotation(右回り。yは下向き正) + dxle::pointd m_current_; + size_t m_t_; +}; + +circular_motion::circular_motion(const dxle::pointi & center_pos, const dxle::pointi& first_pos, double angular_v) NOEXCEPT + : m_center_(center_pos), m_r_(std::hypot(first_pos.x - m_center_.x, first_pos.y - m_center_.y)), + m_first_rad_(std::acos((first_pos.x - m_center_.x) / m_r_) * (((first_pos.y - m_center_.y) < 0) ? -1 : 1)), + m_angular_v_(angular_v), m_current_(static_cast(first_pos)), m_t_() +{} + +bool circular_motion::update() NOEXCEPT { + ++this->m_t_; + this->m_current_ = dxle::pointd(m_center_.x + this->m_r_ * std::cos(m_first_rad_ + this->m_t_ * this->m_angular_v_), m_center_.y + this->m_r_ * std::sin(m_first_rad_ + this->m_t_ * this->m_angular_v_)); + return true; +} + +bool circular_motion::draw(const dxle::Graph2D::Texture2D& img) const { + img.DrawGraph(static_cast(this->m_current_), true); + return true; +} + +dxle::pointd circular_motion::get_pos() const NOEXCEPT { + return this->m_current_; +} +static void extruded(size_t& fall_frame, dxle::pointi& move_target, const dxle::pointi& move_cause, const dxle::pointi& target_img_size, const int first_y) { + constexpr double g = 9.80665; + if (move_target.x < WINDOW_WIDTH / 4) { + ++fall_frame; + move_target.y = first_y + static_cast(g / 2 * fall_frame); + } + if (move_cause.x < move_target.x + target_img_size.x) move_target.x = move_cause.x - target_img_size.x; +} +Status game_c::helicopter_event() { + this->m_state_.fllush(); + this->m_sound_["flower garden"].play(DxSoundMode::LOOP); + bool is_normal_state = true; + dxle::pointi ningenA = { WINDOW_WIDTH * 57 / 256 , WINDOW_HEIGHT * 2 / 7 }; + constexpr int fadeout_time_frame = 200; + //fade out + for (int i = 0; i < fadeout_time_frame && (is_normal_state = normal_con_f()) && m_state_.update() && !m_state_.esc(); ++i) { + //this->m_img_["Presentation1"].DrawGraph({}, false); + this->m_back_img_.DrawGraph({}, false); + SetDrawBlendMode(DX_BLENDMODE_ALPHA, static_cast((fadeout_time_frame - i) * 256.0/ fadeout_time_frame)); + this->m_img_["back_str"].DrawGraph({}, true); + SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0); + this->m_bouninngennA_.DrawGraph(ningenA, true); + this->m_bouninngennB_.DrawGraph(this->m_p_, true); + } + if (m_state_.esc()) throw normal_exit(); + + circular_motion helicopter({ m_window_s_.x / 2, -100 }, { m_window_s_.x * 23 / 26, m_window_s_.y * 1 / 82 }, 1.0 / 30.0); + auto helicopter_img = dxle::Graph2D::MakeScreen(this->m_img_["herikoputa-"].GetGraphSize().x / 3, this->m_img_["herikoputa-"].GetGraphSize().x / 3, true); + helicopter_img.DrawnOn([this]() {this->m_img_["herikoputa-"].DrawExtendGraph({}, { this->m_img_["herikoputa-"].GetGraphSize().x * 1 / 3, this->m_img_["herikoputa-"].GetGraphSize().y * 1 / 3 }, true); }); + size_t fall_frameA = 0; + size_t fall_frameB = 0; + const int first_yA = ningenA.y; + const int first_yB = m_p_.y; + while ((is_normal_state = normal_con_f()) && m_state_.update() && !m_state_[KEY_INPUT_Z] && !m_state_.esc() && helicopter.update()) { + this->m_back_img_.DrawGraph({}, false); + SetDrawBlendMode(DX_BLENDMODE_ALPHA, 128); + this->m_img_["Presentation1"].DrawGraph({}, false); + SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0); + extruded(fall_frameB, m_p_, static_cast(helicopter.get_pos()), this->m_bouninngennB_.GetGraphSize(), first_yB); + extruded(fall_frameA, ningenA, m_p_, this->m_bouninngennA_.GetGraphSize(), first_yA); + this->m_bouninngennA_.DrawGraph(ningenA, true); + this->m_bouninngennB_.DrawGraph(this->m_p_, true); + //helicopter_img.DrawGraph({ m_window_s_.x * 23 / 26, m_window_s_.y * 1 / 82}, true); + helicopter.draw(helicopter_img); + WaitKey(); + } + if (!is_normal_state) throw std::runtime_error("ProcessMessage() return -1."); + if (m_state_.esc()) throw normal_exit(); + return Status::CONTINUE; +} diff --git a/GitHub/Don't_push/Don't_push/source/game.h b/Don't_push/Don't_push/source/game.h similarity index 90% rename from GitHub/Don't_push/Don't_push/source/game.h rename to Don't_push/Don't_push/source/game.h index b35339c..c12ab13 100644 --- a/GitHub/Don't_push/Don't_push/source/game.h +++ b/Don't_push/Don't_push/source/game.h @@ -30,4 +30,6 @@ class game_c img_arr_t m_status_img_; sound_arr_t m_sound_; dxle::Graph2D::Screen m_back_img_; + dxle::Graph2D::Screen m_bouninngennA_; + dxle::Graph2D::Screen m_bouninngennB_; }; diff --git a/GitHub/Don't_push/Don't_push/source/helicopter.cpp b/Don't_push/Don't_push/source/helicopter.cpp similarity index 100% rename from GitHub/Don't_push/Don't_push/source/helicopter.cpp rename to Don't_push/Don't_push/source/helicopter.cpp diff --git a/GitHub/Don't_push/Don't_push/source/helicopter.h b/Don't_push/Don't_push/source/helicopter.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/helicopter.h rename to Don't_push/Don't_push/source/helicopter.h diff --git a/GitHub/Don't_push/Don't_push/source/load.cpp b/Don't_push/Don't_push/source/load.cpp similarity index 96% rename from GitHub/Don't_push/Don't_push/source/load.cpp rename to Don't_push/Don't_push/source/load.cpp index 0c860cc..a21400e 100644 --- a/GitHub/Don't_push/Don't_push/source/load.cpp +++ b/Don't_push/Don't_push/source/load.cpp @@ -31,6 +31,8 @@ img_arr_t make_image_array() { re.insert(img("kuruma")); re.insert(img("seoinage")); re.insert(img("tori")); + re.insert(img("Presentation1")); + re.insert(img("back_str")); return re; } class make_DxSHandle_pair { diff --git a/GitHub/Don't_push/Don't_push/source/load.h b/Don't_push/Don't_push/source/load.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/load.h rename to Don't_push/Don't_push/source/load.h diff --git a/GitHub/Don't_push/Don't_push/source/main.cpp b/Don't_push/Don't_push/source/main.cpp similarity index 94% rename from GitHub/Don't_push/Don't_push/source/main.cpp rename to Don't_push/Don't_push/source/main.cpp index f58d5f1..ae91403 100644 --- a/GitHub/Don't_push/Don't_push/source/main.cpp +++ b/Don't_push/Don't_push/source/main.cpp @@ -35,7 +35,7 @@ int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) //処理----------------------------------------------------------- try{ - game_c game({ WINDOW_WIDTH / 2 , 0 }); + game_c game({ WINDOW_WIDTH * 71 / 128 , WINDOW_HEIGHT * 2 / 7 });//青の棒人形(Playable)の初期位置 while (Status::EXIT != status_ && -1 != ProcessMessage()){ switch (status_) { diff --git a/GitHub/Don't_push/Don't_push/source/object_to_fall.cpp b/Don't_push/Don't_push/source/object_to_fall.cpp similarity index 100% rename from GitHub/Don't_push/Don't_push/source/object_to_fall.cpp rename to Don't_push/Don't_push/source/object_to_fall.cpp diff --git a/GitHub/Don't_push/Don't_push/source/object_to_fall.h b/Don't_push/Don't_push/source/object_to_fall.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/object_to_fall.h rename to Don't_push/Don't_push/source/object_to_fall.h diff --git a/GitHub/Don't_push/Don't_push/source/power_bar.cpp b/Don't_push/Don't_push/source/power_bar.cpp similarity index 100% rename from GitHub/Don't_push/Don't_push/source/power_bar.cpp rename to Don't_push/Don't_push/source/power_bar.cpp diff --git a/GitHub/Don't_push/Don't_push/source/power_bar.h b/Don't_push/Don't_push/source/power_bar.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/power_bar.h rename to Don't_push/Don't_push/source/power_bar.h diff --git a/GitHub/Don't_push/Don't_push/source/title.cpp b/Don't_push/Don't_push/source/title.cpp similarity index 96% rename from GitHub/Don't_push/Don't_push/source/title.cpp rename to Don't_push/Don't_push/source/title.cpp index 2910420..0ad3cad 100644 --- a/GitHub/Don't_push/Don't_push/source/title.cpp +++ b/Don't_push/Don't_push/source/title.cpp @@ -26,7 +26,8 @@ Status title(const img_arr_t&, const sound_arr_t& sound) { if (!is_normal_state) throw std::runtime_error("ProcessMessage() return -1."); sound.at("title").stop(); if (state.esc()) throw normal_exit(); - return Status::GAME; + //return Status::GAME; + return Status::HELICOPTER_ANIMATION; } #ifdef _MSC_VER #pragma warning (pop) diff --git a/GitHub/Don't_push/Don't_push/source/title.h b/Don't_push/Don't_push/source/title.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/title.h rename to Don't_push/Don't_push/source/title.h diff --git a/GitHub/Don't_push/Don't_push/source/util_constexpr.h b/Don't_push/Don't_push/source/util_constexpr.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/util_constexpr.h rename to Don't_push/Don't_push/source/util_constexpr.h diff --git a/GitHub/Don't_push/Don't_push/source/util_noexcept.h b/Don't_push/Don't_push/source/util_noexcept.h similarity index 100% rename from GitHub/Don't_push/Don't_push/source/util_noexcept.h rename to Don't_push/Don't_push/source/util_noexcept.h diff --git a/GitHub/Don't_push/Don't_push/assets/img/Presentation1.png b/GitHub/Don't_push/Don't_push/assets/img/Presentation1.png deleted file mode 100644 index c52a073..0000000 Binary files a/GitHub/Don't_push/Don't_push/assets/img/Presentation1.png and /dev/null differ diff --git a/GitHub/Don't_push/Don't_push/assets/img/bouninngennA.png b/GitHub/Don't_push/Don't_push/assets/img/bouninngennA.png deleted file mode 100644 index 68c230b..0000000 Binary files a/GitHub/Don't_push/Don't_push/assets/img/bouninngennA.png and /dev/null differ diff --git a/GitHub/Don't_push/Don't_push/assets/img/bouninngennA_fall.png b/GitHub/Don't_push/Don't_push/assets/img/bouninngennA_fall.png deleted file mode 100644 index 0289acb..0000000 Binary files a/GitHub/Don't_push/Don't_push/assets/img/bouninngennA_fall.png and /dev/null differ diff --git a/GitHub/Don't_push/Don't_push/assets/img/bouninngennB.png b/GitHub/Don't_push/Don't_push/assets/img/bouninngennB.png deleted file mode 100644 index ada798d..0000000 Binary files a/GitHub/Don't_push/Don't_push/assets/img/bouninngennB.png and /dev/null differ diff --git a/GitHub/Don't_push/Don't_push/assets/img/bouninngennB_fall.png b/GitHub/Don't_push/Don't_push/assets/img/bouninngennB_fall.png deleted file mode 100644 index aba16c9..0000000 Binary files a/GitHub/Don't_push/Don't_push/assets/img/bouninngennB_fall.png and /dev/null differ diff --git a/GitHub/Don't_push/Don't_push/assets/img/herikoputa-.png b/GitHub/Don't_push/Don't_push/assets/img/herikoputa-.png deleted file mode 100644 index dcec411..0000000 Binary files a/GitHub/Don't_push/Don't_push/assets/img/herikoputa-.png and /dev/null differ diff --git a/GitHub/Don't_push/Don't_push/source/game.cpp b/GitHub/Don't_push/Don't_push/source/game.cpp deleted file mode 100644 index 6e8702a..0000000 --- a/GitHub/Don't_push/Don't_push/source/game.cpp +++ /dev/null @@ -1,117 +0,0 @@ -#include "game.h" -#include "Dxkeystate.h" -#include "DxLib.h" -#include "define.h" -#include "power_bar.h" -#include - -game_c::game_c(const dxle::pointi & p) : m_first_(p), m_window_s_(static_cast(WINDOW_WIDTH), static_cast(WINDOW_HEIGHT)), m_p_(p), m_state_() { - this->m_img_ = make_image_array(); - this->m_status_img_ = make_status_image_array(); - this->m_sound_ = make_sound_array(); - this->m_back_img_ = dxle::Graph2D::MakeScreen(m_window_s_.x, m_window_s_.y); - this->m_back_img_.DrawnOn([this]() {m_img_["gake"].DrawExtendGraph({}, m_window_s_, false); }); -} - -game_c::~game_c() { - for (auto& s : this->m_sound_) s.second.stop(); -} - -const sound_arr_t & game_c::get_sound() const NOEXCEPT { - return this->m_sound_; -} - -const img_arr_t & game_c::get_status_img() const NOEXCEPT { - return this->m_status_img_; -} - -const img_arr_t & game_c::get_img() const NOEXCEPT { - return this->m_img_; -} - -bool game_c::normal_con_f() const NOEXCEPT { return -1 != ProcessMessage() && 0 == ScreenFlip() && 0 == ClearDrawScreen(); } - -void game_c::move_x() NOEXCEPT{ - static CONSTEXPR_OR_CONST int CHARACTER_MOVE_SPEED = 4; - this->m_state_.update(); - if (m_state_.left()) this->m_p_.x -= CHARACTER_MOVE_SPEED; - if (m_state_.right()) this->m_p_.x += CHARACTER_MOVE_SPEED; -} - -#ifdef _MSC_VER -#pragma warning (push) -#pragma warning (disable: 4706) //warning C4706: 条件式の比較値は、代入の結果になっています。 -#endif -Status game_c::game_main() { - this->m_state_.fllush(); - this->m_sound_["flower garden"].play(DxSoundMode::LOOP); - bool is_normal_state =true; - while ((is_normal_state = normal_con_f()) && m_state_.update() && !m_state_[KEY_INPUT_Z] && !m_state_.esc()) { - this->move_x(); - this->m_back_img_.DrawGraph({}, false); - this->m_img_["bouninngennB"].DrawGraph(this->m_p_, true); - } - if (!is_normal_state) throw std::runtime_error("ProcessMessage() return -1."); - if (m_state_.esc()) throw normal_exit(); - return Status::CONTINUE; -} -#ifdef _MSC_VER -#pragma warning (pop) -#endif -class circular_motion -{ -public: - circular_motion() = delete; - circular_motion(const dxle::pointi& center_pos, const dxle::pointi& first_pos, double angular_v) NOEXCEPT; - circular_motion(const circular_motion&) = delete; - circular_motion(circular_motion&&) = delete; - circular_motion& operator=(const circular_motion&) = delete; - circular_motion& operator=(circular_motion&&) = delete; - bool update() NOEXCEPT; - bool draw(const DxGHandle& img) const; -private: - const dxle::pointi m_center_; - const double m_r_; - const double m_first_rad_; - double m_angular_v_;// rad./sec. Dextrorotation(右回り。yは下向き正) - dxle::pointd m_current_; - size_t m_t_; -}; - -circular_motion::circular_motion(const dxle::pointi & center_pos, const dxle::pointi& first_pos, double angular_v) NOEXCEPT - : m_center_(center_pos), m_r_(std::hypot(first_pos.x - m_center_.x, first_pos.y - m_center_.y)), - m_first_rad_(std::acos((first_pos.x - m_center_.x) / m_r_) * ((first_pos.y - m_center_.y) < 0) ? -1 : 1), - m_angular_v_(angular_v), m_current_(static_cast(first_pos)), m_t_() -{} - -bool circular_motion::update() NOEXCEPT { - ++this->m_t_; - this->m_current_ = dxle::pointd(this->m_r_ * std::cos(this->m_t_ * this->m_angular_v_), this->m_r_ * std::sin(this->m_t_ * this->m_angular_v_)); - return true; -} - -bool circular_motion::draw(const DxGHandle & img) const { - img.DrawGraph(static_cast(this->m_current_), true); - return true; -} - -Status game_c::helicopter_event() { - this->m_state_.fllush(); - this->m_sound_["flower garden"].play(DxSoundMode::LOOP); - bool is_normal_state = true; - circular_motion helicopter({ m_window_s_.x / 2, -300 }, { m_window_s_.x * 5 / 6, 10 }, 1.0 / 30.0); - SetDrawValidGraphCreateFlag(true); - SetDrawValidAlphaChannelGraphCreateFlag(true); - auto bouninngennB = dxle::Graph2D::MakeScreen(m_window_s_.x * 3 / 10, m_window_s_.x * 3 / 10, true); - bouninngennB.DrawnOn([this]() {this->m_img_["bouninngennB"].DrawExtendGraph({}, { m_window_s_.x * 3 / 10, m_window_s_.x * 3 / 10 }, true); }); - SetDrawValidGraphCreateFlag(false); - SetDrawValidAlphaChannelGraphCreateFlag(false); - while ((is_normal_state = normal_con_f()) && m_state_.update() && !m_state_[KEY_INPUT_Z] && !m_state_.esc()) { - this->move_x(); - this->m_back_img_.DrawGraph({}, false); - bouninngennB.DrawGraph(this->m_p_, true); - } - if (!is_normal_state) throw std::runtime_error("ProcessMessage() return -1."); - if (m_state_.esc()) throw normal_exit(); - return Status::CONTINUE; -}