diff --git a/SIL_Open_Font_License_1_1.txt b/SIL_Open_Font_License_1_1.txt new file mode 100644 index 0000000..e1fa6e8 --- /dev/null +++ b/SIL_Open_Font_License_1_1.txt @@ -0,0 +1,91 @@ +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/arrow0.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/arrow0.png new file mode 100644 index 0000000..d358a1d Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/arrow0.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/arrow1.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/arrow1.png new file mode 100644 index 0000000..7e4658c Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/arrow1.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloonc0.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloonc0.png new file mode 100644 index 0000000..4ad08cb Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloonc0.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons0.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons0.png new file mode 100644 index 0000000..67dd25c Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons0.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons0s.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons0s.txt new file mode 100644 index 0000000..b56609c --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons0s.txt @@ -0,0 +1,44 @@ +font.color.r,0 +font.color.g,0 +font.color.b,0 + +font.shadowcolor.r,none +font.shadowcolor.g,none +font.shadowcolor.b,none + +cursor.font.color.r,0 +cursor.font.color.g,0 +cursor.font.color.b,0 +cursor.pen.color.r,0 +cursor.pen.color.g,0 +cursor.pen.color.b,0 +cursor.brush.color.r,127 +cursor.brush.color.g,127 +cursor.brush.color.b,127 + +cursor.notselect.font.color.r,0 +cursor.notselect.font.color.g,0 +cursor.notselect.font.color.b,0 + +anchor.font.color.r,0 +anchor.font.color.g,0 +anchor.font.color.b,0 +anchor.pen.color.r,0 +anchor.pen.color.g,0 +anchor.pen.color.b,0 + +anchor.notselect.font.color.r,0 +anchor.notselect.font.color.g,0 +anchor.notselect.font.color.b,0 + +anchor.visited.font.color.r,0 +anchor.visited.font.color.g,0 +anchor.visited.font.color.b,0 + +sstpmessage.font.color.r,0 +sstpmessage.font.color.g,0 +sstpmessage.font.color.b,0 + +number.font.color.r,0 +number.font.color.g,0 +number.font.color.b,0 diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons10.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons10.png new file mode 100644 index 0000000..830ea0c Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons10.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons12.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons12.png new file mode 100644 index 0000000..eb9c06f Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons12.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons14.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons14.png new file mode 100644 index 0000000..1cd2f56 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons14.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons16.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons16.png new file mode 100644 index 0000000..6b661ac Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons16.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons18.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons18.png new file mode 100644 index 0000000..f05169c Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons18.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons2.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons2.png new file mode 100644 index 0000000..f569987 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons2.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons20.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons20.png new file mode 100644 index 0000000..99db756 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons20.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons22.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons22.png new file mode 100644 index 0000000..aaf5dbc Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons22.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons24.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons24.png new file mode 100644 index 0000000..9011b74 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons24.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons26.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons26.png new file mode 100644 index 0000000..8972226 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons26.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons28.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons28.png new file mode 100644 index 0000000..a439049 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons28.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons30.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons30.png new file mode 100644 index 0000000..a8e0e10 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons30.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons30s.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons30s.txt new file mode 100644 index 0000000..b56609c --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons30s.txt @@ -0,0 +1,44 @@ +font.color.r,0 +font.color.g,0 +font.color.b,0 + +font.shadowcolor.r,none +font.shadowcolor.g,none +font.shadowcolor.b,none + +cursor.font.color.r,0 +cursor.font.color.g,0 +cursor.font.color.b,0 +cursor.pen.color.r,0 +cursor.pen.color.g,0 +cursor.pen.color.b,0 +cursor.brush.color.r,127 +cursor.brush.color.g,127 +cursor.brush.color.b,127 + +cursor.notselect.font.color.r,0 +cursor.notselect.font.color.g,0 +cursor.notselect.font.color.b,0 + +anchor.font.color.r,0 +anchor.font.color.g,0 +anchor.font.color.b,0 +anchor.pen.color.r,0 +anchor.pen.color.g,0 +anchor.pen.color.b,0 + +anchor.notselect.font.color.r,0 +anchor.notselect.font.color.g,0 +anchor.notselect.font.color.b,0 + +anchor.visited.font.color.r,0 +anchor.visited.font.color.g,0 +anchor.visited.font.color.b,0 + +sstpmessage.font.color.r,0 +sstpmessage.font.color.g,0 +sstpmessage.font.color.b,0 + +number.font.color.r,0 +number.font.color.g,0 +number.font.color.b,0 diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons32.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons32.png new file mode 100644 index 0000000..e958038 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons32.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons32s.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons32s.txt new file mode 100644 index 0000000..b56609c --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons32s.txt @@ -0,0 +1,44 @@ +font.color.r,0 +font.color.g,0 +font.color.b,0 + +font.shadowcolor.r,none +font.shadowcolor.g,none +font.shadowcolor.b,none + +cursor.font.color.r,0 +cursor.font.color.g,0 +cursor.font.color.b,0 +cursor.pen.color.r,0 +cursor.pen.color.g,0 +cursor.pen.color.b,0 +cursor.brush.color.r,127 +cursor.brush.color.g,127 +cursor.brush.color.b,127 + +cursor.notselect.font.color.r,0 +cursor.notselect.font.color.g,0 +cursor.notselect.font.color.b,0 + +anchor.font.color.r,0 +anchor.font.color.g,0 +anchor.font.color.b,0 +anchor.pen.color.r,0 +anchor.pen.color.g,0 +anchor.pen.color.b,0 + +anchor.notselect.font.color.r,0 +anchor.notselect.font.color.g,0 +anchor.notselect.font.color.b,0 + +anchor.visited.font.color.r,0 +anchor.visited.font.color.g,0 +anchor.visited.font.color.b,0 + +sstpmessage.font.color.r,0 +sstpmessage.font.color.g,0 +sstpmessage.font.color.b,0 + +number.font.color.r,0 +number.font.color.g,0 +number.font.color.b,0 diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons34.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons34.png new file mode 100644 index 0000000..27c8ad3 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons34.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons34s.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons34s.txt new file mode 100644 index 0000000..b56609c --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons34s.txt @@ -0,0 +1,44 @@ +font.color.r,0 +font.color.g,0 +font.color.b,0 + +font.shadowcolor.r,none +font.shadowcolor.g,none +font.shadowcolor.b,none + +cursor.font.color.r,0 +cursor.font.color.g,0 +cursor.font.color.b,0 +cursor.pen.color.r,0 +cursor.pen.color.g,0 +cursor.pen.color.b,0 +cursor.brush.color.r,127 +cursor.brush.color.g,127 +cursor.brush.color.b,127 + +cursor.notselect.font.color.r,0 +cursor.notselect.font.color.g,0 +cursor.notselect.font.color.b,0 + +anchor.font.color.r,0 +anchor.font.color.g,0 +anchor.font.color.b,0 +anchor.pen.color.r,0 +anchor.pen.color.g,0 +anchor.pen.color.b,0 + +anchor.notselect.font.color.r,0 +anchor.notselect.font.color.g,0 +anchor.notselect.font.color.b,0 + +anchor.visited.font.color.r,0 +anchor.visited.font.color.g,0 +anchor.visited.font.color.b,0 + +sstpmessage.font.color.r,0 +sstpmessage.font.color.g,0 +sstpmessage.font.color.b,0 + +number.font.color.r,0 +number.font.color.g,0 +number.font.color.b,0 diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons36.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons36.png new file mode 100644 index 0000000..322a43f Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons36.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons36s.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons36s.txt new file mode 100644 index 0000000..b56609c --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons36s.txt @@ -0,0 +1,44 @@ +font.color.r,0 +font.color.g,0 +font.color.b,0 + +font.shadowcolor.r,none +font.shadowcolor.g,none +font.shadowcolor.b,none + +cursor.font.color.r,0 +cursor.font.color.g,0 +cursor.font.color.b,0 +cursor.pen.color.r,0 +cursor.pen.color.g,0 +cursor.pen.color.b,0 +cursor.brush.color.r,127 +cursor.brush.color.g,127 +cursor.brush.color.b,127 + +cursor.notselect.font.color.r,0 +cursor.notselect.font.color.g,0 +cursor.notselect.font.color.b,0 + +anchor.font.color.r,0 +anchor.font.color.g,0 +anchor.font.color.b,0 +anchor.pen.color.r,0 +anchor.pen.color.g,0 +anchor.pen.color.b,0 + +anchor.notselect.font.color.r,0 +anchor.notselect.font.color.g,0 +anchor.notselect.font.color.b,0 + +anchor.visited.font.color.r,0 +anchor.visited.font.color.g,0 +anchor.visited.font.color.b,0 + +sstpmessage.font.color.r,0 +sstpmessage.font.color.g,0 +sstpmessage.font.color.b,0 + +number.font.color.r,0 +number.font.color.g,0 +number.font.color.b,0 diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons38.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons38.png new file mode 100644 index 0000000..e64cde2 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons38.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons38s.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons38s.txt new file mode 100644 index 0000000..b56609c --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons38s.txt @@ -0,0 +1,44 @@ +font.color.r,0 +font.color.g,0 +font.color.b,0 + +font.shadowcolor.r,none +font.shadowcolor.g,none +font.shadowcolor.b,none + +cursor.font.color.r,0 +cursor.font.color.g,0 +cursor.font.color.b,0 +cursor.pen.color.r,0 +cursor.pen.color.g,0 +cursor.pen.color.b,0 +cursor.brush.color.r,127 +cursor.brush.color.g,127 +cursor.brush.color.b,127 + +cursor.notselect.font.color.r,0 +cursor.notselect.font.color.g,0 +cursor.notselect.font.color.b,0 + +anchor.font.color.r,0 +anchor.font.color.g,0 +anchor.font.color.b,0 +anchor.pen.color.r,0 +anchor.pen.color.g,0 +anchor.pen.color.b,0 + +anchor.notselect.font.color.r,0 +anchor.notselect.font.color.g,0 +anchor.notselect.font.color.b,0 + +anchor.visited.font.color.r,0 +anchor.visited.font.color.g,0 +anchor.visited.font.color.b,0 + +sstpmessage.font.color.r,0 +sstpmessage.font.color.g,0 +sstpmessage.font.color.b,0 + +number.font.color.r,0 +number.font.color.g,0 +number.font.color.b,0 diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons4.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons4.png new file mode 100644 index 0000000..96494d2 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons4.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons40.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons40.png new file mode 100644 index 0000000..05ed9f4 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons40.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons40s.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons40s.txt new file mode 100644 index 0000000..b56609c --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons40s.txt @@ -0,0 +1,44 @@ +font.color.r,0 +font.color.g,0 +font.color.b,0 + +font.shadowcolor.r,none +font.shadowcolor.g,none +font.shadowcolor.b,none + +cursor.font.color.r,0 +cursor.font.color.g,0 +cursor.font.color.b,0 +cursor.pen.color.r,0 +cursor.pen.color.g,0 +cursor.pen.color.b,0 +cursor.brush.color.r,127 +cursor.brush.color.g,127 +cursor.brush.color.b,127 + +cursor.notselect.font.color.r,0 +cursor.notselect.font.color.g,0 +cursor.notselect.font.color.b,0 + +anchor.font.color.r,0 +anchor.font.color.g,0 +anchor.font.color.b,0 +anchor.pen.color.r,0 +anchor.pen.color.g,0 +anchor.pen.color.b,0 + +anchor.notselect.font.color.r,0 +anchor.notselect.font.color.g,0 +anchor.notselect.font.color.b,0 + +anchor.visited.font.color.r,0 +anchor.visited.font.color.g,0 +anchor.visited.font.color.b,0 + +sstpmessage.font.color.r,0 +sstpmessage.font.color.g,0 +sstpmessage.font.color.b,0 + +number.font.color.r,0 +number.font.color.g,0 +number.font.color.b,0 diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons6.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons6.png new file mode 100644 index 0000000..9a39a64 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons6.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons8.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons8.png new file mode 100644 index 0000000..ab7fe44 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/balloons8.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/clickwait.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/clickwait.png new file mode 100644 index 0000000..7a8963d Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/clickwait.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/descript.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/descript.txt new file mode 100644 index 0000000..4ce48d0 --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/descript.txt @@ -0,0 +1,120 @@ +charset,UTF-8 +type,balloon +name,WeatherTimeCapsule専用バルーン + +craftman,lost_nd_xxx +craftmanw,ろすえん +craftmanurl,https://lnx.flop.jp/ + +readme.charset,UTF-8 + +recommended.ghost,WeatherTimeCapsule +recommended.ghost.path,WeatherTimeCapsule + +use_self_alpha,1 +use_input_alpha,1 + +windowposition.x,0 +windowposition.y,-266 + +origin.x,10 +origin.y,10 + +validrect.left,10 +validrect.top,10 +validrect.right,-10 +validrect.bottom,-10 + +wordwrappoint.x,-10 +wordwrappoint.y,0 + +font.name,BIZ UDゴシック +font.height,18 + +font.color.r,255 +font.color.g,255 +font.color.b,255 + +font.shadowcolor.r,none +font.shadowcolor.g,none +font.shadowcolor.b,none + +cursor.style,square +cursor.blendmethod,copypen +cursor.font.color.r,255 +cursor.font.color.g,255 +cursor.font.color.b,255 +cursor.pen.color.r,255 +cursor.pen.color.g,255 +cursor.pen.color.b,255 +cursor.brush.color.r,127 +cursor.brush.color.g,127 +cursor.brush.color.b,127 + +cursor.notselect.style,none +cursor.notselect.font.color.r,255 +cursor.notselect.font.color.g,255 +cursor.notselect.font.color.b,255 + +anchor.style,underline +anchor.blendmethod,copypen +anchor.font.color.r,255 +anchor.font.color.g,255 +anchor.font.color.b,255 +anchor.pen.color.r,255 +anchor.pen.color.g,255 +anchor.pen.color.b,255 + +anchor.notselect.style,none +anchor.notselect.font.color.r,255 +anchor.notselect.font.color.g,255 +anchor.notselect.font.color.b,255 + +anchor.visited.style,none +anchor.visited.font.color.r,255 +anchor.visited.font.color.g,255 +anchor.visited.font.color.b,255 + +clickwaitmarker.x,-79 +clickwaitmarker.y,-24 + +sstpmarker.x,10 +sstpmarker.y,-18 + +sstpmessage.x,24 +sstpmessage.y,-18 + +onlinemarker.x,202 +onlinemarker.y,-22 + +sstpmessage.font.name,BIZ UDゴシック +sstpmessage.font.height,12 + +sstpmessage.font.color.r,255 +sstpmessage.font.color.g,255 +sstpmessage.font.color.b,255 + +number.font.name,BIZ UDゴシック +number.font.height,12 +number.font.color.r,255 +number.font.color.g,255 +number.font.color.b,255 +number.xr,-24 +number.y,-18 + +arrow0.x,-20 +arrow0.y,6 +arrow1.x,-20 +arrow1.y,-18 + +communicatebox.font.name,BIZ UDゴシック +communicatebox.font.color.r,0 +communicatebox.font.color.g,0 +communicatebox.font.color.b,0 +communicatebox.background.color.r,255 +communicatebox.background.color.g,255 +communicatebox.background.color.b,255 +communicatebox.x,8 +communicatebox.y,27 +communicatebox.width,460 +communicatebox.height,26 diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/install.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/install.txt new file mode 100644 index 0000000..a3cda8f --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/install.txt @@ -0,0 +1,5 @@ +charset,UTF-8 +type,balloon +name,WeatherTimeCapsule専用バルーン +directory,WeatherTimeCapsuleBalloon_121VDeesjlPk +refresh,1 diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/online.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/online.png new file mode 100644 index 0000000..4b12473 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/online.png differ diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/readme.txt b/WeatherTimeCapsuleBalloon_121VDeesjlPk/readme.txt new file mode 100644 index 0000000..b659331 --- /dev/null +++ b/WeatherTimeCapsuleBalloon_121VDeesjlPk/readme.txt @@ -0,0 +1 @@ +ゴースト「WeatherTimeCapsule」専用バルーン diff --git a/WeatherTimeCapsuleBalloon_121VDeesjlPk/sstp.png b/WeatherTimeCapsuleBalloon_121VDeesjlPk/sstp.png new file mode 100644 index 0000000..6cf9aa3 Binary files /dev/null and b/WeatherTimeCapsuleBalloon_121VDeesjlPk/sstp.png differ diff --git a/developer_options.txt b/developer_options.txt new file mode 100644 index 0000000..5a6aa70 --- /dev/null +++ b/developer_options.txt @@ -0,0 +1,4 @@ +WeatherTimeCapsuleBalloon_121VDeesjlPk,noupdate +.github/,nonar,noupdate +md5buildignore.txt,nonar,noupdate +//developer_options.txt,nonar,noupdate diff --git a/ghost/master/descript.txt b/ghost/master/descript.txt new file mode 100644 index 0000000..69fb96f --- /dev/null +++ b/ghost/master/descript.txt @@ -0,0 +1,24 @@ +charset,UTF-8 + +name,WeatherTimeCapsule +type,ghost + +shiori,yaya.dll +icon,wtc_icon.ico + +craftman,lost_nd_xxx +craftmanw,ろすえん +craftmanurl,https://lnx.flop.jp/ + +readme.charset,UTF-8 + +sakura.name,WeatherTimeCapsule_0 +kero.name,WeatherTimeCapsule_1 + +seriko.alignmenttodesktop,free + +default.balloon.path,WeatherTimeCapsuleBalloon_121VDeesjlPk + +sakura.balloon.offsetx,-10 + +homeurl,https://raw.githubusercontent.com/lost-nd-xxx/WeatherTimeCapsule/main/ diff --git a/ghost/master/dic/emerg/yaya_emerg_dic.dic b/ghost/master/dic/emerg/yaya_emerg_dic.dic new file mode 100644 index 0000000..37faef8 --- /dev/null +++ b/ghost/master/dic/emerg/yaya_emerg_dic.dic @@ -0,0 +1,20 @@ +//****************************************************************************** +// YAYA ゴーストテンプレート +// 緊急時辞書 +// 最低限のエラー対策 +// +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// !!!!!辞書エラーの原因になるような記述はしないこと!!!!! +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// +//****************************************************************************** + +OnBoot +{ + '\0\s[0]\1\s[-1]\0致命的エラー発生' +} + +OnFirstBoot +{ + OnBoot +} diff --git a/ghost/master/dic/module/jsonparser_readme.txt b/ghost/master/dic/module/jsonparser_readme.txt new file mode 100644 index 0000000..dffebc2 --- /dev/null +++ b/ghost/master/dic/module/jsonparser_readme.txt @@ -0,0 +1,140 @@ + +************************************************************************* +YAYA as SAORI jsonパーサ with オブジェクト風の何か +************************************************************************* + +jsonをjavascriptのオブジェクト風に読み込み、要素の取り出し等の操作が行えるYAYA as SAORIモジュールです。 +基本的にAPIの簡単な利用が目的で複雑なオブジェクト操作はできません。 +YAYA as SAORIで作っているのでSAORIとして機能を使う場合yaya.dll等と一緒に読み込ませる必要があります。 +下記の手順で導入ができます。 + + +(1)YAYA as SAORI本体ダウンロード +http://emily.shillest.net/ayaya/index.php?YAYA%20as%20SAORI +上のページから「YAYA as SAORI」本体をダウンロードして解凍します。 + +(2)YAYA as SAORI 本体のファイルをsaori用フォルダに入れる +解凍したフォルダのなかの「yaya_saori」フォルダ下の「ayaysaori.aym」、「builtins.aym」、「yaya.dll」、「yaya.txt」をsaori用のフォルダに入れてください。 + +(3)jsonパーサモジュールをsaori用フォルダに入れる +yaya_jsonRead.aymとyaya_iObj.aymをsaori用フォルダに入れてください。 + +(4)yaya.txtの書き換え +yaya.txtを書き換えて、yaya_jsonRead.aymとyaya_iObj.aymをYAYA as SAORIが読み込めるようにしてください。 + +「dic, yaya_jsonRead.aym」 +「dic, yaya_iObj.aym」 + +と追記すれば良いです。 + +他に読み込むモジュールがなければこのモジュールに同梱しているyaya.txtで置き換えても大丈夫です。 + + + + +************************************************************************* +*外から呼びだす関数一覧 +************************************************************************* + +1. "JSON.readJson" +入力:json文字列 例:"{"生徒":[{"出席番号":1,"名前":"山田太郎"},{"出席番号":2,"名前":"鈴木ひろし"}]}" +返り値:iオブジェクトID(ポインタのようなもの) 例:iObjxxx0 + +->json文字列を読み込んで、iオブジェクトに変換します。 +返却されるiオブジェクトIDはそのあと、iオブジェクトを操作するのに使います。 + + +2."IOBJ.iObj" +入力1:iオブジェクトID  +入力2以降:キー +返り値:iオブジェクトのキーの位置に対応する要素の値またはiオブジェクトID  +例:入力 "iObjxxx0","生徒",1,名前 => 返り値 鈴木ひろし + +->iオブジェクトから要素や子のオブジェクトを取り出すのに使います。 + + +3. "JSON.readFile" +入力1:ファイルパス  +入力2:文字コードID(任意) +返り値:テキスト + +->ファイルのテキストを取得します。 +文字コードIDが入力されない場合文字コードIDは1 (=UTF-8)と見なされます。 +文字コードIDは「http://emily.shillest.net/ayaya/?マニュアル/文法/B.文字コード関連」に記載されています。 + +4."IOBJ.iObjToJson" +入力1:iオブジェクトID +入力2(任意):フォーマットするなら1しないなら0、デフォルトで0 +返り値:jsonオブジェクト文字列 +iObjをjsonオブジェクト文字列に変換して返却します。 +一部の表現を適切に返却できない場合があります。例えば指数はテキストとして返却されます。 + +5. "IOBJ.showIObj" +入力1:iオブジェクトID +返り値:フォーマットされたオブジェクト文字列 + +上のiObjToJsonの2つ目の引数が1の場合と同一の処理をします。インデントと改行をつけてフォーマットした文字列を返却します。 + +例:入力:iObjxxx0 +出力: +{ + "生徒": { + { + "出席番号": 1, + "名前": "山田太郎" + }, + [ + "出席番号": 2, + "名前": "鈴木ひろし" + ] + } +} + + + + +************************************************************************* +*YAYAでの呼び出し例 +************************************************************************* +「頭をクリックすると青空文庫の太宰の小説の作品名と情報を表示してくれる」です。 + +MouseDoubleClick_0Head +{ + aozoraSearch +} + +aozoraSearch{ + '\![execute,http-get,https://api.bungomail.com/v0/books?作者名=/太宰/&limit=4&after=100-10,--async=OnHookAozora,--file=searchResult.json]' +} + +OnHookAozora{ + _json=req.readFile(reference[3]) + LOGGING("json:"+_json) + _jsonDatas=req.readJson(_json) + _iObj=req.iObj(_jsonDatas,"books",0) + _txt="\_q"+req.iObj(_iObj,"作品名")+"\n" + _txt+=req.showiObj(_iObj)+"\_q" + _txt+"\e" +} + +req.readJson{ + FUNCTIONEX('saori\yaya.dll', "JSON.readJson",_argv) +} +req.iObj{ + FUNCTIONEX('saori\yaya.dll', "IOBJ.iObj",_argv) +} +req.readFile{ + FUNCTIONEX('saori\yaya.dll', "JSON.readFile",_argv) +} +req.showiObj{ + FUNCTIONEX('saori\yaya.dll', "IOBJ.showIObj",_argv) +} + + +************************************************************************* +*エスケープについて +************************************************************************* +さくらスクリプトで使う改行記号\nやタブ記号\tなどはそのままで、"\"を表す"\\”もそのままです。 +一方でダブルコーテーション「"」を表す「\"」は「"」に直されています。 + + diff --git a/ghost/master/dic/module/yaya_iObj.aym b/ghost/master/dic/module/yaya_iObj.aym new file mode 100644 index 0000000..0200907 --- /dev/null +++ b/ghost/master/dic/module/yaya_iObj.aym @@ -0,0 +1,648 @@ +//****************************************************************************** +// YAYA jsonパーサ with オブジェクト風の何か +//****************************************************************************** +//プライベート関数に外からアクセスできません。 +#define io S5LMkTRQW9zN +//****************************************************************************** +// 外から呼び出す関数 +//****************************************************************************** + +IOBJ.iObj{ + //_input=REQ.ARGS + _input=_argv + //RES.RESULT=io.iObj(_input) + io.iObj(_input) +} +IOBJ.iObj2{ + //_input=REQ.ARGS + _input=_argv + _res=io.iObj2(_input) + //RES.VALUE0=_res[0] + //RES.VALUE1=_res[1] + _res +} + +IOBJ.showIObj{ + //_input=REQ.ARGS + _input=_argv + //RES.RESULT=js.showIObj(_input) + js.showIObj(_input) +} +IOBJ.iObjToJson{ + //_input=REQ.ARGS + _input=_argv + //RES.RESULT=js.iObjToJson(_input) + js.iObjToJson(_input) +} +IOBJ.iObjArray{ + //_input=REQ.ARGS[0] + _input=_argv + _iObjArray=EVAL(_input) + //for _i=0;_i=2{ + if _argv[1]==1{ + _format=1 + } + if _argc>=3{ + _in=_argv[2] + } + } + _lineFeedArray=("","\n") + _lineFeed=_lineFeedArray[_format] + + _objRootName=_argv[0] + _objRoot=EVAL(_objRootName) + _x="" + _objType=0 + if (ARRAYSIZE(_objRoot)>0){ + _t=_objRoot[0] + if (GETTYPEEX("_t")!=3){ + _objType=1 + } + } + _bracket=("{","[","}","]") + _x+=_bracket[_objType]+_lineFeed + if _format==1{ + _in+=" " + } + LOGGING(ARRAYSIZE(_objRoot)) + for _i=0;_i=2{ + FCHARSET(_argv[1]) + }else{ + FCHARSET(1) + } + + _path=_argv[0] + if FOPEN( _path, "r" ){ + _text="" + _line=FREAD(_path) + while _line!=-1{ + _text+=_line+"\n" + _line=FREAD(_path) + } + + FCLOSE( _path ) + -- + _text + }else{ + "" + } +} diff --git a/ghost/master/dic/normal/yaya_aitalk.dic b/ghost/master/dic/normal/yaya_aitalk.dic new file mode 100644 index 0000000..0b68e81 --- /dev/null +++ b/ghost/master/dic/normal/yaya_aitalk.dic @@ -0,0 +1,92 @@ +//****************************************************************************** +// YAYA ゴーストテンプレート +// トーク辞書 +//****************************************************************************** + +//****************************************************************************** +// ランダムトーク +//****************************************************************************** +RandomTalk +{ + TOSTR(EVAL(CHR(0x22)+RandomTalkEx()+CHR(0x22))) +} + +//------------------------------------------------------------------------------ +//ランダムトーク本体:この中にランダムトークを記載してください +//ここのみ常に ' ' で括って書いてください。 +//上のRandomTalkの中身で%( )を展開していますので、" "を使わなくてもOKです。 +//高速化対策 +//------------------------------------------------------------------------------ +RandomTalkEx : nonoverlap +{ + '\1\s[10]\0\s[0]\_qno content\_q\e' +} + +//****************************************************************************** +//キーが押された +//****************************************************************************** + +//------------------------------------------------------------------------------ +//OnKeyPressイベント +//------------------------------------------------------------------------------ +//キーボードの任意のキーが押されたときに発動するイベントです。 +//ファンクションキーを指定するときは、'f1'等と指定します。 +//押されたキーはreference0に格納されます。 +//if文、もしくはcase~when文で分岐させると良いでしょう。 + +OnKeyPress +{ + case reference[0] { + when 't' { + OnWeatherView + } + when 'r' { + ScriptHeadSimple + -- + '\![reload,shiori](RELOAD SHIORI)\e' + } + when 'm' { + OnMenu + } + } +} + +//------------------------------------------------------------------------------ +//OnHourTimeSignal +//時報イベント。毎正時(?時0分0秒近く)に発生。 +//トーク再生不能な時はトークできるようになるまで待つ。 +//そのため少しずれた時間に通知されることがある。 +//--------------------------------------------------------------------------- +OnHourTimeSignal +{ + if IsDisplay == 1 && IsWaitingWeatherInfoRequest != 1 { + //喋れる(=表示が消えている)かつ表示中が有効 + OnWeatherView + } +} + +//------------------------------------------------------------------------------ +//OnMinuteChange +//1分毎に実行される。 +//--------------------------------------------------------------------------- +OnMinuteChange +{ + if reference[3] == 1 && IsDisplay == 1 && IsWaitingWeatherInfoRequest != 1 { + //喋れる(=表示が消えている)かつ表示中が有効 + OnWeatherView + } +} + +//****************************************************************************** +//サーフィス復元 +//****************************************************************************** + +//------------------------------------------------------------------------------ +//OnSurfaceRestoreイベント +//------------------------------------------------------------------------------ +OnSurfaceRestore +{ + '\1\s[10]\0\s[0]\e' +} + + diff --git a/ghost/master/dic/normal/yaya_bootend.dic b/ghost/master/dic/normal/yaya_bootend.dic new file mode 100644 index 0000000..89cd468 --- /dev/null +++ b/ghost/master/dic/normal/yaya_bootend.dic @@ -0,0 +1,143 @@ +//****************************************************************************** +// YAYA ゴーストテンプレート +// 起動/終了トーク辞書 +//****************************************************************************** + +//****************************************************************************** +//通常の起動 OnBoot +//****************************************************************************** +OnBoot +{ + ScriptHeadSimple + -- + OnBalloonInfoGetExec + -- + '\e' +} + +//****************************************************************************** +//終了 OnClose +//****************************************************************************** +OnClose +{ + '\-\e' +} + +//****************************************************************************** +//最小化と復帰 +//****************************************************************************** +OnWindowStateMinimize +{ + '\![timerraise,0,1,OnWeatherInfoRequest]' + //情報取得の予約を取り消す +} + +OnWindowStateRestore +{ + if IsDisplay == 1 { + OnWeatherView + } +} + +//****************************************************************************** +//ゴースト起動時の処理 +//****************************************************************************** +OnGhostLoad +{ + //起動ごとに初期化する変数 + IsDisplay = 1 + LastTickTime_GetWeatherInfo = 0 + + //変数が無かったら初期値をセットしておく + if ISVAR('LastTime_GetWeatherInfo') == 0 { LastTime_GetWeatherInfo = 0 } + if ISVAR('GeoCoordinates') == 0 { + GeoCoordinates = ( TOREAL( GeoList_Japan[12][2] ) , TOREAL( GeoList_Japan[12][3] ) ) + GeoName = ( GeoList_Japan[12][0] , GeoList_Japan[12][1] ) + } + if ISVAR('GeoName') == 0 { GeoName = '' } + if ISVAR('TimeMode') == 0 { TimeMode = 0 } + if ISVAR('TimeOffset') == 0 { TimeOffset = 1 } + if ISVAR('TimeSpecified') == 0 { TimeSpecified = GETSECCOUNT() } + if ISVAR('ColorTheme') == 0 { ColorTheme = (2,'黒') } + if ISVAR('CurrentBalloon_ValidWidth') == 0 { CurrentBalloon_ValidWidth = 312 } + if ISVAR('CurrentBalloon_ValidHeight') == 0 { CurrentBalloon_ValidHeight = 142 } + if ISVAR('CurrentBalloon_Lines') == 0 { CurrentBalloon_Lines = 10 } + if ISVAR('CurrentBalloon_CharWidth') == 0 { CurrentBalloon_CharWidth = 6 } + if ISVAR('CurrentBalloon_SingleLineLength') { CurrentBalloon_SingleLineLength = TOINT( ( CurrentBalloon_ValidWidth / CurrentBalloon_CharWidth ) - 7 ) } + if ISVAR('Result_Mode0') == 0 { Result_Mode0 = IARRAY } + if ISVAR('Result_Mode1') == 0 { Result_Mode1 = IARRAY } + if ISVAR('Result_Mode2') == 0 { Result_Mode2 = IARRAY } + if ISVAR('IsInfoTime') == 0 { IsInfoTime = 'current' } + if ISVAR('IsWaitingWeatherInfoRequest') == 0 { IsWaitingWeatherInfoRequest = 0 } +} + +//****************************************************************************** +//ゴースト終了時の処理 +//****************************************************************************** +OnGhostUnload +{ + if ISVAR('IOBJ.JsonData0')==1 { + for _c=0; _c OnGhostChanging_the__MobileMaster_ + +OnGhostChanging 他のゴーストへ切り替えしようとしたとき。無ければOnCloseが呼ばれます。 +OnGhostChanged 他のゴーストから切り替わったとき。無ければOnBootが呼ばれます。 +OnGhostCalling 他のゴーストを呼び出そうとしたとき +OnGhostCalled 他のゴーストから呼び出されたとき。無ければOnBootが呼ばれます。 +OnGhostCallComplete 他のゴーストを呼び出して、呼び出されたゴーストの起動が完了したとき、OnOtherGhostBootedの代わりに + +OnOtherGhostBooted 他のゴーストが呼び出されて、呼び出されたゴーストの起動が完了したとき +OnOtherGhostClosed 他のゴーストが終了したとき +OnOtherGhostChanged 他のゴーストが他のゴーストに 切り替わって、切り替わり先のゴーストの起動が完了したとき +*/ + +/* +//その他のゴーストへ切り替え +OnGhostChangingOther +{ + _escaped_name = SHIORI3FW.EscapeAllTags(reference[0]) + + '\1\s\[10]\0\s[0]' + -- + "%(_escaped_name)へ切り替えます..." + -- + '\e' +} + +//その他のゴーストから切り替り +OnGhostChangedOther +{ + _escaped_name = SHIORI3FW.EscapeAllTags(reference[0]) + + '\1\s\[10]\0\s[0]' + -- + "%(_escaped_name)から切り替わりました" + -- + '\e' +} +*/ + +//****************************************************************************** +//この下は切り替えトーク処理用 +//通常はいじる必要はありませんが、必要に応じて適宜変更してください。 +//AYATEMPLATE.ではじまる関数は _tmpl_util.dic にあります。 +//****************************************************************************** + +OnGhostChanging +{ + AYATEMPLATE.ExecuteChangeCallTalk("OnGhostChanging","OnClose") +} + +OnGhostChanged +{ + AYATEMPLATE.ExecuteChangeCallTalk("OnGhostChanged","OnBoot") +} + +OnGhostCalling +{ + AYATEMPLATE.ExecuteChangeCallTalk('OnGhostCalling') +} + +OnGhostCalled +{ + AYATEMPLATE.ExecuteChangeCallTalk("OnGhostCalled","OnBoot") +} + +OnGhostCallComplete +{ + AYATEMPLATE.ExecuteChangeCallTalk('OnGhostCallComplete') +} + +OnOtherGhostClosed +{ + AYATEMPLATE.ExecuteChangeCallTalk('OnOtherGhostClosed') +} + +OnOtherGhostBooted +{ + AYATEMPLATE.ExecuteChangeCallTalk('OnOtherGhostBooted') +} + +OnOtherGhostChanged +{ + AYATEMPLATE.ExecuteChangeCallTalk('OnOtherGhostChanged') +} + + diff --git a/ghost/master/dic/normal/yaya_etc.dic b/ghost/master/dic/normal/yaya_etc.dic new file mode 100644 index 0000000..aadb2f1 --- /dev/null +++ b/ghost/master/dic/normal/yaya_etc.dic @@ -0,0 +1,510 @@ +//****************************************************************************** +// YAYA ゴーストテンプレート +// 種々のイベント辞書 +//****************************************************************************** + +ScriptHead +{ + _color = '' + _BalloonDir = SPLIT(SHIORI3FW.BalloonPath, '/', 0) + _BalloonDir = _BalloonDir[ARRAYSIZE(_BalloonDir) - 2] + if STRSTR(SHIORI3FW.BalloonName, 'WeatherTimeCapsule', 0) >= 0 || STRSTR(_BalloonDir, 'WeatherTimeCapsule', 0) >= 0 { + _color = "\b[%(ColorTheme[0])]" + } + + '\1\s[10]\0\s[0]' + -- + _color + -- + '\*\![enter,nouserbreakmode]\![set,balloonwait,0]\![set,balloontimeout,0]\![set,choicetimeout,0]\![close,inputbox,__SYSTEM_ALL_INPUT__]\_q' +} + +ScriptHeadSimple +{ + _color = '' + _BalloonDir = SPLIT(SHIORI3FW.BalloonPath, '/', 0) + _BalloonDir = _BalloonDir[ARRAYSIZE(_BalloonDir) - 2] + if STRSTR(SHIORI3FW.BalloonName, 'WeatherTimeCapsule', 0) >= 0 || STRSTR(_BalloonDir, 'WeatherTimeCapsule', 0) >= 0 { + _color = "\b[%(ColorTheme[0])]" + } + + '\1\s[10]\0\s[0]\_q' + _color +} + +OnUserInputCancel +{ + _funcname = reference[0] + 'Cancel' + if ISFUNC(_funcname) == 1 { + EVAL(_funcname) + } +} + +//****************************************************************************** +//シェル切り替え +//****************************************************************************** + +//------------------------------------------------------------------------------ +//シェルチェンジ開始 +//------------------------------------------------------------------------------ +/* +OnShellChanging +{ +'\1\s[10]\0\s[0]シェルを変更します\e' +} +*/ + +//------------------------------------------------------------------------------ +//シェルチェンジ完了 +//------------------------------------------------------------------------------ +/* +OnShellChanged +{ +_escaped_name = SHIORI3FW.EscapeAllTags(reference[0]) +"\1\s[10]\0\s[0]シェルを%(_escaped_name)へ変更しました\e" +} +*/ + +//****************************************************************************** +//インストール関連 +//****************************************************************************** + +//------------------------------------------------------------------------------ +//インストール中のメッセージ +//------------------------------------------------------------------------------ +OnInstallBegin +{ + ScriptHeadSimple + -- + 'インストールしています……\e' +} + +//------------------------------------------------------------------------------ +//インストール完了メッセージ +//------------------------------------------------------------------------------ +OnInstallComplete +{ + _ref0 = SPLIT(reference[0], ' with', 2)[0] //hogehoge with hemohemo + + ScriptHeadSimple + -- + if _ref0 == 'shell' { + 'シェル' + } + elseif _ref0 == 'ghost' { + 'ゴースト' + } + elseif _ref0 == 'balloon' { + 'バルーン' + } + elseif _ref0 == 'plugin' { + 'プラグイン' + } + -- + _escaped_name = SHIORI3FW.EscapeAllTags(reference[1]) + "「%(_escaped_name)」、インストール完了しました。\n" + -- + if basewarenameex == 'SSP' { + _id = '' + if _ref0 == 'shell' { + _id = 'shell' + } + elseif _ref0 == 'ghost' { + _id = 'ghost' + } + elseif _ref0 == 'balloon' { + _id = 'balloon' + } + + if _id != '' { + '切り替えますか?' + -- + AYATEMPLATE.MenuItem('切り替える', 'OnAYATEMPLATE.InstallChange', _id, 200) + -- + AYATEMPLATE.MenuItem('切り替えない', 'script:\e') + } + } +} + +OnAYATEMPLATE.InstallChange +{ + "\![change,%(AYATEMPLATE.EscapeText(reference[0])),lastinstalled]" +} + +//------------------------------------------------------------------------------ +//インストール失敗メッセージ +//------------------------------------------------------------------------------ +OnInstallFailure +{ + ScriptHeadSimple + -- + _escaped_message = SHIORI3FW.EscapeAllTags(reference[0]) + "インストール失敗。\n理由:%(_escaped_message)。\e" +} + +//------------------------------------------------------------------------------ +//インストール拒否(他のゴーストのためのアーカイブだった) +//------------------------------------------------------------------------------ +OnInstallRefuse +{ + ScriptHeadSimple + -- + _escaped_name = SHIORI3FW.EscapeAllTags(reference[0]) + "インストール中断。\n「%(_escaped_name)」用のアーカイブです。\e" +} + +//****************************************************************************** +//消滅関連 +//****************************************************************************** + +//------------------------------------------------------------------------------ +//消滅指示 +//------------------------------------------------------------------------------ +//OnVanishSelecting + +//------------------------------------------------------------------------------ +//消滅開始 +//------------------------------------------------------------------------------ +//OnVanishSelected + +//------------------------------------------------------------------------------ +//消滅中止 +//------------------------------------------------------------------------------ +//OnVanishCancel + +//------------------------------------------------------------------------------ +//他のゴーストが消滅して自分に切り替わった +//------------------------------------------------------------------------------ +//OnVanished + +//****************************************************************************** +//メールチェック +//****************************************************************************** + +//------------------------------------------------------------------------------ +//メールチェック開始 +//------------------------------------------------------------------------------ +OnBIFFBegin +{ + ScriptHeadSimple + -- + 'メールチェック開始。' + -- + '\e' +} + +//------------------------------------------------------------------------------ +//メールチェック成功 +//------------------------------------------------------------------------------ +OnBIFFComplete +{ + ScriptHeadSimple + -- + if TOINT(reference[0]) == 0 { + //---- メールは無かった + '新着メールはありませんでした。' + } + else { + //---- メールが届いていた + "%(reference[0])通の新着メールがありました。" + } + -- + '\e' +} + +//------------------------------------------------------------------------------ +//メールチェック失敗 +//------------------------------------------------------------------------------ +OnBIFFFailure +{ + ScriptHeadSimple + -- + _escaped_message = SHIORI3FW.EscapeAllTags(reference[0]) + "メールチェック失敗。\n理由:%(_escaped_message)。\e" +} + +//****************************************************************************** +//ネットワーク更新 +//****************************************************************************** + +//------------------------------------------------------------------------------ +//ネットワーク更新開始 +//------------------------------------------------------------------------------ +OnUpdateBegin +{ + ScriptHeadSimple + -- + 'ネットワーク更新があるか調べます。' + -- + '\e' +} + +//------------------------------------------------------------------------------ +//ネットワーク更新準備完了 +//------------------------------------------------------------------------------ +OnUpdateReady +{ + ScriptHeadSimple + -- + 'ネットワーク更新を検知しました。\n更新開始します。' + -- + '\e' +} + +//------------------------------------------------------------------------------ +//ネットワーク更新終了 +//------------------------------------------------------------------------------ +OnUpdateComplete +{ + ScriptHeadSimple + -- + if reference[0] == 'none' { + //---- 更新すべきファイルが無かった + '更新はありませんでした。' + } + else { + //---- 実際に更新が完了した + '更新完了しました。' + } + -- + '\e' +} + +//------------------------------------------------------------------------------ +//ネットワーク更新失敗 +//------------------------------------------------------------------------------ +OnUpdateFailure +{ + ScriptHeadSimple + -- + _escaped_message = SHIORI3FW.EscapeAllTags(reference[0]) + "ネットワーク更新失敗。\n理由:%(_escaped_message)。\e" +} + +//****************************************************************************** +//ヘッドラインセンス +//****************************************************************************** + +//------------------------------------------------------------------------------ +//ヘッドラインセンス開始 +//------------------------------------------------------------------------------ +OnHeadlinesenseBegin +{ + ScriptHeadSimple + -- + _escaped_name = SHIORI3FW.EscapeAllTags(reference[0]) + "%(_escaped_name)ヘッドライン取得中。\e" +} + +//------------------------------------------------------------------------------ +//ヘッドライン読み上げ +//------------------------------------------------------------------------------ +OnHeadlinesense.OnFind +{ + ScriptHeadSimple + -- + _escaped_name = SHIORI3FW.EscapeAllTags(reference[0]) + //---- はじめのセリフ + if reference[2] == 'First' || reference[2] == 'First and Last' { + //---- 最初のページ + "%(_escaped_name)のヘッドラインです。" + } + elseif reference[2] == 'Next' { + //---- 真ん中あたりのページ + "%(_escaped_name)のヘッドラインの続きです。" + } + elseif reference[2] == 'Last' { + //---- 最後のページ + "%(_escaped_name)のヘッドライン、これが最後のページです。" + } + -- + //---- ヘッドライン本体 + "\n\n%(reference[3])\n" + -- + //---- 選択肢 + if reference[2] == 'First' || reference[2] == 'Next' { + //---- 次のページがある場合 + AYATEMPLATE.MenuItem('次のページ', '') + -- + AYATEMPLATE.MenuItem('サイトへ', reference[1]) + -- + AYATEMPLATE.MenuItem('終了', 'Menu_HEADLINECANCEL', 150) + } + else { + //---- 次のページがない場合 + AYATEMPLATE.MenuItem('サイトへ', reference[1]) + -- + AYATEMPLATE.MenuItem('終了', 'Menu_HEADLINECANCEL', 150) + } + -- + '\e' +} + +//------------------------------------------------------------------------------ +//ヘッドライン更新が無かった +//------------------------------------------------------------------------------ +OnHeadlinesenseComplete +{ + ScriptHeadSimple + -- + _escaped_name = SHIORI3FW.EscapeAllTags(reference[0]) + "%(_escaped_name)、更新はないみたいです。\e" +} + +//------------------------------------------------------------------------------ +//ヘッドラインセンス失敗 +//------------------------------------------------------------------------------ +OnHeadlinesenseFailure +{ + ScriptHeadSimple + -- + _escaped_message = SHIORI3FW.EscapeAllTags(reference[0]) + "ヘッドラインセンス失敗。\n理由:%(_escaped_message)。\e" +} + +//****************************************************************************** +//ファイル作成関連 +//****************************************************************************** + +//------------------------------------------------------------------------------ +//updates2.dau作成開始 +//------------------------------------------------------------------------------ +OnUpdatedataCreating +{ + ScriptHeadSimple + -- + 'アップデートデータを作成しています。' + -- + '\e' +} + +//------------------------------------------------------------------------------ +//updates2.dau作成完了 +//------------------------------------------------------------------------------ +OnUpdatedataCreated +{ + ScriptHeadSimple + -- + 'アップデートデータ作成完了。' + -- + '\e' +} + +//------------------------------------------------------------------------------ +//NAR作成開始 +//------------------------------------------------------------------------------ +OnNarCreating +{ + ScriptHeadSimple + -- + 'NAR作成開始。' + -- + '\e' +} + +//------------------------------------------------------------------------------ +//NAR作成完了 +//------------------------------------------------------------------------------ +OnNarCreated +{ + ScriptHeadSimple + -- + "「%(SHIORI3FW.EscapeAllTags(reference[0]))」のnarファイル、\n「%(SHIORI3FW.EscapeAllTags(reference[1]))」が完成しました。" + -- + '\e' +} + +//****************************************************************************** +//時計合わせ +//みか (http://homepage2.nifty.com/ko-ki/) の辞書を参考にしました。感謝>こーき氏 +//****************************************************************************** + +//------------------------------------------------------------------------------ +//時計合わせ開始 +//------------------------------------------------------------------------------ +OnSNTPBegin +{ + ScriptHeadSimple + -- + "時計合わせ確認開始。\n%(SHIORI3FW.EscapeAllTags(reference[0]))に接続します。" + -- + '\e' +} + +//------------------------------------------------------------------------------ +//時刻取得成功、比較開始 +//この関数で 2008/03/25 19:15:05 のように見やすい形に作り変えます。 +//詳しくはSTRFORM関数の説明を見てね! +//わからなければこのままで。 +//------------------------------------------------------------------------------ + +SNTPCompare_StrForm +{ + _txt = SPLIT(_argv[0], ',') + STRFORM('$04d/$02d/$02d $02d:$02d:$02d', TOINT(_txt[0]), TOINT(_txt[1]), TOINT(_txt[2]), TOINT(_txt[3]), TOINT(_txt[4]), TOINT(_txt[5])) +} + +OnSNTPCompare +{ + ScriptHeadSimple + -- + "\_q/ + 修正前 %(SNTPCompare_StrForm(reference[2]))\n/ + 修正後 %(SNTPCompare_StrForm(reference[1]))\n/ + \_q\n" + -- + if reference[3] == 0 { + '修正の必要はありませんでした。\e' + } + else { + //\6は補正実行タグ。消しちゃだめ + '\6' + -- + "%(SHIORI3FW.EscapeAllTags(reference[3]))秒のずれを修正しました。" + } + -- + '\e' +} + +//------------------------------------------------------------------------------ +//時計合わせ失敗 +//------------------------------------------------------------------------------ +OnSNTPFailure +{ + ScriptHeadSimple + -- + '時計合わせ失敗。' + -- + '\e' +} + +//****************************************************************************** +//そのほか +//****************************************************************************** + +//------------------------------------------------------------------------------ +//ディスプレイ解像度変更 +//------------------------------------------------------------------------------ +OnDisplayChange +{ + //---- 変数にディスプレイ解像度と色深度に関する情報を取得 + //---- 使うかどうかは分からないがとりあえず保持しておく + displaybpp = reference[0] + displaywidth = reference[1] + displayheight = reference[2] + SHIORI3FW.RegisterTempVar('displaybpp', 'displaywidth', 'displayheight') +} + +//------------------------------------------------------------------------------ +//URLドロップ +//CROW でゴーストインストーラからゴーストをインストールを始めた時にも呼ばれます +//------------------------------------------------------------------------------ +OnURLDropping +{ + ScriptHeadSimple + -- + "%(SHIORI3FW.EscapeAllTags(reference[0]))からデータを取得しています。" + -- + '\e' +} + + diff --git a/ghost/master/dic/normal/yaya_list.dic b/ghost/master/dic/normal/yaya_list.dic new file mode 100644 index 0000000..224ce3c --- /dev/null +++ b/ghost/master/dic/normal/yaya_list.dic @@ -0,0 +1,348 @@ +WeaterCodeDescription +{ + case _argv[0] { + when 0 { + 'Clear sky,快晴,f00d,f02e' + } + when 1 { + 'Mainly clear,晴れ,f00c,f083' + } + when 2 { + 'partly cloudy,薄曇り,f002,f086' + } + when 3 { + 'overcast,曇り,f013' + } + when 45 { + 'Fog,霧,f014' + } + when 48 { + 'Fog: depositing rime,霧: 霧氷,f014' + } + when 51 { + 'Drizzle: Light,霧雨: 小雨,f04e' + } + when 53 { + 'Drizzle: moderate,霧雨: 中程度,f04e' + } + when 55 { + 'Drizzle: dense intensity,霧雨: 濃霧,f04e' + } + when 56 { + 'Freezing Drizzle: Light,着氷性の霧雨: 小雨,f017' + } + when 57 { + 'Freezing Drizzle: dense intensity,着氷性の霧雨: 強い,f017' + } + when 61 { + 'Rain: Slight,雨: 小雨,f04e' + } + when 63 { + 'Rain: moderate,雨: 中程度,f04e' + } + when 65 { + 'Rain: heavy intensity,雨: 強い,f04e' + } + when 66 { + 'Freezing Rain: Light,雨氷: 軽い,f017' + } + when 67 { + 'Freezing Rain: heavy intensity,雨氷: 強,f017' + } + when 71 { + 'Snow fall: Slight,雪: 小程度,f076' + } + when 73 { + 'Snow fall: moderate,雪: 中程度,f076' + } + when 75 { + 'Snow fall: heavy intensity,雪: 強い,f076' + } + when 77 { + 'Snow grains,雪の粒,f076' + } + when 80 { + 'Rain showers: Slight,にわか雨: 小雨,f01a' + } + when 81 { + 'Rain showers: moderate,にわか雨: 中程度,f01a' + } + when 82 { + 'Rain showers: violent,にわか雨: 激しい,f01a' + } + when 85 { + 'Snow showers: slight,にわか雪: 軽い,f076' + } + when 86 { + 'Snow showers: heavy,にわか雪: 激しい,f076' + } + when 95 { + 'Thunderstorm: Slight or moderate,雷雨: 軽いまたは中程度,f01e' + } + when 96 { + 'Thunderstorm: with slight hail,雷雨: ひょうを伴う,f01e' + } + when 99 { + 'Thunderstorm: with heavy hail,雷雨: あられを伴う,f01e' + } + others { + '想定外の引数' + } + } +} + +GeoList_Japan : array +{ + //都道府県,都市名,経度,緯度 + '北海道,札幌市,141.346878,43.064325' + '青森県,青森市,140.740548,40.824589' + '岩手県,盛岡市,141.152696,39.703526' + '宮城県,仙台市,140.872072,38.268579' + '秋田県,秋田市,140.102381,39.718626' + '山形県,山形市,140.363690,38.240434' + '福島県,福島市,140.467771,37.750029' + '茨城県,水戸市,140.446824,36.341737' + '栃木県,宇都宮市,139.883592,36.565912' + '群馬県,前橋市,139.060453,36.390688' + '埼玉県,さいたま市,139.649012,35.857033' + '千葉県,千葉市,140.123154,35.604560' + '東京都,新宿区,139.691722,35.689501' + '神奈川県,横浜市,139.642537,35.447734' + '新潟県,新潟市,139.023245,37.902451' + '富山県,富山市,137.211305,36.695265' + '石川県,金沢市,136.625669,36.594606' + '福井県,福井市,136.221720,36.065209' + '山梨県,甲府市,138.568455,35.664108' + '長野県,長野市,138.180904,36.651306' + '岐阜県,岐阜市,136.723657,35.391174' + '静岡県,静岡市,138.383056,34.976944' + '愛知県,名古屋市,136.906582,35.180209' + '三重県,津市,136.508611,34.730278' + '滋賀県,大津市,135.868568,35.004513' + '京都府,京都市,135.755613,35.021242' + '大阪府,大阪市,135.520037,34.686344' + '兵庫県,神戸市,135.183078,34.691257' + '奈良県,奈良市,135.832861,34.685274' + '和歌山県,和歌山市,135.167500,34.226111' + '鳥取県,鳥取市,134.238261,35.503449' + '島根県,松江市,133.050520,35.472293' + '岡山県,岡山市,133.935032,34.661739' + '広島県,広島市,132.459646,34.396558' + '山口県,山口市,131.470654,34.186041' + '徳島県,徳島市,134.559286,34.065761' + '香川県,高松市,134.043291,34.340112' + '愛媛県,松山市,132.765682,33.841642' + '高知県,高知市,133.531111,33.559722' + '福岡県,福岡市,130.417968,33.606389' + '佐賀県,佐賀市,130.298792,33.249351' + '長崎県,長崎市,129.867251,32.750040' + '熊本県,熊本市,130.741584,32.789800' + '大分県,大分市,131.612645,33.238130' + '宮崎県,宮崎市,131.423887,31.911034' + '鹿児島県,鹿児島市,130.558025,31.560171' + '沖縄県,那覇市,127.680922,26.212445' +} + +GeoList_World : array +{ + //国名,都市名,経度,緯度 + 'アイスランド,レイキャビク,-21.9500144998691,64.1500235996096' + 'アイルランド,ダブリン,-6.25697951699095,53.346731249048' + 'アゼルバイジャン,バクー,49.8602713003804,40.3972178998864' + 'アフガニスタン,カブール,69.1813141997907,34.5186360998763' + 'アメリカ合衆国,ワシントンD.C.,-77.0113643997471,38.9014951999437' + 'アラブ首長国連邦,アブダビ,54.3665934003653,24.4666836000683' + 'アルジェリア,アルジェ,3.04860670043905,36.7650106997841' + 'アルゼンチン,ブエノスアイレス,-58.4325126873105,-34.6107145912052' + 'アルバニア,ティラナ,19.8188830003504,41.3275407001433' + 'アルメニア,エレバン,44.5116055002938,40.1830965998284' + 'アンゴラ,ルアンダ,13.2324811999476,-8.83634030016458' + 'アンティグア・バーブーダ,セントジョンズ,-61.85003379962,17.1180364999847' + 'アンドラ,アンドララベリャ,1.51648600012896,42.5000013999448' + 'イエメン,サヌア,44.2046475001821,15.3566792000852' + 'イギリス,ロンドン,-0.118667699554521,51.5019405999789' + 'イスラエル,エルサレム,35.2066258998656,31.7784077996804' + 'イタリア,ローマ,12.4813125998967,41.8979015003541' + 'イラク,バグダッド,44.3919229004217,33.3405943999118' + 'イラン,テヘラン,51.4223982000171,35.6738885996793' + 'インド,デリー,77.1999799995775,28.6000229997618' + 'インドネシア,ジャカルタ,106.827491799907,-6.17247179993348' + 'ウガンダ,カンパラ,32.5813777003208,0.318604799871764' + 'ウクライナ,キエフ(キーウ),30.5146820999991,50.435313200444' + 'ウズベキスタン,タシケント,69.2929869995506,41.3136476997817' + 'ウルグアイ,モンテビデオ,-56.172998100182,-34.8560956996566' + 'エクアドル,キト,-78.5019969998615,-0.21304229966222' + 'エジプト,カイロ,31.2480224004136,30.0519061997115' + 'エストニア,タリン,24.7280406997187,59.4338774004219' + 'エスワティニ,ムババーネ,31.1333345002871,-26.3166507996945' + 'エチオピア,アディスアベバ,38.6980586003243,9.03525619961408' + 'エリトリア,アスマラ,38.9333235003794,15.3333393000688' + 'エルサルバドル,サンサルバドル,-89.2049871001744,13.7119475002771' + 'オマーン,マスカット,58.5933120997738,23.6133248002994' + 'オランダ,アムステルダム,4.91469430010204,52.3519144999544' + 'オーストラリア,キャンベラ,149.129026199799,-35.283028500165' + 'オーストリア,ウィーン,16.3646931000067,48.2019611003247' + 'カザフスタン,ヌルスルタン,71.4277742002193,51.1811252998929' + 'カタール,ドーハ,51.5329679003485,25.2865559995599' + 'カナダ,オタワ,-75.7019611998493,45.4186426998009' + 'カメルーン,ヤウンデ,11.5147048998114,3.86864649973631' + 'カンボジア,プノンペン,104.914688599999,11.5519759997927' + 'カーボベルデ,プライア,-23.5166888996728,14.9166980002127' + 'ガイアナ,ジョージタウン,-58.16702859969,6.80197369982653' + 'ガボン,リーブルビル,9.45796499958522,0.385388599804173' + 'ガンビア,バンジュール,-16.5917015004238,13.4538765000007' + 'ガーナ,アクラ,-0.218661600152586,5.55198050030003' + 'キプロス,ニコシア,33.3666349001807,35.1666765001206' + 'キューバ,ハバナ,-82.3661279999071,23.1339046999421' + 'キリバス,タラワ,173.017570800053,1.338187500353' + 'キルギス,ビシュケク,74.5832584000553,42.8750252995781' + 'ギニア,コナクリ,-13.6821808999284,9.53346869982079' + 'ギニアビサウ,ビサウ,-15.598360799611,11.8650237996088' + 'ギリシャ,アテネ,23.7313751999057,37.9852721002274' + 'クウェート,クウェート,47.976355300357,29.3716634997709' + 'クック諸島,アバルア,-159.785436699644,-21.1962256000313' + 'クロアチア,ザグレブ,15.9999946998956,45.8000067002492' + 'グアテマラ,グアテマラシティ,-90.5289114004406,14.6230805001651' + 'グレナダ,セントジョージズ,-61.7416431997737,12.0526333996119' + 'ケニア,ナイロビ,36.814710999713,-1.28140090043104' + 'コスタリカ,サンホセ,-84.0859971996109,9.93695829968595' + 'コソボ,プリシュティナ,21.1659843001355,42.6667095999682' + 'コモロ,モロニ,43.2402440995857,-11.7041576997179' + 'コロンビア,ボゴタ,-74.0852898002839,4.59836940042766' + 'コンゴ共和国,ブラザビル,15.2827436000373,-4.25723989990132' + 'コンゴ民主共和国,キンシャサ,15.31302600005,-4.32777820030356' + 'コートジボワール,ヤムスクロ,-5.27550259976499,6.81838099958361' + 'サウジアラビア,リヤド,46.7707957999863,24.642779000051' + 'サモア,アピア,-171.73864159963,-13.8415449996019' + 'サントメ・プリンシペ,サントメ,6.73332519969836,0.333402100027058' + 'サンマリノ,サンマリノ,12.4417702000349,43.9360957998814' + 'ザンビア,ルサカ,28.2813817001056,-15.4146983996113' + 'シエラレオネ,フリータウン,-13.2361615996779,8.47195729968979' + 'シリア,ダマスカス,36.2980500004074,33.5019799003523' + 'シンガポール,シンガポール,103.853874800382,1.29497930015475' + 'ジブチ,ジブチ,43.1480017003184,11.5950144997195' + 'ジャマイカ,キングストン,-76.7674336999052,17.9770766004049' + 'ジョージア,トビリシ,44.7888495996295,41.7269558000703' + 'ジンバブエ,ハラレ,31.0427635998604,-17.8158438001511' + 'スイス,ベルン,7.46697550001949,46.9166827997715' + 'スウェーデン,ストックホルム,18.0663001689178,59.3241272037076' + 'スペイン,マドリード,-3.68529749977961,40.4019721002324' + 'スリナム,パラマリポ,-55.167030899856,5.83503010025908' + 'スリランカ,スリジャヤワルダナプラコッテ,79.8978484381551,6.88598974403163' + 'スロバキア,ブラチスラバ,17.1169808002239,48.1500183004044' + 'スロベニア,リュブリャナ,14.5149690004192,46.055288300315' + 'スーダン,ハルツーム,32.5322333999516,15.5900240997326' + 'セネガル,ダカール,-17.4750759999573,14.7177775998565' + 'セルビア,ベオグラード,20.4660447998278,44.8205912998488' + 'セントクリストファー・ネービス,バセテール,-62.717009300139,17.3020304998079' + 'セントビンセント及びグレナディーン諸島,キングスタウン,-61.2120623996599,13.1482788000268' + 'セントルシア,カストリーズ,-61.0000082003181,14.001973500177' + 'セーシェル,ビクトリア,55.4499897997896,-4.61663170009274' + 'ソマリア,モガディシュ,45.3647318001326,2.06862720028522' + 'ソロモン諸島,ホニアラ,159.949765700227,-9.43799429969704' + 'タイ,バンコク,100.51469879991,13.7519451000865' + 'タジキスタン,ドゥシャンベ,68.7738794000145,38.5600351996649' + 'タンザニア,ダルエスサラーム,39.2663959996758,-6.79806670021787' + 'チェコ,プラハ,14.4640338998448,50.0852829002858' + 'チャド,ンジャメナ,15.0472025001954,12.1150423997871' + 'チュニジア,チュニス,10.1796781001644,36.8027780996297' + 'チリ,サンティアゴ,-70.668986700076,-33.4480680004377' + 'ツバル,フナフティ,179.216647100284,-8.51665199988975' + 'デンマーク,コペンハーゲン,12.5615399001464,55.6805099999367' + 'トリニダードトバゴ,ポートオブスペイン,-61.517030899756,10.6519970996866' + 'トルクメニスタン,アシガバット,58.3832990997738,37.949994899745' + 'トルコ,アンカラ,32.862445799734,39.9291844001401' + 'トンガ,ヌクアロファ,-175.220564500051,-21.1385124000271' + 'トーゴ,ロメ,1.22081130000163,6.13388290017588' + 'ドイツ,ベルリン,13.3996028003291,52.5237645000318' + 'ドミニカ,ロゾー,-61.3870130004495,15.3010155999901' + 'ドミニカ共和国,サントドミンゴ,-69.902030899906,18.4720186998033' + 'ナイジェリア,アブジャ,7.53138210040379,9.08527900002599' + 'ナウル,ヤレン,166.921007886205,-0.544730303460597' + 'ナミビア,ウィントフック,17.0835461001726,-22.570006100401' + 'ニウエ,アロフィ,-169.913625400192,-19.0659876999722' + 'ニカラグア,マナグア,-86.2704375001903,12.1549623997951' + 'ニジェール,ニアメ,2.11471020031564,13.5186517999408' + 'ニュージーランド,ウェリントン,174.783265899802,-41.2999878997217' + 'ネパール,カトマンズ,85.3146964003188,27.7186377996949' + 'ノルウェー,オスロ,10.7480332997971,59.9186361003759' + 'ハイチ,ポルトープランス,-72.3379803999753,18.5429705003884' + 'ハンガリー,ブダペスト,19.0813748000072,47.501952200234' + 'バチカン市国,バチカン,12.453386500087,41.9032821999137' + 'バヌアツ,ポートビラ,168.316640600184,-17.7333503999009' + 'バハマ,ナッソー,-77.3500437996814,25.083390100373' + 'バルバドス,ブリッジタウン,-59.6165267004467,13.1020026004398' + 'バングラデシュ,ダッカ,90.4066336001607,23.7250056004283' + 'バーレーン,マナーマ,50.583051700176,26.2361363002502' + 'パキスタン,イスラマバード,73.0806301775409,33.6893684838686' + 'パナマ,パナマシティ,-79.5349830000653,8.96996299989269' + 'パプアニューギニア,ポートモレスビー,147.192503600361,-9.46470780042449' + 'パラオ,マルキョク,134.626548500313,7.48739619977493' + 'パラグアイ,アスンシオン,-57.6434509999635,-25.2944571002149' + 'フィジー,スバ,178.441707299752,-18.1330158998637' + 'フィリピン,マニラ,120.980271299981,14.6061048000966' + 'フィンランド,ヘルシンキ,24.9324569146551,60.1638038491685' + 'フランス,パリ,2.35299246163294,48.8580923161077' + 'ブラジル,ブラジリア,-47.9179981001321,-15.7813943999315' + 'ブルガリア,ソフィア,23.3147082001235,42.6852952996385' + 'ブルキナファソ,ワガドゥグー,-1.52666959992195,12.3722617996425' + 'ブルネイ,バンダルスリブガワン,114.933284100281,4.88333110025025' + 'ブルンジ,ブジュンブラ,29.3600060998018,-3.3760871997643' + 'ブータン,ティンプー,89.6390139995966,27.4729858999794' + 'ベトナム,ハノイ,105.848068300212,21.0352730999737' + 'ベナン,ポルトノボ,2.61562277287283,6.48794786120499' + 'ベネズエラ,カラカス,-66.9189831003896,10.5029443999642' + 'ベラルーシ,ミンスク,27.5646813001021,53.9019233003202' + 'ベリーズ,ベルモパン,-88.7670730001187,17.2520335000461' + 'ベルギー,ブリュッセル,4.33137069979813,50.8352628996632' + 'ペルー,リマ,-77.0520079996693,-12.0460667998428' + 'ホンジュラス,テグシガルパ,-87.2194752003201,14.1039907998357' + 'ボスニアヘルツェゴビナ,サラエボ,18.3830017001685,43.8500224000139' + 'ボツワナ,ハボローネ,25.9119477996514,-24.6463135000678' + 'ボリビア,ラパス,-68.1519310004152,-16.4960277999429' + 'ポルトガル,リスボン,-9.14681219972306,38.7246686997009' + 'ポーランド,ワルシャワ,21.0053467379618,52.2308719731632' + 'マダガスカル,アンタナナリボ,47.5146780001897,-18.9146915002124' + 'マラウイ,リロングウェ,33.7833019997876,-13.9832950999887' + 'マリ,バマコ,-8.00198499990768,12.6519604995776' + 'マルタ,バレッタ,14.5147106998391,35.8997324996553' + 'マレーシア,クアラルンプール,101.698037399706,3.16861170007007' + 'マーシャル諸島,マジュロ,171.380000200249,7.10300429980873' + 'ミクロネシア,パリキール,158.149974299774,6.91664369984704' + 'ミャンマー,ネーピードー,96.1166727000852,19.7685029001889' + 'メキシコ,メキシコシティ,-99.1329341002284,19.4443882995805' + 'モザンビーク,マプト,32.5872170999893,-25.9533315998733' + 'モナコ,モナコ,7.40691319978453,43.7396456995895' + 'モルディブ,マレ,73.4999475000772,4.16670820022341' + 'モルドバ,キシナウ,28.8577111001873,47.0050236000592' + 'モロッコ,ラバト,-6.83640820027807,34.0253072996923' + 'モンゴル,ウランバートル,106.914669899996,47.918619299841' + 'モンテネグロ,ポドゴリツァ,19.2663068997438,42.4659724998312' + 'モーリシャス,ポートルイス,57.4999939001985,-20.1666386000912' + 'モーリタニア,ヌアクショット,-15.9753404000393,18.0864269999063' + 'ヨルダン,アンマン,35.931354099912,31.9519710999865' + 'ラオス,ビエンチャン,102.599980000077,17.9666926998084' + 'ラトビア,リガ,24.0999653999834,56.9500238001584' + 'リトアニア,ビリニュス,25.3166353002791,54.6833663000149' + 'リヒテンシュタイン,ファドーツ,9.51666949979773,47.1337238001134' + 'リビア,トリポリ,13.1800118002046,32.8925000003749' + 'リベリア,モンロビア,-10.7996603997075,6.31458159966127' + 'ルクセンブルク,ルクセンブルク,6.13000280038909,49.6116604000076' + 'ルワンダ,キガリ,30.0585858998196,-1.95164420041937' + 'ルーマニア,ブカレスト,26.0980007999971,44.435317700052' + 'レソト,マセル,27.4832731000737,-29.3166744000034' + 'レバノン,ベイルート,35.5077624004146,33.8739209995546' + 'ロシア連邦,モスクワ,37.6135769997789,55.7541099999767' + '中央アフリカ,バンギ,18.5582880997162,4.36664430029441' + '中華人民共和国,ペキン,116.394200892158,39.9017203099445' + '北マケドニア,スコピエ,21.4334615003481,42.0000060999018' + '南アフリカ共和国,プレトリア,28.2274832002896,-25.7049747004219' + '南スーダン,ジュバ,31.5800256004013,4.82997520009559' + '大韓民国,ソウル,126.997785100102,37.5682949998146' + '日本国,東京,139.749461599773,35.6869627996936' + '朝鮮民主主義人民共和国,ピョンヤン,125.752744899658,39.0213845998196' + '東ティモール,ディリ,125.57945589977,-8.55938839955485' + '赤道ギニア,マラボ,8.78327750005673,3.75001529996626' +} + + diff --git a/ghost/master/dic/normal/yaya_menu.dic b/ghost/master/dic/normal/yaya_menu.dic new file mode 100644 index 0000000..ec7e2d6 --- /dev/null +++ b/ghost/master/dic/normal/yaya_menu.dic @@ -0,0 +1,906 @@ +//****************************************************************************** +// YAYA ゴーストテンプレート +// メニュー処理辞書 +//****************************************************************************** + +//------------------------------------------------------------------------------ +//メインメニュー展開 +//------------------------------------------------------------------------------ +OnMenu +{ + IsDisplay = 1 + + _geo = '' + if ISVAR('GeoCoordinates') == 0 { + _geo = '未設定' + } + else { + if STRLEN( GeoName ) > 0 { _geo = '都市: ' + GeoName[0] + ' ' + GeoName[1] } + else { + _geo += '緯度:' + GeoCoordinates[1] + _geo += ', 経度:' + GeoCoordinates[0] + } + } + + _mode = 'モード: ' + if ISVAR('TimeMode') == 0 { + _mode += '未設定' + } + elseif TimeMode == 0 { + _mode += '現時刻' + } + elseif TimeMode == 1 { + _mode += '相対時刻' + _text = SecToTimeOffset( TimeOffset ) + if STRLEN(_text)>0 { _mode += ': ' + _text } + } + elseif TimeMode == 2 { + _mode += '固定時刻: ' + SecToTimeText( TimeFixed ) + //WIP 読みやすく加工する + } + + _t = '' + + _length = CurrentBalloon_SingleLineLength - 4 + + _t += '\![*]\__q[OnGeoCoordinatesSelect]' + _t += SHIORI3FW.MakeJustText('緯度経度',_length) + _t += '\__q\n' + + _t += _geo + _t += '\n[150]' + + _t += '\![*]\__q[OnTimeModeSelect]' + _t += SHIORI3FW.MakeJustText('時刻',_length) + _t += '\__q\n' + + _t += _mode + _t += '\n[150]' + + _BalloonDir = SPLIT( SHIORI3FW.BalloonPath , '/' , 0 ) + _BalloonDir = _BalloonDir[ARRAYSIZE(_BalloonDir)-2] + if STRSTR( SHIORI3FW.BalloonName , 'WeatherTimeCapsule' , 0 ) >= 0 || STRSTR( _BalloonDir , 'WeatherTimeCapsule' , 0 ) >= 0 { + _t += '\![*]\__q[OnColorThemeSelect,1]' + _t += SHIORI3FW.MakeJustText('背景色の変更',_length) + _t += '\__q\n' + _t += '設定中: ' + ColorTheme[1] + } + else { + _t += '\![*]' + _t += '\f[strike,1]背景色の変更\f[strike,0]\n' + _t += '非対応バルーン使用中' + } + _t += '\n[150]' + + _t += '\![*]\__q[script:"\![open,readme]\![raise,OnMenu]"]' + _t += SHIORI3FW.MakeJustText('readmeを開く',_length) + _t += '\__q\n' + _t += '操作説明、使用素材のライセンス等' + + ScriptHead + -- + '\![timerraise,0,1,OnWeatherInfoRequest]' + //情報取得の予約を取り消す + -- + _t + CloseMenu + '\e' +} + +CloseMenu +{ + '\_l[0,0]\f[align,right]\f[height,150%]' + -- + if _argc > 0 { '\__q[OnMenu]\_u[0x1F519]\__q' } + -- + '\__q[OnMenu_CANCEL]\_u[0x1F51D]\__q' +} + +//****************************************************************************** +//各項目の処理内容 +//****************************************************************************** + +OnMenu_CANCEL +{ + IsDisplay = 1 + OnWeatherView +} + +OnMenu_Close +{ + IsDisplay = 0 + '\e' +} + +List_Pager +{ + _JumpTo = _argv[0] + _CurrentPage = _argv[1] + _LastPage = _argv[2] + _t='' + + _ref = '' + if _argc > 3 { + for _c=3; _c<_argc; _c++ { + _ref += ',' + _argv[_c] + } + } + + _PagerStart = _CurrentPage + _PagerEnd = _CurrentPage + if CurrentBalloon_SingleLineLength < 24 { + if _LastPage > 3 { + _PagerStart = _CurrentPage - 1 + _PagerEnd = _CurrentPage + 1 + if _PagerStart <= 0 { + _PagerStart = 1 + _PagerEnd = 3 + } + if _PagerEnd > _LastPage { + _PagerEnd = _LastPage + _PagerStart = _PagerEnd - 2 + } + } + else { + _PagerStart = 1 + _PagerEnd = _LastPage + } + } + else { + if _LastPage > 5 { + _PagerStart = _CurrentPage - 2 + _PagerEnd = _CurrentPage + 2 + if _PagerStart <= 0 { + _PagerStart = 1 + _PagerEnd = 5 + } + if _PagerEnd > _LastPage { + _PagerEnd = _LastPage + _PagerStart = _PagerEnd - 4 + } + } + else { + _PagerStart = 1 + _PagerEnd = _LastPage + } + } + + if _CurrentPage >= 3 { + if CurrentBalloon_SingleLineLength < 24 { + _t += "\__q[%(_JumpTo),1%(_ref)]≪\__q" + } + else { + _t += "\__q[%(_JumpTo),1%(_ref)] ≪ \__q" + } + } + else { + _t += '\f[color,disable]' + if CurrentBalloon_SingleLineLength < 24 { + _t += '≪' + } + else { + _t += ' ≪ ' + } + _t += '\f[color,default]' + } + + if _CurrentPage >= 2 { + _c = _CurrentPage - 1 + if CurrentBalloon_SingleLineLength < 24 { + _t += "\__q[%(_JumpTo),%(_c)%(_ref)]<\__q" + } + else { + _t += "\__q[%(_JumpTo),%(_c)%(_ref)] < \__q" + } + } + else { + _t += '\f[color,disable]' + if CurrentBalloon_SingleLineLength < 24 { + _t += '<' + } + else { + _t += ' < ' + } + _t += '\f[color,default]' + } + + if CurrentBalloon_SingleLineLength < 24 { + if _LastPage > 3 && _CurrentPage >= 3 { _t += '..' } + elseif _LastPage > 3 { _t += ' ' } + } + else { + if _LastPage > 5 && _CurrentPage >= 4 { _t += '.. ' } + elseif _LastPage > 5 { _t += ' ' } + } + + for _c=_PagerStart; _c<=_PagerEnd; _c++ { + _str = '$0' + STRLEN(_LastPage) + 'd' + _str = STRFORM( _str, _c ) + + if _c != _CurrentPage { + if CurrentBalloon_SingleLineLength < 24 { + _t += "\__q[%(_JumpTo),%(_c)%(_ref)]%(_str)\__q" + } + else { + _t += "\__q[%(_JumpTo),%(_c)%(_ref)] %(_str) \__q" + } + } + else { + _t += '\f[color,disable]' + if CurrentBalloon_SingleLineLength < 24 { + _t += "%(_str)" + } + else { + _t += " %(_str) " + } + _t += '\f[color,default]' + } + } + + if CurrentBalloon_SingleLineLength < 24 { + if _LastPage > 3 && _PagerEnd < _LastPage { _t += '..' } + elseif _LastPage > 3 { _t += ' ' } + } + else { + if _LastPage > 5 && _PagerEnd < _LastPage { _t += '.. ' } + elseif _LastPage > 5 { _t += ' ' } + } + + if ( _CurrentPage + 1 ) <= _LastPage { + _c = _CurrentPage + 1 + if CurrentBalloon_SingleLineLength < 24 { + _t += "\__q[%(_JumpTo),%(_c)%(_ref)]>\__q" + } + else { + _t += "\__q[%(_JumpTo),%(_c)%(_ref)] > \__q" + } + } + else { + _t += '\f[color,disable]' + if CurrentBalloon_SingleLineLength < 24 { + _t += '>' + } + else { + _t += ' > ' + } + _t += '\f[color,default]' + } + + if ( _CurrentPage + 2 ) <= _LastPage { + if CurrentBalloon_SingleLineLength < 24 { + _t += "\__q[%(_JumpTo),%(_LastPage)%(_ref)]≫\__q" + } + else { + _t += "\__q[%(_JumpTo),%(_LastPage)%(_ref)] ≫ \__q" + } + } + else { + _t += '\f[color,disable]' + if CurrentBalloon_SingleLineLength < 24 { + _t += '≫' + } + else { + _t += ' ≫ ' + } + _t += '\f[color,default]' + } + + '\_n' + _t + '\_n' +} + +//---- 緯度経度設定 +OnGeoCoordinatesSelect +{ + _t = '' + _length = CurrentBalloon_SingleLineLength + + _t += '\f[bold,1]緯度経度\f[bold,0]\n' + + _geo = '' + if STRLEN( GeoName ) > 0 { _geo = GeoName[0] + ' ' + GeoName[1] + '\n' } + _geo += '緯度:' + GeoCoordinates[1] + _geo += ', 経度:' + GeoCoordinates[0] + + _t += _geo + '\n[150]' + + _t += '一覧から選択\n' + _t += '\![*]\__q[OnGeoCoordinatesSelect_List,1,World]' + _t += SHIORI3FW.MakeJustText('世界の首都',TOINT(_length/2)) + _t += '\__q' + _t += '\![*]\__q[OnGeoCoordinatesSelect_List,1,Japan]' + _t += SHIORI3FW.MakeJustText('日本の県庁所在地',TOINT(_length/2)) + _t += '\__q\n[150]' + + _t += '\![*]\__q[OnGeoCoordinatesSelect_InputExec]' + _t += SHIORI3FW.MakeJustText('手動で入力',_length) + _t += '\__q' + + ScriptHead + -- + _t + -- + CloseMenu(1) + -- + '\e' +} + +OnGeoCoordinatesSelect_List +{ + _CurrentList = reference[1] + _CurrentPage = reference[0] + _LastPage = _CurrentPage + _t = '' + + _list = IARRAY + if reference[1] == 'World' { + _list = GeoList_World + } + else { + _list = GeoList_Japan + } + + _size = ARRAYSIZE( _list ) + _lines = CurrentBalloon_Lines - 2 + + ScriptHead + -- + if _CurrentList == 'World' { + '\_n緯度経度を世界の首都から選択中..\_n\n' + } + else { + '\_n緯度経度を日本の県庁所在地から選択中..\_n\n' + } + -- + if _CurrentList == 'World' { + //世界のリスト 1列固定 + _MaxCountPerPage = _lines + _LastPage = TOINT( _size / _MaxCountPerPage ) + if ( _size % _MaxCountPerPage ) > 0 { + _LastPage++ + } + + _start = _MaxCountPerPage * ( _CurrentPage - 1 ) + _end = _start + _MaxCountPerPage + if _end >= _size { _end = _size } + + for _num=_start; _num<_end; _num++; { + _length = TOINT( CurrentBalloon_SingleLineLength / 2 - 1 ) + _name1 = SHIORI3FW.MakeJustText( GeoList_World[_num][0] , _length ) + _name2 = SHIORI3FW.MakeJustText( GeoList_World[_num][1] , _length ) + + _t += "\![*]\__q[OnGeoCoordinatesSelect_Set,%(_CurrentList),%(_num),%(_CurrentPage)]" + _t += _name1 + ' ' + _name2 + _t += '\__q\n' + } + } + else { + //日本のリスト + _CurrentList = 'Japan' + + if CurrentBalloon_SingleLineLength >= 38 { + //半角38文字以上描画できるなら2列にする + _MaxCountPerPage = _lines * 2 + _LastPage = TOINT( _size / _MaxCountPerPage ) + if ( _size % _MaxCountPerPage ) > 0 { + _LastPage++ + } + + _start = _MaxCountPerPage * ( _CurrentPage - 1 ) + _end = _start + _MaxCountPerPage + if _end > _size { _end = _size } + + _columns = 1 + if ( _end - _start ) > _lines { + _columns = 2 + } + + _num = _start + + for _c=0; _c<_lines&&_num<_end; _c++, _num++; { + _t += "\![*]\__q[OnGeoCoordinatesSelect_Set,%(_CurrentList),%(_num)]" + _t += GeoList_Japan[_num][0] + GeoList_Japan[_num][1] + _t += '\__q\n' + } + + if _columns > 1 { + -- + _t += '\_l[0,0]\n' + -- + for _c=0; _num<_end; _num++; { + _t += "\_l[10em,]\![*]\__q[OnGeoCoordinatesSelect_Set,%(_CurrentList),%(_num)]" + _t += GeoList_Japan[_num][0] + GeoList_Japan[_num][1] + _t += '\__q\n' + } + } + } + else { + //1列にする + _MaxCountPerPage = _lines + _LastPage = TOINT( _size / _MaxCountPerPage ) + if ( _size % _MaxCountPerPage ) > 0 { + _LastPage++ + } + _start = _MaxCountPerPage * ( _CurrentPage - 1 ) + + _end = _start + _MaxCountPerPage + if _end > _size { _end = _size } + + _num = _start + + for _c=0; _c<_lines&&_num<_end; _c++, _num++; { + _t += "\![*]\__q[OnGeoCoordinatesSelect_Set,%(_CurrentList),%(_num)]" + _t += GeoList_Japan[_num][0] + GeoList_Japan[_num][1] + _t += '\__q\n' + } + } + } + -- + _t + -- + "\_l[0,%(CurrentBalloon_ValidHeight)]\_l[,@-1em]" + -- + '\f[align,center]' + List_Pager( 'OnGeoCoordinatesSelect_List' , _CurrentPage , _LastPage , _CurrentList ) + -- + CloseMenu(1) + -- + '\e' +} + +OnGeoCoordinatesSelect_InputExec +{ + ScriptHead + -- + '\![open,inputbox,OnGeoCoordinatesSelect_Input,--timeout=0]' + -- + '入力ボックスを開いています。\n' + -- + '緯度経度の数値を、\n' + -- + '半角カンマ区切りで入力してください。\n[150]' + -- + '\![*]\__q[script:"\![open,browser,https://www.google.com/maps/]\![raise,OnGeoCoordinatesSelect_InputExec]"]Googleマップを開く\__q\n' + -- + '地図上で右クリックし、\n' + -- + '上から1段目の数値を左クリックすると、\n' + -- + '緯度経度がコピーされます。' + -- + CloseMenu(1) + -- + '\e' +} + +OnGeoCoordinatesSelect_Input +{ + _t = TOSTR( reference[0] ) + _t = REPLACE( _t , ' ' , '' , 0 ) + + if ISREALSTR(_t[0])==1&&ISREALSTR(_t[1])==1 { + GeoCoordinates = ( TOREAL(_t[1]) , TOREAL(_t[0]) ) + GeoName='' + Result_Mode0 = IARRAY + Result_Mode1 = IARRAY + Result_Mode2 = IARRAY + OnGeoCoordinatesSelect + } + else { + ScriptHead + -- + '数値として解釈できない値が入力されました。\x' + -- + OnGeoCoordinatesSelect + } +} + +OnGeoCoordinatesSelect_InputCancel +{ + OnGeoCoordinatesSelect +} + +OnGeoCoordinatesSelect_Set +{ + _list = reference[0] + _num = TOINT( reference[1] ) + + if _list == 'World' { + GeoCoordinates = ( TOREAL( GeoList_World[_num][2] ) , TOREAL( GeoList_World[_num][3] ) ) + GeoName = ( GeoList_World[_num][0] , GeoList_World[_num][1] ) + } + else { + GeoCoordinates = ( TOREAL( GeoList_Japan[_num][2] ) , TOREAL( GeoList_Japan[_num][3] ) ) + GeoName = ( GeoList_Japan[_num][0] , GeoList_Japan[_num][1] ) + } + + Result_Mode0 = IARRAY + Result_Mode1 = IARRAY + Result_Mode2 = IARRAY + + OnGeoCoordinatesSelect +} + +//---- 時刻のモード変更と設定 +OnTimeModeSelect +{ + _length = CurrentBalloon_SingleLineLength - 6 + _t = '' + + //---- 大項目 + _t += '\f[bold,1]時刻\f[bold,0]\n' + + //---- モード0 + if TimeMode == 0 { + _t += '⇒\![*]現時刻' + } + else { + _t += '\![*]\__q[OnTimeModeSet,0]' + _t += SHIORI3FW.MakeJustText('現時刻',_length) + _t += '\__q' + } + _t += '\n' + _t += '毎時1分、16分、31分、46分に情報更新' + _t += '\n[150]' + + //---- モード1 + if TimeMode == 1 { + _t += '⇒' + } + _t += '\![*]\__q[OnTimeModeSet,1]' + + _time = SecToTimeOffset(TimeOffset) + if STRLEN(_time) > 0 { + _time = '相対時刻: ' + _time + } + else { + _time = '相対時刻' + } + _t += SHIORI3FW.MakeJustText(_time,_length) + _t += '\__q\n' + + _t += '6日以上前の情報は1日に1回更新\n' + _t += 'それ以外は毎時1分に情報更新' + _t += '\n[150]' + + //---- モード2 + if TimeMode == 2 { + _t += '⇒' + } + _time = SecToTimeText( TimeFixed ) + _t += '\![*]\__q[OnTimeModeSet,2]' + _t += SHIORI3FW.MakeJustText('固定時刻: '+_time,_length) + _t += '\__q\n' + + _t += '6日以上前の情報は設定変更後1回のみ更新\n' + _t += 'それ以外は毎時1分に情報更新' + + ScriptHead + _t + CloseMenu(1) + '\e' +} + +OnTimeModeSet +{ + TimeMode = reference[0] + + if TimeMode == 0 { + //現時刻モード + Result_Mode0 = IARRAY + Result_Mode1 = IARRAY + Result_Mode2 = IARRAY + IsInfoTime = 'current' + OnTimeModeSelect + } + elseif TimeMode == 1 { + //現時刻+αモード + OnTimeModeSet_Offset_DateInputExec + } + else { + //固定時刻モード + OnTimeModeSet_Fixed_DateInputExec + } +} + +OnTimeModeSet_Offset_DateInputExec +{ + ScriptHead + -- + '\![open,dateinput,OnTimeModeSet_Offset_DateInput,--timeout=0,--text="' + -- + _date = GETTIME() + if GETTYPEEX( 'TimeOffset' ) == 1 { + _date = GETTIME( GETSECCOUNT() + TimeOffset ) + } + _date[0] + ',' + _date[1] + ',' + _date[2] + -- + '"]' + -- + '取得開始する日付を選択してください。\n過去は1940年1月1日から、\n未来は15日後までです。' + -- + '\e' +} + +OnTimeModeSet_Offset_DateInputCancel +{ + OnTimeModeSelect +} + +OnTimeModeSet_Offset_DateInput +{ + _time = reference[0] + TimeOffset_Date = IARRAY + TimeOffset_Date[0] = TOINT(_time[0]) + TimeOffset_Date[1] = TOINT(_time[1]) + TimeOffset_Date[2] = TOINT(_time[2]) + + OnTimeModeSet_Offset_TimeInputExec +} + +OnTimeModeSet_Offset_TimeInputExec +{ + ScriptHead + -- + '\![open,timeinput,OnTimeModeSet_Offset_TimeInput,--timeout=0,--text="' + -- + _date = GETTIME() + if GETTYPEEX( 'TimeOffset' ) == 1 { + _date = GETTIME( GETSECCOUNT() + TimeOffset ) + } + _date[4] + ',' + _date[5] + ',0' + -- + '"]' + -- + '続けて、取得開始する時刻を選択してください。' + -- + '\e' +} + +OnTimeModeSet_Offset_TimeInputCancel +{ + OnTimeModeSelect +} + +OnTimeModeSet_Offset_TimeInput +{ + _time = reference[0] + _time[0] = TOINT(_time[0]) + _time[1] = TOINT(_time[1]) + _time[2] = TOINT(_time[2]) + + _date = TimeOffset_Date + + _sec_now = GETSECCOUNT() + _sec_input = GETSECCOUNT(_date[0],_date[1],_date[2],0,_time[0],_time[1],_time[2]) + + _now = GETTIME() + _pastlimit = GETSECCOUNT( 1940 , 1 , 1 , 0 , 0 , 0 , 0 ) + _futurelimit = GETSECCOUNT( _now[0] , _now[1] , _now[2]+15 , 0 , _now[4] , _now[5] , _now[6] ) + + if _sec_input > _sec_now { + //未来方向 + IsInfoTime = 'future' + if _sec_input >= _futurelimit { + //未来方向は16日後まで + TimeOffset = _futurelimit - _sec_now + } + else { + TimeOffset = _sec_input - _sec_now + } + } + else { + //過去方向 + IsInfoTime = 'past' + if _sec_input < _pastlimit { + //過去方向は1940年1月1日から + TimeOffset = _pastlimit - _sec_now + } + else { + TimeOffset = _sec_input - _sec_now + } + } + + ERASEVAR('TimeOffset_Date') + Result_Mode0 = IARRAY + Result_Mode1 = IARRAY + Result_Mode2 = IARRAY + + OnTimeModeSelect +} + +OnTimeModeSet_Fixed_DateInputExec +{ + ScriptHead + -- + '\![open,dateinput,OnTimeModeSet_Fixed_DateInput,--timeout=0,--text="' + -- + _date = GETTIME() + if GETTYPEEX( 'TimeFixed' ) == 1 { + _date = GETTIME( TimeFixed ) + } + _date[0] + ',' + _date[1] + ',' + _date[2] + -- + '"]' + -- + '取得する日付を選択してください。\n過去は1940年1月1日から、\n未来は15日後までです。' + -- + '\e' +} + +OnTimeModeSet_Fixed_DateInputCancel +{ + OnTimeModeSelect +} + +OnTimeModeSet_Fixed_DateInput +{ + TimeFixed_Date = reference[0] + TimeFixed_Date[0] = TOINT(TimeFixed_Date[0]) + TimeFixed_Date[1] = TOINT(TimeFixed_Date[1]) + TimeFixed_Date[2] = TOINT(TimeFixed_Date[2]) + OnTimeModeSet_Fixed_TimeInputExec +} + +OnTimeModeSet_Fixed_TimeInputExec +{ + ScriptHead + -- + '\![open,timeinput,OnTimeModeSet_Fixed_TimeInput,--timeout=0,--text="' + -- + _date = GETTIME() + if GETTYPEEX( 'TimeFixed' ) == 1 { + _date = GETTIME( TimeFixed ) + } + _date[4] + ',' + _date[5] + ',0' + -- + '"]' + -- + '続けて、取得する時刻を選択してください。' + -- + '\e' +} + +OnTimeModeSet_Fixed_TimeInputCancel +{ + OnTimeModeSelect +} + +OnTimeModeSet_Fixed_TimeInput +{ + _time = reference[0] + _time[0] = TOINT(_time[0]) + _time[1] = TOINT(_time[1]) + _time[2] = TOINT(_time[2]) + + _date = TimeFixed_Date + + _sec_input = GETSECCOUNT(_date[0],_date[1],_date[2],0,_time[0],_time[1],_time[2]) + + _now = GETTIME() + _pastlimit = GETSECCOUNT( 1940 , 1 , 1 , 0 , 0 , 0 , 0 ) + _futurelimit = GETSECCOUNT( _now[0] , _now[1] , _now[2]+15 , 0 , _now[4] , _now[5] , _now[6] ) + + if _sec_input > _sec_now { + //未来方向 + IsInfoTime = 'future' + if _sec_input >= _futurelimit { + //未来方向は16日後まで + TimeFixed = _futurelimit - _sec_now + } + else { + TimeFixed = _sec_input - _sec_now + } + } + else { + //過去方向 + IsInfoTime = 'past' + if _sec_input < _pastlimit { + //過去方向は1940年1月1日から + TimeFixed = _pastlimit - _sec_now + } + else { + TimeFixed = _sec_input - _sec_now + } + } + + ERASEVAR('TimeFixed_Date') + Result_Mode0 = IARRAY + Result_Mode1 = IARRAY + Result_Mode2 = IARRAY + + OnTimeModeSelect +} + +//---- 色設定 +OnColorThemeSelect +{ + _c = TOINT( reference[0] ) + if GETTYPEEX( '_c' ) != 1 || _c <= 0 { + _c = 1 + } + + OnColorThemeSelect_List( _c ) +} + +OnColorThemeSelect_List +{ + _lines = CurrentBalloon_Lines - 2 + _columns = TOINT( CurrentBalloon_SingleLineLength / 14 ) + _size = ARRAYSIZE( ColorThemeList ) + + _MaxCountPerPage = _lines * _columns + _CurrentPage = _argv[0] + _LastPage = TOINT( _size / _MaxCountPerPage ) + + _start = _MaxCountPerPage * ( _CurrentPage - 1 ) + _end = _start + _MaxCountPerPage + if _end > _size { _end = _size } + + _num = _start + _t += '\f[bold,1]背景色を選択中..\f[bold,0]\n' + + if _LastPage > 1 { + _t += '\f[align,center]' + List_Pager( 'OnColorThemeSelect' , _CurrentPage , _LastPage ) + '\n' + } + + for _c2=0; _c2<_columns; _c2++; { + + if _c2>0 { _t+='\_l[0,0]\n' } + if _Lastpage > 1 { _t+='\n' } + + for _c1=0; _c1<_lines&&_num<_end; _c1++, _num++; { + + if _c2>0 { _x=_c2*8; _t+="\_l[%(_x)em,]"; } + + _name = ColorThemeList[_num][0] + _count = TOINT(ColorThemeList[_num][1]) + _color = ColorThemeList[_num][2] + + + if _count != ColorTheme[0] { + _t += "\f[color,%(_color)]◆\f[color,default]" + _t += "\__q[OnColorThemeSet,%(_num),%(_CurrentPage)]" + _t += SHIORI3FW.MakeJustText( _name , 10 ) + _t += '\__q' + } + else { + _t += '⇒' + _name + } + + _t += '\n' + } + } + + ScriptHead + '\c' + _t + CloseMenu(1) + '\e' +} + +OnColorThemeSet +{ + _num = TOINT(reference[0]) + _page = TOINT(reference[1]) + ColorTheme[0] = TOINT(ColorThemeList[_num][1]) + ColorTheme[1] = ColorThemeList[_num][0] + + OnColorThemeSelect_List( _page ) +} + +ColorThemeList : array +{ + '白,0,#f8f8f2' + '黒,2,#272822' + '赤,4,#F44336' + '桃,6,#E91E63' + '赤紫,8,#9C27B0' + '青紫,10,#673AB7' + '藍,12,#3F51B5' + '青,14,#2196F3' + '水,16,#03A9F4' + 'シアン,18,#00BCD4' + '青緑,20,#009688' + '緑,22,#4CAF50' + '黄緑,30,#8BC34A' + 'ライム,32,#CDDC39' + '黄,34,#FFEB3B' + '琥珀,36,#FFC107' + '橙,38,#FF9800' + '濃橙,24,#FF5722' + '茶,26,#795548' + '灰,40,#9E9E9E' + '青灰,28,#607D8B' +} + + diff --git a/ghost/master/dic/normal/yaya_mouse.dic b/ghost/master/dic/normal/yaya_mouse.dic new file mode 100644 index 0000000..62373ad --- /dev/null +++ b/ghost/master/dic/normal/yaya_mouse.dic @@ -0,0 +1,70 @@ +//****************************************************************************** +// YAYA ゴーストテンプレート +// マウス入力関連辞書 +//****************************************************************************** + +//****************************************************************************** +//マウス処理部 +// +//以下、実際のトークを記述します。関数名は以下の規則になっています。 +//[種別] + [スコープ] + [部位] +//種別は、MouseMove, MouseDoubleClick, MouseWheelUp, MouseWheelDown のどれかです。 +//スコープは、\0,\1,といったスコープ番号です。 +//部位は、当たり判定のどの部位かを表します。当たり判定の無い場所でのイベントの場合 +//部位はありません。 +//****************************************************************************** + +//****************************************************************************** +//つつかれ反応 +//****************************************************************************** + +MouseDoubleClick0 +{ + if reference[5] == 0 { + + if IsDisplay == 0 { + IsDisplay = 1 + OnWeatherView + } + else { + IsDisplay = 0 + '\e' + } + } +} + +//****************************************************************************** +//マウス処理部コア +//AYATEMPLATE.MouseMoveWheelFuncの2番目の数字が「感度」です。 +//1番目の数字(0か1)は、MoveかWheelかを判別するためのもので、 +//変更の必要はありません。 +//****************************************************************************** + +OnMouseMove +{ + AYATEMPLATE.MouseMoveWheelFunc(0,50,'MouseMove') +} + +OnMouseWheel +{ + _result = '' + if TOINT(reference[2]) > 0 { + _result = AYATEMPLATE.MouseMoveWheelFunc(1,4,'MouseWheelUp') + } + else { + _result = AYATEMPLATE.MouseMoveWheelFunc(1,4,'MouseWheelDown') + } + + if _result == '' { + _result = AYATEMPLATE.MouseMoveWheelFunc(1,4,'MouseWheel') + } + + _result +} + +OnMouseDoubleClick +{ + AYATEMPLATE.MouseEventExec('MouseDoubleClick') +} + + diff --git a/ghost/master/dic/normal/yaya_string.dic b/ghost/master/dic/normal/yaya_string.dic new file mode 100644 index 0000000..1f95a81 --- /dev/null +++ b/ghost/master/dic/normal/yaya_string.dic @@ -0,0 +1,108 @@ +//****************************************************************************** +// YAYA ゴーストテンプレート +// 文字列リソース辞書 +//****************************************************************************** + +//------------------------------------------------------------------------------ +//ユーザー名 +//------------------------------------------------------------------------------ +On_username +{ + username +} + +/* +//------------------------------------------------------------------------------ +//ポータルサイトのボタンキャプション +//------------------------------------------------------------------------------ +On_portalrootbutton.caption +{ + 'ポータル' +} + +//------------------------------------------------------------------------------ +//ポータルサイトのリスト +//------------------------------------------------------------------------------ +On_sakura.portalsites_EX : array +{ + 'SSP BUGTRAQ | http://ssp.shillest.net/ | ' + '整備班 | http://ms.shillest.net/ | ' +} + +//------------------------------------------------------------------------------ +//本体側おすすめサイトのボタンキャプション +//------------------------------------------------------------------------------ +On_recommendrootbutton.caption +{ + 'SHIORIコア' +} + +//------------------------------------------------------------------------------ +//本体側おすすめサイトのリスト +//------------------------------------------------------------------------------ +On_sakura.recommendsites_EX : array +{ + 'YAYA | https://github.com/YAYA-shiori/yaya-shiori/wiki | ' +} + +//------------------------------------------------------------------------------ +//ネットワーク更新ボタンのキャプション +//------------------------------------------------------------------------------ +On_updatebutton.caption +{ + 'ネットワーク更新' +} +*/ + +//------------------------------------------------------------------------------ +//ボタン表示切り替え +//------------------------------------------------------------------------------ +On_recommendrootbutton.visible +{ + //---- '0'で非表示、それ以外で表示 + '0' +} + +On_portalrootbutton.visible +{ + //---- '0'で非表示、それ以外で表示 + '0' +} + +//------------------------------------------------------------------------------ +//オーナードロー画像 +//------------------------------------------------------------------------------ + +On_menu.sidebar.bitmap.filename +{ + 'img/menu_sidebar.png' +} +On_menu.background.bitmap.filename +{ + 'img/menu_background.png' +} +On_menu.foreground.bitmap.filename +{ + 'img/menu_foreground.png' +} + +//****************************************************************************** +//おすすめサイトのリストを書きやすくするためのコア +//基本的には以下はいじらなくていいです。 +//****************************************************************************** +On_sakura.recommendsites +{ + AYATEMPLATE.LinkMenuConvert(On_sakura.recommendsites_EX) +} + +On_sakura.portalsites +{ + AYATEMPLATE.LinkMenuConvert(On_sakura.portalsites_EX) +} + +On_kero.recommendsites +{ + AYATEMPLATE.LinkMenuConvert(On_kero.recommendsites_EX) +} + + diff --git a/ghost/master/dic/normal/yaya_tmpl_util.dic b/ghost/master/dic/normal/yaya_tmpl_util.dic new file mode 100644 index 0000000..3e9a84e --- /dev/null +++ b/ghost/master/dic/normal/yaya_tmpl_util.dic @@ -0,0 +1,346 @@ +///////// YAYA ゴーストテンプレート +///////// メニュー処理辞書 + +//**** 注意 ******************************************************************** +// この辞書はゴーストテンプレートに必要な共通処理をまとめたものです。 +// 通常はここをいじる必要はありません。 +//**** 注意 ******************************************************************** + +//****************************************************************************** +//起動・終了初期化 +//****************************************************************************** + +OnSystemLoad.AYATEMPLATE +{ + AYATEMPLATE.installedplugin_name = IARRAY + AYATEMPLATE.installedplugin_id = IARRAY + AYATEMPLATE.stroke = IARRAY + AYATEMPLATE.strokeid = IARRAY + AYATEMPLATE.stroketimer = IARRAY + AYATEMPLATE.mikireflag = 0 + AYATEMPLATE.LastTalk = '' +} + +OnSystemUnload.AYATEMPLATE +{ + //ERASEVAR('AYATEMPLATE.installedplugin_name') + //ERASEVAR('AYATEMPLATE.installedplugin_id') + ERASEVAR('AYATEMPLATE.stroke') + ERASEVAR('AYATEMPLATE.strokeid') + ERASEVAR('AYATEMPLATE.stroketimer') + ERASEVAR('AYATEMPLATE.mikireflag') + ERASEVAR('AYATEMPLATE.LastTalk') +} + +//****************************************************************************** +//ランダムトーク +//****************************************************************************** + +OnAITalk +{ + OnAiTalk +} + +//------------------------------------------------------------------------------ +//OnAiTalkイベント +//------------------------------------------------------------------------------ +OnAiTalk +{ + //---- 通常のランダムトーク、ただしチェイン中はチェイントーク + if SHIORI3FW.IsChain { + AYATEMPLATE.LastTalk = ChainTalk + } + else { + AYATEMPLATE.LastTalk = RandomTalk + } + AYATEMPLATE.LastTalk +} + +//****************************************************************************** +//メニュー関係 +//****************************************************************************** + +//------------------------------------------------------------------------------ +//イベント処理 +//選択肢ID/アンカーIDをそのまま関数名として書けるようになります。 +//------------------------------------------------------------------------------ + +OnChoiceSelect +{ + if ISFUNC(reference[0]) { + EVAL(reference[0]) + } +} + +OnAnchorSelect +{ + if RE_SEARCH(reference[0],'^(http|https)://') { + if basewarename == 'SSP' { + '\C' + } + -- + "\j[%(AYATEMPLATE.EscapeText(reference[0]))]" + } + else { + if ISFUNC(reference[0]) { + EVAL(reference[0]) + } + } +} + +//------------------------------------------------------------------------------ +//メニュー横1行反転 +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +//通常メニュー +AYATEMPLATE.MenuItem +{ + _linefeed = 100 + _n = _argc + if _n >= 3 { + if GETTYPE(_argv[_n-1]) == 1 {//整数 + _linefeed = _argv[_n-1] + _n -= 1 + } + } + + _lftext = '' + while _linefeed > 0 { + if _linefeed >= 100 { + _lftext += '\n' + } + else { + _lftext += '\n[half]' + } + _linefeed -= 100 + } + + _lftext + -- + '\![*]\q[' + -- + AYATEMPLATE.EscapeText( SHIORI3FW.MakeJustText(_argv[0],CurrentBalloon_SingleLineLength-2) ) + -- + _s = '' + for _i = 1 ; _i < _n ; _i++ { + _s += ',' + AYATEMPLATE.EscapeText(_argv[_i]) + } + _s + -- + ']' +} + +//------------------------------------------------------------------------------ +//エスケープ +AYATEMPLATE.EscapeText +{ + _r = _argv[0] + if RE_SEARCH(_r,'[,"\[\]]') { + '"' + REPLACE(_r,'"','""') + '"' + } + else { + _r + } +} + +//****************************************************************************** +//リンクメニュー +//****************************************************************************** +AYATEMPLATE.LinkMenuConvert +{ + _text = '' + _data = IARRAY + for _i = 0 ; _i < _argc ; _i++ { + _data = (RE_SPLIT(_argv[_i],'[ \t]*\|[ \t]*'),'','')//ダミー + _text += "%(_data[0])%(CHR(1))%(_data[1])%(CHR(1))%(_data[2])%(CHR(1))%(CHR(2))" + } + _text +} + +//****************************************************************************** +//切り替えコア +//****************************************************************************** + +AYATEMPLATE.ExecuteChangeCallTalk +{ + AYATEMPLATE.ExecuteGhostNameFunc(_argv[0],reference[0],_argv[1]) +} + +//****************************************************************************** +//切り替え/コミュ共通コア(ゴースト名付加関数呼び出し) +//_argv[0] 関数名ベース +//_argv[1] ゴースト名(自動的にシステム文字エスケープされる) +// ゴースト名が空の場合は_argv[2]の評価へ +// 「関数名ベース+ゴースト名」の関数が無い場合は「ベースOther」 +//_argv[2] 上記の関数が存在しなかった場合、呼ぶ関数名(Optional) +//****************************************************************************** +AYATEMPLATE.ExecuteGhostNameFunc +{ + _ghostname = SHIORI3FW.TranslateSystemChar(_argv[1]) + + if _ghostname != '' { + _funcname = "%(_argv[0])_%(_ghostname)" + if ISFUNC(_funcname) { + _script = EVAL(_funcname) + if STRLEN(_script) != 0 { + _script + return + } + } + + _funcname = "%(_argv[0])Other" + if ISFUNC(_funcname) { + _script = EVAL(_funcname) + if STRLEN(_script) != 0 { + _script + return + } + } + } + + if _argc >= 2 { + _funcname = _argv[2] + if (STRLEN(_funcname) > 0) && ISFUNC(_funcname) { + _script = EVAL(_argv[2]) + if STRLEN(_script) != 0 { + REPLACE(_script,"\-","") + return + } + } + } +} + +//****************************************************************************** +//コミュ関係 +//****************************************************************************** + +//こっちから話しかける +AYATEMPLATE.ExecuteTalkToTalk +{ + //まず話しかける相手を決める + _ghostname=AYATEMPLATE.GetRandomSakuraName() + res_reference0=_ghostname + + DUMPVAR() + + //共通コアを使って関数呼び出し + AYATEMPLATE.ExecuteGhostNameFunc('TalkTo',_ghostname,'TalkToNobody') +} + +//話しかけに応答する +AYATEMPLATE.ExecuteReplyToTalk +{ + AYATEMPLATE.ExecuteGhostNameFunc('ReplyTo',_argv[0]) +} + +//話しかける相手をランダムに決定 +AYATEMPLATE.GetRandomSakuraName +{ + _ghostlist=IARRAY + //FMOが使える場合はFMOから読みます + if ISFUNC('SHIORI3FW.RefreshFMOTable') { + SHIORI3FW.RefreshFMOTable + _ghostlist=SHIORI3FW.SakuraNameList + }else{ + _ghostlist=ghostexlist + } + if ARRAYSIZE(_ghostlist)>0 { + ANY(_ghostlist) + }else{ + '' + } +} + +//起動中ゴーストリスト取得 +On_otherghostname +{ + // 現在起動中のゴーストのリストを作成する + ghostexlist = reference + ghostexcount = ARRAYSIZE(ghostexlist) + SHIORI3FW.RegisterTempVar('ghostexlist', 'ghostexcount') +} + +//****************************************************************************** +//マウスイベントコア +//****************************************************************************** +AYATEMPLATE.MouseEventExec +{ + _fname = _argv[0] + TOSTR(reference[3]) + TOSTR(reference[4]) + if ISFUNC(_fname) { + EVAL(_fname) + return + } + + _fname = _argv[0] + TOSTR(reference[3]) + if ISFUNC(_fname) { + EVAL(_fname) + return + } +} + +AYATEMPLATE.MouseMoveWheelFunc +{ + _side = TOINT(reference[3]) + if _argv[0] { + _side += 10 + } + + if AYATEMPLATE.strokeid[_side] == reference[4] { + if (GETTICKCOUNT - TOINT(AYATEMPLATE.stroketimer[_side])) > 1500 { + AYATEMPLATE.stroke[_side] = 1 + } + AYATEMPLATE.stroketimer[_side] = GETTICKCOUNT + + _stroke = TOINT(AYATEMPLATE.stroke[_side]) + _stroke += 1 + AYATEMPLATE.stroke[_side] = _stroke + + if _stroke >= _argv[1] { + if 'talking' !_in_ status { + AYATEMPLATE.MouseEventExec(_argv[2]) + AYATEMPLATE.stroke[_side] = 1 + } + } + } + else { + AYATEMPLATE.stroke[_side] = 1 + AYATEMPLATE.stroketimer[_side] = GETTICKCOUNT + AYATEMPLATE.strokeid[_side] = reference[4] + } +} + +//------------------------------------------------------------------------------ +//プラグイン +//------------------------------------------------------------------------------ +On_installedplugin : void +{ + _n = ARRAYSIZE(reference) + AYATEMPLATE.installedplugin_name = IARRAY + AYATEMPLATE.installedplugin_id = IARRAY + + for _i = 0 ; _i < _n ; _i++ { + _a = RE_SPLIT(reference[_i],'[,\x1]') + + AYATEMPLATE.installedplugin_name ,= _a[0] + AYATEMPLATE.installedplugin_id ,= _a[1] + } +} + +AYATEMPLATE.IsPluginExist +{ + if _argc == 0 { + 0 + return + } + + if ASEARCH(_argv[0],AYATEMPLATE.installedplugin_id) >= 0 { + 1 + return + } + if ASEARCH(_argv[0],AYATEMPLATE.installedplugin_name) >= 0 { + 1 + return + } + 0 +} diff --git a/ghost/master/dic/normal/yaya_weather.dic b/ghost/master/dic/normal/yaya_weather.dic new file mode 100644 index 0000000..760d778 --- /dev/null +++ b/ghost/master/dic/normal/yaya_weather.dic @@ -0,0 +1,827 @@ +//****************************************************************************** +// 天気取得&表示 +//****************************************************************************** + +//****************************************************************************** +//整える +//****************************************************************************** +SecToTimeOffset +{ + _seccount = TOINT(_argv[0]) + _time = IARRAY + + if _seccount < 0 { + //過去方向なので数値を反転 + _seccount = 0 - (_seccount) + } + + //年 + if _seccount >= 31536000 { + _time[0] = TOINT(_seccount/31536000) + } + else { + _time[0] = 0 + } + + //月は考えたくないので0を入れておく + _time[1] = 0 + + //日 + if _seccount >= 86400 { + _time[2] = TOINT((_seccount-_time[0]*31536000)/86400) + } + else { + _time[2] = 0 + } + + //曜日は空を入れておく + _time[3] = '' + + //時 + if _seccount >= 3600 { + _time[4] = TOINT((_seccount-_time[0]*31536000-_time[2]*86400)/3600) + } + else { + _time[4] = 0 + } + + //分 + if _seccount >= 60 { + _time[5] = TOINT((_seccount-_time[0]*31536000-_time[2]*86400-_time[4]*3600)/60) + } + else { + _time[5] = 0 + } + + _t = '' + + if _seccount >= 60 || _seccount <= -60 { + if _time[0] > 0 { + _t += "%(_time[0])年" + } + if _time[2] > 0 { + _t += "%(_time[2])日" + } + if _time[4] > 0 { + _t += "%(_time[4])時間" + } + if _time[5] > 0 { + _t += "%(_time[5])分" + } + if _argv[0] < 0 { + _t += '前' + } + elseif _argv[0] > 0 { + _t += '後' + } + } + _t +} + +SecToTimeText +{ + _seccount = TOINT(_argv[0]) + _time = GETTIME(_seccount) + STRFORM('$04d/$02d/$02d $02d:$02d', _time[0], _time[1], _time[2], _time[4], _time[5]) +} + +AngleToDirection +{ + _a0 = _argv[0] + if _a0 < 22.5 { + '北' + } + elseif _a0 < 45 { + '北北東' + } + elseif _a0 < 67.5 { + '北東' + } + elseif _a0 < 90 { + '東北東' + } + elseif _a0 < 112.5 { + '東' + } + elseif _a0 < 135 { + '東南東' + } + elseif _a0 < 157.5 { + '南東' + } + elseif _a0 < 180 { + '南南東' + } + elseif _a0 < 202.5 { + '南' + } + elseif _a0 < 225 { + '南南西' + } + elseif _a0 < 247.5 { + '南西' + } + elseif _a0 < 270 { + '西南西' + } + elseif _a0 < 292.5 { + '西' + } + elseif _a0 < 315 { + '西北西' + } + elseif _a0 < 337.5 { + '北西' + } + elseif _a0 < 360 { + '北北西' + } + else { + '北' + } +} + +//****************************************************************************** +//取得済みの項目を見せる +//****************************************************************************** +OnWeatherView +{ + if (TimeMode == 0 && STRLEN(Result_Mode0) <= 0) || (TimeMode == 1 && STRLEN(Result_Mode1) <= 0) || (TimeMode == 2 && STRLEN(Result_Mode2) <= 0) { + OnWeatherInfoRequest + } + else { + IsDisplay = 1 + + ScriptHead + -- + '\![timerraise,0,1,OnWeatherInfoRequest]' + //情報取得の予約を取り消す + -- + if TimeMode == 0 { + OnWeatherViewCurrent + } + else { + OnWeatherViewCommon + } + -- + '\f[default]\_l[0,0]\f[align,right]\f[height,150%]\__q[OnMenu]≡\__q' + -- + "\f[default]\_l[0,%(CurrentBalloon_ValidHeight)]\_l[,@-1em]\f[align,right]" + -- + '\__q[script:"\![open,browser,https://open-meteo.com/]\![raise,OnWeatherView]"]Weather data by Open-Meteo.com\__q' + -- + '\e' + } +} + +OnWeatherViewCommon +{ + _now = GETTIME() + _data = '' + _width = TOINT(CurrentBalloon_ValidWidth/2) + + if TimeMode == 1 { + _data = Result_Mode1 + } + elseif TimeMode == 2 { + _data = Result_Mode2 + } + else { + _data = Result_Mode0 + } + _t = '' + + _timetext = '' + _time = 0 + _hear_sec = GETSECCOUNT() + _jisa_sec = (_data[2] + CurrentUtcOffsetSec) * 2 + + if TimeMode == 1 { + _time = GETTIME(_hear_sec+TimeOffset)[4] + _timetext = GETTIME(TOINT(_data[3][_time])+_jisa_sec) + _timetext = '情報時刻(現地): ' + STRFORM('$04d/$02d/$02d $02d:$02d', _timetext[0], _timetext[1], _timetext[2], _timetext[4], _timetext[5]) + } + elseif TimeMode == 2 { + _time = GETTIME(TimeFixed)[4] + _timetext = GETTIME(TOINT(_data[3][_time])+_jisa_sec) + _timetext = '情報時刻(現地): ' + STRFORM('$04d/$02d/$02d $02d:$02d', _timetext[0], _timetext[1], _timetext[2], _timetext[4], _timetext[5]) + } + + if IsInfoTime != 'past' { + //未来方向の相対時刻・固定時刻 + _schedule = GETTIME() + _schedule = (GETSECCOUNT(_schedule[0], _schedule[1], _schedule[2], 0, _schedule[4]+1, 1, 0) - GETSECCOUNT()) * 1000 + //毎時1分まであと何ミリ秒か + _t += "\![timerraise,%(_schedule),1,OnWeatherInfoRequest]" + } + elseif TimeMode == 1 { + //過去方向の相対時刻 + _schedule = GETTIME() + _schedule = (GETSECCOUNT(_schedule[0], _schedule[1], _schedule[2]+1, 0, 0, 1, 0) - GETSECCOUNT()) * 1000 + //翌日の0時1分まであと何ミリ秒か + _t += "\![timerraise,%(_schedule),1,OnWeatherInfoRequest]" + } + + if _data[6][_time] == 'NoData' || _data[6][_time] == 'null' || STRLEN(_data[6][_time]) <= 0 { + _t += '\f[align,center]\n[200]NoData' + } + else { + _tenki = WeaterCodeDescription(_data[6][_time])[2] + _tenki2 = WeaterCodeDescription(_data[6][_time])[3] + if _data[5][_time] == 0 && STRLEN(_tenki2) > 0 { + _tenki = _tenki2 + } + _height = TOINT((CurrentBalloon_Lines-7)*100) + if _height < 100 { + _height = 100 + } + _tenki3 = WeaterCodeDescription(_data[6][_time])[0] + '/' + WeaterCodeDescription(_data[6][_time])[1] + _t += "%(_tenki3)" + _t += '\_l[0,0]\n[100]\f[align,center]\f[name,weathericons-regular-webfont.ttf]' + _t += "\f[height,%(_height)%]\_u[0x%(_tenki)]" + } + + _t += "\f[default]\_l[0,%(CurrentBalloon_ValidHeight)]\n[-600]\f[align,center]" + + if STRLEN(GeoName) > 0 { + _t += GeoName[0] + ' ' + GeoName[1] + ' \n' + } + else { + _t += '緯度:' + TOSTR(_data[0]) + ', 経度:' + TOSTR(_data[1]) + '\n' + } + + _timeoffset = IARRAY + _timeoffset[0] = _data[2] / 3600 + _timeoffset[1] = (_data[2] % 3600) / 60 + + if _data[2] >= 0 { + _timeoffset = ' UTC+' + STRFORM('$02d:$02d', _timeoffset[0], _timeoffset[1]) + } + else { + _timeoffset = ' UTC' + STRFORM('$03d:$02d', _timeoffset[0], _timeoffset[1]) + } + _t += _timetext + _timeoffset + _t += '\n' + _t += '\f[align,left]' + + _t += '降水量   : ' + if STRLEN(_data[8][_time]) == 0 { + _t += 'NoData' + } + elseif _data[8][_time] == 'NoData' || _data[8][_time] == 'null' { + _t += 'NoData' + } + else { + _t += STRFORM('$4.1f', _data[8][_time]) + 'mm' + } + + _t += "\_l[%(_width),]" + _t += '気温: ' + if STRLEN(_data[7][_time]) == 0 { + _t += 'NoData' + } + elseif _data[7][_time] == 'NoData' || _data[7][_time] == 'null' { + _t += 'NoData' + } + else { + _t += STRFORM('$5.1f', _data[7][_time]) + '℃' + } + _t += '\n' + + if IsInfoTime != 'past' { + _t += '降水確率(1h): ' + if STRLEN(_data[4][_time]) == 0 { + _t += 'NoData' + } + elseif _data[4][_time] == 'NoData' || _data[4][_time] == 'null' { + _t += 'NoData' + } + else { + _t += STRFORM('$4.0f', _data[4][_time]) + '%' + } + } + + _t += "\_l[%(_width),]" + _t += '風速: ' + if STRLEN(_data[9][_time]) == 0 { + _t += 'NoData' + } + elseif _data[9][_time] == 'NoData' || _data[9][_time] == 'null' { + _t += 'NoData' + } + else { + _t += STRFORM('$5.1f', _data[9][_time]) + 'm/s' + } + _t += '\n' + + // _t += '予報時刻: ' + // if STRLEN(_data[3][_time])==0 { _t += 'NoData' } + // elseif _data[3][_time] == 'NoData' || _data[3][_time] == 'null' { _t += 'NoData' } + // else { + // _yoho = GETTIME(TOINT(_data[3][_time])+_jisa_sec) + // _t += STRFORM('$04d$02d$02d $02d$02d',_yoho[0],_yoho[1],_yoho[2],_yoho[4],_yoho[5]) + // } + + _t += "\_l[%(_width),]" + _t += '風向: ' + if STRLEN(_data[10][_time]) == 0 { + _t += 'NoData' + } + elseif _data[10][_time] == 'NoData' || _data[10][_time] == 'null' { + _t += 'NoData' + } + else { + _t += AngleToDirection(_data[10][_time]) + } + + _t +} + +OnWeatherViewCurrent +{ + _data = Result_Mode0 + _width = TOINT(CurrentBalloon_ValidWidth/2) + _t = '' + + _jisa_sec = _data[2] + CurrentUtcOffsetSec + + _time = GETTIME() + _time2 = GETSECCOUNT(_time[0], _time[1], _time[2], 0, _time[4], _time[5]-16, _time[6]) + + _timetext = GETTIME(_data[3]+_jisa_sec) + _time = _timetext[4] + _time3 = _data[3] + + if _time2 > _time3 { + OnWeatherInfoRequest + return + } + + _schedule = GETTIME() + _schedule = GETSECCOUNT(_schedule[0], _schedule[1], _schedule[2], 0, _schedule[4], _schedule[5]+16, _schedule[6]) + _schedule = (_schedule - GETSECCOUNT()) * 1000 + _t += "\![timerraise,%(_schedule),1,OnWeatherInfoRequest]" + + _timetext = '情報時刻(現地): ' + STRFORM('$04d/$02d/$02d $02d:$02d', _timetext[0], _timetext[1], _timetext[2], _timetext[4], _timetext[5]) + + if STRLEN(_data[5]) <= 0 || _data[5] == 'NoData' || _data[5] == 'null' { + _t += '\f[align,center]\n[200]NoData' + } + else { + _tenki = WeaterCodeDescription(_data[5])[2] + _tenki2 = WeaterCodeDescription(_data[5])[3] + if _data[4] == 0 && STRLEN(_tenki2) > 0 { + _tenki = _tenki2 + } + _height = TOINT((CurrentBalloon_Lines-7)*100) + if _height < 100 { + _height = 100 + } + _tenki3 = WeaterCodeDescription(_data[5])[0] + '/' + WeaterCodeDescription(_data[5])[1] + _t += "%(_tenki3)" + _t += '\_l[0,0]\n[100]\f[align,center]\f[name,weathericons-regular-webfont.ttf]' + _t += "\f[height,%(_height)%]\_u[0x%(_tenki)]" + } + _t += "\f[default]\_l[0,%(CurrentBalloon_ValidHeight)]\n[-600]\f[align,center]" + + if STRLEN(GeoName) > 0 { + _t += GeoName[0] + ' ' + GeoName[1] + ' \n' + } + else { + _t += '緯度:' + TOSTR(_data[0]) + ', 経度:' + TOSTR(_data[1]) + '\n' + } + + _timeoffset = IARRAY + _timeoffset[0] = _data[2] / 3600 + _timeoffset[1] = (_data[2] % 3600) / 60 + + if _data[2] >= 0 { + _timeoffset = ' UTC+' + STRFORM('$02d:$02d', _timeoffset[0], _timeoffset[1]) + } + else { + _timeoffset = ' UTC' + STRFORM('$03d:$02d', _timeoffset[0], _timeoffset[1]) + } + _t += _timetext + _timeoffset + _t += '\n' + _t += '\f[align,left]' + + _t += '降水量   : ' + if STRLEN(_data[7]) == 0 { + _t += 'NoData' + } + elseif _data[7] == 'NoData' || _data[7] == 'null' { + _t += 'NoData' + } + else { + _t += STRFORM('$4.1f', _data[7]) + 'mm' + } + + _t += "\_l[%(_width),]" + _t += '気温: ' + if STRLEN(_data[6]) == 0 { + _t += 'NoData' + } + elseif _data[6] == 'NoData' || _data[6] == 'null' { + _t += 'NoData' + } + else { + _t += STRFORM('$5.1f', _data[6]) + '℃' + } + _t += '\n' + + _t += '降水確率(1h): ' + if STRLEN(_data[11][_time]) == 0 { + _t += 'NoData' + } + elseif _data[11][_time] == 'NoData' || _data[11][_time] == 'null' { + _t += 'NoData' + } + else { + _t += STRFORM('$4.0f', _data[11][_time]) + '%' + } + + _t += "\_l[%(_width),]" + _t += '風速: ' + if STRLEN(_data[8]) == 0 { + _t += 'NoData' + } + elseif _data[8] == 'NoData' || _data[8] == 'null' { + _t += 'NoData' + } + else { + _t += STRFORM('$5.1f', _data[8]) + 'm/s' + } + _t += '\n' + + // _t += '予報時刻: ' + // if STRLEN(_data[10][_time])==0 { _t += 'NoData' } + // elseif _data[10][_time] == 'NoData' || _data[10][_time] == 'null' { _t += 'NoData' } + // else { + // _yoho = GETTIME(TOINT(_data[10][_time])+_jisa_sec) + // _t += STRFORM('$04d$02d$02d $02d$02d',_yoho[0],_yoho[1],_yoho[2],_yoho[4],_yoho[5]) + // } + + _t += "\_l[%(_width),]" + _t += '風向: ' + if STRLEN(_data[9]) == 0 { + _t += 'NoData' + } + elseif _data[9] == 'NoData' || _data[9] == 'null' { + _t += 'NoData' + } + else { + _t += AngleToDirection(_data[9]) + } + + _t +} + +//****************************************************************************** +//取得する +//****************************************************************************** +OnWeatherInfoRequest +{ + IsWaitingWeatherInfoRequest = 0 + + if IsDisplay != 1 { + return + } + + _ElapsedSec = GETTICKCOUNT() / 1000 - LastTickTime_GetWeatherInfo + //前回取得からの経過秒 + + if GETTICKCOUNT() < 30000 { + //起動直後 + OnWeatherInfoGetExec + } + elseif _ElapsedSec >= 30 { + //30秒以上経っている + OnWeatherInfoGetExec + } + else { + OnWeatherInfoRequest_Wait + } +} + +OnWeatherInfoRequest_Wait +{ + IsWaitingWeatherInfoRequest = 1 + ScriptHead + -- + '\![timerraise,31000,1,OnWeatherInfoRequest]' + -- + '前回の情報取得から時間があまり経過していません。\n/ + 約30秒待機します。' + -- + '\e' +} + +OnWeatherInfoGetExec +{ + LastTime_GetWeatherInfo = GETSECCOUNT() + LastTickTime_GetWeatherInfo = TOINT(GETTICKCOUNT()/1000) + + _json = '' + _now = GETTIME() + _now_sec = GETSECCOUNT() + _pastinfotime = GETSECCOUNT(_now[0], _now[1], _now[2]-6, 0, _now[4], _now[5], _now[6]) + + if TimeMode == 1 && TimeOffset < -518400 { + IsInfoTime = 'past' + _json = PastInfo(GETSECCOUNT()+TimeOffset) + } + elseif TimeMode == 1 { + IsInfoTime = 'future' + _json = FutureInfo(GETSECCOUNT()+TimeOffset) + } + elseif TimeMode == 2 && TimeFixed < _pastinfotime { + IsInfoTime = 'past' + _json = PastInfo(TimeFixed) + } + elseif TimeMode == 2 { + IsInfoTime = 'future' + _json = FutureInfo(TimeFixed) + } + else { + IsInfoTime = 'current' + _json = CurrentInfo + } + -- + ScriptHeadSimple + -- + '\![execute,http-get,"' + _json + '",--async=OnWeatherInfoGet,--nofile=UTF-8]' + -- + 'Open-Meteoより天気情報を取得中...' + -- + '\e' +} + +PastInfo +{ + _time = GETTIME(TOINT(_argv[0])) + _time1 = GETTIME(GETSECCOUNT(_time[0], _time[1], _time[2]-1, 0, _time[4], _time[5], _time[6])) + _time2 = GETTIME(GETSECCOUNT(_time[0], _time[1], _time[2]+1, 0, _time[4], _time[5], _time[6])) + _time1 = STRFORM('$04d-$02d-$02d', _time1[0], _time1[1], _time1[2]) + _time2 = STRFORM('$04d-$02d-$02d', _time2[0], _time2[1], _time2[2]) + _time0 = GETTIME(GETSECCOUNT(_time[0], _time[1], _time[2], 0, _time[4], _time[5], _time[6])) + _time0 = STRFORM('$04d-$02d-$02d', _time0[0], _time0[1], _time0[2]) + + _json = 'https://archive-api.open-meteo.com/v1/archive?' + + _json += 'latitude=' + TOSTR(GeoCoordinates[1]) + //緯度 + _json += '&longitude=' + TOSTR(GeoCoordinates[0]) + //経度 + + _json += '&wind_speed_unit=ms' + //風速の単位を秒速?メートルで + _json += '&timeformat=unixtime' + //時間形式をunixtimeで + _json += '&timezone=auto' + //タイムゾーンを自動的に検出する + + _json += '&start_date=' + _time0 + //開始日 + _json += '&end_date=' + _time0 + //終了日 + + _json += '&hourly=' + //時間ごとの天気 + _json += 'is_day,' + //昼か夜か + _json += 'weather_code,' + //天気コード + _json += 'temperature_2m,' + //温度(地表2m) + _json += 'precipitation,' + //降水量 + _json += 'wind_speed_10m,' + //風速(地表10m) + _json += 'wind_direction_10m,' + //風向(地表10m) + _json += 'precipitation_probability' + //降水確率 + + _json +} + +CurrentInfo +{ + _json = 'https://api.open-meteo.com/v1/forecast?' + + _json += 'latitude=' + TOSTR(GeoCoordinates[1]) + //緯度 + _json += '&longitude=' + TOSTR(GeoCoordinates[0]) + //経度 + + _json += '&wind_speed_unit=ms' + //風速の単位を秒速?メートルで + _json += '&timeformat=unixtime' + //時間形式をunixtimeで + _json += '&timezone=auto' + //タイムゾーンを自動的に検出する + _json += '&forecast_days=1' + //予報日数を1日で + + _json += '¤t=' + //現在の天気 + _json += 'is_day,' + //昼か夜か + _json += 'weather_code,' + //天気コード + _json += 'temperature_2m,' + //温度(地表2m) + _json += 'precipitation,' + //降水量 + _json += 'wind_speed_10m,' + //風速(地表10m) + _json += 'wind_direction_10m' + //風向(地表10m) + + _json += '&hourly=' + //時間ごとの天気 + _json += 'precipitation_probability' + //降水確率 + + _json +} + +FutureInfo +{ + _time = GETTIME(TOINT(_argv[0])) + _time1 = GETTIME(GETSECCOUNT(_time[0], _time[1], _time[2]-1, 0, _time[4], _time[5], _time[6])) + _time1 = STRFORM('$04d-$02d-$02d', _time1[0], _time1[1], _time1[2]) + _time2 = GETTIME(GETSECCOUNT(_time[0], _time[1], _time[2]+1, 0, _time[4], _time[5], _time[6])) + _time2 = STRFORM('$04d-$02d-$02d', _time2[0], _time2[1], _time2[2]) + _time0 = GETTIME(GETSECCOUNT(_time[0], _time[1], _time[2], 0, _time[4], _time[5], _time[6])) + _time0 = STRFORM('$04d-$02d-$02d', _time0[0], _time0[1], _time0[2]) + + _json = 'https://api.open-meteo.com/v1/forecast?' + + _json += 'latitude=' + TOSTR(GeoCoordinates[1]) + //緯度 + _json += '&longitude=' + TOSTR(GeoCoordinates[0]) + //経度 + + _json += '&wind_speed_unit=ms' + //風速の単位を秒速?メートルで + _json += '&timeformat=unixtime' + //時間形式をunixtimeで + _json += '&timezone=auto' + //タイムゾーンを自動的に検出する + + _json += '&start_date=' + _time0 + //開始日 + _json += '&end_date=' + _time0 + //終了日 + + _json += '&hourly=' + //時間ごとの天気 + _json += 'is_day,' + //昼か夜か + _json += 'weather_code,' + //天気コード + _json += 'temperature_2m,' + //温度(地表2m) + _json += 'precipitation,' + //降水量 + _json += 'wind_speed_10m,' + //風速(地表10m) + _json += 'wind_direction_10m,' + //風向(地表10m) + _json += 'precipitation_probability' + //降水確率 + + _json +} + +OnWeatherInfoGet +{ + _objectID = JSON.readJson(reference[3]) + _data = IARRAY + + if TimeMode == 0 { + _data[0] = TOREAL(IOBJ.iObj(_objectID, 'latitude')) + //0 緯度 + _data[1] = TOREAL(IOBJ.iObj(_objectID, 'longitude')) + //1 経度 + _data[2] = TOINT(IOBJ.iObj(_objectID, 'utc_offset_seconds')) + //2 時差 + _data[3] = TOINT(IOBJ.iObj(_objectID, 'current', 'time')) + //3 データの時間 + _data[4] = TOINT(IOBJ.iObj(_objectID, 'current', 'is_day')) + //4 昼か夜か + _data[5] = TOINT(IOBJ.iObj(_objectID, 'current', 'weather_code')) + //5 天気コード + _data[6] = TOSTR(IOBJ.iObj(_objectID, 'current', 'temperature_2m')) + //6 気温(地表2m) + _data[7] = TOSTR(IOBJ.iObj(_objectID, 'current', 'precipitation')) + //7 降水量 + _data[8] = TOSTR(IOBJ.iObj(_objectID, 'current', 'wind_speed_10m')) + //8 風速(地表10m) + _data[9] = TOINT(IOBJ.iObj(_objectID, 'current', 'wind_direction_10m')) + //9 風向(地表10m) + _data[10] = IOBJ.iObj(_objectID, 'hourly', 'time') + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[10], _c) + } + _data[10] = TOSTR(_res) + //10 降水量予測のデータの時間 + _data[11] = IOBJ.iObj(_objectID, 'hourly', 'precipitation_probability') + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[11], _c) + } + _data[11] = TOSTR(_res) + //11 降水量予測(毎時) + } + else { + _data[0] = IOBJ.iObj(_objectID, 'latitude') + //0 緯度 + _data[1] = IOBJ.iObj(_objectID, 'longitude') + //1 経度 + _data[2] = IOBJ.iObj(_objectID, 'utc_offset_seconds') + //2 時差 + _data[3] = IOBJ.iObj(_objectID, 'hourly', 'time') + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[3], _c) + } + _data[3] = TOSTR(_res) + //3 データの時間 + _data[4] = IOBJ.iObj(_objectID, 'hourly', 'precipitation_probability') + if STRLEN(_data[4]) == 0 { + _data[4] = 'NoData' + } + else { + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[4], _c) + } + _data[4] = TOSTR(_res) + } + //4 降水確率 + _data[5] = IOBJ.iObj(_objectID, 'hourly', 'is_day') + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[5], _c) + } + _data[5] = TOSTR(_res) + //5 昼か夜か + _data[6] = IOBJ.iObj(_objectID, 'hourly', 'weather_code') + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[6], _c) + } + _data[6] = TOSTR(_res) + //6 天気コード + _data[7] = IOBJ.iObj(_objectID, 'hourly', 'temperature_2m') + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[7], _c) + } + _data[7] = TOSTR(_res) + //7 温度(地表2m) + _data[8] = IOBJ.iObj(_objectID, 'hourly', 'precipitation') + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[8], _c) + } + _data[8] = TOSTR(_res) + //8 降水量 + _data[9] = IOBJ.iObj(_objectID, 'hourly', 'wind_speed_10m') + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[9], _c) + } + _data[9] = TOSTR(_res) + //9 風速(地表10m) + _data[10] = IOBJ.iObj(_objectID, 'hourly', 'wind_direction_10m') + _res = IARRAY + for _c=0; _c<24; _c++ { + _res[_c] = IOBJ.iObj(_data[10], _c) + } + _data[10] = TOSTR(_res) + //10 風向(地表10m) + } + + LETTONAME('Result_Mode'+TimeMode, _data) + + SAVEVAR() + + if IsDisplay == 1 { + OnWeatherView + } +} + +OnWeatherInfoGetFailure +{ + ScriptHeadSimple + -- + '天気情報の保存に失敗' + -- + '\e' +} + + diff --git a/ghost/master/dic/system/_loading_order.txt b/ghost/master/dic/system/_loading_order.txt new file mode 100644 index 0000000..32c82ad --- /dev/null +++ b/ghost/master/dic/system/_loading_order.txt @@ -0,0 +1,4 @@ +dic, config.dic, UTF-8 +dic, shiori3.dic, UTF-8 +dicif, optional.dic, UTF-8 +dicif, compatible.dic, UTF-8 diff --git a/ghost/master/dic/system/compatible.dic b/ghost/master/dic/system/compatible.dic new file mode 100644 index 0000000..e4cc4c0 --- /dev/null +++ b/ghost/master/dic/system/compatible.dic @@ -0,0 +1,216 @@ +//****************************************************************************** +//SHIORI/3.0制御スクリプト for YAYA +//互換処理 +//****************************************************************************** + +// aya5.dll設定(旧) +#globaldefine AYAINFO_VERSION 0 +#globaldefine AYAINFO_CHARSET 1 +#globaldefine AYAINFO_PATH 2 +#globaldefine AYAINFO_NAME 3 +#globaldefine AYAINFO_AUTHOR 4 + +// 旧互換性保持のためのシステム関数補完(読み替えのみで対応可能なもの) +#globaldefine SETSEPARATOR SETDELIM +#globaldefine TONUMBER2 TOINT +#globaldefine TOSTRING2 TOSTR +#globaldefine TONUMBER CVINT +#globaldefine TOSTRING CVSTR +#globaldefine ISFUNCTION ISFUNC +#globaldefine BINSTRTONUM BINSTRTOI +#globaldefine HEXSTRTONUM HEXSTRTOI +#globaldefine ERASEVARIABLE ERASEVAR +#globaldefine MSTRLEN STRLEN +#globaldefine MSTRSTR STRSTR +#globaldefine MSUBSTR SUBSTR +#globaldefine MERASE ERASE +#globaldefine MINSERT INSERT +#globaldefine NAMETOVALUE EVAL +#globaldefine CALLBYNAME EVAL + +//****************************************************************************** +//文 version 4 システム関数 / システム変数の補完 +//汎用関数 +//****************************************************************************** + +ASC +{ + if !_argc; ' ' + elseif GETTYPE(_argv[0]) != 1; ' ' + elseif _argv[0] < 0 || _argv[0] > 0x7f; ' ' + else; CHR(_argv[0]) +} + +//---- + +IASC +{ + if !_argc; -1 + elseif GETTYPE(_argv[0]) != 3; -1 + elseif !STRLEN(_argv[0]); -1 + else; CHRCODE(_argv[0]) +} + +//---- + +ISINSIDE +{ + if _argc < 3; 0 + elseif (_argv[1] <= _argv[0] && _argv[0] <= _argv[2]) ||/ + (_argv[2] <= _argv[0] && _argv[0] <= _argv[1]); 1 + else; 0 +} + +//---- + +ISREAL +{ + if !_argc; 0 + elseif GETTYPE(_argv[0]) == 2; 1 + else; 0 +} + +//---- + +ISINTEGER +{ + if !_argc; 0 + elseif GETTYPE(_argv[0]) == 1; 1 + else; 0 +} + + +//****************************************************************************** +//文 version 4 システム関数 / システム変数の補完 +//REQ系関数 +//****************************************************************************** + +//---- + +REQ.KEY +{ + if !_argc; return + + switch GETTYPE(_i = _argv[0]) { + // エラー + '' + + // 位置指定 + var.req.key[_i] + + // 位置指定(実数) 整数化して処理 + var.req.key[TOINT(_i)] + + // 文字列はエラー + '' + } +} + +//---- + +REQ.HEADER +{ + REQ.KEY(_argv) +} + +//---- + +REQ.VALUE +{ + if !_argc; return + + switch GETTYPE(_i = _argv[0]) { + // エラー + '' + + // 位置指定 + var.req.value[_i] + + // 位置指定(実数) 整数化して処理 + var.req.value[TOINT(_i)] + + // 名前指定 + { + _sz = ARRAYSIZE(var.req.key) + for _j = 0; _j < _sz; _j++ { + if (var.req.key[_j] == _i) { + var.req.value[_j] + break + } + } + } + } +} + +//****************************************************************************** +//文 version 4 システム関数 / システム変数の補完 +//LIB系関数 +//****************************************************************************** +LIB.KEY +{ + if !_argc; return + + switch GETTYPE(_i = _argv[0]) { + // エラー + '' + + // 位置指定 + var.lib.key[_i] + + // 位置指定(実数) 整数化して処理 + var.lib.key[TOINT(_i)] + + // 文字列はエラー + '' + } +} + +//---- + +LIB.HEADER +{ + LIB.KEY(_argv) +} + +//---- + +LIB.VALUE +{ + if !_argc; return + + switch GETTYPE(_i = _argv[0]) { + // エラー + '' + + // 位置指定 + var.lib.value[_i] + + // 位置指定(実数) 整数化して処理 + var.lib.value[TOINT(_i)] + + // 名前指定 + { + _sz = ARRAYSIZE(var.lib.key) + for _j = 0; _j < _sz; _j++ { + if (var.lib.key[_j] == _i) { + var.lib.value[_j] + break + } + } + } + } +} + + + +//****************************************************************************** +// 文 version 4 以前の変数/関数の補完 +//****************************************************************************** +restore_old_variables +{ + // ascii + ascii = IARRAY + for _i = 0; _i <= 0x7f; _i++ { + ascii ,= CHR(_i) + } +} diff --git a/ghost/master/dic/system/config.dic b/ghost/master/dic/system/config.dic new file mode 100644 index 0000000..266fe46 --- /dev/null +++ b/ghost/master/dic/system/config.dic @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------- + * SHIORI/3.0設定スクリプト for YAYA + * --------------------------------------------------------------------------------------*/ + + +/*--------------------------------------------------------------------------------------- + * 初期設定値 + * --------------------------------------------------------------------------------------*/ + +/* AIトーク関連 -------------------------------------------------------------------------*/ +/* +TALK_INTERVAL AIトーク間隔の初期値[秒] +COM_RATIO AIトーク中に占めるコミュニケート開始の割合[%] +*/ +#globaldefine TALK_INTERVAL 0 +#globaldefine COM_RATIO 0 + + +/* インストール済みゴーストリスト構築関連 -----------------------------------------------*/ +/* +IGLIST_ACCEL + 1にするとSSP/CROW時にはNOTIFY installedghostnameで + インストール済ゴーストリストを構築するようになります。 + sakura/kero名リストは作成されませんが高速です + 0だとファイル走査にて構築します。 + インストール済みゴーストが多いと時間がかかります。 + +IGLIST_MAX + ファイル走査にてゴーストリストを構築する際、取得する + 数の上限を指定します。-1で制限なし(すべて取得)です。 + 0とすると取得しません。 +*/ +#globaldefine SHIORI3FW.IGLIST_ACCEL 1 +#globaldefine SHIORI3FW.IGLIST_MAX 0 + +/* リクエスト解析・レスポンス構築関連 ---------------------------------------------------*/ +/* +SHIORI3FW.RES_REF_MAX + res_referenceの上限 + +SHIORI3FW.AUTO_DATA_CONVERT + 1にするとAYA5と同等の処理になります。 + -SAORIの戻り値などの自動タイプ変換・自動的に\0x01をカンマにする等の処理が入ります。 + 0にするとそれらの処理を行いません。 + +SHIORI3FW.REF_ACCEL + 1にすると、reference0 といった変数を作成せず、reference[0] という形で + アクセスするようになります。若干のスピードアップが見込めます。 + 0にすると、reference0 といった変数を作成します(過去互換処理) +*/ +#globaldefine SHIORI3FW.RES_REF_MAX 32 +#globaldefine SHIORI3FW.AUTO_DATA_CONVERT 0 +#globaldefine SHIORI3FW.REF_ACCEL 1 + +/* +See: https://github.com/YAYA-shiori/yaya-dic/issues/19 +enabling Delayed EVAL will make your ghost more vulnerable to unsuspecting people using it to attack users' computers +make sure this switch is turned off if you can +*/ +#globaldefine SHIORI3FW.ENABLE_DELAYED_EVAL 0 diff --git a/ghost/master/dic/system/optional.dic b/ghost/master/dic/system/optional.dic new file mode 100644 index 0000000..c24ae12 --- /dev/null +++ b/ghost/master/dic/system/optional.dic @@ -0,0 +1,351 @@ +//****************************************************************************** +//SHIORI/3.0制御スクリプト for YAYA +//オプション関数 +//****************************************************************************** + +#define ESCAPE_TAG_1 CHR(0x3,0x3) +#define ESCAPE_TAG_2 CHR(0x4,0x4) + +//****************************************************************************** +//初期化・後始末 +//****************************************************************************** + +OnSystemLoad.SHIORI3FW.OPTIONAL +{ +} + +OnSystemUnload.SHIORI3FW.OPTIONAL +{ + ERASEVAR('SHIORI3FW.FMOCache') + ERASEVAR('SHIORI3FW.SakuraNameList') + ERASEVAR('SHIORI3FW.FMOTable') +} + +//****************************************************************************** +//さくらスクリプトタグ除去 +//****************************************************************************** + +//------------------------------------------------------------------------------ +// 関数名:SHIORI3FW.EscapeDangerousTags +// 機能 :危険なタグのみをエスケープ(\付加)する。 +// 引数 :argv0=テキスト +//------------------------------------------------------------------------------ +SHIORI3FW.EscapeDangerousTags{ + _txt=_argv[0] + _txt=REPLACE(_txt,'\\',ESCAPE_TAG_1) + _txt=REPLACE(_txt,'\%',ESCAPE_TAG_2) + _txt=RE_REPLACE(_txt, / + '\\(?=(!\[(' + / + 'updatebymyself|vanishbymyself|enter,passivemode|' + / + 'leave,passivemode|lock,repaint|unlock,repaint|biff|' + / + 'open,browser|open,mailer|raise)' + / + '.*?\]|\\j\[))' , / + '\\') + _txt=REPLACE(_txt,ESCAPE_TAG_2,'\%') + _txt=REPLACE(_txt,ESCAPE_TAG_1,'\\') + _txt +} + +//------------------------------------------------------------------------------ +// 関数名:SHIORI3FW.EscapeAllTags +// 機能 :全てのさくらスクリプトタグをエスケープ(\付加)する。 +// 引数 :argv0=テキスト +//------------------------------------------------------------------------------ +SHIORI3FW.EscapeAllTags{ + _txt=_argv[0] + _txt=REPLACE(_txt,'\\',ESCAPE_TAG_1) + _txt=REPLACE(_txt,'\%',ESCAPE_TAG_2) + _txt=REPLACE(_txt,'\','\\') + _txt=REPLACE(_txt,'%','\%') + _txt=REPLACE(_txt,ESCAPE_TAG_2,'\%') + _txt=REPLACE(_txt,ESCAPE_TAG_1,'\\') + _txt +} + +//------------------------------------------------------------------------------ +// 関数名:SHIORI3FW.TranslateSystemChar +// 機能 :演算子などシステム予約文字を別のものに置き換える +// 引数 :argv0=テキスト argv1=置き換え対象(省略時_) +//------------------------------------------------------------------------------ +SHIORI3FW.TranslateSystemChar +{ + _c = '_' + if _argc >= 2 { + _c = _argv[1] + } + _text = TOSTR(_argv[0]) + _text = RE_REPLACE(_text,"[ !%(CHR(0x22))%(CHR(0x25))#$&()*+,\-/:;<=>?@\[\]`{|}~]",_c) + _text +} + +//------------------------------------------------------------------------------ +// 関数名:SHIORI3FW.InitBalloons +// 機能 :バルーン完全初期化スクリプトを自動生成する +//------------------------------------------------------------------------------ +SHIORI3FW.InitBalloons +{ + _tx = '' + _n = ARRAYSIZE(SHIORI3FW.HWnd) + for _i = 0 ; _i < _n ; _i++ { + if SHIORI3FW.HWnd[_i] != 0 { + _tx += "\p[%(_i)]\c\b[-1]" + } + } + _tx +} + +//****************************************************************************** +// FMO関連 +//****************************************************************************** +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.IsGhostExist(ゴースト名(sakuraname)[,fmoname]) +//機能 :指定されたゴーストが存在するか調べる +//    存在しなければ0、存在すれば1を返す +//------------------------------------------------------------------------------ +SHIORI3FW.IsGhostExist +{ + _ghostname=_argv[0] + SHIORI3FW.RefreshFMOTable(_argv[1]) + _result=ASEARCH(_ghostname,SHIORI3FW.SakuraNameList) + if _result == -1 { + 0 + }else{ + 1 + } +} + + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.RefreshFMOTable(FMO名称,無視するエントリのHWND) +//機能 :READFMOによってFMOテーブルを作る。 +/* +FMOはキャッシュされ、変わっていなければ解析は行われない。 +FMO名称を省略すると自動的に'Sakura'になる。 +無視するエントリのHWNDを省略すると、SHIORI3FW.HWnd[0] 変数が利用される。 +(つまり自動的に自身の情報は含まれなくなる) + +グローバル変数:SHIORI3FW.FMOCache FMOの内容のキャッシュ(単純ダンプ) +グローバル変数:SHIORI3FW.FMOTable FMOのテーブル(簡易配列。内容は以下) +id|name|keroname|hwnd|kerohwnd|path|ghostpath, +id|name|keroname|hwnd|kerohwnd|path|ghostpath, +... + +グローバル変数:SHIORI3FW.SakuraNameList sakuranameを列挙した汎用配列 +また、いわゆる「非ゴースト」FMOエントリ(一時起動等)はこの時点で排除される。 +*/ +//------------------------------------------------------------------------------ +SHIORI3FW.RefreshFMOTable : void +{ + _fmoname=TOSTR(_argv[0]) + if _fmoname == '' { + _fmoname='Sakura' + } + + _result='' + if _fmoname == 'SakuraUnicode' + _result=READFMO(_fmoname,'UTF-8') + else + _result=READFMO(_fmoname) + + if SHIORI3FW.FMOCache == _result { + //変わっていなければ即座に戻る + return + } + + //FMOの内容をキャッシュする + SHIORI3FW.FMOCache=_result + SHIORI3FW.FMOTable='' + SHIORI3FW.SakuraNameList=IARRAY + + _ignorehwnd=TOSTR(_argv[1]) + if _ignorehwnd == '' { + _ignorehwnd = SHIORI3FW.HWnd[0] + } + + //\r\nで分割 + _array = SPLIT(_result,C_CRLF) + _arraynum=ARRAYSIZE(_array) + + //変数初期化 + _fmotable_temp='' + _id='' + _oldid='' + _name='' + _keroname='' + _hwnd='' + _kerohwnd='' + _path='' + _ghostpath='' + + //結果を擬似2次配列にストア + //ssp_fmo_header_000024dc_005c094e.hwnd,6031694 + //<------------------id----------> key value + for _i=0 ; _i<_arraynum-1 ; _i++ { + //一時起動ゴーストかどうか? + _buf=_array[_i] + _id=_buf[0,'.'] + if 'SSTPVIEWER-' _in_ _id || 'ssp_fmo_header_dummyentry' _in_ _id || 'SSSB' _in_ _id{ + //一時起動なのでなにもしない + }else{ + if _oldid == '' { + _oldid = _id + } + //IDが変わったら一時保存を書き出し + if _oldid != _id { + _fmotable_temp+="%(_oldid)|%(_name)|%(_keroname)|%(_hwnd)|%(_kerohwnd)|%(_path)|%(_ghostpath)," + _oldid = _id + _name='' + _keroname='' + _hwnd='' + _kerohwnd='' + _path='' + _ghostpath='' + } + _kvpair=_buf[1,'.'] + _key=_kvpair[0,C_BYTE1] + _val=_kvpair[1,C_BYTE1] + + //各値を一時保存 + case _key { + when 'hwnd' {_hwnd=_val} + when 'name' {_name=_val} + when 'keroname' {_keroname=_val} + when 'path' {_path=_val} + when 'kerohwnd' {_kerohwnd=_val} + when 'ghostpath'{_ghostpath=_val} + } + } + } + //最後のエントリを書き出し + _fmotable_temp += "%(_id)|%(_name)|%(_keroname)|%(_hwnd)|%(_kerohwnd)|%(_path)|%(_ghostpath)" + + //無視するHWNDを取り除き、同時にSakuraNameListを作成 + _count_temp=ARRAYSIZE(_fmotable_temp) + for _i=0;_i<_count_temp;_i++ { + _tablestr=_fmotable_temp[_i] + _tablehwnd=_tablestr[3,'|'] + if _tablehwnd != _ignorehwnd { + SHIORI3FW.FMOTable += _tablestr+',' + SHIORI3FW.SakuraNameList=(SHIORI3FW.SakuraNameList,_tablestr[1,'|']) + } + } + + //最後がカンマなら取り除く + if SUBSTR(SHIORI3FW.FMOTable,STRLEN(SHIORI3FW.FMOTable)-1,1)==',' { + SHIORI3FW.FMOTable=SUBSTR(SHIORI3FW.FMOTable,0,STRLEN(SHIORI3FW.FMOTable)-1) + } +} + +//****************************************************************************** +// テキスト処理 +//****************************************************************************** + +//------------------------------------------------------------------------------ +// 関数名:SHIORI3FW.MakeJustText +// 機能 :指定した長さになるまでスペースを埋める / 省略する +// 引数 :argv0=テキスト argv1=文字数(半角換算) +//------------------------------------------------------------------------------ + +//---- 後ろにスペースを補完する関数 (from和音) +SHIORI3FW.MakeLongText +{ + _menuitem = _argv[0] + _len = _argv[1] - GETSTRBYTES(_menuitem,127) + + if _len <= 0 { + _menuitem + return + } + + _space = ' ' + _menuitem += SUBSTR(_space,0,_len) + + _menuitem +} + +//---- 適当な長さで切る ------------------------------------------- +SHIORI3FW.MakeShortText +{ + if _argc < 2 { + '' + return + } + + _src = _argv[0] + _cut = TOINT(_argv[1]) + _text = '' + + if GETSTRBYTES(_argv[0],127) <= _cut { + _argv[0] + return + } + + _num = STRLEN(_src) + _lendiff = 0//後で保存するためにスコープを一つ下げるためのダミー代入 + + while 1 { + _text = SUBSTR(_argv[0],0,_num) + + _lendiff = _cut - GETSTRBYTES(_text,127) - 2 + if _lendiff >= 0 { + break + } + _num -= 1 + if _num <= 0 { + '' + return + } + } + + if _lendiff > 0 { + _text += '...' + } + else { + _text += '..' + } + _text +} + +//---- 長さをきっちり調節 +SHIORI3FW.MakeJustText +{ + _text = SHIORI3FW.MakeLongText(_argv[0],_argv[1]) + if _text != _argv[0] {//短すぎた + _text + return + } + + _text = SHIORI3FW.MakeShortText(_argv[0],_argv[1]) + _text +} + +//****************************************************************************** +// その他 +//****************************************************************************** + +//---- HTTPコード->日本語 _argv[0]にコード + +SHIORI3FW.HTTPCodeToMessage +{ + case _argv[0] { + when '403' { + 'アクセス拒否' + } + when '404','410' { + 'ファイル無し' + } + when '500','502','503' { + 'サーバ側の不調' + } + when 'timeout' { + 'タイムアウト' + } + when 'fileio' { + 'ファイル書き込みエラー' + } + when 'artificial' { + '手動中断' + } + } +} + diff --git a/ghost/master/dic/system/shiori3.dic b/ghost/master/dic/system/shiori3.dic new file mode 100644 index 0000000..f690e8c --- /dev/null +++ b/ghost/master/dic/system/shiori3.dic @@ -0,0 +1,2105 @@ +//****************************************************************************** +/* +SHIORI/3.0制御スクリプト for YAYA + +使用可能な変数 + +SHIORI3FW.Status + 初期起動ステータス Runで初期化済み + +SHIORI3FW.Eventid + イベントID + +SHIORI3FW.LastTalk + 直前のトーク(すべて) + +SHIORI3FW.LastAITalk + 直前のランダムトーク + +SHIORI3FW.LastSurface + 直前に表示していたサーフィス SHIORI3FW.LastSurface[0] がさくら側 + +SHIORI3FW.IsVisible + 現在サーフィスが表示されているかどうか(1/0) SHIORI3FW.IsVisible[0] がさくら側 + +SHIORI3FW.HWnd +SHIORI3FW.BalloonHWnd + キャラウインドウ・バルーンのHWND。 SHIORI3FW.HWnd[0] がさくら側 + +SHIORI3FW.UniqueID + Auth.SSTPに使用するID + +SHIORI3FW.Capability + ID: capabilityで来たベースウェアのヘッダ処理能力:汎用配列 + +SHIORI3FW.GhostName + ゴースト名★ + +SHIORI3FW.ShellName +SHIORI3FW.ShellPath + シェル名とパス★ + +SHIORI3FW.BalloonName +SHIORI3FW.BalloonPath + バルーン名とパス★ + +使用可能な疑似イベント + +OnSHIORI3FW.SurfaceRestore + OnSurfaceRestoreの本体非依存版 + +OnSHIORI3FW.ChangeSelfInfo + 上記★マークがついた変数が更新されたときに呼び出される + +*/ +//****************************************************************************** + + +//------------------------------------------------------------------------------ +//以下のdefineは基本的に弄らないで下さい +//------------------------------------------------------------------------------ + +// チェイン +#globaldefine CHAIN{{ {{CHAIN /* どうも誤記される場合があるようなので */ +#globaldefine CHAIN}} }}CHAIN /* 同上 */ +#globaldefine {{CHAIN { switch CHAIN.Index { +#globaldefine }}CHAIN } CHAIN.Index++ } + +#define CHAIN_DELIM ':chain=' +#define EVAL_DELIM ':eval=' + +//****************************************************************************** +// load +//****************************************************************************** + +//------------------------------------------------------------------------------ +//関数名:load +//機能 :ロード時の処理 +//------------------------------------------------------------------------------ +load +{ + // 文字/文字列定数 + C_CRLF2 = CHR(0xd,0xa,0xd,0xa) + C_CRLF = CHR(0xd,0xa) + C_BYTE1 = CHR(0x1) + + REQ.COMMAND = 'LOAD' + REQ.PROTOCOL = 'AYA/5.0' + var.req.key = (IARRAY, 'Path') + var.req.value = (IARRAY, _argv[0]) + var.req.rawvalue = (IARRAY,_argv[0]) + + SHIORI3FW.Path = _argv[0] + + var.lib.key = IARRAY + var.lib.value = IARRAY + var.lib.result = '' + + if (FSIZE(GETSETTING('coreinfo.savefile')) <= 0) && (FSIZE(GETSETTING('coreinfo.savefile') + '.ays') <= 0) { + if FSIZE('aya5_variable.cfg') > 0 { + RESTOREVAR('aya5_variable.cfg') + FDEL('aya5_variable.cfg') + } + elseif FSIZE('aya_variable.cfg') > 0 { + RESTOREVAR('aya_variable.cfg') + FDEL('aya_variable.cfg') + } + SAVEVAR + } + + // 初回起動時の初期化 + if ISVAR('aitalkinterval') == 0 { + aitalkinterval = TALK_INTERVAL + } + if ISVAR('communicateratio') == 0 { + communicateratio = COM_RATIO + } + if ISVAR('ghostupmin_last') == 0 { + ghostupmin_last = 0 + } + if ISVAR('ghostuptimes') == 0 { + ghostuptimes = 0 + } + ghostuptimes += 1 + + // 毎回起動時の初期化 + SHIORI3FW.ResetAITalkInterval(-1) + + _sec = GETSECCOUNT + + SHIORI3FW.SaveVarCount = 0 + SHIORI3FW.LastTalk = '' + SHIORI3FW.LastTalkTime = _sec + SHIORI3FW.LastAITalk = '' + SHIORI3FW.LastAITalkTime = _sec + SHIORI3FW.TalkEndTime = _sec + + if GETTYPE(SHIORI3FW.LastSurface) != 4 { + SHIORI3FW.LastSurface = (0,10) + SHIORI3FW.IsVisible = (1,1) + } + + SHIORI3FW.HWnd = (0,0) + SHIORI3FW.HWndOld = (0,0) + SHIORI3FW.BalloonHWnd = (0,0) + SHIORI3FW.UniqueID = '' + SHIORI3FW.DebugMode = 0 + SHIORI3FW.CanTalkFlag = 1 + + SHIORI3FW.Eventid = '' + SHIORI3FW.EventidOld = '' + SHIORI3FW.EventidTranslate = '' + SHIORI3FW.EventidTranslateOld = '' + SHIORI3FW.SecurityLevel = '' + + SHIORI3FW.ErrorDescription = '' + SHIORI3FW.ErrorLevel = '' + SHIORI3FW.LastErrorDescription = '' + + SAORI.DllList = IARRAY + basewarename = '' + basewarenameex = '' + sender = '' + ghostbootmin = GETSECCOUNT / 60 + + S_CHARSET = GETSETTING('charset.output') + + status = '' + SHIORI3FW.tempvarname = IARRAY + + array_eventtranslate = ASORT('string,ascending',GETFUNCLIST('OnGhostEventTranslate')) + array_translateinternal = ASORT('string,ascending',GETFUNCLIST('OnTranslateInternal')) + + installedghostlist = IARRAY + installedsakuralist = IARRAY + installedkerolist = IARRAY + + SHIORI3FW.BasewareNotifysInstalledSakuraName = 0 + SHIORI3FW.BasewareNotifysInstalledKeroName = 0 + + SHIORI3FW.InitChain + SHIORI3FW.InitAdditionalReturn + + SHIORI3FW.SetDelayEvent('',0) + + //過去互換用(ascii変数) + if ISFUNC('restore_old_variables') { + EVAL('restore_old_variables') + } + + AyaLoad.FuncEnumExec('OnSystemLoad','ascending') + AyaLoad.FuncEnumExec('OnGhostLoad','ascending') + + _ft = <<' + On_version + On_craftman + On_craftmanw + '>> + _fa = SPLIT(_ft,C_CRLF) + + foreach _fa;_f { + if ISFUNC(_f) { + LOGGING("警告:関数/イベント %(_f) はシステム辞書で上書きされます") + } + } +} + +//****************************************************************************** +//unload +//****************************************************************************** + +//------------------------------------------------------------------------------ +//関数名:unload +//機能 :終了処理 +//------------------------------------------------------------------------------ +unload +{ + REQ.COMMAND = 'UNLOAD' + REQ.PROTOCOL = 'AYA/5.0' + var.req.key = IARRAY + var.req.value = IARRAY + var.req.rawvalue = IARRAY + + ghostupmin_last = ghostupmin_total + + AyaLoad.FuncEnumExec('OnGhostUnload','descending') + AyaLoad.FuncEnumExec('OnSystemUnload','descending') + + // 保存する必要のない変数を削除 + _var = <<' +array_eventtranslate +array_translateinternal +REQ.COMMAND +REQ.PROTOCOL +var.req.key +var.req.value +var.req.rawvalue +LIB.PROTOCOL +LIB.STATUSCODE +var.lib.key +var.lib.value +var.lib.result +SAORI.DllList +selfname +sakuraname +keroname +basewarename +basewarenameex +sender +S_CHARSET +installedghostlist +installedsakuralist +installedkerolist +ascii +uniqueid +ghostbootmin +status +res_securitylevel +res_reference +res_marker +marker +res_valuenotify +SHIORI3FW.Path +SHIORI3FW.LastAITalk +SHIORI3FW.LastAITalkTime +SHIORI3FW.LastTalk +SHIORI3FW.LastTalkTime +SHIORI3FW.TalkEndTime +SHIORI3FW.CanTalkFlag +SHIORI3FW.IsSurfaceRestoreComplete +SHIORI3FW.IsAITalkComplete +SHIORI3FW.SaveVarCount +SHIORI3FW.HWnd +SHIORI3FW.HWndOld +SHIORI3FW.BalloonHWnd +SHIORI3FW.UniqueID +SHIORI3FW.Eventid +SHIORI3FW.EventidOld +SHIORI3FW.EventidTranslate +SHIORI3FW.EventidTranslateOld +SHIORI3FW.SecurityLevel +SHIORI3FW.DelayEventTime +SHIORI3FW.DelayEvent +SHIORI3FW.DelayEventReference +SHIORI3FW.GhostName +SHIORI3FW.ErrorDescription +SHIORI3FW.ErrorLevel +SHIORI3FW.LastErrorDescription +SHIORI3FW.Capability +SHIORI3FW.DebugMode +SHIORI3FW.Status +SHIORI3FW.UserName +SHIORI3FW.UserNameFull +SHIORI3FW.UserBirthday +SHIORI3FW.UserSex +SHIORI3FW.BasewareNotifysInstalledSakuraName +SHIORI3FW.BasewareNotifysInstalledKeroName +SHIORI3FW.LastSurface +SHIORI3FW.IsVisible +C_CRLF2 +C_CRLF +C_BYTE1 +'>> + //以下は保存 + //SHIORI3FW.ShellName + //SHIORI3FW.ShellNameOld + //SHIORI3FW.ShellPath + //SHIORI3FW.BalloonName + //SHIORI3FW.BalloonNameOld + //SHIORI3FW.BalloonPath + + ERASEVAR(SPLIT(_var,C_CRLF)) + + if ARRAYSIZE(SHIORI3FW.tempvarname) { + ERASEVAR(SHIORI3FW.tempvarname) + } + ERASEVAR('SHIORI3FW.tempvarname') + + SHIORI3FW.ClearChainVariable + SHIORI3FW.ClearReferenceAndPassThruInsVariable + SHIORI3FW.ClearValueexVariable + SHIORI3FW.ClearAdditionalReturnVariable +} + +//------------------------------------------------------------------------------ +//関数名:AyaTest.Eval +//機能 :受け取った文字列をEVALして返す +//------------------------------------------------------------------------------ +AyaTest.Eval +{ + _array = SPLIT(_argv[0],C_CRLF) + _result = '' + _n = ARRAYSIZE(_array) + + for _i = 0 ; _i < _n ; _i++ { + if _array[_i] { + _result += EVAL(_array[_i]) + } + } + _result +} + +//------------------------------------------------------------------------------ +//関数名:AyaLoad.FuncEnumExec +//機能 :関数リストを作成しソートして実行 +//引数 :0=イベント 1=ソート順(ascending,descending) +//------------------------------------------------------------------------------ +AyaLoad.FuncEnumExec : void +{ + _a = GETFUNCLIST(_argv[0]) + _a = ASORT('string,' + _argv[1],_a) + + _n = ARRAYSIZE(_a) + for _i = 0 ; _i < _n ; _i++ { + EVAL(_a[_i]) + } +} + + +//****************************************************************************** +//request +//****************************************************************************** +//------------------------------------------------------------------------------ +//関数名:request +//機能 :受け取った文字列をSHIORIリクエストヘッダとして解析した後、 +// OnRequestを活性化します +//------------------------------------------------------------------------------ +request +{ + //For TEST + //test(_argv[0]) + //return + + if SUBSTR(_argv[0],0,3) == '?? ' {//玉でのテスト用 + '!! ' + JOIN(AyaTest.Eval(ERASE(_argv[0],0,3)),',') + return + } + + _reqdata = _argv[0] + _linestart = 0 + _lineend = STRSTR(_reqdata, C_CRLF, _linestart) + + if _lineend <= 0 { + //1行目すらない! + "SHIORI/3.0 400 Bad Request%(C_CRLF)Charset: %(S_CHARSET)%(C_CRLF2)" + return + } + _lin = SUBSTR(_reqdata,_linestart,(_lineend - _linestart)) + + // リクエスト種別とプロトコル名の取得 エラーなら400 + REQ.COMMAND = _lin[0,' SHIORI'] + REQ.PROTOCOL = 'SHIORI' + _lin[1,' SHIORI'] + + // リクエストヘッダの取得 + var.req.key = IARRAY + var.req.value = IARRAY + var.req.rawvalue = IARRAY + + status = '' + SHIORI3FW.Eventid='' + SHIORI3FW.SecurityLevel='local'//互換性のためデフォルトはlocal + + while _lineend > _linestart { + //行分割 + _linestart = _lineend + 2 + _lineend = STRSTR(_reqdata, C_CRLF, _linestart) + + //空行もしくはみつからなかった + if _lineend <= _linestart { + break + } + + _lin = SUBSTR(_reqdata,_linestart,(_lineend - _linestart)) + + // キーと値を取得 + _len = STRLEN(_lin) + _pos = STRSTR(_lin,': ',0) + var.req.key ,= (_key = SUBSTR(_lin,0,_pos)) + _value = SUBSTR(_lin,(_pos + 2),(_len - _pos - 2)) + + if var.req.key == '' { + break + } + + // イベントID名称を取得 + if _key == 'Charset' { + if S_CHARSET != _value { + void SETSETTING('charset.output',_value) + S_CHARSET = _value + } + } + elseif _key == 'ID' { + // 取得 名前先頭が'On'でないなら付加 + SHIORI3FW.Eventid = _value + if SUBSTR(SHIORI3FW.Eventid, 0, 2) != 'On' { + SHIORI3FW.Eventid = 'On_' + SHIORI3FW.Eventid + } + } + // セキュリティレベル + elseif _key == 'SecurityLevel' { + SHIORI3FW.SecurityLevel = _value + } + // ベースウェア名取得 + elseif _key == 'Sender' { + if basewarenameex == '' { + basewarenameex = _value + } + basewarename = _value + sender = _value + } + //Status + elseif _key == 'Status' { + status = _value + } + + // キーと値を記憶 + var.req.rawvalue ,= _value + + if SHIORI3FW.AUTO_DATA_CONVERT { + if ISINTSTR(_value) { + var.req.value ,= TOINT(_value) + } + elseif ISREALSTR(_value) { + var.req.value ,= TOREAL(_value) + } + else { + var.req.value ,= REPLACE(_value, C_BYTE1, ',')// バイト値1はカンマ化してしまう + } + } + else { + var.req.value ,= TOAUTOEX(_value) + } + } + + if SHIORI3FW.Eventid == 'OnAiTalk' || SHIORI3FW.Eventid == 'OnAITalk' { + SHIORI3FW.Eventid = 'OnAITalkNewEvent' + } + + if TOLOWER(SHIORI3FW.SecurityLevel) == 'external' { + SHIORI3FW.Eventid = 'ExternalEvent.' + SHIORI3FW.Eventid + } + + SHIORI3FW.EventidTranslate = SHIORI3FW.TranslateEvent(SHIORI3FW.Eventid) + + // ハンドラが無い場合は即返る + if !ISFUNC(SHIORI3FW.EventidTranslate) && !SHIORI3FW.IsImportantEvent { + SHIORI3FW.MakeEmptyResponse(SHIORI3FW.Eventid) + -- + C_CRLF + + return + } + + OnRequest +} + +SHIORI3FW.TranslateEvent +{ + _result = _argv[0] + _as = ARRAYSIZE(array_eventtranslate) + if _as > 0 { + _ev = '' + for _i = 0 ; _i < _as ; _i++ { + void EVAL("_ev = %(array_eventtranslate[_i])(_result)") + if STRLEN(_ev) > 0 { + _result = _ev + } + } + } + _result +} + +//------------------------------------------------------------------------------ +//関数名:OnRequest +//機能 :受け取ったリクエストに応じた処理を行います +//------------------------------------------------------------------------------ +OnRequest +{ + // コマンド別に処理分岐 + case REQ.COMMAND { + when 'NOTIFY' { + // NOTIFYリクエスト + void SHIORI3FW.RaiseIDEvent + "SHIORI/3.0 204 No Content%(C_CRLF)Charset: %(S_CHARSET)%(C_CRLF)" + -- + SHIORI3FW.AssembleReferenceHeader(1) + } + + when 'GET' { + // GETリクエスト + if (_result = SHIORI3FW.RaiseIDEvent) == '' { + SHIORI3FW.MakeEmptyResponse(SHIORI3FW.Eventid) + } + else { + "SHIORI/3.0 200 OK%(C_CRLF)Sender: AYA%(C_CRLF)Charset: %(S_CHARSET)%(C_CRLF)/ + Value: %(_result)%(C_CRLF)" + -- + SHIORI3FW.AssembleReferenceHeader(0) + + if SHIORI3FW.Eventid != 'OnTranslate' { + SHIORI3FW.EventidOld = SHIORI3FW.Eventid + SHIORI3FW.EventidTranslateOld = SHIORI3FW.EventidTranslate + } + } + SHIORI3FW.GetLastErrorLog + + if SHIORI3FW.LastErrorDescription != SHIORI3FW.ErrorDescription { + SHIORI3FW.LastErrorDescription = SHIORI3FW.ErrorDescription + + SHIORI3FW.PushErrorAlart(SHIORI3FW.ErrorLevel,SHIORI3FW.ErrorDescription) + } + } + + others + // 未知のリクエスト + "SHIORI/3.0 400 Bad Request%(C_CRLF)" + } + + -- + SHIORI3FW.GetAdditionalReturns + -- + C_CRLF +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.PushErrorAlart +//機能 :Push Error Alart +//------------------------------------------------------------------------------ +SHIORI3FW.PushErrorAlart{ + SHIORI3FW.PushAdditionalReturn('ErrorLevel',_argv[0]) + SHIORI3FW.PushAdditionalReturn('ErrorDescription',_argv[1]) +} + + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.GetLastErrorLog +//機能 :エラーログに表示すべき文字列を作成します +//------------------------------------------------------------------------------ +SHIORI3FW.GetLastErrorLog +{ + _errors = GETERRORLOG + + _errorlevel_text = 'SHIORI3FW.ERRORLOGLEVEL' + _errorlevel = 2 + + if _errorlevel_text == 'note' { + _errorlevel = 0 + } + elseif _errorlevel_text == 'warning' { + _errorlevel = 1 + } + + SHIORI3FW.ErrorDescription = '' + SHIORI3FW.ErrorLevel = '' + + foreach _errors; _error { + _el = 0 + + if ( STRSTR(_error,'error',0) >= 0 ) { + _el = 2 + } + elseif ( STRSTR(_error,'warning',0) >= 0 ) { + _el = 1 + } + + if _el < _errorlevel { + continue + } + + if STRLEN(SHIORI3FW.ErrorDescription) > 0 { + SHIORI3FW.ErrorDescription += CHR(1) + SHIORI3FW.ErrorLevel += CHR(1) + } + + SHIORI3FW.ErrorDescription += _error + + if _el == 0 { + SHIORI3FW.ErrorLevel += 'info' + } + elseif _el == 1 { + SHIORI3FW.ErrorLevel += 'warning' + } + else { + SHIORI3FW.ErrorLevel += 'critical' + } + } + +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.InitAdditionalReturn +//機能 :追加ヘッダ用変数を初期化します +//------------------------------------------------------------------------------ +SHIORI3FW.InitAdditionalReturn : void +{ + SHIORI3FW.AdditionalReturn.String = '' +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.PushAdditionalReturn +//機能 :ヘッダを追加します (設定はリクエストごとにリセットされます) +//引数 :_argv[0] ヘッダ名 _argv[1] 値 +//------------------------------------------------------------------------------ +SHIORI3FW.PushAdditionalReturn : void +{ + _key="%(_argv[0]): " + _argv[0]=IARRAY + SHIORI3FW.AdditionalReturn.String += _key+TOSTR(_argv)+C_CRLF +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.Push_X_SSTP_PassThru +//機能 :X-SSTP-PassThruヘッダを追加します (設定はリクエストごとにリセットされます) +//引数 :_argv[0] ヘッダ名 _argv[1] 値 +//------------------------------------------------------------------------------ +SHIORI3FW.Push_X_SSTP_PassThru : void +{ + _h = 'X-SSTP-PassThru-' + TOSTR(_argv[0]) + _argv[0] = IARRAY + SHIORI3FW.PushAdditionalReturn(_h,_argv) +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.ClearAdditionalReturnVariable +//機能 :追加ヘッダ用変数を削除します +//------------------------------------------------------------------------------ +SHIORI3FW.ClearAdditionalReturnVariable : void +{ + ERASEVAR('SHIORI3FW.AdditionalReturn.String') +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.GetAdditionalReturns +//機能 :追加ヘッダを展開します +//返値 :追加すべきヘッダ文字列 最後は必ず改行で終わる +//------------------------------------------------------------------------------ +SHIORI3FW.GetAdditionalReturns +{ + _t=SHIORI3FW.AdditionalReturn.String + SHIORI3FW.AdditionalReturn.String = '' + _t +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.AssembleReferenceHeader +//機能 :res_reference*変数を順次検査して返送用のReference文字列を作成します +//------------------------------------------------------------------------------ +SHIORI3FW.AssembleReferenceHeader +{ + _is_notify = TOINT(_argv[0]) + + _result = '' + _before = '' + _value = '' + + if _is_notify == 0 { + _r = GETTYPEEX('res_reference') + + if _r != 0 { + if _r == 4 { + _n = ARRAYSIZE(res_reference) + for _i = 0 ; _i < _n ; _i++ { + _result += "Reference%(_i): %(res_reference[_i])%(C_CRLF)" + } + } + else { + _result += "Reference0: %(res_reference)%(C_CRLF)" + } + ERASEVAR('res_reference') + } + else { + for _i = 0; _i < SHIORI3FW.RES_REF_MAX; _i++ { + _before = _value + + _varname = 'res_reference' + _i + _value = EVAL(_varname) + if _value != '' { + _result += "Reference%(_i): %(_value)%(C_CRLF)" + ERASEVAR(_varname) + } + else { + if _before == ''; break + } + } + } + + if (marker != '') || (res_marker != '') { + if marker != '' { + _result += "Marker: %(marker)%(C_CRLF)" + ERASEVAR('marker') + } + else { + _result += "Marker: %(res_marker)%(C_CRLF)" + ERASEVAR('res_marker') + } + } + + if res_securitylevel != '' { + _result += "SecurityLevel: %(res_securitylevel)%(C_CRLF)" + ERASEVAR('res_securitylevel') + } + } + + if res_valuenotify != '' { + _result += "ValueNotify: %(res_valuenotify)" + ERASEVAR('res_valuenotify') + } + + _result +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.IsImportantEvent +//機能 :絶対に通知すべきイベントを識別します +//引数 :_argv[0] (本当の)イベント名 +//------------------------------------------------------------------------------ +SHIORI3FW.IsImportantEvent +{ + if SHIORI3FW.Eventid == 'OnSecondChange' { + 1 + return + } + elseif ISFUNC('SHIORI3EV.' + SHIORI3FW.Eventid) { + 1 + return + } + 0 +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.RaiseIDEvent +//機能 :指定された名前の関数を実行して結果を取得します +//------------------------------------------------------------------------------ +SHIORI3FW.RaiseIDEvent +{ + //reference&PassThru_Ins 変数を作成 + SHIORI3FW.MakeReferenceAndPassThruInsVariable + + _event = SHIORI3FW.EventidTranslate + _event_fallback = _event + + _result_internal = '' + + if SHIORI3FW.Eventid == 'OnSecondChange' { + // OnSecondChangeならランダムトーク関連処理 + _event = SHIORI3FW.ControlAITalk(_event) + _event = SHIORI3FW.TranslateEvent(_event) + } + + if _event != 'OnSecondChange' { + if ISFUNC('SHIORI3EV.' + _event) { + _result_internal = TOSTR(EVAL('SHIORI3EV.' + _event)) + } + } + + _can_talk = SHIORI3FW.CanTalk + if _can_talk != SHIORI3FW.CanTalkFlag { + if _can_talk { + SHIORI3FW.TalkEndTime = GETSECCOUNT + } + SHIORI3FW.CanTalkFlag = _can_talk + } + + // イベント活性化 + _result = '' + if ISFUNC(_event) { + _result = TOSTR(EVAL(_event)) + } + if _result == '' { + if _event != _event_fallback { + if ISFUNC(_event_fallback) { + _result = TOSTR(EVAL(_event_fallback)) + } + } + } + if _result == '' { + _result = _result_internal + } + + if _result != '' { //トークあり + // 遅延EVAL + _talk=IARRAY + if SHIORI3FW.ENABLE_DELAYED_EVAL + _talk = RE_SPLIT(_result,'(' + EVAL_DELIM + '|' + CHAIN_DELIM + ')') + else + _talk = RE_SPLIT(_result,'(' + CHAIN_DELIM + ')') + _delim = RE_GETSTR + _n = ARRAYSIZE(_delim) + + //先に内部トランスレート + if SHIORI3FW.Eventid != 'OnTranslate' { + _as = ARRAYSIZE(array_translateinternal) + if _as >= 1 { + _tk = '' + for _i = 0 ; _i < _as ; _i++ { + void EVAL("_tk = %(array_translateinternal[_i])(_talk[0])") + if STRLEN(_tk) > 0 { + _talk[0] = _tk + } + } + } + } + + //後から遅延設定 + for _i = 0 ; _i < _n ; _i += 1 { + if SHIORI3FW.ENABLE_DELAYED_EVAL && _delim[_i] == EVAL_DELIM { + // 遅延EVAL + void EVAL(_talk[_i + 1]) + } + elseif _delim[_i] == CHAIN_DELIM { + // チェイン処理 + SHIORI3FW.StartChainTalk(_talk[_i + 1]) + } + } + + if _talk[0] != '' { + if SHIORI3FW.Status != 'Run' { + SHIORI3FW.Status = 'Run' + } + SHIORI3FW.LastTalk = _talk[0] + if _event == 'OnAITalkNewEvent' { + SHIORI3FW.LastAITalk = _talk[0] + SHIORI3FW.ResetAITalkInterval(STRLEN(_talk[0])) + } + if 'Surface' !_in_ _event { + if SHIORI3FW.RemoveAllTags(_talk[0]) != '' { + SHIORI3FW.LastTalkTime = GETSECCOUNT + } + } + _talk[0] + } + } + else { //トークなし + if _event == 'OnAITalkNewEvent' { + SHIORI3FW.LastAITalk = '' + SHIORI3FW.ResetAITalkInterval(0) + } + } + + // reference&PassThru_Ins 変数をクリア + SHIORI3FW.ClearReferenceAndPassThruInsVariable +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.MakeEmptyResponse +//機能 :204を返してはいけないリクエストを判定して、 +// 適正な応答文字列を作成します +//引数 :_argv[0] イベント名 +//------------------------------------------------------------------------------ +SHIORI3FW.MakeEmptyResponse +{ + case _argv[0] { + when 'OnFirstBoot', 'OnGhostChanged' { + _evt = SHIORI3FW.TranslateEvent('OnBoot') + if ISFUNC(_evt) { + //SSP側でフォールバックするのでここでは204を返す + "SHIORI/3.0 204 No Content%(C_CRLF)Charset: %(S_CHARSET)%(C_CRLF)" + } + else { + // OnBootハンドラもない時に、スコープ0/1の基本サーフィスを出す必要があるイベント + "SHIORI/3.0 200 OK%(C_CRLF)Sender: AYA%(C_CRLF)Charset: %(S_CHARSET)%(C_CRLF)/ + Value: \0\s[0]\1\s[10]\e%(C_CRLF)" + } + } + when 'OnBoot', 'OnWindowStateRestore' { + // スコープ0/1の基本サーフィスを出す必要があるイベント + "SHIORI/3.0 200 OK%(C_CRLF)Sender: AYA%(C_CRLF)Charset: %(S_CHARSET)%(C_CRLF)/ + Value: \0\s[0]\1\s[10]\e%(C_CRLF)" + } + when 'OnClose' { + // 終了指示を出す必要があるイベント + "SHIORI/3.0 200 OK%(C_CRLF)Sender: AYA%(C_CRLF)Charset: %(S_CHARSET)%(C_CRLF)/ + Value: \0\-\e%(C_CRLF)" + } + others { + // 上記以外では204を返送して良い + "SHIORI/3.0 204 No Content%(C_CRLF)Charset: %(S_CHARSET)%(C_CRLF)" + } + } +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.ResetAITalkInterval +//機能 :AIトーク発動処理カウンタのリセット +//引数 :_argv[0] スクリプトの長さ もしくは初期化時-1 +//------------------------------------------------------------------------------ +SHIORI3FW.ResetAITalkInterval +{ + SHIORI3FW.LastAITalkTime = GETSECCOUNT + if _argv[0] != 0 { + SHIORI3FW.IsSurfaceRestoreComplete = 0 + } + SHIORI3FW.IsAITalkComplete = 0 +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.ControlAITalk +//機能 :AIトーク発動処理、変数データの自動保存処理 +//引数 :_argv[0] イベント名 +//------------------------------------------------------------------------------ +SHIORI3FW.ControlAITalk +{ + _return_value = _argv[0] + + if TOINT(reference[3]) {//喋れる + if SHIORI3FW.DelayEventTime { + SHIORI3FW.DelayEventTime-- + + if SHIORI3FW.DelayEventTime <= 0 { + _return_value = SHIORI3FW.DelayEvent + if ARRAYSIZE(SHIORI3FW.DelayEventReference) { + reference = SHIORI3FW.DelayEventReference + } + } + } + if aitalkinterval > 0 {// トーク間隔が非0 + _sec = GETSECCOUNT + _diff = _sec - SHIORI3FW.LastAITalkTime + if _diff >= aitalkinterval {// トーク間隔の設定時間を越えた + if SHIORI3FW.CanTalk { + if (_sec - SHIORI3FW.LastTalkTime) >= 6 { + if (_sec - SHIORI3FW.TalkEndTime) >= 6 { + if SHIORI3FW.IsAITalkComplete == 0 { + _return_value = 'OnAITalkNewEvent' + SHIORI3FW.IsAITalkComplete = 1 + } + } + } + } + } + elseif _diff == (aitalkinterval*2/3) {//2/3でSurfaceRestore + if SHIORI3FW.CanTalk { + if (_sec - SHIORI3FW.LastTalkTime) >= 4 { + if (_sec - SHIORI3FW.TalkEndTime) >= 2 { + if SHIORI3FW.IsSurfaceRestoreComplete == 0 { + _return_value = 'OnSHIORI3FW.SurfaceRestore' + SHIORI3FW.IsSurfaceRestoreComplete = 1 + } + } + } + } + } + } + } + + SHIORI3FW.SaveVarCount++ + if SHIORI3FW.SaveVarCount > 1800 { + SHIORI3FW.SaveVarCount = 0 + SAVEVAR + } + + _return_value +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.SetDelayEvent/GetDelayEvent +//機能 :「遅れて喋る」イベントの登録/取得 +//引数 :_argv[0] イベント _argv[1] 遅れsec. +//------------------------------------------------------------------------------ + +SHIORI3FW.SetDelayEvent : void +{ + if STRLEN(_argv[0]) != 0 && _argv[1] { + SHIORI3FW.DelayEventTime = TOINT(_argv[1]) + SHIORI3FW.DelayEvent = _argv[0] + SHIORI3FW.DelayEventReference = _argv[2,100]//範囲外は削られるのでこれでOK + } + else { + SHIORI3FW.DelayEventTime = 0 + SHIORI3FW.DelayEvent = '' + SHIORI3FW.DelayEventReference = IARRAY + } +} + +SHIORI3FW.GetDelayEvent +{ + (SHIORI3FW.DelayEvent,SHIORI3FW.DelayEventTime,SHIORI3FW.DelayEventReference) +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.MakeReferenceAndPassThruInsVariable +//機能 :Reference*ヘッダからreference*変数/PassThru_Ins.*変数を作成します +//------------------------------------------------------------------------------ +SHIORI3FW.MakeReferenceAndPassThruInsVariable : void { + SHIORI3FW.ReferenceList = IARRAY + SHIORI3FW.PassThru_Ins_List = IARRAY + reference = IARRAY + reference.raw = IARRAY + _sz = ARRAYSIZE(var.req.key) + + for _i = 0; _i < _sz; _i++ { + if SUBSTR(_keyname = var.req.key[_i], 0, 9) == 'Reference' { + _refnum = TOINT(SUBSTR(_keyname, 9, 3)) + _value = var.req.value[_i] + reference[_refnum] = _value + reference.raw[_refnum] = var.req.rawvalue[_i] + + if SHIORI3FW.REF_ACCEL==0 {//1にすると高速化 + _varname = 'reference'+_refnum + LETTONAME(_varname, _value) + SHIORI3FW.ReferenceList ,= _varname + } + } + elseif SUBSTR(_keyname = var.req.key[_i], 0, 16) == 'X-SSTP-PassThru-' { + _PassThru_Ins_Name = SUBSTR(_keyname, 9, STRLEN(_keyname)) + _value = var.req.value[_i] + + _varname = 'PassThru_Ins.'+_PassThru_Ins_Name + LETTONAME(_varname, _value) + SHIORI3FW.PassThru_Ins_List ,= _varname + } + } +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.ClearReferenceAndPassThruInsVariable +//機能 :reference*&PassThru_Ins.*変数を削除します +//------------------------------------------------------------------------------ +SHIORI3FW.ClearReferenceAndPassThruInsVariable : void { + foreach SHIORI3FW.ReferenceList; _refname { ERASEVAR(_refname) } + ERASEVAR('SHIORI3FW.ReferenceList') + ERASEVAR('reference','reference.raw') + foreach SHIORI3FW.PassThru_Ins_List; _refname { ERASEVAR(_refname) } + ERASEVAR('SHIORI3FW.PassThru_Ins_List') +} + +//****************************************************************************** +//チェイン制御 +//****************************************************************************** +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.InitChain +//機能 :初期化 +//------------------------------------------------------------------------------ +SHIORI3FW.InitChain +{ + CHAIN.IDName = '' + CHAIN.Script = '' + CHAIN.Index = 0 +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.StartChainTalk +//機能 :チェイン情報を解析してチェイン処理を開始します +//引数 :_argv[0] イベントID +//------------------------------------------------------------------------------ +SHIORI3FW.StartChainTalk +{ + // チェイン名が無いなら何もしない + if _argv[0] == ''; return + + // チェイン強制終了処理 + if _argv[0] == 'end' { + SHIORI3FW.EndChainTalk + } + // 新たにチェイン開始 + else { + CHAIN.IDName = _argv[0] + CHAIN.Script = '' + CHAIN.Index = 0 + CHAIN.StartTime = GETSECCOUNT + } +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.StartChainTalkScriptDirect +//機能 :直接次のチェインのスクリプトを指定します +//引数 :_argv[0] スクリプト +//------------------------------------------------------------------------------ +SHIORI3FW.StartChainTalkScriptDirect +{ + // チェイン強制終了処理 + if _argv[0] == '' { + SHIORI3FW.EndChainTalk + } + // 新たにチェイン開始 + else { + CHAIN.IDName = '' + CHAIN.Script = _argv[0] + CHAIN.Index = 0 + CHAIN.StartTime = GETSECCOUNT + } +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.IsChain +//機能 :チェイン中かどうかを返します +//------------------------------------------------------------------------------ +SHIORI3FW.IsChain +{ + if CHAIN.Script != '' { + 1 + return + } + if CHAIN.IDName != '' { + 1 + return + } + 0 + return +} + +//------------------------------------------------------------------------------ +//関数名:ChainTalk +//機能 :チェイン処理 SHIORI3EV.OnAITalkNewEventから実行されます +//------------------------------------------------------------------------------ +ChainTalk +{ + if CHAIN.IDName != '' { + _res = EVAL(CHAIN.IDName) + if _res != '' { + _res + return + } + } + + if CHAIN.Script != '' { + _res = CHAIN.Script + CHAIN.Script = '' + _res + return + } + + SHIORI3FW.EndChainTalk + RandomTalk +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.EndChainTalk +//機能 :チェインを終了します +//------------------------------------------------------------------------------ +SHIORI3FW.EndChainTalk +{ + CHAIN.IDName = '' + CHAIN.Script = '' + CHAIN.StartTime = 0 +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.ChainTime +//機能 :チェイン中の時間を取得します +//------------------------------------------------------------------------------ +SHIORI3FW.ChainTime +{ + if CHAIN.StartTime { + GETSECCOUNT - TOINT(CHAIN.StartTime) + } + else { + 0 + } +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.ClearChainVariable +//機能 :チェイン制御用の変数を消去します +//------------------------------------------------------------------------------ +SHIORI3FW.ClearChainVariable +{ + ERASEVAR('CHAIN.IDName') + ERASEVAR('CHAIN.Index' ) + ERASEVAR('CHAIN.Script' ) + ERASEVAR('CHAIN.StartTime' ) +} + +//****************************************************************************** +//ネットワーク更新後にできた dl2 ファイルに関する処置 +//****************************************************************************** +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.Dl2ToDll +//機能 :処理の開始 +//------------------------------------------------------------------------------ +SHIORI3FW.Dl2ToDll +{ + SHIORI3FW.ExecuteDl2ToDll('') +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.ExecuteDl2ToDll +//機能 :指定したディレクトリに存在するdl2を処理 +//引数 :_argv[0] 処理対象パス(AYA dllからの相対パス指定) +//------------------------------------------------------------------------------ +SHIORI3FW.ExecuteDl2ToDll +{ + // 指定ディレクトリ内のファイルを列挙 + _files = TOLOWER(FENUM(_argv[0])) + // 拡張子dl2のファイルをリストに蓄積する 子ディレクトリ内も再帰的に処理する + _targets = IARRAY + foreach _files; _file { + if SUBSTR(_file, 0, 1) == '\' + SHIORI3FW.ExecuteDl2ToDll(_argv[0] + _file) + else { + _s_path = SPLITPATH(_file) + if _s_path[3] == '.dl2' + _targets ,= _s_path[2] + } + } + + // 拡張子dl2をdllへ名前変更する 旧dllは消去する + foreach _targets; _target { + _path = _argv[0] + '\' + _target + void FDEL(_path + '.dll') + void FRENAME(_path + '.dl2', _path + '.dll') + } +} + +//****************************************************************************** +//インストール済ゴーストリストの構築 +//****************************************************************************** +//------------------------------------------------------------------------------ +//関数名:On_installedghostname/sakuraname/keroname +//機能 :インストール済ゴースト名通知イベント +//------------------------------------------------------------------------------ +On_installedsakuraname { + SHIORI3FW.BasewareNotifysInstalledSakuraName=1 + + installedsakuralist = reference.raw +} + +On_installedkeroname { + SHIORI3FW.BasewareNotifysInstalledKeroName=1 + + installedkerolist = reference.raw +} + +On_installedghostname { + //Referenceから取得 + installedghostlist = reference.raw + + if SHIORI3FW.BasewareNotifysInstalledSakuraName && SHIORI3FW.BasewareNotifysInstalledKeroName { + return + } + + + // materia、もしくはイベントからの取得が指示されていなければファイル走査で取得する処理を実行 + if basewarename == 'embryo' || !SHIORI3FW.IGLIST_ACCEL { + installedsakuralist = IARRAY + installedkerolist = IARRAY + installedghostlist = IARRAY + + SHIORI3FW.StructInstalledGhostList + } +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.StructInstalledGhostList +//機能 :構築 +//------------------------------------------------------------------------------ +SHIORI3FW.StructInstalledGhostList +{ + if !SHIORI3FW.IGLIST_MAX; return + + // ghostディレクトリ配下のディレクトリを抽出 + _filelist = FENUM('..\..\..') + _dirlist = IARRAY + foreach _filelist; _file { + if '\' _in_ _file; _dirlist ,= _file + } + _dirnum = ARRAYSIZE(_dirlist) + + // 取得開始位置と取得数を求める + _num = 0 + if SHIORI3FW.IGLIST_MAX == -1 { + StructGhostList.Index = 0 + _num = _dirnum + } + else { + if GETTYPE(StructGhostList.Index) != 1 || StructGhostList.Index >= _dirnum + StructGhostList.Index = 0 + _num = SHIORI3FW.IGLIST_MAX + if _num > _dirnum; _num = _dirnum + } + + // リスト作成主処理 + for _i = 0; _i < _num; _i++ { + // 取得位置の更新 + StructGhostList.Index++ + + if StructGhostList.Index >= _dirnum; StructGhostList.Index = 0 + + // descript.txtから情報取得 + _ghostname = SHIORI3FW.GetGhostNameFromDescriptTxt(/ + '..\..\..' + _dirlist[StructGhostList.Index]) + // リストへ追加 + if ARRAYSIZE(_ghostname) { + installedghostlist ,= _ghostname[0] + installedsakuralist ,= _ghostname[1] + installedkerolist ,= _ghostname[2] + } + } +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.GetGhostNameFromDescriptTxt +//機能 :descript.txtからname/sakura.name/kero.nameを取得します +//引数 :_argv[0] 取得対象のゴーストディレクトリ +//------------------------------------------------------------------------------ +SHIORI3FW.GetGhostNameFromDescriptTxt +{ + _charset = SHIORI3FW.GetCharsetFromDescriptTxt(_argv[0]) + if _charset == '' + _charset = 'Shift_JIS' + FCHARSET(_charset) + if !FOPEN(_filename = "%(_argv[0])\ghost\master\descript.txt", 'r') + return + + _ghostname = IARRAY + _flag = 0 + while _flag != 7 { + if (_line = FREAD(_filename)) == -1; break + + case CUTSPACE(_line[0]) { + when 'name' { + _ghostname[0] = CUTSPACE(_line[1]) + _flag++ + } + when 'sakura.name' { + _ghostname[1] = CUTSPACE(_line[1]) + _flag += 2 + } + when 'kero.name' { + _ghostname[2] = CUTSPACE(_line[1]) + _flag += 4 + } + } + } + + FCLOSE(_filename) + _ghostname +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.GetCharsetFromDescriptTxt +//機能 :descript.txtからcharsetを取得します +//引数 :_argv[0] 取得対象のゴーストディレクトリ +//------------------------------------------------------------------------------ +SHIORI3FW.GetCharsetFromDescriptTxt +{ + if !FOPEN(_filename = "%(_argv[0])\ghost\master\descript.txt", 'r') + return + + _charset = '' + _flag = 0 + while _flag != 1 { + if (_line = FREAD(_filename)) == -1; break + + case TOLOWER(CUTSPACE(_line[0])) { + when 'charset' { + _charset = CUTSPACE(_line[1]) + _flag++ + } + } + } + + FCLOSE(_filename) + _charset +} + +//****************************************************************************** +//文 version 3 システム関数 / システム変数の補完 +//FUNCTIONEX / SAORI +//****************************************************************************** +//------------------------------------------------------------------------------ +//関数名:FUNCTIONLOAD +//機能 :SAORIを読み込みます +//引数 :_argv[0]  対象DLL名 +//------------------------------------------------------------------------------ +FUNCTIONLOAD +{ + // load エラーなら抜ける 初回のloadならGET Versionを送出する + _r_load = LOADLIB(_argv[0]) + if !_r_load { + 0 + return + } + if _r_load == 1 { + if SUBSTR(SHIORI3FW.SendGETVersion(_argv[0]), 0, 1) != '2' { + UNLOADLIB(_argv[0]) + 0 + return + } + // 相手のCharsetに合わせる + _i = 0 + foreach var.lib.key; _key { + if _key == 'Charset' { + void CHARSETLIBEX(_argv[0], var.lib.value[_i]) + break + } + _i++ + } + SAORI.DllList ,= _argv[0] + } + 1 +} + +//------------------------------------------------------------------------------ +//関数名:FUNCTIONEX +//機能 :SAORIを実行します +//引数 :_argv[0]  対象DLL名 +//    _argv[1]~ Argument0~ +//------------------------------------------------------------------------------ +FUNCTIONEX +{ + if FUNCTIONLOAD(_argv[0]) == 0 { + 0 + return + } + + // リクエスト文字列を作成 + _reqheader = / + "EXECUTE SAORI/1.0%(C_CRLF)Charset: %(CHARSETLIBEX(_argv[0]))%(C_CRLF)Sender: AYA%(C_CRLF)SecurityLevel: local%(C_CRLF)" + for _i = 1; _i < _argc; _i++ { + _reqheader += "Argument%(_i - 1): %(_argv[_i])%(C_CRLF)" + } + _reqheader += C_CRLF + + // 実行 + SHIORI3FW.RequestLib(_argv[0], _reqheader) + + if var.lib.result != '' + var.lib.result + SHIORI3FW.MakeValueexVariable +} + +//------------------------------------------------------------------------------ +//関数名:SAORI +//機能 :SAORIを実行します +// FUNCTIONEXのシノニム。一段下駄が入る分FUNCTIONEXより低速になりますが、 +// 気にするほどではありません。 +//------------------------------------------------------------------------------ +SAORI { FUNCTIONEX(_argv) } + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.SendGETVersion +//機能 :SAORIへGET Versionを送出します +//引数 :_argv[0] SAORIファイル名 +//------------------------------------------------------------------------------ +SHIORI3FW.SendGETVersion +{ + SHIORI3FW.RequestLib(_argv[0], "GET Version SAORI/1.0%(C_CRLF)Charset: %(CHARSETLIBEX(_argv[0]))%(C_CRLF)Sender: AYA%(C_CRLF2)") + + LIB.STATUSCODE +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.RequestLib +//機能 :SAORIへリクエストを送出し、結果を得ます +//引数 :_argv[0] SAORIファイル名 +//    _argv[1] リクエスト文字列 +//------------------------------------------------------------------------------ +SHIORI3FW.RequestLib +{ + LIB.PROTOCOL = '' + LIB.STATUSCODE = '' + + // リクエスト送出 + _result = REQUESTLIB(_argv[0], _argv[1]) + + // 結果の解析 + + // 改行で分割 + _lines = RE_SPLIT(_result, C_CRLF) + + // プロトコル名と結果の取得 + _seppos = STRSTR(_lines[0], ' ', 0) + if _seppos == -1; return + LIB.PROTOCOL = SUBSTR(_lines[0], 0, _seppos) + LIB.STATUSCODE = SUBSTR(_lines[0], _seppos + 1, STRLEN(_lines[0]) - _seppos - 1) + + // レスポンスヘッダの取得 + var.lib.key = IARRAY + var.lib.value = IARRAY + var.lib.result = '' + + _skip = 1 + foreach _lines; _lin { + // 1行目は飛ばす + if _skip { + _skip = 0 + continue + } + + // キーと値を取得 + _len = STRLEN(_lin) + _pos = STRSTR(_lin, ': ', 0) + var.lib.key ,= (_key = SUBSTR(_lin, 0, _pos)) + _value = SUBSTR(_lin, _pos + 2, _len - _pos - 2) + _valuecv = '' + + if var.lib.key == '' { + break + } + + if SHIORI3FW.AUTO_DATA_CONVERT { + if ISINTSTR(_value) + _valuecv = TOINT(_value) + elseif ISREALSTR(_value) + _valuecv = TOREAL(_value) + else + _valuecv = REPLACE(_value, C_BYTE1, ',') + } + else { + _valuecv = TOAUTOEX(_value) + } + + var.lib.value ,= _valuecv + if _key == 'Result' { + var.lib.result = _valuecv + } + } +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.MakeValueexVariable +//機能 :リクエストヘッダからvalueex*変数を作成します +//------------------------------------------------------------------------------ +SHIORI3FW.MakeValueexVariable +{ + SHIORI3FW.ClearValueexVariable + valueex = IARRAY + _sz = ARRAYSIZE(var.lib.key) + for _i = 0; _i < _sz; _i++ { + if SUBSTR(_keyname = var.lib.key[_i], 0, 5) == 'Value' { + _varname = "valueex%(SUBSTR(_keyname, 5, 3))" + LETTONAME(_varname, var.lib.value[_i]) + valueex[TOINT(SUBSTR(_keyname, 5, 3))] = var.lib.value[_i] + } + } +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.ClearValueexVariable +//機能 :valueex*変数を削除します +//------------------------------------------------------------------------------ +SHIORI3FW.ClearValueexVariable +{ + _valueexList = GETVARLIST('valueex') + foreach _valueexList; _exname { + if RE_MATCH(_exname, 'valueex[0-9]+') { + ERASEVAR(_exname) + } + } + ERASEVAR('valueex') +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.SaoriUnloadAll +//機能 :ロードされているSAORIをすべてunloadします +//------------------------------------------------------------------------------ +SHIORI3FW.SaoriUnloadAll +{ + foreach SAORI.DllList; _saori { UNLOADLIB(_saori) } + + SAORI.DllList = IARRAY +} + +//------------------------------------------------------------------------------ +//関数名:SHIORI3FW.RegisterTempVar +//機能 :終了時に削除するグローバル変数を登録します。 +//------------------------------------------------------------------------------ +SHIORI3FW.RegisterTempVar +{ + for _i = 0 ; _i < _argc ; _i++ { + if ASEARCH(_argv[_i],SHIORI3FW.tempvarname) < 0 { + SHIORI3FW.tempvarname ,= _argv[_i] + } + } +} + +//------------------------------------------------------------------------------ +// 関数名:SHIORI3FW.RemoveAllTags +// 機能 :全てのさくらスクリプトタグを消去する。 +// 引数 :argv0=テキスト +//------------------------------------------------------------------------------ +SHIORI3FW.RemoveAllTags +{ + _text = RE_REPLACE(_argv[0],'\\_{0,2}[a-zA-Z0-9*!&\-+](\d|\[("([^"]|\\")+?"|([^\]]|\\\])+?)+?\])?','') + _text = REPLACE(_text,'\\','\') + _text +} + +//------------------------------------------------------------------------------ +// 関数名:SHIORI3FW.CanTalk +// 機能 :Statusヘッダからしゃべれるかどうかを判定する +//------------------------------------------------------------------------------ +SHIORI3FW.CanTalk +{ + if 'talking' _in_ status { + 0 + return + } + if 'choosing' _in_ status { + 0 + return + } + if 'minimizing' _in_ status { + 0 + return + } + if 'timecritical' _in_ status { + 0 + return + } + + 1 + return +} + +//****************************************************************************** +//配列操作 +//****************************************************************************** +JOIN +{ + if _argc <= 2 { + _argv[0] + return + } + + _delim = _argv[_argc - 1] + _argc-- + + _text = _argv[0] + for _i = 1 ; _i < _argc ; _i++ { + _text += _delim + _text += _argv[_i] + } + _text +} + +REVERSE +{ + _a = IARRAY + for _i = 0 ; _i < _argc ; _i++ { + _a ,= _argv[_argc-_i-1] + } + _a +} + +UNIQUE +{ + ARRAYDEDUP(_argv) +} + +SPLITEX +{ + _a = SPLIT(_argv) + _n = ARRAYSIZE(_a) + for _i = _n-1 ; _i >= 0 ; _i-- { + if _a[_i] == '' { + _a[_i] = IARRAY + } + } + _a +} + +MAX +{ + _v = _argv[0] + for _i = 1 ; _i < _argc ; _i++ { + if _v < _argv[_i] { + _v = _argv[_i] + } + } + _v +} + +MIN +{ + _v = _argv[0] + for _i = 1 ; _i < _argc ; _i++ { + if _v > _argv[_i] { + _v = _argv[_i] + } + } + _v +} + +AVERAGE +{ + _v = 0 + for _i = 0 ; _i < _argc ; _i++ { + _v += _argv[_i] + } + _v / _argc +} + +//****************************************************************************** +// システムで処理するイベント群 +//****************************************************************************** +SHIORI3EV.OnUpdateComplete : void +{ + // OnUpdateCompleteならdl2を探す。存在したら同名のdllを削除、dl2はdllにリネームする + // もっともAYA自身が対象だった場合はどうしようもないが。 + SHIORI3FW.Dl2ToDll +} + +SHIORI3EV.OnSurfaceChange : void +{ + if reference[2] != '' { + _r2 = SPLIT(reference[2],',') + _s = TOINT(_r2[1]) + _c = TOINT(_r2[0]) + + if _s >= 0 { + SHIORI3FW.LastSurface[_c] = _s + SHIORI3FW.IsVisible[_c] = 1 + } + else { + SHIORI3FW.IsVisible[_c] = 0 + } + } + else { + _s0 = TOINT(reference[0]) + _s1 = TOINT(reference[1]) + + if _s0 >= 0 { + SHIORI3FW.LastSurface[0] = _s0 + SHIORI3FW.IsVisible[0] = 1 + } + else { + SHIORI3FW.IsVisible[0] = 0 + } + + if _s1 >= 0 { + SHIORI3FW.LastSurface[1] = _s1 + SHIORI3FW.IsVisible[1] = 1 + } + else { + SHIORI3FW.IsVisible[1] = 0 + } + } +} + +SHIORI3EV.On_hwnd : void +{ + SHIORI3FW.HWnd = RE_SPLIT(reference[0],'[\x1,]') + SHIORI3FW.BalloonHWnd = RE_SPLIT(reference[1],'[\x1,]') + + _m = ARRAYSIZE(SHIORI3FW.HWndOld) + _n = ARRAYSIZE(SHIORI3FW.HWnd) + + if _n < _m { + _n = _m + } + + for _i = 0 ; _i < _n ; _i++ { + SHIORI3FW.HWnd[_i] = TOINT(SHIORI3FW.HWnd[_i]) + SHIORI3FW.HWndOld[_i] = TOINT(SHIORI3FW.HWndOld[_i]) + } + + _refold = reference + _refold0 = reference0 + + for _i = 0 ; _i < _n ; _i++ { + if SHIORI3FW.HWndOld[_i] != SHIORI3FW.HWnd[_i] { + reference[0] = _i + reference0 = _i + + if SHIORI3FW.HWndOld[_i] == 0 { + void EVAL('OnSHIORI3FW.WindowCreate') + } + elseif SHIORI3FW.HWnd[_i] == 0 { + void EVAL('OnSHIORI3FW.WindowDestroy') + } + + SHIORI3FW.HWndOld[_i] = SHIORI3FW.HWnd[_i] + } + } + + reference = _refold + reference0 = _refold0 +} + +SHIORI3EV.On_uniqueid : void +{ + SHIORI3FW.UniqueID = reference[0] +} + +SHIORI3EV.On_capability : void +{ + SHIORI3FW.Capability = reference +} + +SHIORI3EV.OnNotifySelfInfo : void +{ + SHIORI3FW.GhostName = reference[0] + SHIORI3FW.ShellNameOld = SHIORI3FW.ShellName + SHIORI3FW.ShellName = reference[3] + SHIORI3FW.ShellPath = reference[4] + SHIORI3FW.BalloonNameOld = SHIORI3FW.BalloonName + SHIORI3FW.BalloonName = reference[5] + SHIORI3FW.BalloonPath = reference[6] + + selfname = reference[1] + sakuraname = reference[1] + keroname = reference[2] + + EVAL('OnSHIORI3FW.ChangeSelfInfo') +} + +SHIORI3EV.OnNotifyUserInfo : void +{ + SHIORI3FW.UserName = reference[0] + SHIORI3FW.UserNameFull = reference[1] + SHIORI3FW.UserBirthday = SPLIT(reference[2],',',3) + for _i = 0 ; _i < 3 ; _i++ { + SHIORI3FW.UserBirthday[_i] = TOINT(SHIORI3FW.UserBirthday[_i]) + } + SHIORI3FW.UserSex = reference[3] +} + +SHIORI3EV.OnShellChanged : void +{ + SHIORI3FW.ShellName = reference[0] + SHIORI3FW.ShellPath = reference[2] + + EVAL('OnSHIORI3FW.ChangeSelfInfo') +} + +SHIORI3EV.OnBalloonChange : void +{ + SHIORI3FW.BalloonName = reference[0] + SHIORI3FW.BalloonPath = reference[1] + + EVAL('OnSHIORI3FW.ChangeSelfInfo') +} + +//------------------------------------------------------------------------------ +//OnAITalkNewEvent +//------------------------------------------------------------------------------ +SHIORI3EV.OnAITalkNewEvent +{ + if RAND(100) < communicateratio + { + //---- communicateratio % の率で他ゴーストへ話しかけ + if ISFUNC('StartCommunicate') { + StartCommunicate + return + } + //else: ? + } + //互換用処理 + _old_name = SHIORI3FW.TranslateEvent('OnAiTalk') + if ISFUNC(_old_name) { + EVAL(_old_name) + return + } + _old_name = SHIORI3FW.TranslateEvent('OnAITalk') + if ISFUNC(_old_name) { + EVAL(_old_name) + return + } + + //---- 通常のランダムトーク、ただしチェイン中はチェイントーク + if SHIORI3FW.IsChain { + ChainTalk + } + else { + RandomTalk + } +} + +//---- SHIORI 関連情報 ------------------------------------------------------------------ +SHIORI3EV.On_version +{ + GETSETTING('coreinfo.version') +} + +SHIORI3EV.On_craftman +{ + GETSETTING('coreinfo.author') +} + +SHIORI3EV.On_craftmanw +{ + GETSETTING('coreinfo.author') +} + +SHIORI3EV.On_name +{ + GETSETTING('coreinfo.name') +} + +//---- tama対応 ------------------------------------------------------------------ +SHIORI3EV.On_tamaOpen +{ + SHIORI3FW.TamaHwnd = reference[0] + SETTAMAHWND(SHIORI3FW.TamaHwnd) +} + +SHIORI3EV.On_tamaExit +{ + ERASEVAR('SHIORI3FW.TamaHwnd') + SETTAMAHWND(0) +} + +SHIORI3EV.OnInitialize +{ + if reference[0] == 'reload' { + SETTAMAHWND(SHIORI3FW.TamaHwnd) + } +} + +//****************************************************************************** +// デバッグ +//****************************************************************************** +SHIORI3EV.On_enable_log : void +{ + if TOINT(reference[0]) { + SETSETTING('log','yaya_ssp_debug.log') + } + else { + SETSETTING('log','') + } +} + +SHIORI3EV.On_log_path +{ + SHIORI3FW.Path + 'yaya_ssp_debug.log' +} + +SHIORI3EV.On_enable_debug : void +{ + SHIORI3FW.DebugMode = TOINT(reference[0]) +} + +SHIORI3EV.On_ShioriEcho +{ + if ISFUNC('On_ShioriEcho') {//User costom ShioriEcho + EVAL('On_ShioriEcho') + } + elseif SHIORI3FW.DebugMode { + _result=EVAL(reference[0]) + '\0Eval Result = ' + JOIN(_result,',') + SHIORI3FW.Push_X_SSTP_PassThru('Result',_result) + SHIORI3FW.Push_X_SSTP_PassThru('Type','id: '+GETTYPEEX('_result')) + } + else { + '\0Need DebugMode' + SHIORI3FW.Push_X_SSTP_PassThru('Special','Need DebugMode') + } +} + +SHIORI3EV.On_Has_Event : void { + _event_name=reference.raw[0] + _SecurityLevel=reference.raw[1] + if !_SecurityLevel + _SecurityLevel=SHIORI3FW.SecurityLevel + if SUBSTR(_event_name,0,2) != 'On' + _event_name='On_'+_event_name + _result=0 + if TOLOWER(_SecurityLevel) == 'external' + _event_name='ExternalEvent.'+_event_name + _result=ISFUNC(_event_name) + if !_result + _result=ISFUNC('SHIORI3EV.'+_event_name) + SHIORI3FW.Push_X_SSTP_PassThru('Result',_result) +} +SHIORI3EV.ExternalEvent.On_Has_Event{ + SHIORI3EV.On_Has_Event +} +SHIORI3EV.On_Get_Supported_Events: void { + _L=GETFUNCLIST('On') + _base_local_event_funcs=IARRAY + foreach _L;_func{ + if SUBSTR(_func,2,1) == '_' + _func=SUBSTR(_func,3,STRLEN(_func)) + _base_local_event_funcs,=_func + } + _L=GETFUNCLIST('SHIORI3EV.On') + foreach _L;_func{ + _func=SUBSTR(_func,10,STRLEN(_func)) + if SUBSTR(_func,2,1) == '_' + _func=SUBSTR(_func,3,STRLEN(_func)) + _base_local_event_funcs,=_func + } + SHIORI3FW.Push_X_SSTP_PassThru('local',ARRAYDEDUP(_base_local_event_funcs)) + _L=GETFUNCLIST('ExternalEvent.On') + _base_external_event_funcs=IARRAY + foreach _L;_func{ + _func=SUBSTR(_func,14,STRLEN(_func)) + if SUBSTR(_func,2,1) == '_' + _func=SUBSTR(_func,3,STRLEN(_func)) + _base_external_event_funcs,=_func + } + _L=GETFUNCLIST('SHIORI3EV.ExternalEvent.On') + foreach _L;_func{ + _func=SUBSTR(_func,24,STRLEN(_func)) + if SUBSTR(_func,2,1) == '_' + _func=SUBSTR(_func,3,STRLEN(_func)) + _base_external_event_funcs,=_func + } + SHIORI3FW.Push_X_SSTP_PassThru('external',ARRAYDEDUP(_base_external_event_funcs)) +} +SHIORI3EV.ExternalEvent.On_Get_Supported_Events{ + SHIORI3EV.On_Get_Supported_Events +} + +DUMP : void +{ + void FOPEN('dump.txt','ab') + void FWRITE('dump.txt',JOIN(_argv,',') + C_CRLF) + void FCLOSE('dump.txt') +} + +//****************************************************************************** +// 時刻系変数 +//****************************************************************************** +year { GETTIME[0] } +month { GETTIME[1] } +day { GETTIME[2] } +weekday { GETTIME[3] } +hour { GETTIME[4] } +ampm { hour / 12 } +hour12 { hour % 12 } +hour12ex{ if hour12 == 0; 12 ; else ; hour12 } +minute { GETTIME[5] } +second { GETTIME[6] } + +systemuptickcount { GETTICKCOUNT } +systemuptime +{ + _highcount = GETTICKCOUNT(1) + if _highcount > 1 + GETTICKCOUNT/1000 + else + (_highcount*0x40000000 + (GETTICKCOUNT/2))/500 +} + +systemupsecond { SHIORI3FW.GetTickInfo[3] } +systemupminute { SHIORI3FW.GetTickInfo[1] } +systemuphour { SHIORI3FW.GetTickInfo[2] } + +SHIORI3FW.GetTickInfo +{ + _result = (IARRAY, systemuptime) + _result ,= _result[0]/60 + _result ,= _result[1]/60 + _result ,= _result[0] - _result[1]*60 + _result[1] -= _result[2]*60 + + _result +} + +ghostupmin +{ + if ISVAR('ghostbootmin') { + (GETSECCOUNT / 60) - ghostbootmin + } + else { + 0 + } +} + +ghostupmin_total +{ + ghostupmin_last + ghostupmin +} + +//****************************************************************************** +// メモリ系変数 +//****************************************************************************** +memoryload { GETMEMINFO[0] } +memorytotalphys { GETMEMINFO[1] } +memoryavailphys { GETMEMINFO[2] } +memorytotalvirtual { GETMEMINFO[3] } +memoryavailvirtual { GETMEMINFO[4] } + diff --git a/ghost/master/img/menu_background.png b/ghost/master/img/menu_background.png new file mode 100644 index 0000000..04c4e24 Binary files /dev/null and b/ghost/master/img/menu_background.png differ diff --git a/ghost/master/img/menu_foreground.png b/ghost/master/img/menu_foreground.png new file mode 100644 index 0000000..7b807c0 Binary files /dev/null and b/ghost/master/img/menu_foreground.png differ diff --git a/ghost/master/img/menu_sidebar.png b/ghost/master/img/menu_sidebar.png new file mode 100644 index 0000000..30f881a Binary files /dev/null and b/ghost/master/img/menu_sidebar.png differ diff --git a/ghost/master/readme-original.txt b/ghost/master/readme-original.txt new file mode 100644 index 0000000..c013da1 --- /dev/null +++ b/ghost/master/readme-original.txt @@ -0,0 +1,20 @@ +---------------- +文 +---------------- + +20050623 +文 version 5.8 + +---------------- + +使途を限定せず自由に利用することが出来ます。 + +配布パッケージに含まれているすべてのファイルを自由に取り扱うことが出来ます。 +一部のファイル、もしくはそのファイルの内容の一部を抜き出して、他の構成に含めてもかまいません。 +このプログラムを使用した結果、あなたに何らかの損害が発生しても、その責任を作者は負いません。 + +ソースコードを改変して自由に異版を作成し、配布することが出来ます。 +その際、配布者はその意志に基づいたライセンスを独自に策定し配布物に適用することが出来ます。 + +---------------- +author : umeici diff --git a/ghost/master/readme.txt b/ghost/master/readme.txt new file mode 100644 index 0000000..f9fda6a --- /dev/null +++ b/ghost/master/readme.txt @@ -0,0 +1,43 @@ +Yet Another AYA - YAYA + +Copyright (c) 2007-, 整備班 +All rights reserved. +http://ms.shillest.net/ + +文字コード変換ライブラリ + バベル -babel- + http://tricklib.com/cxx/ex/babel/ + +正規表現ライブラリ + DEELX - Regular Expression Engine + http://www.regexlab.com/en/deelx/ + +---------------------------------------------------------------- +YAYAは、以下の2.で明記したライセンスに従って利用できます。 +ただし、「伺かゴースト」とその周辺プログラムに組み込んで利用する場合は、原著作者umeici氏に敬意を表して1.のライセンスを適用するものとします。 + +要するに、ゴーストやそれに関係するユーティリティに組み込んで使う場合は、まったく変化ありません。 + +---------------------------------------------------------------- +1.AYA Ver.5の元のライセンス + +使途を限定せず自由に利用することが出来ます。 + +配布パッケージに含まれているすべてのファイルを自由に取り扱うことが出来ます。 +一部のファイル、もしくはそのファイルの内容の一部を抜き出して、他の構成に含めてもかまいません。 +このプログラムを使用した結果、あなたに何らかの損害が発生しても、その責任を作者は負いません。 + +---------------------------------------------------------------- +2.修正BSDライセンス + +Copyright (c) 2007-, 整備班 +All rights reserved. +http://ms.shillest.net/ + +ソースコード形式かバイナリ形式か、変更するかしないかを問わず、以下の条件を満たす場合に限り、再頒布および使用が許可されます。 + +・ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、および下記免責条項を含めること。 +・バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の資料に、上記の著作権表示、本条件一覧、および下記免責条項を含めること。 +・書面による特別の許可なしに、本ソフトウェアから派生した製品の宣伝または販売促進に、「整備班」の名前または貢献者の名前を使用してはならない。 + +本ソフトウェアは、著作権者および貢献者によって「現状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、および特定の目的に対する適合性に関する暗黙の保証も含め、またそれに限定されない、いかなる保証もありません。著作権者も貢献者も、事由のいかんを問わず、 損害発生の原因いかんを問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その他の)不法行為であるかを問わず、仮にそのような損害が発生する可能性を知らされていたとしても、本ソフトウェアの使用によって発生した(代替品または代用サービスの調達、使用の喪失、データの喪失、利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害について、一切責任を負わないものとします。 diff --git a/ghost/master/system_config.txt b/ghost/master/system_config.txt new file mode 100644 index 0000000..9dd1ef0 --- /dev/null +++ b/ghost/master/system_config.txt @@ -0,0 +1,13 @@ +//------------------------------------------------------------------------------ +//システム辞書 +//------------------------------------------------------------------------------ +dicdir, dic/system // YAYA:システム辞書。必ず最初に指定すること。 + +//------------------------------------------------------------------------------ +//実行ログ +//実行ログをayame.logに記録します。開発時には記録しておいたほうが良いです。 +//------------------------------------------------------------------------------ +// log, ayame.log +ignoreiolog, ID: OnSecondChange //OnSecondChange無視 +iolog.filter.keyword, ID: OnMouse //OnMouse系無視 + diff --git a/ghost/master/weathericons-regular-webfont.ttf b/ghost/master/weathericons-regular-webfont.ttf new file mode 100644 index 0000000..948f0a5 Binary files /dev/null and b/ghost/master/weathericons-regular-webfont.ttf differ diff --git a/ghost/master/wtc_icon.ico b/ghost/master/wtc_icon.ico new file mode 100644 index 0000000..9669ba2 Binary files /dev/null and b/ghost/master/wtc_icon.ico differ diff --git a/ghost/master/yaya.dll b/ghost/master/yaya.dll new file mode 100644 index 0000000..b3da326 Binary files /dev/null and b/ghost/master/yaya.dll differ diff --git a/ghost/master/yaya.txt b/ghost/master/yaya.txt new file mode 100644 index 0000000..d71b8ed --- /dev/null +++ b/ghost/master/yaya.txt @@ -0,0 +1,51 @@ +//****************************************************************************** +// 文 ゴーストテンプレート +// yaya.txt (設定ファイル) +// original written by umeici. +// change by yaya develop team. +//****************************************************************************** + +//------------------------------------------------------------------------------ +//設定ファイルの文字コード(最初の最初) +//------------------------------------------------------------------------------ +charset.setting, UTF-8 //この設定ファイルの文字コード + +//------------------------------------------------------------------------------ +//システム辞書 +//------------------------------------------------------------------------------ +include, system_config.txt // YAYA:設定辞書。必ず最初に指定すること。 + +//------------------------------------------------------------------------------ +//文字コード設定 +//------------------------------------------------------------------------------ +charset.dic, UTF-8 // 辞書 +charset.output, UTF-8 // SHIORIのRequestでの入出力 +charset.file, UTF-8 // ファイル +charset.save, UTF-8 // セーブデータ +charset.save.old, UTF-8 // 文字コード指定のない旧セーブデータ形式の復帰時 +charset.extension, UTF-8 // SAORI入出力 + +//------------------------------------------------------------------------------ +//yaya as saori +//------------------------------------------------------------------------------ +dic, dic\module\yaya_iObj.aym +dic, dic\module\yaya_jsonRead.aym + +//------------------------------------------------------------------------------ +//以下は紺野ややめのテンプレート +//------------------------------------------------------------------------------ +dicdir, dic\normal + +//------------------------------------------------------------------------------ +//セーブファイル暗号化 +// onにするとセーブファイルを暗号化します。 +// 【注意】一度onにするとoffにしてもセーブファイルを削除するまで +// 暗号化のままになります! +//------------------------------------------------------------------------------ +// save.encode,on + +//------------------------------------------------------------------------------ +//ループの回数上限等 +//------------------------------------------------------------------------------ +//looplimit, 1000 +//fncdepth, 10 diff --git a/ghost/master/yaya_emerg.txt b/ghost/master/yaya_emerg.txt new file mode 100644 index 0000000..fba6cf8 --- /dev/null +++ b/ghost/master/yaya_emerg.txt @@ -0,0 +1,24 @@ +//****************************************************************************** +// 文 ゴーストテンプレート +// yaya_emerg.txt (緊急時設定ファイル) +// original written by umeici. +// change by yaya develop team. +//****************************************************************************** + +//------------------------------------------------------------------------------ +//文字コード設定 +//------------------------------------------------------------------------------ +charset.dic, UTF-8 // 辞書 +charset.output, UTF-8 // SHIORIのRequestでの入出力 +charset.file, UTF-8 // ファイル +charset.save, UTF-8 // セーブデータ +charset.save.old, UTF-8 // 文字コード指定のない旧セーブデータ形式の復帰時 +charset.extension, UTF-8 // SAORI入出力 + +//緊急時に必要な *最低限の* 辞書ファイルを記述すること。 +//基本的にはいじらないほうが良い。 + +include, system_config.txt // YAYA:設定辞書。必ず最初に指定すること。 + +dicdir, dic/emerg + diff --git a/install.txt b/install.txt new file mode 100644 index 0000000..5fac7f6 --- /dev/null +++ b/install.txt @@ -0,0 +1,6 @@ +charset,UTF-8 +type,ghost +name,WeatherTimeCapsule +directory,WeatherTimeCapsule_121VDeesjlPk +refresh,1 +balloon.directory,WeatherTimeCapsuleBalloon_121VDeesjlPk diff --git a/md5buildignore.txt b/md5buildignore.txt new file mode 100644 index 0000000..f2755a7 --- /dev/null +++ b/md5buildignore.txt @@ -0,0 +1,34 @@ +.git +.github +.gitignore +.gitmodules +readme.md +ReadMe.md +README.md +updates.txt +updates2.dau + +desktop.ini +thumbs.db +folder.htt +mscreate.dir +.DS_Store +_CATALOG.VIX + +profile/ +var/ +__MACOSX/ +XtraStuf.mac/ + + +/developer_options.txt +/md5buildignore.txt + +*.log + +/.github/ +/docs/ +LICENCE.md +ghost/master/satori_savedata.txt +ghost/master/satori_savebackup.txt +ghost/master/yaya_variable.cfg diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..6052b75 --- /dev/null +++ b/readme.txt @@ -0,0 +1,134 @@ +ゴースト「WeatherTimeCapsule」 +設定した座標と時刻の天気を表示します。 +データがある範囲でなら、過去の記録や予報の天気も取得できます。 + +メーターをつつくと表示・非表示が切り替わります。 +天気表示の右上の3本線から設定に移動します。 + +オフライン環境では何もできません。 +小さいバルーンでは表示が乱れます。 + +======================================= +連絡先 +======================================= +作者: ろすえん(lost_nd_xxx) +https://lnx.flop.jp/form/postmail.html + +======================================= +使用素材等 +======================================= +・シェル「master」「doodle」とバルーン「WeatherTimeCapsule専用バルーン」はゴースト作者が作成したものです。 + +--------------------------------------- +・SHIORIにYAYAを使用させていただいています。 +https://ms.shillest.net/yaya.xhtml + +--------------------------------------- +・ゴースト辞書テンプレートに「紺野ややめ」を使用させていただいています。 +https://ms.shillest.net/yayame.xhtml + +--------------------------------------- +・「jsonパーサ with オブジェクト風の何か @ YAYA as SAORI」を改造して使用させていただいています。 +https://c-lege.hacca.jp/ukgk/ukst.html + +--------------------------------------- +・天気情報は「Open-Meteo」のデータを使用させていただいています。 +https://open-meteo.com/ + +Open-MeteoはCC-BY 4.0ライセンスで公開されています。 +https://creativecommons.org/licenses/by/4.0/deed.ja + +非営利使用の情報取得は1日あたり10000件、1時間あたり5000件、1分あたり600件未満に制限されています。 +このため、ゴースト側で頻繁な情報取得は行えないようにしています。 +端末の設定時刻を能動的かつ頻繁に変更したり、ログなどからスクリプトを実行する事例はサポート外とします。 + +--------------------------------------- +・日本の県庁所在地の位置情報データのリストは国土地理院の情報を基にゴースト作者が作成しました。 +情報は2024/02/18時点のものです。 + +--------------------------------------- +・世界の国の首都名・位置情報データのリストに、イドケード様の作成されたデータを使用させていただいています。 +https://note.com/kentoide/n/n16354c4b3458 + +このデータセットはパブリックドメインで公開されています。 + +--------------------------------------- +・天気アイコンとして、フォント「Weather Icons」を使用させていただいています。 +https://erikflowers.github.io/weather-icons/ + +「Weather Icons」の天気アイコンはSIL Open Font License 1.1でライセンスされています。 +http://scripts.sil.org/OFL +ライセンス原文はルートフォルダにある「SIL_Open_Font_License_1_1.txt」で確認できます。 + +v1.0までのデザインはLukas Bischoff様によるものです。 +v1.1以降のデザインはErik Flowers様によるものです。 + + +======================================= +ゴーストの二次創作ガイドライン/ライセンス +======================================= +◆二次創作周りについて +[1.追加シェル、バルーン等を制作して配布される] +OK +バルーン名またはバルーンフォルダ名に「WeatherTimeCapsule」が含まれていると、 +ゴーストは色変更対応バルーンと見なした動作をします。 + +[2.二次創作をされる] +OK + +[3.性的又はグロテスクな表現を含む、閲覧に年齢制限の掛かる二次創作をされる] +NG + +[4.ゴースト本体の設定と大きくかけ離れた二次創作をされる] +OK + +[5.二次創作物の販売をされる] +NG + +[6.コミッションサービス等でゴーストに関連する創作物を依頼される] +NG + +◆ゴーストを始めとした、配布データの扱いについて +[1.ゴーストのダウンロードページ、又はアーカイブへ直接リンクされる] +OK + +[2.情報集積サイト等の外部サイトに登録される] +OK + +[3.公開中、又は配布終了したゴーストを再配布される(個人間でのやり取りを含む)] +NG + +[4.ゴーストの中身(辞書、シェル等)を改変した上で再配布](3がOKの人のみ回答) +NG + +[5.マスターシェルを素材とした追加シェルの制作/配布について] +NG + +◆その他 +[1.他ゴーストから切り替え反応を実装される] +OK + +[2.ゴーストに関する批判的な意見を言われる] +OK + +[3.ゴーストに関する要望を言われる] +OK + +[4.不特定多数の人が見る場でネタバレをされる] +OK + +[5.トークの引用、又は撮ったスクリーンショットを公開される] +以下を明記する場合のみOK +・出典がこのゴーストであること +・引用に天気情報が含まれる場合、その情報源がOpen-Meteoであること +  ・スクリーンショットの場合、バルーンにOpen-Meteoからの情報であることなどが出ているはずなので、それらを削らなければ問題なし +    ・小さいバルーンでは表示が乱れるため、文章などで明記してください + +[6.シェル、バルーン等の画像を(SNSアイコン等に)素材として使用される] +NG + +[7.ゴーストを動画内で配信される] +動画単体に収益の発生しない場合のみOK +以下を明記してください +・出典がこのゴーストであること +・引用に天気情報が含まれる場合、その情報源がOpen-Meteoであること diff --git a/shell/doodle/descript.txt b/shell/doodle/descript.txt new file mode 100644 index 0000000..84d68a7 --- /dev/null +++ b/shell/doodle/descript.txt @@ -0,0 +1,60 @@ +charset,UTF-8 +type,shell +name,doodle + +craftman,lost_nd_xxx +craftmanw,ろすえん +craftmanurl,https://lnx.flop.jp/ + +readme.charset,UTF-8 + +seriko.alignmenttodesktop,free +seriko.use_self_alpha,1 + +sakura.balloon.offsetx,-10 + +sakura.bindgroup100.name,枠色,黒 +sakura.bindgroup101.name,枠色,白 +sakura.bindgroup200.name,背景色,白 +sakura.bindgroup201.name,背景色,黒 +sakura.bindgroup202.name,背景色,赤 +sakura.bindgroup203.name,背景色,桃 +sakura.bindgroup204.name,背景色,赤紫 +sakura.bindgroup205.name,背景色,青紫 +sakura.bindgroup206.name,背景色,藍 +sakura.bindgroup207.name,背景色,青 +sakura.bindgroup208.name,背景色,水 +sakura.bindgroup209.name,背景色,シアン +sakura.bindgroup210.name,背景色,青緑 +sakura.bindgroup211.name,背景色,緑 +sakura.bindgroup212.name,背景色,黄緑 +sakura.bindgroup213.name,背景色,ライム +sakura.bindgroup214.name,背景色,黄 +sakura.bindgroup215.name,背景色,琥珀 +sakura.bindgroup216.name,背景色,橙 +sakura.bindgroup217.name,背景色,濃橙 +sakura.bindgroup218.name,背景色,茶 +sakura.bindgroup219.name,背景色,灰 +sakura.bindgroup220.name,背景色,青灰 +sakura.bindgroup300.name,アイコン,(白)アンテナ +sakura.bindgroup301.name,アイコン,(白)晴れ +sakura.bindgroup302.name,アイコン,(白)曇り +sakura.bindgroup303.name,アイコン,(白)傘 +sakura.bindgroup304.name,アイコン,(白)雪 +sakura.bindgroup400.name,アイコン,(黒)アンテナ +sakura.bindgroup401.name,アイコン,(黒)晴れ +sakura.bindgroup402.name,アイコン,(黒)曇り +sakura.bindgroup403.name,アイコン,(黒)傘 +sakura.bindgroup404.name,アイコン,(黒)雪 + +sakura.bindgroup101.default,1 +sakura.bindgroup201.default,1 +sakura.bindgroup300.default,1 + +sakura.bindoption0.group,枠色 +sakura.bindoption1.group,背景色,mustselect +sakura.bindoption2.group,アイコン,mustselect + +sakura.menu,auto + + diff --git a/shell/doodle/surface000.png b/shell/doodle/surface000.png new file mode 100644 index 0000000..5eb23e8 Binary files /dev/null and b/shell/doodle/surface000.png differ diff --git a/shell/doodle/surface010.png b/shell/doodle/surface010.png new file mode 100644 index 0000000..a4c51c3 Binary files /dev/null and b/shell/doodle/surface010.png differ diff --git a/shell/doodle/surface100.png b/shell/doodle/surface100.png new file mode 100644 index 0000000..ff5c2cf Binary files /dev/null and b/shell/doodle/surface100.png differ diff --git a/shell/doodle/surface101.png b/shell/doodle/surface101.png new file mode 100644 index 0000000..efe877b Binary files /dev/null and b/shell/doodle/surface101.png differ diff --git a/shell/doodle/surface200.png b/shell/doodle/surface200.png new file mode 100644 index 0000000..fd4d222 Binary files /dev/null and b/shell/doodle/surface200.png differ diff --git a/shell/doodle/surface201.png b/shell/doodle/surface201.png new file mode 100644 index 0000000..349f37e Binary files /dev/null and b/shell/doodle/surface201.png differ diff --git a/shell/doodle/surface202.png b/shell/doodle/surface202.png new file mode 100644 index 0000000..7d71bd3 Binary files /dev/null and b/shell/doodle/surface202.png differ diff --git a/shell/doodle/surface203.png b/shell/doodle/surface203.png new file mode 100644 index 0000000..0479e25 Binary files /dev/null and b/shell/doodle/surface203.png differ diff --git a/shell/doodle/surface204.png b/shell/doodle/surface204.png new file mode 100644 index 0000000..07943f7 Binary files /dev/null and b/shell/doodle/surface204.png differ diff --git a/shell/doodle/surface205.png b/shell/doodle/surface205.png new file mode 100644 index 0000000..7fc399a Binary files /dev/null and b/shell/doodle/surface205.png differ diff --git a/shell/doodle/surface206.png b/shell/doodle/surface206.png new file mode 100644 index 0000000..72b591e Binary files /dev/null and b/shell/doodle/surface206.png differ diff --git a/shell/doodle/surface207.png b/shell/doodle/surface207.png new file mode 100644 index 0000000..78064b7 Binary files /dev/null and b/shell/doodle/surface207.png differ diff --git a/shell/doodle/surface208.png b/shell/doodle/surface208.png new file mode 100644 index 0000000..d238833 Binary files /dev/null and b/shell/doodle/surface208.png differ diff --git a/shell/doodle/surface209.png b/shell/doodle/surface209.png new file mode 100644 index 0000000..a812944 Binary files /dev/null and b/shell/doodle/surface209.png differ diff --git a/shell/doodle/surface210.png b/shell/doodle/surface210.png new file mode 100644 index 0000000..19455ed Binary files /dev/null and b/shell/doodle/surface210.png differ diff --git a/shell/doodle/surface211.png b/shell/doodle/surface211.png new file mode 100644 index 0000000..021c788 Binary files /dev/null and b/shell/doodle/surface211.png differ diff --git a/shell/doodle/surface212.png b/shell/doodle/surface212.png new file mode 100644 index 0000000..a409e23 Binary files /dev/null and b/shell/doodle/surface212.png differ diff --git a/shell/doodle/surface213.png b/shell/doodle/surface213.png new file mode 100644 index 0000000..d591da8 Binary files /dev/null and b/shell/doodle/surface213.png differ diff --git a/shell/doodle/surface214.png b/shell/doodle/surface214.png new file mode 100644 index 0000000..971aee3 Binary files /dev/null and b/shell/doodle/surface214.png differ diff --git a/shell/doodle/surface215.png b/shell/doodle/surface215.png new file mode 100644 index 0000000..13569bd Binary files /dev/null and b/shell/doodle/surface215.png differ diff --git a/shell/doodle/surface216.png b/shell/doodle/surface216.png new file mode 100644 index 0000000..425b571 Binary files /dev/null and b/shell/doodle/surface216.png differ diff --git a/shell/doodle/surface217.png b/shell/doodle/surface217.png new file mode 100644 index 0000000..80f94e0 Binary files /dev/null and b/shell/doodle/surface217.png differ diff --git a/shell/doodle/surface218.png b/shell/doodle/surface218.png new file mode 100644 index 0000000..55081ac Binary files /dev/null and b/shell/doodle/surface218.png differ diff --git a/shell/doodle/surface219.png b/shell/doodle/surface219.png new file mode 100644 index 0000000..ab88176 Binary files /dev/null and b/shell/doodle/surface219.png differ diff --git a/shell/doodle/surface220.png b/shell/doodle/surface220.png new file mode 100644 index 0000000..e2f69a4 Binary files /dev/null and b/shell/doodle/surface220.png differ diff --git a/shell/doodle/surface300.png b/shell/doodle/surface300.png new file mode 100644 index 0000000..e14d058 Binary files /dev/null and b/shell/doodle/surface300.png differ diff --git a/shell/doodle/surface301.png b/shell/doodle/surface301.png new file mode 100644 index 0000000..bca179a Binary files /dev/null and b/shell/doodle/surface301.png differ diff --git a/shell/doodle/surface302.png b/shell/doodle/surface302.png new file mode 100644 index 0000000..5f75da9 Binary files /dev/null and b/shell/doodle/surface302.png differ diff --git a/shell/doodle/surface303.png b/shell/doodle/surface303.png new file mode 100644 index 0000000..88e3b86 Binary files /dev/null and b/shell/doodle/surface303.png differ diff --git a/shell/doodle/surface304.png b/shell/doodle/surface304.png new file mode 100644 index 0000000..ae67686 Binary files /dev/null and b/shell/doodle/surface304.png differ diff --git a/shell/doodle/surface400.png b/shell/doodle/surface400.png new file mode 100644 index 0000000..b7365d4 Binary files /dev/null and b/shell/doodle/surface400.png differ diff --git a/shell/doodle/surface401.png b/shell/doodle/surface401.png new file mode 100644 index 0000000..4eb16e9 Binary files /dev/null and b/shell/doodle/surface401.png differ diff --git a/shell/doodle/surface402.png b/shell/doodle/surface402.png new file mode 100644 index 0000000..d3ea770 Binary files /dev/null and b/shell/doodle/surface402.png differ diff --git a/shell/doodle/surface403.png b/shell/doodle/surface403.png new file mode 100644 index 0000000..0c209a1 Binary files /dev/null and b/shell/doodle/surface403.png differ diff --git a/shell/doodle/surface404.png b/shell/doodle/surface404.png new file mode 100644 index 0000000..b535846 Binary files /dev/null and b/shell/doodle/surface404.png differ diff --git a/shell/doodle/surfaces.txt b/shell/doodle/surfaces.txt new file mode 100644 index 0000000..f73f75b --- /dev/null +++ b/shell/doodle/surfaces.txt @@ -0,0 +1,86 @@ +charset,UTF-8 + +descript +{ +version,1 +} + +surface0 +{ +element0,base,surface010.png,0,0 + +animation100.interval,bind +animation100.pattern0,overlay,100,0,0,0 +animation101.interval,bind +animation101.pattern0,overlay,101,0,0,0 + +animation200.interval,bind +animation200.pattern0,overlay,200,0,0,0 +animation201.interval,bind +animation201.pattern0,overlay,201,0,0,0 +animation202.interval,bind +animation202.pattern0,overlay,202,0,0,0 +animation203.interval,bind +animation203.pattern0,overlay,203,0,0,0 +animation204.interval,bind +animation204.pattern0,overlay,204,0,0,0 +animation205.interval,bind +animation205.pattern0,overlay,205,0,0,0 +animation206.interval,bind +animation206.pattern0,overlay,206,0,0,0 +animation207.interval,bind +animation207.pattern0,overlay,207,0,0,0 +animation208.interval,bind +animation208.pattern0,overlay,208,0,0,0 +animation209.interval,bind +animation209.pattern0,overlay,209,0,0,0 +animation210.interval,bind +animation210.pattern0,overlay,210,0,0,0 +animation211.interval,bind +animation211.pattern0,overlay,211,0,0,0 +animation212.interval,bind +animation212.pattern0,overlay,212,0,0,0 +animation213.interval,bind +animation213.pattern0,overlay,213,0,0,0 +animation214.interval,bind +animation214.pattern0,overlay,214,0,0,0 +animation215.interval,bind +animation215.pattern0,overlay,215,0,0,0 +animation216.interval,bind +animation216.pattern0,overlay,216,0,0,0 +animation217.interval,bind +animation217.pattern0,overlay,217,0,0,0 +animation218.interval,bind +animation218.pattern0,overlay,218,0,0,0 +animation219.interval,bind +animation219.pattern0,overlay,219,0,0,0 +animation220.interval,bind +animation220.pattern0,overlay,220,0,0,0 + +animation300.interval,bind +animation300.pattern0,overlay,300,0,0,0 +animation301.interval,bind +animation301.pattern0,overlay,301,0,0,0 +animation302.interval,bind +animation302.pattern0,overlay,302,0,0,0 +animation303.interval,bind +animation303.pattern0,overlay,303,0,0,0 +animation304.interval,bind +animation304.pattern0,overlay,304,0,0,0 + +animation400.interval,bind +animation400.pattern0,overlay,400,0,0,0 +animation401.interval,bind +animation401.pattern0,overlay,401,0,0,0 +animation402.interval,bind +animation402.pattern0,overlay,402,0,0,0 +animation403.interval,bind +animation403.pattern0,overlay,403,0,0,0 +animation404.interval,bind +animation404.pattern0,overlay,404,0,0,0 +} + +surface10 +{ +element0,base,surface010.png,0,0 +} diff --git a/shell/doodle/thumbnail.pnr b/shell/doodle/thumbnail.pnr new file mode 100644 index 0000000..5eb23e8 Binary files /dev/null and b/shell/doodle/thumbnail.pnr differ diff --git a/shell/master/descript.txt b/shell/master/descript.txt new file mode 100644 index 0000000..a603fa5 --- /dev/null +++ b/shell/master/descript.txt @@ -0,0 +1,14 @@ +charset,UTF-8 +type,shell +name,master + +craftman,lost_nd_xxx +craftmanw,ろすえん +craftmanurl,https://lnx.flop.jp/ + +readme.charset,UTF-8 + +seriko.alignmenttodesktop,free +seriko.use_self_alpha,1 + +sakura.balloon.offsetx,-10 diff --git a/shell/master/readme.txt b/shell/master/readme.txt new file mode 100644 index 0000000..fff29be --- /dev/null +++ b/shell/master/readme.txt @@ -0,0 +1 @@ +ゴースト「WeatherTimeCapsule」のmasterシェル diff --git a/shell/master/surface0.png b/shell/master/surface0.png new file mode 100644 index 0000000..e64e453 Binary files /dev/null and b/shell/master/surface0.png differ diff --git a/shell/master/surface10.png b/shell/master/surface10.png new file mode 100644 index 0000000..4ebca32 Binary files /dev/null and b/shell/master/surface10.png differ diff --git a/shell/master/thumbnail.pnr b/shell/master/thumbnail.pnr new file mode 100644 index 0000000..f1c02d6 Binary files /dev/null and b/shell/master/thumbnail.pnr differ diff --git a/thumbnail.png b/thumbnail.png new file mode 100644 index 0000000..54270cf Binary files /dev/null and b/thumbnail.png differ