This commit is contained in:
DepressedTWM 2026-05-20 10:47:32 +04:00
parent f02d8a0869
commit 2ebe78a1bd
3 changed files with 6 additions and 16 deletions

View file

@ -84,8 +84,7 @@ static void loadImage(const char *name) {
}
// 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) {
case WM_PAINT: {
PAINTSTRUCT ps;
@ -206,8 +205,7 @@ boolean readGamePath() {
return FALSE;
}
int do_journal()
{
int do_journal(){
// Create
HINSTANCE module = GetModuleHandleW(NULL);
@ -234,9 +232,7 @@ int do_journal()
0,
NULL);
if (pipe != INVALID_HANDLE_VALUE) {
if (ReadFile(pipe, (void*)message, IN_BUFFER_SIZE, &len, NULL)
&& len == IN_BUFFER_SIZE)
{
if (ReadFile(pipe, (void*)message, IN_BUFFER_SIZE, &len, NULL) && len == IN_BUFFER_SIZE) {
if (*message)
loadImage(message);
}

View file

@ -3,11 +3,7 @@
extern int do_niko(int x, int y);
extern int do_journal();
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
(void)hInstance;
(void)hPrevInstance;
(void)lpCmdLine;

View file

@ -6,8 +6,7 @@ static HBITMAP niko_bmps[3] = {NULL};
static int niko_offset = 0;
// 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) {
case WM_CLOSE:
return 0;
@ -50,8 +49,7 @@ LRESULT CALLBACK niko_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return 0;
}
int do_niko(int x, int y)
{
int do_niko(int x, int y){
// Create
HINSTANCE module = GetModuleHandleW(NULL);
niko_bmps[0] = LoadBitmapW(module, L"NIKO1");