Skip to content

Instantly share code, notes, and snippets.

View ericoporto's full-sized avatar
🎮
making

Érico Porto ericoporto

🎮
making
View GitHub Profile
@ericoporto
ericoporto / FORMAT.md
Last active October 26, 2022 00:12
FORMAT.md
@ericoporto
ericoporto / Dark.md
Created October 8, 2022 16:12 — forked from rounk-ctrl/Dark.md
Win32 Dark Mode

Dark Mode APIs.

API Signatures.

ShouldAppsUseDarkMode()

Checks whether system is using dark mode or not.
Signature:

using fnShouldAppsUseDarkMode = bool (WINAPI*)(); // ordinal 132

AllowDarkModeForWindow(In HWND hWnd, In bool allow)

@ericoporto
ericoporto / buid_menus_review.md
Last active February 7, 2022 11:28
Review of build menus WIP
@ericoporto
ericoporto / README.md
Last active February 29, 2024 00:41
☕eri0o's Adventure Game Studio Repositories!

eri0o's Adventure Game Studio Repositories!

Using AGS for some time now, here's a list of things I made!

Script Modules

Introduction

Here are some rough notes on building Kirikiri SDL2 for iOS and Android.
Please note that these may or may not be incomplete. Improved documentation is being planned, but not started yet.

Startup Directory selection

Since Android and iOS don't really have concepts of "current directory" or "command line arguments", you should probably hardcode the startup directory in TVPBeforeSystemInit in src/core/base/sdl2/SysInitImpl.cpp.

Android is still a work in progress. You may be able to use file://?/ to access the Android assets folder, but this is untested.

@ericoporto
ericoporto / Preferences.cs
Created January 9, 2022 13:35
Preferences.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AGS.Types
{
[Flags]
limit of 1000000 dynamic array elements (now supports over 2 billion) | 3.5.1
Removed fonts count limit | 3.5.0
imported sprites count limit to 90000 and removed total sprite count limit | 3.5.0
Removed length limit on the Button and TextBox text (was 50 and 200 respectively) | 3.5.0
Removed limit on ListBox item count (was 200). | 3.5.0
Removed limits on built-in text wrapping (was 50 lines of 200 chars max each). | 3.5.0
Removed 200 chars limit for DoOnceOnly token length. | 3.5.0
Removed limit on maximal number of asset files in a game package. | 3.4.1-p2
Removed limit on Dialog Topics (was 500 topics per game). | 3.4.1

AGS Engine Plugins

(Latest revision 4 Oct 2009)

AGS supports a plugin interface, whereby you can write your own add-ons if AGS doesn't support all the features you need.

AGS supports two different types of plugins - plain API plugins, for writing plugins that add extra functionality to games and need to be included with the games at runtime; and .NET plugins, for enhancing the editor. Editor .NET plugins are explained on this separate page; here we will continue talking about the plain API.

First, a few important notes about the plugin API. It's essential that you read these before even considering writing a plugin.

Quick source code introduction

This text should briefly introduce you to where are some things in the AGS codebase. It doesn't aim at being complete, but mainly informative to help get familiar with the location of some things. Please make sure you have read the README and used the Engine and Editor to get familiar with some concepts.

The AGS engine is written in C++ and uses C and C++ libraries. The AGS Editor is written in C#, with few parts in C++ in the Native library.

Directories quick look

main components

  • Common: has components that are shared between native parts of the Editor and the Engine, and are expected to be available to the command line Tools.
@ericoporto
ericoporto / html
Created June 9, 2021 01:17
how to change the address bar color on mobile dynamically
<meta name="theme-color" content="#000000" />
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff');
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#000000');