Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes #3361

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,6 @@ add_library(${PROJECT_NAME} OBJECT
src/window_actortarget.h
src/window_base.cpp
src/window_base.h
src/window_battlecommand.cpp
src/window_battlecommand.h
src/window_battlemessage.cpp
src/window_battlemessage.h
src/window_battlestatus.cpp
Expand Down Expand Up @@ -1252,7 +1250,7 @@ if(PLAYER_BUILD_EXECUTABLE AND ${PLAYER_TARGET_PLATFORM} MATCHES "^SDL.*$" AND N
endif()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLAYER_JS_OUTPUT_NAME}.wasm DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
elseif(PLAYER_CONSOLE_PORT)
elseif(PLAYER_CONSOLE_PORT AND NOT PLAYER_TARGET_PLATFORM STREQUAL "libretro")
set(CPACK_PLATFORM "${PLAYER_TARGET_PLATFORM}")
if(NINTENDO_3DS)
add_executable(easyrpg-player src/platform/3ds/main.cpp)
Expand Down
2 changes: 0 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,6 @@ libeasyrpg_player_a_SOURCES = \
src/window_actortarget.h \
src/window_base.cpp \
src/window_base.h \
src/window_battlecommand.cpp \
src/window_battlecommand.h \
src/window_battlemessage.cpp \
src/window_battlemessage.h \
src/window_battlestatus.cpp \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 2;
private static final int SDL_MINOR_VERSION = 30;
private static final int SDL_MICRO_VERSION = 11;
private static final int SDL_MINOR_VERSION = 32;
private static final int SDL_MICRO_VERSION = 2;
/*
// Display InputType.SOURCE/CLASS of events and devices
//
Expand Down Expand Up @@ -313,7 +313,7 @@ public static void initialize() {
mNextNativeState = NativeState.INIT;
mCurrentNativeState = NativeState.INIT;
}

protected SDLSurface createSDLSurface(Context context) {
return new SDLSurface(context);
}
Expand Down Expand Up @@ -799,6 +799,9 @@ public void handleMessage(Message msg) {
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
SDLActivity.mFullscreenModeActive = false;
}
if (Build.VERSION.SDK_INT >= 28 /* Android 9 (Pie) */) {
window.getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
}
}
} else {
Log.e(TAG, "error handling message, getContext() returned no Activity");
Expand Down
5 changes: 3 additions & 2 deletions src/cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,9 @@ BitmapRef Cache::SpriteEffect(const BitmapRef& src_bitmap, const Rect& rect, boo
std::string id = ToString(src_bitmap->GetId());

if (id.empty()) {
// assert caused too many regressions, use the pointer as the unique key and log instead
Output::Debug("Bitmap has no ID. Please report a bug!");
// Log causes false positives when empty bitmaps or placeholder (checkerboard)
// bitmaps are used.
//Output::Debug("Bitmap has no ID. Please report a bug!");
id = fmt::format("{}", (void*)(src_bitmap.get()));
}

Expand Down
6 changes: 4 additions & 2 deletions src/exe_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace {
// hashes of known RPG_RT startup logos
std::array<uint32_t, 33> logo_crc32 = {
std::array<uint32_t, 36> logo_crc32 = {
0xdf3d86a7, 0x2ece66f9, 0x2fe0de56, 0x25c4618f, 0x91b2635a,

/*
Expand Down Expand Up @@ -67,8 +67,10 @@ namespace {
0x1a1ed6dd, 0xad73ccf5, 0x4ad55e84,
// Italian "RPG Maker 4.0" Patch of Rm2k
0x8afe1239,
// Brazilian version of Rm2k3-1.0.9.1
// Spanish version of Rm2k3-1.0.9.1
0x089fb7d8,
// Spanish version of Rm2k (SoLaCe)
0x544ffca8, 0x4fbc0849, 0x7420f415,
// Spezial-Patch by Rikku2000 (1.51 with swapped logo)
0x806b6877,
// Gnaf's Picture Patch (1.50 with swapped logo)
Expand Down
4 changes: 2 additions & 2 deletions src/font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace {
}

// This is the last-resort function for finding a glyph, all the other fonts should fallback on it.
// It tries to display a WenQuanYi glyph, and if it’s not found, returns a replacement glyph.
// It tries to display a WenQuanYi glyph, and if it's not found, returns a replacement glyph.
BitmapFontGlyph const* find_fallback_glyph(char32_t code) {
auto* wqy = find_glyph(BITMAPFONT_WQY, code);
if (wqy != NULL) {
Expand Down Expand Up @@ -173,7 +173,7 @@ namespace {
FontRef const mincho = std::make_shared<BitmapFont>("Shinonome Mincho", &find_mincho_glyph);

/* Bitmap fonts used for non-Japanese games.
Compatible with RMG2000 and RM2000 shipped with Don Miguel’s unofficial translation.
Compatible with RMG2000 and RM2000 shipped with Don Miguel's unofficial translation.
Feature a half-width Cyrillic and half-width ellipsis at the bottom of the line.
*/
FontRef const rmg2000 = std::make_shared<BitmapFont>("RMG2000-compatible", &find_rmg2000_glyph);
Expand Down
4 changes: 0 additions & 4 deletions src/game_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,6 @@ Filesystem_Stream::OutputStream& Game_Config::GetLogFileOutput() {
path = FileFinder::MakePath(home, ".local/state");
}
}

if (!path.empty()) {
path = FileFinder::MakePath(path, OUTPUT_FILENAME);
}
#endif

if (path.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion src/game_party.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,5 +792,5 @@ Game_Actor* Game_Party::GetHighestLeveledActorWhoCanUse(const lcf::rpg::Item* it
std::pair<int,bool> Game_Party::GetItemIndex(int item_id) const {
auto& ids = data.item_ids;
auto iter = std::lower_bound(ids.begin(), ids.end(), item_id);
return std::make_pair(iter - ids.begin(), (iter != ids.end() && *iter == item_id));
return std::make_pair<int,bool>(iter - ids.begin(), (iter != ids.end() && *iter == item_id));
}
2 changes: 1 addition & 1 deletion src/game_pictures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Game_Pictures::Picture& Game_Pictures::GetPicture(int id) {
if (EP_UNLIKELY(id > static_cast<int>(pictures.size()))) {
pictures.reserve(id);
while (static_cast<int>(pictures.size()) < id) {
pictures.emplace_back(pictures.size() + 1);
pictures.emplace_back(static_cast<int>(pictures.size()) + 1);
}
}
return pictures[id - 1];
Expand Down
2 changes: 1 addition & 1 deletion src/game_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Game_Windows::Window_User& Game_Windows::GetWindow(int id) {
if (EP_UNLIKELY(id > static_cast<int>(windows.size()))) {
windows.reserve(id);
while (static_cast<int>(windows.size()) < id) {
windows.emplace_back(windows.size() + 1);
windows.emplace_back(static_cast<int>(windows.size()) + 1);
}
}
return windows[id - 1];
Expand Down
2 changes: 1 addition & 1 deletion src/scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class Scene {

/**
* Pushes the title screen onto the stack to boot up the game.
* If there already is a title scene ín the stack, this function exits without doing anything.
* If there already is a title scene in the stack, this function exits without doing anything.
*/
static void PushTitleScene(bool pop_stack_top = false);

Expand Down
1 change: 0 additions & 1 deletion src/scene_battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "window_item.h"
#include "window_skill.h"
#include "window_command.h"
#include "window_battlecommand.h"
#include "window_battlestatus.h"
#include "window_message.h"
#include "game_battle.h"
Expand Down
2 changes: 1 addition & 1 deletion src/scene_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void Scene_Language::CreateTranslationWindow() {
lang_helps.front() = def.lang_desc;
}

translate_window = std::make_unique<Window_Command>(lang_names, -1, lang_names.size() > 9 ? 9 : lang_names.size());
translate_window = std::make_unique<Window_Command>(lang_names, -1, lang_names.size() > 9 ? 9 : static_cast<int>(lang_names.size()));
translate_window->UpdateHelpFn = [this](Window_Help& win, int index) {
if (index >= 0 && index < static_cast<int>(lang_helps.size())) {
win.SetText(lang_helps[index]);
Expand Down
2 changes: 1 addition & 1 deletion src/scene_name.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void Scene_Name::Start() {
layouts.push_back(Window_Keyboard::ZhTw1);
layouts.push_back(Window_Keyboard::ZhTw2);
done = Window_Keyboard::DONE_ZH_TW;
// Cyrillic page (we assume it’s Russian since we have no way to detect Serbian etc.)
// Cyrillic page (we assume it's Russian since we have no way to detect Serbian etc.)
} else if (Player::IsCP1251()) {
layouts.push_back(Window_Keyboard::RuCyrl);
done = Window_Keyboard::DONE_RU;
Expand Down
1 change: 1 addition & 0 deletions src/sprite_airshipshadow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
Sprite_AirshipShadow::Sprite_AirshipShadow(int x_offset, int y_offset) :
x_offset(x_offset), y_offset(y_offset) {
SetBitmap(Bitmap::Create(16,16));
GetBitmap()->SetId("AirshipShadow");

SetOx(TILE_SIZE/2);
SetOy(TILE_SIZE);
Expand Down
171 changes: 0 additions & 171 deletions src/window_battlecommand.cpp

This file was deleted.

Loading
Loading