Showing preview only (1,051K chars total). Download the full file or copy to clipboard to get everything.
Repository: nazonoSAUNA/patch.aul
Branch: master
Commit: 2441800fe810
Files: 167
Total size: 957.7 KB
Directory structure:
gitextract_6ahg5_lo/
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── ------.md
│ │ ├── aviutl--------------.md
│ │ └── patch-aul------.md
│ ├── pull_request_template.md
│ └── workflows/
│ └── CI.yml
├── .gitignore
├── .gitmodules
├── COPYING
├── COPYING.LESSER
├── LICENSE
├── credits.md
├── patch/
│ ├── .editorconfig
│ ├── add_dll_ref.hpp
│ ├── clprogram.cl
│ ├── config.hpp
│ ├── config_rw.hpp
│ ├── cryptostring.hpp
│ ├── debug_log.hpp
│ ├── gate.hpp
│ ├── global.hpp
│ ├── global_minimum.hpp
│ ├── hash.hpp
│ ├── init.cpp
│ ├── init.hpp
│ ├── json.h
│ ├── macro.h
│ ├── moduledata.hpp
│ ├── multi_threading.hpp
│ ├── mylua.hpp
│ ├── mywindow.hpp
│ ├── offset_address.hpp
│ ├── overwrite_resource.cpp
│ ├── overwrite_resource.hpp
│ ├── packages.config
│ ├── patch.cpp
│ ├── patch.hpp
│ ├── patch.rc
│ ├── patch.vcxproj
│ ├── patch.vcxproj.filters
│ ├── patch_access_key.hpp
│ ├── patch_add_extension.cpp
│ ├── patch_add_extension.hpp
│ ├── patch_alpha_bg.hpp
│ ├── patch_aup_layer_setting.hpp
│ ├── patch_aup_scene_setting.hpp
│ ├── patch_aviutl_wndproc_override.cpp
│ ├── patch_aviutl_wndproc_override.hpp
│ ├── patch_base.hpp
│ ├── patch_blend.cpp
│ ├── patch_blend.hpp
│ ├── patch_colorpalette_cache.hpp
│ ├── patch_console.cpp
│ ├── patch_console.hpp
│ ├── patch_copybuffer_smem.hpp
│ ├── patch_dialog_new_file.hpp
│ ├── patch_exception_history.hpp
│ ├── patch_exception_log.cpp
│ ├── patch_exception_log.hpp
│ ├── patch_exception_log_dialog.cpp
│ ├── patch_exception_log_dialog.hpp
│ ├── patch_exeditwindow_sizing.hpp
│ ├── patch_exo_aviutlfilter.hpp
│ ├── patch_exo_fold_gui.hpp
│ ├── patch_exo_midpt_and_tra.hpp
│ ├── patch_exo_sceneidx.hpp
│ ├── patch_exo_specialcolorconv.hpp
│ ├── patch_exo_trackminusval.cpp
│ ├── patch_exo_trackminusval.hpp
│ ├── patch_exo_trackparam.hpp
│ ├── patch_failed_file_drop.hpp
│ ├── patch_failed_longer_path.cpp
│ ├── patch_failed_longer_path.hpp
│ ├── patch_failed_sjis_msgbox.cpp
│ ├── patch_failed_sjis_msgbox.hpp
│ ├── patch_fast.hpp
│ ├── patch_fast_border.cpp
│ ├── patch_fast_border.hpp
│ ├── patch_fast_cl.hpp
│ ├── patch_fast_create_figure.cpp
│ ├── patch_fast_create_figure.hpp
│ ├── patch_fast_directionalblur.cpp
│ ├── patch_fast_directionalblur.hpp
│ ├── patch_fast_displacementmap.cpp
│ ├── patch_fast_displacementmap.hpp
│ ├── patch_fast_exeditwindow.cpp
│ ├── patch_fast_exeditwindow.hpp
│ ├── patch_fast_flash.cpp
│ ├── patch_fast_flash.hpp
│ ├── patch_fast_getputpixeldata.cpp
│ ├── patch_fast_getputpixeldata.hpp
│ ├── patch_fast_glow.cpp
│ ├── patch_fast_glow.hpp
│ ├── patch_fast_lensblur.cpp
│ ├── patch_fast_lensblur.hpp
│ ├── patch_fast_polortransform.cpp
│ ├── patch_fast_polortransform.hpp
│ ├── patch_fast_radiationalblur.cpp
│ ├── patch_fast_radiationalblur.hpp
│ ├── patch_fast_setting_dialog.cpp
│ ├── patch_fast_setting_dialog.hpp
│ ├── patch_fast_text.cpp
│ ├── patch_fast_text.hpp
│ ├── patch_fileinfo.hpp
│ ├── patch_font_dialog.hpp
│ ├── patch_helpful_msgbox.cpp
│ ├── patch_helpful_msgbox.hpp
│ ├── patch_ignore_media_param_reset.hpp
│ ├── patch_lua.cpp
│ ├── patch_lua.hpp
│ ├── patch_lua_getvalueex.cpp
│ ├── patch_lua_getvalueex.hpp
│ ├── patch_lua_rand.cpp
│ ├── patch_lua_rand.hpp
│ ├── patch_lua_randex.cpp
│ ├── patch_lua_randex.hpp
│ ├── patch_obj_colorcorrection.cpp
│ ├── patch_obj_colorcorrection.hpp
│ ├── patch_obj_glow.hpp
│ ├── patch_obj_lensblur.cpp
│ ├── patch_obj_lensblur.hpp
│ ├── patch_obj_noise.hpp
│ ├── patch_obj_specialcolorconv.hpp
│ ├── patch_playback_speed.hpp
│ ├── patch_rclickmenu_delete.cpp
│ ├── patch_rclickmenu_delete.hpp
│ ├── patch_rclickmenu_split.cpp
│ ├── patch_rclickmenu_split.hpp
│ ├── patch_redo.cpp
│ ├── patch_redo.hpp
│ ├── patch_scroll_objdlg.hpp
│ ├── patch_setting_dialog_excolorconfig.cpp
│ ├── patch_setting_dialog_excolorconfig.hpp
│ ├── patch_setting_dialog_move.hpp
│ ├── patch_setting_dialog_wndproc_override.cpp
│ ├── patch_setting_dialog_wndproc_override.hpp
│ ├── patch_setting_gui.hpp
│ ├── patch_setting_new_project.cpp
│ ├── patch_setting_new_project.hpp
│ ├── patch_splash.cpp
│ ├── patch_splash.hpp
│ ├── patch_susie_load.cpp
│ ├── patch_susie_load.hpp
│ ├── patch_sysinfo_write.hpp
│ ├── patch_text_op_size.hpp
│ ├── patch_theme_cc.hpp
│ ├── patch_tra_aviutlfilter.hpp
│ ├── patch_tra_change_drawfilter.cpp
│ ├── patch_tra_change_drawfilter.hpp
│ ├── patch_tra_specified_speed.hpp
│ ├── patch_undo.cpp
│ ├── patch_undo.hpp
│ ├── resource.h
│ ├── restorable_patch.hpp
│ ├── stopwatch.hpp
│ ├── timer.hpp
│ ├── util.hpp
│ ├── util_int.hpp
│ ├── util_magic.hpp
│ ├── util_others.cpp
│ ├── util_others.hpp
│ ├── util_pe.hpp
│ ├── util_resource.hpp
│ └── version.hpp
├── patch.aul.txt
├── patch.sln
└── readme.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: .github/ISSUE_TEMPLATE/------.md
================================================
---
name: 新機能の提案
about: 既存の挙動を変更する/新しい機能の追加
title: "+〇〇〇〇〇〇"
labels: enhancement
assignees: ''
---
**背景**
どのような理由でこの機能を提案するかの説明
**概要**
提案する機能はどのようなものなのかの説明
物によっては画像があると分かりやすい
**没案**
他に検討した案
**その他**
他に書きたいことがあれば
================================================
FILE: .github/ISSUE_TEMPLATE/aviutl--------------.md
================================================
---
name: AviUtl/周辺プラグインのバグの報告
about: patch.aulに直してほしいバグ
title: "*〇〇〇〇〇〇"
labels: enhancement
assignees: ''
---
【!】報告の前に必ずこの挙動がpatch.aulを導入していない状態で引き起こされる事象であることを確認してください
patch.aulを導入した結果期待していない挙動になるのであれば、これはpatch.aulのバグとして扱い、別のテンプレートが用意されています
**概要**
起こってしまうことの説明を簡単に
何かメッセージが表示されるのであれば、全文を正確にコピーする
**再現手順**
どのような操作をするとこのバグを観測できるのか
(例)
1. XXXプラグイン version XXXを導入する
2. 新規プロジェクトにXXXオブジェクトを配置する
3. XXXオブジェクトの設定を開く
**起こってほしかったこと**
バグが起きなければどうなるのか
**スクリーンショット**
必要だと思えば添付する
**環境**
AviUtl/拡張編集のバージョンは一応書いておく
導入しているフィルタ/入力/出力/色変換/その他のプラグインの情報をバージョンを添えて正確に書く
もし例外が発生しているのであれば、詳細情報が書かれたファイルを添付することでも環境の説明になる
**その他**
もし他に何か書きたいことがあれば
================================================
FILE: .github/ISSUE_TEMPLATE/patch-aul------.md
================================================
---
name: patch.aulのバグの報告
about: patch.aulが起因であるバグはここから
title: "/〇〇〇〇〇〇"
labels: bug
assignees: ''
---
【!】報告の前に必ずこの挙動がpatch.aulを導入したことにより引き起こされる事象であることを確認してください
AviUtl/拡張編集/その他プラグインのバグの報告には別のテンプレートが用意されています
**概要**
起こってしまうことの説明を簡単に
何かメッセージが表示されるのであれば、全文を正確にコピーする
**再現手順**
どのような操作をするとこのバグを観測できるのか
(例)
1. XXXプラグイン version XXXを導入する
2. 新規プロジェクトにXXXオブジェクトを配置する
3. XXXオブジェクトの設定を開く
**起こってほしかったこと**
バグが起きなければどうなるのか
**スクリーンショット**
必要だと思えば添付する
**環境**
AviUtl/拡張編集のバージョンは自明なので省略できる
導入しているフィルタ/入力/出力/色変換/その他のプラグインの情報をバージョンを添えて正確に書く
もし例外が発生しているのであれば、詳細情報が書かれたファイルを添付することでも環境の説明になる
**その他**
もし他に何か書きたいことがあれば
================================================
FILE: .github/pull_request_template.md
================================================
<!--
PR を作成する前に、以下の点について確認してください。
1. 誰が見ても分かりやすいタイトル/説明が書かれていること。
2. 1つの変更点に対して1つの PR が立てられていること。
-->
**関係する Issue**
関係する Issue の番号を以下に書いてください。
- #0 を閉じる
- #0 に関連
**変更点**
この PR での変更点について教えてください。
- ○○の追加
- ○○の修正
**内容の精査**
以下の点について教えてください。
- [ ] コードにおかしな点がないことを確認しました。
- [ ] 実際にビルドして試しました。
**スクリーンショット(任意)**
スクリーンショットを Ctrl+V で追加できます。
================================================
FILE: .github/workflows/CI.yml
================================================
name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: windows-2022
strategy:
matrix:
configuration: [Debug, Release]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Use Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Install CUDA Toolkit
uses: Jimver/cuda-toolkit@v0.2.7
- name: Setup NuGet
uses: nuget/setup-nuget@v1
- name: Restore NuGet package
run : nuget restore patch.sln
- name: Create Directories
run : |
mkdir pack
mkdir test
- name: Build patch.aul
run : devenv patch.sln /Build "${{ matrix.configuration }}|x86"
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.vscode/
test/
pack/
Release_PDB/
================================================
FILE: .gitmodules
================================================
[submodule "patch/aviutl_exedit_sdk"]
path = patch/aviutl_exedit_sdk
url = https://github.com/ePi5131/aviutl_exedit_sdk
[submodule "patch/winwrap"]
path = patch/winwrap
url = https://github.com/ePi5131/winwrap
================================================
FILE: COPYING
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: COPYING.LESSER
================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
================================================
FILE: LICENSE
================================================
© 2022-2023 ePi
patch.aulはLGPLv3の元ライセンスする。ライセンスの詳細はCOPYING,COPYING.LESSERファイルを参照すること。
================================================
FILE: credits.md
================================================
# 使用したライブラリについて
## Boost
> Boost Software License - Version 1.0 - August 17th, 2003
>
> Permission is hereby granted, free of charge, to any person or organization
> obtaining a copy of the software and accompanying documentation covered by
> this license (the "Software") to use, reproduce, display, distribute,
> execute, and transmit the Software, and to prepare derivative works of the
> Software, and to permit third-parties to whom the Software is furnished to
> do so, all subject to the following:
>
> The copyright notices in the Software and this entire statement, including
> the above license grant, this restriction and the following disclaimer,
> must be included in all copies of the Software, in whole or in part, and
> all derivative works of the Software, unless such copies or derivative
> works are solely in the form of machine-executable object code generated by
> a source language processor.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
> SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
> FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
> ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> DEALINGS IN THE SOFTWARE.
## aviutl_exedit_sdk
## winwrap
これらは私が書いたライブラリであり、1条項BSDライセンスの下頒布している。文面は以下の通り。
> Copyright (c) 2022
> ePi All rights reserved.
>
> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
>
> Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
> THIS SOFTWARE IS PROVIDED BY ePi “AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ePi BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## json.h
このプログラムはUnlicenseで頒布されているが、ここに使用したことを記述しておく。
================================================
FILE: patch/.editorconfig
================================================
# Rules in this file were initially inferred by Visual Studio IntelliCode from the D:\dev\patch\patch\ codebase based on best match to current usage at 2021/08/07
# You can modify the rules from these initially generated values to suit your own policies
# You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
[*.{cpp,hpp}]
charset = utf-8
================================================
FILE: patch/add_dll_ref.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <Windows.h>
#include "global.hpp"
// 自身の参照カウントを増やす
inline class add_dll_ref_t {
inline static bool loading_self = false;
public:
bool dllmain_if_break() noexcept {
return loading_self;
}
void add_ref() noexcept {
loading_self = true;
LoadLibraryW(GLOBAL::patchaul_path.c_str());
loading_self = false;
}
} add_dll_ref;
================================================
FILE: patch/clprogram.cl
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
kernel void PolorTransform(global short* dst, global short* src, int obj_w, int obj_h, int obj_line,
int center_length, int radius, float angle, float uzu, float uzu_a){
int x = get_global_id(0);
int y = get_global_id(1);
int x_dist = x - radius;
int y_dist = y - radius;
float dist = sqrt((float)(x_dist * x_dist + y_dist * y_dist));
int range = (int)round((float)obj_w / max(dist, 1.0f) * 57.6115417480468f + uzu_a);
int yy_t256 = (int)round((float)(((obj_h + center_length) << 8) / radius) * dist);
int yy_range_fr = 0x100 - (yy_t256 & 0xff);
int yy_begin = (yy_t256 >> 8) - center_length;
int xx_t256 = (int)round((((float)radius - dist) * uzu + angle - atan2((float)y_dist, (float)x_dist)) * (float)obj_w * 40.7436637878417f) - range / 2;
int xx_range_fr = 0x100 - (xx_t256 & 0xff);
int xx_begin = (xx_t256 >> 8) % obj_w;
range = max(0x100,range);
int yy = yy_begin;
int sum_y = 0;
int sum_cb = 0;
int sum_cr = 0;
int sum_a = 0;
global short* pix;
int src_a;
if (0 <= yy && yy < obj_h) {
int range_remain = range;
int xx = xx_begin;
if (xx_range_fr) {
pix = src + (xx + yy * obj_line) * 4;
sum_a = pix[3] * xx_range_fr * yy_range_fr >> 16;
sum_y = pix[0] * sum_a >> 12;
sum_cb = pix[1] * sum_a >> 12;
sum_cr = pix[2] * sum_a >> 12;
range_remain -= xx_range_fr;
xx++;
xx %= obj_w;
}
int pix_range = range_remain >> 8;
for(int i=0;i<pix_range;i++){
pix = src + (xx + yy * obj_line) * 4;
src_a = pix[3] * yy_range_fr >> 8;
sum_y += pix[0] * src_a >> 12;
sum_cb += pix[1] * src_a >> 12;
sum_cr += pix[2] * src_a >> 12;
sum_a += src_a;
xx++;
xx %= obj_w;
}
range_remain &= 0xff;
if (range_remain) {
pix = src + (xx + yy * obj_line) * 4;
src_a = pix[3] * range_remain * yy_range_fr >> 16;
sum_y += pix[0] * src_a >> 12;
sum_cb += pix[1] * src_a >> 12;
sum_cr += pix[2] * src_a >> 12;
sum_a += src_a;
}
}
yy++;
yy_range_fr = 0x100 - yy_range_fr;
if (0 <= yy && yy < obj_h) {
int range_remain = range;
int xx = xx_begin;
if (xx_range_fr != 0x100) {
pix = src + (xx + yy * obj_line) * 4;
src_a = pix[3] * xx_range_fr * yy_range_fr >> 16;
sum_y += pix[0] * src_a >> 12;
sum_cb += pix[1] * src_a >> 12;
sum_cr += pix[2] * src_a >> 12;
sum_a += src_a;
range_remain -= xx_range_fr;
xx++;
xx %= obj_w;
}
int pix_range = range_remain >> 8;
for(int i=0;i<pix_range;i++){
pix = src + (xx + yy * obj_line) * 4;
src_a = pix[3] * yy_range_fr >> 8;
sum_y += pix[0] * src_a>> 12;
sum_cb += pix[1] * src_a >> 12;
sum_cr += pix[2] * src_a >> 12;
sum_a += src_a;
xx++;
xx %= obj_w;
}
range_remain &= 0xff;
if (range_remain) {
pix = src + (xx + yy * obj_line) * 4;
src_a = pix[3] * range_remain * yy_range_fr >> 16;
sum_y += pix[0] * src_a >> 12;
sum_cb += pix[1] * src_a >> 12;
sum_cr += pix[2] * src_a >> 12;
sum_a += src_a;
}
}
dst += (x + y * obj_line) * 4;
if (sum_a) {
float a_float = 4096.0f / (float)sum_a;
dst[0] = (short)round((float)sum_y * a_float);
dst[1] = (short)round((float)sum_cb * a_float);
dst[2] = (short)round((float)sum_cr * a_float);
dst[3] = (short)((sum_a << 8) / range);
} else {
dst[0] = dst[1] = dst[2] = dst[3] = 0;
}
}
kernel void DisplacementMap_move(global short* dst, global short* src, global short* mem,
int obj_w, int obj_h, int obj_line, int param0, int param1, int ox, int oy) {
int x = get_global_id(0);
int y = get_global_id(1);
dst += (x + y * obj_line) * 4;
mem += (x + y * obj_line) * 4;
int p0 = min(mem[0], mem[obj_line * 4]);
int p1 = max(mem[4], mem[obj_line * 4 + 4]);
p0 = (p0 - 0x800) * param0 / 5;
p1 = (p1 - 0x800) * param0 / 5 + 0x1000;
if (p1 < p0) {
int tmp = p0;
p0 = p1;
p1 = tmp;
}
int xx_range = p1 - p0;
int xx_begin = p0 + (x << 12);
int xx_end = xx_range + xx_begin;
p0 = min(mem[1], mem[5]);
p1 = max(mem[obj_line * 4 + 1], mem[obj_line * 4 + 5]);
p0 = (p0 - 0x800) * param1 / 5;
p1 = (p1 - 0x800) * param1 / 5 + 0x1000;
if (p1 < p0) {
int tmp = p0;
p0 = p1;
p1 = tmp;
}
int yy_range = p1 - p0;
int yy_begin = p0 + (y << 12);
int yy_end = yy_range + yy_begin;
if (xx_range < 0x1000) {
xx_begin += (xx_range - 0x1000) >> 1;
xx_end = xx_begin + 0x1000;
xx_range = 0x1000;
}
if (yy_range < 0x1000) {
yy_begin += (yy_range - 0x1000) >> 1;
yy_end = yy_begin + 0x1000;
yy_range = 0x1000;
}
int xx_level = 12;
int yy_level = 12;
while (0x20000 < xx_range) {
xx_begin >>= 1;
xx_end++;
xx_end >>= 1;
xx_range = xx_end - xx_begin;
xx_level--;
}
while (0x20000 < yy_range) {
yy_begin >>= 1;
yy_end++;
yy_end >>= 1;
yy_range = yy_end - yy_begin;
yy_level--;
}
xx_level &= 0x1f;
yy_level &= 0x1f;
xx_begin = max(xx_begin, 0);
xx_end = min(xx_end, obj_w << xx_level);
yy_begin = max(yy_begin, 0);
yy_end = min(yy_end, obj_h << yy_level);
float dsum_y = 0.0f;
float dsum_cb = 0.0f;
float dsum_cr = 0.0f;
float dsum_a = 0.0f;
int yy = yy_begin;
while (yy < yy_end) {
int yy_itr = yy >> yy_level;
int sum_y = 0;
int sum_cb = 0;
int sum_cr = 0;
int sum_a = 0;
int xx = xx_begin;
while (xx < xx_end) {
int xx_itr = xx >> xx_level;
int fraction;
if (xx & 0xfff) {
fraction = -xx & 0xfff;
} else {
fraction = min(xx_end - xx, 0x1000);
}
global short* srct = src + (xx_itr + yy_itr * obj_line) * 4;
int src_a = srct[3] * fraction >> 8;
sum_y += srct[0] * src_a >> 16;
sum_cb += srct[1] * src_a >> 16;
sum_cr += srct[2] * src_a >> 16;
sum_a += src_a;
xx += fraction;
}
int fraction;
if (yy & 0xfff) {
fraction = -yy & 0xfff;
} else {
fraction = min(yy_end - yy, 0x1000);
}
float fraction_rate = (float)fraction * 0.000244140625f;
dsum_y += (float)sum_y * fraction_rate;
dsum_cb += (float)sum_cb * fraction_rate;
dsum_cr += (float)sum_cr * fraction_rate;
dsum_a += (float)sum_a * fraction_rate;
yy += fraction;
}
if (256.0f <= dsum_a) {
float inv_a = 65536.0f / dsum_a;
dst[0] = (short)round(dsum_y * inv_a);
dst[1] = (short)round(dsum_cb * inv_a);
dst[2] = (short)round(dsum_cr * inv_a);
dst[3] = (short)round(dsum_a / ((float)yy_range / 1024.0f) / ((float)xx_range / 1024.0f));
} else {
dst[0] = dst[1] = dst[2] = dst[3] = 0;
}
}
kernel void DisplacementMap_zoom(global short* dst, global short* src, global short* mem,
int obj_w, int obj_h, int obj_line, int param0, int param1, int ox, int oy){
int x = get_global_id(0);
int y = get_global_id(1);
dst += (x + y * obj_line) * 4;
mem += (x + y * obj_line) * 4;
int xx_min, xx_max, yy_min, yy_max;
int xx_temp, yy_temp;
float zoom;
float xxd = (float)(x * 0x1000 - ox);
if (0 < param0) {
zoom = (1024.0f / (float)(param0 + 1000) - 1.0) * 0.00048828125f;
} else {
zoom = (float)param0 * -0.00000048828125f;
}
float temp = xxd * zoom;
xx_min = xx_max = x * 0x1000 + (int)((float)(mem[0] - 0x800) * temp);
xx_temp = x * 0x1000 + (int)((float)(mem[obj_line * 4] - 0x800) * temp);
xx_min = min(xx_min, xx_temp);
xx_max = max(xx_max, xx_temp);
temp = (xxd + 4096.0f) * zoom;
xx_temp = (x + 1) * 0x1000 + (int)((float)(mem[4] - 0x800) * temp);
xx_min = min(xx_min, xx_temp);
xx_max = max(xx_max, xx_temp);
xx_temp = (x + 1) * 0x1000 + (int)((float)(mem[(obj_line + 1) * 4] - 0x800) * temp);
int xx_begin = min(xx_min, xx_temp);
int xx_end = max(xx_max, xx_temp);
float yyd = (float)(y * 0x1000 - oy);
if (0 < param1) {
zoom = (1024.0f / (float)(param1 + 1000) - 1.0) * 0.00048828125f;
} else {
zoom = (float)param1 * -0.00000048828125f;
}
temp = yyd * zoom;
yy_min = yy_max = y * 0x1000 + (int)((float)(mem[1] - 0x800) * temp);
yy_temp = y * 0x1000 + (int)((float)(mem[5] - 0x800) * temp);
yy_min = min(yy_min, yy_temp);
yy_max = max(yy_max, yy_temp);
temp = (yyd + 4096.0f) * zoom;
yy_temp = (y + 1) * 0x1000 + (int)((float)(mem[(obj_line + 1) * 4] - 0x800) * temp);
yy_min = min(yy_min, yy_temp);
yy_max = max(yy_max, yy_temp);
yy_temp = (y + 1) * 0x1000 + (int)((float)(mem[obj_line * 4 + 5] - 0x800) * temp);
int yy_begin = min(yy_min, yy_temp);
int yy_end = max(yy_max, yy_temp);
int xx_range = xx_end - xx_begin;
int yy_range = yy_end - yy_begin;
if (xx_range < 0x1000) {
xx_begin += (xx_range - 0x1000) >> 1;
xx_end = xx_begin + 0x1000;
xx_range = 0x1000;
}
if (yy_range < 0x1000) {
yy_begin += (yy_range - 0x1000) >> 1;
yy_end = yy_begin + 0x1000;
yy_range = 0x1000;
}
int xx_level = 12;
int yy_level = 12;
while (0x20000 < xx_range) {
xx_begin >>= 1;
xx_end++;
xx_end >>= 1;
xx_range = xx_end - xx_begin;
xx_level--;
}
while (0x20000 < yy_range) {
yy_begin >>= 1;
yy_end++;
yy_end >>= 1;
yy_range = yy_end - yy_begin;
yy_level--;
}
xx_level &= 0x1f;
yy_level &= 0x1f;
xx_begin = max(xx_begin, 0);
xx_end = min(xx_end, obj_w << xx_level);
yy_begin = max(yy_begin, 0);
yy_end = min(yy_end, obj_h << yy_level);
float dsum_y = 0.0f;
float dsum_cb = 0.0f;
float dsum_cr = 0.0f;
float dsum_a = 0.0f;
int yy = yy_begin;
while (yy < yy_end) {
int yy_itr = yy >> yy_level;
int sum_y = 0;
int sum_cb = 0;
int sum_cr = 0;
int sum_a = 0;
int xx = xx_begin;
while (xx < xx_end) {
int xx_itr = xx >> xx_level;
int fraction;
if (xx & 0xfff) {
fraction = -xx & 0xfff;
} else {
fraction = min(xx_end - xx, 0x1000);
}
global short* srct = src + (xx_itr + yy_itr * obj_line) * 4;
int src_a = srct[3] * fraction >> 8;
sum_y += srct[0] * src_a >> 16;
sum_cb += srct[1] * src_a >> 16;
sum_cr += srct[2] * src_a >> 16;
sum_a += src_a;
xx += fraction;
}
int fraction;
if (yy & 0xfff) {
fraction = -yy & 0xfff;
} else {
fraction = min(yy_end - yy, 0x1000);
}
float fraction_rate = (float)fraction * 0.000244140625f;
dsum_y += (float)sum_y * fraction_rate;
dsum_cb += (float)sum_cb * fraction_rate;
dsum_cr += (float)sum_cr * fraction_rate;
dsum_a += (float)sum_a * fraction_rate;
yy += fraction;
}
if (256.0f <= dsum_a) {
float inv_a = 65536.0f / dsum_a;
dst[0] = (short)round(dsum_y * inv_a);
dst[1] = (short)round(dsum_cb * inv_a);
dst[2] = (short)round(dsum_cr * inv_a);
dst[3] = (short)round(dsum_a / ((float)yy_range / 1024.0f) / ((float)xx_range / 1024.0f));
} else {
dst[0] = dst[1] = dst[2] = dst[3] = 0;
}
}
kernel void DisplacementMap_rot(global short* dst, global short* src, global short* mem,
int obj_w, int obj_h, int obj_line, int param0, int param1, int ox, int oy){
int x = get_global_id(0);
int y = get_global_id(1);
dst += (x + y * obj_line) * 4;
mem += (x + y * obj_line) * 4;
int xx_min, xx_max, yy_min, yy_max;
int xx_temp, yy_temp;
float xxd = (float)((x << 12) - ox);
float yyd = (float)((y << 12) - oy);
float xxd_next = xxd + 4096.0f;
float yyd_next = yyd + 4096.0f;
float paramrad = (float)param0 * (float)-0.000003067961642955197f;
float rad = (float)(mem[0] - 0x800) * paramrad;
float sinv = sin(rad);
float cosv = cos(rad);
xx_min = xx_max = (int)(xxd * cosv - yyd * sinv);
yy_min = yy_max = (int)(xxd * sinv + yyd * cosv);
rad = (float)(mem[4] - 0x800) * paramrad;
sinv = sin(rad);
cosv = cos(rad);
xx_temp = (int)(xxd_next * cosv - yyd * sinv);
yy_temp = (int)(xxd_next * sinv + yyd * cosv);
xx_min = min(xx_min, xx_temp);
xx_max = max(xx_max, xx_temp);
yy_min = min(yy_min, yy_temp);
yy_max = max(yy_max, yy_temp);
rad = (float)(mem[obj_line * 4] - 0x800) * paramrad;
sinv = sin(rad);
cosv = cos(rad);
xx_temp = (int)(xxd * cosv - yyd_next * sinv);
yy_temp = (int)(xxd * sinv + yyd_next * cosv);
xx_min = min(xx_min, xx_temp);
xx_max = max(xx_max, xx_temp);
yy_min = min(yy_min, yy_temp);
yy_max = max(yy_max, yy_temp);
rad = (float)(mem[(obj_line + 1) * 4] - 0x800) * paramrad;
sinv = sin(rad);
cosv = cos(rad);
xx_temp = (int)(xxd_next * cosv - yyd_next * sinv);
yy_temp = (int)(xxd_next * sinv + yyd_next * cosv);
int xx_begin = min(xx_min, xx_temp) + ox;
int xx_end = max(xx_max, xx_temp) + ox;
int yy_begin = min(yy_min, yy_temp) + oy;
int yy_end = max(yy_max, yy_temp) + oy;
int xx_range = xx_end - xx_begin;
int yy_range = yy_end - yy_begin;
if (xx_range < 0x1000) {
xx_begin += (xx_range - 0x1000) >> 1;
xx_end = xx_begin + 0x1000;
xx_range = 0x1000;
}
if (yy_range < 0x1000) {
yy_begin += (yy_range - 0x1000) >> 1;
yy_end = yy_begin + 0x1000;
yy_range = 0x1000;
}
int xx_level = 12;
int yy_level = 12;
while (0x20000 < xx_range) {
xx_begin >>= 1;
xx_end++;
xx_end >>= 1;
xx_range = xx_end - xx_begin;
xx_level--;
}
while (0x20000 < yy_range) {
yy_begin >>= 1;
yy_end++;
yy_end >>= 1;
yy_range = yy_end - yy_begin;
yy_level--;
}
xx_level &= 0x1f;
yy_level &= 0x1f;
xx_begin = max(xx_begin, 0);
xx_end = min(xx_end, obj_w << xx_level);
yy_begin = max(yy_begin, 0);
yy_end = min(yy_end, obj_h << yy_level);
float dsum_y = 0.0f;
float dsum_cb = 0.0f;
float dsum_cr = 0.0f;
float dsum_a = 0.0f;
int yy = yy_begin;
while (yy < yy_end) {
int yy_itr = yy >> yy_level;
int sum_y = 0;
int sum_cb = 0;
int sum_cr = 0;
int sum_a = 0;
int xx = xx_begin;
while (xx < xx_end) {
int xx_itr = xx >> xx_level;
int fraction;
if (xx & 0xfff) {
fraction = -xx & 0xfff;
} else {
fraction = min(xx_end - xx, 0x1000);
}
global short* srct = src + (xx_itr + yy_itr * obj_line) * 4;
int src_a = srct[3] * fraction >> 8;
sum_y += srct[0] * src_a >> 16;
sum_cb += srct[1] * src_a >> 16;
sum_cr += srct[2] * src_a >> 16;
sum_a += src_a;
xx += fraction;
}
int fraction;
if (yy & 0xfff) {
fraction = -yy & 0xfff;
} else {
fraction = min(yy_end - yy, 0x1000);
}
float fraction_rate = (float)fraction * 0.000244140625f;
dsum_y += (float)sum_y * fraction_rate;
dsum_cb += (float)sum_cb * fraction_rate;
dsum_cr += (float)sum_cr * fraction_rate;
dsum_a += (float)sum_a * fraction_rate;
yy += fraction;
}
if (256.0f <= dsum_a) {
float inv_a = 65536.0f / dsum_a;
dst[0] = (short)round(dsum_y * inv_a);
dst[1] = (short)round(dsum_cb * inv_a);
dst[2] = (short)round(dsum_cr * inv_a);
dst[3] = (short)round(dsum_a / ((float)yy_range / 1024.0f) / ((float)xx_range / 1024.0f));
} else {
dst[0] = dst[1] = dst[2] = dst[3] = 0;
}
}
kernel void RadiationalBlur_Media(
global short* dst, global short* src, int src_w, int src_h, int buffer_line,
int rb_blur_cx, int rb_blur_cy, int rb_obj_cx, int rb_obj_cy, int rb_range, int rb_pixel_range) {
int x = get_global_id(0);
int y = get_global_id(1);
int pixel_itr = x + y * buffer_line;
x += rb_obj_cx;
y += rb_obj_cy;
int cx = rb_blur_cx - x;
int cy = rb_blur_cy - y;
int c_dist_times8 = (int)round(sqrt((float)(cx * cx + cy * cy)) * 8.0f);
int range = rb_range * c_dist_times8 / 1000;
if (rb_pixel_range < c_dist_times8) {
range = rb_pixel_range * rb_range / 1000;
c_dist_times8 = rb_pixel_range;
} else if (8 < c_dist_times8) {
c_dist_times8 *= 8;
range *= 8;
} else if (4 < c_dist_times8) {
c_dist_times8 *= 4;
range *= 4;
} else if (2 < c_dist_times8) {
c_dist_times8 *= 2;
range *= 2;
}
if (2 <= c_dist_times8 && 2 <= range) {
int sum_a = 0;
int sum_cr = 0;
int sum_cb = 0;
int sum_y = 0;
for (int i = 0; i < range; i++) {
int x_itr = x + i * cx / c_dist_times8;
int y_itr = y + i * cy / c_dist_times8;
if (0 <= x_itr && x_itr < src_w && 0 <= y_itr && y_itr < src_h) {
short4 itr = vload4(x_itr + y_itr * buffer_line, src);
int itr_a = itr.w;
sum_a += itr_a;
if (0x1000 < itr_a) {
itr_a = 0x1000;
}
sum_y += itr.x * itr_a / 4096;
sum_cb += itr.y * itr_a / 4096;
sum_cr += itr.z * itr_a / 4096;
}
}
if (sum_a != 0) {
vstore4(
(short4)(
round(sum_y * 4096.0f / sum_a),
round(sum_cb * 4096.0f / sum_a),
round(sum_cr * 4096.0f / sum_a),
sum_a / range
),
pixel_itr, dst
);
} else {
dst[pixel_itr * 4 + 3] = 0;
}
} else {
if (x < 0 || y < 0 || src_w <= x || src_h <= y) {
vstore4((short4)(0, 0, 0, 0), pixel_itr, dst);
} else {
vstore4(vload4(x + y * buffer_line, src), pixel_itr, dst);
}
}
}
kernel void RadiationalBlur_Filter(
global short* dst, global short* src, int buffer_line,
int rb_blur_cx, int rb_blur_cy, int rb_range, int rb_pixel_range) {
int x = get_global_id(0);
int y = get_global_id(1);
int cx = rb_blur_cx - x;
int cy = rb_blur_cy - y;
int c_dist_times8 = (int)round(sqrt((float)(cx * cx + cy * cy)) * 8.0f);
int range = rb_range * c_dist_times8 / 1000;
if (rb_pixel_range < c_dist_times8) {
range = (rb_pixel_range * rb_range) / 1000;
c_dist_times8 = rb_pixel_range;
} else if (8 < c_dist_times8) {
c_dist_times8 *= 8;
range *= 8;
} else if (4 < c_dist_times8) {
c_dist_times8 *= 4;
range *= 4;
} else if (2 < c_dist_times8) {
c_dist_times8 *= 2;
range *= 2;
}
int offset = (x + y * buffer_line) * 3;
if (2 <= c_dist_times8 && 2 <= range) {
int sum_y = 0;
int sum_cb = 0;
int sum_cr = 0;
for (int i = 0; i < range; i++) {
int x_itr = x + i * cx / c_dist_times8;
int y_itr = y + i * cy / c_dist_times8;
int pix_offset = (x_itr + y_itr * buffer_line) * 3;
sum_y += src[pix_offset];
sum_cb += src[++pix_offset];
sum_cr += src[++pix_offset];
}
dst[offset] = (short)(sum_y / range);
dst[++offset] = (short)(sum_cb / range);
dst[++offset] = (short)(sum_cr / range);
} else {
dst[offset] = src[offset];
dst[offset + 1] = src[offset + 1];
dst[offset + 2] = src[offset + 2];
}
}
kernel void RadiationalBlur_Filter_Far(
global short* dst, global short* src, int scene_w, int scene_h, int buffer_line,
int rb_blur_cx, int rb_blur_cy, int rb_range, int rb_pixel_range) {
int x = get_global_id(0);
int y = get_global_id(1);
int cx = rb_blur_cx - x;
int cy = rb_blur_cy - y;
int c_dist_times8 = (int)round(sqrt((float)(cx * cx + cy * cy)) * 8.0f);
int range = rb_range * c_dist_times8 / 1000;
if (rb_pixel_range < c_dist_times8) {
range = (rb_pixel_range * rb_range) / 1000;
c_dist_times8 = rb_pixel_range;
} else if (8 < c_dist_times8) {
c_dist_times8 *= 8;
range *= 8;
} else if (4 < c_dist_times8) {
c_dist_times8 *= 4;
range *= 4;
} else if (2 < c_dist_times8) {
c_dist_times8 *= 2;
range *= 2;
}
int offset = (x + y * buffer_line) * 3;
if (2 <= c_dist_times8 && 2 <= range) {
int sum_y = 0;
int sum_cb = 0;
int sum_cr = 0;
for (int i = 0; i < range; i++) {
int x_itr = x + i * cx / c_dist_times8;
int y_itr = y + i * cy / c_dist_times8;
if (0 <= x_itr && 0 <= y_itr && x_itr < scene_w && y_itr < scene_h) {
int pix_offset = (x_itr + y_itr * buffer_line) * 3;
sum_y += src[pix_offset];
sum_cb += src[++pix_offset];
sum_cr += src[++pix_offset];
}
}
dst[offset] = (short)(sum_y / range);
dst[++offset] = (short)(sum_cb / range);
dst[++offset] = (short)(sum_cr / range);
} else {
dst[offset] = src[offset];
dst[offset + 1] = src[offset + 1];
dst[offset + 2] = src[offset + 2];
}
}
kernel void Flash(global short* dst, global short* src, int src_w, int src_h, int exedit_buffer_line,
int g_cx,
int g_cy,
int g_range,
int g_pixel_range,
int g_temp_x,
int g_temp_y,
int g_r_intensity
) {
int xi = get_global_id(0);
int yi = get_global_id(1);
int x = xi + g_temp_x;
int y = yi + g_temp_y;
int pixel_itr = xi + yi * exedit_buffer_line;
int cx = g_cx - x;
int cy = g_cy - y;
int c_dist_times8 = (int)round(sqrt((float)(cx * cx + cy * cy)) * 8.0f);
int range = g_range * c_dist_times8 / 1000;
if (g_pixel_range < c_dist_times8) {
range = g_pixel_range * g_range / 1000;
c_dist_times8 = g_pixel_range;
} else if (8 < c_dist_times8) {
c_dist_times8 *= 8;
range *= 8;
} else if (4 < c_dist_times8) {
c_dist_times8 *= 4;
range *= 4;
} else if (2 < c_dist_times8) {
c_dist_times8 *= 2;
range *= 2;
}
int sum_y, sum_cb, sum_cr;
if (2 <= c_dist_times8 && 2 <= range) {
sum_y = sum_cb = sum_cr = 0;
for (int i = 0; i < range; i++) {
int x_itr = x + i * cx / c_dist_times8;
int y_itr = y + i * cy / c_dist_times8;
if (0 <= x_itr && 0 <= y_itr && x_itr < src_w && y_itr < src_h) {
short4 itr = vload4(x_itr + y_itr * exedit_buffer_line, src);
if (itr.w != 0) {
if (itr.w < 4096) {
sum_y += itr.x * itr.w / 4096;
sum_cb += itr.y * itr.w / 4096;
sum_cr += itr.z * itr.w / 4096;
} else {
sum_y += itr.x;
sum_cb += itr.y;
sum_cr += itr.z;
}
}
}
}
sum_y /= range;
sum_cb /= range;
sum_cr /= range;
} else {
if (x < 0 || y < 0 || src_w <= x || src_h <= y) {
vstore4((short4)(0, 0, 0, 0), pixel_itr, dst);
return;
} else {
short4 itr = vload4(x + y * exedit_buffer_line, src);
sum_y = itr.x * itr.w / 4096;
sum_cb = itr.y * itr.w / 4096;
sum_cr = itr.z * itr.w / 4096;
}
}
int ya = sum_y - g_r_intensity;
if (ya < 1) {
vstore4((short4)(0, 0, 0, 0), pixel_itr, dst);
} else {
sum_cb -= g_r_intensity * sum_cb / sum_y;
sum_cr -= g_r_intensity * sum_cr / sum_y;
if (ya < 4096) {
vstore4(
(short4)(
4096,
sum_cb * 4096 / ya,
sum_cr * 4096 / ya,
ya
),
pixel_itr, dst
);
} else {
vstore4(
(short4)(
ya,
sum_cb,
sum_cr,
4096
),
pixel_itr, dst
);
}
}
}
kernel void FlashColor(global short* dst, global short* src, int src_w, int src_h, int exedit_buffer_line,
int g_cx,
int g_cy,
int g_range,
int g_pixel_range,
int g_temp_x,
int g_temp_y,
int g_r_intensity,
short g_color_y,
short g_color_cb,
short g_color_cr
) {
int xi = get_global_id(0);
int yi = get_global_id(1);
int x = xi + g_temp_x;
int y = yi + g_temp_y;
int pixel_itr = xi + yi * exedit_buffer_line;
int cx = g_cx - x;
int cy = g_cy - y;
int c_dist_times8 = (int)round(sqrt((float)(cx * cx + cy * cy)) * 8.0f);
int range = g_range * c_dist_times8 / 1000;
if (g_pixel_range < c_dist_times8) {
range = g_pixel_range * g_range / 1000;
c_dist_times8 = g_pixel_range;
} else if (8 < c_dist_times8) {
c_dist_times8 *= 8;
range *= 8;
} else if (4 < c_dist_times8) {
c_dist_times8 *= 4;
range *= 4;
} else if (2 < c_dist_times8) {
c_dist_times8 *= 2;
range *= 2;
}
int itr_y, itr_cb, itr_cr;
if (2 <= c_dist_times8 && 2 <= range) {
int sum_a = 0;
for (int i = 0; i < range; i++) {
int x_itr = x + i * cx / c_dist_times8;
int y_itr = y + i * cy / c_dist_times8;
if (0 <= x_itr && 0 <= y_itr && x_itr < src_w && y_itr < src_h) {
short4 itr = vload4(x_itr + y_itr * exedit_buffer_line, src);
int itr_a = itr.w;
if (itr_a != 0) {
if (itr_a < 4096) {
sum_a += itr_a;
} else {
sum_a += 4096;
}
}
}
}
sum_a /= range;
itr_y = g_color_y * sum_a / 4096;
itr_cb = g_color_cb * sum_a / 4096;
itr_cr = g_color_cr * sum_a / 4096;
} else {
if (x < 0 || y < 0 || src_w <= x || src_h <= y) {
vstore4((short4)(0, 0, 0, 0), pixel_itr, dst);
return;
} else {
short4 itr = vload4(x + y * exedit_buffer_line, src);
int itr_a = itr.w;
itr_y = g_color_y * itr_a / 4096;
itr_cb = g_color_cb * itr_a / 4096;
itr_cr = g_color_cr * itr_a / 4096;
}
}
int ya = itr_y - g_r_intensity;
if (ya < 1) {
vstore4((short4)(0, 0, 0, 0), pixel_itr, dst);
} else {
itr_cb -= g_r_intensity * itr_cb / itr_y;
itr_cr -= g_r_intensity * itr_cr / itr_y;
if (ya < 4096) {
vstore4(
(short4)(
4096,
itr_cb * 4096 / ya,
itr_cr * 4096 / ya,
ya
),
pixel_itr, dst
);
} else {
vstore4(
(short4)(
ya,
itr_cb,
itr_cr,
4096
),
pixel_itr, dst
);
}
}
}
kernel void DirectionalBlur_Media(global short* dst, global short* src, int obj_w, int obj_h, int obj_line,
int x_begin, int x_end, int x_step, int y_begin, int y_end, int y_step, int range) {
int x = get_global_id(0);
int y = get_global_id(1);
int pix_range = range * 2 + 1;
dst += (x + y * obj_line) * 4;
int sum_y = 0;
int sum_cb = 0;
int sum_cr = 0;
int sum_a = 0;
int x_itr = ((x + x_begin) << 16) + 0x8000 - range * x_step;
int y_itr = ((y + y_begin) << 16) + 0x8000 - range * y_step;
for (int n = 0; n < pix_range; n++) {
int xx = x_itr >> 16;
int yy = y_itr >> 16;
if (0 <= xx && xx < obj_w && 0 <= yy && yy < obj_h) {
global short* pix = src + (xx + yy * obj_line) * 4;
int src_a = min((int)pix[3], 0x1000);
sum_y += pix[0] * src_a >> 12;
sum_cb += pix[1] * src_a >> 12;
sum_cr += pix[2] * src_a >> 12;
sum_a += src_a;
}
x_itr += x_step;
y_itr += y_step;
}
if (0 < sum_a) {
float a_float = 4096.0f / (float)sum_a;
dst[0] = (short)round((float)sum_y * a_float);
dst[1] = (short)round((float)sum_cb * a_float);
dst[2] = (short)round((float)sum_cr * a_float);
} else {
dst[0] = dst[1] = dst[2] = 0;
}
dst[3] = (short)(sum_a / pix_range);
}
kernel void DirectionalBlur_original_size(global short* dst, global short* src, int obj_w, int obj_h, int obj_line,
int x_step, int y_step, int range) {
int x = get_global_id(0);
int y = get_global_id(1);
int pix_range = range * 2 + 1;
dst += (x + y * obj_line) * 4;
int x_itr = (x << 16) + 0x8000 - range * x_step;
int y_itr = (y << 16) + 0x8000 - range * y_step;
int sum_y = 0;
int sum_cb = 0;
int sum_cr = 0;
int sum_a = 0;
int cnt = 0;
for (int n = 0; n < pix_range; n++) {
int xx = x_itr >> 16;
int yy = y_itr >> 16;
if (0 <= xx && xx < obj_w && 0 <= yy && yy < obj_h) {
global short* pix = src + (xx + yy * obj_line) * 4;
int src_a = min((int)pix[3], 0x1000);
sum_y += pix[0] * src_a >> 12;
sum_cb += pix[1] * src_a >> 12;
sum_cr += pix[2] * src_a >> 12;
sum_a += src_a;
cnt++;
}
x_itr += x_step;
y_itr += y_step;
}
if(cnt == 0) cnt = 0xffffff;
if (0 < sum_a) {
float a_float = 4096.0f / (float)sum_a;
dst[0] = (short)round((float)sum_y * a_float);
dst[1] = (short)round((float)sum_cb * a_float);
dst[2] = (short)round((float)sum_cr * a_float);
} else {
dst[0] = dst[1] = dst[2] = 0;
}
dst[3] = (short)(sum_a / cnt);
}
kernel void DirectionalBlur_Filter(global short* dst, global short* src, int scene_w, int scene_h, int scene_line,
int x_step, int y_step, int range) {
int x = get_global_id(0);
int y = get_global_id(1);
int pix_range = range * 2 + 1;
dst += (x + y * scene_line) * 3;
int x_itr = (x << 16) + 0x8000 - range * x_step;
int y_itr = (y << 16) + 0x8000 - range * y_step;
int sum_y = 0;
int sum_cb = 0;
int sum_cr = 0;
int cnt = 0;
for (int n = 0; n < pix_range; n++) {
int xx = x_itr >> 16;
int yy = y_itr >> 16;
if (0 <= xx && xx < scene_w && 0 <= yy && yy < scene_h) {
global short* pix = src + (xx + yy * scene_line) * 3;
sum_y += pix[0];
sum_cb += pix[1];
sum_cr += pix[2];
cnt++;
}
x_itr += x_step;
y_itr += y_step;
}
if(cnt == 0) cnt = 0xffffff;
dst[0] = (short)(sum_y / cnt);
dst[1] = (short)(sum_cb / cnt);
dst[2] = (short)(sum_cr / cnt);
}
kernel void LensBlur_Media(global char* dst, global char* src, int obj_w, int obj_h, int obj_line,
int range, int rangep05_sqr, int range_t3m1, int rangem1_sqr) {
int x = get_global_id(0);
int y = get_global_id(1);
int top = -min(y, range);
int bottom = min(obj_h - y - 1, range);
int left = -min(x, range);
int right = min(obj_w - x - 1, range);
float sum_y = 0.0f;
int sum_cb = 0;
int sum_cr = 0;
int sum_a = 0;
int cor_sum = 0;
int offset = (x + left + (y + top) * obj_line) * 8;
for (int yy = top; yy <= bottom; yy++) {
int sqr = yy * yy + left * left;
int offset2 = offset;
for (int xx = left; xx <= right; xx++) {
if (sqr < rangep05_sqr) {
int cor_a;
if (rangem1_sqr < sqr) {
cor_a = ((rangep05_sqr - sqr) << 12) / range_t3m1;
} else {
cor_a = 4096;
}
cor_sum += cor_a;
cor_a = *(global short*)&src[offset2 + 6] * cor_a >> 12;
sum_y += *(global float*)&src[offset2] * (float)cor_a;
sum_cb += src[offset2 + 4] * cor_a;
sum_cr += src[offset2 + 5] * cor_a;
sum_a += cor_a;
}
sqr += 1 + xx * 2;
offset2 += 8;
}
offset += obj_line * 8;
}
dst += (x + y * obj_line) * 8;
if (0 < sum_a) {
*(global float*)dst = sum_y / (float)sum_a;
dst[4] = (char)(((sum_a >> 1) + sum_cb) / sum_a);
dst[5] = (char)(((sum_a >> 1) + sum_cr) / sum_a);
*(global short*)&dst[6] = (short)round((float)sum_a * (4096.0f / (float)cor_sum));
} else {
*(global int*)dst = 0;
*(global int*)&dst[4] = 0;
}
}
kernel void LensBlur_Filter(global char* dst, global char* src, int scene_w, int scene_h, int scene_line,
int range, int rangep05_sqr, int range_t3m1, int rangem1_sqr) {
int x = get_global_id(0);
int y = get_global_id(1);
int top = -min(y, range);
int bottom = min(scene_h - y - 1, range);
int left = -min(x, range);
int right = min(scene_w - x - 1, range);
short tofloat[2];
float sum_y = 0.0f;
int sum_cb = 0;
int sum_cr = 0;
int sum_a = 0;
int offset = (x + left + (y + top) * scene_line) * 6;
for (int yy = top; yy <= bottom; yy++) {
int sqr = yy * yy + left * left;
int offset2 = offset;
for (int xx = left; xx <= right; xx++) {
if (sqr < rangep05_sqr) {
int cor_a;
if (rangem1_sqr < sqr) {
cor_a = ((rangep05_sqr - sqr) << 12) / range_t3m1;
} else {
cor_a = 4096;
}
tofloat[0] = *(global short*)&src[offset2];
tofloat[1] = *(global short*)&src[offset2 + 2];
sum_y += *(float*)tofloat * (float)cor_a;
sum_cb += src[offset2 + 4] * cor_a;
sum_cr += src[offset2 + 5] * cor_a;
sum_a += cor_a;
}
sqr += 1 + xx * 2;
offset2 += 6;
}
offset += scene_line * 6;
}
dst += (x + y * scene_line) * 6;
*(float*)tofloat = sum_y / (float)sum_a;
*(global short*)&dst[0] = tofloat[0];
*(global short*)&dst[2] = tofloat[1];
dst[4] = (char)(((sum_a >> 1) + sum_cb) / sum_a);
dst[5] = (char)(((sum_a >> 1) + sum_cr) / sum_a);
}
================================================
FILE: patch/config.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <Windows.h>
#include <boost/scope_exit.hpp>
#include "macro.h"
#include "util_resource.hpp"
#include "config_rw.hpp"
#include "patch.hpp"
class Config2 {
bool invalid_json;
public:
void load(std::wstring_view path) {
auto hFile = CreateFileW(path.data(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
if (hFile == INVALID_HANDLE_VALUE) return;
DWORD ignore;
auto size_low = GetFileSize(hFile, &ignore);
auto file = std::make_unique<byte[]>(size_low);
if (ReadFile(hFile, file.get(), size_low, &ignore, NULL) == FALSE) {
patch_resource_message_stack.emplace_back(new patch_resource_message_class_w(PATCH_RS_PATCH_FAILED_TO_LOAD_SETTING, MB_TASKMODAL | MB_ICONEXCLAMATION));
return;
}
CloseHandle(hFile);
json_value_s* root = nullptr;
BOOST_SCOPE_EXIT_ALL(&root) { free(root); };
root = json_parse(file.get(), size_low);
if (root == nullptr) {
patch_resource_message_stack.emplace_back(new patch_resource_message_class_w(PATCH_RS_PATCH_INVALID_SETTING_JSON, MB_TASKMODAL | MB_ICONEXCLAMATION));
invalid_json = true;
return;
}
ConfigReader cr(root);
cr.regist("switch", [](json_value_s* value) {
ConfigReader cr(value);
#ifdef PATCH_SWITCH_ACCESS_KEY
patch::access_key.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_COLORPALETTE_CACHE
patch::colorpalette_cache.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FILEINFO
patch::fileinfo.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_SUSIE_LOAD
patch::susie_load.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_SPLASH
patch::splash.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_AUP_SCENE_SETTING
patch::aup_scene_setting.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_AUP_LAYER_SETTING
patch::aup_layer_setting.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_EXO_AVIUTL_FILTER
patch::exo_aviutlfilter.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_EXO_SCENEIDX
patch::exo_sceneidx.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_EXO_TRACKPARAM
patch::exo_trackparam.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_EXO_TRACK_MINUSVAL
patch::exo_trackminusval.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_EXO_MIDPT_AND_TRA
patch::exo_midpt_and_tra.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_EXO_SPECIALCOLORCONV
patch::exo_specialcolorconv.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_EXO_FOLD_GUI
patch::exo_fold_gui.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_TRA_AVIUTL_FILTER
patch::tra_aviutlfilter.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_TRA_CHANGE_DRAWFILTER
patch::tra_change_drawfilter.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_TRA_SPECIFIED_SPEED
patch::tra_specified_speed.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_SETTING_NEW_PROJECT
patch::setting_new_project.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_TEXT_OP_SIZE
patch::text_op_size.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_IGNORE_MEDIA_PARAM_RESET
patch::ignore_media_param_reset.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FONT_DIALOG
patch::font_dialog.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_SCROLL_OBJDLG
patch::scroll_objdlg.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_ALPHA_BG
patch::alpha_bg.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_HELPFUL_MSGBOX
patch::helpful_msgbox.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAILED_SJIS_MSGBOX
patch::failed_sjis_msgbox.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAILED_LONGER_PATH
patch::failed_longer_path.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAILED_FILE_DROP
patch::failed_file_drop.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_THEME_CC
patch::theme_cc.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_EXEDITWINDOW_SIZING
patch::exeditwindow_sizing.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_SETTINGDIALOG_MOVE
patch::setting_dialog_move.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_OBJ_COLORCORRECTION
patch::ColorCorrection.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_OBJ_GLOW
patch::Glow.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_OBJ_LENSBLUR
patch::LensBlur.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_OBJ_NOISE
patch::Noise.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_OBJ_SPECIALCOLORCONV
patch::obj_specialcolorconv.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_SETTINGDIALOG_EXCOLORCONFIG
patch::excolorconfig.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_RCLICKMENU_SPLIT
patch::rclickmenu_split.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_RCLICKMENU_DELETE
patch::rclickmenu_delete.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_BLEND
patch::blend.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_ADD_EXTENSION
patch::add_extension.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_DIALOG_NEW_FILE
patch::dialog_new_file.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_PLAYBACK_SPEED
patch::playback_speed.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_UNDO
patch::undo.switch_load(cr);
#ifdef PATCH_SWITCH_UNDO_REDO
patch::redo.switch_load(cr);
#endif
#endif
#ifdef PATCH_SWITCH_CONSOLE
patch::console.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_LUA
patch::lua.switch_load(cr);
#ifdef PATCH_SWITCH_LUA_GETVALUE
patch::lua_getvalueex.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_LUA_RAND
patch::lua_rand.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_LUA_RANDEX
patch::lua_randex.switch_load(cr);
#endif
#endif
#ifdef PATCH_SWITCH_FAST
patch::fast::fast.switch_load(cr);
#ifdef PATCH_SWITCH_FAST_EXEDITWINDOW
patch::fast_exeditwindow.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_SETTINGDIALOG
patch::fast_setting_dialog.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_TEXT
patch::fast::text.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_CREATE_FIGURE
patch::fast::create_figure.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_BORDER
patch::fast::Border.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_GLOW
patch::fast::Glow.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_CL
patch::fast::cl.switch_load(cr);
#ifdef PATCH_SWITCH_FAST_RADIATIONALBLUR
patch::fast::RadiationalBlur.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_POLORTRANSFORM
patch::fast::PolorTransform.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_DISPLACEMENTMAP
patch::fast::DisplacementMap.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_FLASH
patch::fast::Flash.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_DIRECTIONALBLUR
patch::fast::DirectionalBlur.switch_load(cr);
#endif
#ifdef PATCH_SWITCH_FAST_LENSBLUR
patch::fast::LensBlur.switch_load(cr);
#endif
#endif
#endif
cr.load();
});
#ifdef PATCH_SWITCH_CONSOLE
cr.regist("console", [](json_value_s* value) {
ConfigReader cr(value);
patch::console.config_load(cr);
cr.load();
});
#endif
#ifdef PATCH_SWITCH_THEME_CC
cr.regist("theme_cc", [](json_value_s* value) {
ConfigReader cr(value);
patch::theme_cc.config_load(cr);
cr.load();
});
#endif
#ifdef PATCH_SWITCH_UNDO_REDO
cr.regist("redo", [](json_value_s* value) {
ConfigReader cr(value);
patch::redo.config_load(cr);
cr.load();
});
#endif
#ifdef PATCH_SWITCH_FAST_EXEDITWINDOW
cr.regist("fast_exeditwindow", [](json_value_s* value) {
ConfigReader cr(value);
patch::fast_exeditwindow.config_load(cr);
cr.load();
});
#endif
#ifdef PATCH_SWITCH_FAST_TEXT
cr.regist("fast_text", [](json_value_s* value) {
ConfigReader cr(value);
patch::fast::text.config_load(cr);
cr.load();
});
#endif
cr.load();
}
void store(std::wstring_view path) {
if (invalid_json)return;
auto hFile = CreateFileW(path.data(), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
patch_resource_message_w(PATCH_RS_PATCH_FAILED_TO_SAVE_SETTING, MB_TASKMODAL | MB_ICONEXCLAMATION);
return;
}
BOOST_SCOPE_EXIT_ALL(&hFile) {
CloseHandle(hFile);
};
int level = 0;
ConfigWriter cw(level);
#ifdef PATCH_SWITCH_CONSOLE
{
ConfigWriter console(++level);
patch::console.config_store(console);
std::stringstream ss;
console.write(ss);
cw.append("console", ss.str());
--level;
}
#endif
#ifdef PATCH_SWITCH_THEME_CC
{
ConfigWriter theme_cc(++level);
patch::theme_cc.config_store(theme_cc);
std::stringstream ss;
theme_cc.write(ss);
cw.append("theme_cc", ss.str());
--level;
}
#endif
#ifdef PATCH_SWITCH_UNDO_REDO
{
ConfigWriter redo(++level);
patch::redo.config_store(redo);
std::stringstream ss;
redo.write(ss);
cw.append("redo", ss.str());
--level;
}
#endif
#ifdef PATCH_SWITCH_FAST_EXEDITWINDOW
{
ConfigWriter fast_exeditwindow(++level);
patch::fast_exeditwindow.config_store(fast_exeditwindow);
std::stringstream ss;
fast_exeditwindow.write(ss);
cw.append("fast_exeditwindow", ss.str());
--level;
}
#endif
#ifdef PATCH_SWITCH_FAST_TEXT
{
ConfigWriter fast_text(++level);
patch::fast::text.config_store(fast_text);
std::stringstream ss;
fast_text.write(ss);
cw.append("fast_text", ss.str());
--level;
}
#endif
{
ConfigWriter switch_(++level);
#ifdef PATCH_SWITCH_ACCESS_KEY
patch::access_key.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_COLORPALETTE_CACHE
patch::colorpalette_cache.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FILEINFO
patch::fileinfo.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_SUSIE_LOAD
patch::susie_load.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_SPLASH
patch::splash.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_AUP_SCENE_SETTING
patch::aup_scene_setting.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_AUP_LAYER_SETTING
patch::aup_layer_setting.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_EXO_AVIUTL_FILTER
patch::exo_aviutlfilter.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_EXO_SCENEIDX
patch::exo_sceneidx.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_EXO_TRACKPARAM
patch::exo_trackparam.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_EXO_TRACK_MINUSVAL
patch::exo_trackminusval.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_EXO_MIDPT_AND_TRA
patch::exo_midpt_and_tra.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_EXO_SPECIALCOLORCONV
patch::exo_specialcolorconv.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_EXO_FOLD_GUI
patch::exo_fold_gui.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_TRA_AVIUTL_FILTER
patch::tra_aviutlfilter.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_TRA_CHANGE_DRAWFILTER
patch::tra_change_drawfilter.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_TRA_SPECIFIED_SPEED
patch::tra_specified_speed.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_SETTING_NEW_PROJECT
patch::setting_new_project.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_TEXT_OP_SIZE
patch::text_op_size.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_IGNORE_MEDIA_PARAM_RESET
patch::ignore_media_param_reset.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FONT_DIALOG
patch::font_dialog.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_SCROLL_OBJDLG
patch::scroll_objdlg.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_ALPHA_BG
patch::alpha_bg.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_HELPFUL_MSGBOX
patch::helpful_msgbox.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAILED_SJIS_MSGBOX
patch::failed_sjis_msgbox.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAILED_LONGER_PATH
patch::failed_longer_path.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAILED_FILE_DROP
patch::failed_file_drop.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_THEME_CC
patch::theme_cc.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_EXEDITWINDOW_SIZING
patch::exeditwindow_sizing.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_SETTINGDIALOG_MOVE
patch::setting_dialog_move.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_OBJ_COLORCORRECTION
patch::ColorCorrection.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_OBJ_GLOW
patch::Glow.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_OBJ_LENSBLUR
patch::LensBlur.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_OBJ_NOISE
patch::Noise.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_OBJ_SPECIALCOLORCONV
patch::obj_specialcolorconv.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_SETTINGDIALOG_EXCOLORCONFIG
patch::excolorconfig.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_RCLICKMENU_SPLIT
patch::rclickmenu_split.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_RCLICKMENU_DELETE
patch::rclickmenu_delete.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_BLEND
patch::blend.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_ADD_EXTENSION
patch::add_extension.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_DIALOG_NEW_FILE
patch::dialog_new_file .switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_PLAYBACK_SPEED
patch::playback_speed.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_UNDO
patch::undo.switch_store(switch_);
#ifdef PATCH_SWITCH_UNDO_REDO
patch::redo.switch_store(switch_);
#endif
#endif
#ifdef PATCH_SWITCH_CONSOLE
patch::console.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_LUA
patch::lua.switch_store(switch_);
#ifdef PATCH_SWITCH_LUA_GETVALUE
patch::lua_getvalueex.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_LUA_RAND
patch::lua_rand.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_LUA_RANDEX
patch::lua_randex.switch_store(switch_);
#endif
#endif
#ifdef PATCH_SWITCH_FAST
patch::fast::fast.switch_store(switch_);
#ifdef PATCH_SWITCH_FAST_EXEDITWINDOW
patch::fast_exeditwindow.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_SETTINGDIALOG
patch::fast_setting_dialog.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_TEXT
patch::fast::text.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_CREATE_FIGURE
patch::fast::create_figure.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_BORDER
patch::fast::Border.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_GLOW
patch::fast::Glow.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_CL
patch::fast::cl.switch_store(switch_);
#ifdef PATCH_SWITCH_FAST_RADIATIONALBLUR
patch::fast::RadiationalBlur.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_POLORTRANSFORM
patch::fast::PolorTransform.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_DISPLACEMENTMAP
patch::fast::DisplacementMap.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_FLASH
patch::fast::Flash.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_DIRECTIONALBLUR
patch::fast::DirectionalBlur.switch_store(switch_);
#endif
#ifdef PATCH_SWITCH_FAST_LENSBLUR
patch::fast::LensBlur.switch_store(switch_);
#endif
#endif
#endif
std::stringstream ss;
switch_.write(ss);
cw.append("switch", ss.str());
--level;
}
std::stringstream ss;
cw.write(ss);
auto s = ss.str();
DWORD ignore;
WriteFile(hFile, s.c_str(), s.size(), &ignore, nullptr);
}
};
inline Config2 config2;
================================================
FILE: patch/config_rw.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <string>
#include <string_view>
#include <sstream>
#include <vector>
#include <utility>
#include <array>
#include <unordered_map>
#include <functional>
#include <optional>
#include <charconv>
#include "json.h"
#include "util_others.hpp"
namespace config_type {
struct ColorBGR {
union {
struct {
uint8_t b, g, r;
uint8_t valid;
};
uint32_t val;
};
ColorBGR() : val{} {}
ColorBGR(uint32_t x) : val(x) {
val = x;
valid = 1;
}
ColorBGR(int b, int g, int r) :b(b), g(g), r(r), valid(1) {}
ColorBGR(std::string_view x) {
if (x.size() < 6) {
b = g = r = valid = 0;
return;
}
auto itr = x.data();
std::from_chars(itr, itr + 2, r, 16);
itr += 2;
std::from_chars(itr, itr + 2, g, 16);
itr += 2;
std::from_chars(itr, itr + 2, b, 16);
valid = 1;
}
inline static ColorBGR from_rgb(uint32_t x) {
if (std::is_constant_evaluated()) {
return (x >> 16 & 0xff) || (x & 0xff00) || (x << 16 & 0xff0000);
}
else {
return _byteswap_ulong(x << 8);
}
}
constexpr uint32_t to_col() const noexcept {
return val & 0xffffff;
}
constexpr uint32_t to_col_rgb() const noexcept {
if (std::is_constant_evaluated()) {
return b << 16 | g << 8 | r;
}
else {
return _byteswap_ulong(val) >> 8;
}
}
std::string to_string() const {
return "{:02x}{:02x}{:02x}"_fmt(r, g, b);
}
std::string to_jsonstring() const {
if(valid) return "\"{:02x}{:02x}{:02x}\""_fmt(r, g, b);
return std::string{};
}
constexpr bool is_valid() const noexcept {
return valid;
}
bool operator==(ColorBGR x) const {
if (this->valid) {
if (!x.valid)return false;
else return (this->val & 0xffffff) == (x.val & 0xffffff);
}
else return !x.valid;
}
};
// ColorBGR2つの配列、またはColorBGR1つ、またはnulloptを表す
// [ "ffffff", "ffffff" ] や ["ffffff"]、"ffffff" など
struct ColorBGR2_Opt {
std::array<ColorBGR, 2> ary{};
ColorBGR2_Opt() : ary{} {}
ColorBGR2_Opt(ColorBGR c1, ColorBGR c2) : ary{ c1,c2 } {}
inline void load(json_value_s* value) {
if (auto js = json_value_as_string(value)) {
ary[0] = std::string_view(js->string, js->string_size);
ary[1].valid = 0;
}
else if (auto ja = json_value_as_array(value)) {
if (ja->length == 0) {
ary[0].valid = 0;
}
else if (ja->length == 1) {
if (auto js = json_value_as_string(ja->start->value)) {
ary[0] = std::string_view(js->string, js->string_size);
ary[1].valid = 0;
}
}
else {
auto v = ja->start;
bool valid = true;
for (size_t i = 0; i < 2; i++) {
if (auto js = json_value_as_string(v->value)) {
ary[i] = std::string_view(js->string, js->string_size);
if (!ary[i].is_valid()) {
valid = false;
break;
}
}
v = v->next;
}
if (!valid) ary[0].valid = 0;
}
}
}
std::string to_jsonstring() const {
if (ary[0].is_valid()) {
if (ary[1].is_valid())
return "[ {}, {} ]"_fmt(ary[0].to_jsonstring(), ary[1].to_jsonstring());
else
return ary[0].to_jsonstring();
}
return std::string{};
}
constexpr bool has_value() const {
return ary[0].is_valid();
}
constexpr int count() const {
if (!ary[0].is_valid()) return 0;
return 1 + ary[1].is_valid();
}
};
// ColorBGRを2つ持つかnullopt
struct ColorBGR2 {
std::array<ColorBGR, 2> ary;
ColorBGR2() : ary{} {}
ColorBGR2(ColorBGR c1, ColorBGR c2) : ary{ c1,c2 } {}
inline void load(json_value_s* value) {
if (auto ja = json_value_as_array(value)) {
if (ja->length > 1) {
auto v = ja->start;
bool valid = true;
for (size_t i = 0; i < 2; i++) {
if (auto js = json_value_as_string(v->value)) {
ary[i] = std::string_view(js->string, js->string_size);
if (!ary[i].is_valid()) {
valid = false;
break;
}
}
v = v->next;
}
if (!valid) ary[0].valid = 0;
}
}
}
std::string to_jsonstring() const {
if (ary[0].is_valid())
return "[ {}, {} ]"_fmt(ary[0].to_jsonstring(), ary[1].to_jsonstring());
return std::string{};
}
constexpr bool has_value() const {
return ary[0].is_valid();
}
constexpr int count() const {
if (!ary[0].is_valid()) return 0;
return 1 + ary[1].is_valid();
}
};
struct ColorBGR3 {
std::array<ColorBGR, 3> ary;
ColorBGR3() : ary{} {}
ColorBGR3(ColorBGR c1, ColorBGR c2, ColorBGR c3) : ary{ c1,c2,c3 } {}
inline void load(json_value_s* value) {
if (auto ja = json_value_as_array(value)) {
if (ja->length > 2) {
auto v = ja->start;
bool valid = true;
for (size_t i = 0; i < 3; i++) {
if (auto js = json_value_as_string(v->value)) {
ary[i] = std::string_view(js->string, js->string_size);
if (!ary[i].is_valid()) {
valid = false;
break;
}
}
v = v->next;
}
if (!valid) ary[0].valid = 0;
}
}
}
constexpr bool has_value() const {
return ary[0].is_valid();
}
std::string to_jsonstring() const {
if (has_value())
return "[ {}, {}, {} ]"_fmt(ary[0].to_jsonstring(), ary[1].to_jsonstring(), ary[2].to_jsonstring());
return std::string{};
}
};
}
template<class T>
concept ConfigWriterHasToJsonString = requires (T x) {
x.to_jsonstring();
};
inline std::string mytostring(int x) {
std::string ret(std::numeric_limits<int>::digits10 + 2, '\0');
std::to_chars(ret.data(), ret.data() + ret.size(), x);
ret.resize(ret.find_first_of('\0'));
return ret;
}
inline std::string mytostring(double x) {
std::string ret(std::numeric_limits<double>::max_exponent10 + 9, '\0');
std::to_chars(ret.data(), ret.data() + ret.size(), x);
ret.resize(ret.find_first_of('\0'));
return ret;
}
template<class T>
concept ConfigWriterCanToChars = requires(T x) {
mytostring(x);
};
template<class T>
concept ConfigReaderHasLoad = requires(T x) {
x.load(std::declval<json_value_s*>());
};
class ConfigWriter {
std::stringstream ss;
struct KeyAndValue {
std::string key, value;
};
std::vector<KeyAndValue> vkv;
int level;
inline static void WriteLevel(std::stringstream& ss, int level) {
for (int i = 0; i < level; i++) ss << '\t';
}
// {\n を書く
inline static void WriteBlockBegin(std::stringstream& ss) {
ss << "{\n";
}
// } を書く
inline static void WriteBlockEnd(std::stringstream& ss) {
ss << "}";
}
// [["key" : ]] を書く
inline static void WriteKey(std::stringstream& ss, std::string_view key) {
ss << "\"" << key << "\" : ";
}
template <bool comma = false>
inline static void WriteReturn(std::stringstream& ss) {
if constexpr (comma) ss << ",\n";
else ss << "\n";
}
public:
ConfigWriter(int level) : level(level) {}
void append(std::string_view key, std::string_view value) {
if(value.size() && value[0] != '\0') vkv.emplace_back(std::string(key), std::string(value));
}
template<ConfigWriterHasToJsonString T>
void append(std::string_view key, const T& value) {
auto result = value.to_jsonstring();
if(result[0] != '\0') vkv.emplace_back(std::string(key), result);
}
void append(std::string_view key, bool value) {
vkv.emplace_back(std::string(key), value ? "true" : "false");
}
void append(std::string_view key, const RECT& value) {
vkv.emplace_back(std::string(key), "[ {}, {}, {}, {} ]"_fmt(value.left, value.top, value.right, value.bottom));
}
template<size_t N>
void append(std::string_view key, const std::array<int, N>& value) {
if (value.size() > 0) {
std::stringstream ss;
ss << "[ ";
const auto last = value.size() - 1;
for (size_t i = 0; i < last; i++) {
ss << value[i] << ", ";
}
ss << value[last] << " ]";
vkv.emplace_back(std::string(key), ss.str());
}
else {
vkv.emplace_back(std::string(key), "[]");
}
}
template<ConfigWriterCanToChars T>
void append(std::string_view key, const T& value) {
vkv.emplace_back(std::string(key), mytostring(value));
}
template<class T>
void append(std::string_view key, const std::optional<T>& value) {
if (value) {
append(key, *value);
}
}
void write(std::stringstream& ss) const {
auto s = vkv.size();
if (s == 0)return;
WriteBlockBegin(ss);
for (size_t i = 0; i < s - 1; i++) {
WriteLevel(ss, level + 1);
WriteKey(ss, vkv[i].key);
ss << vkv[i].value;
WriteReturn<true>(ss);
}
WriteLevel(ss, level + 1);
WriteKey(ss, vkv[s - 1].key);
ss << vkv[s - 1].value;
WriteReturn<false>(ss);
WriteLevel(ss, level);
WriteBlockEnd(ss);
}
int get_level() const { return level; }
};
class ConfigReader {
json_value_s* value;
using RegisterFunction = std::function<void(json_value_s*)>;
using MapType = std::unordered_map<std::string, RegisterFunction>;
MapType map;
public:
ConfigReader(json_value_s* value) : value(value) {}
void load() {
auto obj = json_value_as_object(value);
if (obj == nullptr)return;
for (auto elm = obj->start; elm != nullptr; elm = elm->next) {
if (auto itr = map.find(elm->name->string); itr != map.end()) {
itr->second(elm->value);
}
}
}
template<class T>
void regist(const std::string& str, T func) {
map.try_emplace(str, func);
}
inline static bool load_variable(json_value_s* jv, bool& value) {
if (json_value_is_false(jv)) {
value = false;
return true;
}
else if (json_value_is_true(jv)) {
value = true;
return true;
}
return false;
}
template<std::integral Int>
inline static bool load_variable(json_value_s* jv, Int& value) {
if (auto n = json_value_as_number(jv); n) {
Int ret{};
std::from_chars(n->number, n->number + n->number_size, ret);
value = ret;
return true;
}
return false;
}
template<std::floating_point Float>
inline static bool load_variable(json_value_s* jv, Float& value) {
if (auto n = json_value_as_number(jv); n) {
Float ret;
std::from_chars(n->number, n->number + n->number_size, ret);
value = ret;
return true;
}
return false;
}
inline static void load_variable(json_value_s* jv, config_type::ColorBGR& value) {
if (auto s = json_value_as_string(jv); s) {
value = config_type::ColorBGR(std::string_view(s->string, s->string_size));
}
else {
value.valid = 0;
}
}
inline static void load_variable(json_value_s* jv, std::optional<RECT>& value) {
if (auto ja = json_value_as_array(jv); ja) {
if (ja->length >= 4) {
auto itr = ja->start;
std::array<LONG, 4> buf;
for (size_t i = 0; i < 4; i++, itr = itr->next) {
if (auto jn = json_value_as_number(itr->value); jn) {
std::from_chars(jn->number, jn->number + jn->number_size, buf[i]);
}
else {
value = std::nullopt;
return;
}
}
value.emplace(RECT{
.left = buf[0],
.top = buf[1],
.right = buf[2],
.bottom = buf[3]
});
}
else {
value = std::nullopt;
}
}
else {
value = std::nullopt;
}
}
template<size_t N>
inline static void load_variable(json_value_s* jv, std::optional<std::array<int, N>>& value) {
if (auto ja = json_value_as_array(jv); ja) {
if (ja->length >= N) {
auto itr = ja->start;
std::array<int, N> buf;
for (size_t i = 0; i < N; i++, itr = itr->next) {
if (auto jn = json_value_as_number(itr->value); jn) {
std::from_chars(jn->number, jn->number + jn->number_size, buf[i]);
}
else {
value = std::nullopt;
return;
}
}
value = buf;
}
else {
value = std::nullopt;
return;
}
}
else {
int buf;
if (auto jn = json_value_as_number(jv); jn) {
std::from_chars(jn->number, jn->number + jn->number_size, buf);
}
else {
value = std::nullopt;
return;
}
value.emplace();
auto& v = value.value();
for (size_t i = 0; i < N; i++) {
v[i] = buf;
}
return;
}
}
template<ConfigReaderHasLoad T>
inline static void load_variable(json_value_s* jv, T& value) {
value.load(jv);
}
template<class T>
inline static void load_variable(json_value_s* jv, std::optional<T>& value) {
T t;
if (load_variable(jv, t)) {
value.emplace(std::move(t));
}
else {
value = std::nullopt;
}
}
};
================================================
FILE: patch/cryptostring.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <cstdint>
#include <bit>
#include <vector>
#include <array>
#include <concepts>
/// <summary>
/// バイナリに生の文字列を残さないためのクラス
/// </summary>
template <class CharT, size_t N>
class cryptostring {
template<class CharT> struct KeyV {};
template<> struct KeyV<char> { inline static constexpr char value = 0b00101101i8; };
template<> struct KeyV<wchar_t> { inline static constexpr wchar_t value = 0b1001010110001100i16; };
template<std::integral T>
[[nodiscard]] constexpr static T bit_rotate_l(const T x, size_t a) {
auto ux = std::bit_cast<std::make_unsigned_t<T>>(x);
return std::bit_cast<T>(std::rotl(ux, a));
}
template<std::integral T>
[[nodiscard]] constexpr static T bit_rotate_r(const T x, size_t a) {
auto ux = std::bit_cast<std::make_unsigned_t<T>>(x);
return std::bit_cast<T>(std::rotr(ux, a));
}
std::array<CharT, N> ary;
bool decrypted = false;
public:
constexpr cryptostring(const CharT(&str)[N]) {
for (size_t i = 0; i < N; i++) ary[i] = str[i] ^ bit_rotate_l(KeyV<CharT>::value, (i * 3) % (CHAR_BIT * sizeof(CharT)));
}
[[nodiscard]] CharT* get() {
if (!decrypted) [[unlikely]] {
for (size_t i = 0; i < N; i++) ary[i] ^= bit_rotate_l(KeyV<CharT>::value, (i * 3) % (CHAR_BIT * sizeof(CharT)));
decrypted = true;
}
return ary.data();
}
void re_encrypt() {
if (decrypted) [[likely]] {
for (size_t i = 0; i < N; i++) ary[i] ^= bit_rotate_l(KeyV<CharT>::value, (i * 3) % (CHAR_BIT * sizeof(CharT)));
decrypted = false;
}
}
};
template <class CharT, size_t N>
inline constexpr cryptostring<CharT, N> make_cryptostring(const CharT(&str)[N]) {
return cryptostring<CharT, N>(str);
}
inline cryptostring cstr_kernel32_dll("KERNEL32.DLL");
inline cryptostring cstr_user32_dll("USER32.DLL");
inline cryptostring cstr_EnumResourceLanguagesA("EnumResourceLanguagesA");
inline cryptostring cstr_LoadLibraryA("LoadLibraryA");
inline cryptostring cstr_LoadLibraryW("LoadLibraryW");
inline cryptostring cstr_MessageBoxA("MessageBoxA");
inline cryptostring cstr_gdi32_dll("GDI32.DLL");
inline cryptostring cstr_GetGlyphOutlineW("GetGlyphOutlineW");
inline cryptostring cstr_DeleteObject("DeleteObject");
inline cryptostring cstr_CreateFontIndirectW("CreateFontIndirectW");
inline cryptostring cstr_GetModuleHandleA("GetModuleHandleA");
inline cryptostring cstr_GetModuleHandleW("GetModuleHandleW");
inline cryptostring cstr_Module32First("Module32First");
inline cryptostring cstr_Module32FirstW("Module32FirstW");
inline cryptostring cstr_Module32Next("Module32Next");
inline cryptostring cstr_Module32NextW("Module32NextW");
================================================
FILE: patch/debug_log.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <iostream>
#include <mutex>
#include "util_others.hpp"
inline class debug_log_t {
private:
std::mutex mtx;
public:
template<class T>
void operator()(const T& v) {
std::lock_guard lock(mtx);
std::cout << v << std::endl;
}
template<class... Args>
void operator()(Args... args) {
std::lock_guard lock(mtx);
format_to_os(std::cout, args...);
std::endl(std::cout);
}
} debug_log;
================================================
FILE: patch/gate.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <mutex>
#include <condition_variable>
class Gate {
std::mutex mtx;
std::condition_variable cond;
bool flag;
public:
Gate() :mtx{}, cond{}, flag{} {}
Gate(bool opened) :mtx{}, cond{}, flag{opened} {}
void open() {
{
std::lock_guard lock(mtx);
flag = true;
}
cond.notify_one();
}
void wait() {
std::unique_lock lock(mtx);
cond.wait(lock, [this] { return flag; });
flag = false;
}
};
================================================
FILE: patch/global.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <cstdint>
#include <bit>
#include <string>
#include <Windows.h>
#include "global_minimum.hpp"
namespace GLOBAL {
inline HMODULE exedit_hmod;
inline uint32_t& exedit_base = (uint32_t&)exedit_hmod;
inline std::byte executable_memory[USN_PAGE_SIZE * 16];
inline std::byte* executable_memory_cursor = executable_memory;
inline std::wstring patchaul_path;
inline std::wstring patchaul_config_path;
inline std::string patchaul_path_a;
}
================================================
FILE: patch/global_minimum.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <bit>
#include <cstdint>
#include <Windows.h>
namespace GLOBAL {
inline HMODULE aviutl_hmod;
inline uint32_t& aviutl_base = (uint32_t&)aviutl_hmod;
inline HINSTANCE patchaul_hinst;
inline void init_minimum(HINSTANCE patch_hmod) {
GLOBAL::patchaul_hinst = patch_hmod;
GLOBAL::aviutl_base = std::bit_cast<uint32_t>(GetModuleHandleA(NULL));
}
}
================================================
FILE: patch/hash.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <optional>
#include <bit>
#include <concepts>
#include <type_traits>
#include <boost/scope_exit.hpp>
#include <Windows.h>
struct SHA256 {
private:
inline constexpr static uint32_t K[] = {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
};
inline constexpr static uint32_t H0[] = { 0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19 };
static uint32_t Sigma0(uint32_t x) {
return std::rotr(x, 2) ^ std::rotr(x, 13) ^ std::rotr(x, 22);
}
static uint32_t Sigma1(uint32_t x) {
return std::rotr(x, 6) ^ std::rotr(x, 11) ^ std::rotr(x, 25);
}
static uint32_t sigma0(uint32_t x) {
return std::rotr(x, 7) ^ std::rotr(x, 18) ^ (x >> 3);
}
static uint32_t sigma1(uint32_t x) {
return std::rotr(x, 17) ^ std::rotr(x, 19) ^ (x >> 10);
}
static uint32_t Ch(uint32_t x, uint32_t y, uint32_t z) {
return (x & y) ^ (~x & z);
}
static uint32_t Maj(uint32_t x, uint32_t y, uint32_t z) {
return (x & y) ^ (y & z) ^ (z & x);
}
public:
std::byte data[32];
SHA256(std::string_view filename) {
#if _DEBUG && 1 // 重いので
std::fill(std::begin(data), std::end(data), std::byte{});
#else
std::vector<uint8_t> buf;
{
auto hFile = CreateFileA(filename.data(), GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
if (hFile == INVALID_HANDLE_VALUE) throw std::runtime_error("Failed to open file.");
BOOST_SCOPE_EXIT_ALL(hFile) {
CloseHandle(hFile);
};
DWORD sizehigh;
auto sizelow = GetFileSize(hFile, &sizehigh);
buf.resize(sizelow);
DWORD read;
if (!ReadFile(hFile, buf.data(), sizelow, &read, nullptr)) throw std::runtime_error("Failed to read file.");
}
uint32_t H[8];
std::memcpy(H, H0, sizeof(H0));
auto process = [&](const byte* msg) {
uint32_t W[64];
for (size_t t = 0; t < 16; t++) {
W[t] = _byteswap_ulong(*reinterpret_cast<const unsigned long*>(msg + t * 4));
}
for (size_t t = 16; t < 64; t++) {
W[t] = sigma1(W[t - 2]) + W[t - 7] + sigma0(W[t - 15]) + W[t - 16];
}
auto a = H[0];
auto b = H[1];
auto c = H[2];
auto d = H[3];
auto e = H[4];
auto f = H[5];
auto g = H[6];
auto h = H[7];
for (size_t t = 0; t < 64; t++) {
auto T1 = h + Sigma1(e) + Ch(e, f, g) + K[t] + W[t];
auto T2 = Sigma0(a) + Maj(a, b, c);
h = g;
g = f;
f = e;
e = d + T1;
d = c;
c = b;
b = a;
a = T1 + T2;
}
H[0] += a;
H[1] += b;
H[2] += c;
H[3] += d;
H[4] += e;
H[5] += f;
H[6] += g;
H[7] += h;
};
auto buf_size_d64 = buf.size() / 64;
auto buf_size_m64 = buf.size() % 64;
for (size_t i = 0; i < buf_size_d64; i++) process(&buf[i * 64]);
uint8_t last_msg[64];
std::memcpy(last_msg, buf.data() + buf_size_d64 * 64, buf_size_m64);
last_msg[buf_size_m64] = 0x80;
if (buf_size_m64 < 56) {
std::memset(last_msg + buf_size_m64 + 1, 0, 58 - buf_size_m64);
auto size = buf.size();
last_msg[59] = static_cast<uint8_t>(size >> 29);
last_msg[60] = static_cast<uint8_t>(size >> 21);
last_msg[61] = static_cast<uint8_t>(size >> 13);
last_msg[62] = static_cast<uint8_t>(size >> 5);
last_msg[63] = static_cast<uint8_t>(size << 3);
process(last_msg);
}
else {
std::memset(last_msg + buf_size_m64 + 1, 0, 63 - buf_size_m64);
process(last_msg);
std::memset(last_msg, 0, 59);
auto size = buf.size();
last_msg[59] = static_cast<uint8_t>(size >> 29);
last_msg[60] = static_cast<uint8_t>(size >> 21);
last_msg[61] = static_cast<uint8_t>(size >> 13);
last_msg[62] = static_cast<uint8_t>(size >> 5);
last_msg[63] = static_cast<uint8_t>(size << 3);
process(last_msg);
}
for (size_t i = 0; i < 8; i++) {
*reinterpret_cast<unsigned long*>(data + i * 4) = _byteswap_ulong(H[i]);
}
#endif
}
template<std::integral... T> requires(sizeof...(T) == std::extent_v<decltype(data)>)
constexpr SHA256(T&&... list) noexcept : data{ static_cast<std::byte>(std::forward<T>(list))... } {}
static std::optional<SHA256> make_opt(std::string_view filename) {
try {
return SHA256(filename);
}
catch (const std::runtime_error&) {
return std::nullopt;
}
}
std::string tostring() const {
std::string ret;
ret.reserve(64);
static const char chs[] = "0123456789ABCDEF";
for (auto b : data) {
ret.append(1, chs[(std::to_integer<uint32_t>(b) >> 4) & 0xf]);
ret.append(1, chs[std::to_integer<uint32_t>(b) & 0xf]);
}
return ret;
}
};
inline bool operator==(const SHA256& a, const SHA256& b) {
return std::equal(std::begin(a.data), std::end(a.data), std::begin(b.data));
}
================================================
FILE: patch/init.cpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "init.hpp"
#include <set>
#include <string>
#include "cryptostring.hpp"
#include "util_others.hpp"
#include "util_resource.hpp"
#include "config.hpp"
void init_t::InitAtDllMain() {
ExchangeFunction(GLOBAL::aviutl_hmod, cstr_kernel32_dll.get(), cstr_EnumResourceLanguagesA.get(), EnumResourceLanguagesA_Wrap);
}
void init_t::InitAtPatchLoaded() {
{
static const char aviutl_version_str[] = {
'1','.','1','0','\0','\0','\0','\0'
};
if (memcmp(reinterpret_cast<void*>(GLOBAL::aviutl_base + OFS::AviUtl::VersionString), aviutl_version_str, sizeof(aviutl_version_str)) != 0) {
MessageBoxW(NULL, L"patch.aul requires AviUtl *1.10*.\nAviUtl version 1.10以外では動作しません.", L"patch.aul", MB_ICONEXCLAMATION);
return;
}
}
GLOBAL::patchaul_path = WinWrap::Module{ GLOBAL::patchaul_hinst }.getFileNameW();
GLOBAL::patchaul_path_a = WinWrap::Module{ GLOBAL::patchaul_hinst }.getFileNameA();
GLOBAL::patchaul_config_path = GLOBAL::patchaul_path + L".json";
//GLOBAL::config.load(GLOBAL::patchaul_config_path);
config2.load(GLOBAL::patchaul_config_path);
add_dll_ref.add_ref();
ModulesData::update();
{
DWORD oldProtect;
VirtualProtect(GLOBAL::executable_memory, sizeof(GLOBAL::executable_memory), PAGE_EXECUTE_READWRITE, &oldProtect);
}
InjectFunction_fastcall(GLOBAL::aviutl_base + OFS::AviUtl::InitAuf, InitAufBefore, 10);
ExchangeFunction(GLOBAL::aviutl_hmod, cstr_kernel32_dll.get(), cstr_LoadLibraryA.get(), LoadLibraryAWrap);
overwrite_resource();
#ifdef PATCH_SWITCH_SPLASH
if (PATCH_SWITCHER_MEMBER(PATCH_SWITCH_SPLASH)) {
patch::splash.init();
patch::splash.set_phase(L"patch.aulの準備中", L"");
patch::splash.start();
}
#endif
#ifdef PATCH_SWITCH_CONSOLE
patch::console.init();
#endif
#ifdef PATCH_SWITCH_EXCEPTION_LOG
patch::exception_log();
#endif
#ifdef PATCH_SWITCH_SYSINFO_MODIFY
patch::sysinfo_info_write();
#endif
#ifdef PATCH_SWITCH_ACCESS_KEY
patch::access_key.init();
#endif
#ifdef PATCH_SWITCH_COLORPALETTE_CACHE
patch::colorpalette_cache.init();
#endif
#ifdef PATCH_SWITCH_FILEINFO
patch::fileinfo.init();
#endif
}
void init_t::InitAtExeditLoad() {
mywindow.init();
#ifdef PATCH_SWITCH_THEME_CC
patch::theme_cc.init();
#endif
#ifdef PATCH_SWITCH_AUP_SCENE_SETTING
patch::aup_scene_setting.init();
#endif
#ifdef PATCH_SWITCH_TRA_AVIUTL_FILTER
patch::tra_aviutlfilter.init();
#endif
#ifdef PATCH_SWITCH_TRA_CHANGE_DRAWFILTER
patch::tra_change_drawfilter.init();
#endif
#ifdef PATCH_SWITCH_TRA_SPECIFIED_SPEED
patch::tra_specified_speed.init();
#endif
#ifdef PATCH_SWITCH_SETTING_NEW_PROJECT
patch::setting_new_project.init();
#endif
#ifdef PATCH_SWITCH_AUP_LAYER_SETTING
patch::aup_layer_setting.init();
#endif
#ifdef PATCH_SWITCH_EXO_AVIUTL_FILTER
patch::exo_aviutlfilter.init();
#endif
#ifdef PATCH_SWITCH_EXO_SCENEIDX
patch::exo_sceneidx.init();
#endif
#ifdef PATCH_SWITCH_EXO_TRACKPARAM
patch::exo_trackparam.init();
#endif
#ifdef PATCH_SWITCH_EXO_TRACK_MINUSVAL
patch::exo_trackminusval.init();
#endif
#ifdef PATCH_SWITCH_EXO_MIDPT_AND_TRA
patch::exo_midpt_and_tra.init();
#endif
#ifdef PATCH_SWITCH_EXO_SPECIALCOLORCONV
patch::exo_specialcolorconv.init();
#endif
#ifdef PATCH_SWITCH_EXO_FOLD_GUI
patch::exo_fold_gui.init();
#endif
#ifdef PATCH_SWITCH_CONSOLE
patch::console.init_at_exedit_init();
#endif
#ifdef PATCH_SWITCH_TEXT_OP_SIZE
patch::text_op_size.init();
#endif
#ifdef PATCH_SWITCH_IGNORE_MEDIA_PARAM_RESET
patch::ignore_media_param_reset.init();
#endif
#ifdef PATCH_SWITCH_SCROLL_OBJDLG
patch::scroll_objdlg.init();
#endif
#ifdef PATCH_SWITCH_SUSIE_LOAD
patch::susie_load.init();
#endif
#ifdef PATCH_SWITCH_HELPFUL_MSGBOX
patch::helpful_msgbox.init();
#endif
#ifdef PATCH_SWITCH_FAILED_SJIS_MSGBOX
patch::failed_sjis_msgbox.init();
#endif
#ifdef PATCH_SWITCH_FAILED_LONGER_PATH
patch::failed_longer_path.init();
#endif
#ifdef PATCH_SWITCH_FAILED_FILE_DROP
patch::failed_file_drop.init();
#endif
#ifdef PATCH_SWITCH_OBJ_COLORCORRECTION
patch::ColorCorrection.init();
#endif
#ifdef PATCH_SWITCH_OBJ_GLOW
patch::Glow.init();
#endif
#ifdef PATCH_SWITCH_OBJ_LENSBLUR
patch::LensBlur.init();
#endif
#ifdef PATCH_SWITCH_OBJ_NOISE
patch::Noise.init();
#endif
#ifdef PATCH_SWITCH_OBJ_SPECIALCOLORCONV
patch::obj_specialcolorconv.init();
#endif
#ifdef PATCH_SWITCH_SETTINGDIALOG_EXCOLORCONFIG
patch::excolorconfig.init();
#endif
#ifdef PATCH_SWITCH_RCLICKMENU_SPLIT
patch::rclickmenu_split.init();
#endif
#ifdef PATCH_SWITCH_RCLICKMENU_DELETE
patch::rclickmenu_delete.init();
#endif
#ifdef PATCH_SWITCH_BLEND
patch::blend.init();
#endif
#ifdef PATCH_SWITCH_ADD_EXTENSION
patch::add_extension.init();
#endif
#ifdef PATCH_SWITCH_DIALOG_NEW_FILE
patch::dialog_new_file.init();
#endif
#ifdef PATCH_SWITCH_PLAYBACK_SPEED
patch::playback_speed.init();
#endif
patch::setting_dialog();
#ifdef PATCH_SWITCH_FAST
patch::fast::fast.init();
if (patch::fast::fast.is_enabled_i()) {
#ifdef PATCH_SWITCH_FAST_GETPUTPIXELDATA
patch::fast::getputpixeldata();
#endif
#ifdef PATCH_SWITCH_FAST_SETTINGDIALOG
patch::fast_setting_dialog.init();
#endif
#ifdef PATCH_SWITCH_FAST_EXEDITWINDOW
patch::fast_exeditwindow.init();
#endif
#ifdef PATCH_SWITCH_FAST_TEXT
patch::fast::text.init();
#endif
#ifdef PATCH_SWITCH_FAST_CREATE_FIGURE
patch::fast::create_figure.init();
#endif
#ifdef PATCH_SWITCH_FAST_BORDER
patch::fast::Border.init();
#endif
#ifdef PATCH_SWITCH_FAST_GLOW
patch::fast::Glow.init();
#endif
#ifdef PATCH_SWITCH_CL
if (patch::fast::cl.init()) {
if (patch::fast::cl.is_enabled_i()) {
#ifdef PATCH_SWITCH_FAST_POLORTRANSFORM
patch::fast::PolorTransform.init();
#endif
#ifdef PATCH_SWITCH_FAST_DISPLACEMENTMAP
patch::fast::DisplacementMap.init();
#endif
#ifdef PATCH_SWITCH_FAST_RADIATIONALBLUR
patch::fast::RadiationalBlur.init();
#endif
#ifdef PATCH_SWITCH_FAST_FLASH
patch::fast::Flash.init();
#endif
#ifdef PATCH_SWITCH_FAST_DIRECTIONALBLUR
patch::fast::DirectionalBlur.init();
#endif
#ifdef PATCH_SWITCH_FAST_LENSBLUR
patch::fast::LensBlur.init();
#endif
}
}
else {
patch_resource_message_w(PATCH_RS_PATCH_CANT_USE_CL, MB_TASKMODAL | MB_ICONEXCLAMATION);
}
#endif
}
#endif
#ifdef PATCH_SWITCH_UNDO
patch::undo.init();
if (patch::undo.is_enabled_i()) {
#ifdef PATCH_SWITCH_UNDO_REDO
patch::redo.init();
#endif
}
#endif
//GLOBAL::config.store(GLOBAL::patchaul_config_path);
config2.store(GLOBAL::patchaul_config_path);
}
void init_t::InitAufBefore() {
patch::aviutl_wndproc_override.go();
}
BOOL WINAPI init_t::EnumResourceLanguagesA_Wrap(HMODULE hModule, LPCSTR lpType, LPCSTR lpName, ENUMRESLANGPROCA lpEnumFunc, LONG_PTR lParam) {
ExchangeFunction((HMODULE)GLOBAL::aviutl_base, cstr_kernel32_dll.get(), cstr_EnumResourceLanguagesA.get(), EnumResourceLanguagesA);
InitAtPatchLoaded();
return FALSE;
}
HMODULE WINAPI init_t::LoadLibraryAWrap(LPCSTR lpLibFileName) {
HMODULE ret = LoadLibraryA(lpLibFileName);
if (ret == NULL)return NULL;
LPCSTR filename = PathFindFileNameA(lpLibFileName);
if (lstrcmpiA(filename, "exedit.auf") == 0) {
GLOBAL::exedit_hmod = ret;
auto filters = reinterpret_cast<AviUtl::GetFilterTableList_t>(GetProcAddress(ret, AviUtl::GetFilterTableListName))();
if (strcmp(filters[0]->information, "拡張編集(exedit) version 0.92 by KENくん") != 0) {
MessageBoxW(NULL, L"patch.aul requires Exedit version *0.92*.\n拡張編集 version 0.92以外では動作しません.", L"patch.aul", MB_ICONEXCLAMATION);
return ret;
}
original_func_init = std::exchange(filters[0]->func_init, func_initWrap);
original_func_WndProc = std::exchange(filters[0]->func_WndProc, func_WndProcWrap);
#ifdef _DEBUG
original_func_proc = std::exchange(filters[0]->func_proc, func_procWrap);
#endif
InitAtExeditLoad();
}
#ifdef PATCH_SWITCH_CANCEL_BOOST_CONFLICT
else if (lstrcmpiA(filename, "Boost.auf") == 0) {
if (auto ptr = search_import(ret, cstr_kernel32_dll.get(), cstr_GetModuleHandleA.get())) {
OverWriteOnProtectHelper(ptr, 4).store_i32(0, &init_t::Boost_GetModuleHandleA_Wrap);
}
if (auto ptr = search_import(ret, cstr_kernel32_dll.get(), cstr_GetModuleHandleW.get())) {
OverWriteOnProtectHelper(ptr, 4).store_i32(0, &init_t::Boost_GetModuleHandleW_Wrap);
}
if (auto ptr = search_import(ret, cstr_kernel32_dll.get(), cstr_LoadLibraryA.get())) {
OverWriteOnProtectHelper(ptr, 4).store_i32(0, &init_t::Boost_LoadLibraryA_Wrap);
}
if (auto ptr = search_import(ret, cstr_kernel32_dll.get(), cstr_LoadLibraryW.get())) {
OverWriteOnProtectHelper(ptr, 4).store_i32(0, &init_t::Boost_LoadLibraryW_Wrap);
}
if (auto ptr = search_import(ret, cstr_kernel32_dll.get(), cstr_Module32First.get())) {
OverWriteOnProtectHelper(ptr, 4).store_i32(0, &init_t::Boost_Module32First_Wrap);
}
if (auto ptr = search_import(ret, cstr_kernel32_dll.get(), cstr_Module32FirstW.get())) {
OverWriteOnProtectHelper(ptr, 4).store_i32(0, &init_t::Boost_Module32FirstW_Wrap);
}
if (auto ptr = search_import(ret, cstr_kernel32_dll.get(), cstr_Module32Next.get())) {
OverWriteOnProtectHelper(ptr, 4).store_i32(0, &init_t::Boost_Module32Next_Wrap);
}
if (auto ptr = search_import(ret, cstr_kernel32_dll.get(), cstr_Module32NextW.get())) {
OverWriteOnProtectHelper(ptr, 4).store_i32(0, &init_t::Boost_Module32NextW_Wrap);
}
}
#endif
#ifdef PATCH_SWITCH_WARNING_OLD_LSW
else if (lstrcmpiA(filename, "lwcolor.auc") == 0) {
static const SHA256 r940_hash(0xc7, 0xe2, 0x51, 0xde, 0xd2, 0xf8, 0x21, 0xcb, 0x1b, 0xc6, 0xb1, 0x9a, 0x66, 0x43, 0xd3, 0x0d, 0xa4, 0xeb, 0xd6, 0x97, 0x1e, 0x34, 0x1a, 0xb2, 0x11, 0xd9, 0x41, 0x1d, 0xcc, 0xbf, 0x9a, 0x18);
SHA256 hash(lpLibFileName);
if (hash == r940_hash) {
auto ret = patch_resource_message_w(PATCH_RS_PATCH_OLD_LSW, MB_ICONEXCLAMATION | MB_YESNO);
if (ret == IDYES) {
static cryptostring lsw_url(L"https://scrapbox.io/aviutl/L-SMASH_Works");
web_confirm(lsw_url.get());
}
}
}
#endif
else {
static std::set<std::string> list = {
"bakusoku.auf",
"eclipse_fast.auf",
"redo.auf",
};
std::string check = filename;
std::transform(check.begin(), check.end(), check.begin(), [](auto c) { return std::tolower(c); });
if (list.find(check) != list.end()) {
FreeLibrary(ret);
auto ret = patch_resource_message_w(PATCH_RS_PATCH_CONFLICT_PLUGIN, MB_TASKMODAL | MB_ICONINFORMATION | MB_YESNO, string_convert_A2W(filename));
if (ret) {
switch (*ret) {
case IDYES:
DeleteFileA(lpLibFileName);
}
}
return NULL;
}
}
return ret;
}
BOOL __cdecl init_t::func_WndProcWrap(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, AviUtl::EditHandle* editp, AviUtl::FilterPlugin* fp) {
switch (message) {
#ifdef PATCH_SWITCH_EXEDITWINDOW_SIZING
case WM_SIZING:
if (auto ret = patch::exeditwindow_sizing.wndproc(wparam, lparam) == -1) break;
else return ret;
#endif
case AviUtl::FilterPlugin::WindowMessage::Command:
#ifdef PATCH_SWITCH_UNDO_REDO
if (wparam == PATCH_EXEDITMENU_REDO) {
if (patch::redo.is_enabled_i()) {
patch::redo.run_redo();
}
return TRUE;
}
#endif
}
return original_func_WndProc(hwnd, message, wparam, lparam, editp, fp);
}
BOOL __cdecl init_t::func_initWrap(AviUtl::FilterPlugin* fp) {
if (original_func_init(fp) == FALSE) return FALSE;
#ifdef PATCH_SWITCH_UNDO_REDO
fp->exfunc->add_menu_item(fp, "やり直す", fp->hwnd, PATCH_EXEDITMENU_REDO, 'Y', AviUtl::ExFunc::AddMenuItemFlag::Ctrl);
#endif
#ifdef PATCH_SWITCH_LUA
patch::lua.init();
#ifdef PATCH_SWITCH_LUA_RAND
patch::lua_rand.init();
#endif
#ifdef PATCH_SWITCH_LUA_RANDEX
patch::lua_randex.init();
#endif
#ifdef PATCH_SWITCH_LUA_GETVALUE
patch::lua_getvalueex.init();
#endif
#endif
return TRUE;
}
BOOL __cdecl init_t::func_procWrap(AviUtl::FilterPlugin* fp, AviUtl::FilterProcInfo* fpip) {
//std::cout << " = = = = = = " << std::endl;
#ifdef PATCH_SWITCH_ALPHA_BG
patch::alpha_bg.func_proc(fp, fpip);
#endif
return original_func_proc(fp, fpip);
}
#ifdef PATCH_SWITCH_CANCEL_BOOST_CONFLICT
HMODULE WINAPI init_t::Boost_GetModuleHandleA_Wrap(LPCSTR lpModuleName) {
auto filename = PathFindFileNameA(lpModuleName);
if (lstrcmpiA(filename, "patch.aul") == 0) {
return NULL;
}
return GetModuleHandleA(lpModuleName);
}
HMODULE WINAPI init_t::Boost_GetModuleHandleW_Wrap(LPCWSTR lpModuleName) {
auto filename = PathFindFileNameW(lpModuleName);
if (lstrcmpiW(filename, L"patch.aul") == 0) {
return NULL;
}
return GetModuleHandleW(lpModuleName);
}
HMODULE WINAPI init_t::Boost_LoadLibraryA_Wrap(LPCSTR lpLibFileName) {
auto filename = PathFindFileNameA(lpLibFileName);
if (lstrcmpiA(filename, "patch.aul") == 0) {
return NULL;
}
return LoadLibraryA(lpLibFileName);
}
HMODULE WINAPI init_t::Boost_LoadLibraryW_Wrap(LPCWSTR lpLibFileName) {
auto filename = PathFindFileNameW(lpLibFileName);
if (lstrcmpiW(filename, L"patch.aul") == 0) {
return NULL;
}
return LoadLibraryW(lpLibFileName);
}
BOOL WINAPI init_t::Boost_Module32First_Wrap(HANDLE hSnapshot, LPMODULEENTRY32 lpme) {
auto ret = Module32First(hSnapshot, lpme);
if (ret && lstrcmpiA(lpme->szModule, "patch.aul") == 0) {
return Module32Next(hSnapshot, lpme);
}
return ret;
}
BOOL WINAPI init_t::Boost_Module32FirstW_Wrap(HANDLE hSnapshot, LPMODULEENTRY32W lpme) {
auto ret = Module32FirstW(hSnapshot, lpme);
if (ret && lstrcmpiW(lpme->szModule, L"patch.aul") == 0) {
return Module32NextW(hSnapshot, lpme);
}
return ret;
}
BOOL WINAPI init_t::Boost_Module32Next_Wrap(HANDLE hSnapshot, LPMODULEENTRY32 lpme) {
auto ret = Module32Next(hSnapshot, lpme);
if (ret && lstrcmpiA(lpme->szModule, "patch.aul") == 0) {
return Module32Next(hSnapshot, lpme);
}
return ret;
}
BOOL WINAPI init_t::Boost_Module32NextW_Wrap(HANDLE hSnapshot, LPMODULEENTRY32W lpme) {
auto ret = Module32NextW(hSnapshot, lpme);
if (ret && lstrcmpiW(lpme->szModule, L"patch.aul") == 0) {
return Module32NextW(hSnapshot, lpme);
}
return ret;
}
#endif
================================================
FILE: patch/init.hpp
================================================
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <winwrap.hpp>
#include "cryptostring.hpp"
#include "add_dll_ref.hpp"
#include "util.hpp"
#include "global.hpp"
#include "offset_address.hpp"
#include "util.hpp"
#include "patch.hpp"
#include "debug_log.hpp"
#include "overwrite_resource.hpp"
#include "patch_exception_log.hpp"
#include "mywindow.hpp"
inline class init_t {
public:
inline static BOOL(__cdecl* original_func_WndProc)(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, AviUtl::EditHandle* editp, AviUtl::FilterPlugin* fp);
inline static BOOL(__cdecl* original_func_init)(AviUtl::FilterPlugin* fp);
inline static BOOL(__cdecl* original_func_proc)(AviUtl::FilterPlugin* fp, AviUtl::FilterProcInfo* fpip);
static BOOL __cdecl func_WndProcWrap(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, AviUtl::EditHandle* editp, AviUtl::FilterPlugin* fp);
static BOOL __cdecl func_initWrap(AviUtl::FilterPlugin* fp);
static BOOL __cdecl func_procWrap(AviUtl::FilterPlugin* fp, AviUtl::FilterProcInfo* fpip);
static BOOL WINAPI EnumResourceLanguagesA_Wrap(HMODULE hModule, LPCSTR lpType, LPCSTR lpName, ENUMRESLANGPROCA lpEnumFunc, LONG_PTR lParam);
static HMODULE WINAPI LoadLibraryAWrap(LPCSTR lpLibFileName);
#ifdef PATCH_SWITCH_CANCEL_BOOST_CONFLICT
static HMODULE WINAPI Boost_GetModuleHandleA_Wrap(LPCSTR lpModuleName);
static HMODULE WINAPI Boost_GetModuleHandleW_Wrap(LPCWSTR lpModuleName);
static HMODULE WINAPI Boost_LoadLibraryA_Wrap(LPCSTR lpLibFileName);
static HMODULE WINAPI Boost_LoadLibraryW_Wrap(LPCWSTR lpLibFileName);
static BOOL WINAPI Boost_Module32First_Wrap(HANDLE hSnapshot, LPMODULEENTRY32 lpme);
static BOOL WINAPI Boost_Module32FirstW_Wrap(HANDLE hSnapshot, LPMODULEENTRY32W lpme);
static BOOL WINAPI Boost_Module32Next_Wrap(HANDLE hSnapshot, LPMODULEENTRY32 lpme);
static BOOL WINAPI Boost_Module32NextW_Wrap(HANDLE hSnapshot, LPMODULEENTRY32W lpme);
#endif
// DllMain呼び出しのタイミングでやる処理
// できるだけ少なくしたい
static void InitAtDllMain();
// LoadLibrary("patch.aul")直後にやる処理
// EnumResourceLanguagesAの乗っ取りで実現
// EnumResourceLanguagesAが失敗したことにして,patch.aulは正しい言語拡張リソースではないことにする
static void InitAtPatchLoaded();
// exedit.aufのLoadLibrary直後にやる処理
// 拡張編集へのインジェクションはここでやる
static void InitAtExeditLoad();
// フィルタプラグインの読み込みを開始するタイミングでやる処理
static void InitAufBefore();
} init;
================================================
FILE: patch/json.h
================================================
/*
The latest version of this library is available on GitHub;
https://github.com/sheredom/json.h.
*/
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>.
*/
#ifndef SHEREDOM_JSON_H_INCLUDED
#define SHEREDOM_JSON_H_INCLUDED
#if defined(_MSC_VER)
#pragma warning(push)
/* disable warning: no function prototype given: converting '()' to '(void)' */
#pragma warning(disable : 4255)
/* disable warning: '__cplusplus' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
#pragma warning(disable : 4668)
/* disable warning: 'bytes padding added after construct' */
#pragma warning(disable : 4820)
#endif
#include <stddef.h>
#include <string.h>
#if defined(_MSC_VER)
#define json_weak __inline
#elif defined(__clang__) || defined(__GNUC__)
#define json_weak __attribute__((weak))
#else
#error Non clang, non gcc, non MSVC compiler found!
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct json_value_s;
struct json_parse_result_s;
enum json_parse_flags_e {
json_parse_flags_default = 0,
/* allow trailing commas in objects and arrays. For example, both [true,] and
{"a" : null,} would be allowed with this option on. */
json_parse_flags_allow_trailing_comma = 0x1,
/* allow unquoted keys for objects. For example, {a : null} would be allowed
with this option on. */
json_parse_flags_allow_unquoted_keys = 0x2,
/* allow a global unbracketed object. For example, a : null, b : true, c : {}
would be allowed with this option on. */
json_parse_flags_allow_global_object = 0x4,
/* allow objects to use '=' instead of ':' between key/value pairs. For
example, a = null, b : true would be allowed with this option on. */
json_parse_flags_allow_equals_in_object = 0x8,
/* allow that objects don't have to have comma separators between key/value
pairs. */
json_parse_flags_allow_no_commas = 0x10,
/* allow c-style comments (either variants) to be ignored in the input JSON
file. */
json_parse_flags_allow_c_style_comments = 0x20,
/* deprecated flag, unused. */
json_parse_flags_deprecated = 0x40,
/* record location information for each value. */
json_parse_flags_allow_location_information = 0x80,
/* allow strings to be 'single quoted'. */
json_parse_flags_allow_single_quoted_strings = 0x100,
/* allow numbers to be hexadecimal. */
json_parse_flags_allow_hexadecimal_numbers = 0x200,
/* allow numbers like +123 to be parsed. */
json_parse_flags_allow_leading_plus_sign = 0x400,
/* allow numbers like .0123 or 123. to be parsed. */
json_parse_flags_allow_leading_or_trailing_decimal_point = 0x800,
/* allow Infinity, -Infinity, NaN, -NaN. */
json_parse_flags_allow_inf_and_nan = 0x1000,
/* allow multi line string values. */
json_parse_flags_allow_multi_line_strings = 0x2000,
/* allow simplified JSON to be parsed. Simplified JSON is an enabling of a set
of other parsing options. */
json_parse_flags_allow_simplified_json =
(json_parse_flags_allow_trailing_comma |
json_parse_flags_allow_unquoted_keys |
json_parse_flags_allow_global_object |
json_parse_flags_allow_equals_in_object |
json_parse_flags_allow_no_commas),
/* allow JSON5 to be parsed. JSON5 is an enabling of a set of other parsing
options. */
json_parse_flags_allow_json5 =
(json_parse_flags_allow_trailing_comma |
json_parse_flags_allow_unquoted_keys |
json_parse_flags_allow_c_style_comments |
json_parse_flags_allow_single_quoted_strings |
json_parse_flags_allow_hexadecimal_numbers |
json_parse_flags_allow_leading_plus_sign |
json_parse_flags_allow_leading_or_trailing_decimal_point |
json_parse_flags_allow_inf_and_nan |
json_parse_flags_allow_multi_line_strings)
};
/* Parse a JSON text file, returning a pointer to the root of the JSON
* structure. json_parse performs 1 call to malloc for the entire encoding.
* Returns 0 if an error occurred (malformed JSON input, or malloc failed). */
json_weak struct json_value_s *json_parse(const void *src, size_t src_size);
/* Parse a JSON text file, returning a pointer to the root of the JSON
* structure. json_parse performs 1 call to alloc_func_ptr for the entire
* encoding. Returns 0 if an error occurred (malformed JSON input, or malloc
* failed). If an error occurred, the result struct (if not NULL) will explain
* the type of error, and the location in the input it occurred. If
* alloc_func_ptr is null then malloc is used. */
json_weak struct json_value_s *
json_parse_ex(const void *src, size_t src_size, size_t flags_bitset,
void *(*alloc_func_ptr)(void *, size_t), void *user_data,
struct json_parse_result_s *result);
/* Extracts a value and all the data that makes it up into a newly created
* value. json_extract_value performs 1 call to malloc for the entire encoding.
*/
json_weak struct json_value_s *
json_extract_value(const struct json_value_s *value);
/* Extracts a value and all the data that makes it up into a newly created
* value. json_extract_value performs 1 call to alloc_func_ptr for the entire
* encoding. If alloc_func_ptr is null then malloc is used. */
json_weak struct json_value_s *
json_extract_value_ex(const struct json_value_s *value,
void *(*alloc_func_ptr)(void *, size_t), void *user_data);
/* Write out a minified JSON utf-8 string. This string is an encoding of the
* minimal string characters required to still encode the same data.
* json_write_minified performs 1 call to malloc for the entire encoding. Return
* 0 if an error occurred (malformed JSON input, or malloc failed). The out_size
* parameter is optional as the utf-8 string is null terminated. */
json_weak void *json_write_minified(const struct json_value_s *value,
size_t *out_size);
/* Write out a pretty JSON utf-8 string. This string is encoded such that the
* resultant JSON is pretty in that it is easily human readable. The indent and
* newline parameters allow a user to specify what kind of indentation and
* newline they want (two spaces / three spaces / tabs? \r, \n, \r\n ?). Both
* indent and newline can be NULL, indent defaults to two spaces (" "), and
* newline defaults to linux newlines ('\n' as the newline character).
* json_write_pretty performs 1 call to malloc for the entire encoding. Return 0
* if an error occurred (malformed JSON input, or malloc failed). The out_size
* parameter is optional as the utf-8 string is null terminated. */
json_weak void *json_write_pretty(const struct json_value_s *value,
const char *indent, const char *newline,
size_t *out_size);
/* Reinterpret a JSON value as a string. Returns null is the value was not a
* string. */
json_weak struct json_string_s *
json_value_as_string(struct json_value_s *const value);
/* Reinterpret a JSON value as a number. Returns null is the value was not a
* number. */
json_weak struct json_number_s *
json_value_as_number(struct json_value_s *const value);
/* Reinterpret a JSON value as an object. Returns null is the value was not an
* object. */
json_weak struct json_object_s *
json_value_as_object(struct json_value_s *const value);
/* Reinterpret a JSON value as an array. Returns null is the value was not an
* array. */
json_weak struct json_array_s *
json_value_as_array(struct json_value_s *const value);
/* Whether the value is true. */
json_weak int json_value_is_true(const struct json_value_s *const value);
/* Whether the value is false. */
json_weak int json_value_is_false(const struct json_value_s *const value);
/* Whether the value is null. */
json_weak int json_value_is_null(const struct json_value_s *const value);
/* The various types JSON values can be. Used to identify what a value is. */
enum json_type_e {
json_type_string,
json_type_number,
json_type_object,
json_type_array,
json_type_true,
json_type_false,
json_type_null
};
/* A JSON string value. */
struct json_string_s {
/* utf-8 string */
const char *string;
/* The size (in bytes) of the string */
size_t string_size;
};
/* A JSON string value (extended). */
struct json_string_ex_s {
/* The JSON string this extends. */
struct json_string_s string;
/* The character offset for the value in the JSON input. */
size_t offset;
/* The line number for the value in the JSON input. */
size_t line_no;
/* The row number for the value in the JSON input, in bytes. */
size_t row_no;
};
/* A JSON number value. */
struct json_number_s {
/* ASCII string containing representation of the number. */
const char *number;
/* the size (in bytes) of the number. */
size_t number_size;
};
/* an element of a JSON object. */
struct json_object_element_s {
/* the name of this element. */
struct json_string_s *name;
/* the value of this element. */
struct json_value_s *value;
/* the next object element (can be NULL if the last element in the object). */
struct json_object_element_s *next;
};
/* a JSON object value. */
struct json_object_s {
/* a linked list of the elements in the object. */
struct json_object_element_s *start;
/* the number of elements in the object. */
size_t length;
};
/* an element of a JSON array. */
struct json_array_element_s {
/* the value of this element. */
struct json_value_s *value;
/* the next array element (can be NULL if the last element in the array). */
struct json_array_element_s *next;
};
/* a JSON array value. */
struct json_array_s {
/* a linked list of the elements in the array. */
struct json_array_element_s *start;
/* the number of elements in the array. */
size_t length;
};
/* a JSON value. */
struct json_value_s {
/* a pointer to either a json_string_s, json_number_s, json_object_s, or. */
/* json_array_s. Should be cast to the appropriate struct type based on what.
*/
/* the type of this value is. */
void *payload;
/* must be one of json_type_e. If type is json_type_true, json_type_false, or.
*/
/* json_type_null, payload will be NULL. */
size_t type;
};
/* a JSON value (extended). */
struct json_value_ex_s {
/* the JSON value this extends. */
struct json_value_s value;
/* the character offset for the value in the JSON input. */
size_t offset;
/* the line number for the value in the JSON input. */
size_t line_no;
/* the row number for the value in the JSON input, in bytes. */
size_t row_no;
};
/* a parsing error code. */
enum json_parse_error_e {
/* no error occurred (huzzah!). */
json_parse_error_none = 0,
/* expected either a comma or a closing '}' or ']' to close an object or. */
/* array! */
json_parse_error_expected_comma_or_closing_bracket,
/* colon separating name/value pair was missing! */
json_parse_error_expected_colon,
/* expected string to begin with '"'! */
json_parse_error_expected_opening_quote,
/* invalid escaped sequence in string! */
json_parse_error_invalid_string_escape_sequence,
/* invalid number format! */
json_parse_error_invalid_number_format,
/* invalid value! */
json_parse_error_invalid_value,
/* reached end of buffer before object/array was complete! */
json_parse_error_premature_end_of_buffer,
/* string was malformed! */
json_parse_error_invalid_string,
/* a call to malloc, or a user provider allocator, failed. */
json_parse_error_allocator_failed,
/* the JSON input had unexpected trailing characters that weren't part of the.
*/
/* JSON value. */
json_parse_error_unexpected_trailing_characters,
/* catch-all error for everything else that exploded (real bad chi!). */
json_parse_error_unknown
};
/* error report from json_parse_ex(). */
struct json_parse_result_s {
/* the error code (one of json_parse_error_e). */
size_t error;
/* the character offset for the error in the JSON input. */
size_t error_offset;
/* the line number for the error in the JSON input. */
size_t error_line_no;
/* the row number for the error, in bytes. */
size_t error_row_no;
};
#ifdef __cplusplus
} /* extern "C". */
#endif
#include <stdlib.h>
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
#if defined(_MSC_VER) && (_MSC_VER < 1920)
#define json_uintmax_t unsigned __int64
#else
#include <inttypes.h>
#define json_uintmax_t uintmax_t
#endif
#if defined(_MSC_VER)
#define json_strtoumax _strtoui64
#else
#define json_strtoumax strtoumax
#endif
#if defined(__cplusplus) && (__cplusplus >= 201103L)
#define json_null nullptr
#else
#define json_null 0
#endif
#if defined(__clang__)
#pragma clang diagnostic push
/* we do one big allocation via malloc, then cast aligned slices of this for. */
/* our structures - we don't have a way to tell the compiler we know what we. */
/* are doing, so disable the warning instead! */
#pragma clang diagnostic ignored "-Wcast-align"
/* We use C style casts everywhere. */
#pragma clang diagnostic ignored "-Wold-style-cast"
/* We need long long for strtoull. */
#pragma clang diagnostic ignored "-Wc++11-long-long"
/* Who cares if nullptr doesn't work with C++98, we don't use it there! */
#pragma clang diagnostic ignored "-Wc++98-compat"
#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
#elif defined(_MSC_VER)
#pragma warning(push)
/* disable 'function selected for inline expansion' warning. */
#pragma warning(disable : 4711)
/* disable '#pragma warning: there is no warning number' warning. */
#pragma warning(disable : 4619)
/* disable 'warning number not a valid compiler warning' warning. */
#pragma warning(disable : 4616)
/* disable 'Compiler will insert Spectre mitigation for memory load if
* /Qspectre. */
/* switch specified' warning. */
#pragma warning(disable : 5045)
#endif
struct json_parse_state_s {
const char *src;
size_t size;
size_t offset;
size_t flags_bitset;
char *data;
char *dom;
size_t dom_size;
size_t data_size;
size_t line_no; /* line counter for error reporting. */
size_t line_offset; /* (offset-line_offset) is the character number (in
bytes). */
size_t error;
};
json_weak int json_hexadecimal_digit(const char c);
int json_hexadecimal_digit(const char c) {
if ('0' <= c && c <= '9') {
return c - '0';
}
if ('a' <= c && c <= 'f') {
return c - 'a' + 10;
}
if ('A' <= c && c <= 'F') {
return c - 'A' + 10;
}
return -1;
}
json_weak int json_hexadecimal_value(const char *c, const unsigned long size,
unsigned long *result);
int json_hexadecimal_value(const char *c, const unsigned long size,
unsigned long *result) {
const char *p;
int digit;
if (size > sizeof(unsigned long) * 2) {
return 0;
}
*result = 0;
for (p = c; (unsigned long)(p - c) < size; ++p) {
*result <<= 4;
digit = json_hexadecimal_digit(*p);
if (digit < 0 || digit > 15) {
return 0;
}
*result |= (unsigned char)digit;
}
return 1;
}
json_weak int json_skip_whitespace(struct json_parse_state_s *state);
int json_skip_whitespace(struct json_parse_state_s *state) {
size_t offset = state->offset;
const size_t size = state->size;
const char *const src = state->src;
/* the only valid whitespace according to ECMA-404 is ' ', '\n', '\r' and
* '\t'. */
switch (src[offset]) {
default:
return 0;
case ' ':
case '\r':
case '\t':
case '\n':
break;
}
do {
switch (src[offset]) {
default:
/* Update offset. */
state->offset = offset;
return 1;
case ' ':
case '\r':
case '\t':
break;
case '\n':
state->line_no++;
state->line_offset = offset;
break;
}
offset++;
} while (offset < size);
/* Update offset. */
state->offset = offset;
return 1;
}
json_weak int json_skip_c_style_comments(struct json_parse_state_s *state);
int json_skip_c_style_comments(struct json_parse_state_s *state) {
/* do we have a comment?. */
if ('/' == state->src[state->offset]) {
/* skip '/'. */
state->offset++;
if ('/' == state->src[state->offset]) {
/* we had a comment of the form //. */
/* skip second '/'. */
state->offset++;
while (state->offset < state->size) {
switch (state->src[state->offset]) {
default:
/* skip the character in the comment. */
state->offset++;
break;
case '\n':
/* if we have a newline, our comment has ended! Skip the newline. */
state->offset++;
/* we entered a newline, so move our line info forward. */
state->line_no++;
state->line_offset = state->offset;
return 1;
}
}
/* we reached the end of the JSON file! */
return 1;
} else if ('*' == state->src[state->offset]) {
/* we had a comment in the C-style long form. */
/* skip '*'. */
state->offset++;
while (state->offset + 1 < state->size) {
if (('*' == state->src[state->offset]) &&
('/' == state->src[state->offset + 1])) {
/* we reached the end of our comment! */
state->offset += 2;
return 1;
} else if ('\n' == state->src[state->offset]) {
/* we entered a newline, so move our line info forward. */
state->line_no++;
state->line_offset = state->offset;
}
/* skip character within comment. */
state->offset++;
}
/* Comment wasn't ended correctly which is a failure. */
return 1;
}
}
/* we didn't have any comment, which is ok too! */
return 0;
}
json_weak int json_skip_all_skippables(struct json_parse_state_s *state);
int json_skip_all_skippables(struct json_parse_state_s *state) {
/* skip all whitespace and other skippables until there are none left. note
* that the previous version suffered from read past errors should. the
* stream end on json_skip_c_style_comments eg. '{"a" ' with comments flag.
*/
int did_consume = 0;
const size_t size = state->size;
if (json_parse_flags_allow_c_style_comments & state->flags_bitset) {
do {
if (state->offset == size) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
did_consume = json_skip_whitespace(state);
/* This should really be checked on access, not in front of every call.
*/
if (state->offset == size) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
did_consume |= json_skip_c_style_comments(state);
} while (0 != did_consume);
} else {
do {
if (state->offset == size) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
did_consume = json_skip_whitespace(state);
} while (0 != did_consume);
}
if (state->offset == size) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
return 0;
}
json_weak int json_get_value_size(struct json_parse_state_s *state,
int is_global_object);
json_weak int json_get_string_size(struct json_parse_state_s *state,
size_t is_key);
int json_get_string_size(struct json_parse_state_s *state, size_t is_key) {
size_t offset = state->offset;
const size_t size = state->size;
size_t data_size = 0;
const char *const src = state->src;
const int is_single_quote = '\'' == src[offset];
const char quote_to_use = is_single_quote ? '\'' : '"';
const size_t flags_bitset = state->flags_bitset;
unsigned long codepoint;
unsigned long high_surrogate = 0;
if ((json_parse_flags_allow_location_information & flags_bitset) != 0 &&
is_key != 0) {
state->dom_size += sizeof(struct json_string_ex_s);
} else {
state->dom_size += sizeof(struct json_string_s);
}
if ('"' != src[offset]) {
/* if we are allowed single quoted strings check for that too. */
if (!((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&
is_single_quote)) {
state->error = json_parse_error_expected_opening_quote;
state->offset = offset;
return 1;
}
}
/* skip leading '"' or '\''. */
offset++;
while ((offset < size) && (quote_to_use != src[offset])) {
/* add space for the character. */
data_size++;
switch (src[offset]) {
default:
break;
case '\0':
case '\t':
state->error = json_parse_error_invalid_string;
state->offset = offset;
return 1;
}
if ('\\' == src[offset]) {
/* skip reverse solidus character. */
offset++;
if (offset == size) {
state->error = json_parse_error_premature_end_of_buffer;
state->offset = offset;
return 1;
}
switch (src[offset]) {
default:
state->error = json_parse_error_invalid_string_escape_sequence;
state->offset = offset;
return 1;
case '"':
case '\\':
case '/':
case 'b':
case 'f':
case 'n':
case 'r':
case 't':
/* all valid characters! */
offset++;
break;
case 'u':
if (!(offset + 5 < size)) {
/* invalid escaped unicode sequence! */
state->error = json_parse_error_invalid_string_escape_sequence;
state->offset = offset;
return 1;
}
codepoint = 0;
if (!json_hexadecimal_value(&src[offset + 1], 4, &codepoint)) {
/* escaped unicode sequences must contain 4 hexadecimal digits! */
state->error = json_parse_error_invalid_string_escape_sequence;
state->offset = offset;
return 1;
}
/* Valid sequence!
* see: https://en.wikipedia.org/wiki/UTF-8#Invalid_code_points.
* 1 7 U + 0000 U + 007F 0xxxxxxx.
* 2 11 U + 0080 U + 07FF 110xxxxx
* 10xxxxxx.
* 3 16 U + 0800 U + FFFF 1110xxxx
* 10xxxxxx 10xxxxxx.
* 4 21 U + 10000 U + 10FFFF 11110xxx
* 10xxxxxx 10xxxxxx 10xxxxxx.
* Note: the high and low surrogate halves used by UTF-16 (U+D800
* through U+DFFF) and code points not encodable by UTF-16 (those after
* U+10FFFF) are not legal Unicode values, and their UTF-8 encoding must
* be treated as an invalid byte sequence. */
if (high_surrogate != 0) {
/* we previously read the high half of the \uxxxx\uxxxx pair, so now
* we expect the low half. */
if (codepoint >= 0xdc00 &&
codepoint <= 0xdfff) { /* low surrogate range. */
data_size += 3;
high_surrogate = 0;
} else {
state->error = json_parse_error_invalid_string_escape_sequence;
state->offset = offset;
return 1;
}
} else if (codepoint <= 0x7f) {
data_size += 0;
} else if (codepoint <= 0x7ff) {
data_size += 1;
} else if (codepoint >= 0xd800 &&
codepoint <= 0xdbff) { /* high surrogate range. */
/* The codepoint is the first half of a "utf-16 surrogate pair". so we
* need the other half for it to be valid: \uHHHH\uLLLL. */
if (offset + 11 > size || '\\' != src[offset + 5] ||
'u' != src[offset + 6]) {
state->error = json_parse_error_invalid_string_escape_sequence;
state->offset = offset;
return 1;
}
high_surrogate = codepoint;
} else if (codepoint >= 0xd800 &&
codepoint <= 0xdfff) { /* low surrogate range. */
/* we did not read the other half before. */
state->error = json_parse_error_invalid_string_escape_sequence;
state->offset = offset;
return 1;
} else {
data_size += 2;
}
/* escaped codepoints after 0xffff are supported in json through utf-16
* surrogate pairs: \uD83D\uDD25 for U+1F525. */
offset += 5;
break;
}
} else if (('\r' == src[offset]) || ('\n' == src[offset])) {
if (!(json_parse_flags_allow_multi_line_strings & flags_bitset)) {
/* invalid escaped unicode sequence! */
state->error = json_parse_error_invalid_string_escape_sequence;
state->offset = offset;
return 1;
}
offset++;
} else {
/* skip character (valid part of sequence). */
offset++;
}
}
/* If the offset is equal to the size, we had a non-terminated string! */
if (offset == size) {
state->error = json_parse_error_premature_end_of_buffer;
state->offset = offset - 1;
return 1;
}
/* skip trailing '"' or '\''. */
offset++;
/* add enough space to store the string. */
state->data_size += data_size;
/* one more byte for null terminator ending the string! */
state->data_size++;
/* update offset. */
state->offset = offset;
return 0;
}
json_weak int is_valid_unquoted_key_char(const char c);
int is_valid_unquoted_key_char(const char c) {
return (('0' <= c && c <= '9') || ('a' <= c && c <= 'z') ||
('A' <= c && c <= 'Z') || ('_' == c));
}
json_weak int json_get_key_size(struct json_parse_state_s *state);
int json_get_key_size(struct json_parse_state_s *state) {
const size_t flags_bitset = state->flags_bitset;
if (json_parse_flags_allow_unquoted_keys & flags_bitset) {
size_t offset = state->offset;
const size_t size = state->size;
const char *const src = state->src;
size_t data_size = state->data_size;
/* if we are allowing unquoted keys, first grok for a quote... */
if ('"' == src[offset]) {
/* ... if we got a comma, just parse the key as a string as normal. */
return json_get_string_size(state, 1);
} else if ((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&
('\'' == src[offset])) {
/* ... if we got a comma, just parse the key as a string as normal. */
return json_get_string_size(state, 1);
} else {
while ((offset < size) && is_valid_unquoted_key_char(src[offset])) {
offset++;
data_size++;
}
/* one more byte for null terminator ending the string! */
data_size++;
if (json_parse_flags_allow_location_information & flags_bitset) {
state->dom_size += sizeof(struct json_string_ex_s);
} else {
state->dom_size += sizeof(struct json_string_s);
}
/* update offset. */
state->offset = offset;
/* update data_size. */
state->data_size = data_size;
return 0;
}
} else {
/* we are only allowed to have quoted keys, so just parse a string! */
return json_get_string_size(state, 1);
}
}
json_weak int json_get_object_size(struct json_parse_state_s *state,
int is_global_object);
int json_get_object_size(struct json_parse_state_s *state,
int is_global_object) {
const size_t flags_bitset = state->flags_bitset;
const char *const src = state->src;
const size_t size = state->size;
size_t elements = 0;
int allow_comma = 0;
int found_closing_brace = 0;
if (is_global_object) {
/* if we found an opening '{' of an object, we actually have a normal JSON
* object at the root of the DOM... */
if (!json_skip_all_skippables(state) && '{' == state->src[state->offset]) {
/* . and we don't actually have a global object after all! */
is_global_object = 0;
}
}
if (!is_global_object) {
if ('{' != src[state->offset]) {
state->error = json_parse_error_unknown;
return 1;
}
/* skip leading '{'. */
state->offset++;
}
state->dom_size += sizeof(struct json_object_s);
if ((state->offset == size) && !is_global_object) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
do {
if (!is_global_object) {
if (json_skip_all_skippables(state)) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
if ('}' == src[state->offset]) {
/* skip trailing '}'. */
state->offset++;
found_closing_brace = 1;
/* finished the object! */
break;
}
} else {
/* we don't require brackets, so that means the object ends when the input
* stream ends! */
if (json_skip_all_skippables(state)) {
break;
}
}
/* if we parsed at least once element previously, grok for a comma. */
if (allow_comma) {
if (',' == src[state->offset]) {
/* skip comma. */
state->offset++;
allow_comma = 0;
} else if (json_parse_flags_allow_no_commas & flags_bitset) {
/* we don't require a comma, and we didn't find one, which is ok! */
allow_comma = 0;
} else {
/* otherwise we are required to have a comma, and we found none. */
state->error = json_parse_error_expected_comma_or_closing_bracket;
return 1;
}
if (json_parse_flags_allow_trailing_comma & flags_bitset) {
continue;
} else {
if (json_skip_all_skippables(state)) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
}
}
if (json_get_key_size(state)) {
/* key parsing failed! */
state->error = json_parse_error_invalid_string;
return 1;
}
if (json_skip_all_skippables(state)) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
if (json_parse_flags_allow_equals_in_object & flags_bitset) {
const char current = src[state->offset];
if ((':' != current) && ('=' != current)) {
state->error = json_parse_error_expected_colon;
return 1;
}
} else {
if (':' != src[state->offset]) {
state->error = json_parse_error_expected_colon;
return 1;
}
}
/* skip colon. */
state->offset++;
if (json_skip_all_skippables(state)) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
if (json_get_value_size(state, /* is_global_object = */ 0)) {
/* value parsing failed! */
return 1;
}
/* successfully parsed a name/value pair! */
elements++;
allow_comma = 1;
} while (state->offset < size);
if ((state->offset == size) && !is_global_object && !found_closing_brace) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
state->dom_size += sizeof(struct json_object_element_s) * elements;
return 0;
}
json_weak int json_get_array_size(struct json_parse_state_s *state);
int json_get_array_size(struct json_parse_state_s *state) {
const size_t flags_bitset = state->flags_bitset;
size_t elements = 0;
int allow_comma = 0;
const char *const src = state->src;
const size_t size = state->size;
if ('[' != src[state->offset]) {
/* expected array to begin with leading '['. */
state->error = json_parse_error_unknown;
return 1;
}
/* skip leading '['. */
state->offset++;
state->dom_size += sizeof(struct json_array_s);
while (state->offset < size) {
if (json_skip_all_skippables(state)) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
if (']' == src[state->offset]) {
/* skip trailing ']'. */
state->offset++;
state->dom_size += sizeof(struct json_array_element_s) * elements;
/* finished the object! */
return 0;
}
/* if we parsed at least once element previously, grok for a comma. */
if (allow_comma) {
if (',' == src[state->offset]) {
/* skip comma. */
state->offset++;
allow_comma = 0;
} else if (!(json_parse_flags_allow_no_commas & flags_bitset)) {
state->error = json_parse_error_expected_comma_or_closing_bracket;
return 1;
}
if (json_parse_flags_allow_trailing_comma & flags_bitset) {
allow_comma = 0;
continue;
} else {
if (json_skip_all_skippables(state)) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
}
}
if (json_get_value_size(state, /* is_global_object = */ 0)) {
/* value parsing failed! */
return 1;
}
/* successfully parsed an array element! */
elements++;
allow_comma = 1;
}
/* we consumed the entire input before finding the closing ']' of the array!
*/
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
json_weak int json_get_number_size(struct json_parse_state_s *state);
int json_get_number_size(struct json_parse_state_s *state) {
const size_t flags_bitset = state->flags_bitset;
size_t offset = state->offset;
const size_t size = state->size;
int had_leading_digits = 0;
const char *const src = state->src;
state->dom_size += sizeof(struct json_number_s);
if ((json_parse_flags_allow_hexadecimal_numbers & flags_bitset) &&
(offset + 1 < size) && ('0' == src[offset]) &&
(('x' == src[offset + 1]) || ('X' == src[offset + 1]))) {
/* skip the leading 0x that identifies a hexadecimal number. */
offset += 2;
/* consume hexadecimal digits. */
while ((offset < size) && (('0' <= src[offset] && src[offset] <= '9') ||
('a' <= src[offset] && src[offset] <= 'f') ||
('A' <= src[offset] && src[offset] <= 'F'))) {
offset++;
}
} else {
int found_sign = 0;
int inf_or_nan = 0;
if ((offset < size) &&
(('-' == src[offset]) ||
((json_parse_flags_allow_leading_plus_sign & flags_bitset) &&
('+' == src[offset])))) {
/* skip valid leading '-' or '+'. */
offset++;
found_sign = 1;
}
if (json_parse_flags_allow_inf_and_nan & flags_bitset) {
const char inf[9] = "Infinity";
const size_t inf_strlen = sizeof(inf) - 1;
const char nan[4] = "NaN";
const size_t nan_strlen = sizeof(nan) - 1;
if (offset + inf_strlen < size) {
int found = 1;
size_t i;
for (i = 0; i < inf_strlen; i++) {
if (inf[i] != src[offset + i]) {
found = 0;
break;
}
}
if (found) {
/* We found our special 'Infinity' keyword! */
offset += inf_strlen;
inf_or_nan = 1;
}
}
if (offset + nan_strlen < size) {
int found = 1;
size_t i;
for (i = 0; i < nan_strlen; i++) {
if (nan[i] != src[offset + i]) {
found = 0;
break;
}
}
if (found) {
/* We found our special 'NaN' keyword! */
offset += nan_strlen;
inf_or_nan = 1;
}
}
}
if (found_sign && !inf_or_nan && (offset < size) &&
!('0' <= src[offset] && src[offset] <= '9')) {
/* check if we are allowing leading '.'. */
if (!(json_parse_flags_allow_leading_or_trailing_decimal_point &
flags_bitset) ||
('.' != src[offset])) {
/* a leading '-' must be immediately followed by any digit! */
state->error = json_parse_error_invalid_number_format;
state->offset = offset;
return 1;
}
}
if ((offset < size) && ('0' == src[offset])) {
/* skip valid '0'. */
offset++;
/* we need to record whether we had any leading digits for checks later.
*/
had_leading_digits = 1;
if ((offset < size) && ('0' <= src[offset] && src[offset] <= '9')) {
/* a leading '0' must not be immediately followed by any digit! */
state->error = json_parse_error_invalid_number_format;
state->offset = offset;
return 1;
}
}
/* the main digits of our number next. */
while ((offset < size) && ('0' <= src[offset] && src[offset] <= '9')) {
offset++;
/* we need to record whether we had any leading digits for checks later.
*/
had_leading_digits = 1;
}
if ((offset < size) && ('.' == src[offset])) {
offset++;
if (!('0' <= src[offset] && src[offset] <= '9')) {
if (!(json_parse_flags_allow_leading_or_trailing_decimal_point &
flags_bitset) ||
!had_leading_digits) {
/* a decimal point must be followed by at least one digit. */
state->error = json_parse_error_invalid_number_format;
state->offset = offset;
return 1;
}
}
/* a decimal point can be followed by more digits of course! */
while ((offset < size) && ('0' <= src[offset] && src[offset] <= '9')) {
offset++;
}
}
if ((offset < size) && ('e' == src[offset] || 'E' == src[offset])) {
/* our number has an exponent! Skip 'e' or 'E'. */
offset++;
if ((offset < size) && ('-' == src[offset] || '+' == src[offset])) {
/* skip optional '-' or '+'. */
offset++;
}
if ((offset < size) && !('0' <= src[offset] && src[offset] <= '9')) {
/* an exponent must have at least one digit! */
state->error = json_parse_error_invalid_number_format;
state->offset = offset;
return 1;
}
/* consume exponent digits. */
do {
offset++;
} while ((offset < size) && ('0' <= src[offset] && src[offset] <= '9'));
}
}
if (offset < size) {
switch (src[offset]) {
case ' ':
case '\t':
case '\r':
case '\n':
case '}':
case ',':
case ']':
/* all of the above are ok. */
break;
case '=':
if (json_parse_flags_allow_equals_in_object & flags_bitset) {
break;
}
state->error = json_parse_error_invalid_number_format;
state->offset = offset;
return 1;
default:
state->error = json_parse_error_invalid_number_format;
state->offset = offset;
return 1;
}
}
state->data_size += offset - state->offset;
/* one more byte for null terminator ending the number string! */
state->data_size++;
/* update offset. */
state->offset = offset;
return 0;
}
json_weak int json_get_value_size(struct json_parse_state_s *state,
int is_global_object);
int json_get_value_size(struct json_parse_state_s *state,
int is_global_object) {
const size_t flags_bitset = state->flags_bitset;
const char *const src = state->src;
size_t offset;
const size_t size = state->size;
if (json_parse_flags_allow_location_information & flags_bitset) {
state->dom_size += sizeof(struct json_value_ex_s);
} else {
state->dom_size += sizeof(struct json_value_s);
}
if (is_global_object) {
return json_get_object_size(state, /* is_global_object = */ 1);
} else {
if (json_skip_all_skippables(state)) {
state->error = json_parse_error_premature_end_of_buffer;
return 1;
}
/* can cache offset now. */
offset = state->offset;
switch (src[offset]) {
case '"':
return json_get_string_size(state, 0);
case '\'':
if (json_parse_flags_allow_single_quoted_strings & flags_bitset) {
return json_get_string_size(state, 0);
} else {
/* invalid value! */
state->error = json_parse_error_invalid_value;
return 1;
}
case '{':
return json_get_object_size(state, /* is_global_object = */ 0);
case '[':
return json_get_array_size(state);
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return json_get_number_size(state);
case '+':
if (json_parse_flags_allow_leading_plus_sign & flags_bitset) {
return json_get_number_size(state);
} else {
/* invalid value! */
state->error = json_parse_error_invalid_number_format;
return 1;
}
case '.':
if (json_parse_flags_allow_leading_or_trailing_decimal_point &
flags_bitset) {
return json_get_number_size(state);
} else {
/* invalid value! */
state->error = json_parse_error_invalid_number_format;
return 1;
}
default:
if ((offset + 4) <= size && 't' == src[offset + 0] &&
'r' == src[offset + 1] && 'u' == src[offset + 2] &&
'e' == src[offset + 3]) {
state->offset += 4;
return 0;
} else if ((offset + 5) <= size && 'f' == src[offset + 0] &&
'a' == src[offset + 1] && 'l' == src[offset + 2] &&
's' == src[offset + 3] && 'e' == src[offset + 4]) {
state->offset += 5;
return 0;
} else if ((offset + 4) <= size && 'n' == state->src[offset + 0] &&
'u' == state->src[offset + 1] &&
'l' == state->src[offset + 2] &&
'l' == state->src[offset + 3]) {
state->offset += 4;
return 0;
} else if ((json_parse_flags_allow_inf_and_nan & flags_bitset) &&
(offset + 3) <= size && 'N' == src[offset + 0] &&
'a' == src[offset + 1] && 'N' == src[offset + 2]) {
return json_get_number_size(state);
} else if ((json_parse_flags_allow_inf_and_nan & flags_bitset) &&
(offset + 8) <= size && 'I' == src[offset + 0] &&
'n' == src[offset + 1
gitextract_6ahg5_lo/ ├── .gitattributes ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── ------.md │ │ ├── aviutl--------------.md │ │ └── patch-aul------.md │ ├── pull_request_template.md │ └── workflows/ │ └── CI.yml ├── .gitignore ├── .gitmodules ├── COPYING ├── COPYING.LESSER ├── LICENSE ├── credits.md ├── patch/ │ ├── .editorconfig │ ├── add_dll_ref.hpp │ ├── clprogram.cl │ ├── config.hpp │ ├── config_rw.hpp │ ├── cryptostring.hpp │ ├── debug_log.hpp │ ├── gate.hpp │ ├── global.hpp │ ├── global_minimum.hpp │ ├── hash.hpp │ ├── init.cpp │ ├── init.hpp │ ├── json.h │ ├── macro.h │ ├── moduledata.hpp │ ├── multi_threading.hpp │ ├── mylua.hpp │ ├── mywindow.hpp │ ├── offset_address.hpp │ ├── overwrite_resource.cpp │ ├── overwrite_resource.hpp │ ├── packages.config │ ├── patch.cpp │ ├── patch.hpp │ ├── patch.rc │ ├── patch.vcxproj │ ├── patch.vcxproj.filters │ ├── patch_access_key.hpp │ ├── patch_add_extension.cpp │ ├── patch_add_extension.hpp │ ├── patch_alpha_bg.hpp │ ├── patch_aup_layer_setting.hpp │ ├── patch_aup_scene_setting.hpp │ ├── patch_aviutl_wndproc_override.cpp │ ├── patch_aviutl_wndproc_override.hpp │ ├── patch_base.hpp │ ├── patch_blend.cpp │ ├── patch_blend.hpp │ ├── patch_colorpalette_cache.hpp │ ├── patch_console.cpp │ ├── patch_console.hpp │ ├── patch_copybuffer_smem.hpp │ ├── patch_dialog_new_file.hpp │ ├── patch_exception_history.hpp │ ├── patch_exception_log.cpp │ ├── patch_exception_log.hpp │ ├── patch_exception_log_dialog.cpp │ ├── patch_exception_log_dialog.hpp │ ├── patch_exeditwindow_sizing.hpp │ ├── patch_exo_aviutlfilter.hpp │ ├── patch_exo_fold_gui.hpp │ ├── patch_exo_midpt_and_tra.hpp │ ├── patch_exo_sceneidx.hpp │ ├── patch_exo_specialcolorconv.hpp │ ├── patch_exo_trackminusval.cpp │ ├── patch_exo_trackminusval.hpp │ ├── patch_exo_trackparam.hpp │ ├── patch_failed_file_drop.hpp │ ├── patch_failed_longer_path.cpp │ ├── patch_failed_longer_path.hpp │ ├── patch_failed_sjis_msgbox.cpp │ ├── patch_failed_sjis_msgbox.hpp │ ├── patch_fast.hpp │ ├── patch_fast_border.cpp │ ├── patch_fast_border.hpp │ ├── patch_fast_cl.hpp │ ├── patch_fast_create_figure.cpp │ ├── patch_fast_create_figure.hpp │ ├── patch_fast_directionalblur.cpp │ ├── patch_fast_directionalblur.hpp │ ├── patch_fast_displacementmap.cpp │ ├── patch_fast_displacementmap.hpp │ ├── patch_fast_exeditwindow.cpp │ ├── patch_fast_exeditwindow.hpp │ ├── patch_fast_flash.cpp │ ├── patch_fast_flash.hpp │ ├── patch_fast_getputpixeldata.cpp │ ├── patch_fast_getputpixeldata.hpp │ ├── patch_fast_glow.cpp │ ├── patch_fast_glow.hpp │ ├── patch_fast_lensblur.cpp │ ├── patch_fast_lensblur.hpp │ ├── patch_fast_polortransform.cpp │ ├── patch_fast_polortransform.hpp │ ├── patch_fast_radiationalblur.cpp │ ├── patch_fast_radiationalblur.hpp │ ├── patch_fast_setting_dialog.cpp │ ├── patch_fast_setting_dialog.hpp │ ├── patch_fast_text.cpp │ ├── patch_fast_text.hpp │ ├── patch_fileinfo.hpp │ ├── patch_font_dialog.hpp │ ├── patch_helpful_msgbox.cpp │ ├── patch_helpful_msgbox.hpp │ ├── patch_ignore_media_param_reset.hpp │ ├── patch_lua.cpp │ ├── patch_lua.hpp │ ├── patch_lua_getvalueex.cpp │ ├── patch_lua_getvalueex.hpp │ ├── patch_lua_rand.cpp │ ├── patch_lua_rand.hpp │ ├── patch_lua_randex.cpp │ ├── patch_lua_randex.hpp │ ├── patch_obj_colorcorrection.cpp │ ├── patch_obj_colorcorrection.hpp │ ├── patch_obj_glow.hpp │ ├── patch_obj_lensblur.cpp │ ├── patch_obj_lensblur.hpp │ ├── patch_obj_noise.hpp │ ├── patch_obj_specialcolorconv.hpp │ ├── patch_playback_speed.hpp │ ├── patch_rclickmenu_delete.cpp │ ├── patch_rclickmenu_delete.hpp │ ├── patch_rclickmenu_split.cpp │ ├── patch_rclickmenu_split.hpp │ ├── patch_redo.cpp │ ├── patch_redo.hpp │ ├── patch_scroll_objdlg.hpp │ ├── patch_setting_dialog_excolorconfig.cpp │ ├── patch_setting_dialog_excolorconfig.hpp │ ├── patch_setting_dialog_move.hpp │ ├── patch_setting_dialog_wndproc_override.cpp │ ├── patch_setting_dialog_wndproc_override.hpp │ ├── patch_setting_gui.hpp │ ├── patch_setting_new_project.cpp │ ├── patch_setting_new_project.hpp │ ├── patch_splash.cpp │ ├── patch_splash.hpp │ ├── patch_susie_load.cpp │ ├── patch_susie_load.hpp │ ├── patch_sysinfo_write.hpp │ ├── patch_text_op_size.hpp │ ├── patch_theme_cc.hpp │ ├── patch_tra_aviutlfilter.hpp │ ├── patch_tra_change_drawfilter.cpp │ ├── patch_tra_change_drawfilter.hpp │ ├── patch_tra_specified_speed.hpp │ ├── patch_undo.cpp │ ├── patch_undo.hpp │ ├── resource.h │ ├── restorable_patch.hpp │ ├── stopwatch.hpp │ ├── timer.hpp │ ├── util.hpp │ ├── util_int.hpp │ ├── util_magic.hpp │ ├── util_others.cpp │ ├── util_others.hpp │ ├── util_pe.hpp │ ├── util_resource.hpp │ └── version.hpp ├── patch.aul.txt ├── patch.sln └── readme.md
SYMBOL INDEX (1203 symbols across 141 files)
FILE: patch/add_dll_ref.hpp
class add_dll_ref_t (line 22) | class add_dll_ref_t {
method dllmain_if_break (line 25) | bool dllmain_if_break() noexcept {
method add_ref (line 29) | void add_ref() noexcept {
FILE: patch/config.hpp
class Config2 (line 28) | class Config2 {
method load (line 32) | void load(std::wstring_view path) {
method store (line 300) | void store(std::wstring_view path) {
FILE: patch/config_rw.hpp
type config_type (line 33) | namespace config_type {
type ColorBGR (line 35) | struct ColorBGR {
method ColorBGR (line 43) | ColorBGR() : val{} {}
method ColorBGR (line 45) | ColorBGR(uint32_t x) : val(x) {
method ColorBGR (line 49) | ColorBGR(int b, int g, int r) :b(b), g(g), r(r), valid(1) {}
method ColorBGR (line 50) | ColorBGR(std::string_view x) {
method ColorBGR (line 63) | inline static ColorBGR from_rgb(uint32_t x) {
method to_col (line 72) | constexpr uint32_t to_col() const noexcept {
method to_col_rgb (line 75) | constexpr uint32_t to_col_rgb() const noexcept {
method to_string (line 83) | std::string to_string() const {
method to_jsonstring (line 86) | std::string to_jsonstring() const {
method is_valid (line 90) | constexpr bool is_valid() const noexcept {
type ColorBGR2_Opt (line 104) | struct ColorBGR2_Opt {
method ColorBGR2_Opt (line 106) | ColorBGR2_Opt() : ary{} {}
method ColorBGR2_Opt (line 107) | ColorBGR2_Opt(ColorBGR c1, ColorBGR c2) : ary{ c1,c2 } {}
method load (line 109) | inline void load(json_value_s* value) {
method to_jsonstring (line 142) | std::string to_jsonstring() const {
method has_value (line 152) | constexpr bool has_value() const {
method count (line 156) | constexpr int count() const {
type ColorBGR2 (line 163) | struct ColorBGR2 {
method ColorBGR2 (line 165) | ColorBGR2() : ary{} {}
method ColorBGR2 (line 166) | ColorBGR2(ColorBGR c1, ColorBGR c2) : ary{ c1,c2 } {}
method load (line 168) | inline void load(json_value_s* value) {
method to_jsonstring (line 188) | std::string to_jsonstring() const {
method has_value (line 194) | constexpr bool has_value() const {
method count (line 198) | constexpr int count() const {
type ColorBGR3 (line 204) | struct ColorBGR3 {
method ColorBGR3 (line 206) | ColorBGR3() : ary{} {}
method ColorBGR3 (line 207) | ColorBGR3(ColorBGR c1, ColorBGR c2, ColorBGR c3) : ary{ c1,c2,c3 } {}
method load (line 209) | inline void load(json_value_s* value) {
method has_value (line 228) | constexpr bool has_value() const {
method to_jsonstring (line 231) | std::string to_jsonstring() const {
function mytostring (line 245) | inline std::string mytostring(int x) {
function mytostring (line 252) | inline std::string mytostring(double x) {
class ConfigWriter (line 269) | class ConfigWriter {
type KeyAndValue (line 272) | struct KeyAndValue {
method WriteLevel (line 280) | inline static void WriteLevel(std::stringstream& ss, int level) {
method WriteBlockBegin (line 284) | inline static void WriteBlockBegin(std::stringstream& ss) {
method WriteBlockEnd (line 288) | inline static void WriteBlockEnd(std::stringstream& ss) {
method WriteKey (line 292) | inline static void WriteKey(std::stringstream& ss, std::string_view ke...
method WriteReturn (line 296) | inline static void WriteReturn(std::stringstream& ss) {
method ConfigWriter (line 302) | ConfigWriter(int level) : level(level) {}
method append (line 304) | void append(std::string_view key, std::string_view value) {
method append (line 309) | void append(std::string_view key, const T& value) {
method append (line 314) | void append(std::string_view key, bool value) {
method append (line 318) | void append(std::string_view key, const RECT& value) {
method append (line 323) | void append(std::string_view key, const std::array<int, N>& value) {
method append (line 340) | void append(std::string_view key, const T& value) {
method append (line 345) | void append(std::string_view key, const std::optional<T>& value) {
method write (line 351) | void write(std::stringstream& ss) const {
method get_level (line 372) | int get_level() const { return level; }
class ConfigReader (line 375) | class ConfigReader {
method ConfigReader (line 385) | ConfigReader(json_value_s* value) : value(value) {}
method load (line 387) | void load() {
method regist (line 399) | void regist(const std::string& str, T func) {
method load_variable (line 404) | inline static bool load_variable(json_value_s* jv, bool& value) {
method load_variable (line 417) | inline static bool load_variable(json_value_s* jv, Int& value) {
method load_variable (line 428) | inline static bool load_variable(json_value_s* jv, Float& value) {
method load_variable (line 438) | inline static void load_variable(json_value_s* jv, config_type::ColorB...
method load_variable (line 447) | inline static void load_variable(json_value_s* jv, std::optional<RECT>...
method load_variable (line 478) | inline static void load_variable(json_value_s* jv, std::optional<std::...
method load_variable (line 518) | inline static void load_variable(json_value_s* jv, T& value) {
method load_variable (line 523) | inline static void load_variable(json_value_s* jv, std::optional<T>& v...
FILE: patch/cryptostring.hpp
class cryptostring (line 27) | class cryptostring {
type KeyV (line 28) | struct KeyV {}
type KeyV<char> (line 29) | struct KeyV<char> { inline static constexpr char value = 0b00101101i8; }
type KeyV<wchar_t> (line 30) | struct KeyV<wchar_t> { inline static constexpr wchar_t value = 0b10010...
method T (line 33) | [[nodiscard]] constexpr static T bit_rotate_l(const T x, size_t a) {
method T (line 39) | [[nodiscard]] constexpr static T bit_rotate_r(const T x, size_t a) {
method cryptostring (line 47) | constexpr cryptostring(const CharT(&str)[N]) {
method CharT (line 51) | [[nodiscard]] CharT* get() {
method re_encrypt (line 59) | void re_encrypt() {
function make_cryptostring (line 68) | inline constexpr cryptostring<CharT, N> make_cryptostring(const CharT(&s...
FILE: patch/debug_log.hpp
class debug_log_t (line 22) | class debug_log_t {
FILE: patch/gate.hpp
class Gate (line 20) | class Gate {
method Gate (line 26) | Gate() :mtx{}, cond{}, flag{} {}
method Gate (line 28) | Gate(bool opened) :mtx{}, cond{}, flag{opened} {}
method open (line 30) | void open() {
method wait (line 39) | void wait() {
FILE: patch/global.hpp
type GLOBAL (line 24) | namespace GLOBAL {
FILE: patch/global_minimum.hpp
type GLOBAL (line 21) | namespace GLOBAL {
function init_minimum (line 26) | inline void init_minimum(HINSTANCE patch_hmod) {
FILE: patch/hash.hpp
type SHA256 (line 26) | struct SHA256 {
method Sigma0 (line 41) | static uint32_t Sigma0(uint32_t x) {
method Sigma1 (line 45) | static uint32_t Sigma1(uint32_t x) {
method sigma0 (line 49) | static uint32_t sigma0(uint32_t x) {
method sigma1 (line 53) | static uint32_t sigma1(uint32_t x) {
method Ch (line 57) | static uint32_t Ch(uint32_t x, uint32_t y, uint32_t z) {
method Maj (line 61) | static uint32_t Maj(uint32_t x, uint32_t y, uint32_t z) {
method SHA256 (line 69) | SHA256(std::string_view filename) {
method SHA256 (line 166) | constexpr SHA256(T&&... list) noexcept : data{ static_cast<std::byte>(...
method make_opt (line 168) | static std::optional<SHA256> make_opt(std::string_view filename) {
method tostring (line 177) | std::string tostring() const {
FILE: patch/init.cpp
function BOOL (line 306) | BOOL WINAPI init_t::EnumResourceLanguagesA_Wrap(HMODULE hModule, LPCSTR ...
function HMODULE (line 314) | HMODULE WINAPI init_t::LoadLibraryAWrap(LPCSTR lpLibFileName) {
function BOOL (line 402) | BOOL __cdecl init_t::func_WndProcWrap(HWND hwnd, UINT message, WPARAM wp...
function BOOL (line 423) | BOOL __cdecl init_t::func_initWrap(AviUtl::FilterPlugin* fp) {
function BOOL (line 450) | BOOL __cdecl init_t::func_procWrap(AviUtl::FilterPlugin* fp, AviUtl::Fil...
function HMODULE (line 459) | HMODULE WINAPI init_t::Boost_GetModuleHandleA_Wrap(LPCSTR lpModuleName) {
function HMODULE (line 467) | HMODULE WINAPI init_t::Boost_GetModuleHandleW_Wrap(LPCWSTR lpModuleName) {
function HMODULE (line 475) | HMODULE WINAPI init_t::Boost_LoadLibraryA_Wrap(LPCSTR lpLibFileName) {
function HMODULE (line 483) | HMODULE WINAPI init_t::Boost_LoadLibraryW_Wrap(LPCWSTR lpLibFileName) {
function BOOL (line 491) | BOOL WINAPI init_t::Boost_Module32First_Wrap(HANDLE hSnapshot, LPMODULEE...
function BOOL (line 499) | BOOL WINAPI init_t::Boost_Module32FirstW_Wrap(HANDLE hSnapshot, LPMODULE...
function BOOL (line 507) | BOOL WINAPI init_t::Boost_Module32Next_Wrap(HANDLE hSnapshot, LPMODULEEN...
function BOOL (line 515) | BOOL WINAPI init_t::Boost_Module32NextW_Wrap(HANDLE hSnapshot, LPMODULEE...
FILE: patch/init.hpp
class init_t (line 33) | class init_t {
FILE: patch/json.h
type json_value_s (line 64) | struct json_value_s
type json_parse_result_s (line 65) | struct json_parse_result_s
type json_parse_flags_e (line 67) | enum json_parse_flags_e {
type json_parse_result_s (line 155) | struct json_parse_result_s
type json_value_s (line 161) | struct json_value_s
type json_value_s (line 167) | struct json_value_s
type json_value_s (line 175) | struct json_value_s
type json_value_s (line 187) | struct json_value_s
type json_value_s (line 194) | struct json_value_s
type json_value_s (line 199) | struct json_value_s
type json_value_s (line 204) | struct json_value_s
type json_value_s (line 209) | struct json_value_s
type json_value_s (line 212) | struct json_value_s
type json_value_s (line 215) | struct json_value_s
type json_value_s (line 218) | struct json_value_s
type json_type_e (line 221) | enum json_type_e {
type json_string_s (line 232) | struct json_string_s {
type json_string_ex_s (line 240) | struct json_string_ex_s {
type json_number_s (line 255) | struct json_number_s {
type json_object_element_s (line 263) | struct json_object_element_s {
type json_object_s (line 273) | struct json_object_s {
type json_array_element_s (line 281) | struct json_array_element_s {
type json_array_s (line 289) | struct json_array_s {
type json_value_s (line 297) | struct json_value_s {
type json_value_ex_s (line 310) | struct json_value_ex_s {
type json_parse_error_e (line 325) | enum json_parse_error_e {
type json_parse_result_s (line 367) | struct json_parse_result_s {
type json_parse_state_s (line 445) | struct json_parse_state_s {
function json_hexadecimal_digit (line 461) | int json_hexadecimal_digit(const char c) {
function json_hexadecimal_value (line 476) | int json_hexadecimal_value(const char *c, const unsigned long size,
type json_parse_state_s (line 497) | struct json_parse_state_s
function json_skip_whitespace (line 498) | int json_skip_whitespace(struct json_parse_state_s *state) {
type json_parse_state_s (line 539) | struct json_parse_state_s
function json_skip_c_style_comments (line 540) | int json_skip_c_style_comments(struct json_parse_state_s *state) {
type json_parse_state_s (line 602) | struct json_parse_state_s
function json_skip_all_skippables (line 603) | int json_skip_all_skippables(struct json_parse_state_s *state) {
type json_parse_state_s (line 649) | struct json_parse_state_s
type json_parse_state_s (line 652) | struct json_parse_state_s
function json_get_string_size (line 654) | int json_get_string_size(struct json_parse_state_s *state, size_t is_key) {
function is_valid_unquoted_key_char (line 835) | int is_valid_unquoted_key_char(const char c) {
type json_parse_state_s (line 840) | struct json_parse_state_s
function json_get_key_size (line 841) | int json_get_key_size(struct json_parse_state_s *state) {
type json_parse_state_s (line 887) | struct json_parse_state_s
function json_get_object_size (line 889) | int json_get_object_size(struct json_parse_state_s *state,
type json_parse_state_s (line 1025) | struct json_parse_state_s
function json_get_array_size (line 1026) | int json_get_array_size(struct json_parse_state_s *state) {
type json_parse_state_s (line 1098) | struct json_parse_state_s
function json_get_number_size (line 1099) | int json_get_number_size(struct json_parse_state_s *state) {
type json_parse_state_s (line 1295) | struct json_parse_state_s
function json_get_value_size (line 1297) | int json_get_value_size(struct json_parse_state_s *state,
type json_parse_state_s (line 1402) | struct json_parse_state_s
type json_value_s (line 1404) | struct json_value_s
type json_parse_state_s (line 1406) | struct json_parse_state_s
type json_string_s (line 1407) | struct json_string_s
function json_parse_string (line 1408) | void json_parse_string(struct json_parse_state_s *state,
type json_parse_state_s (line 1538) | struct json_parse_state_s
type json_string_s (line 1539) | struct json_string_s
function json_parse_key (line 1540) | void json_parse_key(struct json_parse_state_s *state,
type json_parse_state_s (line 1578) | struct json_parse_state_s
type json_object_s (line 1580) | struct json_object_s
function json_parse_object (line 1581) | void json_parse_object(struct json_parse_state_s *state, int is_global_o...
type json_parse_state_s (line 1716) | struct json_parse_state_s
type json_array_s (line 1717) | struct json_array_s
function json_parse_array (line 1718) | void json_parse_array(struct json_parse_state_s *state,
type json_parse_state_s (line 1806) | struct json_parse_state_s
type json_number_s (line 1807) | struct json_number_s
function json_parse_number (line 1808) | void json_parse_number(struct json_parse_state_s *state,
type json_parse_state_s (line 1899) | struct json_parse_state_s
type json_value_s (line 1901) | struct json_value_s
function json_parse_value (line 1902) | void json_parse_value(struct json_parse_state_s *state, int is_global_ob...
type json_value_s (line 2002) | struct json_value_s
type json_parse_result_s (line 2005) | struct json_parse_result_s
type json_parse_state_s (line 2006) | struct json_parse_state_s
type json_value_s (line 2008) | struct json_value_s
type json_value_ex_s (line 2094) | struct json_value_ex_s
type json_value_ex_s (line 2094) | struct json_value_ex_s
type json_value_ex_s (line 2095) | struct json_value_ex_s
type json_value_s (line 2103) | struct json_value_s
type json_value_s (line 2104) | struct json_value_s
type json_value_s (line 2111) | struct json_value_s
type json_value_s (line 2114) | struct json_value_s
type json_extract_result_s (line 2119) | struct json_extract_result_s {
type json_value_s (line 2124) | struct json_value_s
type json_value_s (line 2124) | struct json_value_s
type json_number_s (line 2129) | struct json_number_s
type json_string_s (line 2131) | struct json_string_s
type json_object_s (line 2133) | struct json_object_s
type json_array_s (line 2135) | struct json_array_s
type json_value_s (line 2137) | struct json_value_s
function json_extract_get_number_size (line 2139) | struct json_extract_result_s
function json_extract_get_string_size (line 2147) | struct json_extract_result_s
function json_extract_get_object_size (line 2155) | struct json_extract_result_s
function json_extract_get_array_size (line 2183) | struct json_extract_result_s
function json_extract_get_value_size (line 2206) | struct json_extract_result_s
type json_extract_state_s (line 2236) | struct json_extract_state_s {
type json_extract_state_s (line 2241) | struct json_extract_state_s
type json_value_s (line 2242) | struct json_value_s
function json_extract_copy_value (line 2243) | void json_extract_copy_value(struct json_extract_state_s *const state,
type json_value_s (line 2345) | struct json_value_s
type json_value_s (line 2345) | struct json_value_s
type json_extract_result_s (line 2350) | struct json_extract_result_s
type json_extract_state_s (line 2351) | struct json_extract_state_s
type json_value_s (line 2373) | struct json_value_s
type json_string_s (line 2376) | struct json_string_s
type json_value_s (line 2376) | struct json_value_s
type json_string_s (line 2381) | struct json_string_s
type json_number_s (line 2384) | struct json_number_s
type json_value_s (line 2384) | struct json_value_s
type json_number_s (line 2389) | struct json_number_s
type json_object_s (line 2392) | struct json_object_s
type json_value_s (line 2392) | struct json_value_s
type json_object_s (line 2397) | struct json_object_s
type json_array_s (line 2400) | struct json_array_s
type json_value_s (line 2400) | struct json_value_s
type json_array_s (line 2405) | struct json_array_s
function json_value_is_true (line 2408) | int json_value_is_true(const struct json_value_s *const value) {
function json_value_is_false (line 2412) | int json_value_is_false(const struct json_value_s *const value) {
function json_value_is_null (line 2416) | int json_value_is_null(const struct json_value_s *const value) {
type json_value_s (line 2421) | struct json_value_s
type json_number_s (line 2424) | struct json_number_s
function json_write_get_number_size (line 2426) | int json_write_get_number_size(const struct json_number_s *number,
type json_string_s (line 2548) | struct json_string_s
function json_write_get_string_size (line 2550) | int json_write_get_string_size(const struct json_string_s *string,
type json_array_s (line 2576) | struct json_array_s
function json_write_minified_get_array_size (line 2578) | int json_write_minified_get_array_size(const struct json_array_s *array,
type json_object_s (line 2599) | struct json_object_s
function json_write_minified_get_object_size (line 2601) | int json_write_minified_get_object_size(const struct json_object_s *object,
type json_value_s (line 2629) | struct json_value_s
function json_write_minified_get_value_size (line 2631) | int json_write_minified_get_value_size(const struct json_value_s *value,
type json_value_s (line 2661) | struct json_value_s
type json_number_s (line 2664) | struct json_number_s
type json_number_s (line 2666) | struct json_number_s
type json_string_s (line 2847) | struct json_string_s
type json_string_s (line 2849) | struct json_string_s
type json_array_s (line 2895) | struct json_array_s
type json_array_s (line 2897) | struct json_array_s
type json_array_element_s (line 2898) | struct json_array_element_s
type json_object_s (line 2920) | struct json_object_s
type json_object_s (line 2922) | struct json_object_s
type json_object_element_s (line 2924) | struct json_object_element_s
type json_value_s (line 2955) | struct json_value_s
type json_value_s (line 2957) | struct json_value_s
type json_number_s (line 2963) | struct json_number_s
type json_string_s (line 2965) | struct json_string_s
type json_array_s (line 2967) | struct json_array_s
type json_object_s (line 2970) | struct json_object_s
type json_value_s (line 2994) | struct json_value_s
type json_value_s (line 3035) | struct json_value_s
type json_array_s (line 3040) | struct json_array_s
function json_write_pretty_get_array_size (line 3044) | int json_write_pretty_get_array_size(const struct json_array_s *array,
type json_object_s (line 3084) | struct json_object_s
function json_write_pretty_get_object_size (line 3087) | int json_write_pretty_get_object_size(const struct json_object_s *object,
type json_value_s (line 3127) | struct json_value_s
function json_write_pretty_get_value_size (line 3131) | int json_write_pretty_get_value_size(const struct json_value_s *value,
type json_value_s (line 3164) | struct json_value_s
type json_array_s (line 3168) | struct json_array_s
type json_array_s (line 3171) | struct json_array_s
type json_array_element_s (line 3175) | struct json_array_element_s
type json_object_s (line 3225) | struct json_object_s
type json_object_s (line 3228) | struct json_object_s
type json_object_element_s (line 3232) | struct json_object_element_s
type json_value_s (line 3294) | struct json_value_s
type json_value_s (line 3297) | struct json_value_s
type json_number_s (line 3305) | struct json_number_s
type json_string_s (line 3307) | struct json_string_s
type json_array_s (line 3309) | struct json_array_s
type json_object_s (line 3312) | struct json_object_s
type json_value_s (line 3336) | struct json_value_s
FILE: patch/moduledata.hpp
type ModulesDataEntry (line 32) | struct ModulesDataEntry {
function getModulesData (line 39) | inline static std::pair<std::vector<ModulesDataEntry>, std::string_view>...
class ModulesData (line 74) | class ModulesData {
method update (line 81) | static void update() {
FILE: patch/multi_threading.hpp
function init (line 26) | static void init() {
function get_thread_num (line 39) | auto get_thread_num() const {
FILE: patch/mylua.hpp
type lua_State (line 23) | struct lua_State
function lua_upvalueindex (line 33) | constexpr auto lua_upvalueindex(int i) { return LUA_GLOBALSINDEX - i; }
type luaL_Reg (line 56) | struct luaL_Reg {
function lua_isfunction (line 104) | inline bool lua_isfunction(lua_State* L, int index) { return lua_type(L,...
function lua_istable (line 105) | inline bool lua_istable(lua_State* L, int index) { return lua_type(L, in...
function lua_islightuserdata (line 106) | inline bool lua_islightuserdata(lua_State* L, int index) { return lua_ty...
function lua_isnil (line 107) | inline bool lua_isnil(lua_State* L, int index) { return lua_type(L, inde...
function lua_isboolean (line 108) | inline bool lua_isboolean(lua_State* L, int index) { return lua_type(L, ...
function lua_isthread (line 109) | inline bool lua_isthread(lua_State* L, int index) { return lua_type(L, i...
function lua_isnone (line 110) | inline bool lua_isnone(lua_State* L, int index) { return lua_type(L, ind...
function lua_isnoneornil (line 111) | inline bool lua_isnoneornil(lua_State* L, int index) { return lua_type(L...
function lua_tostring (line 114) | inline auto lua_tostring(lua_State* L, int i) { return lua_tolstring(L, ...
function luaL_checkstring (line 115) | inline auto luaL_checkstring(lua_State* L, int i) { return luaL_checklst...
function lua_pushcfunction (line 116) | inline auto lua_pushcfunction(lua_State* L, lua_CFunction f) { return lu...
function lua_pop (line 117) | inline auto lua_pop(lua_State* L, int n) { return lua_settop(L, -n - 1); }
function lua_setglobal (line 118) | inline auto lua_setglobal(lua_State* L, const char* s) { return lua_setf...
function lua_getglobal (line 119) | inline auto lua_getglobal(lua_State* L, const char* s) { return lua_getf...
function lua_newtable (line 120) | inline auto lua_newtable(lua_State* L) { return lua_createtable(L, 0, 0); }
function luaL_getmetatable (line 122) | inline auto luaL_getmetatable(lua_State* L, const char* tname) { return ...
FILE: patch/mywindow.hpp
class mywindow_t (line 27) | class mywindow_t {
method LRESULT (line 31) | inline static LRESULT CALLBACK wndproc(HWND hwnd, UINT message, WPARAM...
method init (line 53) | void init() {
method init (line 65) | void init() {}
FILE: patch/offset_address.hpp
type OFS (line 19) | namespace OFS {
type AviUtl (line 20) | namespace AviUtl {
type ExEdit (line 34) | namespace ExEdit {
FILE: patch/overwrite_resource.cpp
function HRSRC (line 22) | HRSRC WINAPI overwrite_resource_t::FindResourceA_Wrap(HMODULE hModule, L...
function HCURSOR (line 29) | HCURSOR WINAPI overwrite_resource_t::LoadCursorA_Wrap(HINSTANCE hInstanc...
function HICON (line 36) | HICON WINAPI overwrite_resource_t::LoadIconA_Wrap(HINSTANCE hInstance, L...
function HANDLE (line 43) | HANDLE WINAPI overwrite_resource_t::LoadImageA_Wrap(HINSTANCE hInst, LPC...
function HMENU (line 49) | HMENU WINAPI overwrite_resource_t::LoadMenuA_Wrap(HINSTANCE hInstance, L...
function INT_PTR (line 76) | INT_PTR WINAPI overwrite_resource_t::DialogBoxParamA_Wrap(HINSTANCE hIns...
function HWND (line 84) | HWND WINAPI overwrite_resource_t::CreateDialogParamA_Wrap(HINSTANCE hIns...
function BOOL (line 92) | BOOL APIENTRY overwrite_resource_t::GetSaveFileNameA_Wrap(LPOPENFILENAME...
function BOOL (line 102) | BOOL APIENTRY overwrite_resource_t::GetOpenFileNameA_Wrap(LPOPENFILENAME...
FILE: patch/overwrite_resource.hpp
class overwrite_resource_t (line 25) | class overwrite_resource_t {
method InitAtResourceLoaded (line 66) | static void InitAtResourceLoaded() {
FILE: patch/patch.cpp
function BOOL (line 24) | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserv...
FILE: patch/patch_access_key.hpp
type patch (line 23) | namespace patch {
class access_key_t (line 27) | class access_key_t {
type Menu (line 29) | struct Menu {
method find_menu (line 63) | inline static bool find_menu(HMENU hMenu, UINT id) {
method switching (line 87) | void switching(bool flag) {
method is_enabled (line 91) | bool is_enabled() { return enabled; }
method is_enabled_i (line 92) | bool is_enabled_i() { return enabled_i; }
method init (line 94) | void init() {
method switch_load (line 98) | void switch_load(ConfigReader& cr) {
method switch_store (line 104) | void switch_store(ConfigWriter& cw) {
method HMENU (line 109) | HMENU modify(LPCSTR key, HMENU hMenu) {
FILE: patch/patch_add_extension.cpp
type patch (line 19) | namespace patch {
FILE: patch/patch_add_extension.hpp
type patch (line 31) | namespace patch {
class add_extension_t (line 34) | class add_extension_t {
method init (line 47) | void init() {
method switching (line 81) | void switching(bool flag) {
method is_enabled (line 85) | bool is_enabled() { return enabled; }
method is_enabled_i (line 86) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 88) | void switch_load(ConfigReader& cr) {
method switch_store (line 94) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_alpha_bg.hpp
type patch (line 23) | namespace patch {
class alpha_bg_t (line 27) | class alpha_bg_t {
method BOOL (line 34) | static BOOL func_proc(AviUtl::FilterPlugin* fp, AviUtl::FilterProcIn...
method is_enabled (line 64) | bool is_enabled() { return enabled; }
method is_enabled_i (line 65) | bool is_enabled_i() { return enabled_i; }
method init (line 67) | bool init() {
method switch_load (line 71) | void switch_load(ConfigReader& cr) {
method switch_store (line 77) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_aup_layer_setting.hpp
type patch (line 27) | namespace patch {
class aup_layer_setting_t (line 36) | class aup_layer_setting_t {
method init (line 45) | void init() {
method switching (line 159) | void switching(bool flag) {
method is_enabled (line 163) | bool is_enabled() { return enabled; }
method is_enabled_i (line 164) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 166) | void switch_load(ConfigReader& cr) {
method switch_store (line 172) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_aup_scene_setting.hpp
type patch (line 27) | namespace patch {
class aup_scene_setting_t (line 30) | class aup_scene_setting_t {
method init (line 40) | void init() {
method switching (line 87) | void switching(bool flag) {
method is_enabled (line 91) | bool is_enabled() { return enabled; }
method is_enabled_i (line 92) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 94) | void switch_load(ConfigReader& cr) {
method switch_store (line 100) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_aviutl_wndproc_override.cpp
type patch (line 18) | namespace patch {
function LRESULT (line 19) | LRESULT CALLBACK aviutl_wndproc_override_t::wrap(HWND hwnd, UINT messa...
FILE: patch/patch_aviutl_wndproc_override.hpp
type patch (line 32) | namespace patch {
class aviutl_wndproc_override_t (line 35) | class aviutl_wndproc_override_t {
method go (line 45) | inline void go() {
FILE: patch/patch_base.hpp
type patch (line 18) | namespace patch {
class patch_base1 (line 19) | class patch_base1 {
method switch_true_to_false (line 25) | void switch_true_to_false() {}
method switch_false_to_true (line 27) | void switch_false_to_true() {}
method switch_enabled (line 29) | void switch_enabled(bool flag) {
class patch_base2 (line 40) | class patch_base2 : public patch_base1 {
method switch_enabled (line 46) | void switch_enabled(bool flag) {
method init (line 50) | void init(bool flag) {
FILE: patch/patch_blend.cpp
type patch (line 19) | namespace patch {
FILE: patch/patch_blend.hpp
type patch (line 31) | namespace patch {
class blend_t (line 34) | class blend_t {
method init (line 58) | void init() {
method switching (line 198) | void switching(bool flag) {
method is_enabled (line 202) | bool is_enabled() { return enabled; }
method is_enabled_i (line 203) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 205) | void switch_load(ConfigReader& cr) {
method switch_store (line 211) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_colorpalette_cache.hpp
type patch (line 24) | namespace patch {
class colorpalette_cache_t (line 27) | class colorpalette_cache_t {
method fix_size_2a6a (line 30) | inline static int __cdecl fix_size_2a6a(uintptr_t avi_file_handle) {
method switching (line 59) | void switching(bool flag) {
method is_enabled (line 63) | bool is_enabled() { return enabled; }
method is_enabled_i (line 64) | bool is_enabled_i() { return enabled_i; }
method init (line 66) | void init() {
method switch_load (line 101) | void switch_load(ConfigReader& cr) {
method switch_store (line 107) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_console.cpp
type patch (line 23) | namespace patch {
FILE: patch/patch_console.hpp
type patch (line 31) | namespace patch {
class console_t (line 34) | class console_t {
method exit (line 69) | void exit() {
method init (line 74) | void init() {
method init_at_exedit_init (line 115) | void init_at_exedit_init() {
method switching (line 126) | void switching(bool flag) {
method is_enabled (line 130) | bool is_enabled() { return enabled; }
method is_enabled_i (line 131) | bool is_enabled_i() { return enabled_i; }
method config_load (line 133) | void config_load(ConfigReader& cr) {
method config_store (line 138) | void config_store(ConfigWriter& cw) {
method switch_load (line 149) | void switch_load(ConfigReader& cr) {
method switch_store (line 167) | void switch_store(ConfigWriter& cw) {
method is_valid (line 176) | bool is_valid() const {
method menu_console (line 181) | void menu_console(HMENU aviutl_hmwnu_disp) {
method DWORD (line 201) | DWORD writeConsole(std::string_view str) {
method setConsoleTextAttribute (line 207) | void setConsoleTextAttribute(WORD wAttributes) {
method showWindow (line 211) | void showWindow(int nCmdShow) {
method front (line 216) | void front() const {
method update_visible_state (line 220) | void update_visible_state(HMENU aviutl_hmwnu_disp) {
method console_get_setting_rect (line 229) | void console_get_setting_rect(std::optional<RECT>& rect) const {
method update_showwindow (line 236) | void update_showwindow() {
FILE: patch/patch_copybuffer_smem.hpp
type patch (line 35) | namespace patch {
type copybuffer_smem_t (line 40) | struct copybuffer_smem_t {
type YCABuffer (line 43) | struct YCABuffer {
type BufferBasic (line 50) | struct BufferBasic{}
type BufferNamed (line 51) | struct BufferNamed : public BufferBasic {
type BufferObj (line 54) | struct BufferObj : public BufferBasic {}
type BufferFrm (line 55) | struct BufferFrm : public BufferBasic {}
type BufferTmp (line 56) | struct BufferTmp : public BufferBasic {}
type BufferCache (line 57) | struct BufferCache : public BufferNamed {}
type BufferImage (line 58) | struct BufferImage : public BufferNamed {}
type BufferId (line 61) | enum class BufferId {
method Buffer (line 66) | inline static Buffer getBufferIdAll(std::string_view name) {
method Buffer (line 95) | inline static Buffer getBufferIdDst(std::string_view name) {
method Buffer (line 113) | static Buffer getBufferIdFromReadonly(std::string_view name) {
type VisitorSrc (line 126) | struct VisitorSrc {
method copybuffer_override (line 168) | static int copybuffer_override(lua_State* L) {
FILE: patch/patch_dialog_new_file.hpp
type patch (line 24) | namespace patch {
class dlg_newfile_t (line 28) | class dlg_newfile_t {
method init (line 33) | void init() {
method switching (line 60) | void switching(bool flag) {
method is_enabled (line 64) | bool is_enabled() { return enabled; }
method is_enabled_i (line 65) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 67) | void switch_load(ConfigReader& cr) {
method switch_store (line 73) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_exception_history.hpp
type patch (line 22) | namespace patch {
type ExceptionHistoryEntry (line 25) | struct ExceptionHistoryEntry {
type Hash (line 28) | struct Hash {
method result_type (line 31) | result_type operator()(const ExceptionHistoryEntry& history) const {
type ExceptionHistory (line 43) | struct ExceptionHistory {
method check (line 48) | [[nodiscard]] bool check(const ExceptionHistoryEntry& key) {
FILE: patch/patch_exception_log.cpp
type patch (line 23) | namespace patch {
function BOOL (line 25) | BOOL __stdcall exception_log_t::override_exception_catch(EXCEPTION_POI...
FILE: patch/patch_exception_log.hpp
type patch (line 47) | namespace patch {
class exception_log_t (line 49) | class exception_log_t {
method exception_format_default (line 114) | static std::string exception_format_default(PEXCEPTION_RECORD erp) {
method format_eflags (line 122) | static std::string format_eflags(DWORD eflags) {
method format_registers (line 151) | static std::string format_registers(PCONTEXT cp) {
method get_module_address (line 185) | static std::tuple<std::string, DWORD> get_module_address(void* addre...
method get_log_name (line 199) | static auto get_log_name() {
method format_detail (line 217) | inline static std::string format_detail(EXCEPTION_POINTERS* pExp, co...
method format_stack (line 244) | inline static std::string format_stack(uint32_t start, uint8_t* stac...
method write_logfile (line 280) | static bool write_logfile(std::wstring& filename, std::string_view d...
FILE: patch/patch_exception_log_dialog.cpp
type patch (line 32) | namespace patch {
function INT_PTR (line 56) | INT_PTR CALLBACK exception_log_dialog_window_t::dialog_proc(HWND hwnd,...
FILE: patch/patch_exception_log_dialog.hpp
type patch (line 40) | namespace patch {
class exception_log_dialog_window_t (line 41) | class exception_log_dialog_window_t {
type Param (line 43) | struct Param {
method Param (line 50) | Param& operator=(const Param& x) {
method init (line 65) | static bool init() {
method update_window_detail (line 87) | void update_window_detail(HWND hwnd, bool flag) {
FILE: patch/patch_exeditwindow_sizing.hpp
type patch (line 26) | namespace patch {
class exeditwindow_sizing_t (line 29) | class exeditwindow_sizing_t {
method BOOL (line 35) | BOOL wndproc(WPARAM wparam, LPARAM lparam) {
method switching (line 70) | void switching(bool flag) {
method is_enabled (line 74) | bool is_enabled() { return enabled; }
method is_enabled_i (line 75) | bool is_enabled_i() { return enabled; }
method switch_load (line 77) | void switch_load(ConfigReader& cr) {
method switch_store (line 83) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_exo_aviutlfilter.hpp
type patch (line 31) | namespace patch {
class exo_aviutlfilter_t (line 35) | class exo_aviutlfilter_t {
method init (line 45) | void init() {
method switching (line 99) | void switching(bool flag) {
method is_enabled (line 106) | bool is_enabled() { return enabled; }
method is_enabled_i (line 107) | bool is_enabled_i() { return enabled; }
method switch_load (line 110) | void switch_load(ConfigReader& cr) {
method switch_store (line 116) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_exo_fold_gui.hpp
type patch (line 25) | namespace patch {
class exo_fold_gui_t (line 29) | class exo_fold_gui_t {
method init (line 38) | void init() {
method switching (line 130) | void switching(bool flag) {
method is_enabled (line 134) | bool is_enabled() { return enabled; }
method is_enabled_i (line 135) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 137) | void switch_load(ConfigReader& cr) {
method switch_store (line 143) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_exo_midpt_and_tra.hpp
type patch (line 22) | namespace patch {
class exo_midpt_and_tra_t (line 29) | class exo_midpt_and_tra_t {
method init (line 38) | void init() {
method switching (line 63) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 65) | bool is_enabled() { return enabled; }
method is_enabled_i (line 66) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 68) | void switch_load(ConfigReader& cr) {
method switch_store (line 74) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_exo_sceneidx.hpp
type patch (line 26) | namespace patch {
class exo_sceneidx_t (line 29) | class exo_sceneidx_t {
method init (line 40) | void init() {
method switching (line 51) | void switching(bool flag) {
method is_enabled (line 58) | bool is_enabled() { return enabled; }
method is_enabled_i (line 59) | bool is_enabled_i() { return enabled; }
method switch_load (line 61) | void switch_load(ConfigReader& cr) {
method switch_store (line 67) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_exo_specialcolorconv.hpp
type patch (line 24) | namespace patch {
class exo_specialcolorconv_t (line 27) | class exo_specialcolorconv_t {
method init (line 36) | void init() {
method switching (line 42) | void switching(bool flag) {
method is_enabled (line 46) | bool is_enabled() { return enabled; }
method is_enabled_i (line 47) | bool is_enabled_i() { return enabled; }
method switch_load (line 49) | void switch_load(ConfigReader& cr) {
method switch_store (line 55) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_exo_trackminusval.cpp
type patch (line 19) | namespace patch {
FILE: patch/patch_exo_trackminusval.hpp
type patch (line 31) | namespace patch {
class exo_trackminusval_t (line 34) | class exo_trackminusval_t {
method init (line 45) | void init() {
method switching (line 50) | void switching(bool flag) {
method is_enabled (line 54) | bool is_enabled() { return enabled; }
method is_enabled_i (line 55) | bool is_enabled_i() { return enabled; }
method switch_load (line 57) | void switch_load(ConfigReader& cr) {
method switch_store (line 63) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_exo_trackparam.hpp
type patch (line 26) | namespace patch {
class exo_trackparam_t (line 29) | class exo_trackparam_t {
method init (line 35) | void init() {
method switching (line 41) | void switching(bool flag) {
method is_enabled (line 45) | bool is_enabled() { return enabled; }
method is_enabled_i (line 46) | bool is_enabled_i() { return enabled; }
method switch_load (line 48) | void switch_load(ConfigReader& cr) {
method switch_store (line 54) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_failed_file_drop.hpp
type patch (line 26) | namespace patch {
class failed_file_drop_t (line 31) | class failed_file_drop_t {
method init (line 41) | void init() {
method switching (line 86) | void switching(bool flag) {
method is_enabled (line 90) | bool is_enabled() { return enabled; }
method is_enabled_i (line 91) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 93) | void switch_load(ConfigReader& cr) {
method switch_store (line 99) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_failed_longer_path.cpp
type patch (line 20) | namespace patch {
function BOOL (line 21) | BOOL __cdecl failed_longer_path_t::dlg_get_load_name_wrap(AviUtl::ExFu...
function UINT (line 34) | UINT __stdcall failed_longer_path_t::DragQueryFileA_exedit_wrap(HDROP ...
function UINT (line 44) | UINT __stdcall failed_longer_path_t::DragQueryFileA_settingdialog_wrap...
FILE: patch/patch_failed_longer_path.hpp
type patch (line 26) | namespace patch {
class failed_longer_path_t (line 33) | class failed_longer_path_t {
method init (line 46) | void init() {
method switching (line 92) | void switching(bool flag) {
method is_enabled (line 96) | bool is_enabled() { return enabled; }
method is_enabled_i (line 97) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 99) | void switch_load(ConfigReader& cr) {
method switch_store (line 105) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_failed_sjis_msgbox.cpp
type patch (line 20) | namespace patch {
FILE: patch/patch_failed_sjis_msgbox.hpp
type patch (line 26) | namespace patch {
class failed_sjis_msgbox_t (line 35) | class failed_sjis_msgbox_t {
method init (line 45) | void init() {
method switching (line 76) | void switching(bool flag) {
method is_enabled (line 80) | bool is_enabled() { return enabled; }
method is_enabled_i (line 81) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 83) | void switch_load(ConfigReader& cr) {
method switch_store (line 89) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast.hpp
type patch::fast (line 3) | namespace patch::fast {
class fast_t (line 4) | class fast_t {
method init (line 11) | void init() {
method switching (line 15) | void switching(bool flag) {
method is_enabled (line 19) | bool is_enabled() { return enabled; }
method is_enabled_i (line 20) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 22) | void switch_load(ConfigReader& cr) {
method switch_store (line 28) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_border.cpp
type patch::fast (line 31) | namespace patch::fast {
function BOOL (line 36) | BOOL enable_avx2() {
function BOOL (line 49) | BOOL Border_t::func_proc(ExEdit::Filter* efp, ExEdit::FilterProcInfo* ...
function efBorder_horizontal_convolution_alpha_simd (line 149) | void efBorder_horizontal_convolution_alpha_simd(int thread_id, int thr...
function efBorder_horizontal_convolution_alpha_simd2 (line 256) | void efBorder_horizontal_convolution_alpha_simd2(int thread_id, int th...
function efBorder_vertical_convolution_alpha_and_put_color_simd (line 348) | void efBorder_vertical_convolution_alpha_and_put_color_simd(int thread...
function efBorder_vertical_convolution_alpha_and_put_color_simd2 (line 462) | void efBorder_vertical_convolution_alpha_and_put_color_simd2(int threa...
function efBorder_vertical_convolution_alpha_simd (line 561) | void efBorder_vertical_convolution_alpha_simd(int thread_id, int threa...
function efBorder_vertical_convolution_alpha_simd2 (line 687) | void efBorder_vertical_convolution_alpha_simd2(int thread_id, int thre...
FILE: patch/patch_fast_border.hpp
type patch::fast (line 29) | namespace patch::fast {
class Border_t (line 32) | class Border_t {
type efBorder_var (line 41) | struct efBorder_var { // 1b1e30
method init (line 57) | void init() {
method switching (line 64) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 66) | bool is_enabled() { return enabled; }
method is_enabled_i (line 67) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 69) | void switch_load(ConfigReader& cr) {
method switch_store (line 75) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_cl.hpp
type patch::fast (line 46) | namespace patch::fast {
class cl_t (line 48) | class cl_t {
method KernelSetArg (line 1187) | static void KernelSetArg(cl::Kernel& kernel, Head head) {
method KernelSetArg (line 1192) | static void KernelSetArg(cl::Kernel& kernel, Head head, Tail... tail) {
type State (line 1212) | enum class State {
method cl_t (line 1218) | cl_t() :state(State::NotYet), CLLib(NULL) {}
method init (line 1227) | bool init() {
method readyKernel (line 1341) | cl::Kernel readyKernel(std::string_view name, Args&&... args) {
method switching (line 1348) | void switching(bool flag) {
method is_enabled (line 1352) | bool is_enabled() { return enabled; }
method is_enabled_i (line 1353) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 1355) | void switch_load(ConfigReader& cr) {
method switch_store (line 1361) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_create_figure.cpp
type patch::fast (line 24) | namespace patch::fast {
FILE: patch/patch_fast_create_figure.hpp
type patch::fast (line 29) | namespace patch::fast {
class CreateFigure_t (line 32) | class CreateFigure_t {
type CreateFigure_var (line 42) | struct CreateFigure_var { // 1e4798
method init (line 60) | void init() {
method switching (line 79) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 81) | bool is_enabled() { return enabled; }
method is_enabled_i (line 82) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 84) | void switch_load(ConfigReader& cr) {
method switch_store (line 90) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_directionalblur.cpp
type patch::fast (line 25) | namespace patch::fast {
function BOOL (line 28) | BOOL __cdecl DirectionalBlur_t::func_proc(ExEdit::Filter* efp, ExEdit:...
FILE: patch/patch_fast_directionalblur.hpp
type patch::fast (line 25) | namespace patch::fast {
class DirectionalBlur_t (line 28) | class DirectionalBlur_t {
type efDirectionalBlur_var (line 37) | struct efDirectionalBlur_var { // d75cc
method init (line 48) | void init() {
method switch_load (line 62) | void switch_load(ConfigReader& cr) {
method switch_store (line 68) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_displacementmap.cpp
type patch::fast (line 32) | namespace patch::fast {
function BOOL (line 33) | BOOL DisplacementMap_t::mt_func(AviUtl::MultiThreadFunc original_func_...
FILE: patch/patch_fast_displacementmap.hpp
type patch::fast (line 29) | namespace patch::fast {
class DisplacementMap_t (line 32) | class DisplacementMap_t {
type efDisplacementMap_var (line 43) | struct efDisplacementMap_var { // 11effc
method init (line 51) | void init() {
method switching (line 61) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 63) | bool is_enabled() { return enabled; }
method is_enabled_i (line 64) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 66) | void switch_load(ConfigReader& cr) {
method switch_store (line 72) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_exeditwindow.cpp
type patch (line 25) | namespace patch {
function HDC (line 224) | HDC WINAPI fast_exeditwindow_t::GetDC_Wrap(HWND hwnd) {
FILE: patch/patch_fast_exeditwindow.hpp
type patch (line 24) | namespace patch {
class fast_exeditwindow_t (line 27) | class fast_exeditwindow_t {
method init (line 48) | void init() {
method switching (line 88) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 90) | bool is_enabled() { return enabled; }
method is_enabled_i (line 91) | bool is_enabled_i() { return enabled_i; }
method set_step (line 93) | void set_step(int x) { step = x; }
method get_step (line 95) | int get_step() { return step; }
method get_step_i (line 96) | int get_step_i() { return step_i; }
method switch_load (line 98) | void switch_load(ConfigReader& cr) {
method switch_store (line 104) | void switch_store(ConfigWriter& cw) {
method config_load (line 108) | void config_load(ConfigReader& cr) {
method config_store (line 114) | void config_store(ConfigWriter& cw) {
FILE: patch/patch_fast_flash.cpp
type patch::fast (line 25) | namespace patch::fast {
function BOOL (line 29) | BOOL Flash_t::func_proc(ExEdit::Filter* efp, ExEdit::FilterProcInfo* e...
FILE: patch/patch_fast_flash.hpp
type patch::fast (line 25) | namespace patch::fast {
class Flash_t (line 28) | class Flash_t {
type efFlash_var (line 36) | struct efFlash_var { // 1a6b7c
method init (line 54) | void init() {
method switch_load (line 62) | void switch_load(ConfigReader& cr) {
method switch_store (line 68) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_getputpixeldata.cpp
type patch::fast (line 24) | namespace patch::fast {
function BOOL (line 25) | static BOOL BufCpyBGRA2YCA(void* dst, void* src, int w, int h, int lin...
function BOOL (line 30) | static BOOL BufCpyYCA2BGRA(void* dst, void* src, int w, int h, int lin...
function avx_putpixeldata_old (line 163) | int avx_putpixeldata_old(lua_State* L) {
FILE: patch/patch_fast_getputpixeldata.hpp
type patch::fast (line 27) | namespace patch::fast {
class getputpixeldata_t (line 31) | class getputpixeldata_t {
FILE: patch/patch_fast_glow.cpp
type patch::fast (line 29) | namespace patch::fast {
type fastGlow256 (line 60) | struct fastGlow256 {
function fg256_add (line 67) | void __declspec(noinline) __fastcall fg256_add(fastGlow256* fg256, ExE...
function fg256_sub (line 77) | void __declspec(noinline) __fastcall fg256_sub(fastGlow256* fg256, ExE...
function fg256_put_average (line 88) | void __declspec(noinline) __fastcall fg256_put_average(fastGlow256* fg...
function fg_put256_weight (line 101) | void __declspec(noinline) __fastcall fg_put256_weight(fastGlow256* fg2...
type fastGlow128 (line 135) | struct fastGlow128 {
function fg_put128_weight (line 139) | void __declspec(noinline) __fastcall fg_put128_weight(fastGlow128* fg1...
type ExEdit::PixelYCA (line 166) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 171) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 171) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 171) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 171) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 171) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 171) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 171) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 176) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 178) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 191) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 201) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 208) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 215) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 217) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 273) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 379) | struct ExEdit::PixelYCA
function vertical_convolution_intensity_main (line 479) | void vertical_convolution_intensity_main(int thi, int thn, int n, ExEd...
function horizontal_convolution_intensity_main (line 581) | void horizontal_convolution_intensity_main(int thi, int thn, int n, Ex...
FILE: patch/patch_fast_glow.hpp
type patch::fast (line 28) | namespace patch::fast {
class Glow_t (line 37) | class Glow_t {
type efGlow_var (line 57) | struct efGlow_var { // 1b2010
method init (line 75) | void init() {
method switching (line 211) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 213) | bool is_enabled() { return enabled; }
method is_enabled_i (line 214) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 216) | void switch_load(ConfigReader& cr) {
method switch_store (line 222) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_lensblur.cpp
type patch::fast (line 25) | namespace patch::fast {
function BOOL (line 28) | BOOL LensBlur_t::media_mt_func(AviUtl::MultiThreadFunc original_func_p...
function BOOL (line 72) | BOOL LensBlur_t::filter_mt_func(AviUtl::MultiThreadFunc original_func_...
FILE: patch/patch_fast_lensblur.hpp
type patch::fast (line 25) | namespace patch::fast {
class LensBlur_t (line 28) | class LensBlur_t {
type efLensBlur_var (line 36) | struct efLensBlur_var { // 11ec5c
method init (line 43) | void init() {
method switching (line 59) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 61) | bool is_enabled() { return enabled; }
method is_enabled_i (line 62) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 64) | void switch_load(ConfigReader& cr) {
method switch_store (line 70) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_polortransform.cpp
type patch::fast (line 32) | namespace patch::fast {
function BOOL (line 33) | BOOL PolorTransform_t::mt_func(AviUtl::MultiThreadFunc original_func_p...
FILE: patch/patch_fast_polortransform.hpp
type patch::fast (line 29) | namespace patch::fast {
class PolorTransform_t (line 32) | class PolorTransform_t {
type efPolorTransform_var (line 41) | struct efPolorTransform_var { // 1e48c0
method init (line 53) | void init() {
method switching (line 63) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 65) | bool is_enabled() { return enabled; }
method is_enabled_i (line 66) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 68) | void switch_load(ConfigReader& cr) {
method switch_store (line 74) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_radiationalblur.cpp
type patch::fast (line 25) | namespace patch::fast {
function BOOL (line 28) | BOOL RadiationalBlur_t::media_mt_func(AviUtl::MultiThreadFunc original...
function BOOL (line 74) | BOOL RadiationalBlur_t::filter_mt_func(AviUtl::MultiThreadFunc origina...
function BOOL (line 113) | BOOL RadiationalBlur_t::filter_mt_far_func(AviUtl::MultiThreadFunc ori...
FILE: patch/patch_fast_radiationalblur.hpp
type patch::fast (line 25) | namespace patch::fast {
class RadiationalBlur_t (line 28) | class RadiationalBlur_t {
type efRadiationalBlur_var (line 38) | struct efRadiationalBlur_var { // d75a8
method init (line 49) | void init() {
method switching (line 77) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 79) | bool is_enabled() { return enabled; }
method is_enabled_i (line 80) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 82) | void switch_load(ConfigReader& cr) {
method switch_store (line 88) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_setting_dialog.cpp
type patch (line 24) | namespace patch {
function BOOL (line 38) | BOOL __cdecl fast_setting_dialog_t::FUN_100305e0_Wrap(int param1) {
function BOOL (line 57) | BOOL __cdecl fast_setting_dialog_t::FUN_100305e0_Wrap2(int param1) {
FILE: patch/patch_fast_setting_dialog.hpp
type patch (line 25) | namespace patch {
class fast_setting_dialog_t (line 28) | class fast_setting_dialog_t {
method init (line 45) | void init() {
method switching (line 80) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 82) | bool is_enabled() { return enabled; }
method is_enabled_i (line 83) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 85) | void switch_load(ConfigReader& cr) {
method switch_store (line 91) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fast_text.cpp
type patch::fast (line 22) | namespace patch::fast {
function HFONT (line 24) | HFONT __cdecl text_t::MyCreateFont(const char* fontname, int height, i...
function HFONT (line 53) | HFONT WINAPI text_t::CreateFontIndirectW(const LOGFONTW* lplf) {
function DWORD (line 70) | DWORD WINAPI text_t::GetGlyphOutlineW(HDC hdc, UINT uChar, UINT fuForm...
function BOOL (line 115) | BOOL WINAPI text_t::DeleteObject(HGDIOBJ ho) {
FILE: patch/patch_fast_text.hpp
type patch::fast (line 33) | namespace patch::fast {
type text_detail (line 34) | namespace text_detail {
function gettime (line 35) | inline auto gettime() {
type GlyphKey (line 41) | struct GlyphKey {
type GlyphValue (line 51) | struct GlyphValue {
method GlyphValue (line 56) | GlyphValue(DWORD size_, time_t time_, LPGLYPHMETRICS lpgm_, void* ...
type FontValue (line 66) | struct FontValue {
method FontValue (line 71) | FontValue(HFONT font_) : font(font_), last_use(gettime()), glyph_m...
type comp_fontkey (line 110) | struct comp_fontkey {
class text_t (line 117) | class text_t {
method init (line 145) | void init() {
method switching (line 159) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 161) | bool is_enabled() { return enabled; }
method is_enabled_i (line 162) | bool is_enabled_i() { return enabled_i; }
method config_load (line 164) | void config_load(ConfigReader& cr) {
method config_store (line 170) | void config_store(ConfigWriter& cw) {
method switch_load (line 174) | void switch_load(ConfigReader& cr) {
method switch_store (line 180) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_fileinfo.hpp
type patch (line 25) | namespace patch {
class fileinfo_t (line 29) | class fileinfo_t {
method init (line 34) | void init() {
method switching (line 53) | void switching(bool flag) {
method is_enabled (line 57) | bool is_enabled() { return enabled; }
method is_enabled_i (line 58) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 60) | void switch_load(ConfigReader& cr) {
method switch_store (line 66) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_font_dialog.hpp
type patch (line 23) | namespace patch {
class font_dialog_t (line 27) | class font_dialog_t {
method init (line 36) | void init() {
method switching (line 63) | void switching(bool flag) {
method is_enabled (line 67) | bool is_enabled() { return enabled; }
method is_enabled_i (line 68) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 70) | void switch_load(ConfigReader& cr) {
method switch_store (line 76) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_helpful_msgbox.cpp
type patch (line 19) | namespace patch {
FILE: patch/patch_helpful_msgbox.hpp
type patch (line 31) | namespace patch {
class helpful_msgbox_t (line 35) | class helpful_msgbox_t {
type MessageData (line 37) | struct MessageData {
method init (line 67) | void init() {
method switching (line 78) | void switching(bool flag) {
method is_enabled (line 82) | bool is_enabled() { return enabled; }
method is_enabled_i (line 83) | bool is_enabled_i() { return enabled; }
method switch_load (line 85) | void switch_load(ConfigReader& cr) {
method switch_store (line 91) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_ignore_media_param_reset.hpp
type patch (line 24) | namespace patch {
class ignore_media_param_reset_t (line 27) | class ignore_media_param_reset_t {
method init (line 37) | void init() {
method switching (line 45) | void switching(bool flag) {
method is_enabled (line 51) | bool is_enabled() { return enabled; }
method is_enabled_i (line 52) | bool is_enabled_i() { return enabled; }
method switch_load (line 54) | void switch_load(ConfigReader& cr) {
method switch_store (line 60) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_lua.cpp
type patch (line 29) | namespace patch {
function assign_to_luastate (line 31) | static void assign_to_luastate(lua_State* L) {
function BOOL (line 128) | BOOL __cdecl lua_t::luaUpdatePath(lua_State* L) {
function BOOL (line 165) | BOOL __cdecl lua_t::DoScriptInit() {
function BOOL (line 172) | BOOL __cdecl lua_t::DoScriptExit() {
FILE: patch/patch_lua.hpp
type patch (line 31) | namespace patch {
class lua_t (line 34) | class lua_t {
type env (line 35) | struct env {
method load (line 73) | static void load() {
method store (line 87) | static void store() {
method init (line 128) | void init() {
method switching (line 171) | void switching(bool flag) {
method is_enabled (line 175) | bool is_enabled() { return enabled; }
method is_enabled_i (line 176) | bool is_enabled_i() { return enabled_i; }
method get_env (line 178) | bool get_env() { return env; }
method get_env_i (line 179) | bool get_env_i() { return env_i; }
method set_env (line 180) | void set_env(bool x) { env = x; }
method get_path (line 182) | bool get_path() { return path; }
method get_path_i (line 183) | bool get_path_i() { return path_i; }
method set_path (line 184) | void set_path(bool x) { path = x; }
method switch_load (line 186) | void switch_load(ConfigReader& cr) {
method switch_store (line 198) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_lua_getvalueex.cpp
type patch (line 21) | namespace patch {
FILE: patch/patch_lua_getvalueex.hpp
type patch (line 28) | namespace patch {
class lua_getvalueex_t (line 30) | class lua_getvalueex_t {
method init (line 41) | void init() {
method require (line 45) | inline static void require(lua_State* L) {
method switching (line 53) | void switching(bool flag) {
method is_enabled (line 57) | bool is_enabled() { return enabled; }
method is_enabled_i (line 58) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 61) | void switch_load(ConfigReader& cr) {
method switch_store (line 67) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_lua_rand.cpp
type patch (line 24) | namespace patch {
FILE: patch/patch_lua_rand.hpp
type patch (line 24) | namespace patch {
class lua_rand_t (line 26) | class lua_rand_t {
method init (line 34) | void init() {
method require (line 38) | static void require(lua_State* L) {
method switching (line 45) | void switching(bool flag) {
method is_enabled (line 49) | bool is_enabled() { return enabled; }
method is_enabled_i (line 50) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 52) | void switch_load(ConfigReader& cr) {
method switch_store (line 58) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_lua_randex.cpp
type patch (line 24) | namespace patch {
FILE: patch/patch_lua_randex.hpp
type patch (line 26) | namespace patch {
class lua_randex_t (line 28) | class lua_randex_t {
type Xoshiro128pp (line 29) | struct Xoshiro128pp {
method Xoshiro128pp (line 31) | Xoshiro128pp(unsigned int seed1, unsigned int seed2) : s{ seed1,se...
method calc (line 34) | uint32_t calc() {
method calc (line 46) | int calc(int s, int e) {
method setmetatable (line 56) | static void setmetatable(lua_State* L, int index) {
method Xoshiro128pp (line 61) | static Xoshiro128pp* create_object(lua_State* L, int seed, int time) {
method Xoshiro128pp (line 31) | Xoshiro128pp(unsigned int seed1, unsigned int seed2) : s{ seed1,se...
method calc (line 34) | uint32_t calc() {
method calc (line 46) | int calc(int s, int e) {
method init (line 72) | void init() {
method require (line 76) | static void require(lua_State* L) {
method switching (line 96) | void switching(bool flag) {
method is_enabled (line 100) | bool is_enabled() { return enabled; }
method is_enabled_i (line 101) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 103) | void switch_load(ConfigReader& cr) {
method switch_store (line 109) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_obj_colorcorrection.cpp
type patch (line 21) | namespace patch {
function rgb2hsv_12 (line 23) | void rgb2hsv_12(int r, int g, int b, int* h, int* s, int* v) {
function yc2rgb_12 (line 69) | void yc2rgb_12(int y, int cb, int cr, int* r, int* g, int* b) {
function yc2hsv_12 (line 74) | void yc2hsv_12(int y, int cb, int cr, int* h, int* s, int* v) {
function hsv2rgb_12 (line 81) | void hsv2rgb_12(int h, int s, int v, int* r, int* g, int* b) {
function rgb2yc_12 (line 197) | void rgb2yc_12(int r, int g, int b, int* y, int* cb, int* cr) {
function hsv2yc_12 (line 202) | void hsv2yc_12(int h, int s, int v, int* y, int* cb, int* cr) {
FILE: patch/patch_obj_colorcorrection.hpp
type patch (line 27) | namespace patch {
class obj_ColorCorrection_t (line 32) | class obj_ColorCorrection_t {
method init (line 40) | void init() {
method switching (line 167) | void switching(bool flag) {
method is_enabled (line 171) | bool is_enabled() { return enabled; }
method is_enabled_i (line 172) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 174) | void switch_load(ConfigReader& cr) {
method switch_store (line 180) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_obj_glow.hpp
type patch (line 27) | namespace patch {
class obj_Glow_t (line 41) | class obj_Glow_t {
method init (line 49) | void init() {
method switching (line 143) | void switching(bool flag) {
method is_enabled (line 147) | bool is_enabled() { return enabled; }
method is_enabled_i (line 148) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 150) | void switch_load(ConfigReader& cr) {
method switch_store (line 156) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_obj_lensblur.cpp
type patch (line 19) | namespace patch {
type PixelYC_fbb (line 45) | struct PixelYC_fbb {
type ExEdit::PixelYCA (line 52) | struct ExEdit::PixelYCA
type ExEdit::PixelYCA (line 53) | struct ExEdit::PixelYCA
type AviUtl::PixelYC (line 91) | struct AviUtl::PixelYC
type AviUtl::PixelYC (line 92) | struct AviUtl::PixelYC
FILE: patch/patch_obj_lensblur.hpp
type patch (line 27) | namespace patch {
class obj_LensBlur_t (line 42) | class obj_LensBlur_t {
type lbResize_var (line 49) | struct lbResize_var { // 1e42c0
method init (line 84) | void init() {
method switching (line 154) | void switching(bool flag) {
method is_enabled (line 158) | bool is_enabled() { return enabled; }
method is_enabled_i (line 159) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 161) | void switch_load(ConfigReader& cr) {
method switch_store (line 167) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_obj_noise.hpp
type patch (line 26) | namespace patch {
class obj_Noise_t (line 30) | class obj_Noise_t {
method init (line 35) | void init() {
method switching (line 66) | void switching(bool flag) {
method is_enabled (line 70) | bool is_enabled() { return enabled; }
method is_enabled_i (line 71) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 73) | void switch_load(ConfigReader& cr) {
method switch_store (line 79) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_obj_specialcolorconv.hpp
type patch (line 26) | namespace patch {
class obj_specialcolorconv_t (line 43) | class obj_specialcolorconv_t {
method init (line 52) | void init() {
method switching (line 131) | void switching(bool flag) {
method is_enabled (line 135) | bool is_enabled() { return enabled; }
method is_enabled_i (line 136) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 138) | void switch_load(ConfigReader& cr) {
method switch_store (line 144) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_playback_speed.hpp
type patch (line 24) | namespace patch {
class playback_speed_t (line 28) | class playback_speed_t {
method init (line 33) | void init() {
method switching (line 57) | void switching(bool flag) {
method is_enabled (line 61) | bool is_enabled() { return enabled; }
method is_enabled_i (line 62) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 64) | void switch_load(ConfigReader& cr) {
method switch_store (line 70) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_rclickmenu_delete.cpp
type patch (line 19) | namespace patch {
FILE: patch/patch_rclickmenu_delete.hpp
type patch (line 31) | namespace patch {
class rclickmenu_delete_t (line 35) | class rclickmenu_delete_t {
method init (line 53) | void init() {
method switching (line 66) | void switching(bool flag) {
method is_enabled (line 70) | bool is_enabled() { return enabled; }
method is_enabled_i (line 71) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 73) | void switch_load(ConfigReader& cr) {
method switch_store (line 79) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_rclickmenu_split.cpp
type patch (line 19) | namespace patch {
FILE: patch/patch_rclickmenu_split.hpp
type patch (line 31) | namespace patch {
class rclickmenu_split_t (line 34) | class rclickmenu_split_t {
method init (line 47) | void init() {
method switching (line 56) | void switching(bool flag) {
method is_enabled (line 60) | bool is_enabled() { return enabled; }
method is_enabled_i (line 61) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 63) | void switch_load(ConfigReader& cr) {
method switch_store (line 69) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_redo.cpp
type patch (line 20) | namespace patch {
FILE: patch/patch_redo.hpp
type patch (line 24) | namespace patch {
class redo_t (line 25) | class redo_t {
type UndoData (line 30) | struct UndoData {
method add_scene_idx (line 70) | static void add_scene_idx() {
method get_scene_idx_UndoData (line 79) | static int get_scene_idx_UndoData(int undo_id) {
method shift_undo_buffer (line 90) | static void shift_undo_buffer(int id) {
method remove_UndoData (line 113) | static void remove_UndoData(int id) {
method remove_old_UndoData (line 121) | static void remove_old_UndoData(int id) {
method move_UndoData (line 130) | static void move_UndoData(int id1, int id2) {
method integrate_undodata (line 136) | static void integrate_undodata(int id1, int id2) {
method optimize_new_undo_buffer (line 172) | static void optimize_new_undo_buffer() {
method remove_emptiness_UndoData (line 186) | static void remove_emptiness_UndoData() {
method move_redo_data (line 254) | static void move_redo_data() {
method AllocUndoBuffer_patch (line 278) | static void __stdcall AllocUndoBuffer_patch(int num) {
method optimize_undo_data (line 286) | static void optimize_undo_data() {
method optimize_newer_undo_data (line 319) | static void optimize_newer_undo_data() {
method reverse_UndoDataPtrArray (line 355) | static void reverse_UndoDataPtrArray() {
method init (line 392) | void init() {
method run_redo (line 600) | static void run_redo() {
method switching (line 622) | void switching(bool flag) {
method is_enabled (line 626) | bool is_enabled() { return enabled; }
method is_enabled_i (line 627) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 629) | void switch_load(ConfigReader& cr) {
method switch_store (line 638) | void switch_store(ConfigWriter& cw) {
method config_load (line 642) | void config_load(ConfigReader& cr) {
method config_store (line 648) | void config_store(ConfigWriter& cw) {
FILE: patch/patch_scroll_objdlg.hpp
type patch (line 25) | namespace patch {
class scroll_objdlg_t (line 28) | class scroll_objdlg_t {
method movewindow (line 30) | static void movewindow(HWND hwnd, int x, int y) {
method LRESULT (line 36) | static LRESULT CALLBACK a(HWND hwnd, UINT message, WPARAM wparam, LP...
method init (line 100) | void init() {
method switching (line 108) | void switching(bool flag) {
method is_enabled (line 112) | bool is_enabled() { return enabled; }
method is_enabled_i (line 113) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 115) | void switch_load(ConfigReader& cr) {
method switch_store (line 121) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_setting_dialog_excolorconfig.cpp
type patch (line 21) | namespace patch {
FILE: patch/patch_setting_dialog_excolorconfig.hpp
type patch (line 25) | namespace patch {
class excolorconfig_t (line 28) | class excolorconfig_t {
method init (line 39) | void init() {
method switching (line 48) | void switching(bool flag) { enabled = flag; }
method is_enabled (line 50) | bool is_enabled() { return enabled; }
method is_enabled_i (line 51) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 53) | void switch_load(ConfigReader& cr) {
method switch_store (line 59) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_setting_dialog_move.hpp
type patch (line 26) | namespace patch {
class setting_dialog_move_t (line 27) | class setting_dialog_move_t {
method switching (line 39) | void switching(bool flag) {
method is_enabled (line 43) | bool is_enabled() { return enabled; }
method is_enabled_i (line 44) | bool is_enabled_i() { return enabled; }
method switch_load (line 46) | void switch_load(ConfigReader& cr) {
method switch_store (line 52) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_setting_dialog_wndproc_override.cpp
type patch (line 20) | namespace patch {
function LRESULT (line 21) | LRESULT CALLBACK setting_dialog_t::wndproc(HWND hwnd, UINT message, WP...
FILE: patch/patch_setting_dialog_wndproc_override.hpp
type patch (line 22) | namespace patch {
class setting_dialog_t (line 24) | class setting_dialog_t {
FILE: patch/patch_setting_gui.hpp
type patch (line 19) | namespace patch {
class setting_gui_t (line 21) | class setting_gui_t {
FILE: patch/patch_setting_new_project.cpp
type patch (line 19) | namespace patch {
function BOOL (line 21) | BOOL __cdecl setting_new_project_t::exedit_edit_open_wrap(int w, int h...
FILE: patch/patch_setting_new_project.hpp
type patch (line 27) | namespace patch {
class setting_new_project_t (line 31) | class setting_new_project_t {
method init (line 40) | void init() {
method switching (line 54) | void switching(bool flag) {
method is_enabled (line 58) | bool is_enabled() { return enabled; }
method is_enabled_i (line 59) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 61) | void switch_load(ConfigReader& cr) {
method switch_store (line 67) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_splash.cpp
type patch (line 19) | namespace patch {
function LRESULT (line 20) | LRESULT CALLBACK splash_t::SplashWndProc(HWND hwnd, UINT message, WPAR...
function InitEnd (line 108) | void __cdecl InitEnd() {
FILE: patch/patch_splash.hpp
type patch (line 40) | namespace patch {
class splash_t (line 46) | class splash_t {
method init (line 69) | void init() {
method switching (line 108) | void switching(bool flag) {
method is_enabled (line 112) | bool is_enabled() { return enabled; }
method is_enabled_i (line 113) | bool is_enabled_i() { return enabled; }
method switch_load (line 115) | void switch_load(ConfigReader& cr) {
method switch_store (line 121) | void switch_store(ConfigWriter& cw) {
method start (line 125) | void start() {
method finish (line 154) | void finish() {
method set_phase (line 161) | void set_phase(std::wstring_view phase, std::wstring_view detail) {
method set_detail (line 169) | void set_detail(std::wstring_view detail) {
FILE: patch/patch_susie_load.cpp
type patch (line 19) | namespace patch {
FILE: patch/patch_susie_load.hpp
type patch (line 29) | namespace patch {
class susie_load_t (line 32) | class susie_load_t {
method init (line 43) | bool init() {
method switching (line 48) | void switching(bool flag) {
method is_enabled (line 52) | bool is_enabled() { return enabled; }
method is_enabled_i (line 53) | bool is_enabled_i() { return enabled; }
method switch_load (line 55) | void switch_load(ConfigReader& cr) {
method switch_store (line 61) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_sysinfo_write.hpp
type patch (line 25) | namespace patch {
class sysinfo_info_write_t (line 28) | class sysinfo_info_write_t {
FILE: patch/patch_text_op_size.hpp
type patch (line 24) | namespace patch {
class text_op_size_t (line 27) | class text_op_size_t {
method init (line 33) | void init() {
method switching (line 39) | void switching(bool flag) {
method is_enabled (line 43) | bool is_enabled() { return enabled; }
method is_enabled_i (line 44) | bool is_enabled_i() { return enabled; }
method switch_load (line 46) | void switch_load(ConfigReader& cr) {
method switch_store (line 52) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_theme_cc.hpp
type patch (line 24) | namespace patch {
class theme_cc_t (line 27) | class theme_cc_t {
method load (line 64) | void load(ConfigReader& cr) {
method store (line 88) | void store(ConfigWriter& cw) {
method load (line 125) | void load(ConfigReader& cr) {
method store (line 158) | void store(ConfigWriter& cw) {
method load (line 183) | void load(ConfigReader& cr) {
method store (line 192) | void store(ConfigWriter& cw) {
method init (line 198) | void init() {
method switching (line 440) | void switching(bool flag) {
method is_enabled (line 444) | bool is_enabled() { return enabled; }
method is_enabled_i (line 445) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 447) | void switch_load(ConfigReader& cr) {
method switch_store (line 453) | void switch_store(ConfigWriter& cw) {
method config_load (line 457) | void config_load(ConfigReader& cr) {
method config_store (line 475) | void config_store(ConfigWriter& cw) {
FILE: patch/patch_tra_aviutlfilter.hpp
type patch (line 26) | namespace patch {
class tra_aviutlfilter_t (line 30) | class tra_aviutlfilter_t {
method init (line 35) | void init() {
method switching (line 90) | void switching(bool flag) {
method is_enabled (line 94) | bool is_enabled() { return enabled; }
method is_enabled_i (line 95) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 97) | void switch_load(ConfigReader& cr) {
method switch_store (line 103) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_tra_change_drawfilter.cpp
type patch (line 19) | namespace patch {
FILE: patch/patch_tra_change_drawfilter.hpp
type patch (line 31) | namespace patch {
class tra_change_drawfilter_t (line 35) | class tra_change_drawfilter_t {
method init (line 48) | void init() {
method switching (line 68) | void switching(bool flag) {
method is_enabled (line 72) | bool is_enabled() { return enabled; }
method is_enabled_i (line 73) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 75) | void switch_load(ConfigReader& cr) {
method switch_store (line 81) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_tra_specified_speed.hpp
type patch (line 31) | namespace patch {
class tra_specified_speed_t (line 34) | class tra_specified_speed_t {
method init (line 43) | void init() {
method switching (line 85) | void switching(bool flag) {
method is_enabled (line 89) | bool is_enabled() { return enabled; }
method is_enabled_i (line 90) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 92) | void switch_load(ConfigReader& cr) {
method switch_store (line 98) | void switch_store(ConfigWriter& cw) {
FILE: patch/patch_undo.cpp
type patch (line 18) | namespace patch {
FILE: patch/patch_undo.hpp
type patch (line 28) | namespace patch {
class undo_t (line 31) | class undo_t {
method set_undo_wrap_42878 (line 52) | static void __cdecl set_undo_wrap_42878(unsigned int object_idx, int...
method set_undo_wrap_40e5c (line 58) | static void __cdecl set_undo_wrap_40e5c(unsigned int object_idx, uns...
method interval_set_undo (line 99) | static void interval_set_undo(int object_idx, int flag) {
method init (line 119) | void init() {
method switching (line 298) | void switching(bool flag) {
method is_enabled (line 302) | bool is_enabled() { return enabled; }
method is_enabled_i (line 303) | bool is_enabled_i() { return enabled_i; }
method switch_load (line 305) | void switch_load(ConfigReader& cr) {
method switch_store (line 311) | void switch_store(ConfigWriter& cw) {
FILE: patch/restorable_patch.hpp
class restorable_patch (line 7) | class restorable_patch {
method restorable_patch (line 14) | restorable_patch(std::uintptr_t address, std::vector<std::byte>&& data...
method restorable_patch (line 17) | restorable_patch(std::uintptr_t address, void* data, size_t length) : ...
method swap_data (line 19) | void swap_data() {
method switch_true_to_false (line 28) | void switch_true_to_false() {
method switch_false_to_true (line 32) | void switch_false_to_true() {
method switching (line 36) | void switching(bool flag) {
class restorable_patch_function (line 52) | class restorable_patch_function : public restorable_patch {
method make_data (line 53) | static std::vector<std::byte> make_data(std::uintptr_t address, void* ...
method restorable_patch_function (line 61) | restorable_patch_function(std::uintptr_t address, void* newfunc) : res...
class restorable_patch_i8 (line 64) | class restorable_patch_i8 : public restorable_patch {
method make_data (line 65) | static std::vector<std::byte> make_data(i8 value) {
method restorable_patch_i8 (line 73) | restorable_patch_i8(std::uintptr_t address, T value) : restorable_patc...
class restorable_patch_i16 (line 76) | class restorable_patch_i16 : public restorable_patch {
method make_data (line 77) | static std::vector<std::byte> make_data(i16 value) {
method restorable_patch_i16 (line 85) | restorable_patch_i16(std::uintptr_t address, T value) : restorable_pat...
class restorable_patch_i32 (line 88) | class restorable_patch_i32 : public restorable_patch {
method make_data (line 89) | static std::vector<std::byte> make_data(i32 value) {
method restorable_patch_i32 (line 97) | restorable_patch_i32(std::uintptr_t address, T value) : restorable_pat...
FILE: patch/stopwatch.hpp
class stopwatch (line 22) | class stopwatch {
method stopwatch (line 26) | stopwatch() noexcept : start(std::chrono::system_clock::now()) {}
method now (line 30) | long long now() const noexcept {
method print (line 34) | void print() const noexcept {
method now (line 39) | long long now() const noexcept { return 0; }
method print (line 40) | void print() const noexcept {}
class stopwatch_mem (line 44) | class stopwatch_mem {
method now (line 50) | long long now() const noexcept {
method stopwatch_mem (line 55) | stopwatch_mem() noexcept : start_tp{}, sum{}, cnt{} {}
method start (line 57) | void start() noexcept {
method stop (line 60) | void stop() noexcept {
method start (line 68) | void start() noexcept {}
method stop (line 69) | void stop() noexcept {}
FILE: patch/timer.hpp
class Timer (line 25) | class Timer
method VOID (line 33) | static VOID CALLBACK timerproc(HWND, UINT, UINT_PTR nIDEvent, DWORD) {
method set (line 46) | void set(timer_func f, UINT elapse) {
class Timer (line 28) | class Timer {
method VOID (line 33) | static VOID CALLBACK timerproc(HWND, UINT, UINT_PTR nIDEvent, DWORD) {
method set (line 46) | void set(timer_func f, UINT elapse) {
FILE: patch/util_int.hpp
function store_i8 (line 26) | inline void store_i8(auto address, auto value) {
function store_i16 (line 29) | inline void store_i16(auto address, auto value) {
function store_i32 (line 32) | inline void store_i32(auto address, auto value) {
function store_i64 (line 35) | inline void store_i64(auto address, auto value) {
function T0 (line 40) | inline T0 load_i8(T1 address) {
function T0 (line 45) | inline T0 load_i16(T1 address) {
function T0 (line 50) | inline T0 load_i32(T1 address) {
function T0 (line 55) | inline T0 load_i64(T1 address) {
function T1 (line 61) | inline T1 exchange_i8(T0 address, T1&& value) {
function T1 (line 65) | inline T1 exchange_i16(T0 address, T1&& value) {
function T1 (line 69) | inline T1 exchange_i32(T0 address, T1&& value) {
function T1 (line 73) | inline T1 exchange_i64(T0 address, T1&& value) {
FILE: patch/util_magic.hpp
function i32 (line 28) | inline i32 CalcNearJmp(i32 address, i32 jmp_address) {
class OverWriteOnProtectHelper (line 32) | class OverWriteOnProtectHelper {
method OverWriteOnProtectHelper (line 37) | OverWriteOnProtectHelper(T address, uintptr_t size) noexcept : m_addre...
method store_i8 (line 45) | void store_i8(T1 address, T2 value) const {
method store_i16 (line 49) | void store_i16(T1 address, T2 value) const {
method store_i32 (line 53) | void store_i32(T1 address, T2 value) const {
method store_i64 (line 57) | void store_i64(T1 address, T2 value) const {
method T0 (line 62) | T0 load_i8(T1 address) const {
method T0 (line 66) | T0 load_i16(T1 address) const {
method T0 (line 70) | T0 load_i32(T1 address) const {
method T0 (line 74) | T0 load_i64(T1 address) const {
method replaceNearJmp (line 78) | void replaceNearJmp(i32 offset, void* jmp_address) {
method address (line 82) | auto address() const {
method address (line 85) | auto address(uintptr_t ofs) const {
function ReplaceNearJmp (line 95) | inline void ReplaceNearJmp(i32 address, void* jmp_address) {
class ReplaceFunction_t (line 100) | class ReplaceFunction_t {
function BOOL (line 125) | inline BOOL ExchangeFunction(HMODULE hModule, std::string_view modname, ...
function InjectFunction_stdcall (line 143) | inline bool InjectFunction_stdcall(uint32_t address, const void* functio...
function InjectFunction_cdecl (line 174) | inline bool InjectFunction_cdecl(uint32_t address, const void* function,...
function InjectFunction_fastcall (line 187) | inline bool InjectFunction_fastcall(uint32_t address, void(*func)(), siz...
FILE: patch/util_others.cpp
function save_project (line 25) | void save_project(HWND hwnd_owner) {
FILE: patch/util_others.hpp
function HWND (line 34) | inline HWND pid2hwnd(DWORD pid) {
function modify_menuitem_check (line 53) | void modify_menuitem_check(HMENU menu, UINT item, BOOL position, Func fu...
type format_literal_detail_a (line 60) | struct format_literal_detail_a : private std::string_view {
method format_literal_detail_a (line 61) | format_literal_detail_a(const char* str, std::size_t size) : std::stri...
type format_literal_detail_w (line 67) | struct format_literal_detail_w : private std::wstring_view {
method format_literal_detail_w (line 68) | format_literal_detail_w(const wchar_t* str, std::size_t size) : std::w...
function format_to_os (line 83) | inline auto format_to_os(OStream& ss, const std::string_view fmt, Args&&...
function format_to_os (line 88) | inline auto format_to_os(OStream& ss, const std::wstring_view fmt, Args&...
function get_local_time (line 92) | inline auto get_local_time() {
function get_local_time_string (line 106) | inline auto get_local_time_string() {
function string_convert_A2W (line 115) | inline std::wstring string_convert_A2W(std::string_view str) {
function string_convert_W2A (line 123) | inline std::string string_convert_W2A(std::wstring_view str) {
function string_convert_U2W (line 131) | inline std::wstring string_convert_U2W(std::u8string_view str) {
function string_convert_W2U (line 139) | inline std::u8string string_convert_W2U(std::wstring_view str) {
type CPUCmdSet (line 146) | enum class CPUCmdSet : uint32_t {
type AviUtl::detail::flag::ops_def<CPUCmdSet> (line 177) | struct AviUtl::detail::flag::ops_def<CPUCmdSet>:std::true_type{}
function CPUCmdSet (line 182) | inline CPUCmdSet get_CPUCmdSet() {
FILE: patch/util_pe.hpp
function search_reloc (line 35) | inline auto search_reloc(HMODULE hModule, i32 target_ofs) noexcept {
function search_reloc (line 78) | inline auto search_reloc(HMODULE hModule, const std::set<i32>& target_of...
function ordinal_to_name (line 126) | inline std::optional<std::string> ordinal_to_name(HMODULE hMod, DWORD or...
function DWORD (line 151) | inline DWORD name_to_ordinal(HMODULE hMod, std::string_view name) noexce...
FILE: patch/util_resource.hpp
function resource_string_w (line 28) | inline std::optional<std::wstring> resource_string_w(UINT rs_id) {
function resource_string_a (line 45) | inline std::optional<std::string> resource_string_a(UINT rs_id) {
function resource_format_a (line 68) | inline std::optional<std::string> resource_format_a(UINT rs_id, Args&& ....
function resource_format_w (line 82) | inline std::optional<std::wstring> resource_format_w(UINT rs_id, Args&& ...
function patch_resource_message_a (line 95) | inline std::optional<int> patch_resource_message_a(UINT rs_id, UINT uTyp...
function patch_resource_message_w (line 106) | inline std::optional<int> patch_resource_message_w(UINT rs_id, UINT uTyp...
function patch_resource_message_a (line 118) | inline std::optional<int> patch_resource_message_a(UINT rs_id, UINT uTyp...
function patch_resource_message_w (line 136) | inline std::optional<int> patch_resource_message_w(UINT rs_id, UINT uTyp...
class patch_resource_message_class_base (line 153) | class patch_resource_message_class_base {
class patch_resource_message_format_class_w (line 160) | class patch_resource_message_format_class_w : public patch_resource_mess...
method patch_resource_message_format_class_w (line 165) | patch_resource_message_format_class_w(UINT rs_id, UINT uType, Args&& ....
method fire (line 167) | void fire() {
class patch_resource_message_class_w (line 183) | class patch_resource_message_class_w : public patch_resource_message_cla...
method patch_resource_message_class_w (line 187) | patch_resource_message_class_w(UINT rs_id, UINT uType) : rs_id(rs_id),...
method fire (line 189) | void fire() {
function web_confirm (line 207) | inline void web_confirm(std::wstring_view url) {
Condensed preview — 167 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,098K chars).
[
{
"path": ".gitattributes",
"chars": 2518,
"preview": "###############################################################################\n# Set default behavior to automatically "
},
{
"path": ".github/ISSUE_TEMPLATE/------.md",
"chars": 216,
"preview": "---\nname: 新機能の提案\nabout: 既存の挙動を変更する/新しい機能の追加\ntitle: \"+〇〇〇〇〇〇\"\nlabels: enhancement\nassignees: ''\n\n---\n\n**背景**\nどのような理由でこの機能"
},
{
"path": ".github/ISSUE_TEMPLATE/aviutl--------------.md",
"chars": 632,
"preview": "---\nname: AviUtl/周辺プラグインのバグの報告\nabout: patch.aulに直してほしいバグ\ntitle: \"*〇〇〇〇〇〇\"\nlabels: enhancement\nassignees: ''\n\n---\n\n【!】報告の"
},
{
"path": ".github/ISSUE_TEMPLATE/patch-aul------.md",
"chars": 598,
"preview": "---\nname: patch.aulのバグの報告\nabout: patch.aulが起因であるバグはここから\ntitle: \"/〇〇〇〇〇〇\"\nlabels: bug\nassignees: ''\n\n---\n\n【!】報告の前に必ずこの挙動が"
},
{
"path": ".github/pull_request_template.md",
"chars": 338,
"preview": "<!-- \nPR を作成する前に、以下の点について確認してください。\n1. 誰が見ても分かりやすいタイトル/説明が書かれていること。\n2. 1つの変更点に対して1つの PR が立てられていること。\n-->\n\n**関係する Issue**\n関"
},
{
"path": ".github/workflows/CI.yml",
"chars": 722,
"preview": "name: CI\n\non:\n push:\n pull_request:\n\njobs:\n build:\n runs-on: windows-2022\n strategy:\n matrix:\n conf"
},
{
"path": ".gitignore",
"chars": 6340,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## G"
},
{
"path": ".gitmodules",
"chars": 214,
"preview": "[submodule \"patch/aviutl_exedit_sdk\"]\n\tpath = patch/aviutl_exedit_sdk\n\turl = https://github.com/ePi5131/aviutl_exedit_sd"
},
{
"path": "COPYING",
"chars": 35149,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "COPYING.LESSER",
"chars": 7652,
"preview": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007"
},
{
"path": "LICENSE",
"chars": 87,
"preview": "© 2022-2023 ePi\n\npatch.aulはLGPLv3の元ライセンスする。ライセンスの詳細はCOPYING,COPYING.LESSERファイルを参照すること。\n"
},
{
"path": "credits.md",
"chars": 2560,
"preview": "# 使用したライブラリについて\n## Boost\n> Boost Software License - Version 1.0 - August 17th, 2003\n>\n> Permission is hereby granted, fr"
},
{
"path": "patch/.editorconfig",
"chars": 424,
"preview": "# Rules in this file were initially inferred by Visual Studio IntelliCode from the D:\\dev\\patch\\patch\\ codebase based on"
},
{
"path": "patch/add_dll_ref.hpp",
"chars": 1034,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/clprogram.cl",
"chars": 30458,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n\tit under the terms of the GNU Lesser General P"
},
{
"path": "patch/config.hpp",
"chars": 20682,
"preview": "/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Gen"
},
{
"path": "patch/config_rw.hpp",
"chars": 12764,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n\tit under the terms of the GNU Lesser General P"
},
{
"path": "patch/cryptostring.hpp",
"chars": 3272,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/debug_log.hpp",
"chars": 1096,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/gate.hpp",
"chars": 1195,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/global.hpp",
"chars": 1140,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/global_minimum.hpp",
"chars": 1053,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/hash.hpp",
"chars": 5980,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/init.cpp",
"chars": 14724,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/init.hpp",
"chars": 2986,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/json.h",
"chars": 100751,
"preview": "/*\n The latest version of this library is available on GitHub;\n https://github.com/sheredom/json.h.\n*/\n\n/*\n This i"
},
{
"path": "patch/macro.h",
"chars": 7815,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Gener"
},
{
"path": "patch/moduledata.hpp",
"chars": 3514,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/multi_threading.hpp",
"chars": 1446,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/mylua.hpp",
"chars": 6399,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/mywindow.hpp",
"chars": 1870,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/offset_address.hpp",
"chars": 8142,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/overwrite_resource.cpp",
"chars": 5547,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/overwrite_resource.hpp",
"chars": 7559,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/packages.config",
"chars": 209,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n <package id=\"boost\" version=\"1.79.0\" targetFramework=\"native\" />\n "
},
{
"path": "patch/patch.cpp",
"chars": 1307,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch.hpp",
"chars": 3159,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch.rc",
"chars": 12195,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch.vcxproj",
"chars": 17918,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/ms"
},
{
"path": "patch/patch.vcxproj.filters",
"chars": 11860,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
},
{
"path": "patch/patch_access_key.hpp",
"chars": 3607,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_add_extension.cpp",
"chars": 2394,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_add_extension.hpp",
"chars": 2963,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_alpha_bg.hpp",
"chars": 2274,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_aup_layer_setting.hpp",
"chars": 7591,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_aup_scene_setting.hpp",
"chars": 4341,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_aviutl_wndproc_override.cpp",
"chars": 2938,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_aviutl_wndproc_override.hpp",
"chars": 1810,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_base.hpp",
"chars": 1376,
"preview": "/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Gen"
},
{
"path": "patch/patch_blend.cpp",
"chars": 12546,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_blend.hpp",
"chars": 11334,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_colorpalette_cache.hpp",
"chars": 3084,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_console.cpp",
"chars": 1759,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_console.hpp",
"chars": 7354,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_copybuffer_smem.hpp",
"chars": 5218,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_dialog_new_file.hpp",
"chars": 2707,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_exception_history.hpp",
"chars": 2130,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exception_log.cpp",
"chars": 2369,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exception_log.hpp",
"chars": 11682,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exception_log_dialog.cpp",
"chars": 6330,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exception_log_dialog.hpp",
"chars": 3947,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exeditwindow_sizing.hpp",
"chars": 2453,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exo_aviutlfilter.hpp",
"chars": 3460,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exo_fold_gui.hpp",
"chars": 6550,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_exo_midpt_and_tra.hpp",
"chars": 2346,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_exo_sceneidx.hpp",
"chars": 2177,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exo_specialcolorconv.hpp",
"chars": 1866,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exo_trackminusval.cpp",
"chars": 1902,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exo_trackminusval.hpp",
"chars": 1952,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_exo_trackparam.hpp",
"chars": 1838,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_failed_file_drop.hpp",
"chars": 3691,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_failed_longer_path.cpp",
"chars": 2525,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_failed_longer_path.hpp",
"chars": 4229,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_failed_sjis_msgbox.cpp",
"chars": 1494,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_failed_sjis_msgbox.hpp",
"chars": 3549,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast.hpp",
"chars": 683,
"preview": "#pragma once\n\nnamespace patch::fast {\n\tinline class fast_t {\n\n\t\tbool enabled = true;\n\t\tbool enabled_i;\n\t\tinline static c"
},
{
"path": "patch/patch_fast_border.cpp",
"chars": 34136,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast_border.hpp",
"chars": 2159,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_fast_cl.hpp",
"chars": 35965,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n\tit under the terms of the GNU Lesser General P"
},
{
"path": "patch/patch_fast_create_figure.cpp",
"chars": 9143,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast_create_figure.hpp",
"chars": 2851,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_fast_directionalblur.cpp",
"chars": 8482,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast_directionalblur.hpp",
"chars": 2466,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast_displacementmap.cpp",
"chars": 3812,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast_displacementmap.hpp",
"chars": 2307,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_fast_exeditwindow.cpp",
"chars": 8163,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fast_exeditwindow.hpp",
"chars": 4191,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fast_flash.cpp",
"chars": 10245,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast_flash.hpp",
"chars": 2247,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast_getputpixeldata.cpp",
"chars": 9621,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fast_getputpixeldata.hpp",
"chars": 1556,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fast_glow.cpp",
"chars": 27975,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast_glow.hpp",
"chars": 7160,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_fast_lensblur.cpp",
"chars": 5010,
"preview": "/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Gen"
},
{
"path": "patch/patch_fast_lensblur.hpp",
"chars": 2364,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n\tit under the terms of the GNU Lesser General P"
},
{
"path": "patch/patch_fast_polortransform.cpp",
"chars": 3467,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_fast_polortransform.hpp",
"chars": 2202,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_fast_radiationalblur.cpp",
"chars": 6573,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fast_radiationalblur.hpp",
"chars": 2993,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fast_setting_dialog.cpp",
"chars": 2699,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fast_setting_dialog.hpp",
"chars": 3455,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fast_text.cpp",
"chars": 5187,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fast_text.hpp",
"chars": 5237,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_fileinfo.hpp",
"chars": 2267,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_font_dialog.hpp",
"chars": 2012,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_helpful_msgbox.cpp",
"chars": 2430,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_helpful_msgbox.hpp",
"chars": 3176,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_ignore_media_param_reset.hpp",
"chars": 2141,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_lua.cpp",
"chars": 6600,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_lua.hpp",
"chars": 7646,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_lua_getvalueex.cpp",
"chars": 10759,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_lua_getvalueex.hpp",
"chars": 1944,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_lua_rand.cpp",
"chars": 2342,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_lua_rand.hpp",
"chars": 1877,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_lua_randex.cpp",
"chars": 1849,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_lua_randex.hpp",
"chars": 3640,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_obj_colorcorrection.cpp",
"chars": 7311,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_obj_colorcorrection.hpp",
"chars": 8818,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_obj_glow.hpp",
"chars": 5536,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_obj_lensblur.cpp",
"chars": 8129,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_obj_lensblur.hpp",
"chars": 7206,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_obj_noise.hpp",
"chars": 2839,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_obj_specialcolorconv.hpp",
"chars": 5182,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_playback_speed.hpp",
"chars": 2432,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_rclickmenu_delete.cpp",
"chars": 1570,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_rclickmenu_delete.hpp",
"chars": 2566,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_rclickmenu_split.cpp",
"chars": 1489,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_rclickmenu_split.hpp",
"chars": 2087,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_redo.cpp",
"chars": 3976,
"preview": "/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Gen"
},
{
"path": "patch/patch_redo.hpp",
"chars": 25810,
"preview": "/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Gen"
},
{
"path": "patch/patch_scroll_objdlg.hpp",
"chars": 3737,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_setting_dialog_excolorconfig.cpp",
"chars": 1443,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_setting_dialog_excolorconfig.hpp",
"chars": 2030,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_setting_dialog_move.hpp",
"chars": 1673,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_setting_dialog_wndproc_override.cpp",
"chars": 1089,
"preview": "/*\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Gen"
},
{
"path": "patch/patch_setting_dialog_wndproc_override.hpp",
"chars": 1184,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_setting_gui.hpp",
"chars": 917,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_setting_new_project.cpp",
"chars": 1686,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_setting_new_project.hpp",
"chars": 2523,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_splash.cpp",
"chars": 3937,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_splash.hpp",
"chars": 4540,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_susie_load.cpp",
"chars": 3831,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_susie_load.hpp",
"chars": 1746,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_sysinfo_write.hpp",
"chars": 1260,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_text_op_size.hpp",
"chars": 1790,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_theme_cc.hpp",
"chars": 15557,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_tra_aviutlfilter.hpp",
"chars": 4160,
"preview": "/*\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU Lesser G"
},
{
"path": "patch/patch_tra_change_drawfilter.cpp",
"chars": 1807,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_tra_change_drawfilter.hpp",
"chars": 2603,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_tra_specified_speed.hpp",
"chars": 3299,
"preview": "/*\r\n\tThis program is free software: you can redistribute it and/or modify\r\n\tit under the terms of the GNU Lesser General"
},
{
"path": "patch/patch_undo.cpp",
"chars": 10393,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/patch_undo.hpp",
"chars": 14648,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/resource.h",
"chars": 1814,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/restorable_patch.hpp",
"chars": 2577,
"preview": "#pragma once\n#include <vector>\n#include <bit>\n\n#include \"util_magic.hpp\"\n\nclass restorable_patch {\nprotected:\n\tstd::vect"
},
{
"path": "patch/stopwatch.hpp",
"chars": 1941,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/timer.hpp",
"chars": 1454,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/util.hpp",
"chars": 820,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/util_int.hpp",
"chars": 2521,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/util_magic.hpp",
"chars": 6972,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/util_others.cpp",
"chars": 2008,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/util_others.hpp",
"chars": 8459,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/util_pe.hpp",
"chars": 8269,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/util_resource.hpp",
"chars": 8401,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch/version.hpp",
"chars": 822,
"preview": "/*\n\tThis program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser Genera"
},
{
"path": "patch.aul.txt",
"chars": 17824,
"preview": "patch.aul r43 beta1\n© 2021-2023 ePi\nhttps://scrapbox.io/ePi5131/patch.aul\n\n概要\n AviUtlや拡張編集のバグを直したり高速化をしたり新機能を追加したりするプ"
},
{
"path": "patch.sln",
"chars": 1263,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.0.3211"
},
{
"path": "readme.md",
"chars": 344,
"preview": "# patch.aul\n## これはなに\nAviUtlや拡張編集のバグを直したり機能を追加するプラグイン\n黒魔術を一手に引き受けるのが目的\n\n詳細はpatch.aul.txtを読むこと\n\n## ビルドについて\n\n- [CUDA TOOLKI"
}
]
About this extraction
This page contains the full source code of the nazonoSAUNA/patch.aul GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 167 files (957.7 KB), approximately 286.2k tokens, and a symbol index with 1203 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.