Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • PantyNabber/fc-pregmod
  • pregmodfan/fc-pregmod
  • Alice.Grant/fc-pregmod
  • powerfful/fc-pregmod
  • elstumpo/fc-pregmod
  • Y/fc-pregmod
  • floer/fc-pregmod
  • oidocrop/fc-pregmod
  • hawk5005/fc-pregmod
  • nn/fc-pregmod
  • latios298/fc-pregmod
  • brpregmodfan/fc-pregmod
  • SomeoneTookMyUserName/fc-pregmod
  • 000-250-006/fc-pregmod
  • rewrica/fc-pregmod
  • Stuffedgame/fc-pregmod
  • wisepants314/fc-pregmod
  • fcanon/fc-pregmod
  • randomanon1/pregmod-mod-cyberfurry
  • teddy.buckland/fc-pregmod
  • farsinian_591b7a2d8b49d/fc-pregmod
  • FCShotadev/fc-pregmod
  • uselessartifact/fc-pregmod
  • irina_90/fc-pregmod
  • thaumx/fc-pregmod
  • MouseOfLight/fc-pregmod
  • empresssela/fc-pregmod
  • MasterAaran/fc-pregmod
  • ishy/fc-pregmod
  • psychofox/fc-pregmod
  • shadomancer/fc-pregmod
  • tycrakgg/fc-pregmod
  • azktaawc/fc-pregmod
  • andonno07/fc-pregmod
  • Onithyr/fc-pregmod
  • redneck987.jl/fc-pregmod
  • Farseeker/fc-pregmod
  • milliarc/fc-pregmod
  • BeefimusMaximus/fc-pregmod
  • magicknight79/fc-pregmod
  • hexall90/fc-pregmod
  • cantworkforever/fc-pregmod
  • jc052005/fc-pregmod
  • klorpa/fc-pregmod
  • doku/fc-pregmod
  • samhradh/fc-pregmod
  • scientist/fc-pregmod
  • albania420/fc-pregmod
  • Editoranon/fc-pregmod
  • Anony/fc-pregmod
  • deimios666/fc-pregmod
  • IvoHoe/fc-pregmod
  • bitty/fc-pregmod
  • RealAnon1800/fc-pregmod
  • brankirk/fc-pregmod
  • Amygdalan/fc-pregmod
  • DankWolf/fc-pregmod
  • Supot1951/fc-pregmod
  • bcy603/fc-pregmod
  • pwfxjpuv/fc-pregmod
  • ThreadAnon/fc-pregmod
  • Anon1800/fc-pregmod
  • Echoart/fc-pregmod
  • Dingotush/fc-pregmod
  • anonman/fc-pregmod
  • Arkerthan/fc-pregmod
  • svornost/fc-pregmod
  • wierdwierdos/fc-pregmod
  • wetwareAnon/fc-pregmod
  • QuartzHat/fc-pregmod
  • IchthysdeKilt/fc-pregmod
  • AnonAnonFC/fc-pregmod
  • Alexsis/fc-pregmod
  • LoyalTreeWP/fc-pregmod
  • aerialace/fc-pregmod
  • NurseryAnon/fc-pregmod
  • drakeashordcataclysm/fc-pregmod
  • AshVaris/fc-pregmod
  • purely0nothing/fc-pregmod
  • alex2011/fc-pregmod
  • Lindontree/fc-pregmod
  • FCaa/fc-pregmod
  • TR-8R/fc-pregmod
  • Jones/fc-pregmod
  • brr99/fc-pregmod
  • WriteAnon101/fc-pregmod
  • Drosil/fc-pregmod
  • Bob1221/fc-pregmod
  • vas/fc-pregmod
  • gitgud.user.937/fc-pregmod
  • D-K/fc-pregmod
  • AnonDev/fc-pregmod
  • madman23456/fc-pregmod
  • InarusLynx/fc-pregmod
  • Sonofrevvan/fc-pregmod
  • Randoisrando/fc-pregmod
  • cheez94/fc-pregmod
  • dldldl/fc-pregmod
  • alice321/fc-pregmod
  • Alexei91/fc-pregmod
  • darkcy/fc-pregmod
  • MapleMAD/fc-pregmod
  • pillarofsalt/fc-pregmod
  • vultureangels/fc-pregmod
  • kernel/fc-pregmod
  • nooneman/fc-pregmod
  • deepmurk/fc-pregmod
  • uglybead/fc-pregmod
  • lemongrab/fc-pregmod
  • temperence-chan/fc-pregmod
  • hcommenter/fc-pregmod
  • SpedeMemerson/fc-pregmod
  • qwijqwsf/fc-pregmod
  • BuDClow/fc-pregmod
  • HiveBro/fc-pregmod
  • shoku/fc-pregmod
  • ezsh/fc-pregmod
  • Blank/fc-pregmod
  • randoralcissian/fc-pregmod
  • benito92/fc-pregmod
  • balakart/fc-pregmod
  • wedonotsaw/fc-pregmod
  • Cayleth/fc-pregmod
  • Khip/fc-pregmod
  • Zfair/fc-pregmod
  • promethium/fc-pregmod
  • scyne/fc-pregmod
  • ZZC/fc-pregmod
  • SilverJanine/fc-pregmod
  • joxosix654email-9.co/fc-pregmod
  • Littlefootlittleguy/fc-pregmod
  • FelipeBA/fc-pregmod
  • bigtiddygothbf/fc-pregmod
  • Qotsafan/fc-pregmod
  • Zachpocalypse/fc-pregmod
  • milkanon66/fc-pregmod
  • GreGGoZZ/fc-pregmod
  • drsnarf86/fc-pregmod
  • valen102938/fc-pregmod
  • pregspammer/fc-pregmod
  • ponderin94/fc-pregmod
  • nook/fc-pregmod
  • carnifex34/fc-pregmod-mod-carni
  • SyntheticHigh/fc-pregmod
  • bob112211/fc-pregmod
  • amomynous0/fc-pregmod
  • oxone/fc-pregmod
  • MaxEuwe/fc-pregmod
  • nekoanon/fc-pregmod
  • preglocke/fc-pregmod
  • valen10293847/fc-pregmod
  • 2hu4u/fc-pregmod
  • mayibrad/fc-pregmod
  • Screm/fc-pregmod
  • Ansopedi/fc-pregmod
  • mrchaosbones/fc-pregmod
  • putrid/fc-pregmod
  • Kinnerman/fc-pregmod
  • gungrave1155/fc-pregmod
  • prndev/fc-pregmod
  • weresmilodon/fc-pregmod
  • auxxigobin/fc-pregmod
  • alice-chan/fc-pregmod
  • wigglie/fc-pregmod
  • jrliltfgb/fc-pregmod
  • Lord.alek.shade/fc-pregmod
  • truetailthesquire/fc-pregmod
  • lowercasedonkey/fc-pregmod
  • alice-chan9/fc-pregmod
  • eroglyphics/fc-pregmod
  • taliyent/fc-pregmod
  • zenzombie90/fc-pregmod
  • kjarik/fc-pregmod
  • wriggler/fc-pregmod
  • midnightblue/fc-pregmod
  • faraen/fc-pregmod
  • sigurd.cole/fc-pregmod
  • FCbuganon/fc-pregmod
  • kidkinster/fc-pregmod
  • Kar_Dragon/fc-pregmod
  • Zhafier/fc-pregmod
  • crcaretti/fc-pregmod
  • anond/fc-pregmod
  • tempmania/fc-pregmod
  • Dhanze/fc-pregmod
  • EstaUnCachucha/fc-pregmod
  • oniAnon/fc-pregmod
  • plebian/fc-pregmod
  • maxd569/fc-pregmod
  • Levarn/fc-pregmod
  • pumpkinspice/fc-pregmod
  • GammaXai/fc-pregmod
  • DanBackslide/fc-pregmod
  • i107760/fc-pregmod
  • Absimiliard/fc-pregmod
  • AmbrosiaCheesecake/fc-pregmod
  • fuguer/fc-pregmod
  • Azurel/fc-pregmod
  • Fake_Dev/fc-pregmod
  • ddongsanda/fc-pregmod
  • Combine456/fc-pregmod
  • UnwrappedGodiva/fc-pregmod
  • toyRuberDucky/fc-pregmod
  • zmobie/fc-pregmod
  • chuongk/fc-pregmod
  • BigWalnuts/fc-pregmod
  • Birdstrike/fc-pregmod
  • r3d/fc-pregmod
  • mawspa/fc-pregmod
  • sushila/fc-pregmod
  • DeathShip/fc-pregmod
  • eggrollsandwich/fc-pregmod
  • krayken/fc-pregmod
  • Reman/fc-pregmod
  • dwiafgts/fc-pregmod
  • jort93/fc-pregmod
  • teruterubouzu/fc-pregmod
  • flut/fc-pregmod
  • john-normal/fc-pregmod
  • Jonathan2405/fc-pregmod
  • Tyrgalon/fc-pregmod
  • NovX/fc-pregmod
  • Star1/fc-pregmod
  • Transhumanist01/fc-pregmod
  • m1017242/fc-pregmod
  • Rizal98798/fc-pregmod
  • jamezu369/fc-pregmod
  • thisisawittyname/fc-pregmod
  • KnightBoulegard/fc-pregmod
  • jblack/fc-pregmod
  • Souldrainr/fc-pregmod
  • torbjornhub/fc-pregmod
  • turnop/fc-pregmod
  • breadedpigeon/fc-pregmod
  • fire.maker/fc-pregmod
  • Inahaze/fc-pregmod
  • Waerjak/fc-pregmod
  • Trashman1138/fc-pregmod
  • supanintendo/fc-pregmod
  • _no0neman/fc-pregmod
  • Weslo/fc-pregmod
  • qw89/fc-pregmod
  • EvilDruid/fc-pregmod
  • dt25/fc-pregmod
  • Raou/fc-pregmod
  • DDouFu/fc-pregmod
  • Mauno/fc-pregmod
  • PandemoniumPenguin/fc-pregmod
  • AngelPuppet/fc-pregmod
  • DasUser79/fc-pregmod
  • Keaeag3s/fc-pregmod
  • HazeHazeHaze/fc-pregmod
  • hpotato/fc-pregmod
  • owouchthatbloodyhurt/fc-pregmod
  • v7Silent/fc-pregmod
  • nickylass/fc-pregmod
  • ThePrimer/fc-pregmod
  • PineCone/fc-pregmod
  • bruhmomentum17/fc-pregmod
  • CheatDude/fc-pregmod
  • synnove/fc-pregmod
  • en_bees/fc-pregmod
  • seronis/fc-pregmod
  • Nepidinepnep/fc-pregmod
  • Titanninja/fc-pregmod
  • Elohiem/fc-pregmod
  • cocoajazz/fc-pregmod
  • tfwncagf/fc-pregmod
  • ChunkyMonke/fc-pregmod
  • Dracoman671/fc-pregmod
  • jgl/fc-pregmod
  • Inev/fc-pregmod
  • jbige/fc-pregmod
  • MonsterMate/fc-pregmod
  • Konstantin6961/fc-pregmod
  • darth_ashi/fc-pregmod
  • shinx/fc-pregmod
  • Anu/fc-pregmod
  • Greytide/fc-pregmod
  • Bonafidemetal/fc-pregmod
  • Peje/fc-pregmod
  • Hexfy98/fc-pregmod
  • TooSlow/fc-pregmod
  • SoGu/fc-pregmod
  • CloudyCoffee/fc-pregmod
  • Welptard/fc-pregmod
  • Ploc/fc-pregmod-ploc
  • rain-/fc-pregmod
  • Pecanus/fc-pregmod
  • Jhortrax/fc-pregmod
  • valleytwo/fc-pregmod
  • QCmd/fc-pregmod
  • kung-wada/fc-pregmod
  • LolGaye/fc-pregmod
  • Exspiravit1/fc-pregmod
  • jadeddog/fc-pregmod
  • buster-scruggs/fs-antebellum-revivalism
  • policia123/fc-pregmod
  • evrgentesee/fc-pregmod
  • rko127/fc-pregmod
  • ExcalGrip12/fc-pregmod
  • BlackAion/fc-pregmod
  • Boss2020/fc-pregmod
  • Lawled/fc-pregmod
  • shiro/fc-pregmod
  • Skavenkeri/fc-pregmod
  • PooPooDooDooHead/fc-pregmod
  • Dugee/fc-pregmod
  • Portal124/fc-pregmod-vore
  • Fekenol/fc-pregmod
  • elGuapo/fc-pregmod
  • KelioSteel/fc-pregmod
  • sldlddk/fc-pregmod
  • lumepanter/fc-pregmod
  • ryuhana/fc-pregmod
  • Nene1009yb/fc-pregmod
  • DontAskDontTell/fc-pregmod-extra-events
  • Dulgi/fc-pregmod
  • Jate/fc-pregmod
  • percy365/fc-pregmod
  • franklygeorge/fc-pregmod
  • Dragneel117/fc-pregmod
  • vl96/fc-pregmod
  • Gorlom/fc-economicmod
  • NotAlive/fc-pregmod
  • Heretek/fc-pregmod
  • joeshmo828282/fc-pregmod
  • deswes/fc-pregmod
  • Nanana21/fc-pregmod
  • Gbr6/fc-pregmod
  • RandomNecro/fc-pregmod
  • Trinidad/fc-pregmod
  • anonymousey/fc-pregmod
  • macaronideath/fc-pregmod
  • fcbleh/fc-pregmod
  • jk3000/fc-pregmod
  • Akane/fc-pregmod
  • TheBoi/fc-pregmod
  • Sheenariel/fc-pregmod
  • Metapod/multi-custom
  • Banyanael/fc-pregmod
  • frogge/fc-pregmod
  • idkkk12385/fc-pregmod
  • Mirarara/fc-pregmod
  • DeaDa/fc-pregmod-thedeal
  • CobraCommander/fc-pregmod
  • bicobus/fc-pregmod
  • CardcaptorRLH85/fc-pregmod
  • temp-ui-start/fc-pregmod
  • PresidentConvert/fc-pregmod
  • delizious/fc-pregmod
  • Ducati/fc-pregmod
  • DerangedLoner/fc-pregmod-development-fork
  • ProjectVictory/fc-pregmod
  • forecastle/fc-pregmod
  • Apathy/fc-pregmod
  • indf/fc-pregmod-dev
  • GavAndAlt/fc-pregmod
  • hagamablabla/fc-pregmod
  • Alaco/fc-pregmod
  • DCoded/fc-pregmod
  • LittlePlague/fc-pregmod
  • MissOnahole/fc-pregmod
  • ishy2317/fc-pregmod
  • nielkazama/fc-pregmod
  • Phobos/fc-pregmod
  • kraster/fc-pregmod
  • JasWS/fc-pregmod
  • FelixJS/fc-pregmod
  • NCherfaoui/fc-pregmod
  • MidnightMoose/fc-pregmod
  • jjjjjj/fc-pregmod
  • Cl0ver/fc-pregmod
  • Pythoniqus/fc-pregmod
  • JohnMolotov/fc-pregmod
  • anonymouspregmodder/fc-pregmod-anonymouspregmodder
  • Fanatey/fc-pregmod
  • Mizako/fc-pregmod
  • Nithhogg/fc-pregmod
  • Bluecoffee/fc-pregmod
