Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolat committed Oct 9, 2021
0 parents commit 72207cc
Show file tree
Hide file tree
Showing 34 changed files with 488 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
Binary file added ghost/master/akari.dll
Binary file not shown.
12 changes: 12 additions & 0 deletions ghost/master/descript.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
charset,UTF-8
type,ghost
shiori,akari.dll
name,Party Parrot
sakura.name,Sirocco
kero.name,none
craftman,Don
craftmanurl,http://nikolat.herokuapp.com/
homeurl,https://raw.githubusercontent.com/nikolat/ukagaka-party-parrot/main/
icon,icon/parrot0.ico
don't need onmousemove,1
readme.charset,UTF-8
Binary file added ghost/master/icon/parrot0.ico
Binary file not shown.
Binary file added ghost/master/icon/parrot1.ico
Binary file not shown.
Binary file added ghost/master/icon/parrot2.ico
Binary file not shown.
Binary file added ghost/master/icon/parrot3.ico
Binary file not shown.
Binary file added ghost/master/icon/parrot4.ico
Binary file not shown.
Binary file added ghost/master/icon/parrot5.ico
Binary file not shown.
Binary file added ghost/master/icon/parrot6.ico
Binary file not shown.
Binary file added ghost/master/icon/parrot7.ico
Binary file not shown.
Binary file added ghost/master/icon/parrot8.ico
Binary file not shown.
Binary file added ghost/master/icon/parrot9.ico
Binary file not shown.
155 changes: 155 additions & 0 deletions ghost/master/main.azr
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
int unloaded = 0;
int display_width = -1;
int dance = 1;
int isdragging = 0;
int surface_width = -1;
int ismouseleft = 0;
double CHECK_MOUSE_INTERVAL = 0.125;
int THRESHOLD_DISTANCE = 300;

load()
{
_saoriload("saori\HandUtil\HandUtil.dll", "HandUtil");
_create_thread("TH_CheckMouse");
}
unload()
{
_saoriunload("HandUtil");
unloaded = 1;
}

OnDisplayChange(dict ref)
{
display_width = ref["Reference1"];
}

string OnFirstBoot() { return "\0\s[0]\e"; }
string OnBoot() { return "\0\s[0]\e"; }
string OnGhostChanged() { return "\0\s[0]\e"; }
string OnShellChanged() { return "\0\s[0]\e"; }
string OnWindowStateRestore() { return "\0\s[0]\e"; }
string OnSurfaceRestore() { return ""; }
string OnClose() { return "\-\e"; }

string OnMouseDoubleClick(dict ref)
{
dance = !dance;
return "\0\i[" + dance + "]\e";
}
string OnMouseDragStart(dict ref)
{
isdragging = 1;
return "\0\![set,alignmenttodesktop,free]\![set,scaling,,-100]\e";
}
string OnMouseDragEnd(dict ref)
{
isdragging = 0;
return "\0\![set,alignmenttodesktop,default]\![set,scaling,,100]\e";
}

string OnSecondChange(dict ref)
{
if (!dance || isdragging)
return "";
return dance_icon() + "\e";
}
string dance_icon()
{
string s = "";
for (int i = 0; i < 10; i++)
{
s += "\![set,tasktrayicon,icon/parrot" + i + ".ico]";
if (i < 9)
s += "\_w[50]";
}
s += "\_w[50]" + s;
return s;
}

TH_CheckMouse()
{
while(1)
{
if (unloaded)
break;
string s = run_away();
if (s != "")
_speak(s);
_sleep(CHECK_MOUSE_INTERVAL);
}
}

string run_away()
{
if (!dance || isdragging)
return "";
if (display_width <= 0)
return "";
if (surface_width <= 0)
surface_width = get_surface_width();
if (surface_width <= 0)
return "";
dict d = _mousepos();
int mx = d["x"];
int my = d["y"];
array a = get_position();
int px = a[0];
int py = a[1] - (surface_width / 2);
int r = _sqrt(_pow(mx - px, 2) + _pow(my - py, 2));
int l = THRESHOLD_DISTANCE;
int diffx = _sqrt(_pow(l, 2) - _pow(my - py, 2));
int nx;
if (px < mx)
nx = px - diffx;
else
nx = px + diffx;
int max = display_width - surface_width;
if (nx > max)
nx = max;
else if (nx < 0)
nx = 0;
int centerx = display_width / 2;
string s;
if (mx < px && !ismouseleft)
{
ismouseleft = 1;
s += "\![set,scaling,-100,]";
}
else if (px <= mx && ismouseleft)
{
ismouseleft = 0;
s += "\![set,scaling,100,]";
}
if (r < l && nx + (surface_width / 2) != px)
s += "\![move,--X=" + nx + ",--time=" + (1000 * CHECK_MOUSE_INTERVAL) + "]";
return s;
}

array get_position()
{
array r = get_rect();
int x = (r[0] + r[2]) / 2;
int y = r[3];
return {x, y};
}

int get_surface_width()
{
array r = get_rect();
int lx = r[2] - r[0];
return lx;
}

