mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Meow
This commit is contained in:
parent
f02d8a0869
commit
2ebe78a1bd
3 changed files with 6 additions and 16 deletions
|
|
@ -84,8 +84,7 @@ static void loadImage(const char *name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Window procedure
|
// Window procedure
|
||||||
LRESULT CALLBACK journal_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK journal_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){
|
||||||
{
|
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case WM_PAINT: {
|
case WM_PAINT: {
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT ps;
|
||||||
|
|
@ -206,8 +205,7 @@ boolean readGamePath() {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_journal()
|
int do_journal(){
|
||||||
{
|
|
||||||
// Create
|
// Create
|
||||||
HINSTANCE module = GetModuleHandleW(NULL);
|
HINSTANCE module = GetModuleHandleW(NULL);
|
||||||
|
|
||||||
|
|
@ -234,9 +232,7 @@ int do_journal()
|
||||||
0,
|
0,
|
||||||
NULL);
|
NULL);
|
||||||
if (pipe != INVALID_HANDLE_VALUE) {
|
if (pipe != INVALID_HANDLE_VALUE) {
|
||||||
if (ReadFile(pipe, (void*)message, IN_BUFFER_SIZE, &len, NULL)
|
if (ReadFile(pipe, (void*)message, IN_BUFFER_SIZE, &len, NULL) && len == IN_BUFFER_SIZE) {
|
||||||
&& len == IN_BUFFER_SIZE)
|
|
||||||
{
|
|
||||||
if (*message)
|
if (*message)
|
||||||
loadImage(message);
|
loadImage(message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,7 @@
|
||||||
extern int do_niko(int x, int y);
|
extern int do_niko(int x, int y);
|
||||||
extern int do_journal();
|
extern int do_journal();
|
||||||
|
|
||||||
int WINAPI WinMain(HINSTANCE hInstance,
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
|
||||||
HINSTANCE hPrevInstance,
|
|
||||||
LPSTR lpCmdLine,
|
|
||||||
int nCmdShow)
|
|
||||||
{
|
|
||||||
(void)hInstance;
|
(void)hInstance;
|
||||||
(void)hPrevInstance;
|
(void)hPrevInstance;
|
||||||
(void)lpCmdLine;
|
(void)lpCmdLine;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,7 @@ static HBITMAP niko_bmps[3] = {NULL};
|
||||||
static int niko_offset = 0;
|
static int niko_offset = 0;
|
||||||
|
|
||||||
// Window procedure
|
// Window procedure
|
||||||
LRESULT CALLBACK niko_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK niko_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){
|
||||||
{
|
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -50,8 +49,7 @@ LRESULT CALLBACK niko_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_niko(int x, int y)
|
int do_niko(int x, int y){
|
||||||
{
|
|
||||||
// Create
|
// Create
|
||||||
HINSTANCE module = GetModuleHandleW(NULL);
|
HINSTANCE module = GetModuleHandleW(NULL);
|
||||||
niko_bmps[0] = LoadBitmapW(module, L"NIKO1");
|
niko_bmps[0] = LoadBitmapW(module, L"NIKO1");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue