Skip to content

Commit

Permalink
いろいろ(未遂)
Browse files Browse the repository at this point in the history
タイトル決定
タイトル画面をよさげに
デフォルトファイル埋め込みを抹殺
htmlを”呼べなかった”
  • Loading branch information
falrnd committed Sep 15, 2017
1 parent 569a4da commit 85b4917
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 40 deletions.
Binary file added SchoolFestival2017/20170915-230213-575.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion SchoolFestival2017/GameScene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inline double vec2ToRadian(const Vec2& v){
class GameScene:public MySceneManager::Scene{
private:
const int hitsize =50;
const int seedslimit=5;
const size_t seedslimit=5;
public:
Drag drag;
Unit unit;
Expand Down
32 changes: 18 additions & 14 deletions SchoolFestival2017/Global.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class GlobalData{
using MySceneManager=SceneManager<Scene,GlobalData>;

namespace Name{

const String font =L"font";
const String font_large =L"font_l";
const String font_small =L"font_s";
const String fontname =L"Rounded-X Mgen+ 1pp regular";
const String
font =L"font",
font_large =L"font_l",
font_small =L"font_s",
fontname =L"Rounded-X Mgen+ 1pp regular";
namespace File{
const String highscore=L"highscore.fal";
const String font =L"resources/font/rounded-x-mgenplus-1pp-regular.ttf";
Expand All @@ -46,15 +46,16 @@ namespace Name{
};
}
namespace Flower{
const String blue =L"flower_blue" ;
const String brown =L"flower_brown" ;
const String green =L"flower_green" ;
const String orange =L"flower_orange";
const String pink =L"flower_pink" ;
const String purple =L"flower_purple";
const String red =L"flower_red" ;
const String sky =L"flower_skyblue";
const String yellow =L"flower_yellow";
const String
blue =L"flower_blue" ,
brown =L"flower_brown" ,
green =L"flower_green" ,
orange =L"flower_orange",
pink =L"flower_pink" ,
purple =L"flower_purple",
red =L"flower_red" ,
sky =L"flower_skyblue",
yellow =L"flower_yellow";
const Array<String> colors={
blue,
brown,
Expand All @@ -72,6 +73,9 @@ namespace Name{
namespace GColor{
const Color darkblack={0,0,0,150};
const Color lightblack={0,0,0,100};
const Color darkbrown={165,42,42,150};
const Color lightbrown={165,42,42,100};
const Color brown=Palette::Brown;
}

inline bool _registerflower(const String& v){
Expand Down
2 changes: 2 additions & 0 deletions SchoolFestival2017/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ void Main(){
mng.setFadeColor({0,0,0,100});
mng.init(Scene::Title);

Window::SetTitle(L"Worker Bee ver 1.1");

while (System::Update()){
TextureAsset(Name::BG).draw();

Expand Down
6 changes: 3 additions & 3 deletions SchoolFestival2017/RankScene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ class RankScene:public MySceneManager::Scene{
FontAsset(Name::font)(L"読み込めませんでした……")
.drawCenter(Window::Center());
}else{
for(int i=0;i<strs.size();i+=2){
for(size_t i=0;i<strs.size();i+=2){
FontAsset(Name::font)(strs[i]+L"さん")
.draw(100,i*35+150);
.draw(100,(double)(i*35+150));
FontAsset(Name::font)(strs[i+1])
.draw(700,i*35+150);
.draw(700,(double)(i*35+150));
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions SchoolFestival2017/Resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
64826 FILE "Engine/Shaders/D3D11/FXAA_Q39.ps"

// Optional
64040 FILE "Engine/Objdetect/facePhoto.zip"
64041 FILE "Engine/Objdetect/faceAnime.zip"
64601 FILE "Engine/Fonts/mplus-1p-thin.zip"
64602 FILE "Engine/Fonts/mplus-1p-light.zip"
64603 FILE "Engine/Fonts/mplus-1p-regular.zip"
64605 FILE "Engine/Fonts/mplus-1p-bold.zip"
64606 FILE "Engine/Fonts/mplus-1p-heavy.zip"
64607 FILE "Engine/Fonts/mplus-1p-black.zip"
// 64040 FILE "Engine/Objdetect/facePhoto.zip"
// 64041 FILE "Engine/Objdetect/faceAnime.zip"
// 64601 FILE "Engine/Fonts/mplus-1p-thin.zip"
// 64602 FILE "Engine/Fonts/mplus-1p-light.zip"
// 64603 FILE "Engine/Fonts/mplus-1p-regular.zip"
// 64605 FILE "Engine/Fonts/mplus-1p-bold.zip"
// 64606 FILE "Engine/Fonts/mplus-1p-heavy.zip"
// 64607 FILE "Engine/Fonts/mplus-1p-black.zip"

// App Resource
100 ICON "Icon.ico"
Expand Down
4 changes: 3 additions & 1 deletion SchoolFestival2017/SchoolFestival2017.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>SchoolFestival2017</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>WorkerBee</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -165,6 +166,7 @@
<ResourceCompile Include="Resource.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="20170915-230213-575.png" />
<Image Include="Engine\Splash.png" />
<Image Include="Example\Brick.jpg" />
<Image Include="Example\Earth.jpg" />
Expand Down Expand Up @@ -259,8 +261,8 @@
<None Include="Example\Test.json" />
<None Include="Example\Well\Well.mtl" />
<None Include="Example\Well\Well.wavefrontobj" />
<None Include="resources\HonyaJi-Re.dat" />
<None Include="resources\unused.zip" />
<None Include="あそびかた.html" />
</ItemGroup>
<ItemGroup>
<Text Include="Engine\dll(x64)\libmpg123\COPYING.txt" />
Expand Down
11 changes: 8 additions & 3 deletions SchoolFestival2017/SchoolFestival2017.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@
<Image Include="resources\nuts_himawari_single_small.png">
<Filter>リソース ファイル\resources</Filter>
</Image>
<Image Include="20170915-230213-575.png">
<Filter>リソース ファイル</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<None Include="Engine\Assets\engine_textures.s3a">
Expand Down Expand Up @@ -365,8 +368,8 @@
<None Include="resources\unused.zip">
<Filter>リソース ファイル\resources</Filter>
</None>
<None Include="resources\HonyaJi-Re.dat">
<Filter>リソース ファイル\resources</Filter>
<None Include="あそびかた.html">
<Filter>リソース ファイル</Filter>
</None>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -430,7 +433,9 @@
<Text Include="resources\font\SIL_Open_Font_License_1.1.txt">
<Filter>リソース ファイル\resources\font</Filter>
</Text>
<Text Include="highscore.fal" />
<Text Include="highscore.fal">
<Filter>リソース ファイル</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<Media Include="Example\Sound.mp3">
Expand Down
32 changes: 22 additions & 10 deletions SchoolFestival2017/TitleScene.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#pragma once
#include"Global.hpp"

#include<Siv3D/String.hpp>

class TitleScene:public MySceneManager::Scene{
public:
const RoundRect
start{110,400,350,120,40},
rank {500,400,350,120,40};
start{260,400,270,70,40},//start{180,400,270,70,40},
rule {510,400,270,70,40},
rank {430,480,270,70,40};//rank {510,480,270,70,40};
void update() override{
if(start.leftClicked){
changeScene(Scene::Game);
Expand All @@ -16,22 +20,30 @@ class TitleScene:public MySceneManager::Scene{
Input::GetCharsHelper(m_data->playername);
}
void draw() const override{
FontAsset(Name::font_large)(L"ここに素晴らしいタイトル")
.drawCenter({Window::Center().x,200});
FontAsset(Name::font_large)(L"ハタラキバチ")
.drawCenter({Window::Center().x,150});
FontAsset(Name::font )(L"- Worker Bee -")
.draw({470,180});

Rect(440,285,700,60)
.draw ({255,255,255,100})
.drawFrame(1,1,GColor::darkblack);
FontAsset(Name::font)(L"おなまえは?:"+m_data->playername)
.draw(150,280);


FontAsset(Name::font_small)(L"(ランクインするとのこります)")
.draw(150,350);

start
.draw(start.mouseOver?GColor::lightblack:GColor::darkblack);
rank
.draw(rank .mouseOver?GColor::lightblack:GColor::darkblack);
start.draw(start.mouseOver?GColor::lightbrown:GColor::darkbrown);
//rule.draw(rule .mouseOver?GColor::lightbrown:GColor::darkbrown);
rank.draw(rank .mouseOver?GColor::lightbrown:GColor::darkbrown);

FontAsset(Name::font_large)(L"はじめる")
FontAsset(Name::font)(L"はじめる")
.drawCenter(start.center);
FontAsset(Name::font_large)(L"ランキング")
//FontAsset(Name::font)(L"あそびかた")
// .drawCenter(rule.center);
FontAsset(Name::font)(L"ランキング")
.drawCenter(rank.center);
}
};

0 comments on commit 85b4917

Please sign in to comment.