Various last-minute beta fixes

This commit is contained in:
Mathew Velasquez 2016-11-04 05:28:39 -04:00
parent 693f045ff8
commit 1f35ab104f
7 changed files with 31 additions and 10 deletions

View file

@ -16,7 +16,7 @@ RB_METHOD(nikoStart)
RB_UNUSED_PARAM;
// Calculate where to stick the window
POINT pos;
pos.x = (9 * 16 - 4) * 2;
pos.x = 320 - 16;
pos.y = (13 * 16) * 2;
SDL_SysWMinfo syswindow;
SDL_VERSION(&syswindow.version);
@ -28,8 +28,8 @@ RB_METHOD(nikoStart)
WCHAR args[MAX_PATH];
GetModuleFileNameW(NULL, path, MAX_PATH);
PathRemoveFileSpecW(path);
wcscat(path, L"\\___.exe");
wsprintfW(args, L"___.exe %d %d", pos.x, pos.y);
wcscat(path, L"\\_______.exe");
wsprintfW(args, L"_______.exe %d %d", pos.x, pos.y);
STARTUPINFOW si;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);

View file

@ -22,7 +22,8 @@ RB_METHOD(wallpaperSet)
{
RB_UNUSED_PARAM;
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";
#ifdef _WIN32
// Crapify the slashes
@ -41,7 +42,6 @@ RB_METHOD(wallpaperSet)
int colorId = COLOR_BACKGROUND;
int color = 0x1a041f;
WCHAR zero[2] = L"0";
DWORD zeroSize = 4;

BIN
journal/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -1,4 +1,6 @@
#include <windows.h>
#include <shlwapi.h>
#include <shlobj.h>
#define DEFAULT_WIDTH 800
#define DEFAULT_HEIGHT 600
@ -93,7 +95,15 @@ int do_journal()
// Create
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
char message[IN_BUFFER_SIZE];
@ -132,7 +142,7 @@ int do_journal()
if (!RegisterClassEx(&wc))
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,
L"",
WS_OVERLAPPEDWINDOW ^ (WS_THICKFRAME | WS_MAXIMIZEBOX),

View file

@ -7,6 +7,6 @@ SOURCES += main.cpp \
niko.cpp \
journal.cpp
LIBS += -lgdi32
LIBS += -lgdi32 -lshlwapi
RC_FILE = resources.rc

View file

@ -1,4 +1,6 @@
#include <winuser.h>
MAINICON ICON "icon.ico"
NIKO1 BITMAP "niko1.bmp"
NIKO2 BITMAP "niko2.bmp"
NIKO3 BITMAP "niko3.bmp"
@ -27,3 +29,9 @@ c4 BITMAP "c4.bmp"
c5 BITMAP "c5.bmp"
c6 BITMAP "c6.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"

View file

@ -5,6 +5,7 @@ class Game_Oneshot
attr_accessor :player_name # map music (for battle memory)
attr_accessor :plight_timer # start of plight's plight
attr_accessor :wallpaper # the wallpaper that we should use
attr_accessor :wallpaper_color # the wallpaper color
def initialize
if $GDC
@ -27,13 +28,15 @@ class Game_Oneshot
end
module Wallpaper
def self.set_persistent(name)
def self.set_persistent(name, color)
$game_oneshot.wallpaper = name
Wallpaper.set(name)
$game_oneshot.wallpaper_color = color
Wallpaper.set(name, color)
end
def self.reset_persistent
$game_oneshot.wallpaper = nil
$game_oneshot.wallpaper_color = nil
Wallpaper.reset
end
end