array get_rect()
{
string hwnd = _strsplit(_systemdict["hwnd"]["Reference0"], _bytechar(1))[0];
string sender = _systemdict["OnNotifySelfInfo"]["Reference1"];
array a = {"HandUtil", "DSSTPSend", hwnd, "result"
,"EXECUTE SSTP/1.1"
,"Charset: Shift_JIS"
,"Sender: " + sender
,"Command: GetProperty[currentghost.scope(0).rect]"};
dict d = _saorirequest(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]);
array r = _strsplit(d["Value1"], ",");
return {(int)r[0], (int)r[1], (int)r[2], (int)r[3]};
}
Binary file added ghost/master/saori/HandUtil/HandUtil.dll
Binary file not shown.
139 changes: 139 additions & 0 deletions ghost/master/saori/HandUtil/HandUtil_readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
�\�g�������t�������@�r�`�n�q�h�\

�y�@�\�z

�i�P�j�e�l�n�ǂݎ��

Argument0�@�@"GetFMO"
Argument1�@�@FMO���� �@�@�@�@�ȗ��”\�i����l"Sakura"�j
Argument2�@�@��������G���g���i���j
Argument3�@�@����i���j�ȉ�Argument4,5�c�Ƃ‚Â�

�������Ŏw�肵����������܂ރG���g���͌��ʂƂ��ĕԂ���Ȃ��Ȃ�܂�

Result�@�@�G���g����
Value[n]�@FMO�̊e�G���g�����P�G���g���PValue�ŕԂ�


�i�Q�jSAKURA API�R�[��

Argument0�@�@"SakuraAPI"
Argument1�@�@�������HWND
Argument2�@�@wparam
Argument3�@�@lparam

Result�@�@SendMessage�̌���


�i�R�jCollision�ʒu�擾�i�����ɃE�B���h�E��`�擾�j

�i���̊֐��� SAKURA API���g���� Collision�ʒu���擾���܂��j

Argument0�@�@"GetRect"
Argument1�@�@�������HWND
Argument2�@�@"head"|"face"|"bust"�@���Q

Result�@Collision�ʒu��left�i�O�Ȃ玸�s���P�j
Value0�@Collision�ʒu��left
Value1�@Collision�ʒu��top
Value2�@Collision�ʒu��right
Value3�@Collision�ʒu��bottom
Value4�@�Ώ�HWND��left
Value5�@�Ώ�HWND��top
Value6�@�Ώ�HWND��right
Value7�@�Ώ�HWND��bottom

���P�FCollision����`����Ă��Ȃ�������SSP�̈ꎞ�N���S�[�X�g��������
�@�@�@�����������肪CROW�iSAKURA API�������j�������肷��ƂO���A��݂����ł��B

���Q�F�����łR��ވȊO�̕�������w�肷��ƁASAKURA API�𓊂�����
�@�@�@Value4�`7�̂ݕԂ��܂��B�܂��A���̏ꍇ��Result��Value4�Ɠ����l�ɂȂ�܂��B
�@�@�@����𗘗p���āA�������g��HWND�𓊂��邱�Ƃɂ�莩���̈ʒu��������܂��B

��2004/7/24�lj��F�������HWND���E�B���h�E�Ŗ����ꍇ
�@(IsWindow�Ŏ��s�����ꍇ�j���U���g��-9999���A��܂��B
��2005/7/12�lj��F�������HWND���Ž��Ŗ����ꍇ
�@(IsWindowVisible�Ŏ��s�����ꍇ�j���U���g��-9999���A��܂��B


�i�S�jDirectSSTP���M

Argument0�@�@"DSSTPSend"
Argument1�@�@�������HWND
Argument2�@�@�߂�l���v��ꍇ��"result"
Argument3�`�@SSTP�̊e�s
�i�ȉ����l�ɑ�����A���ɏ���Ȃ��A�A�����b�Z�[�W���̂�1KBytes�ȓ��ł��邱�Ɓj
��DirectSSTP��HWND�p�����[�^�͏���ɒlj�����܂��̂Ŏw��͕s�v�ł��B

Result�@SSTP�T�[�o�̕Ԃ����s���A���M�Ɏ��s�����茋�ʂ�Ԃ���Ȃ������ꍇ��
�@�@�@�@�O���Ԃ�i���Ȃ݂ɑ��M�҂����ԁA���ʑ҂����Ԃ͂R�b�ł��j

Value0�`�@SSTP�T�[�o�̕Ԃ����e�s������A��������s�͏������܂��B
�i�����Ă��̏ꍇ�AValue0�� SSTP/1.4 200 OK �Ƃ��������U���g�R�[�h�s�A
�@���̌�Value1������ۂ̃f�[�^���i��������΁j�Ԃ锤�ł��j


�i�T�j�E�B���h�E�ړ�

Argument0�@�@"MoveWindow"
Argument1�@�@�������HWND
Argument2�@�@X���W
Argument3�@�@Y���W

Result�@�������Ԉ���Ă��Ȃ����200���Ԃ�܂��B

�i�U�j������

Argument0�@�@"Dakko"
Argument1�@�@"START"|"STOP"
Argument2�@�@��ƂȂ�HWND1
Argument3�@�@������������HWND2
Argument4�@�@X���W����
Argument5�@�@Y���W����
Argument6�@�@�Ď��Ԋu�i�~���b�j

Result�@�������Ԉ���Ă��Ȃ����200���Ԃ�܂��B

HWND1��HWND2���Ђ��‚��܂��B�i�Ď��Ԋu�ňʒu���Ď��AHWND1�̍�����W��
�������������l�� HWND2�̍�����W�ɂ��܂��j
START���g���ƊĎ����J�n���܂��BSTART�͉���Ă�ł����܂��܂���B
STOP���g���ƊĎ����I�����܂��B
STOP���g���ꍇ��Argument2�`6�͖����Ă��܂��܂���B

�Ď�����HWND1��IsWindow�Ŗ����Ȃ����ꍇ�́AOnDakkoLost NOTIFY��
HWND2�ɑ΂��ē����܂��B�iSTOP�͂���܂���j

�y�����z

2004/05/08 Ver1.0.0 �V�K�쐬
2004/05/08 Ver1.0.1 Notify1.0�Ƀo�O���������̂ŏC��
2004/05/08 Ver1.0.3 nodummy�̍ہACROW,S-V,SSSB�̃G���g���𖳎�����悤�C��
2004/05/08 Ver1.0.4 nodummy�I�v�V�����p�~�A��������G���g���𖾎��w�肷��悤�ɂ��܂���
�������g�̈ʒu���擾�ł���悤��GetRect�̎d�l���C�����܂����B
2004/05/16 Ver1.1.0 "Notify"�p�~�A���ėp�I��"DSSTPSend"�lj��B
2004/06/14 Ver1.2.0 "MoveWindow"�lj��B
2004/07/24 Ver1.2.1 "MoveWindow"���U���g�R�[�h�ύX�B
2004/07/25 Ver1.3.0 "Dakko"�lj��B
2005/05/10 Ver1.3.1 �I���������኱�������B����ň��肷��Ƃ������ǁB
2005/05/12 Ver1.3.2 "Dakko"�ŃG���o�O���Ă��̂ŏC���B"Dakko"��OnDakkoLost�lj��B
2005/07/12 Ver1.3.2.1 "GetFmo"�̃G���o�O���C���B"GetRect"��IsWindowVisible�lj��B
2005/07/26 Ver1.3.3 SSTP���M���ɗ�����ꍇ������o�O���C���BThanks to �ۂɂ��
2008/04/14 Ver1.4.1 Argument�����Ԃǂ���ɗ��Ȃ��Ă����v�Ȃ悤�ɂ����ifor KAWARI827)
2011/05/05 Ver1.4.2 "Dakko"��؍햂�_C.Ponapalt���񂪒����Ă���܂����B


�y�ӎ��z

�J���ɂ������Ă͂��т���l��gethwnd.dll�\�[�X��傢�ɎQ�l�ɂ����Ē����A
�܂�����Ȃ��炾���ԗ��p�����Ē����Ă���܂��B����\���グ�܂��B
��http://www33.tok2.com/home/ebi/index.shtml�@�����ʂ�߂�...

�y�A����z

�A���悪�ς��܂����B
----------------------------------
���@�q�@��
----------------------------------
[email protected]
http://ukiya.sakura.ne.jp/
----------------------------------
4 changes: 4 additions & 0 deletions install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
charset,UTF-8
type,ghost
name,Party Parrot
directory,party-parrot
42 changes: 42 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
========================================================================
【ソフト名称】Party Parrot
【 制 作 者 】Don
【 動作環境 】Windows10 21H1 + SSP/2.5.34
【 タ イ プ 】「伺か」用ゴースト
【 取扱種別 】フリーウェア
【 配布月日 】2021/10/09
【 配 布 元 】http://nikolat.herokuapp.com/
【 備 考 】後述
========================================================================
■概要

PARTY OR DIE

■ライセンス

□SHIORIとして「灯」を使用しています。

夜天燈火
http://le.silk.to/

□SAORIとして「HandUtil.dll」を使用しています。

浮子屋本舗
http://ukiya.sakura.ne.jp/

□シェルおよびアイコンに以下のサイトの画像を利用しています。

Cult of the Party Parrot
https://cultofthepartyparrot.com/

□上記以外のテキストファイル、辞書ファイルの類いについて

著作者人格権はDonに帰属します。

すくりや
http://nikolat.herokuapp.com/

ライセンスは「CC0 1.0 Universal」です。

Creative Commons - CC0 1.0 Universal
http://creativecommons.org/publicdomain/zero/1.0/
6 changes: 6 additions & 0 deletions shell/master/descript.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
charset,UTF-8
type,shell
name,master
craftman,
craftmanurl,https://cultofthepartyparrot.com/
sakura.defaultleft,0
Binary file added shell/master/element1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shell/master/element2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shell/master/element3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shell/master/element4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shell/master/element5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shell/master/element6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shell/master/element7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shell/master/element8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shell/master/element9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions shell/master/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

PARTY OR DIE

Binary file added shell/master/surface0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shell/master/surface10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 72207cc

Please sign in to comment.