コード例 #1
0
ファイル: GameVersion.cpp プロジェクト: FriedRice/spring
const std::string& Get()
{
	static const std::string base = IsRelease()
			? GetMajor()
			: (GetMajor() + "." + GetPatchSet() + ".1");

	return base;
}
コード例 #2
0
ファイル: version.cpp プロジェクト: nitrologic/mod
// Calculate the V8 version string.
void Version::GetString(Vector<char> str) {
    const char* candidate = IsCandidate() ? " (candidate)" : "";
    if (GetPatch() > 0) {
        OS::SNPrintF(str, "%d.%d.%d.%d%s",
                     GetMajor(), GetMinor(), GetBuild(), GetPatch(), candidate);
    } else {
        OS::SNPrintF(str, "%d.%d.%d%s",
                     GetMajor(), GetMinor(), GetBuild(), candidate);
    }
}
コード例 #3
0
ファイル: version.cpp プロジェクト: nitrologic/mod
// Calculate the SONAME for the V8 shared library.
void Version::GetSONAME(Vector<char> str) {
    if (soname_ == NULL || *soname_ == '\0') {
        // Generate generic SONAME if no specific SONAME is defined.
        const char* candidate = IsCandidate() ? "-candidate" : "";
        if (GetPatch() > 0) {
            OS::SNPrintF(str, "libv8-%d.%d.%d.%d%s.so",
                         GetMajor(), GetMinor(), GetBuild(), GetPatch(), candidate);
        } else {
            OS::SNPrintF(str, "libv8-%d.%d.%d%s.so",
                         GetMajor(), GetMinor(), GetBuild(), candidate);
        }
    } else {
        // Use specific SONAME.
        OS::SNPrintF(str, "%s", soname_);
    }
}
コード例 #4
0
ファイル: GameVersion.cpp プロジェクト: FriedRice/spring
const std::string& GetSync()
{
	static const std::string sync = IsRelease()
			? GetMajor()
			: SPRING_VERSION_ENGINE;

	return sync;
}
コード例 #5
0
const wxString wxExVersionInfo::GetVersionOnlyString() const
{
  wxString str;
  
  str << GetMajor() << '.' << GetMinor() << '.' << GetMicro();
  
  return str;
}
コード例 #6
0
ファイル: GameVersion.cpp プロジェクト: niavok/spring
const std::string& Get()
{
	static const std::string version = GetMajor() + "." + GetMinor();
	return version;
}
コード例 #7
0
ファイル: Editor.cpp プロジェクト: Bilbobull/AI_Project
void ImGuiImpl::UpdateGuiButtons(void)
{
#pragma region Model

    char fileNameBuffer[140] = { '\0' };
    std::strcat(fileNameBuffer, filename.c_str());
    if (ImGui::InputText("Model", fileNameBuffer, sizeof(fileNameBuffer)))
    {
      // text was changed; copy back over to C++ string
      filename = fileNameBuffer;
    }

    if (ImGui::Button("Load Model"))
    {
      if (filename != prevfilename)
      {
        Object* myObj = ObjectManager::CreateObject(glm::linearRand(glm::vec3(-5.0f, -5.0f, -6.0f), glm::vec3(5.0f, 5.0f, 6.0f)),
          glm::vec3(-2.0f, 0.0f, -3.0f),
          glm::linearRand(0.0f, 360.0f),
          glm::linearRand(glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(1.0f, 1.0f, 1.0f)), filename.c_str());
        prevfilename = filename;
      }

      // TODO(student): implement loading models from a file; you can use the
      // string 'modelFile' which should store the updated file name from ImGui
    }


    //std::vector<char const *> shadertypeStrings = {
    //  "Fragment Phong", "Vertex Phong", "Frag Blinn" };
    //ImGui::Combo("Light Model", &ShaderType, shadertypeStrings.data(), 3);
#pragma endregion

#pragma region Camera
  ImGui::Separator();
  // model options
  {
    if (ImGui::CollapsingHeader("CameraPos"))
    {
      ImGui::PushID("Camera");

      ImGui::SliderFloat3("Camera Position", (float*)&pos, -10.0f, 10.0f);
      ImGui::SliderFloat3("Lookat Vector", (float*)&lookat, -2.0f, 2.0f);

      if (pos != prevpos)
      {
        glm::vec3 vect = pos - prevpos;
        g_GraphicsSys->GetCurrentCamera().position += vect;
        prevpos = pos;
      }

      if (lookat != prevlookat)
      {
        glm::vec3 vect = lookat - prevlookat;
        glm::normalize(vect);
        g_GraphicsSys->GetCurrentCamera().viewDirection += vect;
        glm::normalize(g_GraphicsSys->GetCurrentCamera().viewDirection);
        prevlookat = lookat;
      }

      ImGui::PopID();
    }
  }
#pragma endregion



  ImGui::Separator();
  {
    if (ImGui::Button("Particles"))
    {
      g_GraphicsSys->Particle_Draw();
    }
  }

  ImGui::Separator();
  {
    if (ImGui::CollapsingHeader("Note"))
    {
      ImGui::PushID("Notes");

      if (ImGui::Button("Play"))
      {
        Music_State = PLAY;
      }

      if (ImGui::Button("Stop"))
      {
        Music_State = STOP;
      }

      if (ImGui::Button("Pause"))
      {
        Music_State = PAUSE;
      }

      if (ImGui::Button("Reset Default"))
      {
        shoft_loud = 0.5f;
        major_minor = 0;
        staccato_legato = 0.5f;
        phrase_length = 12;
        voice_melody = 0;
        time_signature = 1;
        bpm = 80;
        happiness = 0.5f;
        peacefulness = 0.5f;
        heart = 0.5f;
        relax = 0.5f;
      }

      if (ImGui::CollapsingHeader("Constraints"))
      {
        ImGui::SliderFloat("Soft | Loud", GetSoftness(), 0, 1);
        ImGui::SliderInt("Major | Minor", GetMajor(), 0, 1);
        ImGui::SliderFloat("Staccato | Legato", GetStaccato(), 0, 1);
        ImGui::SliderInt("Phrase Length", GetPhraseLength(), 4, 16);

        std::vector<char const *> Voices = {
          "None", "Bass", "Tenor", "Alto", "Soprano" };
        ImGui::Combo("Voice Melody", GetVoiceMelody(), Voices.data(), 5);

        std::vector<char const *> Time = {
          "3/4", "4/4", "6/8" };
        ImGui::Combo("Time Signature", GetTimeSignature(), Time.data(), 3);

        ImGui::SliderInt("BPM", GetBPM(), 40, 208);
      }

      if (ImGui::CollapsingHeader("Emotion"))
      {
        ImGui::SliderFloat("Happy | Sad", GetHappiness(), 0, 1);
        ImGui::SliderFloat("Peaceful | Angry", GetPeacefulness(), 0, 1);
        ImGui::SliderFloat("Light-Hearted | Heavy", GetHeartness(), 0, 1);
        ImGui::SliderFloat("Relaxed | Frantic", GetRelax(), 0, 1);
      }
    }
  }

}