├── .gitattributes ├── .gitignore ├── .gitmodules ├── Art ├── ChatBackground.png ├── ChatBackground.sai2 ├── ChatBackgroundTail.png ├── ChatBackgroundTail.sai2 ├── Legacy │ ├── Boy.png │ ├── Boy.sai2 │ ├── Girl.png │ ├── Girl.sai2 │ ├── bedBoy.png │ ├── bedBoy.sai2 │ ├── bedEmpty.png │ ├── bedEmpty.sai2 │ ├── bedGirl.png │ └── bedGirl.sai2 ├── logo.ico ├── logo.png ├── logo.sai2 └── ourPhone │ ├── MusicPlayerIcons │ ├── LoopModeListLoop.png │ ├── LoopModeListLoop.sai2 │ ├── LoopModeSingleLoop.png │ ├── LoopModeSingleLoop.sai2 │ ├── LoopModeStop.png │ └── LoopModeStop.sai2 │ ├── ourAppTemplate.sai2 │ ├── ourApp_Camera.png │ ├── ourApp_Camera.sai2 │ ├── ourApp_Chat.png │ ├── ourApp_Chat.sai2 │ ├── ourApp_CustomWallpaper.png │ ├── ourApp_CustomWallpaper.sai2 │ ├── ourApp_MusicPlayer.png │ ├── ourApp_MusicPlayer.sai2 │ ├── ourApp_Photos.png │ ├── ourApp_Photos.sai2 │ ├── ourApp_Report.png │ ├── ourApp_Report.sai2 │ ├── ourApp_WebBrowser.png │ ├── ourApp_WebBrowser.sai2 │ ├── ourPhone.png │ ├── ourPhone.sai2 │ ├── ourPhoneWallpaper.png │ ├── ourPhoneWallpaper.sai2 │ └── ourPhone_ButtonHome.png ├── LICENSE ├── README.md ├── Source ├── Client dlls │ ├── dll_basic_x86.zip │ ├── dll_x86.zip │ └── dll_x86_64.zip ├── CloudSleep │ ├── CloudSleep.yyp │ ├── animcurves │ │ └── animcurve_cameralinear │ │ │ └── animcurve_cameralinear.yy │ ├── datafiles │ │ ├── About_dlls.txt │ │ ├── LICENSE │ │ │ ├── SourceHanSansSC │ │ │ │ └── LICENSE.txt │ │ │ └── Textbox - Single line │ │ │ │ └── LICENSE │ │ ├── api-ms-win-core-file-l1-2-0.dll │ │ ├── api-ms-win-core-file-l2-1-0.dll │ │ ├── api-ms-win-core-localization-l1-2-0.dll │ │ ├── api-ms-win-core-processthreads-l1-1-1.dll │ │ ├── api-ms-win-core-synch-l1-2-0.dll │ │ ├── api-ms-win-core-timezone-l1-1-0.dll │ │ ├── api-ms-win-crt-convert-l1-1-0.dll │ │ ├── api-ms-win-crt-environment-l1-1-0.dll │ │ ├── api-ms-win-crt-filesystem-l1-1-0.dll │ │ ├── api-ms-win-crt-heap-l1-1-0.dll │ │ ├── api-ms-win-crt-locale-l1-1-0.dll │ │ ├── api-ms-win-crt-math-l1-1-0.dll │ │ ├── api-ms-win-crt-runtime-l1-1-0.dll │ │ ├── api-ms-win-crt-stdio-l1-1-0.dll │ │ ├── api-ms-win-crt-string-l1-1-0.dll │ │ ├── api-ms-win-crt-time-l1-1-0.dll │ │ ├── api-ms-win-crt-utility-l1-1-0.dll │ │ ├── dll │ │ │ ├── AudioPlayerDLL.dll │ │ │ ├── StringConverter.dll │ │ │ ├── file_dll.dll │ │ │ └── systemCmd.dll │ │ ├── fonts │ │ │ └── SourceHanSansSC-Medium.otf │ │ ├── kernel32.dll │ │ ├── msvcp140.dll │ │ ├── ucrtbase.dll │ │ └── vcruntime140.dll │ ├── objects │ │ ├── obj_GuiElement_Button │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_GuiElement_Button.yy │ │ ├── obj_GuiElement_Message │ │ │ ├── CleanUp_0.gml │ │ │ ├── Create_0.gml │ │ │ ├── Draw_75.gml │ │ │ └── obj_GuiElement_Message.yy │ │ ├── obj_GuiElement_Page │ │ │ ├── CleanUp_0.gml │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ ├── Draw_75.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_GuiElement_Page.yy │ │ ├── obj_GuiElement_SlidingRod │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ └── obj_GuiElement_SlidingRod.yy │ │ ├── obj_GuiElement_SlidingRod_Time │ │ │ ├── Draw_64.gml │ │ │ └── obj_GuiElement_SlidingRod_Time.yy │ │ ├── obj_SceneDefaultBackground │ │ │ ├── Create_0.gml │ │ │ ├── Draw_0.gml │ │ │ └── obj_SceneDefaultBackground.yy │ │ ├── obj_background │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_background.yy │ │ ├── obj_bed │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_bed.yy │ │ ├── obj_buttonshowsleeperid │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_buttonshowsleeperid.yy │ │ ├── obj_camera │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ ├── Step_1.gml │ │ │ └── obj_camera.yy │ │ ├── obj_choosesleepertypebutton │ │ │ ├── Create_0.gml │ │ │ ├── Draw_0.gml │ │ │ └── obj_choosesleepertypebutton.yy │ │ ├── obj_client │ │ │ ├── Alarm_0.gml │ │ │ ├── Alarm_1.gml │ │ │ ├── Alarm_2.gml │ │ │ ├── CleanUp_0.gml │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ ├── Draw_75.gml │ │ │ ├── Other_68.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_client.yy │ │ ├── obj_clientconnect │ │ │ ├── Create_0.gml │ │ │ ├── Draw_75.gml │ │ │ ├── Other_68.gml │ │ │ └── obj_clientconnect.yy │ │ ├── obj_day_and_night │ │ │ ├── CleanUp_0.gml │ │ │ ├── Create_0.gml │ │ │ ├── Draw_74.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_day_and_night.yy │ │ ├── obj_decorate │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_decorate.yy │ │ ├── obj_emoteRoulette │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ └── obj_emoteRoulette.yy │ │ ├── obj_inputmynametextbox │ │ │ ├── Create_0.gml │ │ │ └── obj_inputmynametextbox.yy │ │ ├── obj_kickshowvotes │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_kickshowvotes.yy │ │ ├── obj_kickwhobox │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_kickwhobox.yy │ │ ├── obj_mainMenu │ │ │ ├── Create_0.gml │ │ │ ├── Draw_74.gml │ │ │ ├── Step_0.gml │ │ │ ├── Step_1.gml │ │ │ └── obj_mainMenu.yy │ │ ├── obj_makemycharacteroverbutton │ │ │ ├── Draw_0.gml │ │ │ └── obj_makemycharacteroverbutton.yy │ │ ├── obj_ourAppParent │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourAppParent.yy │ │ ├── obj_ourAppTemplate │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourAppTemplate.yy │ │ ├── obj_ourApp_Camera │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourApp_Camera.yy │ │ ├── obj_ourApp_Chat │ │ │ ├── CleanUp_0.gml │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourApp_Chat.yy │ │ ├── obj_ourApp_CustomWallpaper │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourApp_CustomWallpaper.yy │ │ ├── obj_ourApp_MusicPlayer │ │ │ ├── Create_0.gml │ │ │ ├── Other_63.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourApp_MusicPlayer.yy │ │ ├── obj_ourApp_Photos │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourApp_Photos.yy │ │ ├── obj_ourApp_Report │ │ │ ├── CleanUp_0.gml │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourApp_Report.yy │ │ ├── obj_ourApp_WebBrowser │ │ │ ├── Create_0.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourApp_WebBrowser.yy │ │ ├── obj_ourPhone │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_ourPhone.yy │ │ ├── obj_sleeper │ │ │ ├── Create_0.gml │ │ │ ├── Draw_0.gml │ │ │ ├── Draw_64.gml │ │ │ ├── Draw_74.gml │ │ │ ├── Mouse_7.gml │ │ │ ├── Step_0.gml │ │ │ └── obj_sleeper.yy │ │ └── textbox │ │ │ ├── CleanUp_0.gml │ │ │ ├── Create_0.gml │ │ │ ├── Draw_64.gml │ │ │ ├── Step_0.gml │ │ │ └── textbox.yy │ ├── options │ │ ├── linux │ │ │ └── options_linux.yy │ │ ├── mac │ │ │ └── options_mac.yy │ │ ├── main │ │ │ └── options_main.yy │ │ ├── operagx │ │ │ └── options_operagx.yy │ │ └── windows │ │ │ ├── icons │ │ │ └── icon.ico │ │ │ └── options_windows.yy │ ├── rooms │ │ ├── rm_MainMenu │ │ │ └── rm_MainMenu.yy │ │ ├── rm_bedroom │ │ │ └── rm_bedroom.yy │ │ └── rm_connect │ │ │ └── rm_connect.yy │ ├── scripts │ │ ├── Files │ │ │ ├── Files.gml │ │ │ └── Files.yy │ │ ├── GuiElementPage │ │ │ ├── GuiElementPage.gml │ │ │ └── GuiElementPage.yy │ │ ├── GuiElements │ │ │ ├── GuiElements.gml │ │ │ └── GuiElements.yy │ │ ├── Mouse │ │ │ ├── Mouse.gml │ │ │ └── Mouse.yy │ │ ├── SCENE │ │ │ ├── SCENE.gml │ │ │ └── SCENE.yy │ │ ├── SceneElements │ │ │ ├── SceneElements.gml │ │ │ └── SceneElements.yy │ │ ├── SetSize_ │ │ │ ├── SetSize_.gml │ │ │ └── SetSize_.yy │ │ ├── Settings │ │ │ ├── Settings.gml │ │ │ └── Settings.yy │ │ ├── add_key_time │ │ │ ├── add_key_time.gml │ │ │ └── add_key_time.yy │ │ ├── bed │ │ │ ├── bed.gml │ │ │ └── bed.yy │ │ ├── camera │ │ │ ├── camera.gml │ │ │ └── camera.yy │ │ ├── file_dll │ │ │ ├── file_dll.gml │ │ │ └── file_dll.yy │ │ ├── font │ │ │ ├── font.gml │ │ │ └── font.yy │ │ ├── getpositionongui │ │ │ ├── getpositionongui.gml │ │ │ └── getpositionongui.yy │ │ ├── gui │ │ │ ├── gui.gml │ │ │ └── gui.yy │ │ ├── networks │ │ │ ├── networks.gml │ │ │ └── networks.yy │ │ ├── others │ │ │ ├── others.gml │ │ │ └── others.yy │ │ ├── ourPhone │ │ │ ├── ourPhone.gml │ │ │ └── ourPhone.yy │ │ ├── ourPhoneGuiElements │ │ │ ├── ourPhoneGuiElements.gml │ │ │ └── ourPhoneGuiElements.yy │ │ ├── path │ │ │ ├── path.gml │ │ │ └── path.yy │ │ ├── set_reset_alpha │ │ │ ├── set_reset_alpha.gml │ │ │ └── set_reset_alpha.yy │ │ ├── sleeper │ │ │ ├── sleeper.gml │ │ │ └── sleeper.yy │ │ ├── stlvector │ │ │ ├── stlvector.gml │ │ │ └── stlvector.yy │ │ ├── textbox_fns │ │ │ ├── textbox_fns.gml │ │ │ └── textbox_fns.yy │ │ ├── votetokick │ │ │ ├── votetokick.gml │ │ │ └── votetokick.yy │ │ ├── wheat_ptr_ │ │ │ ├── wheat_ptr_.gml │ │ │ └── wheat_ptr_.yy │ │ └── wheatcommand │ │ │ ├── wheatcommand.gml │ │ │ └── wheatcommand.yy │ ├── shaders │ │ ├── shd_alpha │ │ │ ├── shd_alpha.fsh │ │ │ ├── shd_alpha.vsh │ │ │ └── shd_alpha.yy │ │ └── shd_day_and_night │ │ │ ├── shd_day_and_night.fsh │ │ │ ├── shd_day_and_night.vsh │ │ │ └── shd_day_and_night.yy │ └── sprites │ │ ├── spr_bedboy │ │ ├── 72064a5a-1764-442c-aa5e-b7c14346b2d0.png │ │ ├── layers │ │ │ └── 72064a5a-1764-442c-aa5e-b7c14346b2d0 │ │ │ │ └── 5d8bbcbe-15ee-40e9-b536-1d44f61990b2.png │ │ └── spr_bedboy.yy │ │ ├── spr_bedempty │ │ ├── 082562ca-b294-4ca2-8ee5-69345f1c376c.png │ │ ├── layers │ │ │ └── 082562ca-b294-4ca2-8ee5-69345f1c376c │ │ │ │ └── ec87483b-718c-4481-9054-a15ec54ffb84.png │ │ └── spr_bedempty.yy │ │ ├── spr_bedgirl │ │ ├── 376d13cb-767c-491c-9a89-da36ee75d634.png │ │ ├── layers │ │ │ └── 376d13cb-767c-491c-9a89-da36ee75d634 │ │ │ │ └── 9e4f4a55-d38e-4004-869c-b639f9d9b399.png │ │ └── spr_bedgirl.yy │ │ ├── spr_bedhitbox │ │ ├── 428a5c0c-acb1-4188-9e3f-a5046d74aad5.png │ │ ├── layers │ │ │ └── 428a5c0c-acb1-4188-9e3f-a5046d74aad5 │ │ │ │ └── dc43eaf2-edaa-4645-8f5a-57dad499c139.png │ │ └── spr_bedhitbox.yy │ │ ├── spr_boy │ │ ├── 256c1a87-64aa-47fb-8bf2-b10f4331dbec.png │ │ ├── layers │ │ │ └── 256c1a87-64aa-47fb-8bf2-b10f4331dbec │ │ │ │ └── 44415023-ba75-490f-98f7-604e49da9828.png │ │ └── spr_boy.yy │ │ ├── spr_chatbackground │ │ ├── 4f0db8c1-867c-4fe3-b1bf-9684f87e1fb7.png │ │ ├── layers │ │ │ └── 4f0db8c1-867c-4fe3-b1bf-9684f87e1fb7 │ │ │ │ └── b2737380-f443-43bb-b056-abce5f98f2d9.png │ │ └── spr_chatbackground.yy │ │ ├── spr_chatbackgroundtail │ │ ├── cfe8283a-0ad5-4129-a0c0-c5fc44f7788a.png │ │ ├── efdf6f5f-08cc-4eba-adc6-8262c337e0ea.png │ │ ├── layers │ │ │ ├── cfe8283a-0ad5-4129-a0c0-c5fc44f7788a │ │ │ │ └── 8fdf594c-bbe0-4301-93f4-84807f22bda6.png │ │ │ └── efdf6f5f-08cc-4eba-adc6-8262c337e0ea │ │ │ │ └── 8fdf594c-bbe0-4301-93f4-84807f22bda6.png │ │ └── spr_chatbackgroundtail.yy │ │ ├── spr_choosesleepertypebuttonhitbox │ │ ├── b84cf8fd-6171-4898-a281-e248152744c9.png │ │ ├── layers │ │ │ └── b84cf8fd-6171-4898-a281-e248152744c9 │ │ │ │ └── 32178cbf-d687-41ba-a794-b5daf6758350.png │ │ └── spr_choosesleepertypebuttonhitbox.yy │ │ ├── spr_girl │ │ ├── e0fe79a9-00f0-4d8b-91ec-fb56f738e885.png │ │ ├── layers │ │ │ └── e0fe79a9-00f0-4d8b-91ec-fb56f738e885 │ │ │ │ └── 1b8a4e5c-2034-467d-a9bb-4c1184bd7277.png │ │ └── spr_girl.yy │ │ ├── spr_groundmeasuring │ │ ├── ecb9edfe-2655-41f9-95da-7aa2d9908ccc.png │ │ ├── layers │ │ │ └── ecb9edfe-2655-41f9-95da-7aa2d9908ccc │ │ │ │ └── 03f973a5-f24e-48dd-85b3-9a0b4f7e8c67.png │ │ └── spr_groundmeasuring.yy │ │ ├── spr_ourApp_Camera │ │ ├── 49fbfcec-1733-4ef6-a746-fd0a14fa7aed.png │ │ ├── layers │ │ │ └── 49fbfcec-1733-4ef6-a746-fd0a14fa7aed │ │ │ │ └── 83b41f5c-fc9c-408f-a88c-a947c59f4f98.png │ │ └── spr_ourApp_Camera.yy │ │ ├── spr_ourApp_Chat │ │ ├── 18a3930f-da4d-4cc6-bf36-f79a5ca1568c.png │ │ ├── layers │ │ │ └── 18a3930f-da4d-4cc6-bf36-f79a5ca1568c │ │ │ │ └── bb87f970-50b1-414d-826e-e1daeaff7675.png │ │ └── spr_ourApp_Chat.yy │ │ ├── spr_ourApp_CustomWallpaper │ │ ├── bc2ae55a-39f0-41f3-a80a-694439cfb367.png │ │ ├── layers │ │ │ └── bc2ae55a-39f0-41f3-a80a-694439cfb367 │ │ │ │ └── 887ec16f-2389-409b-9373-879de8c416a4.png │ │ └── spr_ourApp_CustomWallpaper.yy │ │ ├── spr_ourApp_MusicPlayer │ │ ├── 7836522b-8e84-4925-9ec1-d4c30088d332.png │ │ ├── layers │ │ │ └── 7836522b-8e84-4925-9ec1-d4c30088d332 │ │ │ │ └── f500fbc9-9758-4748-929e-f10a76c0f7ef.png │ │ └── spr_ourApp_MusicPlayer.yy │ │ ├── spr_ourApp_MusicPlayer_LoopModeListLoop │ │ ├── aee71006-2f95-4dea-a906-24340c6ca20b.png │ │ ├── layers │ │ │ └── aee71006-2f95-4dea-a906-24340c6ca20b │ │ │ │ └── 00ab37d3-acdf-46b3-864d-fd2842ab71fd.png │ │ └── spr_ourApp_MusicPlayer_LoopModeListLoop.yy │ │ ├── spr_ourApp_MusicPlayer_LoopModeSingleLoop │ │ ├── 364b1c9f-376d-4532-a192-d31d2ea12d3d.png │ │ ├── layers │ │ │ └── 364b1c9f-376d-4532-a192-d31d2ea12d3d │ │ │ │ └── 2fdb2bb9-9d8e-4466-b704-056d759136af.png │ │ └── spr_ourApp_MusicPlayer_LoopModeSingleLoop.yy │ │ ├── spr_ourApp_MusicPlayer_LoopModeStop │ │ ├── 4a95b8d9-6222-4468-bb27-aedd1f55787e.png │ │ ├── layers │ │ │ └── 4a95b8d9-6222-4468-bb27-aedd1f55787e │ │ │ │ └── 4d3f05b9-b0aa-4556-a1df-1ffcda387d50.png │ │ └── spr_ourApp_MusicPlayer_LoopModeStop.yy │ │ ├── spr_ourApp_Photos │ │ ├── 6e4b0649-bfde-4abe-a85d-5edf30b7285a.png │ │ ├── layers │ │ │ └── 6e4b0649-bfde-4abe-a85d-5edf30b7285a │ │ │ │ └── 8a762be1-605d-41a4-b20c-08f665b73514.png │ │ └── spr_ourApp_Photos.yy │ │ ├── spr_ourApp_Report │ │ ├── 29948eca-0f03-45b9-b8da-4c26df6a430d.png │ │ ├── layers │ │ │ └── 29948eca-0f03-45b9-b8da-4c26df6a430d │ │ │ │ └── 8e5fb81b-a34d-4fe7-818c-5c5679ef72e6.png │ │ └── spr_ourApp_Report.yy │ │ ├── spr_ourApp_WebBrowser │ │ ├── 8899b11c-983e-4dde-8d50-9bc8bdbd0689.png │ │ ├── layers │ │ │ └── 8899b11c-983e-4dde-8d50-9bc8bdbd0689 │ │ │ │ └── 3f1662ef-3f28-498c-86ed-992f1cd712e5.png │ │ └── spr_ourApp_WebBrowser.yy │ │ ├── spr_ourPhone │ │ ├── 300f9fac-cf67-482a-93d0-2eb0a137db7d.png │ │ ├── layers │ │ │ └── 300f9fac-cf67-482a-93d0-2eb0a137db7d │ │ │ │ └── b2dac599-aaac-41fc-b8ba-d623dd31637c.png │ │ └── spr_ourPhone.yy │ │ ├── spr_ourPhoneWallpaper │ │ ├── cf64f279-52aa-40cc-9c59-70a96672401d.png │ │ ├── layers │ │ │ └── cf64f279-52aa-40cc-9c59-70a96672401d │ │ │ │ └── 8339af6c-d650-4074-88fb-946c7c6e3b80.png │ │ └── spr_ourPhoneWallpaper.yy │ │ ├── spr_ourPhone_ButtonHome │ │ ├── 627094a9-b5e7-4143-bdcb-d27ed539562a.png │ │ ├── layers │ │ │ └── 627094a9-b5e7-4143-bdcb-d27ed539562a │ │ │ │ └── a530a9bc-eaff-4d51-a23a-6867526abcd5.png │ │ └── spr_ourPhone_ButtonHome.yy │ │ └── spr_sleeperhitbox │ │ ├── 256c1a87-64aa-47fb-8bf2-b10f4331dbec.png │ │ ├── layers │ │ └── 256c1a87-64aa-47fb-8bf2-b10f4331dbec │ │ │ └── 44415023-ba75-490f-98f7-604e49da9828.png │ │ └── spr_sleeperhitbox.yy └── Server │ └── CloudSleepServer │ ├── CMakeLists.txt │ ├── black_list.cpp │ ├── black_list.h │ ├── config.cpp │ ├── config.h │ ├── config │ ├── bad_word.txt │ ├── config.json │ ├── rule.json │ └── stop_char.txt │ ├── content_filter.cpp │ ├── content_filter.h │ ├── file_update_monitor.cpp │ ├── file_update_monitor.h │ ├── logger.cpp │ ├── logger.h │ ├── main.cpp │ ├── permission_mgr.cpp │ ├── permission_mgr.h │ ├── report_recorder.h │ ├── room.cpp │ ├── room.h │ ├── sleeper.cpp │ ├── sleeper.h │ ├── traffic_recorder.cpp │ ├── traffic_recorder.h │ ├── trie_tree.h │ ├── utf8tools.cpp │ ├── utf8tools.h │ ├── violation_detector.cpp │ ├── violation_detector.h │ ├── vote_counter.h │ ├── wheat_command.cpp │ ├── wheat_command.h │ ├── wheat_common.cpp │ ├── wheat_common.h │ └── wheat_error_code.h └── Tools ├── README.md └── RemoveDuplicatesLines └── deduplicate.cpp /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Source/Server/CloudSleepServer/third/asio"] 2 | path = Source/Server/CloudSleepServer/third/asio 3 | url = https://github.com/chriskohlhoff/asio.git 4 | [submodule "Source/Server/CloudSleepServer/third/json"] 5 | path = Source/Server/CloudSleepServer/third/json 6 | url = https://github.com/nlohmann/json.git 7 | -------------------------------------------------------------------------------- /Art/ChatBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ChatBackground.png -------------------------------------------------------------------------------- /Art/ChatBackground.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ChatBackground.sai2 -------------------------------------------------------------------------------- /Art/ChatBackgroundTail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ChatBackgroundTail.png -------------------------------------------------------------------------------- /Art/ChatBackgroundTail.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ChatBackgroundTail.sai2 -------------------------------------------------------------------------------- /Art/Legacy/Boy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/Boy.png -------------------------------------------------------------------------------- /Art/Legacy/Boy.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/Boy.sai2 -------------------------------------------------------------------------------- /Art/Legacy/Girl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/Girl.png -------------------------------------------------------------------------------- /Art/Legacy/Girl.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/Girl.sai2 -------------------------------------------------------------------------------- /Art/Legacy/bedBoy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/bedBoy.png -------------------------------------------------------------------------------- /Art/Legacy/bedBoy.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/bedBoy.sai2 -------------------------------------------------------------------------------- /Art/Legacy/bedEmpty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/bedEmpty.png -------------------------------------------------------------------------------- /Art/Legacy/bedEmpty.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/bedEmpty.sai2 -------------------------------------------------------------------------------- /Art/Legacy/bedGirl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/bedGirl.png -------------------------------------------------------------------------------- /Art/Legacy/bedGirl.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/Legacy/bedGirl.sai2 -------------------------------------------------------------------------------- /Art/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/logo.ico -------------------------------------------------------------------------------- /Art/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/logo.png -------------------------------------------------------------------------------- /Art/logo.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/logo.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/MusicPlayerIcons/LoopModeListLoop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/MusicPlayerIcons/LoopModeListLoop.png -------------------------------------------------------------------------------- /Art/ourPhone/MusicPlayerIcons/LoopModeListLoop.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/MusicPlayerIcons/LoopModeListLoop.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/MusicPlayerIcons/LoopModeSingleLoop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/MusicPlayerIcons/LoopModeSingleLoop.png -------------------------------------------------------------------------------- /Art/ourPhone/MusicPlayerIcons/LoopModeSingleLoop.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/MusicPlayerIcons/LoopModeSingleLoop.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/MusicPlayerIcons/LoopModeStop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/MusicPlayerIcons/LoopModeStop.png -------------------------------------------------------------------------------- /Art/ourPhone/MusicPlayerIcons/LoopModeStop.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/MusicPlayerIcons/LoopModeStop.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourAppTemplate.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourAppTemplate.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_Camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_Camera.png -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_Camera.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_Camera.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_Chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_Chat.png -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_Chat.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_Chat.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_CustomWallpaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_CustomWallpaper.png -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_CustomWallpaper.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_CustomWallpaper.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_MusicPlayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_MusicPlayer.png -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_MusicPlayer.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_MusicPlayer.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_Photos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_Photos.png -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_Photos.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_Photos.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_Report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_Report.png -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_Report.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_Report.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_WebBrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_WebBrowser.png -------------------------------------------------------------------------------- /Art/ourPhone/ourApp_WebBrowser.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourApp_WebBrowser.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourPhone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourPhone.png -------------------------------------------------------------------------------- /Art/ourPhone/ourPhone.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourPhone.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourPhoneWallpaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourPhoneWallpaper.png -------------------------------------------------------------------------------- /Art/ourPhone/ourPhoneWallpaper.sai2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourPhoneWallpaper.sai2 -------------------------------------------------------------------------------- /Art/ourPhone/ourPhone_ButtonHome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Art/ourPhone/ourPhone_ButtonHome.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 WheatBox 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WheatCloudSleep 2 | 3 | ### 编辑器:https://github.com/WheatBox/CloudSleepEngine 4 | 5 | ### 如何编译?看这里:https://docs.qq.com/doc/DTHlKbHROTWNMYUd1 6 | 7 | ### 十分感谢 @B1aNB1aN 和 @ymx-mshk 和 @zhhhhhhhh 的帮助!!Very Thanks for @B1aNB1aN And @ymx-mshk And @zhhhhhhhh !! 8 | 9 | Wheat Cloud Sleep software, which is meaningless. All you need to do is just open the software and lie down to sleep. 10 | 11 | 小麦云睡觉软件,很无意义的那种,你需要做的就是打开软件,然后躺下来睡觉。 12 | 13 | Server(C++) Source Path: 服务端(C++)源代码路径: ./Source/Server/CloudSleepServer/ 14 | 15 | Client(GameMaker) Source Path: 客户端(GameMaker)源代码路径: ./Source/CloudSleep/ 16 | 17 | ## 那么我该如何进入官方寝室睡觉呢? 18 | 19 | 在这期视频的简介区可以下载到编译后的可执行文件 https://www.bilibili.com/video/BV1gD4y1Y72T 20 | 21 | The compiled executable can be downloaded in the introduction area of this video: https://www.bilibili.com/video/BV1gD4y1Y72T 22 | 23 | ## 进入寝室后如何睡觉? 24 | 25 | 鼠标左键 - 拖动视角 | Mouse Left Button - Move Camera 26 | 27 | 鼠标右键 - 移动 或 睡觉 或 起床 | Mouse Right Button - Move Or Sleep Or Getup 28 | 29 | 鼠标滚轮 - 缩放 | Mouse Wheel - Zoom 30 | 31 | Space键 - 视角跟随睡客 | Space Key - Camera Follow Sleeper 32 | 33 | Enter键 - 聊天 | Enter - Chat 34 | 35 | ## 关于文本输入框 36 | 37 | 文本输入框使用的是 bilibili UP主 星竍 的代码,这里是BV号:BV1qP4y1s7jt,我使用的是仅单行版本,Github:https://github.com/THEASK-CN/GMS2-Textbox-Single-Line 38 | 39 | 上述库中的文本输入框的代码为 CC0-1.0 协议 40 | 41 | (注:在ourPhone中使用的文本框是我自己写的,不过因为功能不全就没太广泛使用) 42 | 43 | 文本输入框的仅单行版本原版代码里面有个BUG(我不知道别的版本有没有),那就是当镜头的位置不是(0, 0)的时候,虽然文本输入框绘制的位置依然在镜头上,但是判定没有跟随上,还在原来的位置 44 | 45 | 当然这个BUG可能是因为我用的方式不对,因为好像看星竍他本人的视频里就从没出现过这种情况,额……也不知道为啥,算了不管了 46 | 47 | 这里我是在 名为 textbox 的 Object 里的 Step事件,修改的前两行,有兴趣可以看一下,注意此处的 GetPositionXOnGUI() 和 GetPositionYOnGUI() 是我自己写的函数,非GameMaker内置,同时如果你要用这两个函数的话要注意一下这两个函数是和镜头绑定的,请确保镜头开启 48 | -------------------------------------------------------------------------------- /Source/Client dlls/dll_basic_x86.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/Client dlls/dll_basic_x86.zip -------------------------------------------------------------------------------- /Source/Client dlls/dll_x86.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/Client dlls/dll_x86.zip -------------------------------------------------------------------------------- /Source/Client dlls/dll_x86_64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/Client dlls/dll_x86_64.zip -------------------------------------------------------------------------------- /Source/CloudSleep/animcurves/animcurve_cameralinear/animcurve_cameralinear.yy: -------------------------------------------------------------------------------- 1 | { 2 | "name": "animcurve_cameraLinear", 3 | "function": 2, 4 | "channels": [ 5 | {"colour":4290799884,"visible":true,"points":[ 6 | {"th0":-0.05,"th1":0.49522895,"tv0":0.0,"tv1":0.0,"x":0.0,"y":0.0,}, 7 | {"th0":-0.504771,"th1":0.05,"tv0":0.0,"tv1":0.0,"x":1.0,"y":1.0,}, 8 | ],"resourceVersion":"1.0","name":"curve1","tags":[],"resourceType":"GMAnimCurveChannel",}, 9 | ], 10 | "parent": { 11 | "name": "Animation Curves", 12 | "path": "folders/Animation Curves.yy", 13 | }, 14 | "resourceVersion": "1.2", 15 | "tags": [], 16 | "resourceType": "GMAnimCurve", 17 | } -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/About_dlls.txt: -------------------------------------------------------------------------------- 1 | StringConverter.dll 2 | https://github.com/JoyLeeSoft/StringConverter 3 | 4 | AudioPlayerDLL.dll 5 | file_dll.dll 6 | systemCmd.dll 7 | We wrote them. -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-core-file-l1-2-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-core-file-l1-2-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-core-file-l2-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-core-file-l2-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-core-localization-l1-2-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-core-localization-l1-2-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-core-processthreads-l1-1-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-core-processthreads-l1-1-1.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-core-synch-l1-2-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-core-synch-l1-2-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-core-timezone-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-core-timezone-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-convert-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-convert-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-environment-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-environment-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-filesystem-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-filesystem-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-heap-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-heap-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-locale-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-locale-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-math-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-math-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-runtime-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-runtime-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-stdio-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-stdio-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-string-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-string-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-time-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-time-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/api-ms-win-crt-utility-l1-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/api-ms-win-crt-utility-l1-1-0.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/dll/AudioPlayerDLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/dll/AudioPlayerDLL.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/dll/StringConverter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/dll/StringConverter.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/dll/file_dll.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/dll/file_dll.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/dll/systemCmd.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/dll/systemCmd.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/fonts/SourceHanSansSC-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/fonts/SourceHanSansSC-Medium.otf -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/kernel32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/kernel32.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/msvcp140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/msvcp140.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/ucrtbase.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/ucrtbase.dll -------------------------------------------------------------------------------- /Source/CloudSleep/datafiles/vcruntime140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/datafiles/vcruntime140.dll -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Button/Create_0.gml: -------------------------------------------------------------------------------- 1 | labelText = ""; 2 | 3 | MyPressedFunction = function() {}; 4 | MyPressedFunctionArgs = undefined; 5 | 6 | width = undefined; 7 | height = undefined; 8 | 9 | // 是否是一次性按钮,如果是的话,那么会在鼠标左键单击后(不管有没有点到按钮)都会删除实例 10 | Disposable = false; 11 | 12 | color = GUIDefaultColor; 13 | 14 | 15 | mouseOnMe = false; 16 | 17 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Button/Draw_64.gml: -------------------------------------------------------------------------------- 1 | GUI_DrawLabel_ext( 2 | labelText, x, y 3 | , (width == undefined) ? undefined : width / 2 4 | , (height == undefined) ? undefined : height / 2 5 | , mouseOnMe 6 | , color 7 | ); 8 | 9 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Button/Step_0.gml: -------------------------------------------------------------------------------- 1 | var labelTextWHalf = GUI_GetStringWidthHalf(labelText); 2 | var labelTextHHalf = GUI_GetStringHeightHalf(labelText); 3 | 4 | if(IsMouseOnOurPhone) { 5 | mouseOnMe = false 6 | } else { 7 | mouseOnMe = (width == undefined) 8 | ? GUI_MouseGuiOnMe(x - labelTextWHalf, y - labelTextHHalf, x + labelTextWHalf, y + labelTextHHalf) 9 | : GUI_MouseGuiOnMe(x - width / 2, y - height / 2, x + width / 2, y + height / 2) 10 | } 11 | 12 | if(mouseOnMe == true){ 13 | GUI_SetCursorHandpoint(); 14 | 15 | gMouseOnGUI = true; 16 | 17 | if(MouseLeftPressed()) { 18 | MyPressedFunction(MyPressedFunctionArgs); 19 | } 20 | } 21 | 22 | if(Disposable && (MouseLeftPressed() || MouseRightPressed())) { 23 | instance_destroy(id); 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Button/obj_GuiElement_Button.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_GuiElement_Button", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 28 | ], 29 | "properties": [], 30 | "overriddenProperties": [], 31 | "parent": { 32 | "name": "GuiElements", 33 | "path": "folders/Objects/GuiElements.yy", 34 | }, 35 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Message/CleanUp_0.gml: -------------------------------------------------------------------------------- 1 | if(CheckStructCanBeUse(vecMessages)) { 2 | for(var i = 0; i < vecMessages.size(); i++) { 3 | if(CheckStructCanBeUse(vecMessages.Container[i])) { 4 | delete vecMessages.Container[i]; 5 | } 6 | } 7 | delete vecMessages; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Message/Create_0.gml: -------------------------------------------------------------------------------- 1 | depth = GUIMessageDepth; 2 | 3 | mySMessage = function(_text) constructor { 4 | text = _text; 5 | life = 5 * 60; 6 | }; 7 | 8 | vecMessages = new vector(); 9 | 10 | MyAdd = function(_text) { 11 | vecMessages.push_back(new mySMessage(_text)); 12 | } 13 | 14 | MyDelete = function(i) { 15 | if(CheckStructCanBeUse(vecMessages.Container[i])) { 16 | delete vecMessages.Container[i]; 17 | } 18 | array_delete(vecMessages.Container, 0, 1); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Message/Draw_75.gml: -------------------------------------------------------------------------------- 1 | for(var i = 0; i < vecMessages.size(); i++) { 2 | vecMessages.Container[i].life--; 3 | if(vecMessages.Container[i].life < 0) { 4 | MyDelete(i); 5 | continue; 6 | } 7 | 8 | var _mesText = vecMessages.Container[i].text; 9 | GUI_DrawLabel_ext( 10 | _mesText 11 | , GuiWidth() - 160 - string_length(_mesText) / 2 12 | , (string_height(_mesText) + 1) * (i + 0.5) 13 | , , 14 | , false 15 | , c_black 16 | , GUIDefaultAlpha 17 | ); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Message/obj_GuiElement_Message.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_GuiElement_Message", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":75,"eventType":8,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":12,"collisionObjectId":null,}, 28 | ], 29 | "properties": [], 30 | "overriddenProperties": [], 31 | "parent": { 32 | "name": "GuiElements", 33 | "path": "folders/Objects/GuiElements.yy", 34 | }, 35 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Page/CleanUp_0.gml: -------------------------------------------------------------------------------- 1 | delete vecChildElements; 2 | delete vecChildElementsInitY; 3 | delete vecChildElementsHeight; -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Page/Create_0.gml: -------------------------------------------------------------------------------- 1 | vecChildElements = new vector(); 2 | vecChildElementsInitY = new vector(); 3 | vecChildElementsHeight = new vector(); 4 | 5 | childElementsBottom = 0; 6 | 7 | labelText = ""; 8 | labelAlpha = 1.0; 9 | 10 | width = 256; 11 | height = 0; // height 的真正初始化需要在 GuiElement_CreatePage() 找到 12 | 13 | visible = false; 14 | working = false; 15 | 16 | MyStartWork = function() { 17 | if(working == false) { 18 | working = true; 19 | 20 | DebugMes(labelText + " Page On"); 21 | 22 | for(var i = 0; i < vecChildElements.size(); i++) { 23 | instance_activate_object(vecChildElements.Container[i]); 24 | } 25 | } 26 | } 27 | 28 | MyStopWork = function() { 29 | if(working == true) { 30 | working = false; 31 | 32 | DebugMes(labelText + " Page Off"); 33 | 34 | for(var i = 0; i < vecChildElements.size(); i++) { 35 | instance_deactivate_object(vecChildElements.Container[i]); 36 | } 37 | } 38 | } 39 | 40 | scrollYSpeed = GUIScrollYSpeed; 41 | 42 | scrollYPrev = 0; 43 | scrollY = 0; 44 | MyScrollElements = function(_yAdd) { 45 | for(var i = 0; i < vecChildElements.size(); i++) { 46 | if(InstanceExists(vecChildElements.Container[i]) == false) { 47 | continue; 48 | } 49 | switch(vecChildElements.Container[i].object_index) { 50 | case textbox: 51 | textbox_set_position(vecChildElements.Container[i], 0, _yAdd, true); 52 | break; 53 | default: 54 | vecChildElements.Container[i].y += _yAdd; 55 | } 56 | } 57 | } 58 | 59 | scrollBarWidthMax = 16; 60 | scrollBarWidthMin = 8; 61 | scrollBarWidth = scrollBarWidthMin; 62 | scrollBarIsDragging = false; 63 | scrollBarDraggingOffY = 0; 64 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Page/Draw_64.gml: -------------------------------------------------------------------------------- 1 | // SaveDrawSettings(); 2 | 3 | draw_set_color(GUIDefaultColor); 4 | draw_set_alpha(GUIDefaultAlpha); 5 | GUI_DrawRectangle(x, y, x + width, y + height); 6 | 7 | if(scrollY < 0) { 8 | labelAlpha = lerp(labelAlpha, 0, 0.1); 9 | } else { 10 | labelAlpha = lerp(labelAlpha, 1, 0.1); 11 | } 12 | 13 | 14 | var _scrollBarX = x + width + 1; 15 | var _scrollBarRight = _scrollBarX + scrollBarWidth; 16 | var _scrollBarY = y + -scrollY / childElementsBottom * height; 17 | var _scrollBarBottom = y + (-scrollY + height) / childElementsBottom * height; 18 | 19 | var _scrollBarBgY = y; 20 | var _scrollBarBgBottom = y + height; 21 | 22 | var _scrollBarHighlight = false; 23 | 24 | if(GUI_MouseGuiOnMe(_scrollBarX, _scrollBarBgY, _scrollBarX + scrollBarWidthMax, _scrollBarBgBottom)) { 25 | gMouseOnGUI = true; 26 | 27 | scrollBarWidth = lerp(scrollBarWidth, scrollBarWidthMax, 0.2); 28 | 29 | var _mouseYGui = GetPositionYOnGUI(mouse_y); 30 | if(_mouseYGui > _scrollBarY && _mouseYGui < _scrollBarBottom) { 31 | _scrollBarHighlight = true; 32 | 33 | if(scrollBarIsDragging == false) 34 | GUI_SetCursorHandpoint(); 35 | } 36 | 37 | if(MouseLeftPressed()) { 38 | scrollBarIsDragging = true; 39 | 40 | if(_mouseYGui > _scrollBarY && _mouseYGui < _scrollBarBottom) { 41 | scrollBarDraggingOffY = _mouseYGui - _scrollBarY; 42 | } else { 43 | scrollBarDraggingOffY = (_scrollBarBottom - _scrollBarY) / 2; 44 | } 45 | } 46 | } else { 47 | scrollBarWidth = lerp(scrollBarWidth, scrollBarWidthMin, 0.2); 48 | } 49 | 50 | if(scrollBarIsDragging) { 51 | gMouseOnGUI = true; 52 | _scrollBarHighlight = true; 53 | 54 | if(MouseLeftHold() == false) { 55 | scrollBarIsDragging = false; 56 | } else { 57 | scrollY = ((GetPositionYOnGUI(mouse_y) - y - scrollBarDraggingOffY) / height * childElementsBottom); 58 | 59 | if(scrollY + height > childElementsBottom) scrollY = childElementsBottom - height; 60 | if(scrollY < 0) scrollY = 0; 61 | 62 | scrollY = -scrollY; 63 | } 64 | } 65 | 66 | _scrollBarRight = _scrollBarX + scrollBarWidth; 67 | 68 | draw_set_color(GUIDefaultColor); 69 | draw_set_alpha(1.0); 70 | GUI_DrawRectangle(_scrollBarX, _scrollBarBgY, _scrollBarRight, _scrollBarBgBottom, false); 71 | 72 | draw_set_color(c_white); 73 | draw_set_alpha(GUIDefaultAlpha); 74 | GUI_DrawRectangle(_scrollBarX, _scrollBarY, _scrollBarRight, _scrollBarBottom, false); 75 | if(_scrollBarHighlight) { 76 | draw_set_alpha(GUIHighLightAlpha); 77 | GUI_DrawRectangle(_scrollBarX, _scrollBarY, _scrollBarRight, _scrollBarBottom, false); 78 | } 79 | 80 | draw_set_color(c_white); 81 | draw_set_alpha(1.0); 82 | 83 | 84 | // LoadDrawSettings(); 85 | 86 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Page/Draw_75.gml: -------------------------------------------------------------------------------- 1 | // SaveDrawSettings(); 2 | 3 | draw_set_color(GUIDefaultColor); 4 | draw_set_alpha(labelAlpha); 5 | GUI_DrawRectangle(x, y, x + width, y + 32); 6 | 7 | draw_set_color(c_white); 8 | GUI_DrawText(x + width / 2, y + string_height(labelText) / 2, labelText, true); 9 | 10 | // LoadDrawSettings(); 11 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Page/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(working == false) { 2 | visible = false; 3 | } else { 4 | visible = true; 5 | 6 | if(GUI_MouseGuiOnMe(x, y, x + width, y + height)) { 7 | gMouseOnGUI = true; 8 | /* 9 | if(mouse_wheel_up()) { 10 | if(scrollY > 0) { 11 | MyScrollElements(scrollYSpeed); 12 | scrollY -= scrollYSpeed; 13 | } 14 | } else if(mouse_wheel_down()) { 15 | if(InstanceExists(vecChildElements.back())) 16 | if(0 + scrollYSpeed * 2 < vecChildElements.back().bbox_top) { 17 | MyScrollElements(-scrollYSpeed); 18 | scrollY += scrollYSpeed; 19 | } 20 | }*/ 21 | 22 | scrollY = ScrollYCalculate(scrollY, scrollYSpeed, 0, height, childElementsBottom); 23 | } 24 | 25 | if(scrollY != scrollYPrev) { 26 | MyScrollElements(scrollY - scrollYPrev); 27 | scrollYPrev = scrollY; 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_Page/obj_GuiElement_Page.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_GuiElement_Page", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":12,"collisionObjectId":null,}, 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":75,"eventType":8,"collisionObjectId":null,}, 30 | ], 31 | "properties": [], 32 | "overriddenProperties": [], 33 | "parent": { 34 | "name": "GuiElements", 35 | "path": "folders/Objects/GuiElements.yy", 36 | }, 37 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_SlidingRod/Create_0.gml: -------------------------------------------------------------------------------- 1 | labelText = ""; 2 | 3 | pMyVar = {}; 4 | 5 | variableMin = 0; 6 | variableMax = 0; 7 | 8 | handleWidth = 16; 9 | handleHeight = 24; 10 | 11 | width = 256; 12 | height = 48; // 该组件的该值不会变动 13 | 14 | color = GUIDefaultColor; 15 | 16 | // 取整函数,记得要在结尾写入 return 17 | MyIntFunc = function(n) {} 18 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_SlidingRod/obj_GuiElement_SlidingRod.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_GuiElement_SlidingRod", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 27 | ], 28 | "properties": [], 29 | "overriddenProperties": [], 30 | "parent": { 31 | "name": "GuiElements", 32 | "path": "folders/Objects/GuiElements.yy", 33 | }, 34 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_GuiElement_SlidingRod_Time/obj_GuiElement_SlidingRod_Time.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_GuiElement_SlidingRod_Time", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": { 12 | "name": "obj_GuiElement_SlidingRod", 13 | "path": "objects/obj_GuiElement_SlidingRod/obj_GuiElement_SlidingRod.yy", 14 | }, 15 | "physicsObject": false, 16 | "physicsSensor": false, 17 | "physicsShape": 1, 18 | "physicsGroup": 1, 19 | "physicsDensity": 0.5, 20 | "physicsRestitution": 0.1, 21 | "physicsLinearDamping": 0.1, 22 | "physicsAngularDamping": 0.1, 23 | "physicsFriction": 0.2, 24 | "physicsStartAwake": true, 25 | "physicsKinematic": false, 26 | "physicsShapePoints": [], 27 | "eventList": [ 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 29 | ], 30 | "properties": [], 31 | "overriddenProperties": [], 32 | "parent": { 33 | "name": "GuiElements", 34 | "path": "folders/Objects/GuiElements.yy", 35 | }, 36 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_SceneDefaultBackground/Create_0.gml: -------------------------------------------------------------------------------- 1 | depth = SceneDepthBackgrounds + 100; 2 | 3 | camxPrevious = undefined; 4 | camyPrevious = undefined; 5 | 6 | myDefaultBackground = -1; 7 | 8 | mysurf = -1; 9 | MySurfCheckAndRemake = function() { 10 | var _willFreeSurf = false; 11 | 12 | if(gSceneStruct.defaultBackground < 0 || gSceneStruct.defaultBackground >= array_length(gBackgroundsStruct.materials)) { 13 | _willFreeSurf = true; 14 | } else if(sprite_exists(gBackgroundsSpritesStruct.sprites[gSceneStruct.defaultBackground]) == false) { 15 | _willFreeSurf = true; 16 | } 17 | 18 | if(_willFreeSurf) { 19 | MyFreeSurf(); 20 | return; 21 | } 22 | 23 | if(mysurf != -1) { 24 | if(surface_exists(mysurf)) { 25 | return; 26 | } 27 | } 28 | 29 | mysurf = surface_create(GuiWidth(), GuiHeight()); 30 | 31 | surface_set_target(mysurf); 32 | 33 | var _spr = gBackgroundsSpritesStruct.sprites[gSceneStruct.defaultBackground]; 34 | 35 | var _camScale = CameraScale(); 36 | 37 | var _sprW = sprite_get_width(_spr); 38 | var _sprH = sprite_get_height(_spr); 39 | 40 | var _xoff = GetPositionXGridStandardization(CameraX(), _sprW); 41 | var _yoff = GetPositionYGridStandardization(CameraY(), _sprH); 42 | 43 | var _ixlen = ceil(CameraWidth() / _sprW) + 1; 44 | var _iylen = ceil(CameraHeight() / _sprH) + 1; 45 | 46 | for(var iy = 0; iy < _iylen; iy++) { 47 | for(var ix = 0; ix < _ixlen; ix++) { 48 | draw_sprite_ext(_spr, 0 49 | , GetPositionXOnGUI(_xoff + ix * _sprW) 50 | , GetPositionYOnGUI(_yoff + iy * _sprH) 51 | , 1 / _camScale, 1 / _camScale, 0, c_white, 1.0 52 | ); 53 | } 54 | } 55 | 56 | surface_reset_target(); 57 | } 58 | 59 | MyFreeSurf = function() { 60 | if(mysurf != -1) { 61 | if(surface_exists(mysurf)) { 62 | surface_free(mysurf); 63 | mysurf = -1; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_SceneDefaultBackground/Draw_0.gml: -------------------------------------------------------------------------------- 1 | var _camx = CameraX(); 2 | var _camy = CameraY(); 3 | var _camScale = CameraScale(); 4 | 5 | if(gSceneStruct[$ "defaultBackground"] != undefined && myDefaultBackground != gSceneStruct.defaultBackground) { 6 | myDefaultBackground = gSceneStruct.defaultBackground; 7 | MyFreeSurf(); 8 | } else 9 | if(camxPrevious != _camx || camyPrevious != _camy) { 10 | MyFreeSurf(); 11 | 12 | camxPrevious = _camx; 13 | camyPrevious = _camy; 14 | } 15 | 16 | MySurfCheckAndRemake(); 17 | 18 | if(mysurf != -1) { 19 | if(surface_exists(mysurf)) { 20 | draw_surface_ext(mysurf, _camx, _camy, _camScale, _camScale, 0, c_white, 1.0); 21 | } 22 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_SceneDefaultBackground/obj_SceneDefaultBackground.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_SceneDefaultBackground", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,}, 27 | ], 28 | "properties": [], 29 | "overriddenProperties": [], 30 | "parent": { 31 | "name": "Scene", 32 | "path": "folders/Objects/Scene.yy", 33 | }, 34 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_background/Create_0.gml: -------------------------------------------------------------------------------- 1 | materialId = 0; 2 | 3 | 4 | inited = false; -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_background/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(inited == false) { 2 | inited = true; 3 | 4 | sprite_index = gBackgroundsSpritesStruct.sprites[materialId]; 5 | 6 | depth = SceneDepthBackgrounds; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_background/obj_background.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_background", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 27 | ], 28 | "properties": [], 29 | "overriddenProperties": [], 30 | "parent": { 31 | "name": "Scene", 32 | "path": "folders/Objects/Scene.yy", 33 | }, 34 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_bed/Create_0.gml: -------------------------------------------------------------------------------- 1 | // mask_index = spr_bedHitbox; 2 | 3 | materialId = 0; 4 | bedSleepId = -1; 5 | // bedSleeperName = undefined; 6 | // empty = false; 7 | 8 | MySleep = function(_sleeperType) { 9 | if(array_length(gArrBedSleepSprites) > materialId) 10 | if(array_length(gArrBedSleepSprites[materialId]) > _sleeperType) 11 | if(sprite_exists(gArrBedSleepSprites[materialId][_sleeperType])) { 12 | sprite_index = gArrBedSleepSprites[materialId][_sleeperType]; 13 | } 14 | // DebugMes(["BedSleep", materialId, _sleeperType, sprite_index]) 15 | } 16 | 17 | MyGetup = function() { 18 | sprite_index = mask_index; 19 | } 20 | 21 | 22 | inited = false; -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_bed/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(inited == false) { 2 | inited = true; 3 | 4 | sprite_index = gBedsSpritesStruct.sprites[materialId]; 5 | mask_index = sprite_index; 6 | 7 | mp_grid_add_instances(grid, id, true); 8 | } 9 | 10 | SynchDepth(); 11 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_bed/obj_bed.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_bed", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 27 | ], 28 | "properties": [], 29 | "overriddenProperties": [], 30 | "parent": { 31 | "name": "Scene", 32 | "path": "folders/Objects/Scene.yy", 33 | }, 34 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_buttonshowsleeperid/Create_0.gml: -------------------------------------------------------------------------------- 1 | labelText = ""; 2 | 3 | mouseOnMe = false; 4 | 5 | x = 160; 6 | y = 64; 7 | width = 224; 8 | height = 36; 9 | 10 | depth = GUIDepth; 11 | 12 | if(DEBUGMODE) { 13 | x = 512; 14 | } 15 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_buttonshowsleeperid/Draw_64.gml: -------------------------------------------------------------------------------- 1 | // SaveDrawSettings(); 2 | 3 | if(gShowSleeperId == true) { 4 | labelText = "点我关闭显示 睡客ID"; 5 | } else { 6 | labelText = "点我开启显示 睡客ID"; 7 | } 8 | 9 | // GUI_DrawLabel_ext(labelText, x, y, width / 2, height / 2, false, , image_alpha); 10 | 11 | draw_set_color(GUIDefaultColor); 12 | draw_set_alpha(image_alpha); 13 | 14 | GUI_DrawRectangle(x - width / 2, y - height / 2, x + width / 2, y + height / 2, false); 15 | draw_set_color(c_white); 16 | draw_set_alpha(image_alpha / 2 + 0.5); 17 | GUI_DrawText(x, y, labelText, true); 18 | 19 | draw_set_alpha(1.0); 20 | 21 | // LoadDrawSettings(); -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_buttonshowsleeperid/Step_0.gml: -------------------------------------------------------------------------------- 1 | mouseOnMe = GUI_MouseGuiOnMe(x - width / 2, y - height / 2, x + width / 2, y + height / 2); 2 | 3 | if(mouseOnMe) { 4 | gMouseOnGUI = true; 5 | 6 | if(mouse_check_button_pressed(mb_left)) { 7 | gShowSleeperId = !gShowSleeperId; 8 | 9 | if(instance_exists(obj_client)) { 10 | obj_client.MyChatHistorySurfRefresh(); 11 | } 12 | } 13 | 14 | image_alpha = lerp(image_alpha, 1.0, 0.1); 15 | } else { 16 | image_alpha = lerp(image_alpha, 0.1, 0.1); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_buttonshowsleeperid/obj_buttonshowsleeperid.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_buttonShowSleeperId", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 28 | ], 29 | "properties": [], 30 | "overriddenProperties": [], 31 | "parent": { 32 | "name": "buttons", 33 | "path": "folders/Objects/buttons.yy", 34 | }, 35 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_camera/Create_0.gml: -------------------------------------------------------------------------------- 1 | depth = -11451; 2 | 3 | cameraCenterX = NewSleeperPosX; 4 | cameraCenterY = NewSleeperPosY; 5 | 6 | scaleMulitply = 0.9; 7 | 8 | mouseXPrevious = undefined; 9 | mouseYPrevious = undefined; 10 | 11 | camera_set_view_pos(view_camera[0], cameraCenterX - camera_get_view_width(view_camera[0]) / 2, cameraCenterY - camera_get_view_height(view_camera[0]) / 2); 12 | 13 | canControlDelayTime = 2; 14 | 15 | findingPlayer = true; 16 | findingPlayerCurveX = 1; 17 | findingPlayerStartX = cameraCenterX; 18 | findingPlayerStartY = cameraCenterY; 19 | 20 | mouseCameraMoveLock = false; 21 | 22 | MyCameraLinear = function(curveX, a, b) { 23 | var curve = animcurve_get(animcurve_cameraLinear); 24 | var curveY = animcurve_channel_evaluate(curve.channels[0], curveX); 25 | return a + (b - a) * curveY; 26 | } 27 | 28 | windowWidth = 1280; 29 | windowHeight = 720; 30 | 31 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_camera/Step_1.gml: -------------------------------------------------------------------------------- 1 | GUI_SetCursorDefault(); 2 | 3 | 4 | var w = window_get_width(); 5 | var h = window_get_height(); 6 | 7 | 8 | gWindowResized = false; 9 | if((w != windowWidth || h != windowHeight) && surface_exists(application_surface) && (w != 0 && h != 0)) { 10 | DebugMes(["WindowResize", w, h]); 11 | gWindowResized = true; 12 | 13 | var camw = CameraWidth(); 14 | var camh = CameraHeight(); 15 | 16 | if(w / h > 16 / 9) { // 拉长了,比16:9长 17 | camh = camw * (h / w); 18 | } else { // 拉高了,比16:9高 19 | camw = camh * (w / h); 20 | } 21 | 22 | surface_resize(application_surface, w, h); 23 | 24 | camera_set_view_size(view_camera[0], camw, camh); 25 | 26 | windowWidth = w; 27 | windowHeight = h; 28 | } 29 | 30 | InstancesOptimize(); 31 | 32 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_camera/obj_camera.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_camera", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":1,"eventType":3,"collisionObjectId":null,}, 28 | ], 29 | "properties": [], 30 | "overriddenProperties": [], 31 | "parent": { 32 | "name": "Objects", 33 | "path": "folders/Objects.yy", 34 | }, 35 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_choosesleepertypebutton/Create_0.gml: -------------------------------------------------------------------------------- 1 | type = SleeperType.Boy; 2 | 3 | mask_index = spr_chooseSleeperTypeButtonHitbox; 4 | 5 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_choosesleepertypebutton/Draw_0.gml: -------------------------------------------------------------------------------- 1 | switch(type) { 2 | case SleeperType.Girl: 3 | sprite_index = spr_Girl; 4 | break; 5 | case SleeperType.Boy: 6 | sprite_index = spr_Boy; 7 | break; 8 | } 9 | 10 | if(type == myType) { 11 | image_xscale = lerp(image_xscale, 1.2, 0.2); 12 | } else if(mouse_x >= bbox_left && mouse_y >= bbox_top && mouse_x <= bbox_right && mouse_y <= bbox_bottom) { 13 | image_xscale = lerp(image_xscale, 1.2, 0.2); 14 | if(mouse_check_button_pressed(mb_left)) { 15 | myType = type; 16 | } 17 | } else { 18 | image_xscale = lerp(image_xscale, 1, 0.2); 19 | } 20 | image_yscale = image_xscale; 21 | 22 | draw_self(); 23 | 24 | if(type == myType) { 25 | draw_set_color(c_white); 26 | draw_set_alpha(0.4); 27 | draw_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, false); 28 | draw_set_alpha(1); 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_choosesleepertypebutton/obj_choosesleepertypebutton.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_chooseSleeperTypeButton", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 27 | ], 28 | "properties": [], 29 | "overriddenProperties": [], 30 | "parent": { 31 | "name": "Legacy", 32 | "path": "folders/Objects/mainMenu/Legacy.yy", 33 | }, 34 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_client/Alarm_0.gml: -------------------------------------------------------------------------------- 1 | if(mySleeperId < 0) { 2 | alarm_set(0, synchPosRateTime); 3 | exit; 4 | } 5 | 6 | if(instance_exists(sleepers[mySleeperId])) { 7 | if(sleepers[mySleeperId].MyPathIsRunning()) { 8 | alarm_set(0, 2); 9 | exit; 10 | } 11 | 12 | SendPos(sleepers[mySleeperId].x, sleepers[mySleeperId].y); 13 | } 14 | 15 | alarm_set(0, synchPosRateTime); 16 | 17 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_client/Alarm_1.gml: -------------------------------------------------------------------------------- 1 | var _arrSiz = array_length(gDecoratesSpritesStruct.sprites); 2 | for(var i = 0; i < _arrSiz; i++) { 3 | sprite_set_bbox_mode(gDecoratesSpritesStruct.sprites[i], bboxmode_automatic); 4 | sprite_collision_mask(gDecoratesSpritesStruct.sprites[i], false, bboxmode_automatic, 0, 0, 0, 0, bboxkind_precise, 128); 5 | /*DebugMes([ 6 | sprite_get_bbox_left(gDecoratesSpritesStruct.sprites[i]), 7 | sprite_get_bbox_top(gDecoratesSpritesStruct.sprites[i]), 8 | sprite_get_bbox_right(gDecoratesSpritesStruct.sprites[i]), 9 | sprite_get_bbox_bottom(gDecoratesSpritesStruct.sprites[i]), 10 | ]);*/ 11 | } 12 | _arrSiz = array_length(gSleepersSpritesStruct.sprites); 13 | for(var i = 0; i < _arrSiz; i++) { 14 | sprite_collision_mask(gSleepersSpritesStruct.sprites[i], false, bboxmode_automatic, 0, 0, 0, 0, bboxkind_precise, 0); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_client/CleanUp_0.gml: -------------------------------------------------------------------------------- 1 | delete vecChatHistory; 2 | delete vecChatHistorySleeperId; 3 | delete vecChatHistoryColor; -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_client/Draw_64.gml: -------------------------------------------------------------------------------- 1 | /*draw_set_color(#B3CCB6); 2 | if(IsNight()) { 3 | draw_set_alpha(0.3); 4 | } else { 5 | draw_set_alpha(0.5); 6 | } 7 | 8 | draw_rectangle(0, 0, GuiWidth(), GuiHeight(), false);*/ 9 | 10 | if(myTextBox != noone) { 11 | draw_set_color(c_white); 12 | draw_set_alpha(0.5); 13 | draw_rectangle(12, GuiHeight() - 48, 12 + 950, GuiHeight() - 48 + 28, false); 14 | } 15 | 16 | if(DEBUGMODE) { 17 | draw_set_alpha(1.0); 18 | draw_set_color(c_black); 19 | draw_text_transformed(0, 18, debugStrBufs, 0.7, 0.7, 0); 20 | } 21 | 22 | draw_set_alpha(1.0); 23 | draw_set_color(c_white); 24 | 25 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_client/obj_client.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_client", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":68,"eventType":7,"collisionObjectId":null,}, 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":2,"collisionObjectId":null,}, 30 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":12,"collisionObjectId":null,}, 31 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":75,"eventType":8,"collisionObjectId":null,}, 32 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":1,"eventType":2,"collisionObjectId":null,}, 33 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":2,"eventType":2,"collisionObjectId":null,}, 34 | ], 35 | "properties": [], 36 | "overriddenProperties": [], 37 | "parent": { 38 | "name": "Objects", 39 | "path": "folders/Objects.yy", 40 | }, 41 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_clientconnect/Create_0.gml: -------------------------------------------------------------------------------- 1 | depth = -12345; 2 | 3 | /* 4 | var serverAddressData = ReadAddress("ServerAddress.txt"); 5 | if(serverAddressData == -1) { 6 | show_message("无法正常打开或读取文件 ServerAddress.txt\n请确认文件中的信息格式为xxx.xxx.xxx.xxx:yyyyy\n(x为服务器IP,y为服务器端口)"); 7 | game_end(); 8 | } 9 | serverIP = serverAddressData[0]; 10 | serverPort = real(serverAddressData[1]); 11 | */ 12 | socket = network_create_socket(network_socket_tcp); 13 | 14 | network_set_config(network_config_connect_timeout, 10000); 15 | network_connect_raw_async(socket, serverIP, serverPort); 16 | 17 | getDrawDots = function() { 18 | static num = 0, rate = 20; 19 | num++; 20 | if(num >= 6 * rate) num = 0; 21 | return floor(num / rate); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_clientconnect/Draw_75.gml: -------------------------------------------------------------------------------- 1 | draw_set_font(fontRegular); 2 | draw_set_color(c_white); 3 | 4 | var strDots = ""; 5 | var dotsNum = getDrawDots(); 6 | for(var i = 0; i < dotsNum; i++) { 7 | strDots += "."; 8 | } 9 | draw_text(320, 320, "正在连接服务器" + strDots); 10 | 11 | gMouseOnGUI = true; 12 | 13 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_clientconnect/Other_68.gml: -------------------------------------------------------------------------------- 1 | var asyncType = async_load[? "type"]; 2 | 3 | if(asyncType == network_type_non_blocking_connect) { 4 | var asyncSucceed = async_load[? "succeeded"]; 5 | 6 | if(asyncSucceed == 1) { 7 | // show_message("~连接服务器 " + serverIP + ":" + string(serverPort) + " 成功~"); 8 | // room_goto(rm_bedroom); 9 | instance_destroy(id); 10 | } else { 11 | show_message("连接服务器 " + serverIP + ":" + string(serverPort) + " 失败!!!"); 12 | GameRestart(); 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_clientconnect/obj_clientconnect.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_clientConnect", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":68,"eventType":7,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":75,"eventType":8,"collisionObjectId":null,}, 28 | ], 29 | "properties": [], 30 | "overriddenProperties": [], 31 | "parent": { 32 | "name": "Objects", 33 | "path": "folders/Objects.yy", 34 | }, 35 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_day_and_night/CleanUp_0.gml: -------------------------------------------------------------------------------- 1 | application_surface_draw_enable(true); 2 | 3 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_day_and_night/Create_0.gml: -------------------------------------------------------------------------------- 1 | daytime = 0; 2 | 3 | application_surface_draw_enable(false); 4 | 5 | shader = shd_day_and_night; 6 | 7 | u_col = shader_get_uniform(shader,"col"); 8 | u_con_sat_brt = shader_get_uniform(shader, "con_sat_brt"); 9 | 10 | s_lights = shader_get_sampler_index(shader, "lights"); 11 | tex_lights = -1; 12 | surf_lights = -1; 13 | 14 | color_mix = -1; 15 | color[0][0] = undefined; 16 | 17 | con_sat_brt_mix = -1; 18 | con_sat_brt[0][0] = undefined; 19 | 20 | key_previous = -1; 21 | key_next = -1; 22 | 23 | add_key_time(20, 27, 58, 0.8, 0.8, 0.0, 2.5, 0.7); // 午夜 24 | add_key_time(20, 27, 58, 0.8, 0.8, 0.0, 2.5, 0.7); // 午夜 25 | add_key_time(20, 27, 58, 0.8, 0.8, 0.0, 2.5, 0.7); // 午夜 26 | 27 | add_key_time(20, 27, 58, 0.9, 0.9, 0.0, 2.0, 0.75); // 后半夜 28 | add_key_time(20, 27, 58, 0.9, 0.9, 0.0, 1.5, 0.6); // 后半夜 29 | 30 | add_key_time(180, 170, 190, 0.9, 0.9, 0.04, 1.0, 0.4); // 凌晨 31 | 32 | add_key_time(254, 255, 250, 1.0, 0.9, 0.07, 0, 0); // 清晨 33 | add_key_time(254, 255, 250, 1.0, 0.9, 0.07, 0, 0); // 清晨 34 | 35 | add_key_time(240, 240, 240, 1.0, 1.0, 0.07, 0, 0); // 上午 36 | add_key_time(240, 240, 240, 1.0, 1.0, 0.07, 0, 0); // 上午 37 | add_key_time(240, 240, 240, 1.0, 1.0, 0.07, 0, 0); // 上午 38 | add_key_time(240, 240, 240, 1.0, 1.0, 0.07, 0, 0); // 上午 39 | 40 | add_key_time(230, 230, 230, 1.0, 1.0, 0.07, 0, 0); // 中午 41 | add_key_time(230, 230, 230, 1.0, 1.0, 0.07, 0, 0); // 中午 42 | add_key_time(230, 230, 230, 1.0, 1.0, 0.07, 0, 0); // 中午 43 | add_key_time(230, 230, 230, 1.0, 1.0, 0.07, 0, 0); // 中午 44 | 45 | add_key_time(180, 180, 180, 1.0, 1.0, 0.07, 0, 0); // 下午 46 | 47 | add_key_time(165, 140, 140, 1.1, 1.0, 0.07, 0, 0); // 傍晚 48 | 49 | add_key_time(80, 80, 84, 1.0, 0.9, 0.07, 1.0, 0.3); // 夜晚 50 | add_key_time(80, 80, 84, 1.0, 0.9, 0.07, 1.0, 0.3); // 夜晚 51 | add_key_time(20, 27, 58, 1.0, 0.9, 0.07, 2.0, 0.75); // 夜晚 52 | add_key_time(20, 27, 58, 1.0, 0.9, 0.07, 2.0, 0.75); // 夜晚 53 | add_key_time(20, 27, 58, 1.0, 0.9, 0.04, 2.0, 0.75); // 夜晚 54 | add_key_time(20, 27, 58, 1.0, 0.9, 0.01, 2.0, 0.75); // 夜晚 55 | 56 | keytimesCount = array_length(color); 57 | /* 58 | var layer_night_reflection = layer_get_id("night_reflection"); 59 | layer_script_begin(layer_night_reflection, set_alpha); 60 | layer_script_end(layer_night_reflection, reset_alpha); 61 | */ 62 | u_alpha = shader_get_uniform(shd_alpha, "alpha"); 63 | alpha = 0; 64 | 65 | 66 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_day_and_night/Draw_74.gml: -------------------------------------------------------------------------------- 1 | if(!surface_exists(surf_lights)) { 2 | surf_lights = surface_create(surface_get_width(application_surface), surface_get_height(application_surface)); 3 | tex_lights = surface_get_texture(surf_lights); 4 | } 5 | 6 | // surface_set_target(surf_lights); 7 | /* 8 | draw_clear(c_black); 9 | gpu_set_blendmode(bm_add); 10 | gpu_set_tex_filter(true); 11 | 12 | var lights_strength = abs(daytime / 24 - 0.5) + 0.5; 13 | lights_strength = 1; 14 | var vx = camera_get_view_x(view_camera[0]); 15 | var vy = camera_get_view_y(view_camera[0]); 16 | with(obj_lightParent) { 17 | //draw_self(); 18 | draw_sprite_ext(sprite_index, image_index, x - vx, y - vy, 19 | image_xscale, image_yscale, 20 | image_angle, image_blend, image_alpha * lights_strength); 21 | } 22 | 23 | gpu_set_tex_filter(false); 24 | gpu_set_blendmode(bm_normal); 25 | */ 26 | // surface_reset_target(); 27 | 28 | 29 | shader_set(shader); 30 | shader_set_uniform_f_array(u_col, color_mix); 31 | shader_set_uniform_f_array(u_con_sat_brt, con_sat_brt_mix); 32 | texture_set_stage(s_lights, tex_lights); 33 | 34 | if(surface_exists(application_surface)) { 35 | draw_surface_ext(application_surface, 0, 0, 1, 1, 0, c_white, 1); 36 | } 37 | 38 | shader_reset(); 39 | 40 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_day_and_night/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(gAutoDayNight) 2 | daytime = (current_hour + current_minute / 60); 3 | 4 | var time = daytime / 24; 5 | 6 | key_previous = min(floor(time * keytimesCount), keytimesCount - 1); 7 | key_next = (key_previous + 1) mod keytimesCount; 8 | 9 | var lerp_amt = (time - key_previous / keytimesCount) * keytimesCount; 10 | 11 | color_mix = [ 12 | lerp(color[key_previous][0], color[key_next][0], lerp_amt), 13 | lerp(color[key_previous][1], color[key_next][1], lerp_amt), 14 | lerp(color[key_previous][2], color[key_next][2], lerp_amt), 15 | ]; 16 | 17 | con_sat_brt_mix = [ 18 | lerp(con_sat_brt[key_previous][0], con_sat_brt[key_next][0], lerp_amt), 19 | lerp(con_sat_brt[key_previous][1], con_sat_brt[key_next][1], lerp_amt), 20 | lerp(con_sat_brt[key_previous][2], con_sat_brt[key_next][2], lerp_amt), 21 | 22 | lerp(con_sat_brt[key_previous][3], con_sat_brt[key_next][3], lerp_amt), 23 | lerp(con_sat_brt[key_previous][4], con_sat_brt[key_next][4], lerp_amt), 24 | ]; 25 | 26 | alpha = clamp(sin((2 * daytime + 0.5) * 3.14) * 1.0 - 0.1, 0, 1); 27 | 28 | 29 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_day_and_night/obj_day_and_night.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_day_and_night", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":12,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":74,"eventType":8,"collisionObjectId":null,}, 29 | ], 30 | "properties": [], 31 | "overriddenProperties": [], 32 | "parent": { 33 | "name": "Day Night", 34 | "path": "folders/Day Night.yy", 35 | }, 36 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_decorate/Create_0.gml: -------------------------------------------------------------------------------- 1 | materialId = 0; 2 | 3 | overlappingSleeper = false; 4 | /// @desc 与当前客户端控制的睡客重合 5 | MyOverlapSleeper = function() { 6 | overlappingSleeper = true; 7 | } 8 | 9 | 10 | inited = false; -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_decorate/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(inited == false) { 2 | inited = true; 3 | 4 | sprite_index = gDecoratesSpritesStruct.sprites[materialId]; 5 | mask_index = sprite_index; 6 | 7 | mp_grid_add_instances(grid, id, true); 8 | } 9 | 10 | if(overlappingSleeper) { 11 | overlappingSleeper = false; 12 | image_alpha = lerp(image_alpha, gDecoratesOverlappingSleeperAlpha, 0.1); 13 | } else { 14 | image_alpha = lerp(image_alpha, 1.0, 0.1); 15 | } 16 | 17 | SynchDepth(); 18 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_decorate/obj_decorate.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_decorate", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 27 | ], 28 | "properties": [], 29 | "overriddenProperties": [], 30 | "parent": { 31 | "name": "Scene", 32 | "path": "folders/Objects/Scene.yy", 33 | }, 34 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_emoteRoulette/Create_0.gml: -------------------------------------------------------------------------------- 1 | working = false; 2 | 3 | arrEmoteSprites = []; 4 | 5 | if(array_length(gArrSleeperEmoteSprites) > myType) 6 | if(is_array(gArrSleeperEmoteSprites[myType])) 7 | arrEmoteSprites = gArrSleeperEmoteSprites[myType]; 8 | 9 | arrEmoteSpritesLen = array_length(arrEmoteSprites); 10 | 11 | blocksInOnePage = 12; 12 | 13 | blockAreaDir = 360 / blocksInOnePage; 14 | 15 | pointDirection = 0; 16 | pointBlockIndex = 0; 17 | 18 | x = 360; 19 | y = 360; 20 | radius = 192; 21 | 22 | spriteOffsetX = sprite_get_xoffset(gSleepersSpritesStruct.sprites[myType]); 23 | spriteOffsetY = sprite_get_yoffset(gSleepersSpritesStruct.sprites[myType]); 24 | spriteWidth = sprite_get_width(gSleepersSpritesStruct.sprites[myType]); 25 | spriteHeight = sprite_get_height(gSleepersSpritesStruct.sprites[myType]); 26 | 27 | 28 | MyEmoteIdStandard = function(_emoteId) { 29 | while(_emoteId >= arrEmoteSpritesLen) { 30 | _emoteId -= arrEmoteSpritesLen; 31 | } 32 | while(_emoteId < 0) { 33 | _emoteId += arrEmoteSpritesLen; 34 | } 35 | return _emoteId; 36 | } 37 | 38 | 39 | mySlidingRodIns = GuiElement_CreateSlidingRod( 40 | 0, 0 41 | , "表情轮盘单页展示数量" 42 | , 256 43 | , make_wheat_ptr(EWheatPtrType.Ins, id, "blocksInOnePage") 44 | , 4, 16 45 | , function(n) { return round(n); } 46 | ); 47 | 48 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_emoteRoulette/Draw_64.gml: -------------------------------------------------------------------------------- 1 | blockAreaDir = 360 / blocksInOnePage; 2 | 3 | var _outOfRange = radius + 160 < point_distance(x, y, GetPositionXOnGUI(mouse_x), GetPositionYOnGUI(mouse_y)); 4 | 5 | if( 6 | keyboard_check_direct(0xC0) // "`“ 和 ”~" 键 7 | && window_has_focus() 8 | ) { 9 | if(instance_exists(obj_client)) 10 | if(InstanceExists(obj_client.myTextBox)) { 11 | if(obj_client.myTextBox.curt.fo == false) { 12 | working = true; 13 | } 14 | } else { 15 | working = true; 16 | } 17 | } else { 18 | if(working) { 19 | if(_outOfRange) { 20 | // 啥也不做 21 | } else { 22 | // 发送表情消息 23 | SendEmote(MyEmoteIdStandard(pointBlockIndex)); 24 | } 25 | } 26 | working = false; 27 | } 28 | 29 | if(working) { 30 | draw_set_color(c_black); 31 | draw_set_alpha(0.5); 32 | 33 | GUI_DrawRectangle(0, 0, GuiWidth(), GuiHeight(), false); 34 | 35 | draw_set_color(c_white); 36 | draw_set_alpha(1); 37 | 38 | pointDirection += 0.2 * angle_difference(point_direction(x, y, GetPositionXOnGUI(mouse_x), GetPositionYOnGUI(mouse_y)), pointDirection); 39 | 40 | pointBlockIndex = round(pointDirection / blockAreaDir); 41 | 42 | draw_arrow(x, y, x + lengthdir_x(radius / 2, pointDirection), y + lengthdir_y(radius / 2, pointDirection), 32); 43 | 44 | var _iMin = -floor(blocksInOnePage / 2); 45 | var _iMax = floor(blocksInOnePage / 2) - 1; 46 | for(var i = _iMin; i <= _iMax; i++) { 47 | var _emoteIndex = MyEmoteIdStandard(pointBlockIndex + i); 48 | 49 | var _dirTemp = (pointBlockIndex + i) * blockAreaDir; 50 | // var _scaleTemp = ((i - _iMin) / (_iMax + 1) - 1) * 0.4 + 1; 51 | var _scaleTemp = (_dirTemp - pointDirection) / 360 + 1; 52 | // var _alphaTemp = ((blocksInOnePage / 2 - abs(i)) / (blocksInOnePage / 2) - 1) * 0.9 + 1; 53 | var _alphaTemp = (1 - abs(_dirTemp - pointDirection) / (360 / 2) - 1) * 1.1 + 1; 54 | GUI_DrawSprite_ext(arrEmoteSprites[_emoteIndex], 0 55 | , x + spriteOffsetX - spriteWidth / 2 + lengthdir_x(radius, _dirTemp) 56 | , y + spriteOffsetY - spriteHeight / 2 + lengthdir_y(radius, _dirTemp) 57 | , _scaleTemp, _scaleTemp 58 | , 0, (i != 0 || _outOfRange) ? #AAAAAA : #FFFFFF 59 | , _alphaTemp 60 | ); 61 | } 62 | } 63 | 64 | 65 | if(InstanceExists(mySlidingRodIns)) { 66 | if(working) { 67 | mySlidingRodIns.x = x - mySlidingRodIns.width / 2; 68 | mySlidingRodIns.y = GuiHeight() - mySlidingRodIns.height; 69 | } else { 70 | mySlidingRodIns.x = -1000; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_emoteRoulette/obj_emoteRoulette.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_emoteRoulette", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 27 | ], 28 | "properties": [], 29 | "overriddenProperties": [], 30 | "parent": { 31 | "name": "Objects", 32 | "path": "folders/Objects.yy", 33 | }, 34 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_inputmynametextbox/Create_0.gml: -------------------------------------------------------------------------------- 1 | myTextbox = textbox_create(x, y, 320, 28, myName, "请新睡客在此处登记名称", 32, fontRegular, function() {}); 2 | textbox_set_font(myTextbox, fontRegular, c_white, 28, 0); 3 | 4 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_inputmynametextbox/obj_inputmynametextbox.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_inputMyNameTextbox", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | ], 27 | "properties": [], 28 | "overriddenProperties": [], 29 | "parent": { 30 | "name": "Legacy", 31 | "path": "folders/Objects/mainMenu/Legacy.yy", 32 | }, 33 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_kickshowvotes/Create_0.gml: -------------------------------------------------------------------------------- 1 | agreesNum = 0; 2 | refusesNum = 0; 3 | 4 | whoVoteName = ""; 5 | kickName = ""; 6 | whoVoteSleeperId = -1; 7 | kickSleeperId = -1; 8 | 9 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_kickshowvotes/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(!OnVote) { 2 | instance_destroy(); 3 | exit; 4 | } 5 | 6 | if(gHideVoteKick) { 7 | exit; 8 | } 9 | 10 | if(keyboard_check_pressed(vk_f1)) { 11 | SendAgree(); 12 | } else if(keyboard_check_pressed(vk_f2)) { 13 | SendRefuse(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_kickshowvotes/obj_kickshowvotes.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_kickShowVotes", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 28 | ], 29 | "properties": [], 30 | "overriddenProperties": [], 31 | "parent": { 32 | "name": "vote-to-kick", 33 | "path": "folders/Objects/vote-to-kick.yy", 34 | }, 35 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_kickwhobox/Create_0.gml: -------------------------------------------------------------------------------- 1 | name = ""; 2 | sleeperId = -1; 3 | 4 | voteLoadingMax = 120; 5 | voteLoading = 0; 6 | 7 | // CameraLock(); 8 | 9 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_kickwhobox/Draw_64.gml: -------------------------------------------------------------------------------- 1 | var str = "投票踢出 @" + name; 2 | 3 | var _x = GetPositionXOnGUI(x); 4 | var _y = GetPositionYOnGUI(y); 5 | 6 | var strW = string_width(str); 7 | var strH = string_height(str); 8 | 9 | draw_set_color(c_red); 10 | draw_set_alpha(0.5); 11 | draw_rectangle(_x - strW / 2, _y - strH / 2, _x + strW / 2, _y + strH / 2, false); 12 | 13 | draw_set_color(c_white); 14 | draw_rectangle(_x - strW / 2, _y - strH / 2, _x - strW / 2 + strW * (voteLoading / voteLoadingMax), _y + strH / 2, false); 15 | 16 | 17 | draw_set_alpha(1); 18 | DrawTextSetMid(); 19 | draw_text(_x, _y, str); 20 | DrawTextSetLU(); 21 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_kickwhobox/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(sleeperId == -1 || OnVote) { 2 | instance_destroy(); 3 | } 4 | 5 | var str = "投票踢出 @" + name; 6 | var _x = GetPositionXOnGUI(x); 7 | var _y = GetPositionYOnGUI(y); 8 | var strW = string_width(str); 9 | var strH = string_height(str); 10 | var mx = GetPositionXOnGUI(mouse_x); 11 | var my = GetPositionYOnGUI(mouse_y); 12 | 13 | if(mouse_check_button(mb_left)) { 14 | if(mx >= _x - strW / 2 && mx < _x + strW / 2 && my >= _y - strH / 2 && my < _y + strH / 2) { 15 | voteLoading++; 16 | gMouseOnGUI = true; 17 | } else { 18 | // CameraUnlock(); 19 | instance_destroy(); 20 | } 21 | } else if(voteLoading > 0) { 22 | voteLoading--; 23 | } 24 | 25 | if(voteLoading >= voteLoadingMax) { 26 | // CameraUnlock(); 27 | SendKick(sleeperId); 28 | instance_destroy(); 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_kickwhobox/obj_kickwhobox.yy: -------------------------------------------------------------------------------- 1 | { 2 | "spriteId": null, 3 | "solid": false, 4 | "visible": true, 5 | "managed": true, 6 | "spriteMaskId": null, 7 | "persistent": false, 8 | "parentObjectId": null, 9 | "physicsObject": false, 10 | "physicsSensor": false, 11 | "physicsShape": 1, 12 | "physicsGroup": 1, 13 | "physicsDensity": 0.5, 14 | "physicsRestitution": 0.1, 15 | "physicsLinearDamping": 0.1, 16 | "physicsAngularDamping": 0.1, 17 | "physicsFriction": 0.2, 18 | "physicsStartAwake": true, 19 | "physicsKinematic": false, 20 | "physicsShapePoints": [], 21 | "eventList": [ 22 | {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, 23 | {"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, 24 | {"isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, 25 | ], 26 | "properties": [], 27 | "overriddenProperties": [], 28 | "parent": { 29 | "name": "vote-to-kick", 30 | "path": "folders/Objects/vote-to-kick.yy", 31 | }, 32 | "resourceVersion": "1.0", 33 | "name": "obj_kickWhoBox", 34 | "tags": [], 35 | "resourceType": "GMObject", 36 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_mainMenu/Step_1.gml: -------------------------------------------------------------------------------- 1 | GUI_SetCursorDefault(); 2 | 3 | 4 | var windW = window_get_width(); 5 | var windH = window_get_height(); 6 | 7 | if((windowWidth != windW || windowHeight != windH) && surface_exists(application_surface) && (windW != 0 && windH != 0)) { 8 | DebugMes(["WindowResize", windW, windH]); 9 | 10 | surface_resize(application_surface, windW, windH); 11 | 12 | camera_set_view_size(view_camera[0], windW * CameraScale(), windH * CameraScale()); 13 | 14 | windowWidth = windW; 15 | windowHeight = windH; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_mainMenu/obj_mainMenu.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_mainMenu", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":1,"eventType":3,"collisionObjectId":null,}, 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":74,"eventType":8,"collisionObjectId":null,}, 29 | ], 30 | "properties": [], 31 | "overriddenProperties": [], 32 | "parent": { 33 | "name": "mainMenu", 34 | "path": "folders/Objects/mainMenu.yy", 35 | }, 36 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_makemycharacteroverbutton/Draw_0.gml: -------------------------------------------------------------------------------- 1 | var left = x - 48; 2 | var right = x + 48; 3 | var top = y - 24; 4 | var bottom = y + 24; 5 | if(keyboard_check_pressed(vk_enter) || (mouse_check_button_pressed(mb_left) && mouse_x >= left && mouse_y >= top && mouse_x <= right && mouse_y <= bottom)) { 6 | if(instance_exists(obj_inputMyNameTextbox)) { 7 | myName = textbox_return(obj_inputMyNameTextbox.myTextbox); 8 | if(string_length(myName) < 2) { 9 | show_message("名称太短!"); 10 | } else { 11 | // room_goto(rm_connect); 12 | room_goto(rm_bedroom); 13 | } 14 | } 15 | } 16 | 17 | draw_set_color(#AAAAAA); 18 | draw_rectangle(left, top, right, bottom, false); 19 | 20 | draw_set_font(fontRegular); 21 | draw_set_halign(fa_center); 22 | draw_set_valign(fa_middle); 23 | draw_set_color(c_black); 24 | 25 | draw_text(x, y, "进去睡觉"); 26 | 27 | draw_set_halign(fa_left); 28 | draw_set_valign(fa_top); 29 | draw_set_color(c_white); 30 | 31 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_makemycharacteroverbutton/obj_makemycharacteroverbutton.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_makeMyCharacterOverButton", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,}, 26 | ], 27 | "properties": [], 28 | "overriddenProperties": [], 29 | "parent": { 30 | "name": "Legacy", 31 | "path": "folders/Objects/mainMenu/Legacy.yy", 32 | }, 33 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourAppParent/Create_0.gml: -------------------------------------------------------------------------------- 1 | // 这两个变量会由创建该ourApp的obj_ourPhone来控制 2 | // 作用是确定实际的屏幕位置来用作与输入相关的事情 3 | x = 0; 4 | y = 0; 5 | 6 | // 鼠标坐标(对于我的surf来说的坐标) 7 | mouseXOnSurf = 0; 8 | mouseYOnSurf = 0; 9 | 10 | screenWidth = OurPhoneScreenWidth; 11 | screenHeight = OurPhoneScreenHeight; 12 | 13 | pressed = false; // 该ourApp是否被点击 14 | working = false; // 该ourApp是否有在允许 15 | 16 | surf = -1; 17 | 18 | MySurfCreate = function() { 19 | MySurfFree(); 20 | surf = surface_create(OurPhoneScreenWidth, OurPhoneScreenHeight); 21 | } 22 | 23 | MySurfFree = function() { 24 | if(surf != -1) 25 | if(surface_exists(surf)) { 26 | surface_free(surf); 27 | surf = -1; 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourAppParent/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(working) { 2 | if(surf == -1 || surface_exists(surf) == false) { 3 | MySurfCreate(); 4 | } 5 | if(InstanceExists(obj_ourPhone)) { 6 | obj_ourPhone.myOurAppSurf = surf; 7 | } 8 | } else { 9 | MySurfFree(); 10 | } 11 | 12 | // SurfaceClear_surf(surf); 13 | 14 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourAppParent/obj_ourAppParent.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourAppParent", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 27 | ], 28 | "properties": [], 29 | "overriddenProperties": [], 30 | "parent": { 31 | "name": "ourPhone", 32 | "path": "folders/Objects/ourPhone.yy", 33 | }, 34 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourAppTemplate/Create_0.gml: -------------------------------------------------------------------------------- 1 | event_inherited(); 2 | 3 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourAppTemplate/Step_0.gml: -------------------------------------------------------------------------------- 1 | OurAppStepEventHead 2 | 3 | /* 这里写ourApp的应用代码 */ 4 | /* 可以直接将这些代码视作一个单独的程序,且视为运行在单独的窗口中 */ 5 | /* 这套框架会将ourApp处理到ourPhone上,所以无需担心 */ 6 | 7 | OurAppStepEventTail 8 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourAppTemplate/obj_ourAppTemplate.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourAppTemplate", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": { 12 | "name": "obj_ourAppParent", 13 | "path": "objects/obj_ourAppParent/obj_ourAppParent.yy", 14 | }, 15 | "physicsObject": false, 16 | "physicsSensor": false, 17 | "physicsShape": 1, 18 | "physicsGroup": 1, 19 | "physicsDensity": 0.5, 20 | "physicsRestitution": 0.1, 21 | "physicsLinearDamping": 0.1, 22 | "physicsAngularDamping": 0.1, 23 | "physicsFriction": 0.2, 24 | "physicsStartAwake": true, 25 | "physicsKinematic": false, 26 | "physicsShapePoints": [], 27 | "eventList": [ 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 30 | ], 31 | "properties": [], 32 | "overriddenProperties": [], 33 | "parent": { 34 | "name": "ourPhone", 35 | "path": "folders/Objects/ourPhone.yy", 36 | }, 37 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Camera/Create_0.gml: -------------------------------------------------------------------------------- 1 | event_inherited(); 2 | 3 | mycamsurf = -1; 4 | 5 | MyCheckAndRemakeMycamsurf = function() { 6 | if(mycamsurf == -1 || surface_exists(mycamsurf) == false) { 7 | mycamsurf = surface_create(OurPhoneScreenWidth, OurPhoneScreenHeight); 8 | } 9 | } 10 | 11 | myshotWhiteAlphaMax = 0.2; 12 | myshotWhiteAlpha = 0; 13 | 14 | myshotButtonRadiusStart = 18; 15 | myshotButtonRadiusEnd = 24; 16 | myshotButtonRadius = myshotButtonRadiusStart; 17 | 18 | MyShot = function() { 19 | static _i_datetime = 0; // 这张照片是该 datetime 里拍摄的第几张 20 | static _datetimePrev = undefined; 21 | 22 | if(surface_exists(mycamsurf) == false) { 23 | return; 24 | } 25 | 26 | var _datetime = date_current_datetime(); 27 | 28 | if(_datetime != _datetimePrev) { 29 | _datetimePrev = _datetime; 30 | 31 | _i_datetime = 0; 32 | } else { 33 | _i_datetime++; 34 | } 35 | 36 | var _fname = FILEPATH_ourPhonePhotos 37 | + string(date_get_year(_datetime)) + "_" 38 | + string(date_get_month(_datetime)) + "_" 39 | + string(date_get_day(_datetime)) + "_" 40 | + string(date_get_hour(_datetime)) + "_" 41 | + string(date_get_minute(_datetime)) + "_" 42 | + string(date_get_second(_datetime)) + "_" 43 | + string(_i_datetime) + ".png" 44 | ; 45 | 46 | try { 47 | if(!directory_exists(FILEPATH_ourPhonePhotos)) { 48 | MakeFolder(FILEPATH_ourPhonePhotos); 49 | } 50 | if(directory_exists(FILEPATH_ourPhonePhotos)) { 51 | 52 | } else { 53 | show_message_async("无法正确访问或创建照片文件夹:" + FILEPATH_ourPhonePhotos); 54 | 55 | return; 56 | } 57 | } catch(error) { 58 | DebugMes([error.script, error.message]); 59 | 60 | return; 61 | } 62 | 63 | surface_save(mycamsurf, _fname); 64 | 65 | myshotWhiteAlpha = myshotWhiteAlphaMax; 66 | } 67 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Camera/Step_0.gml: -------------------------------------------------------------------------------- 1 | OurAppStepEventHead 2 | 3 | MyCheckAndRemakeMycamsurf(); 4 | 5 | if(surface_exists(mycamsurf)) { 6 | draw_set_alpha(1.0); 7 | draw_set_color(c_white); 8 | 9 | var _surfTargetTemp = surface_get_target(); 10 | if(_surfTargetTemp != -1) { 11 | surface_reset_target(); 12 | } 13 | surface_set_target(mycamsurf); 14 | 15 | if(surface_exists(application_surface) && instance_exists(obj_day_and_night)) { 16 | shader_set(obj_day_and_night.shader); 17 | shader_set_uniform_f_array(obj_day_and_night.u_col, obj_day_and_night.color_mix); 18 | shader_set_uniform_f_array(obj_day_and_night.u_con_sat_brt, obj_day_and_night.con_sat_brt_mix); 19 | texture_set_stage(obj_day_and_night.s_lights, obj_day_and_night.tex_lights); 20 | 21 | draw_clear(c_black); 22 | 23 | //var _mycamx = gOurPhoneX + OurPhoneScreenWidth / 2; 24 | //var _mycamy = gOurPhoneY + -16; 25 | //draw_surface_part( 26 | // application_surface 27 | // , _mycamx - OurPhoneScreenWidth / 2, _mycamy - OurPhoneScreenHeight / 2 28 | // , _mycamx + OurPhoneScreenWidth / 2, _mycamy + OurPhoneScreenHeight / 2 29 | // , 0, 0 30 | //); 31 | 32 | draw_surface_part(application_surface, gOurPhoneX, gOurPhoneY, gOurPhoneX + OurPhoneScreenWidth, gOurPhoneY + OurPhoneScreenHeight, 0, 0); 33 | 34 | shader_reset(); 35 | } 36 | 37 | surface_reset_target(); 38 | if(_surfTargetTemp != -1) { 39 | surface_set_target(_surfTargetTemp); 40 | } 41 | 42 | 43 | draw_clear(c_black); 44 | draw_surface(mycamsurf, 0, 0); 45 | 46 | 47 | if(myshotWhiteAlpha > 0.05) { 48 | myshotWhiteAlpha = lerp(myshotWhiteAlpha, 0, 0.2); 49 | } else { 50 | myshotWhiteAlpha = 0; 51 | } 52 | 53 | draw_set_alpha(myshotWhiteAlpha); 54 | 55 | draw_rectangle(0, 0, OurPhoneScreenWidth, OurPhoneScreenHeight, false); 56 | 57 | 58 | draw_set_alpha(1.0); 59 | 60 | var _shotButtonX = OurPhoneScreenWidth / 2; 61 | var _shotButtonY = OurPhoneScreenHeight - 40; 62 | 63 | if(point_in_circle(gMouseOnOurPhoneX, gMouseOnOurPhoneY, _shotButtonX, _shotButtonY, myshotButtonRadius)) { 64 | myshotButtonRadius = lerp(myshotButtonRadius, myshotButtonRadiusEnd, 0.2); 65 | 66 | GUI_SetCursorHandpoint(); 67 | 68 | if(MouseLeftPressed()) { 69 | MyShot(); 70 | } 71 | } else { 72 | myshotButtonRadius = lerp(myshotButtonRadius, myshotButtonRadiusStart, 0.2); 73 | } 74 | 75 | draw_circle(_shotButtonX, _shotButtonY, myshotButtonRadius, false); 76 | draw_circle(_shotButtonX, _shotButtonY, myshotButtonRadius + 4, true); 77 | } 78 | 79 | OurAppStepEventTail 80 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Camera/obj_ourApp_Camera.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourApp_Camera", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": { 12 | "name": "obj_ourAppParent", 13 | "path": "objects/obj_ourAppParent/obj_ourAppParent.yy", 14 | }, 15 | "physicsObject": false, 16 | "physicsSensor": false, 17 | "physicsShape": 1, 18 | "physicsGroup": 1, 19 | "physicsDensity": 0.5, 20 | "physicsRestitution": 0.1, 21 | "physicsLinearDamping": 0.1, 22 | "physicsAngularDamping": 0.1, 23 | "physicsFriction": 0.2, 24 | "physicsStartAwake": true, 25 | "physicsKinematic": false, 26 | "physicsShapePoints": [], 27 | "eventList": [ 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 30 | ], 31 | "properties": [], 32 | "overriddenProperties": [], 33 | "parent": { 34 | "name": "ourPhone", 35 | "path": "folders/Objects/ourPhone.yy", 36 | }, 37 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Chat/CleanUp_0.gml: -------------------------------------------------------------------------------- 1 | if(CheckStructCanBeUse(myChatTextbox)) { 2 | delete myChatTextbox; 3 | } 4 | if(CheckStructCanBeUse(myChatSendMessageButton)) { 5 | delete myChatSendMessageButton; 6 | } 7 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Chat/Step_0.gml: -------------------------------------------------------------------------------- 1 | OurAppStepEventHead 2 | 3 | switch(myScene) { 4 | case eMyScene.AllSleepers: 5 | case eMyScene.RecentSleepers: 6 | case eMyScene.UnReadSleepers: 7 | MySelectSleepersScene(); 8 | break; 9 | 10 | case eMyScene.Chat: 11 | MyChatScene(); 12 | break; 13 | } 14 | 15 | OurAppStepEventTail 16 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Chat/obj_ourApp_Chat.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourApp_Chat", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": { 12 | "name": "obj_ourAppParent", 13 | "path": "objects/obj_ourAppParent/obj_ourAppParent.yy", 14 | }, 15 | "physicsObject": false, 16 | "physicsSensor": false, 17 | "physicsShape": 1, 18 | "physicsGroup": 1, 19 | "physicsDensity": 0.5, 20 | "physicsRestitution": 0.1, 21 | "physicsLinearDamping": 0.1, 22 | "physicsAngularDamping": 0.1, 23 | "physicsFriction": 0.2, 24 | "physicsStartAwake": true, 25 | "physicsKinematic": false, 26 | "physicsShapePoints": [], 27 | "eventList": [ 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 30 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":12,"collisionObjectId":null,}, 31 | ], 32 | "properties": [], 33 | "overriddenProperties": [], 34 | "parent": { 35 | "name": "ourPhone", 36 | "path": "folders/Objects/ourPhone.yy", 37 | }, 38 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_CustomWallpaper/Create_0.gml: -------------------------------------------------------------------------------- 1 | event_inherited(); 2 | 3 | mouseOnMe = false; 4 | 5 | scrollY = 0; 6 | scrollYSpeed = 50; 7 | 8 | arrWallpaperFilenameDefault = [ 9 | ":opendir", // 非文件名的前面加个":"防止和文件名弄混(因为文件名里无法包含":") 10 | ":refresh", 11 | ":defaultSpr", 12 | // 从后面开始就是文件名了(不带文件路径 13 | // (统一存在 FILEPATH_ourPhoneWallpapers 里 14 | ]; 15 | 16 | arrWallpaperFilename = []; 17 | wallpaperFilenameLineHeight = 28; 18 | 19 | MyRefresh = function() { 20 | array_delete(arrWallpaperFilename, 0, array_length(arrWallpaperFilename)); 21 | array_copy(arrWallpaperFilename, 0, arrWallpaperFilenameDefault, 0, array_length(arrWallpaperFilenameDefault)); 22 | 23 | var _arrFnameExtentionsTemp = ["*.png", "*.jpg", "*.jpeg"]; 24 | for(var i = 0; i < array_length(_arrFnameExtentionsTemp); i++) { 25 | var _fnameFind = file_find_first(FILEPATH_ourPhoneWallpapers + _arrFnameExtentionsTemp[i], 0); 26 | while(_fnameFind != "") { 27 | array_push(arrWallpaperFilename, _fnameFind); 28 | _fnameFind = file_find_next(); 29 | } 30 | file_find_close(); 31 | } 32 | } 33 | MyRefresh(); 34 | 35 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_CustomWallpaper/obj_ourApp_CustomWallpaper.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourApp_CustomWallpaper", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": { 12 | "name": "obj_ourAppParent", 13 | "path": "objects/obj_ourAppParent/obj_ourAppParent.yy", 14 | }, 15 | "physicsObject": false, 16 | "physicsSensor": false, 17 | "physicsShape": 1, 18 | "physicsGroup": 1, 19 | "physicsDensity": 0.5, 20 | "physicsRestitution": 0.1, 21 | "physicsLinearDamping": 0.1, 22 | "physicsAngularDamping": 0.1, 23 | "physicsFriction": 0.2, 24 | "physicsStartAwake": true, 25 | "physicsKinematic": false, 26 | "physicsShapePoints": [], 27 | "eventList": [ 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 30 | ], 31 | "properties": [], 32 | "overriddenProperties": [], 33 | "parent": { 34 | "name": "ourPhone", 35 | "path": "folders/Objects/ourPhone.yy", 36 | }, 37 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_MusicPlayer/Other_63.gml: -------------------------------------------------------------------------------- 1 | if(async_load[? "id"] == asyncDialogId_setdir) { 2 | if(async_load[? "status"]) { 3 | var res = async_load[? "result"]; 4 | if(OurPhone_WriteMusicDirectory(res)) { 5 | MyRefresh(); 6 | } 7 | } 8 | asyncDialogId_setdir = -1; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_MusicPlayer/obj_ourApp_MusicPlayer.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourApp_MusicPlayer", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": { 12 | "name": "obj_ourAppParent", 13 | "path": "objects/obj_ourAppParent/obj_ourAppParent.yy", 14 | }, 15 | "physicsObject": false, 16 | "physicsSensor": false, 17 | "physicsShape": 1, 18 | "physicsGroup": 1, 19 | "physicsDensity": 0.5, 20 | "physicsRestitution": 0.1, 21 | "physicsLinearDamping": 0.1, 22 | "physicsAngularDamping": 0.1, 23 | "physicsFriction": 0.2, 24 | "physicsStartAwake": true, 25 | "physicsKinematic": false, 26 | "physicsShapePoints": [], 27 | "eventList": [ 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 30 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":63,"eventType":7,"collisionObjectId":null,}, 31 | ], 32 | "properties": [], 33 | "overriddenProperties": [], 34 | "parent": { 35 | "name": "ourPhone", 36 | "path": "folders/Objects/ourPhone.yy", 37 | }, 38 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Photos/Create_0.gml: -------------------------------------------------------------------------------- 1 | event_inherited(); 2 | 3 | myButton = new OurPhoneGuiElement_Button( 4 | OurPhoneScreenWidth / 2 - 80, OurPhoneScreenHeight / 2 - 48 5 | , 160, 96 6 | , "打开照片文件夹" 7 | , , function() { 8 | try { 9 | if(!directory_exists(FILEPATH_ourPhonePhotos)) { 10 | MakeFolder(FILEPATH_ourPhonePhotos); 11 | } 12 | if(directory_exists(FILEPATH_ourPhonePhotos)) { 13 | 14 | } else { 15 | show_message_async("无法正确访问或创建照片文件夹:" + FILEPATH_ourPhonePhotos); 16 | 17 | return; 18 | } 19 | } catch(error) { 20 | DebugMes([error.script, error.message]); 21 | 22 | return; 23 | } 24 | 25 | OpenInExplorer(FILEPATH_ourPhonePhotos); 26 | } 27 | , , 0.9, , , true 28 | ); 29 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Photos/Step_0.gml: -------------------------------------------------------------------------------- 1 | OurAppStepEventHead 2 | 3 | draw_set_color(c_black); 4 | draw_set_alpha(0.7); 5 | 6 | draw_rectangle(0, 0, OurPhoneScreenWidth, OurPhoneScreenHeight, false); 7 | 8 | draw_set_alpha(1.0); 9 | draw_set_color(c_white); 10 | 11 | myButton.WorkEasy(); 12 | 13 | OurAppStepEventTail 14 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Photos/obj_ourApp_Photos.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourApp_Photos", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": { 12 | "name": "obj_ourAppParent", 13 | "path": "objects/obj_ourAppParent/obj_ourAppParent.yy", 14 | }, 15 | "physicsObject": false, 16 | "physicsSensor": false, 17 | "physicsShape": 1, 18 | "physicsGroup": 1, 19 | "physicsDensity": 0.5, 20 | "physicsRestitution": 0.1, 21 | "physicsLinearDamping": 0.1, 22 | "physicsAngularDamping": 0.1, 23 | "physicsFriction": 0.2, 24 | "physicsStartAwake": true, 25 | "physicsKinematic": false, 26 | "physicsShapePoints": [], 27 | "eventList": [ 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 30 | ], 31 | "properties": [], 32 | "overriddenProperties": [], 33 | "parent": { 34 | "name": "ourPhone", 35 | "path": "folders/Objects/ourPhone.yy", 36 | }, 37 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Report/CleanUp_0.gml: -------------------------------------------------------------------------------- 1 | if(CheckStructCanBeUse(mySleeperIdTextbox)) { 2 | delete mySleeperIdTextbox; 3 | } 4 | if(CheckStructCanBeUse(myReasonTextbox)) { 5 | delete myReasonTextbox; 6 | } 7 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Report/Create_0.gml: -------------------------------------------------------------------------------- 1 | event_inherited(); 2 | 3 | titleHeight = 32; 4 | 5 | mySleeperIdTextbox = new OurPhoneGuiElement_TextBox(4, 36, OurPhoneScreenWidth - 4 - 4, 28, 16, "目标睡客ID或名称(选填)"); 6 | myReasonTextbox = new OurPhoneGuiElement_TextBox( 7 | 4 8 | , 36 + 28 + 4 9 | , OurPhoneScreenWidth - 4 - 4 10 | , OurPhoneScreenHeight - 36 - 28 - 4 - 4 - 32 11 | , 128 12 | , @'举报内容、理由,例如: 13 | 发送不良消息 14 | 使用不良名称 15 | 偷吃了我最爱的草莓蛋糕 16 | ……' 17 | ); 18 | 19 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Report/Step_0.gml: -------------------------------------------------------------------------------- 1 | OurAppStepEventHead 2 | 3 | draw_set_color(#BBBBBB); 4 | draw_set_alpha(1); 5 | 6 | GUI_DrawRectangle(0, 0, OurPhoneScreenWidth, titleHeight); 7 | 8 | draw_set_color(#DDDDDD); 9 | 10 | GUI_DrawRectangle(0, titleHeight + 1, OurPhoneScreenWidth, OurPhoneScreenHeight); 11 | 12 | draw_set_color(c_black); 13 | draw_text(4, 2, "举报不良睡客或违规消息"); 14 | 15 | draw_line_width_color(0, titleHeight, OurPhoneScreenWidth, titleHeight, 2, c_black, c_black); 16 | 17 | mySleeperIdTextbox.WorkEasy(); 18 | myReasonTextbox.WorkEasy(); 19 | 20 | 21 | if(OurPhoneGUI_MouseGuiOnMe(0, OurPhoneScreenHeight - 32 + 1, OurPhoneScreenWidth, OurPhoneScreenHeight)) { 22 | GUI_SetCursorHandpoint(); 23 | draw_set_color(#CCCCCC); 24 | 25 | if(MouseLeftPressed()) { 26 | if(myReasonTextbox.GetContent() == "") { 27 | show_message_async("举报内容不能为空!!"); 28 | } else { 29 | // 发送举报消息 30 | SendReport( 31 | string(mySleeperIdTextbox.GetContent()) 32 | + "|" 33 | + string(myReasonTextbox.GetContent()) 34 | ); 35 | 36 | mySleeperIdTextbox.ClearContent(); 37 | myReasonTextbox.ClearContent(); 38 | } 39 | } 40 | } else { 41 | draw_set_color(#888888); 42 | } 43 | 44 | GUI_DrawRectangle(0, OurPhoneScreenHeight - 32 + 1, OurPhoneScreenWidth, OurPhoneScreenHeight); 45 | 46 | draw_set_color(c_black); 47 | GUI_DrawText(OurPhoneScreenWidth / 2, OurPhoneScreenHeight - 16 - 4, "点我发送举报信息", true); 48 | 49 | 50 | OurAppStepEventTail 51 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_Report/obj_ourApp_Report.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourApp_Report", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": { 12 | "name": "obj_ourAppParent", 13 | "path": "objects/obj_ourAppParent/obj_ourAppParent.yy", 14 | }, 15 | "physicsObject": false, 16 | "physicsSensor": false, 17 | "physicsShape": 1, 18 | "physicsGroup": 1, 19 | "physicsDensity": 0.5, 20 | "physicsRestitution": 0.1, 21 | "physicsLinearDamping": 0.1, 22 | "physicsAngularDamping": 0.1, 23 | "physicsFriction": 0.2, 24 | "physicsStartAwake": true, 25 | "physicsKinematic": false, 26 | "physicsShapePoints": [], 27 | "eventList": [ 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 30 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":12,"collisionObjectId":null,}, 31 | ], 32 | "properties": [], 33 | "overriddenProperties": [], 34 | "parent": { 35 | "name": "ourPhone", 36 | "path": "folders/Objects/ourPhone.yy", 37 | }, 38 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_WebBrowser/Create_0.gml: -------------------------------------------------------------------------------- 1 | event_inherited(); 2 | 3 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_WebBrowser/Step_0.gml: -------------------------------------------------------------------------------- 1 | OurAppStepEventHead 2 | 3 | draw_clear(c_white); 4 | draw_set_color(c_black); 5 | draw_set_alpha(1); 6 | draw_text(64, 32, "~正在开发中~"); 7 | 8 | OurAppStepEventTail 9 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourApp_WebBrowser/obj_ourApp_WebBrowser.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourApp_WebBrowser", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": { 12 | "name": "obj_ourAppParent", 13 | "path": "objects/obj_ourAppParent/obj_ourAppParent.yy", 14 | }, 15 | "physicsObject": false, 16 | "physicsSensor": false, 17 | "physicsShape": 1, 18 | "physicsGroup": 1, 19 | "physicsDensity": 0.5, 20 | "physicsRestitution": 0.1, 21 | "physicsLinearDamping": 0.1, 22 | "physicsAngularDamping": 0.1, 23 | "physicsFriction": 0.2, 24 | "physicsStartAwake": true, 25 | "physicsKinematic": false, 26 | "physicsShapePoints": [], 27 | "eventList": [ 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 30 | ], 31 | "properties": [], 32 | "overriddenProperties": [], 33 | "parent": { 34 | "name": "ourPhone", 35 | "path": "folders/Objects/ourPhone.yy", 36 | }, 37 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourPhone/Create_0.gml: -------------------------------------------------------------------------------- 1 | // arrOurApps[i].ins = id,arrOurApps[i].iconSpr = spr; 2 | arrOurApps = [ 3 | OurPhone_CreateOurApp(obj_ourApp_CustomWallpaper, spr_ourApp_CustomWallpaper), 4 | OurPhone_CreateOurApp(obj_ourApp_MusicPlayer, spr_ourApp_MusicPlayer), 5 | // OurPhone_CreateOurApp(obj_ourApp_WebBrowser, spr_ourApp_WebBrowser), 6 | OurPhone_CreateOurApp(obj_ourApp_Report, spr_ourApp_Report), 7 | OurPhone_CreateOurApp(obj_ourApp_Chat, spr_ourApp_Chat), 8 | OurPhone_CreateOurApp(obj_ourApp_Camera, spr_ourApp_Camera), 9 | OurPhone_CreateOurApp(obj_ourApp_Photos, spr_ourApp_Photos), 10 | ]; 11 | 12 | depth = OurPhoneDepth; 13 | 14 | screenWidth = OurPhoneScreenWidth; 15 | screenHeight = OurPhoneScreenHeight; 16 | 17 | working = false; 18 | 19 | yAddBegin = 320; 20 | yAddEnd = -544; 21 | 22 | yAdd = yAddBegin; 23 | xAdd = x - 1280; 24 | 25 | mouseOnMe = false; 26 | mouseOnScreen = false; 27 | 28 | mouseDragXOff = 0; 29 | mouseDragYOff = 0; 30 | mouseDragging = false; 31 | 32 | 33 | MyWork = function() { 34 | working = true; 35 | } 36 | MyStopWork = function() { 37 | working = false; 38 | } 39 | 40 | MyPressApp = function(iArrOurApps = -1) { 41 | var arrOurAppsSiz = array_length(arrOurApps); 42 | for(var i = 0; i < arrOurAppsSiz; i++) { 43 | if(InstanceExists(arrOurApps[i].ins)) { 44 | arrOurApps[i].ins.working = false; 45 | } 46 | } 47 | if(iArrOurApps >= 0 && iArrOurApps < arrOurAppsSiz) { 48 | if(InstanceExists(arrOurApps[iArrOurApps].ins)) { 49 | arrOurApps[iArrOurApps].ins.pressed = true; 50 | arrOurApps[iArrOurApps].ins.working = true; 51 | } 52 | } 53 | } 54 | 55 | 56 | buttonHomeX = x; 57 | buttonHomeY = y; 58 | buttonHomeWidth = sprite_get_width(spr_ourPhone_ButtonHome); 59 | buttonHomeHeight = sprite_get_height(spr_ourPhone_ButtonHome); 60 | buttonHomeMouseOnMe = false; 61 | MyCheckMouseOnButtonHome = function() { 62 | static widthHalf = buttonHomeWidth / 2; 63 | static heightHalf = buttonHomeHeight / 2; 64 | 65 | if(GUI_MouseGuiOnMe(buttonHomeX - widthHalf, buttonHomeY - heightHalf, buttonHomeX + widthHalf, buttonHomeY + heightHalf)) { 66 | return true; 67 | } 68 | return false; 69 | } 70 | 71 | 72 | // 该surface会由obj_ourApp_xxxx控制 73 | myOurAppTransLerpAmount = 0.25; 74 | 75 | myOurAppSurf = -1; 76 | myOurAppSurfStatic = -1; 77 | 78 | myOurAppSurfAlpha = 1.0; 79 | myOurAppSurfX = 0; 80 | myOurAppSurfY = 0; 81 | myOurAppSurfXscale = 1.0; 82 | myOurAppSurfYscale = 1.0; 83 | 84 | myOurAppWorkingIconX = 0; 85 | myOurAppWorkingIconY = 0; 86 | 87 | 88 | myOurAppIconAlpha = 1.0; 89 | 90 | 91 | OurPhone_LoadWallpaper(); 92 | 93 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourPhone/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(working) { 2 | yAdd = lerp(yAdd, yAddEnd, 0.2); 3 | } else { 4 | yAdd = lerp(yAdd, yAddBegin, 0.2); 5 | } 6 | 7 | x = GuiWidth() + xAdd; 8 | y = GuiHeight() + yAdd; 9 | 10 | buttonHomeX = x + 200; 11 | buttonHomeY = y + 432 + 22; 12 | 13 | mouseOnScreen = GUI_MouseGuiOnMe(x, y, x + screenWidth, y + screenHeight); 14 | if(GUI_MouseGuiOnMe(x - 16, y - 48, x + screenWidth + 16, y + screenHeight + 48)) { 15 | gMouseOnGUI = true; 16 | gMouseOnOurPhone = true; 17 | 18 | mouseOnMe = true; 19 | } else { 20 | mouseOnMe = false; 21 | } 22 | 23 | if(mouseDragging == false) { 24 | buttonHomeMouseOnMe = MyCheckMouseOnButtonHome(); 25 | if(buttonHomeMouseOnMe) { 26 | GUI_SetCursorHandpoint(); 27 | } 28 | } 29 | 30 | if(mouseOnMe && mouseOnScreen == false && buttonHomeMouseOnMe == false) { 31 | if(MouseLeftPressed()) { 32 | mouseDragXOff = GetPositionXOnGUI(mouse_x) - x; 33 | mouseDragYOff = GetPositionYOnGUI(mouse_y) - y; 34 | 35 | mouseDragging = true; 36 | } 37 | } 38 | 39 | if(mouseDragging) { 40 | gMouseOnGUI = true; 41 | gMouseOnOurPhone = true; 42 | 43 | if(MouseLeftHold() == false) { 44 | mouseDragging = false; 45 | } else { 46 | x = GetPositionXOnGUI(mouse_x) - mouseDragXOff; 47 | y = GetPositionYOnGUI(mouse_y) - mouseDragYOff; 48 | 49 | xAdd = x - GuiWidth(); 50 | yAdd = y - GuiHeight(); 51 | yAddEnd = yAdd; 52 | 53 | buttonHomeX = x + 200; 54 | buttonHomeY = y + 432 + 22; 55 | } 56 | } 57 | 58 | gOurPhoneX = x; 59 | gOurPhoneY = y; 60 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_ourPhone/obj_ourPhone.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_ourPhone", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 28 | ], 29 | "properties": [], 30 | "overriddenProperties": [], 31 | "parent": { 32 | "name": "ourPhone", 33 | "path": "folders/Objects/ourPhone.yy", 34 | }, 35 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_sleeper/Draw_0.gml: -------------------------------------------------------------------------------- 1 | SynchDepth(); 2 | /* 3 | var sprite = spr_Boy; 4 | 5 | switch(type) { 6 | case SleeperType.Girl: 7 | sprite = spr_Girl; 8 | break; 9 | case SleeperType.Boy: 10 | sprite = spr_Boy; 11 | break; 12 | }*/ 13 | 14 | var sprite = gSleepersSpritesStruct.sprites[type]; 15 | 16 | var xscale = 1 + cos(degtorad(timeI)) / 20; 17 | var yscale = 1 + sin(degtorad(timeI)) / 20; 18 | 19 | if(emoteIndex != -1) { 20 | emoteTime++; 21 | if(emoteTime > emoteTimeMax) { 22 | emoteIndex = -1; 23 | } else { 24 | var _emoteAnimationTimeOffsetHalf = emoteAnimationTimeOffset / 2; 25 | if(emoteTime <= emoteAnimationTimeOffset) { 26 | xscale *= 1.0 - 0.1 * (1 - abs(emoteTime - _emoteAnimationTimeOffsetHalf) / _emoteAnimationTimeOffsetHalf); 27 | yscale *= 1.0 + 0.08 * (1 - abs(emoteTime - _emoteAnimationTimeOffsetHalf) / _emoteAnimationTimeOffsetHalf); 28 | } else 29 | if(emoteTime >= emoteTimeMax - emoteAnimationTimeOffset) { 30 | xscale *= 1.0 + 0.08 * (1 - abs(emoteTimeMax - emoteTime - _emoteAnimationTimeOffsetHalf) / _emoteAnimationTimeOffsetHalf); 31 | yscale *= 1.0 - 0.1 * (1 - abs(emoteTimeMax - emoteTime - _emoteAnimationTimeOffsetHalf) / _emoteAnimationTimeOffsetHalf); 32 | } 33 | 34 | if(emoteTime >= _emoteAnimationTimeOffsetHalf - 1 && emoteTime <= emoteTimeMax - _emoteAnimationTimeOffsetHalf) { 35 | sprite = gArrSleeperEmoteSprites[type][emoteIndex]; 36 | } 37 | } 38 | } 39 | 40 | draw_set_alpha(1); 41 | draw_set_color(c_white); 42 | 43 | if(isMe && MyPathIsRunning()) { 44 | draw_path(myPath, 0, 0, true); 45 | } 46 | 47 | var angle = radtodeg(((anglePositive > 0) ? cos(degtorad(timeI)) : sin(degtorad(timeI))) / 20); 48 | var angleTemp = radtodeg(sin(degtorad(moveTimeI * 10))) / 6; 49 | 50 | if(MyPathIsRunning()) { 51 | angle = angleTemp; 52 | 53 | moveTimeI += anglePositive; 54 | } else { 55 | moveTimeI = 0; 56 | } 57 | 58 | timeI += anglePositive; 59 | 60 | if(sleepingBedId == -1) { 61 | draw_sprite_ext(sprite, 0, x, y, xscale, yscale, angle, c_white, 1); 62 | } 63 | 64 | mask_index = sprite; 65 | 66 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_sleeper/Draw_64.gml: -------------------------------------------------------------------------------- 1 | draw_set_color(c_white); 2 | draw_set_alpha(1.0); 3 | 4 | if(chatTime > 0) { 5 | chatTime--; 6 | 7 | var chatPosX = GetPositionXOnGUI(x); 8 | var chatPosY = 0; 9 | 10 | if(gSleepersLabelScale <= 0 || gSleepersLabelAlpha <= 0) { 11 | chatPosY = GetPositionYOnGUI(bbox_top - 42); 12 | } else { 13 | chatPosY = GetPositionYOnGUI(bbox_top - 72); 14 | } 15 | 16 | DrawChat(chatPosX, chatPosY, chatText); 17 | } 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_sleeper/Draw_74.gml: -------------------------------------------------------------------------------- 1 | var str = name; 2 | if(gShowSleeperId) { 3 | str = "(" + string(sleeperId) + ")" + name; 4 | } 5 | 6 | draw_set_color(c_black); 7 | draw_set_alpha(gSleepersLabelAlpha); 8 | var edgeWidth = 8 * gSleepersLabelScale; 9 | var edgeHeight = 4 * gSleepersLabelScale; 10 | var _strW = string_width(str) / 2 * gSleepersLabelScale; 11 | var _strH = string_height(str) / 2 * gSleepersLabelScale; 12 | 13 | var posX = GetPositionXOnGUI(x); 14 | var posY = GetPositionYOnGUI(bbox_top - 34) - _strH / 2; 15 | 16 | draw_rectangle( 17 | posX - _strW - edgeWidth, 18 | posY - _strH - edgeHeight + 4 * gSleepersLabelScale, 19 | posX + _strW + edgeWidth, 20 | posY + _strH + edgeHeight, 21 | false 22 | ); 23 | 24 | draw_set_color(c_white); 25 | // draw_set_alpha(1.0); 26 | draw_set_halign(fa_center); 27 | draw_set_valign(fa_middle); 28 | draw_text_transformed(posX, posY, str, gSleepersLabelScale, gSleepersLabelScale, 0); 29 | draw_set_halign(fa_left); 30 | draw_set_valign(fa_top); 31 | draw_set_alpha(1.0); 32 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_sleeper/Mouse_7.gml: -------------------------------------------------------------------------------- 1 | if(instance_exists(obj_kickWhoBox) == false) { 2 | CreateKickWhoBox(sleeperId); 3 | } 4 | show_debug_message("click"); 5 | 6 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_sleeper/Step_0.gml: -------------------------------------------------------------------------------- 1 | if(inited == false) { 2 | inited = true; 3 | 4 | if(isMe) { 5 | var _initPosIndexTemp = irandom_range(0, array_length(gArrSleepersInitPosx[myType]) - 1); 6 | x = gArrSleepersInitPosx[myType][_initPosIndexTemp]; 7 | y = gArrSleepersInitPosy[myType][_initPosIndexTemp]; 8 | 9 | // DebugMes(gArrSleepersInitPosx); 10 | // DebugMes(myType); 11 | // DebugMes(_initPosIndexTemp); 12 | 13 | CameraSetPos(x, y); 14 | 15 | SendPos(x, y); 16 | } 17 | } 18 | 19 | if(myPathDestX != undefined && myPathDestY != undefined) { 20 | if(floor(x) == floor(myPathDestX) && floor(y) == floor(myPathDestY)) { 21 | MyPathStop(); 22 | 23 | if(willSleep) { 24 | willSleep = false; 25 | 26 | var _bedInsList = ds_list_create(); 27 | var _bedInsListLen = collision_circle_list(x, y, 32, obj_bed, false, true, _bedInsList, true); 28 | if(_bedInsListLen) { 29 | SendSleep(_bedInsList[| 0].bedSleepId); 30 | } 31 | } 32 | } 33 | } 34 | 35 | if(isMe) { 36 | var _overlayDecorateInsList = ds_list_create(); 37 | 38 | var _listSiz = collision_point_list(x, y, obj_decorate, true, false, _overlayDecorateInsList, false); 39 | // DebugMes(place_meeting(x, y, obj_decorate)); 40 | for(var i = 0; i < _listSiz; i++) { 41 | if(InstanceExists(_overlayDecorateInsList[| i])) { 42 | _overlayDecorateInsList[| i].MyOverlapSleeper(); 43 | } 44 | } 45 | 46 | ds_list_destroy(_overlayDecorateInsList); 47 | } 48 | -------------------------------------------------------------------------------- /Source/CloudSleep/objects/obj_sleeper/obj_sleeper.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "obj_sleeper", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 1, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":74,"eventType":8,"collisionObjectId":null,}, 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 29 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":7,"eventType":6,"collisionObjectId":null,}, 30 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 31 | ], 32 | "properties": [], 33 | "overriddenProperties": [], 34 | "parent": { 35 | "name": "Scene", 36 | "path": "folders/Objects/Scene.yy", 37 | }, 38 | } -------------------------------------------------------------------------------- /Source/CloudSleep/objects/textbox/CleanUp_0.gml: -------------------------------------------------------------------------------- 1 | surface_free(draw.su); 2 | window_set_cursor(cr_default); -------------------------------------------------------------------------------- /Source/CloudSleep/objects/textbox/Create_0.gml: -------------------------------------------------------------------------------- 1 | global.clipboard = ""; 2 | 3 | draw = { 4 | su : noone, // surface 5 | re : false, // refresh surface 6 | dc : 30, // display cursor 7 | ft : noone, // font 8 | co : c_black, // font color 9 | sx : 32, // x start 10 | sy : 32, // y start 11 | dw : 160, // draw width 12 | dh : 38, // draw height 13 | ox : 0, // x offset 14 | ry : 0, // y resive 15 | lh : 22 // line height 16 | } 17 | 18 | curt = { 19 | fo : false, // focus 20 | vi : false, // view 21 | tx : "", // text 22 | ph : "", // placeholder 23 | cu : 0, // cursor 24 | se : -1, // select 25 | ml : 80, // max length 26 | hr : [], // historic records 27 | rl : 64, // records upper limit 28 | cr : -1, // records cursor 29 | br : 0 30 | } 31 | 32 | keys = { 33 | ho : vk_home, // home 34 | ed : vk_end, // end 35 | bs : vk_backspace, // backspace 36 | de : vk_delete, // delete 37 | ct : vk_control, // control 38 | na : ord("A"), // A 39 | nx : ord("X"), // X 40 | nc : ord("C"), // C 41 | nv : ord("V"), // V 42 | nz : ord("Z"), // Z 43 | ny : ord("Y"), // Y 44 | le : vk_left, // left 45 | ri : vk_right, // right 46 | ml : mb_left, // mouse left 47 | en : vk_enter, // enter 48 | sh : vk_shift, // shift 49 | es : vk_escape // escape 50 | } 51 | 52 | keyboard_string = ""; -------------------------------------------------------------------------------- /Source/CloudSleep/objects/textbox/Draw_64.gml: -------------------------------------------------------------------------------- 1 | 2 | var su = draw.su, 3 | sx = draw.sx, 4 | sy = draw.sy, 5 | dw = draw.dw, 6 | dh = draw.dh; 7 | 8 | if (!surface_exists(su)) { 9 | su = surface_create(dw + 1, dh + 1); 10 | draw.su = su; 11 | draw.re = true; 12 | } 13 | 14 | draw_set_color(draw.co); 15 | draw_set_alpha(1.0); 16 | draw_rectangle(sx - 1, sy - 1, sx + dw + 1, sy + dh + 1, true); 17 | 18 | if (draw.re) { 19 | 20 | var co = draw.co, 21 | ox = draw.ox, 22 | lh = draw.lh, 23 | tx = curt.tx, 24 | cu = curt.cu, 25 | se = curt.se, 26 | dy = (dh - lh) / 2; 27 | 28 | surface_set_target(su); 29 | draw_clear_alpha(co, 0); 30 | 31 | draw_set_font(draw.ft); 32 | draw_set_color(co); 33 | draw_set_valign(fa_top); 34 | draw_set_halign(fa_left); 35 | 36 | #region draw selected 37 | 38 | if (se > -1) { 39 | var d0 = string_width(string_copy(tx, 1, se)) - ox, 40 | d1 = string_width(string_copy(tx, 1, cu)) - ox; 41 | draw_set_alpha(0.6); 42 | draw_rectangle(d0, dy, d1, dy + lh, false); 43 | draw_set_alpha(1); 44 | } 45 | 46 | #endregion 47 | 48 | #region draw text 49 | 50 | if (tx == "") { 51 | draw_set_alpha(0.6); 52 | draw_text(-ox, dy + draw.ry, curt.ph); 53 | draw_set_alpha(1); 54 | } else { 55 | draw_text(-ox, dy + draw.ry, tx); 56 | } 57 | 58 | #endregion 59 | 60 | #region draw cursor 61 | 62 | if (curt.fo && draw.dc > 0) { 63 | var dx = string_width(string_copy(tx, 1, cu)) - ox; 64 | draw_rectangle(dx, dy, dx, dy + lh, false); 65 | } 66 | 67 | #endregion 68 | 69 | surface_reset_target(); 70 | draw.re = false; 71 | 72 | } 73 | 74 | draw_surface(su, sx, sy); -------------------------------------------------------------------------------- /Source/CloudSleep/objects/textbox/textbox.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMObject", 3 | "resourceVersion": "1.0", 4 | "name": "textbox", 5 | "spriteId": null, 6 | "solid": false, 7 | "visible": true, 8 | "managed": true, 9 | "spriteMaskId": null, 10 | "persistent": false, 11 | "parentObjectId": null, 12 | "physicsObject": false, 13 | "physicsSensor": false, 14 | "physicsShape": 1, 15 | "physicsGroup": 0, 16 | "physicsDensity": 0.5, 17 | "physicsRestitution": 0.1, 18 | "physicsLinearDamping": 0.1, 19 | "physicsAngularDamping": 0.1, 20 | "physicsFriction": 0.2, 21 | "physicsStartAwake": true, 22 | "physicsKinematic": false, 23 | "physicsShapePoints": [], 24 | "eventList": [ 25 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,}, 26 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,}, 27 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,}, 28 | {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":12,"collisionObjectId":null,}, 29 | ], 30 | "properties": [], 31 | "overriddenProperties": [], 32 | "parent": { 33 | "name": "Textbox - Single line", 34 | "path": "folders/Textbox - Single line.yy", 35 | }, 36 | } -------------------------------------------------------------------------------- /Source/CloudSleep/options/linux/options_linux.yy: -------------------------------------------------------------------------------- 1 | { 2 | "option_linux_display_name": "Created with GameMaker", 3 | "option_linux_version": "1.0.0.0", 4 | "option_linux_maintainer_email": "", 5 | "option_linux_homepage": "http://www.yoyogames.com", 6 | "option_linux_short_desc": "", 7 | "option_linux_long_desc": "", 8 | "option_linux_splash_screen": "${base_options_dir}/linux/splash/splash.png", 9 | "option_linux_display_splash": false, 10 | "option_linux_icon": "${base_options_dir}/linux/icons/64.png", 11 | "option_linux_start_fullscreen": false, 12 | "option_linux_allow_fullscreen": false, 13 | "option_linux_interpolate_pixels": true, 14 | "option_linux_display_cursor": true, 15 | "option_linux_sync": false, 16 | "option_linux_resize_window": false, 17 | "option_linux_scale": 0, 18 | "option_linux_texture_page": "2048x2048", 19 | "option_linux_enable_steam": false, 20 | "option_linux_disable_sandbox": false, 21 | "resourceVersion": "1.0", 22 | "name": "Linux", 23 | "tags": [], 24 | "resourceType": "GMLinuxOptions", 25 | } -------------------------------------------------------------------------------- /Source/CloudSleep/options/mac/options_mac.yy: -------------------------------------------------------------------------------- 1 | { 2 | "option_mac_display_name": "Created with GameMaker", 3 | "option_mac_app_id": "com.company.game", 4 | "option_mac_version": "1.0.0.0", 5 | "option_mac_output_dir": "~/gamemakerstudio2", 6 | "option_mac_team_id": "", 7 | "option_mac_signing_identity": "Developer ID Application:", 8 | "option_mac_copyright": "", 9 | "option_mac_splash_png": "${base_options_dir}/mac/splash/splash.png", 10 | "option_mac_icon_png": "${base_options_dir}/mac/icons/1024.png", 11 | "option_mac_installer_background_png": "${base_options_dir}/mac/splash/installer_background.png", 12 | "option_mac_menu_dock": false, 13 | "option_mac_display_cursor": true, 14 | "option_mac_start_fullscreen": false, 15 | "option_mac_allow_fullscreen": false, 16 | "option_mac_interpolate_pixels": true, 17 | "option_mac_vsync": false, 18 | "option_mac_resize_window": false, 19 | "option_mac_enable_retina": false, 20 | "option_mac_scale": 0, 21 | "option_mac_texture_page": "2048x2048", 22 | "option_mac_build_app_store": false, 23 | "option_mac_allow_incoming_network": false, 24 | "option_mac_allow_outgoing_network": false, 25 | "option_mac_app_category": "Games", 26 | "option_mac_enable_steam": false, 27 | "option_mac_disable_sandbox": false, 28 | "option_mac_x86_64": true, 29 | "option_mac_arm64": true, 30 | "option_mac_apple_sign_in": false, 31 | "resourceVersion": "1.0", 32 | "name": "macOS", 33 | "tags": [], 34 | "resourceType": "GMMacOptions", 35 | } -------------------------------------------------------------------------------- /Source/CloudSleep/options/main/options_main.yy: -------------------------------------------------------------------------------- 1 | { 2 | "option_gameguid": "577d677c-a9df-4134-a7fa-fe8e692e3da0", 3 | "option_gameid": "0", 4 | "option_game_speed": 60, 5 | "option_mips_for_3d_textures": false, 6 | "option_draw_colour": 4294967295, 7 | "option_window_colour": 255, 8 | "option_steam_app_id": "0", 9 | "option_sci_usesci": false, 10 | "option_author": "", 11 | "option_collision_compatibility": false, 12 | "option_copy_on_write_enabled": false, 13 | "option_spine_licence": false, 14 | "option_template_image": "${base_options_dir}/main/template_image.png", 15 | "option_template_icon": "${base_options_dir}/main/template_icon.png", 16 | "option_template_description": null, 17 | "resourceVersion": "1.4", 18 | "name": "Main", 19 | "tags": [], 20 | "resourceType": "GMMainOptions", 21 | } -------------------------------------------------------------------------------- /Source/CloudSleep/options/operagx/options_operagx.yy: -------------------------------------------------------------------------------- 1 | { 2 | "option_operagx_version": "1.0.0.0", 3 | "option_operagx_next_version": "1.0.0.0", 4 | "option_operagx_game_name": "${project_name}", 5 | "option_operagx_interpolate_pixels": true, 6 | "option_operagx_scale": 0, 7 | "option_operagx_texture_page": "2048x2048", 8 | "option_operagx_display_cursor": true, 9 | "option_operagx_guid": "", 10 | "option_operagx_team_name": "", 11 | "option_operagx_team_id": "", 12 | "option_operagx_editUrl": "", 13 | "option_operagx_internalShareUrl": "", 14 | "option_operagx_publicShareUrl": "", 15 | "resourceVersion": "1.0", 16 | "name": "operagx", 17 | "tags": [], 18 | "resourceType": "GMOperaGXOptions", 19 | } -------------------------------------------------------------------------------- /Source/CloudSleep/options/windows/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/options/windows/icons/icon.ico -------------------------------------------------------------------------------- /Source/CloudSleep/options/windows/options_windows.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMWindowsOptions", 3 | "resourceVersion": "1.1", 4 | "name": "Windows", 5 | "option_windows_display_name": "CloudSleep", 6 | "option_windows_executable_name": "${project_name}.exe", 7 | "option_windows_version": "1.0.0.0", 8 | "option_windows_company_info": "YoYo Games Ltd", 9 | "option_windows_product_info": "Created with GameMaker", 10 | "option_windows_copyright_info": "", 11 | "option_windows_description_info": "Cloud Sleep", 12 | "option_windows_display_cursor": true, 13 | "option_windows_icon": "icons/icon.ico", 14 | "option_windows_save_location": 0, 15 | "option_windows_splash_screen": "${base_options_dir}/windows/splash/splash.png", 16 | "option_windows_use_splash": false, 17 | "option_windows_start_fullscreen": false, 18 | "option_windows_allow_fullscreen_switching": false, 19 | "option_windows_interpolate_pixels": true, 20 | "option_windows_vsync": false, 21 | "option_windows_resize_window": true, 22 | "option_windows_borderless": false, 23 | "option_windows_scale": 0, 24 | "option_windows_copy_exe_to_dest": false, 25 | "option_windows_sleep_margin": 1, 26 | "option_windows_texture_page": "2048x2048", 27 | "option_windows_installer_finished": "${base_options_dir}/windows/installer/finished.bmp", 28 | "option_windows_installer_header": "${base_options_dir}/windows/installer/header.bmp", 29 | "option_windows_license": "${base_options_dir}/windows/installer/license.txt", 30 | "option_windows_nsis_file": "${base_options_dir}/windows/installer/nsis_script.nsi", 31 | "option_windows_enable_steam": false, 32 | "option_windows_disable_sandbox": true, 33 | "option_windows_steam_use_alternative_launcher": false, 34 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/Files/Files.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "Files", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/GuiElementPage/GuiElementPage.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "GuiElementPage", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/GuiElements/GuiElements.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "GuiElements", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/Mouse/Mouse.gml: -------------------------------------------------------------------------------- 1 | function MouseLeftPressed() { 2 | return mouse_check_button_pressed(mb_left); 3 | } 4 | 5 | function MouseRightPressed() { 6 | return mouse_check_button_pressed(mb_right); 7 | } 8 | 9 | 10 | function MouseLeftHold() { 11 | return mouse_check_button(mb_left); 12 | } 13 | 14 | function MouseMidHold() { 15 | return mouse_check_button(mb_middle); 16 | } 17 | 18 | function MouseRightHold() { 19 | return mouse_check_button(mb_right); 20 | } 21 | 22 | 23 | function MouseLeftReleased() { 24 | return mouse_check_button_released(mb_left); 25 | } 26 | 27 | function MouseRightReleased() { 28 | return mouse_check_button_released(mb_right); 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/Mouse/Mouse.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "Mouse", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/SCENE/SCENE.gml: -------------------------------------------------------------------------------- 1 | #macro SCENE_CellSize 32 2 | #macro SCENE_MinimumSize 10 3 | 4 | function SCENE_MouseOnMe(left, top, right, bottom) { 5 | var mx = mouse_x; 6 | var my = mouse_y; 7 | var x1 = left; 8 | var y1 = top; 9 | var x2 = right; 10 | var y2 = bottom; 11 | if(point_in_rectangle(mx, my, x1, y1, x2, y2)) { 12 | return true; 13 | } 14 | return false; 15 | } 16 | 17 | function SCENE_MouseOnMe_Radius(_x, _y, _radius) { 18 | var mx = mouse_x; 19 | var my = mouse_y; 20 | if(point_in_rectangle(mx, my, _x - _radius, _y - _radius, _x + _radius, _y + _radius)) { 21 | return true; 22 | } 23 | return false; 24 | } 25 | 26 | function SCENE_DrawRectangleOnGui(left, top, right, bottom, outline = false) { 27 | draw_rectangle( 28 | GetPositionXOnGUI(left), 29 | GetPositionYOnGUI(top), 30 | GetPositionXOnGUI(right), 31 | GetPositionYOnGUI(bottom), 32 | outline 33 | ); 34 | } 35 | 36 | function SCENE_DrawRectangleOnGui_Radius(_x, _y, _radius, outline = false) { 37 | draw_rectangle( 38 | GetPositionXOnGUI(_x) - _radius, 39 | GetPositionYOnGUI(_y) - _radius, 40 | GetPositionXOnGUI(_x) + _radius, 41 | GetPositionYOnGUI(_y) + _radius, 42 | outline 43 | ); 44 | } 45 | 46 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/SCENE/SCENE.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "SCENE", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/SceneElements/SceneElements.gml: -------------------------------------------------------------------------------- 1 | #macro SceneDepthBackgrounds 1000 2 | #macro SceneDepthDynamicAdd -1000 3 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/SceneElements/SceneElements.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "SceneElements", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/SetSize_/SetSize_.gml: -------------------------------------------------------------------------------- 1 | /// @desc 设置物体的大小 2 | /// @param {real} destWidth 宽 3 | /// @param {real} destHeight 高 4 | /// @param {id} destID 物体id,默认为当前物体的id,也可设为其它物体的id 5 | function SetSize(destWidth, destHeight, destID = id) { 6 | with(destID) { 7 | image_xscale = destWidth / sprite_get_width(sprite_index); 8 | image_yscale = destHeight / sprite_get_height(sprite_index); 9 | } 10 | } 11 | 12 | /// @desc 设置物体的大小,但是锁定宽高比 13 | /// @param {real} destWidth 宽 14 | /// @param {id} destID 物体id,默认为当前物体的id,也可设为其它物体的id 15 | function SetSizeLockAspect_Width(destWidth, destID = id) { 16 | with(destID) { 17 | image_xscale = destWidth / sprite_get_width(sprite_index); 18 | image_yscale = image_xscale; 19 | } 20 | } 21 | 22 | /// @desc 设置物体的大小,但是锁定宽高比 23 | /// @param {real} destHeight 高 24 | /// @param {id} destID 物体id,默认为当前物体的id,也可设为其它物体的id 25 | function SetSizeLockAspect_Height(destHeight, destID = id) { 26 | with(destID) { 27 | image_yscale = destHeight / sprite_get_height(sprite_index); 28 | image_xscale = image_yscale; 29 | } 30 | } 31 | 32 | 33 | /// @desc 设置物体的大小,通用版本,返回一个二维数组,[0] = xscale, [1] = yscale 34 | /// @param {real} destWidth 宽 35 | /// @param {real} destHeight 高 36 | /// @param {real} srcWidth sprite_get_width() 37 | /// @param {real} srcHeight sprite_get_height() 38 | function SetSize_Generic(destWidth, destHeight, srcWidth, srcHeight) { 39 | var res = [1, 1]; 40 | res[0] = destWidth / srcWidth; 41 | res[1] = destHeight / srcHeight; 42 | return res; 43 | } 44 | 45 | /// @desc 设置物体的大小,但是锁定宽高比,通用版本,返回一个二维数组,[0] = xscale, [1] = yscale 46 | /// @param {real} destWidth 宽 47 | /// @param {real} srcWidth sprite_get_width() 48 | function SetSizeLockAspect_Width_Generic(destWidth, srcWidth) { 49 | var res = [1, 1]; 50 | res[0] = destWidth / srcWidth; 51 | res[1] = res[0]; 52 | return res; 53 | } 54 | 55 | /// @desc 设置物体的大小,但是锁定宽高比,通用版本,返回一个二维数组,[0] = xscale, [1] = yscale 56 | /// @param {real} destHeight 高 57 | /// @param {real} srcHeight sprite_get_height() 58 | function SetSizeLockAspect_Height_Generic(destHeight, srcHeight) { 59 | var res = [1, 1]; 60 | res[1] = destHeight / srcHeight; 61 | res[0] = res[1]; 62 | return res; 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/SetSize_/SetSize_.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "SetSize_", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/Settings/Settings.gml: -------------------------------------------------------------------------------- 1 | // 当前客户端版本 2 | #macro ClientVersion "WheatCloudSleep_v1" 3 | 4 | // 关于该客户端的信息 5 | #macro ClientAbout (\ 6 | "云睡觉官方版本v1.0.0\n" + \ 7 | "服务端开发:\n" + \ 8 | "\t" + "github@ymx-mshk\n" + \ 9 | "\t" + "github@B1aNB1aN\n" + \ 10 | "\t" + "github@zhhhhhhhh\n" + \ 11 | "\t" + "github@WheatBox\n" + \ 12 | "客户端开发:\n" + \ 13 | "\t" + "github@WheatBox\n" + \ 14 | "美术创作:\n" + \ 15 | "\t" + "github@WheatBox\n"\ 16 | ) 17 | 18 | // 镜头最远拖拽距离 19 | #macro CameraMaxDragDistance 1200 20 | 21 | // 聊天记录的接收范围的圆的半径,单位:像素 22 | #macro ChatHistoryRecordMaxDistance 4400 // 3200 + 1200 23 | 24 | // 聊天记录的最大记录条数 25 | #macro ChatHistoryMaxLines 100 26 | 27 | // 名称的最短长度 28 | #macro NameMinimumLength 2 29 | 30 | // GUI滚动速度 31 | #macro GUIScrollYSpeed 50 32 | 33 | 34 | 35 | // 非程序可执行目录的保存位置 36 | // 请尽量不要更改这一小段,除非你希望用户在从别的客户端切换到你开发的客户端的时候需要把配置项再都部署一遍 37 | if(file_exists("settings.ini") == false) { 38 | file_text_close(file_text_open_write("settings.ini")); 39 | } 40 | globalvar __SavePath; 41 | __SavePath = filename_dir("settings.ini") + "\\"; 42 | #macro SavePath __SavePath 43 | 44 | // 外部配置项文件 45 | #macro FILEINI_Settings (SavePath + "settings.ini") 46 | /* 47 | [user] 48 | name = myName 49 | [ourPhone] 50 | wallpaperFilename = "xxxxx.png" 51 | musicDir = "X:\xxxx\" 52 | musicLoopMode = 0 53 | */ 54 | 55 | 56 | globalvar gDecoratesOverlappingSleeperAlpha; 57 | gDecoratesOverlappingSleeperAlpha = 0.9; 58 | globalvar gSleepersLabelAlpha, gSleepersLabelScale, gSleepersChatScale; 59 | gSleepersLabelAlpha = 0.7; 60 | gSleepersLabelScale = 1.0; 61 | gSleepersChatScale = 1.0; 62 | globalvar gHideVoteKick; 63 | gHideVoteKick = 0; 64 | globalvar gAutoDayNight; 65 | gAutoDayNight = 1; 66 | 67 | 68 | #macro OtherSleepersChatHistoryMaxLen 10 69 | 70 | 71 | #macro DEBUGMODE 0 72 | //show_debug_overlay(DEBUGMODE); 73 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/Settings/Settings.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "Settings", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "CloudSleep", 9 | "path": "CloudSleep.yyp", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/add_key_time/add_key_time.gml: -------------------------------------------------------------------------------- 1 | /// @desc 2 | /// @arg {real} R R 3 | /// @arg {real} G G 4 | /// @arg {real} B B 5 | /// @arg {real} con 对比度 6 | /// @arg {real} sat 饱和度 7 | /// @arg {real} brt 亮度 8 | function add_key_time(R, G, B, con, sat, brt, pop_strength, pop_threshold) { 9 | if(is_undefined(color[0][0])) { 10 | var i = 0; 11 | } else { 12 | var i = array_length(color); // 返回数组的第一维的长度 13 | // var i = array_length(color[0]); // 返回数组的第二维的长度 14 | } 15 | 16 | color[i][0] = R / 255; 17 | color[i][1] = G / 255; 18 | color[i][2] = B / 255; 19 | 20 | con_sat_brt[i][0] = con; 21 | con_sat_brt[i][1] = sat; 22 | con_sat_brt[i][2] = brt; 23 | 24 | con_sat_brt[i][3] = pop_strength; 25 | con_sat_brt[i][4] = pop_threshold; 26 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/add_key_time/add_key_time.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "add_key_time", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Day Night", 9 | "path": "folders/Day Night.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/bed/bed.gml: -------------------------------------------------------------------------------- 1 | /// @desc 创建背景 2 | function CreateBackground(_x, _y, _materialId) { 3 | var newins = instance_create_depth(_x, _y, 0, obj_background); 4 | newins.materialId = _materialId; 5 | return newins; 6 | } 7 | 8 | /// @desc 创建不可互动物体 9 | function CreateDecorate(_x, _y, _materialId) { 10 | var newins = instance_create_depth(_x, _y, 0, obj_decorate); 11 | newins.materialId = _materialId; 12 | return newins; 13 | } 14 | 15 | /// @desc 创建床 16 | /// @param {real} _x x 17 | /// @param {real} _y y 18 | /// @param {real} _bedSleepId 床位睡觉id 19 | /// @param {real} _materialId 床的素材ID 20 | function CreateBed(_x, _y, _bedSleepId, _materialId) { 21 | var newins = instance_create_depth(_x, _y, 0, obj_bed); 22 | newins.materialId = _materialId; 23 | InitBed(newins, _bedSleepId); 24 | return newins; 25 | } 26 | 27 | /// @desc 初始化床 28 | /// @param {Id.Instance} _betInsid 床的实例id 29 | /// @param {real} _bedSleepId 床位睡觉id 30 | function InitBed(_betInsid, _bedSleepId) { 31 | // _betInsid.sprite_index = spr_bedEmpty; 32 | _betInsid.bedSleepId = _bedSleepId; 33 | _betInsid.bedSleeperName = undefined; 34 | _betInsid.empty = true; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/bed/bed.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "Bed", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/camera/camera.gml: -------------------------------------------------------------------------------- 1 | function CameraX() { 2 | return camera_get_view_x(view_camera[0]); 3 | } 4 | 5 | function CameraY() { 6 | return camera_get_view_y(view_camera[0]); 7 | } 8 | 9 | function CameraWidth() { 10 | return camera_get_view_width(view_camera[0]); 11 | } 12 | 13 | function CameraHeight() { 14 | return camera_get_view_height(view_camera[0]); 15 | } 16 | 17 | function CameraScale(useWidth_0_OrHeight_1_ = 0, useDefaultGuiSize = false) { 18 | if(useWidth_0_OrHeight_1_) { 19 | if(useDefaultGuiSize) { 20 | return CameraHeight() / 720; 21 | } else { 22 | return CameraHeight() / GuiHeight(); 23 | } 24 | } 25 | if(useDefaultGuiSize) { 26 | return CameraWidth() / 1280; 27 | } else { 28 | return CameraWidth() / GuiWidth(); 29 | } 30 | } 31 | 32 | function CameraLock() { 33 | if(instance_exists(obj_camera)) { 34 | obj_camera.mouseCameraMoveLock = true; 35 | } 36 | } 37 | 38 | function CameraUnlock() { 39 | if(instance_exists(obj_camera)) { 40 | obj_camera.mouseCameraMoveLock = false; 41 | } 42 | } 43 | 44 | function GuiWidth() { 45 | return display_get_gui_width(); 46 | } 47 | 48 | function GuiHeight() { 49 | return display_get_gui_height(); 50 | } 51 | 52 | function CameraSetPos(_x, _y) { 53 | // camera_set_view_pos(view_camera[0], _x, _y); 54 | if(InstanceExists(obj_camera)) { 55 | obj_camera.cameraCenterX = _x; 56 | obj_camera.cameraCenterY = _y; 57 | 58 | camera_set_view_pos(view_camera[0], obj_camera.cameraCenterX - CameraWidth() / 2, obj_camera.cameraCenterY - CameraHeight() / 2); 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/camera/camera.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "Camera", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/file_dll/file_dll.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "file_dll", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/font/font.gml: -------------------------------------------------------------------------------- 1 | globalvar fontRegular; 2 | fontRegular = font_add("fonts/SourceHanSansSC-Medium.otf", 14, false, false, 0, 65536); 3 | 4 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/font/font.yy: -------------------------------------------------------------------------------- 1 | { 2 | "isDnD": false, 3 | "isCompatibility": false, 4 | "parent": { 5 | "name": "Scripts", 6 | "path": "folders/Scripts.yy", 7 | }, 8 | "resourceVersion": "1.0", 9 | "name": "Font", 10 | "tags": [], 11 | "resourceType": "GMScript", 12 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/getpositionongui/getpositionongui.gml: -------------------------------------------------------------------------------- 1 | /// @desc 获取某一坐标x投影到GUI上的位置 2 | /// @param {real} _x x 3 | /// @param {real} _cameraIndex 默认为0 4 | /// @returns {real} 投影后的 x坐标 5 | function GetPositionXOnGUI(_x, _cameraIndex = 0) { 6 | return (_x - camera_get_view_x(view_camera[_cameraIndex])) * (display_get_gui_width() / camera_get_view_width(view_camera[_cameraIndex])); 7 | } 8 | 9 | /// @desc 获取某一坐标y投影到GUI上的位置 10 | /// @param {real} _y y 11 | /// @param {real} _cameraIndex 默认为0 12 | /// @returns {real} 投影后的 y坐标 13 | function GetPositionYOnGUI(_y, _cameraIndex = 0) { 14 | return (_y - camera_get_view_y(view_camera[_cameraIndex])) * (display_get_gui_height() / camera_get_view_height(view_camera[_cameraIndex])); 15 | } 16 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/getpositionongui/getpositionongui.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "GetPositionOnGUI", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/gui/gui.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "GUI", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/networks/networks.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "Networks", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/others/others.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "Others", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/ourPhone/ourPhone.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "ourPhone", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/ourPhoneGuiElements/ourPhoneGuiElements.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "ourPhoneGuiElements", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/path/path.gml: -------------------------------------------------------------------------------- 1 | globalvar grid, gridCellSize, gridOffsetXAdd, gridOffsetYAdd; 2 | gridCellSize = 32; 3 | 4 | gridOffsetXAdd = 0; 5 | gridOffsetYAdd = 0; 6 | 7 | var gridsize = [ 8 | 0, 9 | 0, 10 | 6784 / 32, 11 | 5504 / 32 12 | ]; 13 | grid = mp_grid_create(gridsize[0], gridsize[1], gridsize[2], gridsize[3], gridCellSize, gridCellSize); 14 | 15 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/path/path.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "Path", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/set_reset_alpha/set_reset_alpha.gml: -------------------------------------------------------------------------------- 1 | function set_alpha() { 2 | shader_set(shd_alpha); 3 | with(obj_day_and_night) shader_set_uniform_f(u_alpha, alpha); 4 | } 5 | 6 | function reset_alpha() { 7 | shader_reset(); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/set_reset_alpha/set_reset_alpha.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "set_reset_alpha", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Day Night", 9 | "path": "folders/Day Night.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/sleeper/sleeper.gml: -------------------------------------------------------------------------------- 1 | // #macro NewSleeperPosX 3300 2 | // #macro NewSleeperPosY 2700 3 | #macro NewSleeperPosX -100000 4 | #macro NewSleeperPosY -100000 5 | 6 | /* 7 | // 这里 SleeperType 的内容的顺序要和服务器上一样 8 | enum SleeperType { 9 | Girl, 10 | Boy 11 | }; 12 | */ 13 | 14 | globalvar gShowSleeperId; 15 | gShowSleeperId = false; 16 | 17 | globalvar myName, myType, mySleeperId; 18 | myName = ""; 19 | // myType = SleeperType.Boy; 20 | myType = -1; 21 | mySleeperId = -1; 22 | 23 | // gArrSleepersInitPosx [type][第几个随机位置] 24 | // 例如:{ { 100, 200, 400 }, { 60, 600 } } 25 | // 就是有两个睡客类型的出生点信息,type0的睡客有3个随机出生点(x = 100, x = 200, x = 300),type1的睡客有3个随机出生点(x = 60, x = 600) 26 | globalvar gArrSleepersInitPosx, gArrSleepersInitPosy; 27 | gArrSleepersInitPosx = []; 28 | gArrSleepersInitPosy = []; 29 | 30 | function GetSleeperType(val) { 31 | /* 32 | switch(val) { 33 | case 0: 34 | return SleeperType.Girl; 35 | case 1: 36 | return SleeperType.Boy; 37 | } 38 | 39 | return SleeperType.Boy; 40 | */ 41 | return val; 42 | } 43 | 44 | /// @desc 创建睡客 45 | function CreateSleeper(_x, _y) { 46 | var newins = instance_create_depth(_x, _y, 0, obj_sleeper); 47 | return newins; 48 | } 49 | 50 | 51 | 52 | /// @desc 从本地读取用户名 53 | function ReadMyName() { 54 | ini_open(FILEINI_Settings); 55 | 56 | myName = ini_read_string("user", "name", ""); 57 | 58 | ini_close(); 59 | } 60 | 61 | /// @desc 从本地写入用户名 62 | function WriteMyName() { 63 | ini_open(FILEINI_Settings); 64 | 65 | ini_write_string("user", "name", myName); 66 | 67 | ini_close(); 68 | } 69 | 70 | ReadMyName(); 71 | 72 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/sleeper/sleeper.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "Sleeper", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/stlvector/stlvector.yy: -------------------------------------------------------------------------------- 1 | { 2 | "isDnD": false, 3 | "isCompatibility": false, 4 | "parent": { 5 | "name": "Scripts", 6 | "path": "folders/Scripts.yy", 7 | }, 8 | "resourceVersion": "1.0", 9 | "name": "STLvector", 10 | "tags": [], 11 | "resourceType": "GMScript", 12 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/textbox_fns/textbox_fns.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "textbox_fns", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Textbox - Single line", 9 | "path": "folders/Textbox - Single line.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/votetokick/votetokick.gml: -------------------------------------------------------------------------------- 1 | globalvar OnVote; 2 | OnVote = false; 3 | 4 | function CreateKickWhoBox(sleeperId) { 5 | if(OnVote) { 6 | return; 7 | } 8 | if(instance_exists(obj_client) == false) { 9 | return; 10 | } 11 | if(obj_client.MyCanUseSleeperId(sleeperId) == false) { 12 | return; 13 | } 14 | 15 | var ins = instance_create_depth(mouse_x, mouse_y, -10000, obj_kickWhoBox); 16 | ins.sleeperId = sleeperId; 17 | ins.name = obj_client.sleepers[sleeperId].name; 18 | } 19 | 20 | function CreateKickShowVotes(whoVoteSleeperId, kickSleeperId) { 21 | if(!OnVote) { 22 | return; 23 | } 24 | if(instance_exists(obj_client) == false) { 25 | return; 26 | } 27 | if(obj_client.MyCanUseSleeperId(whoVoteSleeperId) == false) { 28 | return; 29 | } 30 | if(obj_client.MyCanUseSleeperId(kickSleeperId) == false) { 31 | return; 32 | } 33 | 34 | var ins = instance_create_depth(0, 0, -10000, obj_kickShowVotes); 35 | ins.sleeperId = kickSleeperId; 36 | ins.whoVoteName = obj_client.sleepers[whoVoteSleeperId].name; 37 | ins.kickName = obj_client.sleepers[kickSleeperId].name; 38 | ins.whoVoteSleeperId = whoVoteSleeperId; 39 | ins.kickSleeperId = kickSleeperId; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/votetokick/votetokick.yy: -------------------------------------------------------------------------------- 1 | { 2 | "isDnD": false, 3 | "isCompatibility": false, 4 | "parent": { 5 | "name": "Scripts", 6 | "path": "folders/Scripts.yy", 7 | }, 8 | "resourceVersion": "1.0", 9 | "name": "VoteToKick", 10 | "tags": [], 11 | "resourceType": "GMScript", 12 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/wheat_ptr_/wheat_ptr_.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "wheat_ptr_", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/scripts/wheatcommand/wheatcommand.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMScript", 3 | "resourceVersion": "1.0", 4 | "name": "WheatCommand", 5 | "isDnD": false, 6 | "isCompatibility": false, 7 | "parent": { 8 | "name": "Scripts", 9 | "path": "folders/Scripts.yy", 10 | }, 11 | } -------------------------------------------------------------------------------- /Source/CloudSleep/shaders/shd_alpha/shd_alpha.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // Simple passthrough fragment shader 3 | // 4 | varying vec2 v_vTexcoord; 5 | varying vec4 v_vColour; 6 | 7 | uniform float alpha; 8 | 9 | void main() 10 | { 11 | gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ) * vec4(1.0, 1.0, 1.0, alpha); 12 | } 13 | -------------------------------------------------------------------------------- /Source/CloudSleep/shaders/shd_alpha/shd_alpha.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // Simple passthrough vertex shader 3 | // 4 | attribute vec3 in_Position; // (x,y,z) 5 | //attribute vec3 in_Normal; // (x,y,z) unused in this shader. 6 | attribute vec4 in_Colour; // (r,g,b,a) 7 | attribute vec2 in_TextureCoord; // (u,v) 8 | 9 | varying vec2 v_vTexcoord; 10 | varying vec4 v_vColour; 11 | 12 | void main() 13 | { 14 | vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); 15 | gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; 16 | 17 | v_vColour = in_Colour; 18 | v_vTexcoord = in_TextureCoord; 19 | } 20 | -------------------------------------------------------------------------------- /Source/CloudSleep/shaders/shd_alpha/shd_alpha.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMShader", 3 | "resourceVersion": "1.0", 4 | "name": "shd_alpha", 5 | "type": 1, 6 | "parent": { 7 | "name": "Day Night", 8 | "path": "folders/Day Night.yy", 9 | }, 10 | } -------------------------------------------------------------------------------- /Source/CloudSleep/shaders/shd_day_and_night/shd_day_and_night.fsh: -------------------------------------------------------------------------------- 1 | // 2 | // Simple passthrough fragment shader 3 | // 4 | varying vec2 v_vTexcoord; 5 | varying vec4 v_vColour; 6 | 7 | uniform vec3 col; 8 | uniform float con_sat_brt[5]; 9 | 10 | #define contrast con_sat_brt[0] 11 | #define saturation con_sat_brt[1] 12 | #define brightness con_sat_brt[2] 13 | 14 | #define pop_strength con_sat_brt[3] 15 | #define pop_threshold con_sat_brt[4] 16 | 17 | void main() 18 | { 19 | vec3 out_col = texture2D( gm_BaseTexture, v_vTexcoord ).rgb; 20 | 21 | float grey = dot(out_col, vec3(0.299, 0.587, 0.114)); 22 | 23 | out_col = (out_col - 0.5) * contrast + 0.5; 24 | out_col = out_col + pop_strength * max(grey - pop_threshold, 0.0); 25 | out_col = mix(vec3(grey), out_col, saturation); 26 | out_col = out_col + brightness; 27 | 28 | gl_FragColor = vec4(out_col * col, 1.0); 29 | } 30 | -------------------------------------------------------------------------------- /Source/CloudSleep/shaders/shd_day_and_night/shd_day_and_night.vsh: -------------------------------------------------------------------------------- 1 | // 2 | // Simple passthrough vertex shader 3 | // 4 | attribute vec3 in_Position; // (x,y,z) 5 | //attribute vec3 in_Normal; // (x,y,z) unused in this shader. 6 | attribute vec4 in_Colour; // (r,g,b,a) 7 | attribute vec2 in_TextureCoord; // (u,v) 8 | 9 | varying vec2 v_vTexcoord; 10 | varying vec4 v_vColour; 11 | 12 | void main() 13 | { 14 | vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); 15 | gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; 16 | 17 | v_vColour = in_Colour; 18 | v_vTexcoord = in_TextureCoord; 19 | } 20 | -------------------------------------------------------------------------------- /Source/CloudSleep/shaders/shd_day_and_night/shd_day_and_night.yy: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "GMShader", 3 | "resourceVersion": "1.0", 4 | "name": "shd_day_and_night", 5 | "type": 1, 6 | "parent": { 7 | "name": "Day Night", 8 | "path": "folders/Day Night.yy", 9 | }, 10 | } -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_bedboy/72064a5a-1764-442c-aa5e-b7c14346b2d0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_bedboy/72064a5a-1764-442c-aa5e-b7c14346b2d0.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_bedboy/layers/72064a5a-1764-442c-aa5e-b7c14346b2d0/5d8bbcbe-15ee-40e9-b536-1d44f61990b2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_bedboy/layers/72064a5a-1764-442c-aa5e-b7c14346b2d0/5d8bbcbe-15ee-40e9-b536-1d44f61990b2.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_bedempty/082562ca-b294-4ca2-8ee5-69345f1c376c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_bedempty/082562ca-b294-4ca2-8ee5-69345f1c376c.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_bedempty/layers/082562ca-b294-4ca2-8ee5-69345f1c376c/ec87483b-718c-4481-9054-a15ec54ffb84.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_bedempty/layers/082562ca-b294-4ca2-8ee5-69345f1c376c/ec87483b-718c-4481-9054-a15ec54ffb84.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_bedgirl/376d13cb-767c-491c-9a89-da36ee75d634.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_bedgirl/376d13cb-767c-491c-9a89-da36ee75d634.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_bedgirl/layers/376d13cb-767c-491c-9a89-da36ee75d634/9e4f4a55-d38e-4004-869c-b639f9d9b399.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_bedgirl/layers/376d13cb-767c-491c-9a89-da36ee75d634/9e4f4a55-d38e-4004-869c-b639f9d9b399.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_bedhitbox/428a5c0c-acb1-4188-9e3f-a5046d74aad5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_bedhitbox/428a5c0c-acb1-4188-9e3f-a5046d74aad5.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_bedhitbox/layers/428a5c0c-acb1-4188-9e3f-a5046d74aad5/dc43eaf2-edaa-4645-8f5a-57dad499c139.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_bedhitbox/layers/428a5c0c-acb1-4188-9e3f-a5046d74aad5/dc43eaf2-edaa-4645-8f5a-57dad499c139.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_boy/256c1a87-64aa-47fb-8bf2-b10f4331dbec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_boy/256c1a87-64aa-47fb-8bf2-b10f4331dbec.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_boy/layers/256c1a87-64aa-47fb-8bf2-b10f4331dbec/44415023-ba75-490f-98f7-604e49da9828.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_boy/layers/256c1a87-64aa-47fb-8bf2-b10f4331dbec/44415023-ba75-490f-98f7-604e49da9828.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_chatbackground/4f0db8c1-867c-4fe3-b1bf-9684f87e1fb7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_chatbackground/4f0db8c1-867c-4fe3-b1bf-9684f87e1fb7.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_chatbackground/layers/4f0db8c1-867c-4fe3-b1bf-9684f87e1fb7/b2737380-f443-43bb-b056-abce5f98f2d9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_chatbackground/layers/4f0db8c1-867c-4fe3-b1bf-9684f87e1fb7/b2737380-f443-43bb-b056-abce5f98f2d9.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_chatbackgroundtail/cfe8283a-0ad5-4129-a0c0-c5fc44f7788a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_chatbackgroundtail/cfe8283a-0ad5-4129-a0c0-c5fc44f7788a.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_chatbackgroundtail/efdf6f5f-08cc-4eba-adc6-8262c337e0ea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_chatbackgroundtail/efdf6f5f-08cc-4eba-adc6-8262c337e0ea.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_chatbackgroundtail/layers/cfe8283a-0ad5-4129-a0c0-c5fc44f7788a/8fdf594c-bbe0-4301-93f4-84807f22bda6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_chatbackgroundtail/layers/cfe8283a-0ad5-4129-a0c0-c5fc44f7788a/8fdf594c-bbe0-4301-93f4-84807f22bda6.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_chatbackgroundtail/layers/efdf6f5f-08cc-4eba-adc6-8262c337e0ea/8fdf594c-bbe0-4301-93f4-84807f22bda6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_chatbackgroundtail/layers/efdf6f5f-08cc-4eba-adc6-8262c337e0ea/8fdf594c-bbe0-4301-93f4-84807f22bda6.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_choosesleepertypebuttonhitbox/b84cf8fd-6171-4898-a281-e248152744c9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_choosesleepertypebuttonhitbox/b84cf8fd-6171-4898-a281-e248152744c9.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_choosesleepertypebuttonhitbox/layers/b84cf8fd-6171-4898-a281-e248152744c9/32178cbf-d687-41ba-a794-b5daf6758350.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_choosesleepertypebuttonhitbox/layers/b84cf8fd-6171-4898-a281-e248152744c9/32178cbf-d687-41ba-a794-b5daf6758350.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_girl/e0fe79a9-00f0-4d8b-91ec-fb56f738e885.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_girl/e0fe79a9-00f0-4d8b-91ec-fb56f738e885.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_girl/layers/e0fe79a9-00f0-4d8b-91ec-fb56f738e885/1b8a4e5c-2034-467d-a9bb-4c1184bd7277.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_girl/layers/e0fe79a9-00f0-4d8b-91ec-fb56f738e885/1b8a4e5c-2034-467d-a9bb-4c1184bd7277.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_groundmeasuring/ecb9edfe-2655-41f9-95da-7aa2d9908ccc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_groundmeasuring/ecb9edfe-2655-41f9-95da-7aa2d9908ccc.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_groundmeasuring/layers/ecb9edfe-2655-41f9-95da-7aa2d9908ccc/03f973a5-f24e-48dd-85b3-9a0b4f7e8c67.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_groundmeasuring/layers/ecb9edfe-2655-41f9-95da-7aa2d9908ccc/03f973a5-f24e-48dd-85b3-9a0b4f7e8c67.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_Camera/49fbfcec-1733-4ef6-a746-fd0a14fa7aed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_Camera/49fbfcec-1733-4ef6-a746-fd0a14fa7aed.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_Camera/layers/49fbfcec-1733-4ef6-a746-fd0a14fa7aed/83b41f5c-fc9c-408f-a88c-a947c59f4f98.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_Camera/layers/49fbfcec-1733-4ef6-a746-fd0a14fa7aed/83b41f5c-fc9c-408f-a88c-a947c59f4f98.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_Chat/18a3930f-da4d-4cc6-bf36-f79a5ca1568c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_Chat/18a3930f-da4d-4cc6-bf36-f79a5ca1568c.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_Chat/layers/18a3930f-da4d-4cc6-bf36-f79a5ca1568c/bb87f970-50b1-414d-826e-e1daeaff7675.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_Chat/layers/18a3930f-da4d-4cc6-bf36-f79a5ca1568c/bb87f970-50b1-414d-826e-e1daeaff7675.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_CustomWallpaper/bc2ae55a-39f0-41f3-a80a-694439cfb367.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_CustomWallpaper/bc2ae55a-39f0-41f3-a80a-694439cfb367.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_CustomWallpaper/layers/bc2ae55a-39f0-41f3-a80a-694439cfb367/887ec16f-2389-409b-9373-879de8c416a4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_CustomWallpaper/layers/bc2ae55a-39f0-41f3-a80a-694439cfb367/887ec16f-2389-409b-9373-879de8c416a4.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_MusicPlayer/7836522b-8e84-4925-9ec1-d4c30088d332.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_MusicPlayer/7836522b-8e84-4925-9ec1-d4c30088d332.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_MusicPlayer/layers/7836522b-8e84-4925-9ec1-d4c30088d332/f500fbc9-9758-4748-929e-f10a76c0f7ef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_MusicPlayer/layers/7836522b-8e84-4925-9ec1-d4c30088d332/f500fbc9-9758-4748-929e-f10a76c0f7ef.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeListLoop/aee71006-2f95-4dea-a906-24340c6ca20b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeListLoop/aee71006-2f95-4dea-a906-24340c6ca20b.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeListLoop/layers/aee71006-2f95-4dea-a906-24340c6ca20b/00ab37d3-acdf-46b3-864d-fd2842ab71fd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeListLoop/layers/aee71006-2f95-4dea-a906-24340c6ca20b/00ab37d3-acdf-46b3-864d-fd2842ab71fd.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeSingleLoop/364b1c9f-376d-4532-a192-d31d2ea12d3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeSingleLoop/364b1c9f-376d-4532-a192-d31d2ea12d3d.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeSingleLoop/layers/364b1c9f-376d-4532-a192-d31d2ea12d3d/2fdb2bb9-9d8e-4466-b704-056d759136af.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeSingleLoop/layers/364b1c9f-376d-4532-a192-d31d2ea12d3d/2fdb2bb9-9d8e-4466-b704-056d759136af.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeStop/4a95b8d9-6222-4468-bb27-aedd1f55787e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeStop/4a95b8d9-6222-4468-bb27-aedd1f55787e.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeStop/layers/4a95b8d9-6222-4468-bb27-aedd1f55787e/4d3f05b9-b0aa-4556-a1df-1ffcda387d50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_MusicPlayer_LoopModeStop/layers/4a95b8d9-6222-4468-bb27-aedd1f55787e/4d3f05b9-b0aa-4556-a1df-1ffcda387d50.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_Photos/6e4b0649-bfde-4abe-a85d-5edf30b7285a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_Photos/6e4b0649-bfde-4abe-a85d-5edf30b7285a.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_Photos/layers/6e4b0649-bfde-4abe-a85d-5edf30b7285a/8a762be1-605d-41a4-b20c-08f665b73514.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_Photos/layers/6e4b0649-bfde-4abe-a85d-5edf30b7285a/8a762be1-605d-41a4-b20c-08f665b73514.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_Report/29948eca-0f03-45b9-b8da-4c26df6a430d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_Report/29948eca-0f03-45b9-b8da-4c26df6a430d.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_Report/layers/29948eca-0f03-45b9-b8da-4c26df6a430d/8e5fb81b-a34d-4fe7-818c-5c5679ef72e6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_Report/layers/29948eca-0f03-45b9-b8da-4c26df6a430d/8e5fb81b-a34d-4fe7-818c-5c5679ef72e6.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_WebBrowser/8899b11c-983e-4dde-8d50-9bc8bdbd0689.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_WebBrowser/8899b11c-983e-4dde-8d50-9bc8bdbd0689.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourApp_WebBrowser/layers/8899b11c-983e-4dde-8d50-9bc8bdbd0689/3f1662ef-3f28-498c-86ed-992f1cd712e5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourApp_WebBrowser/layers/8899b11c-983e-4dde-8d50-9bc8bdbd0689/3f1662ef-3f28-498c-86ed-992f1cd712e5.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourPhone/300f9fac-cf67-482a-93d0-2eb0a137db7d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourPhone/300f9fac-cf67-482a-93d0-2eb0a137db7d.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourPhone/layers/300f9fac-cf67-482a-93d0-2eb0a137db7d/b2dac599-aaac-41fc-b8ba-d623dd31637c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourPhone/layers/300f9fac-cf67-482a-93d0-2eb0a137db7d/b2dac599-aaac-41fc-b8ba-d623dd31637c.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourPhoneWallpaper/cf64f279-52aa-40cc-9c59-70a96672401d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourPhoneWallpaper/cf64f279-52aa-40cc-9c59-70a96672401d.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourPhoneWallpaper/layers/cf64f279-52aa-40cc-9c59-70a96672401d/8339af6c-d650-4074-88fb-946c7c6e3b80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourPhoneWallpaper/layers/cf64f279-52aa-40cc-9c59-70a96672401d/8339af6c-d650-4074-88fb-946c7c6e3b80.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourPhone_ButtonHome/627094a9-b5e7-4143-bdcb-d27ed539562a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourPhone_ButtonHome/627094a9-b5e7-4143-bdcb-d27ed539562a.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_ourPhone_ButtonHome/layers/627094a9-b5e7-4143-bdcb-d27ed539562a/a530a9bc-eaff-4d51-a23a-6867526abcd5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_ourPhone_ButtonHome/layers/627094a9-b5e7-4143-bdcb-d27ed539562a/a530a9bc-eaff-4d51-a23a-6867526abcd5.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_sleeperhitbox/256c1a87-64aa-47fb-8bf2-b10f4331dbec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_sleeperhitbox/256c1a87-64aa-47fb-8bf2-b10f4331dbec.png -------------------------------------------------------------------------------- /Source/CloudSleep/sprites/spr_sleeperhitbox/layers/256c1a87-64aa-47fb-8bf2-b10f4331dbec/44415023-ba75-490f-98f7-604e49da9828.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WheatBox/WheatCloudSleep/b3580fa32d70dda8f70f0ec2f418cd994e073ec4/Source/CloudSleep/sprites/spr_sleeperhitbox/layers/256c1a87-64aa-47fb-8bf2-b10f4331dbec/44415023-ba75-490f-98f7-604e49da9828.png -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Thanks to tusik(https://github.com/tusik) 2 | # 3 | # How to build? 4 | # - on windows 5 | # 1. go into the directory where CMakeLists.txt placed 6 | # 3. cmake -S . -B server-build 7 | # 4. cmake --build server-build --config Debug --target install 8 | # or cmake --build server-build --config Release --target install 9 | # 5. binary output will be built in "server-build/install" directory 10 | # - on linux 11 | # 1. go into the directory where CMakeLists.txt placed 12 | # 2. cmake -S . -B server-build/ -D CMAKE_BUILD_TYPE=Debug 13 | # or cmake -S . -B server-build/ -D CMAKE_BUILD_TYPE=Release 14 | # 3. cmake --build server-build/ 15 | # 4. binary output will be built in "server-build/install" directory 16 | # 17 | 18 | cmake_minimum_required (VERSION 3.15) 19 | 20 | set (PROJECT_NAME "CloudSleepServer") 21 | set (EXE_NAME "CloudSleepServer") 22 | 23 | project (${PROJECT_NAME}) 24 | 25 | set (ASIO_DIR "third/asio/asio/include") 26 | set (JSON_DIR "third/json/include") 27 | set (CONFIG_DIR "config") 28 | set (INSTALL_DIR "install") 29 | 30 | # Override default install dir 31 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 32 | set(CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE PATH "..." FORCE) 33 | endif() 34 | 35 | # Add all header files 36 | file (GLOB HEADER_FILES *.h) 37 | 38 | # Add all source files 39 | file (GLOB CPP_FILES *.cpp) 40 | 41 | add_executable (${EXE_NAME} 42 | ${CPP_FILES} 43 | ${HEADER_FILES} 44 | ) 45 | 46 | target_include_directories (${EXE_NAME} 47 | PUBLIC ${ASIO_DIR} 48 | PUBLIC ${JSON_DIR} 49 | ) 50 | 51 | target_compile_features (${EXE_NAME} 52 | PUBLIC cxx_std_20 53 | ) 54 | 55 | if (MSVC) # static link MultiThreaded lib 56 | set_property(TARGET ${EXE_NAME} PROPERTY 57 | MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") 58 | # set UTF-8 compile for msvc 59 | target_compile_options( 60 | ${EXE_NAME} 61 | PUBLIC "/utf-8" 62 | ) 63 | endif() 64 | 65 | if (UNIX) # Building on unix-like system, link pthread for asio. 66 | target_link_libraries(${EXE_NAME} 67 | pthread 68 | ) 69 | target_compile_options(${EXE_NAME} 70 | PUBLIC "-fcoroutines" 71 | PUBLIC "-Wall" 72 | PUBLIC "-Wextra" 73 | PUBLIC "-Werror" 74 | PUBLIC "-g" 75 | ) 76 | #target_link_options(${EXE_NAME} 77 | #PUBLIC "-static-libstdc++" 78 | #PUBLIC "-static-libgcc" 79 | #) 80 | endif() 81 | 82 | # Install binary and config file 83 | install (TARGETS ${EXE_NAME} 84 | RUNTIME DESTINATION "." 85 | ) 86 | 87 | install (DIRECTORY ${CONFIG_DIR} 88 | DESTINATION "." 89 | ) 90 | -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/black_list.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | namespace wheat 10 | { 11 | namespace blacklist 12 | { 13 | 14 | using Minutes = std::chrono::minutes; 15 | 16 | class BlackList 17 | { 18 | public: 19 | //黑名单应该是整个服务器共享的,所以这里设计成单例 20 | static BlackList& Instance(); 21 | 22 | void SetExecutor(asio::any_io_executor executor); 23 | 24 | /* 把ip加入黑名单,黑名单初始时长为time,规则如下: 25 | * 在黑名单时期内,IsIpBlocked(ip)返回true,具体怎么处理看上层操作(现在是不允许加入房间) 26 | * 如果ip不在观察期,则黑名单等待时长为time,到期之后从黑名单移除,并加入观察列表(时长是黑名单等待时长的两倍),到期之后从观察列表里移除 27 | * 如果ip已经处于观察期,则本次黑名单等待时长为max(本次黑名单时长,上一次黑名单等待时长的两倍) 28 | */ 29 | void AddIpToBlockList( 30 | const std::string& ip, 31 | const Minutes& time 32 | ); 33 | 34 | void AddIpToBlockList(const std::string& ip); 35 | 36 | bool IsIpBlocked(const std::string& ip) const 37 | { 38 | return m_black_list.contains(ip); 39 | } 40 | 41 | bool IsIpWatched(const std::string& ip) const 42 | { 43 | return m_watch_list.contains(ip); 44 | } 45 | 46 | private: 47 | asio::awaitable AddIpToBlockListAsync(std::string ip, Minutes time); 48 | 49 | struct WatchIpContext 50 | { 51 | asio::steady_timer* previous_timer; 52 | Minutes privios_block_time; 53 | }; 54 | 55 | explicit BlackList() = default; 56 | 57 | private: 58 | asio::any_io_executor m_executor; 59 | std::map m_black_list; 60 | std::map m_watch_list; 61 | }; 62 | 63 | } 64 | } // namespace wheat 65 | -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | #include "file_update_monitor.h" 8 | 9 | #include "content_filter.h" 10 | 11 | namespace wheat 12 | { 13 | 14 | struct Config 15 | : public common::IFileUpdateNotify 16 | { 17 | public: 18 | static Config& Instance(); 19 | 20 | void SetExecutor(asio::any_io_executor executor); 21 | 22 | bool SetConfigFile(std::filesystem::path path); 23 | 24 | //config items 25 | //服务器端口 26 | uint16_t listen_port = 11451; 27 | //房间最大床位256 28 | int max_bed_num = 256; 29 | //投票时间10s 30 | int vote_wait_period_s = 10; 31 | //上报流量信息时间间隔1000ms 32 | int traffic_upload_interval_ms = 1000; 33 | 34 | //默认黑名单时长10min,最大黑名单时长1天,观察期时长翻倍 35 | int block_period_m = 10; 36 | int max_block_period_m = 24 * 60; 37 | int watch_period_m = 2 * block_period_m; 38 | int max_watch_period_m = 2 * max_block_period_m; 39 | 40 | // 客户端发起投票踢人的时间间隔限制,注意,是每一次成功发起投票进行计时,而不是投票结束后开始计时的 41 | int vote_kick_ratetime_s = 15; 42 | 43 | // 屏蔽词系统的超级模式 44 | int content_filter_super_mode = 1; 45 | 46 | std::filesystem::path violation_rules_config_file; 47 | std::filesystem::path permission_file; 48 | std::filesystem::path bad_word_list; 49 | std::filesystem::path stop_char_list; 50 | 51 | std::string cloudpack_guid = ""; 52 | private: 53 | bool ParseConfig(std::filesystem::path path); 54 | 55 | virtual void OnFileUpdate(const char* file_path); 56 | 57 | void UpdateConfig() const; 58 | private: 59 | asio::any_io_executor m_executor; 60 | 61 | public: 62 | std::shared_ptr m_pContentFilter = nullptr; 63 | }; 64 | 65 | 66 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/config/bad_word.txt: -------------------------------------------------------------------------------- 1 | 请在该文件里写入要屏蔽的所有敏感词,一行一个,像这样:(写完后记得要以加载config的方式运行服务器,具体请看官方手册) 2 | 傻逼 3 | 色情网站 4 | 草你妈 -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "listen_port": 14514, 3 | "max_bed_num": 256, 4 | "vote_wait_period_s": 10, 5 | "traffic_upload_interval_ms": 1000, 6 | "block_period_m": 10, 7 | "max_block_period_m": 1440, 8 | "watch_period_m": 20, 9 | "max_watch_period_m": 2880, 10 | "vote_kick_ratetime_s": 20, 11 | "violation_rules_config_file": "config/rule.json", 12 | "permission_file": "config/permission.txt", 13 | "bad_word_list": "config/bad_word.txt", 14 | "stop_char_list": "config/stop_char.txt", 15 | "content_filter_super_mode": 1, 16 | "cloudpack_guid": "请在此处填入场景包的Guid。Please write cloudpack's guid here." 17 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/config/rule.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type":"ip", 4 | "config":"conn=5,pps=100,bps=81920" 5 | }, 6 | { 7 | "type":"ip", 8 | "id":"127.0.0.1", 9 | "config":"conn=1000,pps=100000,bps=819200000" 10 | } 11 | ] -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/config/stop_char.txt: -------------------------------------------------------------------------------- 1 | 请在该文件里写入敏感词的停止词,是为了让“傻。逼”这种中间有间隔的敏感词也能正常屏蔽,一行一个,可以为多个字符,例如“和谐”,像这样:(还有记得一定要删掉这一行,因为这行实在太长了对运行效率的影响可能会很大)(写完后记得要以加载config的方式运行服务器,具体请看官方手册) 2 | , 3 | . 4 | , 5 | 。 6 | 和谐 7 | — 8 | … -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/content_filter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef CONTENT_FILTER_H_ 3 | #define CONTENT_FILTER_H_ 4 | 5 | #include 6 | #include 7 | 8 | #include "trie_tree.h" 9 | 10 | namespace wheat 11 | { 12 | using char_type = char; // UTF-8 string 13 | 14 | class ContentFilter 15 | { 16 | public: 17 | ContentFilter() = default; 18 | ~ContentFilter() = default; 19 | 20 | ContentFilter(const std::vector>& word_list, const std::vector> & stop_char_list); 21 | ContentFilter(const std::filesystem::path& word_list_filename, const std::filesystem::path & stop_char_list_filename); 22 | 23 | ContentFilter(const ContentFilter& l) = default; 24 | ContentFilter& operator=(const ContentFilter& l) = default; 25 | 26 | ContentFilter(ContentFilter&& r) = default; 27 | ContentFilter& operator=(ContentFilter&& r) = default; 28 | 29 | bool CheckContent(const std::basic_string& content) const noexcept; 30 | 31 | bool FilterContent(std::basic_string& content, char_type replacement) const noexcept; 32 | 33 | void SetSuperMode(bool enable); 34 | 35 | private: 36 | trie_tree::basic_trie_tree trie_tree_; 37 | 38 | }; 39 | 40 | } // namespace wheat 41 | 42 | #endif // CONTENT_FILTER_H_ 43 | -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/file_update_monitor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #ifdef _WIN32 10 | #include "windows.h" 11 | #endif 12 | 13 | namespace wheat::common 14 | { 15 | 16 | //接收文件更新通知的类,需实现此接口 17 | struct IFileUpdateNotify 18 | { 19 | // 20 | //文件更新通知 21 | // 22 | virtual void OnFileUpdate(const char* file_path) = 0; 23 | }; 24 | 25 | 26 | //提供监视某路径下文件更新的功能 27 | class FileUpdateMonitor 28 | { 29 | public: 30 | static FileUpdateMonitor& Instance(); 31 | 32 | //启动监视某路径下的文件 33 | void Start(); 34 | 35 | //停止监视 36 | void Stop(); 37 | 38 | //添加监视路径下的文件 39 | bool AddFile(const char* file_path, IFileUpdateNotify* notify); 40 | 41 | //删除监视路径下的文件 42 | bool RemoveFile(const char* file_path, IFileUpdateNotify* notify); 43 | 44 | protected: 45 | 46 | FileUpdateMonitor(); 47 | virtual ~FileUpdateMonitor(); 48 | 49 | virtual void ThreadProcEx(); 50 | bool AddDir(const std::string& dir_path); 51 | bool RemoveDir(const std::string& dir_path); 52 | 53 | private: 54 | struct MoniteFileInfo 55 | { 56 | #ifdef _WIN32 57 | WIN32_FILE_ATTRIBUTE_DATA fileAttr{ 0 }; //文件属性 58 | #endif 59 | std::set notifies; //通知对象集合 60 | }; 61 | 62 | struct MonitePathInfo 63 | { 64 | #ifdef _WIN32 65 | HANDLE handle; 66 | #else 67 | int fd; 68 | #endif 69 | std::map files; 70 | }; 71 | 72 | std::shared_mutex m_monitor_mutex; 73 | std::map m_monite_paths; 74 | std::thread m_work_thread; 75 | bool m_thread_running = false; 76 | 77 | #ifdef _WIN32 78 | HANDLE m_handle_stop; 79 | #else 80 | int m_fd; 81 | #endif 82 | 83 | }; 84 | 85 | } 86 | -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/permission_mgr.cpp: -------------------------------------------------------------------------------- 1 | #include "permission_mgr.h" 2 | 3 | #include 4 | 5 | #include "logger.h" 6 | 7 | namespace wheat 8 | { 9 | PermissionMgr& PermissionMgr::Instance() 10 | { 11 | static PermissionMgr instance; 12 | return instance; 13 | } 14 | void PermissionMgr::SetPermissionFile(std::filesystem::path path) 15 | { 16 | std::unique_lock lk(m_mutex); 17 | 18 | if (path == m_permission_file && !m_permission_file.empty()) 19 | { 20 | lk.unlock(); 21 | ParsePermissionFile(); 22 | return; 23 | } 24 | 25 | if (!m_permission_file.empty()) 26 | { 27 | common::FileUpdateMonitor::Instance().RemoveFile(m_permission_file.generic_string().c_str(), this); 28 | } 29 | m_permission_file = std::move(path); 30 | if (!m_permission_file.empty()) 31 | { 32 | common::FileUpdateMonitor::Instance().AddFile(m_permission_file.generic_string().c_str(), this); 33 | lk.unlock(); 34 | ParsePermissionFile(); 35 | } 36 | } 37 | 38 | bool PermissionMgr::IsAdministrator(std::string_view key) 39 | { 40 | (void)key; 41 | return true; 42 | /* todo 等需要实现管理员权限时放开 43 | std::lock_guard lk(m_mutex); 44 | 45 | return m_administrators.contains(key); 46 | */ 47 | } 48 | 49 | void PermissionMgr::OnFileUpdate(const char* file_path) 50 | { 51 | LOG_INFO("%s, file_path", __func__, file_path); 52 | SetPermissionFile(file_path); 53 | } 54 | 55 | void PermissionMgr::ParsePermissionFile() 56 | { 57 | std::filesystem::path path; 58 | { 59 | std::lock_guard lk(m_mutex); 60 | path = m_permission_file; 61 | } 62 | 63 | std::ifstream in(path); 64 | if (!in.is_open()) 65 | { 66 | LOG_ERROR("%s, open perssion file:%s failed", 67 | __func__, path.generic_string().c_str()); 68 | return; 69 | } 70 | 71 | decltype(m_administrators) administrators; 72 | std::string line; 73 | while (std::getline(in, line)) 74 | { 75 | administrators.emplace(line); 76 | } 77 | 78 | { 79 | std::lock_guard lk(m_mutex); 80 | m_administrators.swap(administrators); 81 | } 82 | } 83 | 84 | 85 | } 86 | -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/permission_mgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "file_update_monitor.h" 10 | 11 | namespace wheat 12 | { 13 | 14 | class PermissionMgr 15 | : public common::IFileUpdateNotify 16 | { 17 | public: 18 | static PermissionMgr& Instance(); 19 | 20 | void SetPermissionFile(std::filesystem::path path); 21 | 22 | bool IsAdministrator(std::string_view key); 23 | 24 | private: 25 | virtual void OnFileUpdate(const char* file_path) override; 26 | 27 | void ParsePermissionFile(); 28 | 29 | private: 30 | std::mutex m_mutex; 31 | std::filesystem::path m_permission_file; 32 | std::set> m_administrators; 33 | }; 34 | 35 | 36 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/report_recorder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // 我不确定以后会不会可能需要记录一些别的东西,或者什么别的举报系统相关的事项 4 | // 所以就单独孤立出来一个头文件了 5 | 6 | #include "logger.h" 7 | 8 | #define LOG_REPORT(format, ...) LOG_IMPL(ReportRecorder::Instance().m_logger, util::LogLevel::REPORT, format, ##__VA_ARGS__); 9 | 10 | namespace wheat { 11 | class ReportRecorder { 12 | public: 13 | ReportRecorder() { 14 | m_logger.SetLogToFile("report"); 15 | } 16 | 17 | static ReportRecorder & Instance() { 18 | static ReportRecorder instance; 19 | return instance; 20 | } 21 | 22 | util::SimpleLogger m_logger; 23 | }; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/room.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "sleeper.h" 9 | #include "vote_counter.h" 10 | 11 | namespace wheat 12 | { 13 | 14 | class Sleeper; 15 | 16 | /* 房间,Sleeper可以加入房间,同一个房间内的Sleeper能互相看到对方 17 | * 负责管理sleeper(加入离开)、管理床位(睡觉/起床)、以及消息的分发 18 | */ 19 | 20 | class Room 21 | { 22 | public: 23 | explicit Room(asio::any_io_executor executor); 24 | 25 | bool Join(SleeperId id, std::shared_ptr sleeper); 26 | 27 | void Leave(SleeperId id); 28 | 29 | bool Sleep(SleeperId id, int bed_num); 30 | 31 | void GetUp(SleeperId id); 32 | 33 | bool VoteKickStart(SleeperId id); 34 | 35 | void Agree(SleeperId id); 36 | 37 | void Refuse(SleeperId id); 38 | 39 | bool IsSleeperInRoom(SleeperId id); 40 | 41 | void Deliver(std::string_view msg); 42 | 43 | void DeliverTo(SleeperId destSleeperId, std::string & msg); 44 | 45 | private: 46 | void DeliverToAll(const std::string& msg); 47 | 48 | void SendVoteState(); 49 | 50 | void VoteKickOver(SleeperId id, const std::string& ip); 51 | 52 | private: 53 | asio::any_io_executor m_executor; 54 | std::map> m_sleepers; 55 | std::vector m_beds; 56 | 57 | bool m_is_voting = false; 58 | VoteCounter m_vote_counter; 59 | 60 | public: 61 | std::string m_packGuid = ""; 62 | 63 | }; 64 | 65 | 66 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/sleeper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include "content_filter.h" 11 | #include "wheat_command.h" 12 | 13 | namespace wheat 14 | { 15 | 16 | //产生全局唯一的sleeper_id 17 | SleeperId MakeSleeperId(); 18 | class Room; 19 | 20 | 21 | /* Sleeper,基本用户的概念 22 | */ 23 | class Sleeper 24 | : public std::enable_shared_from_this 25 | { 26 | using socket = asio::ip::tcp::socket; 27 | public: 28 | Sleeper(Room& room, socket sock, std::shared_ptr content_filter); 29 | 30 | void Start(); 31 | 32 | void Stop(); 33 | 34 | std::string GetIp() const; 35 | 36 | //下发消息给端 37 | void Deliver(std::string msg); 38 | 39 | //自身的基本信息,sleeper加入房间后,房间获取并下发送所有其他sleeper的信息给ta 40 | std::string MakeSelfInfo() const; 41 | 42 | inline int GetBedId() { return m_bed_id; } 43 | inline void ClearBedId() { m_bed_id = -1; } 44 | 45 | private: 46 | bool EliminateBadWord(std::string& msg) const noexcept; 47 | 48 | void SyncDeliver(const std::string& msg); 49 | 50 | asio::awaitable Reader(); 51 | 52 | asio::awaitable Writer(); 53 | 54 | public: 55 | bool m_receivedPackGuid = false; 56 | private: 57 | Room& m_room; 58 | SleeperId m_id; 59 | socket m_sock; 60 | bool m_is_administrator = false; 61 | asio::ip::address_v4 m_ip; 62 | bool m_is_stoped = false; 63 | std::string m_name = "_"; 64 | // SleeperSex m_sex = SleeperSex::BOY; 65 | SleeperSex m_sex = 0; 66 | int m_bed_id = -1; 67 | Pos m_pos = INVALID_POS; 68 | std::chrono::steady_clock::time_point m_lastVoteTime; 69 | 70 | asio::steady_timer m_timer; //此定时器用于发送消息队列的同步,asio常用做法 71 | std::deque m_write_msgs; 72 | 73 | std::shared_ptr m_content_filter; 74 | }; 75 | 76 | 77 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/traffic_recorder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace wheat 12 | { 13 | 14 | using IPAddress = asio::ip::address_v4; 15 | 16 | /* 对特定ip的流量和连接数量进行记录以及上报的类 17 | * 目前上报的信息是"conn=1,pps=10,bps=240"这种格式,分别是当前连接数,每秒包的数量,每秒bit数 18 | */ 19 | class IPTrafficRecorder 20 | { 21 | public: 22 | //也设计成单例了。。。 23 | static IPTrafficRecorder& Instance(); 24 | 25 | void SetExecutor(asio::any_io_executor executor); 26 | //上报流量信息的时间间隔,太大降低精度,太小影响性能 27 | void SetUploadInterval(std::chrono::milliseconds upload_interval); 28 | public: 29 | //ip有连接过来时调用 30 | void OnConnection(IPAddress addr); 31 | //连接关闭时调用 32 | void OnConnectionClose(IPAddress addr); 33 | //ip有数据过来时调用 34 | void OnData(IPAddress addr, uint64_t bits); 35 | private: 36 | struct TrafficInfo 37 | { 38 | TrafficInfo(asio::steady_timer tm); 39 | TrafficInfo(TrafficInfo&&) noexcept = default; 40 | ~TrafficInfo(); 41 | void Reset(); 42 | 43 | asio::steady_timer timer; 44 | uint64_t connection_count = 0; 45 | uint64_t package_count = 0; 46 | uint64_t bits = 0; 47 | bool is_changed = false; 48 | }; 49 | 50 | void StartRecord(IPAddress addr, std::weak_ptr p_traffic_info); 51 | private: 52 | IPTrafficRecorder() = default; 53 | 54 | private: 55 | asio::any_io_executor m_executor; 56 | std::chrono::milliseconds m_upload_interval{ 1000 }; 57 | std::map> m_ip_traffic_info; 58 | }; 59 | 60 | 61 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/utf8tools.cpp: -------------------------------------------------------------------------------- 1 | #include "utf8tools.h" 2 | 3 | namespace utf8tools { 4 | 5 | int GetUtf8BytesLen(unsigned char chr) { 6 | if(chr >> 7 == 0) { // 1个字节长度 7 | return 1; 8 | } 9 | if(chr >> 5 == 0b110) { // 2个字节长度 10 | return 2; 11 | } 12 | if(chr >> 4 == 0b1110) { // 3个字节长度 13 | return 3; 14 | } 15 | if(chr >> 3 == 0b11110) { // 4个字节长度 16 | return 4; 17 | } 18 | 19 | return 0; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/utf8tools.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace utf8tools { 4 | 5 | // 检测某一字符是否为 UTF-8 编码中一个字的开始字节 6 | // 返回该字符的字节数量 7 | // 非开始字节会返回0 8 | int GetUtf8BytesLen(unsigned char chr); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/violation_detector.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace wheat 9 | { 10 | 11 | /* 违规检测 12 | */ 13 | class ViolationDetector 14 | { 15 | public: 16 | //违规时的回调类型,参数是违规原因 17 | using OnViolation = std::function; 18 | //也是单例 19 | static ViolationDetector& Instance(); 20 | public: 21 | //新增对于整个类型规则的阈值(存在则替换) 22 | void AddTypeDetectorRule(const std::string& type, std::string_view threshold); 23 | void RemoveTypeDetectorRule(const std::string& type); 24 | //新增对于类型的某个id的阈值(存在则替换) 25 | void AddIdDetectorRule(const std::string& type, const std::string& id, std::string_view threshold); 26 | void RemoveIdDetectorRule(const std::string& type, const std::string& id); 27 | //更新某个类型某个id的当前信息 28 | void UpdateInfo(std::string_view type, std::string_view id, std::string_view cur_info); 29 | //添加对于某个类型某个id的观察者,触发违规时会调用传入的on_violation 30 | void AddObserver(const std::string& type, const std::string& id, OnViolation on_violation); 31 | //移除整个id 32 | bool RemoveId(const std::string& type, const std::string& id); 33 | private: 34 | 35 | struct Id 36 | { 37 | std::map threshold_list; 38 | std::vector on_violations; 39 | }; 40 | 41 | struct Type 42 | { 43 | std::map threshold_list; 44 | std::map> type_all_ids; 45 | }; 46 | 47 | std::map> m_types; 48 | }; 49 | 50 | 51 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/vote_counter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | namespace wheat 8 | { 9 | 10 | template 11 | class VoteCounter 12 | { 13 | public: 14 | template 15 | bool Agree(U&& u) 16 | { 17 | m_who_refuse.erase(u); 18 | return m_who_agree.emplace(std::forward(u)).second; 19 | } 20 | 21 | template 22 | bool Refuse(U && u) 23 | { 24 | m_who_agree.erase(u); 25 | return m_who_refuse.emplace(std::forward(u)).second; 26 | } 27 | 28 | std::pair GetVotes() const 29 | { 30 | return std::make_pair(m_who_agree.size(), m_who_refuse.size()); 31 | } 32 | 33 | void Clear() { 34 | m_who_agree.clear(); 35 | m_who_refuse.clear(); 36 | } 37 | 38 | private: 39 | std::set m_who_agree; 40 | std::set m_who_refuse; 41 | }; 42 | 43 | 44 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/wheat_common.cpp: -------------------------------------------------------------------------------- 1 | #include "wheat_common.h" 2 | 3 | namespace wheat::common 4 | { 5 | 6 | std::vector 7 | Split(std::string_view str, std::string_view delimiter, bool allow_empty) 8 | { 9 | std::vector vec; 10 | if (delimiter.empty()) 11 | { 12 | return vec; 13 | } 14 | 15 | std::size_t current = 0; 16 | std::size_t index = 0; 17 | while ((index = str.find(delimiter, current)) != str.npos) 18 | { 19 | if (index - current != 0 || allow_empty) 20 | { 21 | vec.emplace_back(str.data() + current, index - current); 22 | } 23 | current = index + delimiter.length(); 24 | } 25 | if (current < str.length() || allow_empty) 26 | { 27 | vec.emplace_back(str.data() + current, str.length() - current); 28 | } 29 | return vec; 30 | } 31 | 32 | 33 | std::filesystem::path 34 | GetFileParentPath(std::filesystem::path file_path) 35 | { 36 | try 37 | { 38 | return std::filesystem::weakly_canonical(std::filesystem::path(file_path)).parent_path(); 39 | } 40 | catch (...) 41 | { 42 | return std::filesystem::path(); 43 | } 44 | } 45 | 46 | std::filesystem::path 47 | GetFileCanonicalPath(std::filesystem::path file_path) 48 | { 49 | if (file_path.empty()) return ""; 50 | 51 | try 52 | { 53 | return std::filesystem::weakly_canonical(file_path); 54 | } 55 | catch (...) 56 | { 57 | return std::filesystem::path(); 58 | } 59 | } 60 | 61 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/wheat_common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace wheat::common 8 | { 9 | 10 | std::vector 11 | Split(std::string_view str, std::string_view delimiter, bool allow_empty = false); 12 | 13 | std::filesystem::path 14 | GetFileParentPath(std::filesystem::path file_path); 15 | 16 | std::filesystem::path 17 | GetFileCanonicalPath(std::filesystem::path file_path); 18 | 19 | } -------------------------------------------------------------------------------- /Source/Server/CloudSleepServer/wheat_error_code.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef WHEAT_ERROR_CODE_H_ 3 | #define WHEAT_ERROR_CODE_H_ 4 | 5 | #include 6 | 7 | namespace wheat 8 | { 9 | enum class WheatErrorCode : std::uint64_t 10 | { 11 | Start = 1001, 12 | 13 | InvalidName = 1001, 14 | InvalidScene = 1002 15 | }; 16 | 17 | //TODO(B1aN) Add enum to string 18 | 19 | } // namespace wheat 20 | 21 | #endif // WHEAT_ERROR_CODE_H_ 22 | -------------------------------------------------------------------------------- /Tools/README.md: -------------------------------------------------------------------------------- 1 | ## 所有小工具的exe文件下载链接:All Tools' exe files to download: 2 | 3 | https://wheatbox.lanzoue.com/b01851r0d 4 | 5 | 密码 password : 6w0s 6 | 7 | 静态编译版本(上面的运行不了就下载这个) Static complied version (Download these if the previous can not be run): 8 | 9 | https://wheatbox.lanzoue.com/b01851r7a 10 | 11 | 密码 password : 8fr0 12 | 13 | ### RemoveDuplicatesLines 14 | 15 | 除去一个文本文件中重复的词(以空格分割 或 一行一个 为一个单位),主要是用于给敏感词文件去重来用的。 16 | 17 | Remove duplicate words in a text file (Space division or one line as a unit), mainly used to de-duplicate sensitive word files. 18 | --------------------------------------------------------------------------------