380 results
Show changes
Showing
with 8554 additions and 224 deletions
......@@ -30,7 +30,7 @@ class SimpleWindowDelegate : public CefWindowDelegate {
explicit SimpleWindowDelegate(CefRefPtr<CefBrowserView> browser_view)
: browser_view_(browser_view) {}
void OnWindowCreated(CefRefPtr<CefWindow> window) OVERRIDE {
void OnWindowCreated(CefRefPtr<CefWindow> window) override {
// Add the browser view and show the window.
window->AddChildView(browser_view_);
window->Show();
......@@ -39,11 +39,11 @@ class SimpleWindowDelegate : public CefWindowDelegate {
browser_view_->RequestFocus();
}
void OnWindowDestroyed(CefRefPtr<CefWindow> window) OVERRIDE {
browser_view_ = NULL;
void OnWindowDestroyed(CefRefPtr<CefWindow> window) override {
browser_view_ = nullptr;
}
bool CanClose(CefRefPtr<CefWindow> window) OVERRIDE {
bool CanClose(CefRefPtr<CefWindow> window) override {
// Allow the window to close if the browser says it's OK.
CefRefPtr<CefBrowser> browser = browser_view_->GetBrowser();
if (browser)
......@@ -51,7 +51,7 @@ class SimpleWindowDelegate : public CefWindowDelegate {
return true;
}
CefSize GetPreferredSize(CefRefPtr<CefView> view) OVERRIDE {
CefSize GetPreferredSize(CefRefPtr<CefView> view) override {
return CefSize(800, 600);
}
......@@ -130,14 +130,10 @@ void FCHostApp::OnContextInitialized() {
std::string url = "file://" + gameHTML.string();
#endif
// Allow some access flexibility for our local file
browser_settings.file_access_from_file_urls = STATE_ENABLED;
browser_settings.universal_access_from_file_urls = STATE_ENABLED;
if (use_views) {
// Create the BrowserView.
CefRefPtr<CefBrowserView> browser_view = CefBrowserView::CreateBrowserView(
handler, url, browser_settings, NULL, NULL, NULL);
handler, url, browser_settings, nullptr, nullptr, nullptr);
// Create the Window. It will show itself after creation.
CefWindow::CreateTopLevelWindow(new SimpleWindowDelegate(browser_view));
......@@ -153,7 +149,7 @@ void FCHostApp::OnContextInitialized() {
// Create the first browser window.
CefBrowserHost::CreateBrowser(window_info, handler, url, browser_settings,
NULL, NULL);
nullptr, nullptr);
}
}
......
......@@ -18,17 +18,17 @@ class FCHostApp : public CefApp, public CefBrowserProcessHandler, public CefRend
// CefApp methods:
virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler()
OVERRIDE {
override {
return this;
}
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler()
OVERRIDE {
override {
return this;
}
// CefBrowserProcessHandler methods:
virtual void OnContextInitialized() OVERRIDE;
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) OVERRIDE;
virtual void OnContextInitialized() override;
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) override;
std::filesystem::path GetLocalStorePath();
......
......@@ -9,6 +9,7 @@
#include <fstream>
#include "include/base/cef_bind.h"
#include "include/base/cef_callback.h"
#include "include/cef_app.h"
#include "include/cef_parser.h"
#include "include/views/cef_browser_view.h"
......@@ -173,7 +174,7 @@ void FCHostHandler::OnLoadEnd(CefRefPtr<CefBrowser> browser,
}", frame->GetURL(), 0);
}
void FCHostHandler::OnBeforeDownload(CefRefPtr<CefBrowser> browser,
bool FCHostHandler::OnBeforeDownload(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDownloadItem> download_item,
const CefString& suggested_name,
CefRefPtr< CefBeforeDownloadCallback > callback)
......@@ -181,6 +182,8 @@ void FCHostHandler::OnBeforeDownload(CefRefPtr<CefBrowser> browser,
CEF_REQUIRE_UI_THREAD();
callback->Continue(suggested_name, true);
return true;
}
bool FCHostHandler::OnPreKeyEvent(CefRefPtr<CefBrowser> browser,
......@@ -241,10 +244,39 @@ bool FCHostHandler::OnPreKeyEvent(CefRefPtr<CefBrowser> browser,
}
void FCHostHandler::OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
CefRefPtr<CefMenuModel> model)
{
CEF_REQUIRE_UI_THREAD();
if (params->HasImageContents() && params->GetSourceUrl() != "")
model->AddItem(MENU_ID_USER_FIRST, "Save Image...");
}
bool FCHostHandler::OnContextMenuCommand(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
int command_id,
EventFlags event_flags)
{
CEF_REQUIRE_UI_THREAD();
switch (command_id) {
case MENU_ID_USER_FIRST:
browser->GetHost()->StartDownload(params->GetSourceUrl());
return true;
default:
return false;
}
}
void FCHostHandler::CloseAllBrowsers(bool force_close) {
if (!CefCurrentlyOn(TID_UI)) {
// Execute on the UI thread.
CefPostTask(TID_UI, base::Bind(&FCHostHandler::CloseAllBrowsers, this,
CefPostTask(TID_UI, base::BindOnce(&FCHostHandler::CloseAllBrowsers, this,
force_close));
return;
}
......
......@@ -14,6 +14,7 @@ class FCHostHandler : public CefClient,
public CefLoadHandler,
public CefDownloadHandler,
public CefKeyboardHandler,
public CefContextMenuHandler,
private CefDialogHandler {
public:
explicit FCHostHandler(bool use_views);
......@@ -23,56 +24,73 @@ class FCHostHandler : public CefClient,
static FCHostHandler* GetInstance();
// CefClient methods:
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() OVERRIDE {
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() override {
return this;
}
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() OVERRIDE {
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() override {
return this;
}
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() OVERRIDE { return this; }
virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler() OVERRIDE { return this; }
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() OVERRIDE { return this; }
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() override { return this; }
virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler() override { return this; }
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() override { return this; }
virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() override { return this; }
CefRefPtr< CefDialogHandler > GetDialogHandler() override { return this; }
bool OnFileDialog(CefRefPtr<CefBrowser> browser, CefDialogHandler::FileDialogMode mode,
const CefString& title, const CefString& default_file_path, const std::vector<CefString>& accept_filters,
int selected_accept_filter, CefRefPtr<CefFileDialogCallback> callback) override;
bool OnFileDialog(CefRefPtr<CefBrowser> browser,
CefDialogHandler::FileDialogMode mode,
const CefString& title,
const CefString& default_file_path,
const std::vector<CefString>& accept_filters,
const std::vector<CefString>& accept_extensions,
const std::vector<CefString>& accept_descriptions,
CefRefPtr<CefFileDialogCallback> callback) override;
// CefDisplayHandler methods:
virtual void OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) OVERRIDE;
const CefString& title) override;
virtual bool OnConsoleMessage(CefRefPtr<CefBrowser> browser,
cef_log_severity_t level,
const CefString& message,
const CefString& source,
int line) OVERRIDE;
int line) override;
// CefLifeSpanHandler methods:
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual bool DoClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) override;
virtual bool DoClose(CefRefPtr<CefBrowser> browser) override;
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) override;
// CefLoadHandler methods:
virtual void OnLoadError(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
ErrorCode errorCode,
const CefString& errorText,
const CefString& failedUrl) OVERRIDE;
const CefString& failedUrl) override;
virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
int httpStatusCode) OVERRIDE;
int httpStatusCode) override;
// CefDownloadHandler methods:
virtual void OnBeforeDownload(CefRefPtr<CefBrowser> browser,
virtual bool OnBeforeDownload(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDownloadItem> download_item,
const CefString& suggested_name,
CefRefPtr< CefBeforeDownloadCallback > callback) OVERRIDE;
CefRefPtr< CefBeforeDownloadCallback > callback) override;
// CefKeyboardHandler methods:
virtual bool OnPreKeyEvent(CefRefPtr<CefBrowser> browser,
const CefKeyEvent& event,
CefEventHandle os_event,
bool* is_keyboard_shortcut) OVERRIDE;
bool* is_keyboard_shortcut) override;
// CefContextMenuHandler methods:
virtual void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
CefRefPtr<CefMenuModel> model) override;
virtual bool OnContextMenuCommand(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
int command_id,
EventFlags event_flags) override;
// Request that all existing browser windows close.
void CloseAllBrowsers(bool force_close);
......
......@@ -33,7 +33,8 @@ namespace {
#ifdef TRACE
std::cerr << "Command: " << command << std::endl;
#endif
std::unique_ptr<FILE, decltype(&::pclose)> f(::popen(command.c_str(), "r"), &::pclose);
auto closer = [](FILE* fp) { ::pclose(fp); };
std::unique_ptr<FILE, decltype(closer)> f(::popen(command.c_str(), "r"), closer);
std::ostringstream output;
const int BUF_SIZE = 1024;
char buf[BUF_SIZE];
......@@ -64,13 +65,9 @@ namespace {
}
#endif
// kdialog does not support these
mode = static_cast<CefDialogHandler::FileDialogMode>(mode & ~(CefDialogHandler::FileDialogMode::FILE_DIALOG_OVERWRITEPROMPT_FLAG));
mode = static_cast<CefDialogHandler::FileDialogMode>(mode & ~(CefDialogHandler::FileDialogMode::FILE_DIALOG_HIDEREADONLY_FLAG));
switch (mode) {
case CefDialogHandler::FileDialogMode::FILE_DIALOG_OPEN_MULTIPLE:
cmdLine << " --multiple"; [[fallthrough]]
cmdLine << " --multiple"; [[fallthrough]];
case CefDialogHandler::FileDialogMode::FILE_DIALOG_OPEN:
cmdLine << " --getopenfilename";
break;
......@@ -108,15 +105,7 @@ namespace {
const std::vector<CefString>& accept_filters)
{
std::ostringstream cmdLine;
cmdLine << "zenity --file-selection";
// zenity does not support these
mode = static_cast<CefDialogHandler::FileDialogMode>(mode & ~(CefDialogHandler::FileDialogMode::FILE_DIALOG_HIDEREADONLY_FLAG));
if (mode & CefDialogHandler::FileDialogMode::FILE_DIALOG_OVERWRITEPROMPT_FLAG) {
cmdLine << " --confirm-overwrite";
}
mode = static_cast<CefDialogHandler::FileDialogMode>(mode & ~(CefDialogHandler::FileDialogMode::FILE_DIALOG_OVERWRITEPROMPT_FLAG));
cmdLine << "zenity --file-selection --confirm-overwrite";
switch (mode) {
case CefDialogHandler::FileDialogMode::FILE_DIALOG_OPEN_MULTIPLE:
......@@ -171,7 +160,8 @@ namespace {
// we will try to launch kdialog or zenity
std::string dialogExecutable;
// try to determine which environment we run inside
std::string desktop = getenv("XDG_CURRENT_DESKTOP");
const char* desktop_env = getenv("XDG_CURRENT_DESKTOP");
std::string desktop = desktop_env == nullptr ? "" : desktop_env;
const auto checkExeExists = [](const char* name) {
int ec = ::system((std::string(name) + " --help > /dev/null").c_str());
......@@ -244,9 +234,14 @@ void FCHostHandler::PlatformTitleChange(CefRefPtr<CefBrowser> browser, const Cef
#endif // defined(CEF_X11)
}
bool FCHostHandler::OnFileDialog(CefRefPtr<CefBrowser> /* browser */, CefDialogHandler::FileDialogMode mode,
const CefString& title, const CefString& default_file_path, const std::vector<CefString>& accept_filters,
int /* selected_accept_filter */, CefRefPtr<CefFileDialogCallback> callback)
bool FCHostHandler::OnFileDialog(CefRefPtr<CefBrowser> /* browser */,
CefDialogHandler::FileDialogMode mode,
const CefString& title,
const CefString& default_file_path,
const std::vector<CefString>& accept_filters,
const std::vector<CefString>& /* accept_extensions */,
const std::vector<CefString>& /* accept_descriptions */,
CefRefPtr<CefFileDialogCallback> callback)
{
static DialogHelper helper;
......@@ -261,6 +256,6 @@ bool FCHostHandler::OnFileDialog(CefRefPtr<CefBrowser> /* browser */, CefDialogH
std::vector<CefString> selected;
selected.push_back(fn);
callback->Continue(0, selected);
callback->Continue(selected);
return true;
}
......@@ -27,9 +27,14 @@ void FCHostHandler::PlatformTitleChange(CefRefPtr<CefBrowser> browser,
SetWindowText(hwnd, std::wstring(title).c_str());
}
bool FCHostHandler::OnFileDialog(CefRefPtr<CefBrowser> /* browser */, CefDialogHandler::FileDialogMode /* mode */,
const CefString& /* title */, const CefString& /* default_file_path */, const std::vector<CefString>& /* accept_filters */,
int /* selected_accept_filter */, CefRefPtr<CefFileDialogCallback> /* callback */)
bool FCHostHandler::OnFileDialog(CefRefPtr<CefBrowser> /* browser */,
CefDialogHandler::FileDialogMode /* mode */,
const CefString& /* title */,
const CefString& /* default_file_path */,
const std::vector<CefString>& /* accept_filters */,
const std::vector<CefString>& /* accept_extensions */,
const std::vector<CefString>& /* accept_descriptions */,
CefRefPtr<CefFileDialogCallback> /* callback */)
{
return false; // to display the default dialog
}
......@@ -67,5 +67,5 @@ int main(int argc, char* argv[]) {
CefRefPtr<CefCommandLine> command_line = CefCommandLine::CreateCommandLine();
command_line->InitFromArgv(argc, argv);
return app->main(main_args, command_line);
return app->main(main_args, command_line.get());
}
......@@ -5,6 +5,8 @@
#include <memory>
#include <vector>
static_assert(CEF_STRING_TYPE_UTF16);
namespace fs = std::filesystem;
namespace {
......@@ -58,9 +60,9 @@ void FCHostPersistentStorage::set(const CefString& key, CefRefPtr<CefV8Value> va
// we should probably be doing this async but TBT Sugarcube is the slow part, not the file IO
std::unique_ptr<std::FILE, closeFile> fh;
#if defined(OS_WIN)
fh.reset(_wfopen(get_filename(key).c_str(), L"w"));
fh.reset(_wfopen(get_filename(key).c_str(), L"wb"));
#else
fh.reset(std::fopen(get_filename(key).c_str(), "w"));
fh.reset(std::fopen(get_filename(key).c_str(), "wb"));
#endif
CefString valStr = val->GetStringValue();
if (valStr.size() > 0) {
......@@ -93,17 +95,26 @@ void FCHostPersistentStorage::load()
for (const auto& entry: fs::directory_iterator(path)) {
if (fs::is_regular_file(entry.path())) {
const auto entrySize = fs::file_size(entry.path());
readbuf.resize(static_cast<std::size_t>(entrySize + 2)); // +1 wchar_t
readbuf.resize(static_cast<std::size_t>(entrySize + 2)); // +1 char16
#if defined(OS_WIN)
fh.reset(_wfopen(entry.path().c_str(), L"r"));
fh.reset(_wfopen(entry.path().c_str(), L"rb"));
#else
fh.reset(std::fopen(entry.path().c_str(), "r"));
fh.reset(std::fopen(entry.path().c_str(), "rb"));
#endif
if (std::fread(&readbuf[0], entrySize, 1, fh.get())) {
readbuf[entrySize + 1] = readbuf[entrySize] = 0; // null terminate
CefString val = static_cast<const wchar_t*>(static_cast<const void*>(readbuf.data()));
storage.emplace(entry.path().filename().native(), CefV8Value::CreateString(val));
CefString val;
val.FromString16(static_cast<const char16_t*>(static_cast<const void*>(readbuf.data())));
auto sKey = entry.path().filename().native();
#if defined(OS_WIN)
// put the fucking colon back in it
const size_t loc = sKey.find(L'#', 0);
if (loc != std::wstring::npos) {
sKey.replace(loc, static_cast<size_t>(1), L":");
}
#endif
storage.emplace(sKey, CefV8Value::CreateString(val));
}
}
}
......@@ -112,7 +123,13 @@ void FCHostPersistentStorage::load()
fs::path FCHostPersistentStorage::get_filename(const CefString& key) const
{
#if defined (OS_WIN)
return path / key.ToWString();
std::wstring sKey = key.ToWString();
// some fool decided to use a fucking colon as a key separator for SC V3 saves...can't have that in a filename on windows...
const size_t loc = sKey.find(L':', 0);
if (loc != std::wstring::npos) {
sKey.replace(loc, static_cast<size_t>(1), L"#");
}
return path / sKey;
#else
return path / key.ToString();
#endif
......
......@@ -33,12 +33,12 @@ void FCHostStorageRegister(const std::filesystem::path& persistPath, CefRefPtr<C
session = std::make_unique<FCHostSessionStorage>();
CefRefPtr<CefV8Handler> sess_handler = new FCHostStorageHandler(false);
CefRefPtr<CefV8Value> obj_sess = CefV8Value::CreateObject(NULL, NULL);
CefRefPtr<CefV8Value> obj_sess = CefV8Value::CreateObject(nullptr, nullptr);
object->SetValue("FCHostSession", obj_sess, V8_PROPERTY_ATTRIBUTE_NONE);
AttachStorageFunctions(obj_sess, sess_handler);
CefRefPtr<CefV8Handler> pers_handler = new FCHostStorageHandler(true);
CefRefPtr<CefV8Value> obj_pers = CefV8Value::CreateObject(NULL, NULL);
CefRefPtr<CefV8Value> obj_pers = CefV8Value::CreateObject(nullptr, nullptr);
object->SetValue("FCHostPersistent", obj_pers, V8_PROPERTY_ATTRIBUTE_NONE);
AttachStorageFunctions(obj_pers, pers_handler);
}
......@@ -52,7 +52,7 @@ bool FCHostStorageHandler::Execute(const CefString& name, CefRefPtr<CefV8Value>
if (name == "size") {
// no arguments
retval = CefV8Value::CreateInt(static_cast<int32>(storage->size()));
retval = CefV8Value::CreateInt(static_cast<int32_t>(storage->size()));
return true;
}
else if (name == "keys") {
......
......@@ -13,7 +13,7 @@ public:
CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments,
CefRefPtr<CefV8Value>& retval,
CefString& exception) OVERRIDE;
CefString& exception) override;
private:
bool persistent;
......
......@@ -25,9 +25,6 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// Enable High-DPI support on Windows 7 or newer.
CefEnableHighDPISupport();
// Provide CEF with command-line arguments.
CefMainArgs main_args(hInstance);
......@@ -47,5 +44,5 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
CefRefPtr<CefCommandLine> command_line = CefCommandLine::CreateCommandLine();
command_line->InitFromString(lpCmdLine);
return app->main(main_args, command_line);
return app->main(main_args, command_line.get());
}
......@@ -9,7 +9,7 @@ void cef_string_from_path(const std::filesystem::path& p, cef_string_t* str)
{
const auto& pstr = p.native();
#if defined(OS_WIN)
cef_string_from_utf16(pstr.c_str(), pstr.size(), str);
cef_string_from_wide(pstr.c_str(), pstr.size(), str);
#else
cef_string_from_utf8(pstr.c_str(), pstr.size(), str);
#endif
......
MAKEFLAGS += -r
export TWEEGO_PATH=devTools/tweeGo/storyFormats
HASH := $(shell git rev-list -n 1 --abbrev-commit HEAD)
COMMIT := $(shell git rev-parse --short HEAD)
TWEEGO := $(shell command -v tweego 2>/dev/null)
ifndef TWEEGO
uname := $(shell uname -s)
arch := $(shell uname -m)
arch := $(shell if test $(arch) = x86_64 -o $(arch) = amd64; then echo 64; else echo 32; fi)
ifeq ($(uname),Linux)
ifeq ($(arch),64)
TWEEGO := devTools/tweeGo/tweego_nix64
else
TWEEGO := devTools/tweeGo/tweego_nix86
endif
else ifeq ($(uname),Darwin)
ifeq ($(arch),64)
TWEEGO := devTools/tweeGo/tweego_osx64
else
TWEEGO := devTools/tweeGo/tweego_osx86
endif
endif
endif
all: bin/FC_pregmod.html bin/resources
git: bin/FC_pregmod_$(HASH).html bin/resources
bin/resources: resources
test -L "$@" || ln -s "../$<" bin/
bin/%.html: bin/tmp
rm src/002-config/fc-version.js.commitHash.js
mv $< $@
bin/fc.js: bin/
devTools/concatFiles.sh js/ '*.js' $@
bin/fc.css: bin/
devTools/concatFiles.sh css/ '*.css' $@
bin/tmp: bin/fc.js bin/fc.css injectGitCommitHash
$(TWEEGO) --module=bin/fc.js --module=bin/fc.css --head resources/raster/favicon/arcologyVector.html src/ > $@
rm -f bin/fc.js
rm -f bin/fc.css
injectGitCommitHash:
printf "App.Version.commitHash = '%s';\n" $(COMMIT) > src/002-config/fc-version.js.commitHash.js
bin/:
mkdir -p $@
sanity:
./sanityCheck.sh
# The workflow for updating the SugarCube format.js file
sugarcube:
(cd submodules/sugarcube-2/ && node build.js -6 -b 2)
cp submodules/sugarcube-2/build/twine2/sugarcube-2/format.js devTools/tweeGo/storyFormats/sugarcube-2/format.js
echo "Compiling SugarCube"
(cd submodules/sugarcube-2/ && node build.js -n -b 2)
mv submodules/sugarcube-2/build/twine2/sugarcube-2/format.js devTools/tweeGo/storyFormats/sugarcube-2/format.js
(cd submodules/sugarcube-2/ && git diff master fc-rebased > sugarcube-fc-changes.patch)
mv submodules/sugarcube-2/sugarcube-fc-changes.patch devNotes/"sugarcube stuff"/sugarcube-fc-changes.patch
.PHONY: all sanity git sugarcube
.PHONY: sugarcube
<!-- cSpell:ignore nwjs -->
# Free Cities - pregmod
Pregmod is a modification of the original [Free Cities](https://freecitiesblog.blogspot.com/) created by FCdev.
## Play the game
You can download compiled files and source archives from the [Releases page](https://gitgud.io/pregmodfan/fc-pregmod/-/releases), and the [build](https://gitgud.io/pregmodfan/fc-pregmod/-/jobs/artifacts/pregmod-master/download?job=build) from the latest commit to the master branch.
Alternatively, you can build the game yourself:
First, clone the git repository:
1. [Install Git for terminal](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) or a Git GUI of your choice.
2. Clone the repo
* Via terminal: `git clone --single-branch https://gitgud.io/pregmodfan/fc-pregmod.git`
3. Get updates
* Via terminal: `git pull`
Compile the game:
* Windows
* Run compile.bat
* Second run of compile.bat will overwrite without prompt
* Linux/Mac
1. Ensure executable permission on file `devTools/tweeGo/tweego` (not tweego.exe!)
2. Ensure executable permission on file `compile.sh`
3. In the root dir of sources (where you see src, devTools, bin...) run command `./compile.sh` from console.
Alternatively, if you have make installed, run `make all` in the root directory.
To play open FC_pregmod.html in bin/ (Recommendation: Drag it into incognito mode)
* WARNING - FCHost users need to update or rebuild FCHost before running alpha.34 or later (or the latest build) or it WILL DELETE YOUR LOCAL SAVES!!! Download info is at https://gitgud.io/pregmodfan/fc-pregmod/-/blob/pregmod-master/FCHost/README.md?ref_type=heads#fchost and build info is at https://gitgud.io/pregmodfan/fc-pregmod/-/blob/pregmod-master/FCHost/HowToBuild.md#how-to-build
1. Download the game
* [Current release](https://gitgud.io/pregmodfan/fc-pregmod/-/releases)
* [Latest build](https://gitgud.io/pregmodfan/fc-pregmod/-/jobs/artifacts/pregmod-master/download?job=build)
2. Open the game in your preferred browser
* On PC, we recommend either Firefox or [FCHost](FCHost/README.md).
* Recommendation: Drag it into incognito mode
3. Have fun!
### Compile the game yourself
If you want to tweak the game a bit, you can easily download the files and compile it yourself.
1. Clone the git repository:
1. [Install Git for terminal](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) or a Git GUI of your
choice.
2. Clone the repo
* Via terminal: `git clone --single-branch https://gitgud.io/pregmodfan/fc-pregmod.git`
3. Get updates
* Via terminal: `git pull`
2. Compile the game:
* Using one of two methods
1. The simple compiler by running `simple-compiler.bat` (Windows) or `simple-compiler.sh` (Mac/Linux)
* Benefits:
* Requires no external dependencies
* Slightly faster compiling
2. The advanced compiler by running `compile.bat` (Windows) or `compile.sh` (Mac/Linux)
* Requires:
* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org)
* ~500 MB of Node packages
* `compile.[bat, sh]` will attempt to help you with the installation of its dependencies
* Benefits:
* Easier debugging
* Early problem detection
* Spell checking
* Tweaking of compiler settings by running `setup.bat` (Windows) or `setup.sh` (Mac/Linux)
* Copies `FC_pregmod.html` to `FCHost` if it is installed
* Live reloading of FC after file changes by running `watcher.bat` (Windows) or `watcher.sh` (Mac/Linux)
* We suggest using the advanced compiler when possible.
* **The second run of the compiler will overwrite the existing `FC_pregmod.html` file!**
* **All our tooling expects that you are running them in FC's root directory** (Where you see devTools, src, js, etc). Failure to do so will result in errors.
* If you are using an ARM-based device, you may need to use `arch -x86_64 bash [compile or simple-compiler].sh` to properly compile.
3. To play open `FC_pregmod.html` in the `bin/` folder
* Repeat steps 2 and 3 after you make any changes or use `watcher.[bat, sh]` to do them automatically.
## Common problems
* If compiling takes a long time (more than 2 minutes) or causes a noticeable increase in system resource utilisation.
- FC's compiler makes a lot of file changes over a short period of time. Some Antivirus programs will make FC's compiler wait while it scans the contents of each changed file. So it might be worth making sure FC's directory is excluded in your Antivirus settings.
* If your Antivirus is Windows Defender (currently tested with Windows 10 on 04/14/2024):
* `Start menu` -> `Windows Security` -> `Virus & threat protection` -> `Virus & threat protection settings` ->
`Manage settings` -> `Exclusions (near the bottom)` -> `Add or remove exclusions` -> `Add an exclusion` ->
`path to FC's root directory (Where you see devTools, src, js, etc).`
* `sessionStorage quota exceeded` / `localStorage quota exceeded` or something similar
- Your saves stored inside the browser are getting too large. There are multiple ways to solve this:
1. Delete saves stored in the browser. If you want to keep them, save them to disk first.
2. Disable autosave and delete the current one. Due to technical reasons autosaves are larger than normal saves,
so this may help more than expected.
3. If on Firefox, raise the storage limit: Type `about:config` in the address bar and search for
`dom.storage.default_quota`. Increase this value as needed. Default value is 5120 kilobytes / 5 MB.
4. Switch to a different browser. Recommended is either Firefox or FCHost, a custom HTML renderer specifically
for Pregmod. Further reading can be found [here](FCHost/documentation_FCHost.md).
5. If you absolutely need to use Google Chrome:
1. download and unzip [NW.js SDK](https://nwjs.io/downloads/) for your operative system.
2. copy the game file (FC_pregmod.html) into the `nwjs-sdk-v0.XX.Y-YOUR_OS` folder
3. in the same folder, create a text file with the following content:
```
{
"name": "Free Cities pregmod edition",
"main": "FC_pregmod.html",
"dom_storage_quota":30
}
```
and save it as package.json. In this example, 30 is the limit (in MB) that is set for the storage quota,
but you can replace it with any number. Google Chrome has the same default value as Firefox.
4. Double click nw.exe to launch the game.
- Your saves stored inside the browser are getting too large. There are multiple ways to solve this:
1. Delete saves stored in the browser. If you want to keep them, save them to disk first.
2. Disable autosave and delete the current one. Due to technical reasons autosaves are larger than normal saves, so this may help more than expected.
3. If on Firefox, raise the storage limit: Type `about:config` in the address bar and search for
`dom.storage.default_quota`. Increase this value as needed. Default value is 5120 kilobytes / 5 MB.
4. Switch to a different browser. Recommended is either Firefox or [FCHost](FCHost/README.md), a custom HTML renderer specifically for Pregmod.
5. If you absolutely need to use Google Chrome:
1. download and unzip [NW.js SDK](https://nwjs.io/downloads/) for your operative system.
2. copy the game file (FC_pregmod.html) into the `nwjs-sdk-v0.XX.Y-YOUR_OS` folder
3. in the same folder, create a text file with the following content:
```
{
"name": "Free Cities pregmod edition",
"main": "FC_pregmod.html",
"dom_storage_quota":30
}
```
and save it as package.json. In this example, 30 is the limit (in MB) that is set for the storage quota,
but you can replace it with any number. Google Chrome has the same default value as Firefox.
4. Double click nw.exe to launch the game.
* Everything is broken!
- **Do not copy over your existing download** as it may leave old files behind, replace it entirely
- **Do not copy over your existing download** as it may leave old files behind, replace it entirely
* I can't save more than once or twice.
- Known issue caused by SugarCube level changes. Save to file doesn't have this problem and will likely avoid the first problem as well.
- It is possible to increase the memory utilized by your browser to delay this
- Known issue caused by SugarCube level changes. Save to file doesn't have this problem and will likely avoid the
first problem as well.
- It is possible to increase the memory utilized by your browser to delay this
* I wish to report a sanityCheck issue.
- Great, however a large majority of the results are false positives. That said, if you found an actual error it could be a great first contribution if you are interested.
* I wish to report an issue.
1. Search [issues](https://gitgud.io/pregmodfan/fc-pregmod/-/issues) to see if someone has already reported the issue.
2. [Open a new issue](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/new) or, if you are interested in trying to fix it yourself, please see our guide on [contributing](CONTRIBUTING.md).
## Contribute
New Contributors are always welcome. Basic information before you start can be found [here](CONTRIBUTING.md)
New Contributors are always welcome. Basic information before you start can be found [here](CONTRIBUTING.md).
## Submodules
......
<!-- cSpell:ignore faraen, eart, lxml, XMLID -->
# How to vector art
Please read the whole document before starting to work.
......@@ -36,6 +38,48 @@ While editing, keep the Layers in mind.
* There are some globally available styles defined as CSS classes (e.g. skin, hair).
Use them if your asset should be changed upon display.
Do not set the style directly in the object.
* You can use Inkscape to define and add classes to paths.
To add a class to a path, open the XML editor with the path selected (Edit → XML Editor...)
Delete all fields except for those with the names 'id', and 'd'.
Add a new field to the path and name it 'class'.
Make its value one of the values defined in the below section.
**MAINTAIN THESE CLASS DEFINITIONS BY MANUALLY EDITING YOUR WORKING SVG FILE**
<style
type="text/css"
id="style">
/* please maintain these definitions manually */
.white{fill:#FFFFFF;}
.skin{fill:#F6E0E8;}
.head{}
.eart{}
.torso{}
.tail{}
.boob{}
.penis{}
.scrotum{}
.areola{fill:#D76B93;}
.bellybutton{fill:#D76B93;}
.labia{fill:#D76B93;}
.hair{fill:#3F403F;}
.eyebrow_hair{fill:#3F403F;}
.shoe{fill:#3E65B0;}
.shoe_shadow{fill:#15406D;}
.smart_piercing{fill:#4DB748;}
.steel_piercing{fill:#787878;}
.steel_chastity{fill:#BABABA;}
.gag{fill:#BF2126;}
.shadow{fill:#010101;}
.glasses{}
.eye{}
.sclera{fill:#FFFFFF;}
.lips{}
</style>
You should be able to find this structure somewhere in the first 500 lines of your working svg file.
The formatting of these definitions matters for `normalize_svg.py`, which is invoked as part of `vector_layer_split.py` and explained below.
## 3. Normalize the document (before committing)
......@@ -48,7 +92,7 @@ Use
before committing to normalize the format so git will not freak out about the changed indentation.
If you use Inkscape, please use in Edit → Settings → Input/Output → SVG-Output → Path Data → Optimized. This is the default.
If you use Inkscape, please use Edit → Settings → Input/Output → SVG-Output → Path Data → Optimized. This is the default.
In case your Editor uses another path data style which cannot be changed, please contact the other artists and developers via the issue tracker to find a new common ground.
What it does:
......
......@@ -23,7 +23,7 @@ import lxml.etree as etree
color_classes = {
'skin', 'head', 'torso', 'boob', 'penis', 'scrotum', 'belly', 'areola', 'bellybutton', 'labia', 'hair',
'pubic_hair', 'armpit_hair', 'eyebrow_hair', 'shoe', 'shoe_shadow', 'smart_piercing', 'steel_piercing',
'steel_chastity', 'outfit_base', 'gag', 'shadow', 'glasses', 'eye', 'sclera',
'steel_chastity', 'outfit_base', 'gag', 'shadow', 'glasses', 'eye', 'sclera', 'eart', 'tail',
'white', 'skin', 'skin_highlight', 'skin_shade', 'skin_strong_highlight', 'skin_strong_shade', 'arm',
'arm_highlight', 'arm_shade', 'head', 'head_highlight', 'head_shade', 'torso', 'torso_highlight',
'torso_shade', 'boob', 'boob_highlight', 'boob_shade', 'penis', 'penis_highlight', 'penis_shade',
......
......@@ -14301,7 +14301,7 @@
inkscape:connector-curvature="0"
d="m 275.26378,165.16101 c -0.24741,-0.20233 -0.40657,-0.39957 -0.41866,-0.49424 0.59443,-0.44081 2.73299,-1.22002 3.5737,-1.67167 1.34564,-0.78438 2.43572,-1.00305 3.16183,0.34264 1.08347,-2.14678 3.64584,-0.39198 4.74684,-0.23561 5.00348,0.71063 7.58447,1.93656 8.85919,1.79572 -0.0429,1.02216 -7.25052,6.51089 -12.43514,6.02955 -5.63735,0.0537 -7.22484,-4.77021 -7.48776,-5.76639 z"
id="path4815"
class="areola"
class="lip"
style="fill:#d76b93" /><path
sodipodi:nodetypes="ccccscscsscsssccccscccc"
inkscape:connector-curvature="0"
......@@ -14315,7 +14315,7 @@
 
 
<path
class="areola"
class="lip"
id="path3894"
d="m 275.26383,165.69589 -5e-5,-5e-5 c -0.24741,-0.21873 -0.40657,-0.43196 -0.41866,-0.53431 1.41051,-1.13078 3.10302,-5.42572 6.79803,-2.99926 1.0991,-0.49268 2.23959,-0.89251 3.34059,-0.72346 5.00348,0.76824 8.92822,4.12479 10.20294,3.97254 -0.0429,1.10502 -7.00052,7.06994 -12.18514,6.54958 -6.4232,-0.80062 -7.53249,-6.04094 -7.73771,-6.26504 z"
inkscape:connector-curvature="0"
......@@ -14335,7 +14335,7 @@
id="Mouth_TypeD"
inkscape:label="Mouth_TypeD"
style="display:none"><path
class="areola"
class="lip"
id="path8199"
d="m 275.70571,164.95554 c 1.23915,-0.50574 2.77388,-6.22503 6.05616,-4.11424 4.91199,-2.10859 8.69916,3.68583 11.71843,4.10088 -1.09392,1.46615 -1.00221,4.84767 -9.97053,6.22256 -7.43009,-1.6132 -7.24539,-3.73592 -7.80406,-6.2092 z"
inkscape:connector-curvature="0"
......@@ -14354,7 +14354,7 @@
inkscape:connector-curvature="0"
d="m 274.22874,163.7403 0.18459,0.0441 c 1.13336,-0.15224 4.12051,-4.54566 6.71792,-2.9431 1.78388,-1.79923 9.75547,2.22742 14.80161,2.90764 -1.02718,1.59873 -5.43201,6.65963 -13.0452,7.65887 -5.95821,-1.45687 -8.44457,-7.44345 -8.65892,-7.66755 z"
id="path2558-9-2"
class="areola"
class="lip"
style="fill:#d76b93" /><path
sodipodi:nodetypes="cccscccsccccsscssssscscccccccscccccscscssccccscsc"
inkscape:connector-curvature="0"
......@@ -14369,7 +14369,7 @@
inkscape:connector-curvature="0"
d="m 280.21507,158.05707 c 6.25991,-1.57826 10.97517,3.24388 13.24314,5.64768 -0.62988,1.73131 1.1191,11.87454 -9.35182,12.21087 -6.72091,-1.67784 -4.32841,-10.80221 -4.53363,-11.02631 -1.04388,-2.61967 -5.44275,-8.33534 0.64231,-6.83224 z"
id="path2558-9-2-4"
class="areola"
class="lip"
style="fill:#d76b93" /><path
sodipodi:nodetypes="csssccc"
inkscape:connector-curvature="0"
......@@ -14407,7 +14407,7 @@
inkscape:connector-curvature="0"
d="m 274.93237,166.08259 -5e-5,-5e-5 c -0.64515,-0.37341 -0.22979,-0.95124 0.48732,-0.67794 1.41051,-1.13078 0.85662,-4.71566 5.72351,-3.41421 8.18916,-2.06473 14.07197,3.68 14.21541,4.23346 0.254,0.98002 -7.9849,5.81994 -12.35702,6.11208 -5.70445,-1.45687 -7.86395,-6.02924 -8.06917,-6.25334 z"
id="path2558-9"
class="areola"
class="lip"
style="fill:#d76b93" /><path
sodipodi:nodetypes="scccccccccscccccscscsccccccccccccscscccccscscsc"
inkscape:connector-curvature="0"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.