mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Various last-minute beta fixes
This commit is contained in:
parent
693f045ff8
commit
1f35ab104f
7 changed files with 31 additions and 10 deletions
|
|
@ -16,7 +16,7 @@ RB_METHOD(nikoStart)
|
||||||
RB_UNUSED_PARAM;
|
RB_UNUSED_PARAM;
|
||||||
// Calculate where to stick the window
|
// Calculate where to stick the window
|
||||||
POINT pos;
|
POINT pos;
|
||||||
pos.x = (9 * 16 - 4) * 2;
|
pos.x = 320 - 16;
|
||||||
pos.y = (13 * 16) * 2;
|
pos.y = (13 * 16) * 2;
|
||||||
SDL_SysWMinfo syswindow;
|
SDL_SysWMinfo syswindow;
|
||||||
SDL_VERSION(&syswindow.version);
|
SDL_VERSION(&syswindow.version);
|
||||||
|
|
@ -28,8 +28,8 @@ RB_METHOD(nikoStart)
|
||||||
WCHAR args[MAX_PATH];
|
WCHAR args[MAX_PATH];
|
||||||
GetModuleFileNameW(NULL, path, MAX_PATH);
|
GetModuleFileNameW(NULL, path, MAX_PATH);
|
||||||
PathRemoveFileSpecW(path);
|
PathRemoveFileSpecW(path);
|
||||||
wcscat(path, L"\\___.exe");
|
wcscat(path, L"\\_______.exe");
|
||||||
wsprintfW(args, L"___.exe %d %d", pos.x, pos.y);
|
wsprintfW(args, L"_______.exe %d %d", pos.x, pos.y);
|
||||||
STARTUPINFOW si;
|
STARTUPINFOW si;
|
||||||
memset(&si, 0, sizeof(si));
|
memset(&si, 0, sizeof(si));
|
||||||
si.cb = sizeof(si);
|
si.cb = sizeof(si);
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ RB_METHOD(wallpaperSet)
|
||||||
{
|
{
|
||||||
RB_UNUSED_PARAM;
|
RB_UNUSED_PARAM;
|
||||||
const char *imageName;
|
const char *imageName;
|
||||||
rb_get_args(argc, argv, "z", &imageName RB_ARG_END);
|
int color;
|
||||||
|
rb_get_args(argc, argv, "zi", &imageName, &color RB_ARG_END);
|
||||||
std::string imgname = shState->config().gameFolder + "/Wallpaper/" + imageName + ".bmp";
|
std::string imgname = shState->config().gameFolder + "/Wallpaper/" + imageName + ".bmp";
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Crapify the slashes
|
// Crapify the slashes
|
||||||
|
|
@ -41,7 +42,6 @@ RB_METHOD(wallpaperSet)
|
||||||
|
|
||||||
|
|
||||||
int colorId = COLOR_BACKGROUND;
|
int colorId = COLOR_BACKGROUND;
|
||||||
int color = 0x1a041f;
|
|
||||||
WCHAR zero[2] = L"0";
|
WCHAR zero[2] = L"0";
|
||||||
DWORD zeroSize = 4;
|
DWORD zeroSize = 4;
|
||||||
|
|
||||||
|
|
|
||||||
BIN
journal/icon.ico
Normal file
BIN
journal/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
|
|
@ -1,4 +1,6 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <shlwapi.h>
|
||||||
|
#include <shlobj.h>
|
||||||
|
|
||||||
#define DEFAULT_WIDTH 800
|
#define DEFAULT_WIDTH 800
|
||||||
#define DEFAULT_HEIGHT 600
|
#define DEFAULT_HEIGHT 600
|
||||||
|
|
@ -93,7 +95,15 @@ int do_journal()
|
||||||
// Create
|
// Create
|
||||||
HINSTANCE module = GetModuleHandleW(NULL);
|
HINSTANCE module = GetModuleHandleW(NULL);
|
||||||
|
|
||||||
loadImage("default");
|
// Default image
|
||||||
|
WCHAR save_path[MAX_PATH];
|
||||||
|
SHGetFolderPathW(NULL, CSIDL_PERSONAL, NULL, 0, save_path);
|
||||||
|
wcscat(save_path, L"\\My Games\\Oneshot\\progress.oneshot");
|
||||||
|
if (PathFileExistsW(save_path)) {
|
||||||
|
loadImage("save");
|
||||||
|
} else {
|
||||||
|
loadImage("default");
|
||||||
|
}
|
||||||
|
|
||||||
// Initial image
|
// Initial image
|
||||||
char message[IN_BUFFER_SIZE];
|
char message[IN_BUFFER_SIZE];
|
||||||
|
|
@ -132,7 +142,7 @@ int do_journal()
|
||||||
if (!RegisterClassEx(&wc))
|
if (!RegisterClassEx(&wc))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (!(window = CreateWindowExW(WS_EX_COMPOSITED | WS_EX_LAYERED | WS_EX_TOPMOST,
|
if (!(window = CreateWindowExW(WS_EX_COMPOSITED | WS_EX_LAYERED,
|
||||||
journal_classname,
|
journal_classname,
|
||||||
L"",
|
L"",
|
||||||
WS_OVERLAPPEDWINDOW ^ (WS_THICKFRAME | WS_MAXIMIZEBOX),
|
WS_OVERLAPPEDWINDOW ^ (WS_THICKFRAME | WS_MAXIMIZEBOX),
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,6 @@ SOURCES += main.cpp \
|
||||||
niko.cpp \
|
niko.cpp \
|
||||||
journal.cpp
|
journal.cpp
|
||||||
|
|
||||||
LIBS += -lgdi32
|
LIBS += -lgdi32 -lshlwapi
|
||||||
|
|
||||||
RC_FILE = resources.rc
|
RC_FILE = resources.rc
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
#include <winuser.h>
|
#include <winuser.h>
|
||||||
|
MAINICON ICON "icon.ico"
|
||||||
|
|
||||||
NIKO1 BITMAP "niko1.bmp"
|
NIKO1 BITMAP "niko1.bmp"
|
||||||
NIKO2 BITMAP "niko2.bmp"
|
NIKO2 BITMAP "niko2.bmp"
|
||||||
NIKO3 BITMAP "niko3.bmp"
|
NIKO3 BITMAP "niko3.bmp"
|
||||||
|
|
@ -27,3 +29,9 @@ c4 BITMAP "c4.bmp"
|
||||||
c5 BITMAP "c5.bmp"
|
c5 BITMAP "c5.bmp"
|
||||||
c6 BITMAP "c6.bmp"
|
c6 BITMAP "c6.bmp"
|
||||||
c7 BITMAP "c7.bmp"
|
c7 BITMAP "c7.bmp"
|
||||||
|
s1 BITMAP "s1.bmp"
|
||||||
|
s2 BITMAP "s2.bmp"
|
||||||
|
s3 BITMAP "s3.bmp"
|
||||||
|
s4 BITMAP "s4.bmp"
|
||||||
|
save BITMAP "save.bmp"
|
||||||
|
final BITMAP "final.bmp"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ class Game_Oneshot
|
||||||
attr_accessor :player_name # map music (for battle memory)
|
attr_accessor :player_name # map music (for battle memory)
|
||||||
attr_accessor :plight_timer # start of plight's plight
|
attr_accessor :plight_timer # start of plight's plight
|
||||||
attr_accessor :wallpaper # the wallpaper that we should use
|
attr_accessor :wallpaper # the wallpaper that we should use
|
||||||
|
attr_accessor :wallpaper_color # the wallpaper color
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
if $GDC
|
if $GDC
|
||||||
|
|
@ -27,13 +28,15 @@ class Game_Oneshot
|
||||||
end
|
end
|
||||||
|
|
||||||
module Wallpaper
|
module Wallpaper
|
||||||
def self.set_persistent(name)
|
def self.set_persistent(name, color)
|
||||||
$game_oneshot.wallpaper = name
|
$game_oneshot.wallpaper = name
|
||||||
Wallpaper.set(name)
|
$game_oneshot.wallpaper_color = color
|
||||||
|
Wallpaper.set(name, color)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.reset_persistent
|
def self.reset_persistent
|
||||||
$game_oneshot.wallpaper = nil
|
$game_oneshot.wallpaper = nil
|
||||||
|
$game_oneshot.wallpaper_color = nil
|
||||||
Wallpaper.reset
|
Wallpaper.reset
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue