diff --git a/.github/labeler.yml b/.github/labeler.yml
deleted file mode 100644
index 56c4cc7..0000000
--- a/.github/labeler.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-translation:
- - resource/translations/*
-
-content:
- - base/**/*
-
-good_luck:
- - src/courtroom.cpp
diff --git a/.gitignore b/.gitignore
index 3f8b3ae..1adb744 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,6 @@
*.dll
*.so
*.pro.autosave
-*.pro.user
base_override.h
.DS_Store
@@ -22,7 +21,6 @@ debug/
Makefile*
object_script*
-/android/gradle*
/Attorney_Online_remake_resource.rc
/attorney_online_remake_plugin_import.cpp
@@ -33,5 +31,3 @@ discord/
moc*
/Attorney_Online_CC_resource.rc
/attorney_online_cc_plugin_import.cpp
-
-*.autosave
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e9685de..0f68fe5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,9 +8,6 @@ cache:
paths:
- lib/
-variables:
- DEBIAN_FRONTEND: noninteractive
-
before_script:
- echo Current working directory is $(pwd)
@@ -25,24 +22,22 @@ build linux x86_64:
- apt-get update
- >
apt-get install --no-install-recommends -y qt5-default qtmultimedia5-dev
- clang make git sudo curl ca-certificates pkg-config upx unzip xz-utils
- - git submodule init
- - git submodule update
+ clang make git sudo curl ca-certificates pkg-config upx unzip
# Print versions
- qmake --version
- clang --version
# Extract BASS
- #- mkdir bass
- #- cd bass
- #- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
- #- unzip bass.zip
- #- cp x64/libbass.so ../lib
- #- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
- #- unzip bassopus.zip
- #- cp x64/libbassopus.so ../lib
- #- cd ..
+ - mkdir bass
+ - cd bass
+ - curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
+ - unzip bass.zip
+ - cp x64/libbass.so ../lib
+ - curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
+ - unzip bassopus.zip
+ - cp x64/libbassopus.so ../lib
+ - cd ..
# Extract Discord RPC
- mkdir discord-rpc
@@ -61,7 +56,7 @@ build linux x86_64:
- cd ..
# Build
- - qmake -spec linux-clang "DEFINES += DISCORD QTAUDIO"
+ - qmake -spec linux-clang
- make -j4
# Post-processing
@@ -80,11 +75,6 @@ build windows i686:
# Install dependencies
- apt-get update
- apt-get install --no-install-recommends -y make curl ca-certificates upx unzip
- - git submodule init
- - git submodule update
-
- # Print versions
- - /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake --version
# Extract BASS
- mkdir bass
@@ -97,19 +87,8 @@ build windows i686:
- cp bassopus.dll ../lib
- cd ..
- # Extract QtApng
- # - mkdir qtapng
- # - cd qtapng
- # - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.2-2/qtapng_mingw73_32_5.13.0.zip -o apng.zip
- # - unzip apng.zip
- # - mkdir ../lib/imageformats
- # - cp mingw73_32/plugins/imageformats/qapng.dll ../lib/imageformats/
- # - cd ..
-
- - ls lib
-
# Build
- - /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD BASSAUDIO"
+ - /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake
- make -j4
# Post-processing
@@ -145,7 +124,7 @@ deploy linux x86_64:
- *deploy_misc
# Platform-specific
- - cp -a ../lib/* .
+ - cp -a ../lib/*.so .
- cp -a ../bin/Attorney_Online .
- echo "#!/bin/sh" >> ./run.sh
- echo "LD_LIBRARY_PATH=.:\$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh
@@ -179,8 +158,6 @@ deploy windows i686:
# Platform-specific
- cp -a ../lib/*.dll .
- - mkdir imageformats
- - 'cp -a ../lib/imageformats/*.dll imageformats/ || :'
- cp -a ../bin/Attorney_Online.exe .
# Zipping
@@ -213,17 +190,11 @@ publish linux x86_64:
- deploy linux x86_64
when: manual
script:
- - apt-get update
- - apt-get install --no-install-recommends -y git nodejs npm awscli
- - cd scripts
- - npm install
- - cd ..
-
- cd zip
- - ../scripts/wasabi_program.sh
+ - ../scripts/wasabi.sh
variables:
MANIFEST: program_linux_x86_64.json
- ARTIFACT_SUFFIX: linux_x64.tar.xz
+ ARTIFACT_SUFFIX: _linux_x64.tar.xz
publish windows i686:
image: ubuntu
@@ -232,14 +203,8 @@ publish windows i686:
- deploy windows i686
when: manual
script:
- - apt-get update
- - apt-get install --no-install-recommends -y git nodejs npm awscli
- - cd scripts
- - npm install
- - cd ..
-
- cd zip
- - ../scripts/wasabi_program.sh
+ - ../scripts/wasabi.sh
variables:
MANIFEST: program_winnt_i386.json
- ARTIFACT_SUFFIX: windows_x86.zip
+ ARTIFACT_SUFFIX: _windows_x86.zip
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 1376cc1..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "base/themes"]
- path = base/themes
- url = https://github.com/AttorneyOnline/AO2-Themes
diff --git a/.travis.yml b/.travis.yml
index dbd19cd..4243b3b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,21 +1,11 @@
language: cpp
os: osx
+
addons:
- homebrew:
- update: true
- packages:
- - qt5
+ homebrew:
+ packages:
+ - qt5
script:
-- "./scripts/macos_build.sh"
-- "./scripts/macos_post_build.sh"
-
-deploy:
- provider: releases
- api_key:
- secure: mZCNwnqKeqJP5CqgYOanYnr/KHydxueGPRhvGLpY0Pop7MiH3CIHMN5dhHbtgJvE5GGMR4xUIEhPpmkCEJw7YiPREMqT4mkV4DR531ZLB3t/FizyvIwXuP6jFwzTofZ51qHfBpcurVc9sMFeD9Pw+rLTTgIiXL2sZxUUXc8U+ZZug1lYndgcO6P00fUJd6V9lyFQUGmbSca97YbG6KuCym0fEpyRnMqzKLjYsUUo8UKRBADtmD822O6z2FSldNZDn45Mkx0MYfHWyT5hzTb7WGa+DrTB/0un1HqqsNPlb/ahjrFQQNR2qd7HNGZa+Mvwi6egTDug+k15x8lbkacUoi34U1eFq9LSTYm8dSO5g23I1OvGvjTCkDj1jOLPqB99XlbAJ0E/9Jzw7wtlLaAzvFzTj/B63TQnO3IsgHBWR14CZlf05WMOFf2irwl+kL6ktspIHnlGgaiWYYrKeAt7QJAXiQOdYDz6SaWVC6TyOE/SszXRU6xFotmCjkP2irM5yGE8SUw2uIzKjD9uG0ZXtbLcdQEFD316+qglqFTCjnKsRfbtQs2u5spZPsZSdsOZCbLfNIn0GSTFRymFsK6gsvji8AD8AZo0zcOZ/7NMVC6A8RnF3Ve+vU/xljhsIOxoLZDvZPia7WozdV99xmnepWBwkuoQs/K0xmWcnLZDcb0=
- file: "../bin/Attorney_Online_mac_x86_64.zip"
- draft: true
- on:
- tags: true
- repo: AttorneyOnline/AO2-Client
+ - ./scripts/macos_build.sh
+ - ./scripts/macos_post_build.sh
diff --git a/Attorney_Online.pro b/Attorney_Online.pro
index c773fb3..20a61d3 100644
--- a/Attorney_Online.pro
+++ b/Attorney_Online.pro
@@ -3,7 +3,7 @@ QT += core gui widgets network
TARGET = Attorney_Online
TEMPLATE = app
-VERSION = 2.7.2.0
+VERSION = 2.6.2.0
INCLUDEPATH += $$PWD/include
DESTDIR = $$PWD/bin
@@ -16,14 +16,13 @@ HEADERS += $$files($$PWD/include/*.h)
LIBS += -L$$PWD/lib
-
-#DEFINES += DISCORD
+DEFINES += DISCORD
contains(DEFINES, DISCORD) {
LIBS += -ldiscord-rpc
}
-#DEFINES += BASSAUDIO
+DEFINES += BASSAUDIO
contains(DEFINES, BASSAUDIO) {
LIBS += -lbass
@@ -35,10 +34,6 @@ contains(DEFINES, QTAUDIO) {
QT += multimedia
}
-contains(CONFIG, qml_debug) {
-DEFINES += DEBUG_NETWORK
-}
-
macx:LIBS += -framework CoreFoundation -framework Foundation -framework CoreServices
@@ -46,24 +41,5 @@ CONFIG += c++14
RESOURCES += resources.qrc
-TRANSLATIONS = resource/translations/ao_en.ts \
- resource/translations/ao_jp.ts \
- resource/translations/ao_de.ts \
- resource/translations/ao_ru.ts \
- resource/translations/ao_es.ts \
- resource/translations/ao_pt.ts \
- resource/translations/ao_pl.ts
-
win32:RC_ICONS = resource/logo.ico
macx:ICON = resource/logo.icns
-
-android:DISTFILES += \
- android/AndroidManifest.xml \
- android/build.gradle \
- android/gradle/wrapper/gradle-wrapper.jar \
- android/gradle/wrapper/gradle-wrapper.properties \
- android/gradlew \
- android/gradlew.bat \
- android/res/values/libs.xml
-
-ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
diff --git a/README.md b/README.md
index 1abd8df..0416e4a 100644
--- a/README.md
+++ b/README.md
@@ -100,14 +100,6 @@ If you begin a message with `~~` (two tildes), the two tildes are removed and th
If two players are in the same position and select each other's characters using the in-game pair list (or with `/pair [id]`), they will appear alongside each other. You can set the offset of your character using the provided spinbox (or with `/offset [percentage]`).
-### Screenflash (2.6+)
-
-Placing a `$` (dollar symbol) at any point in the message will cause a white flash to appear at that point, and the symbol will disappear. You can do this multiple times in one message and stack it up with any other markup symbol. The flash will be silent, unlike the equivalent button.
-
-### Screenshake (2.6+)
-
-Placing an `@` (at symbol) at any point in the message will cause the screen to shake at that point, and the symbol will disappear. You can do this multiple times in one message and stack it up with any other markup symbol (including the screenflash).
-
### Non-interrupting preanimations (2.6+)
When checked, this will force text to immediately begin displaying without waiting for the preanimation to finish.
@@ -157,19 +149,19 @@ Areas can be listed by clicking the A/M button (or `/switch_am`). The statuses o
- `ic_chat_name`, which is an input field for your custom showname. Needs the same stuff.
- `ao2_ic_chat_name`, which is the same as above, but comes into play when the background has a desk.
- Further comments on this: all `ao2_` UI elements come into play when the background has a desk. However, in AO2 nowadays, it's customary for every background to have a desk, even if it's just an empty gif. So you most likely have never seen the `ao2_`-less UI elements ever come into play, unless someone mis-named a desk or something.
- - `showname_enable` is a checkbox that toggles whether you should see shownames or not. This does not influence whether you can USE custom shownames or not, so you can have it off, while still showing a custom showname to everyone else. Needs X, Y, width, height as usual.
+ - `showname_enable` is a tickbox that toggles whether you should see shownames or not. This does not influence whether you can USE custom shownames or not, so you can have it off, while still showing a custom showname to everyone else. Needs X, Y, width, height as usual.
- `settings` is a plain button that takes up the OS's looks, like the 'Call mod' button. Takes the same arguments as above.
- You can also just type `/settings` in OOC.
- `char_search` is a text input box on the character selection screen, which allows you to filter characters down to name. Needs the same arguments.
- - `char_passworded` is a checkbox, that when ticked, shows all passworded characters on the character selection screen. Needs the same as above.
- - `char_taken` is another checkbox, that does the same, but for characters that are taken.
+ - `char_passworded` is a tickbox, that when ticked, shows all passworded characters on the character selection screen. Needs the same as above.
+ - `char_taken` is another tickbox, that does the same, but for characters that are taken.
- `not_guilty` is a button similar to the CE / WT buttons, that if pressed, plays the Not Guilty verdict animation. Needs the same arguments.
- `guilty` is similar to `not_guilty`, but for the Guilty verdict.
- `pair_button` is a toggleable button, that shows and hides the pairing list and the offset spinbox. Works similarly to the mute button.
- `pair_list` is a list of all characters in alphabetical order, shown when the user presses the Pair button. If a character is clicked on it, it is selected as the character the user wants to pair up with.
- `pair_offset_spinbox` is a spinbox that allows the user to choose between offsets of -100% to 100%.
- `switch_area_music` is a button with the text 'A/M', that toggles between the music list and the areas list. Though the two are different, they are programmed to take the same space.
- - `pre_no_interrupt` is a checkbox with the text 'No Intrpt', that toggles whether preanimations should delay the text or not.
+ - `pre_no_interrupt` is a tickbox with the text 'No Intrpt', that toggles whether preanimations should delay the text or not.
- `area_free_color` is a combination of red, green, and blue values ranging from 0 to 255. This determines the colour of the area in the Area list if it's free, and has a status of `IDLE`.
- `area_lfp_color` determines the colour of the area if its status is `LOOKING-FOR-PLAYERS`.
- `area_casing_color` determines the colour of the area if its status is `CASING`.
@@ -180,7 +172,7 @@ Areas can be listed by clicking the A/M button (or `/switch_am`). The statuses o
- `ooc_default_color` determines the colour of the username in the OOC chat if the message doesn't come from the server.
- `ooc_server_color` determines the colour of the username if the message arrived from the server.
- `casing_button` is a button with the text 'Casing' that when clicked, brings up the Case Announcements dialog. You can give the case a name, and tick whom do you want to alert. You need to be a CM for it to go through. Only people who have at least one of the roles ticked will get the alert.
- - `casing` is a checkbox with the text 'Casing'. If ticked, you will get the case announcements alerts you should get, in accordance to the above. In the settings, you can change your defaults on the 'Casing' tab. (That's a buncha things titled 'Casing'!)
+ - `casing` is a tickbox with the text 'Casing'. If ticked, you will get the case announcements alerts you should get, in accordance to the above. In the settings, you can change your defaults on the 'Casing' tab. (That's a buncha things titled 'Casing'!)
---
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
deleted file mode 100644
index 0792ce8..0000000
--- a/android/AndroidManifest.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/android/build.gradle b/android/build.gradle
deleted file mode 100644
index 3087d08..0000000
--- a/android/build.gradle
+++ /dev/null
@@ -1,62 +0,0 @@
-buildscript {
- repositories {
- google()
- jcenter()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- }
-}
-
-repositories {
- google()
- jcenter()
-}
-
-apply plugin: 'com.android.application'
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
-}
-
-android {
- /*******************************************************
- * The following variables:
- * - androidBuildToolsVersion,
- * - androidCompileSdkVersion
- * - qt5AndroidDir - holds the path to qt android files
- * needed to build any Qt application
- * on Android.
- *
- * are defined in gradle.properties file. This file is
- * updated by QtCreator and androiddeployqt tools.
- * Changing them manually might break the compilation!
- *******************************************************/
-
- compileSdkVersion androidCompileSdkVersion.toInteger()
-
- buildToolsVersion '28.0.3'
-
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
- aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
- res.srcDirs = [qt5AndroidDir + '/res', 'res']
- resources.srcDirs = ['resources']
- renderscript.srcDirs = ['src']
- assets.srcDirs = ['assets']
- jniLibs.srcDirs = ['libs']
- }
- }
-
- lintOptions {
- abortOnError false
- }
-
- // Do not compress Qt binary resources file
- aaptOptions {
- noCompress 'rcc'
- }
-}
diff --git a/android/project.properties b/android/project.properties
deleted file mode 100644
index a08f37e..0000000
--- a/android/project.properties
+++ /dev/null
@@ -1 +0,0 @@
-target=android-21
\ No newline at end of file
diff --git a/android/res/drawable-ldpi/icon.png b/android/res/drawable-ldpi/icon.png
deleted file mode 100644
index f53fe30..0000000
Binary files a/android/res/drawable-ldpi/icon.png and /dev/null differ
diff --git a/android/res/values/libs.xml b/android/res/values/libs.xml
deleted file mode 100644
index 6b1a4a2..0000000
--- a/android/res/values/libs.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- - https://download.qt.io/ministro/android/qt5/qt-5.14
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/base/sounds/general/adminhelp.ogg b/base/sounds/general/adminhelp.ogg
deleted file mode 100644
index 704c0fd..0000000
Binary files a/base/sounds/general/adminhelp.ogg and /dev/null differ
diff --git a/base/sounds/general/case_announced.ogg b/base/sounds/general/case_announced.ogg
deleted file mode 100644
index 1e9c3d4..0000000
Binary files a/base/sounds/general/case_announced.ogg and /dev/null differ
diff --git a/base/sounds/music/failed_login.opus b/base/sounds/music/failed_login.opus
deleted file mode 100644
index 33532ee..0000000
Binary files a/base/sounds/music/failed_login.opus and /dev/null differ
diff --git a/base/themes b/base/themes
deleted file mode 160000
index 6e1317e..0000000
--- a/base/themes
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 6e1317ed93a9a4831047aa151c28742b1dd8afb5
diff --git a/base/themes/1.8/arrow_left.png b/base/themes/1.8/arrow_left.png
new file mode 100644
index 0000000..f1098c4
Binary files /dev/null and b/base/themes/1.8/arrow_left.png differ
diff --git a/base/themes/1.8/arrow_right.png b/base/themes/1.8/arrow_right.png
new file mode 100644
index 0000000..2b5ad70
Binary files /dev/null and b/base/themes/1.8/arrow_right.png differ
diff --git a/base/themes/1.8/chatmed.png b/base/themes/1.8/chatmed.png
new file mode 100644
index 0000000..0c3bae1
Binary files /dev/null and b/base/themes/1.8/chatmed.png differ
diff --git a/base/themes/1.8/favorites.png b/base/themes/1.8/favorites.png
new file mode 100644
index 0000000..0eec611
Binary files /dev/null and b/base/themes/1.8/favorites.png differ
diff --git a/base/themes/1.8/favorites_selected.png b/base/themes/1.8/favorites_selected.png
new file mode 100644
index 0000000..f6a2abf
Binary files /dev/null and b/base/themes/1.8/favorites_selected.png differ
diff --git a/base/themes/1.8/holdit.png b/base/themes/1.8/holdit.png
new file mode 100644
index 0000000..09d1d37
Binary files /dev/null and b/base/themes/1.8/holdit.png differ
diff --git a/base/themes/1.8/holdit_selected.png b/base/themes/1.8/holdit_selected.png
new file mode 100644
index 0000000..51586e7
Binary files /dev/null and b/base/themes/1.8/holdit_selected.png differ
diff --git a/base/themes/1.8/mute.png b/base/themes/1.8/mute.png
new file mode 100644
index 0000000..e64f702
Binary files /dev/null and b/base/themes/1.8/mute.png differ
diff --git a/base/themes/1.8/mute_pressed.png b/base/themes/1.8/mute_pressed.png
new file mode 100644
index 0000000..334b4ba
Binary files /dev/null and b/base/themes/1.8/mute_pressed.png differ
diff --git a/base/themes/1.8/objection.png b/base/themes/1.8/objection.png
new file mode 100644
index 0000000..6fbcbc2
Binary files /dev/null and b/base/themes/1.8/objection.png differ
diff --git a/base/themes/1.8/objection_selected.png b/base/themes/1.8/objection_selected.png
new file mode 100644
index 0000000..384e4e9
Binary files /dev/null and b/base/themes/1.8/objection_selected.png differ
diff --git a/base/themes/1.8/publicservers.png b/base/themes/1.8/publicservers.png
new file mode 100644
index 0000000..650c20c
Binary files /dev/null and b/base/themes/1.8/publicservers.png differ
diff --git a/base/themes/1.8/publicservers_selected.png b/base/themes/1.8/publicservers_selected.png
new file mode 100644
index 0000000..308c79f
Binary files /dev/null and b/base/themes/1.8/publicservers_selected.png differ
diff --git a/base/themes/1.8/takethat.png b/base/themes/1.8/takethat.png
new file mode 100644
index 0000000..8ff2bef
Binary files /dev/null and b/base/themes/1.8/takethat.png differ
diff --git a/base/themes/1.8/takethat_selected.png b/base/themes/1.8/takethat_selected.png
new file mode 100644
index 0000000..3fe0a8c
Binary files /dev/null and b/base/themes/1.8/takethat_selected.png differ
diff --git a/base/themes/default/about.png b/base/themes/default/about.png
new file mode 100644
index 0000000..50fc821
Binary files /dev/null and b/base/themes/default/about.png differ
diff --git a/base/themes/default/addevidence.png b/base/themes/default/addevidence.png
new file mode 100644
index 0000000..7a432af
Binary files /dev/null and b/base/themes/default/addevidence.png differ
diff --git a/base/themes/default/addtofav.png b/base/themes/default/addtofav.png
new file mode 100644
index 0000000..7d98903
Binary files /dev/null and b/base/themes/default/addtofav.png differ
diff --git a/base/themes/default/addtofav_pressed.png b/base/themes/default/addtofav_pressed.png
new file mode 100644
index 0000000..7b62d52
Binary files /dev/null and b/base/themes/default/addtofav_pressed.png differ
diff --git a/base/themes/default/arrow_left.png b/base/themes/default/arrow_left.png
new file mode 100644
index 0000000..7ed9c05
Binary files /dev/null and b/base/themes/default/arrow_left.png differ
diff --git a/base/themes/default/arrow_right.png b/base/themes/default/arrow_right.png
new file mode 100644
index 0000000..5acc328
Binary files /dev/null and b/base/themes/default/arrow_right.png differ
diff --git a/base/themes/default/char_passworded.png b/base/themes/default/char_passworded.png
new file mode 100644
index 0000000..e79d071
Binary files /dev/null and b/base/themes/default/char_passworded.png differ
diff --git a/base/themes/default/char_selector.png b/base/themes/default/char_selector.png
new file mode 100644
index 0000000..e868cdb
Binary files /dev/null and b/base/themes/default/char_selector.png differ
diff --git a/base/themes/default/char_taken.png b/base/themes/default/char_taken.png
new file mode 100644
index 0000000..efad48d
Binary files /dev/null and b/base/themes/default/char_taken.png differ
diff --git a/base/themes/default/charselect_background.png b/base/themes/default/charselect_background.png
new file mode 100644
index 0000000..4480e6f
Binary files /dev/null and b/base/themes/default/charselect_background.png differ
diff --git a/base/themes/default/chat.png b/base/themes/default/chat.png
new file mode 100644
index 0000000..e11f8c8
Binary files /dev/null and b/base/themes/default/chat.png differ
diff --git a/base/themes/default/chatbig.png b/base/themes/default/chatbig.png
new file mode 100644
index 0000000..177dc02
Binary files /dev/null and b/base/themes/default/chatbig.png differ
diff --git a/base/themes/default/chatmed.png b/base/themes/default/chatmed.png
new file mode 100644
index 0000000..d2fee4a
Binary files /dev/null and b/base/themes/default/chatmed.png differ
diff --git a/base/themes/default/connect.png b/base/themes/default/connect.png
new file mode 100644
index 0000000..6a41e86
Binary files /dev/null and b/base/themes/default/connect.png differ
diff --git a/base/themes/default/connect_pressed.png b/base/themes/default/connect_pressed.png
new file mode 100644
index 0000000..a99d9ec
Binary files /dev/null and b/base/themes/default/connect_pressed.png differ
diff --git a/base/themes/default/courtroom_design.ini b/base/themes/default/courtroom_design.ini
new file mode 100644
index 0000000..960d6e4
--- /dev/null
+++ b/base/themes/default/courtroom_design.ini
@@ -0,0 +1,245 @@
+; Client size. Changing it to something other than 714, 668 will stretch or
+; compress courtroombackground.png accordingly.
+courtroom = 0, 0, 714, 668
+
+; IC Area. Changing 256, 192 will stretch or compress character gifs and the
+; /bgs being used accordingly
+viewport = 0, 0, 256, 192
+
+; IC chatbox
+chatbox = 0, 174, 256, 108
+
+; IC chatbox if the current background's folder contains stand.png,
+; defensedesk.png and prosecutiondesk.png
+ao2_chatbox = 0, 174, 256, 108
+
+; Textbox for custom IC name (the "showname")
+showname = 6, 1, 256, 15
+
+; IC message, positioned within the chatbox. Changing 250 affects how
+; long text goes on before going onto the next line. Changing 89 affects
+; how many lines you can see before the message starts scrolling, based on
+; the formula of n = 25+(n-1)*16, where n is the number of lines to be
+; displayed. (ie, set it to 25 for 1 line, 41 for 2, 57 for 3, 73 for 4,
+; 89 for 5, 105 for 6... Less than 25 displays nothing)
+message = 3, 18, 250, 89
+
+; Where you type to make an IC chat message
+ic_chat_message = 2, 283, 250, 23
+
+; IC chat message if the current background's folder contains stand.png,
+; defensedesk.png and prosecutiondesk.png
+ao2_ic_chat_message = 2, 283, 250, 23
+
+; IC chatlog
+ic_chatlog = 260, 0, 231, 319
+
+; Master server chatlog
+ms_chatlog = 490, 1, 224, 277
+
+; OOC Chatlog
+server_chatlog = 490, 1, 224, 277
+
+; Where you type to make an OOC chat message
+; NOTE: THIS DOES NOT HAVE ANY VISUAL APPEARANCE
+ooc_chat_message = 492, 281, 222, 19
+
+; Where you enter your OOC name, and also where it shows up
+ooc_chat_name = 492, 300, 85, 19
+
+; Toggle between Server and Master OOC chats
+ooc_toggle = 580, 300, 133, 19
+
+; Where the jukebox is
+music_list = 490, 342, 224, 326
+
+; Jukebox search bar
+music_search = 490, 319, 100, 23
+
+found_song_color = 100, 255, 100
+missing_song_color = 255, 100, 100
+
+; Labels and sliders for music/sfx/blips
+music_label = 282, 607, 41, 16
+sfx_label = 282, 627, 41, 16
+blip_label = 282, 647, 41, 16
+music_slider = 326, 608, 140, 16
+sfx_slider = 326, 628, 140, 16
+blip_slider = 326, 648, 140, 16
+
+; Emote buttons - [490, 98] determines how many columns and rows of buttons are
+; displayed per page. 49, 49 is the ABSOLUTE MINIMUM, and displays 1 button per
+; page. Having either number lower than 49 crashes the client when you try to
+; pick a character. If you want X columns and Y rows, you would change it to
+; 49X, 49Y (ie. 490, 147 if you want 10 columns and 3 rows)
+emotes = 5, 342, 490, 98
+emote_button_spacing = 9, 9
+
+; Page togglers for emotes
+emote_left = 5, 434, 60, 32
+emote_right = 428, 434, 60, 32
+
+; Emote dropdown/emote names - Change '125' to make it longer/shorter and
+; display the full emote name or truncate it based on length
+emote_dropdown = 5, 470, 105, 20
+
+; Hold it/Take That/Objection and the "BLING!" buttons
+hold_it = 10, 310, 76, 28
+objection = 90, 310, 76, 28
+take_that = 170, 310, 76, 28
+realization = 5, 515, 42, 42
+
+; If the server supports it (AOV does not currently) - if a character has a
+; custom.gif and custom.wav in their folder, this button acts as another
+; Objection/Take That/Hold It for that character that uses the custom animation
+; and sfx. (Think Satorah! Such Insolence!, Gotcha!)
+custom_objection = 340, 565, 76, 28
+
+; Text color dropdown menu
+text_color = 115, 470, 80, 20
+
+pos_dropdown = 200, 470, 80, 20
+
+; Preanimation toggle
+pre = 5, 490, 80, 21
+
+; Flip button
+flip = 104, 490, 51, 21
+
+; Guard button
+guard = 200, 560, 61, 21
+
+pre_no_interrupt = 200, 490, 80, 21
+
+; Penalty bars and judge's buttons for penalizing. Other than the bars, these
+; ONLY show up on a character with /pos jud
+defense_bar = 5, 566, 187, 9
+prosecution_bar = 5, 582, 187, 9
+defense_plus = 183, 566, 9, 9
+defense_minus = 5, 566, 9, 9
+prosecution_plus = 183, 582, 9, 9
+prosecution_minus = 5, 582, 9, 9
+
+; Judge's buttons for WT and CE. /pos jud
+witness_testimony = 290, 470, 85, 42
+cross_examination = 290, 515, 85, 42
+
+; Buttons to change character/Reload theme/Call Mod
+change_character = 5, 610, 120, 23
+reload_theme = 5, 637, 94, 23
+call_mod = 104, 637, 64, 23
+
+; Mute button
+mute_button = 150, 515, 42, 42
+
+; Where the Mute list pops up when you click Mute
+mute_list = 280, 469, 210, 198
+
+; ???? - if there was an Area button, where the area list would show up?
+; area_list = 270, 494, 224, 174
+
+; ???? - where a password box appears if an area is password locked?
+; area_password = 266, 471, 224, 23
+
+; >Evidence meme
+evidence_button = 627, 322, 85, 18
+evidence_background = 0, 385, 490, 284
+evidence_name = 112, 4, 264, 19
+evidence_buttons = 28, 27, 430, 216
+evidence_button_spacing = 2, 3
+evidence_overlay = 24, 24, 439, 222
+evidence_delete = 78, 8, 70, 20
+evidence_image_name = 150, 8, 130, 20
+evidence_image_button = 280, 8, 60, 20
+evidence_x = 341, 8, 20, 20
+evidence_description = 78, 28, 281, 166
+evidence_left = 28, 0, 60, 24
+evidence_right = 400, 0, 60, 24
+evidence_present = 165, 247, 158, 41
+left_evidence_icon = 13, 13, 70, 70
+right_evidence_icon = 173, 13, 70, 70
+
+; Character select widgets
+char_select = 0, 0, 714, 668
+back_to_lobby = 5, 5, 91, 23
+char_password = 297, 7, 120, 22
+char_buttons = 25, 36, 663, 596
+char_button_spacing = 7, 7
+char_select_left = 100, 5, 43, 24
+char_select_right = 146, 5, 43, 24
+spectator = 317, 640, 80, 23
+
+; -------------------------
+; New in 2.6.0
+; -------------------------
+
+; The log limiter explaining label. This is simply a piece of text that
+; explains what the spin box is for.
+; log_limit_label = 190, 612, 50, 30
+
+; The spinbox allows you to set the log limit ingame inbetween 1 and 10000,
+; with the option to set it to 0 as well (which is considered 'infinite' by
+; the log limiter).
+; log_limit_spinbox = 168, 636, 70, 25
+
+; This is an input field that allows you to change your in-character showname.
+ic_chat_name = 200, 534, 78, 23
+
+; I am sure there are some differences between the 'ao2_' versions and the
+; 'ao2_'-less versions of the IC text display and input, but I do not know
+; what. Still, here you go!
+ao2_ic_chat_name = 200, 534, 78, 23
+
+; An in-game tickbox that allows you to set whether your client should show
+; custom shownames where possible, or always keep to character names.
+; This is useful if you suspect someone is impersonating others, for example,
+; and they are using this in combination with ini-swapping to 'duplicate' a
+; character.
+showname_enable = 200, 510, 80, 21
+
+; A simple button that opens up the settings menu.
+; Equivalent to typing /settings in the OOC chat.
+settings = 130, 610, 60, 23
+
+; The character search text input in the character selecton screen.
+; The moment you enter some text, it immediately starts filtering.
+char_search = 420, 7, 120, 22
+
+; A tickbox that filters based on if a character requires password to access or not.
+; Note that this is actually only partially implemented in AO.
+; The interface exists for it, but no way to actually password the characters.
+char_passworded = 545, 7, 100, 22
+
+; A tickbox that filters characters based on if they are taken.
+char_taken = 635, 7, 80, 22
+
+; These buttons are similar to the CE / WT buttons, except they show a
+; Not Guilty or Guilty animation instead.
+not_guilty = 380, 470, 85, 42
+guilty = 380, 515, 85, 42
+
+; These are responsible for the pairing stuff.
+; These work much like muting, actually.
+pair_button = 104, 515, 42, 42
+pair_list = 280, 490, 210, 177
+pair_offset_spinbox = 280, 470, 210, 20
+
+; This button allows switching between music and areas.
+switch_area_music = 590, 319, 35, 23
+
+; These are colours for the various statuses an area can be in.
+area_free_color = 54, 198, 68
+area_lfp_color = 255, 255, 0
+area_casing_color = 255, 166, 0
+area_recess_color = 255, 190, 30
+area_rp_color = 200, 52, 252
+area_gaming_color = 55, 255, 255
+area_locked_color = 165, 43, 43
+
+; These two are casing-related inputs.
+; "casing" is a tickbox that toggles whether you should receive case alerts or
+; not (you can set your preferences, and its default value, in the Settings!)
+; "casing_button" is an interface to help you announce a case (you have to be
+; a CM first to be able to announce cases).
+casing = 200, 560, 80, 21
+casing_button = 173, 637, 60, 23
\ No newline at end of file
diff --git a/base/themes/default/courtroom_fonts.ini b/base/themes/default/courtroom_fonts.ini
new file mode 100644
index 0000000..16e2f41
--- /dev/null
+++ b/base/themes/default/courtroom_fonts.ini
@@ -0,0 +1,11 @@
+showname = 8
+message = 10
+ic_chatlog = 10
+ms_chatlog = 10
+server_chatlog = 9
+music_list = 8
+
+ic_chatlog_color = 255, 255, 255
+
+; Color for all labels and checkboxes
+label_color = 255, 255, 255
diff --git a/base/themes/default/courtroom_sounds.ini b/base/themes/default/courtroom_sounds.ini
new file mode 100644
index 0000000..b24e2ce
--- /dev/null
+++ b/base/themes/default/courtroom_sounds.ini
@@ -0,0 +1,8 @@
+realization = sfx-realization.wav
+witness_testimony = sfx-testimony2.wav
+cross_examination = sfx-testimony.wav
+evidence_present = sfx-evidenceshoop.wav
+word_call = sfx-gaspen-yeah!.wav
+mod_call = sfx-gallery.wav
+not_guilty = sfx-notguilty.wav
+guilty = sfx-guilty.wav
\ No newline at end of file
diff --git a/base/themes/default/courtroombackground.png b/base/themes/default/courtroombackground.png
new file mode 100644
index 0000000..5ad8d51
Binary files /dev/null and b/base/themes/default/courtroombackground.png differ
diff --git a/base/themes/default/crossexamination.gif b/base/themes/default/crossexamination.gif
new file mode 100644
index 0000000..a7754b6
Binary files /dev/null and b/base/themes/default/crossexamination.gif differ
diff --git a/base/themes/default/crossexamination.png b/base/themes/default/crossexamination.png
new file mode 100644
index 0000000..044a76b
Binary files /dev/null and b/base/themes/default/crossexamination.png differ
diff --git a/base/themes/default/custom.png b/base/themes/default/custom.png
new file mode 100644
index 0000000..b58d162
Binary files /dev/null and b/base/themes/default/custom.png differ
diff --git a/base/themes/default/custom_selected.png b/base/themes/default/custom_selected.png
new file mode 100644
index 0000000..d8dc525
Binary files /dev/null and b/base/themes/default/custom_selected.png differ
diff --git a/base/themes/default/defense_speedlines.gif b/base/themes/default/defense_speedlines.gif
new file mode 100644
index 0000000..5b454e5
Binary files /dev/null and b/base/themes/default/defense_speedlines.gif differ
diff --git a/base/themes/default/defensebar0.png b/base/themes/default/defensebar0.png
new file mode 100644
index 0000000..e15b727
Binary files /dev/null and b/base/themes/default/defensebar0.png differ
diff --git a/base/themes/default/defensebar1.png b/base/themes/default/defensebar1.png
new file mode 100644
index 0000000..ddc7c05
Binary files /dev/null and b/base/themes/default/defensebar1.png differ
diff --git a/base/themes/default/defensebar10.png b/base/themes/default/defensebar10.png
new file mode 100644
index 0000000..5c955b4
Binary files /dev/null and b/base/themes/default/defensebar10.png differ
diff --git a/base/themes/default/defensebar2.png b/base/themes/default/defensebar2.png
new file mode 100644
index 0000000..78835aa
Binary files /dev/null and b/base/themes/default/defensebar2.png differ
diff --git a/base/themes/default/defensebar3.png b/base/themes/default/defensebar3.png
new file mode 100644
index 0000000..8d8427a
Binary files /dev/null and b/base/themes/default/defensebar3.png differ
diff --git a/base/themes/default/defensebar4.png b/base/themes/default/defensebar4.png
new file mode 100644
index 0000000..0441683
Binary files /dev/null and b/base/themes/default/defensebar4.png differ
diff --git a/base/themes/default/defensebar5.png b/base/themes/default/defensebar5.png
new file mode 100644
index 0000000..d9236c2
Binary files /dev/null and b/base/themes/default/defensebar5.png differ
diff --git a/base/themes/default/defensebar6.png b/base/themes/default/defensebar6.png
new file mode 100644
index 0000000..373bc1b
Binary files /dev/null and b/base/themes/default/defensebar6.png differ
diff --git a/base/themes/default/defensebar7.png b/base/themes/default/defensebar7.png
new file mode 100644
index 0000000..09c8d1a
Binary files /dev/null and b/base/themes/default/defensebar7.png differ
diff --git a/base/themes/default/defensebar8.png b/base/themes/default/defensebar8.png
new file mode 100644
index 0000000..13a4548
Binary files /dev/null and b/base/themes/default/defensebar8.png differ
diff --git a/base/themes/default/defensebar9.png b/base/themes/default/defensebar9.png
new file mode 100644
index 0000000..d98ab4d
Binary files /dev/null and b/base/themes/default/defensebar9.png differ
diff --git a/base/themes/default/defminus.png b/base/themes/default/defminus.png
new file mode 100644
index 0000000..9709381
Binary files /dev/null and b/base/themes/default/defminus.png differ
diff --git a/base/themes/default/defplus.png b/base/themes/default/defplus.png
new file mode 100644
index 0000000..a3adf51
Binary files /dev/null and b/base/themes/default/defplus.png differ
diff --git a/base/themes/default/deleteevidence.png b/base/themes/default/deleteevidence.png
new file mode 100644
index 0000000..396d990
Binary files /dev/null and b/base/themes/default/deleteevidence.png differ
diff --git a/base/themes/default/emote_selected.png b/base/themes/default/emote_selected.png
new file mode 100644
index 0000000..377dd07
Binary files /dev/null and b/base/themes/default/emote_selected.png differ
diff --git a/base/themes/default/evidence_appear_left.gif b/base/themes/default/evidence_appear_left.gif
new file mode 100644
index 0000000..352a7f1
Binary files /dev/null and b/base/themes/default/evidence_appear_left.gif differ
diff --git a/base/themes/default/evidence_appear_right.gif b/base/themes/default/evidence_appear_right.gif
new file mode 100644
index 0000000..bc45e52
Binary files /dev/null and b/base/themes/default/evidence_appear_right.gif differ
diff --git a/base/themes/default/evidence_selected.png b/base/themes/default/evidence_selected.png
new file mode 100644
index 0000000..6230c83
Binary files /dev/null and b/base/themes/default/evidence_selected.png differ
diff --git a/base/themes/default/evidence_selector.png b/base/themes/default/evidence_selector.png
new file mode 100644
index 0000000..266493d
Binary files /dev/null and b/base/themes/default/evidence_selector.png differ
diff --git a/base/themes/default/evidencebackground.png b/base/themes/default/evidencebackground.png
new file mode 100644
index 0000000..ca28532
Binary files /dev/null and b/base/themes/default/evidencebackground.png differ
diff --git a/base/themes/default/evidencebutton.png b/base/themes/default/evidencebutton.png
new file mode 100644
index 0000000..2c395ec
Binary files /dev/null and b/base/themes/default/evidencebutton.png differ
diff --git a/base/themes/default/evidenceoverlay.png b/base/themes/default/evidenceoverlay.png
new file mode 100644
index 0000000..d409cc5
Binary files /dev/null and b/base/themes/default/evidenceoverlay.png differ
diff --git a/base/themes/default/evidencex.png b/base/themes/default/evidencex.png
new file mode 100644
index 0000000..6a6be36
Binary files /dev/null and b/base/themes/default/evidencex.png differ
diff --git a/base/themes/default/favorites.png b/base/themes/default/favorites.png
new file mode 100644
index 0000000..6fa3101
Binary files /dev/null and b/base/themes/default/favorites.png differ
diff --git a/base/themes/default/favorites_selected.png b/base/themes/default/favorites_selected.png
new file mode 100644
index 0000000..4c33d43
Binary files /dev/null and b/base/themes/default/favorites_selected.png differ
diff --git a/base/themes/default/guilty.gif b/base/themes/default/guilty.gif
new file mode 100644
index 0000000..3dd95d5
Binary files /dev/null and b/base/themes/default/guilty.gif differ
diff --git a/base/themes/default/guilty.png b/base/themes/default/guilty.png
new file mode 100644
index 0000000..efe68f7
Binary files /dev/null and b/base/themes/default/guilty.png differ
diff --git a/base/themes/default/holdit.gif b/base/themes/default/holdit.gif
new file mode 100644
index 0000000..5f71ac6
Binary files /dev/null and b/base/themes/default/holdit.gif differ
diff --git a/base/themes/default/holdit.png b/base/themes/default/holdit.png
new file mode 100644
index 0000000..09d1d37
Binary files /dev/null and b/base/themes/default/holdit.png differ
diff --git a/base/themes/default/holdit_selected.png b/base/themes/default/holdit_selected.png
new file mode 100644
index 0000000..51586e7
Binary files /dev/null and b/base/themes/default/holdit_selected.png differ
diff --git a/base/themes/default/loadingbackground.png b/base/themes/default/loadingbackground.png
new file mode 100644
index 0000000..202a881
Binary files /dev/null and b/base/themes/default/loadingbackground.png differ
diff --git a/base/themes/default/lobby_design.ini b/base/themes/default/lobby_design.ini
new file mode 100644
index 0000000..ef64114
--- /dev/null
+++ b/base/themes/default/lobby_design.ini
@@ -0,0 +1,17 @@
+lobby = 0, 0, 517, 666
+public_servers = 46, 88, 114, 30
+favorites = 164, 88, 114, 30
+refresh = 56, 381, 132, 28
+add_to_fav = 194, 381, 132, 28
+connect = 332, 381, 132, 28
+version = 170, 1, 300, 21
+about = 428, 1, 88, 21
+server_list = 20, 125, 286, 240
+player_count = 336, 91, 173, 16
+description = 337, 109, 173, 245
+chatbox = 2, 445, 515, 198
+chatname = 3, 646, 85, 19
+chatmessage = 93, 646, 424, 19
+loading_label = 135, 92, 254, 95
+progress_bar = 135, 188, 254, 21
+cancel = 220, 220, 80, 20
diff --git a/base/themes/default/lobbybackground.png b/base/themes/default/lobbybackground.png
new file mode 100644
index 0000000..094f19c
Binary files /dev/null and b/base/themes/default/lobbybackground.png differ
diff --git a/base/themes/default/mute.png b/base/themes/default/mute.png
new file mode 100644
index 0000000..a184cbf
Binary files /dev/null and b/base/themes/default/mute.png differ
diff --git a/base/themes/default/mute_pressed.png b/base/themes/default/mute_pressed.png
new file mode 100644
index 0000000..e9793ce
Binary files /dev/null and b/base/themes/default/mute_pressed.png differ
diff --git a/base/themes/default/muted.png b/base/themes/default/muted.png
new file mode 100644
index 0000000..969da04
Binary files /dev/null and b/base/themes/default/muted.png differ
diff --git a/base/themes/default/muted_old.png b/base/themes/default/muted_old.png
new file mode 100644
index 0000000..f9878f1
Binary files /dev/null and b/base/themes/default/muted_old.png differ
diff --git a/base/themes/default/notguilty.gif b/base/themes/default/notguilty.gif
new file mode 100644
index 0000000..d057715
Binary files /dev/null and b/base/themes/default/notguilty.gif differ
diff --git a/base/themes/default/notguilty.png b/base/themes/default/notguilty.png
new file mode 100644
index 0000000..b9cfe31
Binary files /dev/null and b/base/themes/default/notguilty.png differ
diff --git a/base/themes/default/objection.gif b/base/themes/default/objection.gif
new file mode 100644
index 0000000..6aae2e5
Binary files /dev/null and b/base/themes/default/objection.gif differ
diff --git a/base/themes/default/objection.png b/base/themes/default/objection.png
new file mode 100644
index 0000000..6fbcbc2
Binary files /dev/null and b/base/themes/default/objection.png differ
diff --git a/base/themes/default/objection_selected.png b/base/themes/default/objection_selected.png
new file mode 100644
index 0000000..384e4e9
Binary files /dev/null and b/base/themes/default/objection_selected.png differ
diff --git a/base/themes/default/pair_button.png b/base/themes/default/pair_button.png
new file mode 100644
index 0000000..19f6f22
Binary files /dev/null and b/base/themes/default/pair_button.png differ
diff --git a/base/themes/default/pair_button_pressed.png b/base/themes/default/pair_button_pressed.png
new file mode 100644
index 0000000..aaf53fb
Binary files /dev/null and b/base/themes/default/pair_button_pressed.png differ
diff --git a/base/themes/default/placeholder.gif b/base/themes/default/placeholder.gif
new file mode 100644
index 0000000..e35aaf4
Binary files /dev/null and b/base/themes/default/placeholder.gif differ
diff --git a/base/themes/default/present.png b/base/themes/default/present.png
new file mode 100644
index 0000000..134d742
Binary files /dev/null and b/base/themes/default/present.png differ
diff --git a/base/themes/default/present_disabled.png b/base/themes/default/present_disabled.png
new file mode 100644
index 0000000..9c6a702
Binary files /dev/null and b/base/themes/default/present_disabled.png differ
diff --git a/base/themes/default/prominus.png b/base/themes/default/prominus.png
new file mode 100644
index 0000000..1191e1e
Binary files /dev/null and b/base/themes/default/prominus.png differ
diff --git a/base/themes/default/proplus.png b/base/themes/default/proplus.png
new file mode 100644
index 0000000..5e9d563
Binary files /dev/null and b/base/themes/default/proplus.png differ
diff --git a/base/themes/default/prosecution_speedlines.gif b/base/themes/default/prosecution_speedlines.gif
new file mode 100644
index 0000000..b48802a
Binary files /dev/null and b/base/themes/default/prosecution_speedlines.gif differ
diff --git a/base/themes/default/prosecutionbar0.png b/base/themes/default/prosecutionbar0.png
new file mode 100644
index 0000000..56b8d61
Binary files /dev/null and b/base/themes/default/prosecutionbar0.png differ
diff --git a/base/themes/default/prosecutionbar1.png b/base/themes/default/prosecutionbar1.png
new file mode 100644
index 0000000..b44323c
Binary files /dev/null and b/base/themes/default/prosecutionbar1.png differ
diff --git a/base/themes/default/prosecutionbar10.png b/base/themes/default/prosecutionbar10.png
new file mode 100644
index 0000000..f0a79c3
Binary files /dev/null and b/base/themes/default/prosecutionbar10.png differ
diff --git a/base/themes/default/prosecutionbar2.png b/base/themes/default/prosecutionbar2.png
new file mode 100644
index 0000000..8bb51da
Binary files /dev/null and b/base/themes/default/prosecutionbar2.png differ
diff --git a/base/themes/default/prosecutionbar3.png b/base/themes/default/prosecutionbar3.png
new file mode 100644
index 0000000..d0b9c4c
Binary files /dev/null and b/base/themes/default/prosecutionbar3.png differ
diff --git a/base/themes/default/prosecutionbar4.png b/base/themes/default/prosecutionbar4.png
new file mode 100644
index 0000000..b4ac6bb
Binary files /dev/null and b/base/themes/default/prosecutionbar4.png differ
diff --git a/base/themes/default/prosecutionbar5.png b/base/themes/default/prosecutionbar5.png
new file mode 100644
index 0000000..6bb5eb5
Binary files /dev/null and b/base/themes/default/prosecutionbar5.png differ
diff --git a/base/themes/default/prosecutionbar6.png b/base/themes/default/prosecutionbar6.png
new file mode 100644
index 0000000..9ee9638
Binary files /dev/null and b/base/themes/default/prosecutionbar6.png differ
diff --git a/base/themes/default/prosecutionbar7.png b/base/themes/default/prosecutionbar7.png
new file mode 100644
index 0000000..34e00da
Binary files /dev/null and b/base/themes/default/prosecutionbar7.png differ
diff --git a/base/themes/default/prosecutionbar8.png b/base/themes/default/prosecutionbar8.png
new file mode 100644
index 0000000..5035b51
Binary files /dev/null and b/base/themes/default/prosecutionbar8.png differ
diff --git a/base/themes/default/prosecutionbar9.png b/base/themes/default/prosecutionbar9.png
new file mode 100644
index 0000000..b185a1a
Binary files /dev/null and b/base/themes/default/prosecutionbar9.png differ
diff --git a/base/themes/default/publicservers.png b/base/themes/default/publicservers.png
new file mode 100644
index 0000000..98cf2ad
Binary files /dev/null and b/base/themes/default/publicservers.png differ
diff --git a/base/themes/default/publicservers_selected.png b/base/themes/default/publicservers_selected.png
new file mode 100644
index 0000000..bcfa4c4
Binary files /dev/null and b/base/themes/default/publicservers_selected.png differ
diff --git a/base/themes/default/realization.png b/base/themes/default/realization.png
new file mode 100644
index 0000000..f791d29
Binary files /dev/null and b/base/themes/default/realization.png differ
diff --git a/base/themes/default/realization_pressed.png b/base/themes/default/realization_pressed.png
new file mode 100644
index 0000000..9a72ed3
Binary files /dev/null and b/base/themes/default/realization_pressed.png differ
diff --git a/base/themes/default/realizationflash.png b/base/themes/default/realizationflash.png
new file mode 100644
index 0000000..776c70d
Binary files /dev/null and b/base/themes/default/realizationflash.png differ
diff --git a/base/themes/default/refresh.png b/base/themes/default/refresh.png
new file mode 100644
index 0000000..0b49cd0
Binary files /dev/null and b/base/themes/default/refresh.png differ
diff --git a/base/themes/default/refresh_pressed.png b/base/themes/default/refresh_pressed.png
new file mode 100644
index 0000000..8036683
Binary files /dev/null and b/base/themes/default/refresh_pressed.png differ
diff --git a/base/themes/default/takethat.gif b/base/themes/default/takethat.gif
new file mode 100644
index 0000000..dd03310
Binary files /dev/null and b/base/themes/default/takethat.gif differ
diff --git a/base/themes/default/takethat.png b/base/themes/default/takethat.png
new file mode 100644
index 0000000..8ff2bef
Binary files /dev/null and b/base/themes/default/takethat.png differ
diff --git a/base/themes/default/takethat_selected.png b/base/themes/default/takethat_selected.png
new file mode 100644
index 0000000..3fe0a8c
Binary files /dev/null and b/base/themes/default/takethat_selected.png differ
diff --git a/base/themes/default/testimony.gif b/base/themes/default/testimony.gif
new file mode 100644
index 0000000..6d5898d
Binary files /dev/null and b/base/themes/default/testimony.gif differ
diff --git a/base/themes/default/testimony.png b/base/themes/default/testimony.png
new file mode 100644
index 0000000..7b81fc8
Binary files /dev/null and b/base/themes/default/testimony.png differ
diff --git a/base/themes/default/witnesstestimony.gif b/base/themes/default/witnesstestimony.gif
new file mode 100644
index 0000000..03b4900
Binary files /dev/null and b/base/themes/default/witnesstestimony.gif differ
diff --git a/base/themes/default/witnesstestimony.png b/base/themes/default/witnesstestimony.png
new file mode 100644
index 0000000..47c2301
Binary files /dev/null and b/base/themes/default/witnesstestimony.png differ
diff --git a/include/aoapplication.h b/include/aoapplication.h
index 5646dde..67f9a0d 100644
--- a/include/aoapplication.h
+++ b/include/aoapplication.h
@@ -1,383 +1,323 @@
-#ifndef AOAPPLICATION_H
-#define AOAPPLICATION_H
-
-#include "aopacket.h"
-#include "datatypes.h"
-#include "discord_rich_presence.h"
-
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-
-#include
-
-#include
-#include
-
-#include
-#include
-#include
-#include
-#ifdef QTAUDIO
-#include
-#endif
-
-#include
-#include
-#include
-#include
-
-class NetworkManager;
-class Lobby;
-class Courtroom;
-class AOApplication : public QApplication {
- Q_OBJECT
-
-public:
- AOApplication(int &argc, char **argv);
- ~AOApplication();
-
- NetworkManager *net_manager;
- Lobby *w_lobby;
- Courtroom *w_courtroom;
- AttorneyOnline::Discord *discord;
-
- bool lobby_constructed = false;
- bool courtroom_constructed = false;
-
- void construct_lobby();
- void destruct_lobby();
-
- void construct_courtroom();
- void destruct_courtroom();
-
- bool is_music_track(QString trackname);
-
- void ms_packet_received(AOPacket *p_packet);
- void server_packet_received(AOPacket *p_packet);
-
- void send_ms_packet(AOPacket *p_packet);
- void send_server_packet(AOPacket *p_packet, bool encoded = true);
-
- void call_settings_menu();
- void call_announce_menu(Courtroom *court);
-
- /////////////////server metadata//////////////////
-
- unsigned int s_decryptor = 5;
- bool encryption_needed = true;
-
- bool yellow_text_enabled = false;
- bool prezoom_enabled = false;
- bool flipping_enabled = false;
- bool custom_objection_enabled = false;
- bool improved_loading_enabled = false;
- bool desk_mod_enabled = false;
- bool evidence_enabled = false;
- bool cccc_ic_support_enabled = false;
- bool arup_enabled = false;
- bool casing_alerts_enabled = false;
- bool modcall_reason_enabled = false;
- bool looping_sfx_support_enabled = false;
-
- ///////////////loading info///////////////////
-
- // player number, it's hardly used but might be needed for some old servers
- int s_pv = 0;
-
- QString server_software = "";
-
- int char_list_size = 0;
- int loaded_chars = 0;
- int generated_chars = 0;
- int evidence_list_size = 0;
- int loaded_evidence = 0;
- int music_list_size = 0;
- int loaded_music = 0;
- int area_count = 0;
- bool courtroom_loaded = false;
-
- //////////////////versioning///////////////
-
- int get_release() const { return RELEASE; }
- int get_major_version() const { return MAJOR_VERSION; }
- int get_minor_version() const { return MINOR_VERSION; }
- QString get_version_string();
-
- ///////////////////////////////////////////
-
- void set_favorite_list();
- QVector &get_favorite_list() { return favorite_list; }
- void add_favorite_server(int p_server);
-
- void set_server_list();
- QVector &get_server_list() { return server_list; }
-
- // reads the theme from config.ini and sets it accordingly
- void reload_theme();
-
- // Returns the character the player has currently selected
- QString get_current_char();
-
- // implementation in path_functions.cpp
- QString get_base_path();
- QString get_data_path();
- QString get_theme_path(QString p_file);
- QString get_default_theme_path(QString p_file);
- QString get_custom_theme_path(QString p_theme, QString p_file);
- QString get_character_path(QString p_char, QString p_file);
- QString get_sounds_path(QString p_file);
- QString get_music_path(QString p_song);
- QString get_background_path(QString p_file);
- QString get_default_background_path(QString p_file);
- QString get_evidence_path(QString p_file);
- QString get_case_sensitive_path(QString p_file);
-
- ////// Functions for reading and writing files //////
- // Implementations file_functions.cpp
-
- // Instead of reinventing the wheel, we'll use a QSettings class.
- QSettings *configini;
-
- // Reads the theme from config.ini and loads it into the current_theme
- // variable
- QString read_theme();
-
- // Returns the value of ooc_name in config.ini
- QString get_ooc_name();
-
- // Returns the blip rate from config.ini
- int read_blip_rate();
-
- // Returns true if blank blips is enabled in config.ini and false otherwise
- bool get_blank_blip();
-
- // Returns true if looping sound effects are enabled in the config.ini
- bool get_looping_sfx();
-
- // Returns true if kill music on object is enabled in the config.ini
- bool get_objectmusic();
-
- // Returns the value of default_music in config.ini
- int get_default_music();
-
- // Returns the value of default_sfx in config.ini
- int get_default_sfx();
-
- // Returns the value of default_blip in config.ini
- int get_default_blip();
-
- // Returns the value of whether Discord should be enabled on startup
- // from the config.ini.
- bool is_discord_enabled();
-
- // Returns the value of whether shaking and flashing should be enabled.
- // from the config.ini.
- bool is_shakeandflash_enabled();
-
- // Returns whether evidence should be maintained ic
- bool is_keepevi_enabled();
-
- // Returns the value of the maximum amount of lines the IC chatlog
- // may contain, from config.ini.
- int get_max_log_size();
-
- // Gets the punctuation delay modifier
- bool get_pundelay();
-
- //Gets whether slower text speed is enabled
- bool get_slower_blips();
- // Returns whether the log should go upwards (new behaviour)
- // or downwards (vanilla behaviour).
- bool get_log_goes_downwards();
-
- // Returns the username the user may have set in config.ini.
- QString get_default_username();
-
- // Returns the audio device used for the client.
- QString get_audio_output_device();
-#ifdef QTAUDIO
- QAudioDeviceInfo QtAudioDevice;
-#endif
-
- // Returns whether the user would like to have custom shownames on by default.
- bool get_showname_enabled_by_default();
-
- // Returns the list of words in callwords.ini
- QStringList get_call_words();
-
- // Appends the argument string to serverlist.txt
- void write_to_serverlist_txt(QString p_line);
-
- // Returns the contents of serverlist.txt
- QVector read_serverlist_txt();
-
- // Returns the value of p_identifier in the design.ini file in p_design_path
- QString read_design_ini(QString p_identifier, QString p_design_path);
-
- // Returns the coordinates of widget with p_identifier from p_file
- QPoint get_button_spacing(QString p_identifier, QString p_file);
-
- // Returns the dimensions of widget with specified identifier from p_file
- pos_size_type get_element_dimensions(QString p_identifier, QString p_file);
-
- // Returns the name of the font with p_identifier from p_file
- QString get_font_name(QString p_identifier, QString p_file);
-
- // Returns the value of font_size with p_identifier from p_file
- int get_font_size(QString p_identifier, QString p_file);
-
- // Returns the color with p_identifier from p_file
- QColor get_color(QString p_identifier, QString p_file);
-
- // Returns the colour from the misc folder.
- QColor get_chat_color(QString p_identifier, QString p_chat);
-
- // Returns the sfx with p_identifier from sounds.ini in the current theme path
- QString get_sfx(QString p_identifier);
-
- // Figure out if we can opus this or if we should fall back to wav
- QString get_sfx_suffix(QString sound_to_check);
-
- // figure out if we can find what prefix this song uses
- QString get_music_prefix(QString song_to_check);
-
- // Can we use APNG for this? If not, WEBP? if not, GIF? If not, fall back to a
- // gif.
- QString get_image_suffix(QString path_to_check);
-
- // Returns the value of p_search_line within target_tag and terminator_tag
- QString read_char_ini(QString p_char, QString p_search_line,
- QString target_tag);
-
- // Returns the side of the p_char character from that characters ini file
- QString get_char_side(QString p_char);
-
- // Returns the showname from the ini of p_char
- QString get_showname(QString p_char);
-
- // Returns the value of chat from the specific p_char's ini file
- QString get_chat(QString p_char);
-
- // Returns the value of shouts from the specified p_char's ini file
- QString get_char_shouts(QString p_char);
-
- // Returns the preanim duration of p_char's p_emote
- int get_preanim_duration(QString p_char, QString p_emote);
-
- // Same as above, but only returns if it has a % in front(refer to Preanims
- // section in the manual)
- int get_ao2_preanim_duration(QString p_char, QString p_emote);
-
- // Not in use
- int get_text_delay(QString p_char, QString p_emote);
-
- // Returns the custom realisation used by the character.
- QString get_custom_realization(QString p_char);
-
- // Returns the name of p_char
- QString get_char_name(QString p_char);
-
- // Returns the total amount of emotes of p_char
- int get_emote_number(QString p_char);
-
- // Returns the emote comment of p_char's p_emote
- QString get_emote_comment(QString p_char, int p_emote);
-
- // Returns if an emote loops it's SFX
- QString get_sfx_looping(QString p_char, int p_emote);
-
- // Returns if an emote has a frame specific SFX for it
- QString get_frame_sfx_name(QString p_char, QString p_emote, int n_frame);
-
- // Returns if an emote has a frame specific SFX for it
- QString get_realization_frame(QString p_char, QString p_emote, int n_frame);
-
- // Returns if an emote has a frame specific SFX for it
- QString get_screenshake_frame(QString p_char, QString p_emote, int n_frame);
-
- // Returns the base name of p_char's p_emote
- QString get_emote(QString p_char, int p_emote);
-
- // Returns the preanimation name of p_char's p_emote
- QString get_pre_emote(QString p_char, int p_emote);
-
- // Returns the sfx of p_char's p_emote
- QString get_sfx_name(QString p_char, int p_emote);
-
- // Not in use
- int get_sfx_delay(QString p_char, int p_emote);
-
- // Returns the modifier for p_char's p_emote
- int get_emote_mod(QString p_char, int p_emote);
-
- // Returns the desk modifier for p_char's p_emote
- int get_desk_mod(QString p_char, int p_emote);
-
- // Returns p_char's gender
- QString get_gender(QString p_char);
-
- // ======
- // These are all casing-related settings.
- // ======
-
- // Returns if the user has casing alerts enabled.
- bool get_casing_enabled();
-
- // Returns if the user wants to get alerts for the defence role.
- bool get_casing_defence_enabled();
-
- // Same for prosecution.
- bool get_casing_prosecution_enabled();
-
- // Same for judge.
- bool get_casing_judge_enabled();
-
- // Same for witnesses.
- bool get_casing_wit_enabled();
-
- // Same for juror.
- bool get_casing_juror_enabled();
-
- // Same for steno.
- bool get_casing_steno_enabled();
-
- // Same for CM.
- bool get_casing_cm_enabled();
-
- // Get the message for the CM for casing alerts.
- QString get_casing_can_host_cases();
-
- // Get if html for ic log is enabled
- bool get_colored_iclog_enabled();
-
- // Get if ic log mirror is enabled
- bool get_iclmir_enabled();
-
- // Get if only inline coloring should be shown in log
- bool colorlog_restricted_enabled();
-
-private:
- const int RELEASE = 2;
- const int MAJOR_VERSION = 7;
- const int MINOR_VERSION = 0;
-
- QString current_theme = "default";
-
- QVector server_list;
- QVector favorite_list;
-
-private slots:
- void ms_connect_finished(bool connected, bool will_retry);
-
-public slots:
- void server_disconnected();
- void loading_cancelled();
-};
-
-#endif // AOAPPLICATION_H
+#ifndef AOAPPLICATION_H
+#define AOAPPLICATION_H
+
+#include "aopacket.h"
+#include "datatypes.h"
+#include "discord_rich_presence.h"
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+class NetworkManager;
+class Lobby;
+class Courtroom;
+
+class AOApplication : public QApplication
+{
+ Q_OBJECT
+
+public:
+ AOApplication(int &argc, char **argv);
+ ~AOApplication();
+
+ NetworkManager *net_manager;
+ Lobby *w_lobby;
+ Courtroom *w_courtroom;
+ AttorneyOnline::Discord *discord;
+
+ bool lobby_constructed = false;
+ bool courtroom_constructed = false;
+
+ void construct_lobby();
+ void destruct_lobby();
+
+ void construct_courtroom();
+ void destruct_courtroom();
+
+ void ms_packet_received(AOPacket *p_packet);
+ void server_packet_received(AOPacket *p_packet);
+
+ void send_ms_packet(AOPacket *p_packet);
+ void send_server_packet(AOPacket *p_packet, bool encoded = true);
+
+ void call_settings_menu();
+ void call_announce_menu(Courtroom *court);
+
+ /////////////////server metadata//////////////////
+
+ unsigned int s_decryptor = 5;
+ bool encryption_needed = true;
+
+ bool yellow_text_enabled = false;
+ bool prezoom_enabled = false;
+ bool flipping_enabled = false;
+ bool custom_objection_enabled = false;
+ bool improved_loading_enabled = false;
+ bool desk_mod_enabled = false;
+ bool evidence_enabled = false;
+ bool cccc_ic_support_enabled = false;
+ bool arup_enabled = false;
+ bool casing_alerts_enabled = false;
+ bool modcall_reason_enabled = false;
+
+ ///////////////loading info///////////////////
+
+ //player number, it's hardly used but might be needed for some old servers
+ int s_pv = 0;
+
+ QString server_software = "";
+
+ int char_list_size = 0;
+ int loaded_chars = 0;
+ int generated_chars = 0;
+ int evidence_list_size = 0;
+ int loaded_evidence = 0;
+ int music_list_size = 0;
+ int loaded_music = 0;
+
+ bool courtroom_loaded = false;
+
+ //////////////////versioning///////////////
+
+ const int get_release() const { return RELEASE; }
+ const int get_major_version() const { return MAJOR_VERSION; }
+ const int get_minor_version() const { return MINOR_VERSION; }
+ QString get_version_string();
+
+ ///////////////////////////////////////////
+
+ void set_favorite_list();
+ QVector& get_favorite_list() {return favorite_list;}
+ void add_favorite_server(int p_server);
+
+ void set_server_list();
+ QVector& get_server_list() {return server_list;}
+
+ //reads the theme from config.ini and sets it accordingly
+ void reload_theme();
+
+ //Returns the character the player has currently selected
+ QString get_current_char();
+
+ //implementation in path_functions.cpp
+ QString get_base_path();
+ QString get_data_path();
+ QString get_theme_path(QString p_file);
+ QString get_default_theme_path(QString p_file);
+ QString get_custom_theme_path(QString p_theme, QString p_file);
+ QString get_character_path(QString p_char, QString p_file);
+ QString get_sounds_path(QString p_file);
+ QString get_music_path(QString p_song);
+ QString get_background_path(QString p_file);
+ QString get_default_background_path(QString p_file);
+ QString get_evidence_path(QString p_file);
+ QString get_case_sensitive_path(QString p_file);
+
+ ////// Functions for reading and writing files //////
+ // Implementations file_functions.cpp
+
+ // Instead of reinventing the wheel, we'll use a QSettings class.
+ QSettings *configini;
+
+ //Reads the theme from config.ini and loads it into the current_theme variable
+ QString read_theme();
+
+ //Returns the value of ooc_name in config.ini
+ QString get_ooc_name();
+
+ //Returns the blip rate from config.ini
+ int read_blip_rate();
+
+ //Returns true if blank blips is enabled in config.ini and false otherwise
+ bool get_blank_blip();
+
+ //Returns the value of default_music in config.ini
+ int get_default_music();
+
+ //Returns the value of default_sfx in config.ini
+ int get_default_sfx();
+
+ //Returns the value of default_blip in config.ini
+ int get_default_blip();
+
+ // Returns the value of whether Discord should be enabled on startup
+ // from the config.ini.
+ bool is_discord_enabled();
+
+ // Returns the value of the maximum amount of lines the IC chatlog
+ // may contain, from config.ini.
+ int get_max_log_size();
+
+ // Returns whether the log should go upwards (new behaviour)
+ // or downwards (vanilla behaviour).
+ bool get_log_goes_downwards();
+
+ // Returns the username the user may have set in config.ini.
+ QString get_default_username();
+
+ // Returns the audio device used for the client.
+ QString get_audio_output_device();
+
+ // Returns whether the user would like to have custom shownames on by default.
+ bool get_showname_enabled_by_default();
+
+ //Returns the list of words in callwords.ini
+ QStringList get_call_words();
+
+ //Appends the argument string to serverlist.txt
+ void write_to_serverlist_txt(QString p_line);
+
+ //Returns the contents of serverlist.txt
+ QVector read_serverlist_txt();
+
+ //Returns the value of p_identifier in the design.ini file in p_design_path
+ QString read_design_ini(QString p_identifier, QString p_design_path);
+
+ //Returns the coordinates of widget with p_identifier from p_file
+ QPoint get_button_spacing(QString p_identifier, QString p_file);
+
+ //Returns the dimensions of widget with specified identifier from p_file
+ pos_size_type get_element_dimensions(QString p_identifier, QString p_file);
+
+ //Returns the name of the font with p_identifier from p_file
+ QString get_font_name(QString p_identifier, QString p_file);
+
+
+ //Returns the value of font_size with p_identifier from p_file
+ int get_font_size(QString p_identifier, QString p_file);
+
+ //Returns the color with p_identifier from p_file
+ QColor get_color(QString p_identifier, QString p_file);
+
+ // Returns the colour from the misc folder.
+ QColor get_chat_color(QString p_identifier, QString p_chat);
+
+ //Returns the sfx with p_identifier from sounds.ini in the current theme path
+ QString get_sfx(QString p_identifier);
+
+ //Figure out if we can opus this or if we should fall back to wav
+ QString get_sfx_suffix(QString sound_to_check);
+
+ // Can we use APNG for this? If not, fall back to a gif.
+ QString get_image_suffix(QString path_to_check);
+
+ //Returns the value of p_search_line within target_tag and terminator_tag
+ QString read_char_ini(QString p_char, QString p_search_line, QString target_tag);
+
+ //Returns the side of the p_char character from that characters ini file
+ QString get_char_side(QString p_char);
+
+ //Returns the showname from the ini of p_char
+ QString get_showname(QString p_char);
+
+ //Returns the value of chat from the specific p_char's ini file
+ QString get_chat(QString p_char);
+
+ //Returns the value of shouts from the specified p_char's ini file
+ QString get_char_shouts(QString p_char);
+
+ //Returns the preanim duration of p_char's p_emote
+ int get_preanim_duration(QString p_char, QString p_emote);
+
+ //Same as above, but only returns if it has a % in front(refer to Preanims section in the manual)
+ int get_ao2_preanim_duration(QString p_char, QString p_emote);
+
+ //Not in use
+ int get_text_delay(QString p_char, QString p_emote);
+
+ // Returns the custom realisation used by the character.
+ QString get_custom_realization(QString p_char);
+
+ //Returns the name of p_char
+ QString get_char_name(QString p_char);
+
+ //Returns the total amount of emotes of p_char
+ int get_emote_number(QString p_char);
+
+ //Returns the emote comment of p_char's p_emote
+ QString get_emote_comment(QString p_char, int p_emote);
+
+ //Returns the base name of p_char's p_emote
+ QString get_emote(QString p_char, int p_emote);
+
+ //Returns the preanimation name of p_char's p_emote
+ QString get_pre_emote(QString p_char, int p_emote);
+
+ //Returns the sfx of p_char's p_emote
+ QString get_sfx_name(QString p_char, int p_emote);
+
+ //Not in use
+ int get_sfx_delay(QString p_char, int p_emote);
+
+ //Returns the modifier for p_char's p_emote
+ int get_emote_mod(QString p_char, int p_emote);
+
+ //Returns the desk modifier for p_char's p_emote
+ int get_desk_mod(QString p_char, int p_emote);
+
+ //Returns p_char's gender
+ QString get_gender(QString p_char);
+
+ // ======
+ // These are all casing-related settings.
+ // ======
+
+ // Returns if the user has casing alerts enabled.
+ bool get_casing_enabled();
+
+ // Returns if the user wants to get alerts for the defence role.
+ bool get_casing_defence_enabled();
+
+ // Same for prosecution.
+ bool get_casing_prosecution_enabled();
+
+ // Same for judge.
+ bool get_casing_judge_enabled();
+
+ // Same for juror.
+ bool get_casing_juror_enabled();
+
+ // Same for steno.
+ bool get_casing_steno_enabled();
+
+ // Same for CM.
+ bool get_casing_cm_enabled();
+
+ // Get the message for the CM for casing alerts.
+ QString get_casing_can_host_cases();
+
+private:
+ const int RELEASE = 2;
+ const int MAJOR_VERSION = 6;
+ const int MINOR_VERSION = 2;
+
+ QString current_theme = "default";
+
+ QVector server_list;
+ QVector favorite_list;
+
+private slots:
+ void ms_connect_finished(bool connected, bool will_retry);
+
+public slots:
+ void server_disconnected();
+ void loading_cancelled();
+};
+
+#endif // AOAPPLICATION_H
diff --git a/include/aoblipplayer.h b/include/aoblipplayer.h
index 4520120..102a040 100644
--- a/include/aoblipplayer.h
+++ b/include/aoblipplayer.h
@@ -9,32 +9,32 @@
#include "aoapplication.h"
-#include
#include
#include
+#include
-class AOBlipPlayer {
+
+class AOBlipPlayer
+{
public:
AOBlipPlayer(QWidget *parent, AOApplication *p_ao_app);
void set_blips(QString p_sfx);
void blip_tick();
- void set_volume(qreal p_volume);
+ void set_volume(int p_volume);
int m_cycle = 0;
private:
QWidget *m_parent;
AOApplication *ao_app;
- qreal m_volume;
- void set_volume_internal(qreal p_volume);
-
-#if defined(BASSAUDIO)
+ int m_volume;
+ #if defined(BASSAUDIO)
HSTREAM m_stream_list[5];
-#elif defined(QTAUDIO)
+ #elif defined(QTAUDIO)
QSoundEffect m_blips;
-#endif
+ #endif
};
#endif // AOBLIPPLAYER_H
diff --git a/include/aobutton.h b/include/aobutton.h
index f575885..4b7209a 100644
--- a/include/aobutton.h
+++ b/include/aobutton.h
@@ -3,10 +3,11 @@
#include "aoapplication.h"
-#include
#include
+#include
-class AOButton : public QPushButton {
+class AOButton : public QPushButton
+{
Q_OBJECT
public:
diff --git a/include/aocaseannouncerdialog.h b/include/aocaseannouncerdialog.h
index 89080de..a238c3f 100644
--- a/include/aocaseannouncerdialog.h
+++ b/include/aocaseannouncerdialog.h
@@ -4,21 +4,20 @@
#include "aoapplication.h"
#include "courtroom.h"
-#include
-#include
#include
+#include
+#include
#include
+#include
#include
#include
-#include
-class AOCaseAnnouncerDialog : public QDialog {
+class AOCaseAnnouncerDialog : public QDialog
+{
Q_OBJECT
public:
- explicit AOCaseAnnouncerDialog(QWidget *parent = nullptr,
- AOApplication *p_ao_app = nullptr,
- Courtroom *p_court = nullptr);
+ explicit AOCaseAnnouncerDialog(QWidget *parent = nullptr, AOApplication *p_ao_app = nullptr, Courtroom *p_court = nullptr);
private:
AOApplication *ao_app;
@@ -37,7 +36,6 @@ private:
QCheckBox *ui_judge_needed;
QCheckBox *ui_juror_needed;
QCheckBox *ui_steno_needed;
- QCheckBox *ui_witness_needed;
public slots:
void ok_pressed();
diff --git a/include/aocharbutton.h b/include/aocharbutton.h
index dd27e62..f372cdf 100644
--- a/include/aocharbutton.h
+++ b/include/aocharbutton.h
@@ -4,17 +4,17 @@
#include "aoapplication.h"
#include "aoimage.h"
-#include
#include
#include
#include
+#include
-class AOCharButton : public QPushButton {
+class AOCharButton : public QPushButton
+{
Q_OBJECT
public:
- AOCharButton(QWidget *parent, AOApplication *p_ao_app, int x_pos, int y_pos,
- bool is_taken);
+ AOCharButton(QWidget *parent, AOApplication *p_ao_app, int x_pos, int y_pos, bool is_taken);
AOApplication *ao_app;
diff --git a/include/aocharmovie.h b/include/aocharmovie.h
index f62820b..7ef7da3 100644
--- a/include/aocharmovie.h
+++ b/include/aocharmovie.h
@@ -1,17 +1,16 @@
#ifndef AOCHARMOVIE_H
#define AOCHARMOVIE_H
-#include "include/aosfxplayer.h"
-#include "include/courtroom.h"
+#include
+#include
+#include
#include
#include
-#include
-#include
-#include
-#include
class AOApplication;
-class AOCharMovie : public QLabel {
+
+class AOCharMovie : public QLabel
+{
Q_OBJECT
public:
@@ -22,24 +21,12 @@ public:
void play_talking(QString p_char, QString p_emote);
void play_idle(QString p_char, QString p_emote);
- void set_flipped(bool p_flipped) { m_flipped = p_flipped; }
- void LoadImageWithStupidMethodForFlipSupport(QImage image);
+ void set_flipped(bool p_flipped) {m_flipped = p_flipped;}
+
void stop();
- void play_frame_sfx();
-
- void sfx_two_network_boogaloo();
- void screenshake_two_network_boogaloo();
- void realization_two_network_boogaloo();
-
- AOSfxPlayer *frame_specific_sfx_player;
- Courtroom *mycourtroom;
- QString frame_sfx_hellstring = "";
- QString frame_screenshake_hellstring = "";
- QString frame_realization_hellstring = "";
- bool use_networked_framehell = false;
-
void move(int ax, int ay);
+
void combo_resize(int w, int h);
private:
@@ -48,17 +35,10 @@ private:
QMovie *m_movie;
QVector movie_frames;
QTimer *preanim_timer;
- QTimer *ticker;
- QString last_path;
- QString current_emote;
- QString current_char;
- int default_w;
- int default_h;
const int time_mod = 62;
- // These are the X and Y values before they are fixed based on the sprite's
- // width.
+ // These are the X and Y values before they are fixed based on the sprite's width.
int x = 0;
int y = 0;
@@ -70,7 +50,8 @@ signals:
void done();
private slots:
+ void frame_change(int n_frame);
void timer_done();
- void movie_ticker();
};
+
#endif // AOCHARMOVIE_H
diff --git a/include/aoemotebutton.h b/include/aoemotebutton.h
index acf0b48..c99a73b 100644
--- a/include/aoemotebutton.h
+++ b/include/aoemotebutton.h
@@ -3,21 +3,22 @@
#include "aoapplication.h"
-#include
#include
+#include
-class AOEmoteButton : public QPushButton {
+class AOEmoteButton : public QPushButton
+{
Q_OBJECT
public:
AOEmoteButton(QWidget *p_parent, AOApplication *p_ao_app, int p_x, int p_y);
- // void set_on(QString p_char, int p_emote);
- // void set_off(QString p_char, int p_emote);
+ //void set_on(QString p_char, int p_emote);
+ //void set_off(QString p_char, int p_emote);
void set_image(QString p_char, int p_emote, QString suffix);
- void set_id(int p_id) { m_id = p_id; }
- int get_id() { return m_id; }
+ void set_id(int p_id) {m_id = p_id;}
+ int get_id() {return m_id;}
private:
QWidget *parent;
diff --git a/include/aoevidencebutton.h b/include/aoevidencebutton.h
index b56bfb1..80b747c 100644
--- a/include/aoevidencebutton.h
+++ b/include/aoevidencebutton.h
@@ -4,21 +4,21 @@
#include "aoapplication.h"
#include "aoimage.h"
-#include
#include
#include
+#include
-class AOEvidenceButton : public QPushButton {
+class AOEvidenceButton : public QPushButton
+{
Q_OBJECT
public:
- AOEvidenceButton(QWidget *p_parent, AOApplication *p_ao_app, int p_x,
- int p_y);
+ AOEvidenceButton(QWidget *p_parent, AOApplication *p_ao_app, int p_x, int p_y);
void reset();
void set_image(QString p_image);
void set_theme_image(QString p_image);
- void set_id(int p_id) { m_id = p_id; }
+ void set_id(int p_id) {m_id = p_id;}
void set_selected(bool p_selected);
diff --git a/include/aoevidencedisplay.h b/include/aoevidencedisplay.h
index 1d6280d..13ca00d 100644
--- a/include/aoevidencedisplay.h
+++ b/include/aoevidencedisplay.h
@@ -4,18 +4,19 @@
#include "aoapplication.h"
#include "aosfxplayer.h"
-#include
#include
#include
+#include
-class AOEvidenceDisplay : public QLabel {
+class AOEvidenceDisplay : public QLabel
+{
Q_OBJECT
public:
AOEvidenceDisplay(QWidget *p_parent, AOApplication *p_ao_app);
void show_evidence(QString p_evidence_image, bool is_left_side, int p_volume);
- QLabel *get_evidence_icon();
+ QLabel* get_evidence_icon();
void reset();
private:
diff --git a/include/aoimage.h b/include/aoimage.h
index c4fdf2e..4713be0 100644
--- a/include/aoimage.h
+++ b/include/aoimage.h
@@ -1,14 +1,15 @@
-// This class represents a static theme-dependent image
+//This class represents a static theme-dependent image
#ifndef AOIMAGE_H
#define AOIMAGE_H
#include "aoapplication.h"
-#include
#include
+#include
-class AOImage : public QLabel {
+class AOImage : public QLabel
+{
public:
AOImage(QWidget *parent, AOApplication *p_ao_app);
~AOImage();
diff --git a/include/aolineedit.h b/include/aolineedit.h
index 70f1f97..ce17680 100644
--- a/include/aolineedit.h
+++ b/include/aolineedit.h
@@ -4,7 +4,8 @@
#include
#include
-class AOLineEdit : public QLineEdit {
+class AOLineEdit : public QLineEdit
+{
Q_OBJECT
public:
@@ -18,6 +19,8 @@ signals:
private slots:
void on_enter_pressed();
+
+
};
#endif // AOLINEEDIT_H
diff --git a/include/aomovie.h b/include/aomovie.h
index caa1baa..1f278bf 100644
--- a/include/aomovie.h
+++ b/include/aomovie.h
@@ -7,23 +7,21 @@
class Courtroom;
class AOApplication;
-class AOMovie : public QLabel {
+class AOMovie : public QLabel
+{
Q_OBJECT
public:
AOMovie(QWidget *p_parent, AOApplication *p_ao_app);
void set_play_once(bool p_play_once);
- void start_timer(int delay);
- void play(QString p_gif, QString p_char = "", QString p_custom_theme = "",
- int default_duration = 0);
+ void play(QString p_gif, QString p_char = "", QString p_custom_theme = "");
void combo_resize(int w, int h);
void stop();
private:
QMovie *m_movie;
AOApplication *ao_app;
- QTimer *timer;
bool play_once = true;
signals:
@@ -31,7 +29,6 @@ signals:
private slots:
void frame_change(int n_frame);
- void timer_done();
};
#endif // AOMOVIE_H
diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h
index 5181630..b34267c 100644
--- a/include/aomusicplayer.h
+++ b/include/aomusicplayer.h
@@ -6,40 +6,32 @@
#elif defined(QTAUDIO)
#include
#endif
-
#include "aoapplication.h"
-#include
-#include
-#include
#include
#include
+#include
#if defined(BASSAUDIO)
-class AOMusicPlayer : public QObject {
- Q_OBJECT
+class AOMusicPlayer
+{
public:
AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
- virtual ~AOMusicPlayer();
+ ~AOMusicPlayer();
void play(QString p_song);
void set_volume(int p_value);
- void kill_loop();
- QString get_path();
- bool enable_looping = true;
-
private:
QWidget *m_parent;
AOApplication *ao_app;
int m_volume = 0;
- QString f_path;
-
HSTREAM m_stream;
};
#elif defined(QTAUDIO)
-class AOMusicPlayer : public QObject {
+class AOMusicPlayer
+{
public:
AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
~AOMusicPlayer();
@@ -47,21 +39,16 @@ public:
void play(QString p_song);
void set_volume(int p_value);
- void kill_loop();
- QString get_path();
- bool enable_looping = true;
-
private:
+ QMediaPlayer m_player;
QWidget *m_parent;
AOApplication *ao_app;
- QMediaPlayer m_player;
-
int m_volume = 0;
- QString f_path;
};
#else
-class AOMusicPlayer : public QObject {
+class AOMusicPlayer
+{
public:
AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
~AOMusicPlayer();
@@ -69,16 +56,9 @@ public:
void play(QString p_song);
void set_volume(int p_value);
- void kill_loop();
- QString get_path();
- bool enable_looping = true;
-
private:
QWidget *m_parent;
AOApplication *ao_app;
-
- int m_volume = 0;
- QString f_path;
};
#endif
diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h
index 9a1429a..a65e3f5 100644
--- a/include/aooptionsdialog.h
+++ b/include/aooptionsdialog.h
@@ -1,153 +1,115 @@
-#ifndef AOOPTIONSDIALOG_H
-#define AOOPTIONSDIALOG_H
-
-#include "aoapplication.h"
-
-#ifdef BASSAUDIO
-#include "bass.h"
-#elif defined QTAUDIO
-#include
-#include
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-class AOOptionsDialog : public QDialog {
- Q_OBJECT
-public:
- explicit AOOptionsDialog(QWidget *parent = nullptr,
- AOApplication *p_ao_app = nullptr);
-
-private:
- AOApplication *ao_app;
-
- QVBoxLayout *ui_vertical_layout;
- QTabWidget *ui_settings_tabs;
-
- QWidget *ui_gameplay_tab;
- QWidget *ui_form_layout_widget;
- QFormLayout *ui_gameplay_form;
- QLabel *ui_theme_label;
- QComboBox *ui_theme_combobox;
- QFrame *ui_theme_log_divider;
- QLabel *ui_downwards_lbl;
- QCheckBox *ui_downwards_cb;
- QLabel *ui_length_lbl;
- QSpinBox *ui_length_spinbox;
- QLabel *ui_pun_delay;
- QCheckBox *ui_pun_delay_cb;
- QLabel *ui_slower_blips_lb;
- QCheckBox *ui_slower_blips_cb;
- QLineEdit *ui_username_textbox;
- QLabel *ui_username_lbl;
- QLabel *ui_showname_lbl;
- QCheckBox *ui_showname_cb;
- QFrame *ui_net_divider;
- QLabel *ui_ms_lbl;
- QLineEdit *ui_ms_textbox;
- QLabel *ui_discord_lbl;
- QLabel *ui_epilepsy_lbl;
- QCheckBox *ui_epilepsy_cb;
-
- QCheckBox *ui_discord_cb;
- QLabel *ui_language_label;
- QComboBox *ui_language_combobox;
-
- QLabel *ui_keepevi_lbl;
- QCheckBox *ui_keepevi_cb;
-
- QLabel *ui_keepcobj_lbl;
- QCheckBox *ui_keepcobj_cb;
-
- QWidget *ui_callwords_tab;
- QWidget *ui_callwords_widget;
- QVBoxLayout *ui_callwords_layout;
- QPlainTextEdit *ui_callwords_textbox;
- QLabel *ui_callwords_explain_lbl;
- QCheckBox *ui_callwords_char_textbox;
-
- QWidget *ui_audio_tab;
- QWidget *ui_audio_widget;
- QFormLayout *ui_audio_layout;
- QLabel *ui_audio_device_lbl;
- QComboBox *ui_audio_device_combobox;
- QFrame *ui_audio_volume_divider;
- QSpinBox *ui_music_volume_spinbox;
- QLabel *ui_music_volume_lbl;
- QSpinBox *ui_sfx_volume_spinbox;
- QLabel *ui_loopsfx_lbl;
- QCheckBox *ui_loopsfx_cb;
- QLabel *ui_objectmusic_lbl;
- QCheckBox *ui_objectmusic_cb;
-
- QSpinBox *ui_blips_volume_spinbox;
- QLabel *ui_sfx_volume_lbl;
- QLabel *ui_blips_volume_lbl;
- QFrame *ui_volume_blip_divider;
- QSpinBox *ui_bliprate_spinbox;
- QLabel *ui_bliprate_lbl;
- QCheckBox *ui_blank_blips_cb;
- QLabel *ui_blank_blips_lbl;
- QDialogButtonBox *ui_settings_buttons;
-
- QWidget *ui_casing_tab;
- QWidget *ui_casing_widget;
- QFormLayout *ui_casing_layout;
- QLabel *ui_casing_supported_lbl;
- QLabel *ui_casing_enabled_lbl;
- QCheckBox *ui_casing_enabled_cb;
- QLabel *ui_casing_def_lbl;
- QCheckBox *ui_casing_def_cb;
- QLabel *ui_casing_pro_lbl;
- QCheckBox *ui_casing_pro_cb;
- QLabel *ui_casing_jud_lbl;
- QCheckBox *ui_casing_jud_cb;
- QLabel *ui_casing_jur_lbl;
- QCheckBox *ui_casing_jur_cb;
- QLabel *ui_casing_steno_lbl;
- QCheckBox *ui_casing_steno_cb;
- QLabel *ui_casing_cm_lbl;
- QCheckBox *ui_casing_cm_cb;
- QLabel *ui_casing_wit_lbl;
- QCheckBox *ui_casing_wit_cb;
- QLabel *ui_casing_cm_cases_lbl;
- QLineEdit *ui_casing_cm_cases_textbox;
-
- QWidget *ui_other_tab;
- QWidget *ui_other_widget;
- QFormLayout *ui_other_layout;
- QLabel *ui_other_fancy_icl_enabled_lb;
- QCheckBox *ui_other_fancy_icl_enabled_cb;
- QLabel *ui_other_mirror_icl_enabled_lb;
- QCheckBox *ui_other_mirror_icl_enabled_cb;
-
- QLabel *ui_other_fancy_icl_limit_lb;
- QCheckBox *ui_other_fancy_icl_limit_cb;
-
- bool needs_default_audiodev();
-
-signals:
-
-public slots:
- void save_pressed();
- void discard_pressed();
-};
-
-#endif // AOOPTIONSDIALOG_H
+#ifndef AOOPTIONSDIALOG_H
+#define AOOPTIONSDIALOG_H
+
+#include "aoapplication.h"
+#include "bass.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+class AOOptionsDialog: public QDialog
+{
+ Q_OBJECT
+public:
+ explicit AOOptionsDialog(QWidget *parent = nullptr, AOApplication *p_ao_app = nullptr);
+
+private:
+ AOApplication *ao_app;
+
+ QVBoxLayout *ui_vertical_layout;
+ QTabWidget *ui_settings_tabs;
+
+ QWidget *ui_gameplay_tab;
+ QWidget *ui_form_layout_widget;
+ QFormLayout *ui_gameplay_form;
+ QLabel *ui_theme_label;
+ QComboBox *ui_theme_combobox;
+ QFrame *ui_theme_log_divider;
+ QLabel *ui_downwards_lbl;
+ QCheckBox *ui_downwards_cb;
+ QLabel *ui_length_lbl;
+ QSpinBox *ui_length_spinbox;
+ QFrame *ui_log_names_divider;
+ QLineEdit *ui_username_textbox;
+ QLabel *ui_username_lbl;
+ QLabel *ui_showname_lbl;
+ QCheckBox *ui_showname_cb;
+ QFrame *ui_net_divider;
+ QLabel *ui_ms_lbl;
+ QLineEdit *ui_ms_textbox;
+ QLabel *ui_discord_lbl;
+ QCheckBox *ui_discord_cb;
+
+ QWidget *ui_callwords_tab;
+ QWidget *ui_callwords_widget;
+ QVBoxLayout *ui_callwords_layout;
+ QPlainTextEdit *ui_callwords_textbox;
+ QLabel *ui_callwords_explain_lbl;
+ QCheckBox *ui_callwords_char_textbox;
+
+ QWidget *ui_audio_tab;
+ QWidget *ui_audio_widget;
+ QFormLayout *ui_audio_layout;
+ QLabel *ui_audio_device_lbl;
+ QComboBox *ui_audio_device_combobox;
+ QFrame *ui_audio_volume_divider;
+ QSpinBox *ui_music_volume_spinbox;
+ QLabel *ui_music_volume_lbl;
+ QSpinBox *ui_sfx_volume_spinbox;
+ QSpinBox *ui_blips_volume_spinbox;
+ QLabel *ui_sfx_volume_lbl;
+ QLabel *ui_blips_volume_lbl;
+ QFrame *ui_volume_blip_divider;
+ QSpinBox *ui_bliprate_spinbox;
+ QLabel *ui_bliprate_lbl;
+ QCheckBox *ui_blank_blips_cb;
+ QLabel *ui_blank_blips_lbl;
+ QDialogButtonBox *ui_settings_buttons;
+
+ QWidget *ui_casing_tab;
+ QWidget *ui_casing_widget;
+ QFormLayout *ui_casing_layout;
+ QLabel *ui_casing_supported_lbl;
+ QLabel *ui_casing_enabled_lbl;
+ QCheckBox *ui_casing_enabled_cb;
+ QLabel *ui_casing_def_lbl;
+ QCheckBox *ui_casing_def_cb;
+ QLabel *ui_casing_pro_lbl;
+ QCheckBox *ui_casing_pro_cb;
+ QLabel *ui_casing_jud_lbl;
+ QCheckBox *ui_casing_jud_cb;
+ QLabel *ui_casing_jur_lbl;
+ QCheckBox *ui_casing_jur_cb;
+ QLabel *ui_casing_steno_lbl;
+ QCheckBox *ui_casing_steno_cb;
+ QLabel *ui_casing_cm_lbl;
+ QCheckBox *ui_casing_cm_cb;
+ QLabel *ui_casing_cm_cases_lbl;
+ QLineEdit *ui_casing_cm_cases_textbox;
+
+ bool needs_default_audiodev();
+
+signals:
+
+public slots:
+ void save_pressed();
+ void discard_pressed();
+};
+
+#endif // AOOPTIONSDIALOG_H
diff --git a/include/aopacket.h b/include/aopacket.h
index 4097be8..21f6e0f 100644
--- a/include/aopacket.h
+++ b/include/aopacket.h
@@ -1,18 +1,19 @@
#ifndef AOPACKET_H
#define AOPACKET_H
-#include
#include
#include
+#include
-class AOPacket {
+class AOPacket
+{
public:
AOPacket(QString p_packet_string);
AOPacket(QString header, QStringList &p_contents);
~AOPacket();
- QString get_header() { return m_header; }
- QStringList &get_contents() { return m_contents; }
+ QString get_header() {return m_header;}
+ QStringList &get_contents() {return m_contents;}
QString to_string();
void encrypt_header(unsigned int p_key);
diff --git a/include/aoscene.h b/include/aoscene.h
index 7c1ef6f..b58c0fd 100644
--- a/include/aoscene.h
+++ b/include/aoscene.h
@@ -1,14 +1,15 @@
#ifndef AOSCENE_H
#define AOSCENE_H
-#include
#include
+#include
#include
class Courtroom;
class AOApplication;
-class AOScene : public QLabel {
+class AOScene : public QLabel
+{
Q_OBJECT
public:
explicit AOScene(QWidget *parent, AOApplication *p_ao_app);
@@ -20,7 +21,7 @@ private:
QWidget *m_parent;
QMovie *m_movie;
AOApplication *ao_app;
- QString last_image;
+
};
#endif // AOSCENE_H
diff --git a/include/aosfxplayer.h b/include/aosfxplayer.h
index af3aef6..4b97685 100644
--- a/include/aosfxplayer.h
+++ b/include/aosfxplayer.h
@@ -9,34 +9,28 @@
#include "aoapplication.h"
-#include
-#include
#include
#include
+#include
-class AOSfxPlayer : public QObject {
- Q_OBJECT
+class AOSfxPlayer
+{
public:
AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app);
void play(QString p_sfx, QString p_char = "", QString shout = "");
void stop();
- void set_volume(qreal p_volume);
- void setLooping(bool is_looping);
+ void set_volume(int p_volume);
private:
QWidget *m_parent;
AOApplication *ao_app;
- qreal m_volume = 0;
- bool looping_sfx = false;
-
- void set_volume_internal(qreal p_volume);
-
-#if defined(BASSAUDIO)
+ #if defined(BASSAUDIO)
HSTREAM m_stream;
-#elif defined(QTAUDIO)
+ #elif defined(QTAUDIO)
QSoundEffect m_sfx;
-#endif
+ #endif
+ int m_volume = 0;
};
#endif // AOSFXPLAYER_H
diff --git a/include/aotextarea.h b/include/aotextarea.h
index b816089..d44596b 100644
--- a/include/aotextarea.h
+++ b/include/aotextarea.h
@@ -1,25 +1,24 @@
#ifndef AOTEXTAREA_H
#define AOTEXTAREA_H
-#include
-#include
-#include
#include
+#include
#include
+#include
+#include
-class AOTextArea : public QTextBrowser {
+class AOTextArea : public QTextBrowser
+{
public:
AOTextArea(QWidget *p_parent = nullptr);
- void append_chatmessage(QString p_name, QString p_message, QString p_colour,
- bool song);
+ void append_chatmessage(QString p_name, QString p_message, QString p_colour);
void append_error(QString p_message);
private:
const QRegExp omnis_dank_url_regex = QRegExp("\\b(https?://\\S+\\.\\S+)\\b");
- void auto_scroll(QTextCursor old_cursor, int scrollbar_value,
- bool is_scrolled_down);
+ void auto_scroll(QTextCursor old_cursor, int scrollbar_value, bool is_scrolled_down);
};
#endif // AOTEXTAREA_H
diff --git a/include/aotextedit.h b/include/aotextedit.h
index 8d876f1..85909c6 100644
--- a/include/aotextedit.h
+++ b/include/aotextedit.h
@@ -3,7 +3,8 @@
#include
-class AOTextEdit : public QPlainTextEdit {
+class AOTextEdit : public QPlainTextEdit
+{
Q_OBJECT
public:
AOTextEdit(QWidget *parent);
@@ -16,6 +17,7 @@ signals:
private slots:
void on_enter_pressed();
+
};
#endif // AOTEXTEDIT_H
diff --git a/include/bass.h b/include/bass.h
index a3687b9..1c50903 100644
--- a/include/bass.h
+++ b/include/bass.h
@@ -1,1217 +1,1139 @@
-/*
- BASS 2.4 C/C++ header file
- Copyright (c) 1999-2018 Un4seen Developments Ltd.
-
- See the BASS.CHM file for more detailed documentation
-*/
-
-#ifndef BASS_H
-#define BASS_H
-
-#ifdef _WIN32
-#include
-typedef unsigned __int64 QWORD;
-#else
-#include
-#define WINAPI
-#define CALLBACK
-typedef uint8_t BYTE;
-typedef uint16_t WORD;
-typedef uint32_t DWORD;
-typedef uint64_t QWORD;
-#ifndef __OBJC__
-typedef int BOOL;
-#endif
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-#define LOBYTE(a) (BYTE)(a)
-#define HIBYTE(a) (BYTE)((a) >> 8)
-#define LOWORD(a) (WORD)(a)
-#define HIWORD(a) (WORD)((a) >> 16)
-#define MAKEWORD(a, b) (WORD)(((a)&0xff) | ((b) << 8))
-#define MAKELONG(a, b) (DWORD)(((a)&0xffff) | ((b) << 16))
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BASSVERSION 0x204 // API version
-#define BASSVERSIONTEXT "2.4"
-
-#ifndef BASSDEF
-#define BASSDEF(f) WINAPI f
-#else
-#define NOBASSOVERLOADS
-#endif
-
-typedef DWORD HMUSIC; // MOD music handle
-typedef DWORD HSAMPLE; // sample handle
-typedef DWORD HCHANNEL; // playing sample's channel handle
-typedef DWORD HSTREAM; // sample stream handle
-typedef DWORD HRECORD; // recording handle
-typedef DWORD HSYNC; // synchronizer handle
-typedef DWORD HDSP; // DSP handle
-typedef DWORD HFX; // DX8 effect handle
-typedef DWORD HPLUGIN; // Plugin handle
-
-// Error codes returned by BASS_ErrorGetCode
-#define BASS_OK 0 // all is OK
-#define BASS_ERROR_MEM 1 // memory error
-#define BASS_ERROR_FILEOPEN 2 // can't open the file
-#define BASS_ERROR_DRIVER 3 // can't find a free/valid driver
-#define BASS_ERROR_BUFLOST 4 // the sample buffer was lost
-#define BASS_ERROR_HANDLE 5 // invalid handle
-#define BASS_ERROR_FORMAT 6 // unsupported sample format
-#define BASS_ERROR_POSITION 7 // invalid position
-#define BASS_ERROR_INIT 8 // BASS_Init has not been successfully called
-#define BASS_ERROR_START 9 // BASS_Start has not been successfully called
-#define BASS_ERROR_SSL 10 // SSL/HTTPS support isn't available
-#define BASS_ERROR_ALREADY 14 // already initialized/paused/whatever
-#define BASS_ERROR_NOCHAN 18 // can't get a free channel
-#define BASS_ERROR_ILLTYPE 19 // an illegal type was specified
-#define BASS_ERROR_ILLPARAM 20 // an illegal parameter was specified
-#define BASS_ERROR_NO3D 21 // no 3D support
-#define BASS_ERROR_NOEAX 22 // no EAX support
-#define BASS_ERROR_DEVICE 23 // illegal device number
-#define BASS_ERROR_NOPLAY 24 // not playing
-#define BASS_ERROR_FREQ 25 // illegal sample rate
-#define BASS_ERROR_NOTFILE 27 // the stream is not a file stream
-#define BASS_ERROR_NOHW 29 // no hardware voices available
-#define BASS_ERROR_EMPTY 31 // the MOD music has no sequence data
-#define BASS_ERROR_NONET 32 // no internet connection could be opened
-#define BASS_ERROR_CREATE 33 // couldn't create the file
-#define BASS_ERROR_NOFX 34 // effects are not available
-#define BASS_ERROR_NOTAVAIL 37 // requested data/action is not available
-#define BASS_ERROR_DECODE 38 // the channel is/isn't a "decoding channel"
-#define BASS_ERROR_DX 39 // a sufficient DirectX version is not installed
-#define BASS_ERROR_TIMEOUT 40 // connection timedout
-#define BASS_ERROR_FILEFORM 41 // unsupported file format
-#define BASS_ERROR_SPEAKER 42 // unavailable speaker
-#define BASS_ERROR_VERSION 43 // invalid BASS version (used by add-ons)
-#define BASS_ERROR_CODEC 44 // codec is not available/supported
-#define BASS_ERROR_ENDED 45 // the channel/file has ended
-#define BASS_ERROR_BUSY 46 // the device is busy
-#define BASS_ERROR_UNKNOWN -1 // some other mystery problem
-
-// BASS_SetConfig options
-#define BASS_CONFIG_BUFFER 0
-#define BASS_CONFIG_UPDATEPERIOD 1
-#define BASS_CONFIG_GVOL_SAMPLE 4
-#define BASS_CONFIG_GVOL_STREAM 5
-#define BASS_CONFIG_GVOL_MUSIC 6
-#define BASS_CONFIG_CURVE_VOL 7
-#define BASS_CONFIG_CURVE_PAN 8
-#define BASS_CONFIG_FLOATDSP 9
-#define BASS_CONFIG_3DALGORITHM 10
-#define BASS_CONFIG_NET_TIMEOUT 11
-#define BASS_CONFIG_NET_BUFFER 12
-#define BASS_CONFIG_PAUSE_NOPLAY 13
-#define BASS_CONFIG_NET_PREBUF 15
-#define BASS_CONFIG_NET_PASSIVE 18
-#define BASS_CONFIG_REC_BUFFER 19
-#define BASS_CONFIG_NET_PLAYLIST 21
-#define BASS_CONFIG_MUSIC_VIRTUAL 22
-#define BASS_CONFIG_VERIFY 23
-#define BASS_CONFIG_UPDATETHREADS 24
-#define BASS_CONFIG_DEV_BUFFER 27
-#define BASS_CONFIG_VISTA_TRUEPOS 30
-#define BASS_CONFIG_IOS_MIXAUDIO 34
-#define BASS_CONFIG_DEV_DEFAULT 36
-#define BASS_CONFIG_NET_READTIMEOUT 37
-#define BASS_CONFIG_VISTA_SPEAKERS 38
-#define BASS_CONFIG_IOS_SPEAKER 39
-#define BASS_CONFIG_MF_DISABLE 40
-#define BASS_CONFIG_HANDLES 41
-#define BASS_CONFIG_UNICODE 42
-#define BASS_CONFIG_SRC 43
-#define BASS_CONFIG_SRC_SAMPLE 44
+/*
+ BASS 2.4 C/C++ header file
+ Copyright (c) 1999-2018 Un4seen Developments Ltd.
+
+ See the BASS.CHM file for more detailed documentation
+*/
+
+#ifndef BASS_H
+#define BASS_H
+
+#ifdef _WIN32
+#include
+typedef unsigned __int64 QWORD;
+#else
+#include
+#define WINAPI
+#define CALLBACK
+typedef uint8_t BYTE;
+typedef uint16_t WORD;
+typedef uint32_t DWORD;
+typedef uint64_t QWORD;
+#ifndef __OBJC__
+typedef int BOOL;
+#endif
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+#define LOBYTE(a) (BYTE)(a)
+#define HIBYTE(a) (BYTE)((a)>>8)
+#define LOWORD(a) (WORD)(a)
+#define HIWORD(a) (WORD)((a)>>16)
+#define MAKEWORD(a,b) (WORD)(((a)&0xff)|((b)<<8))
+#define MAKELONG(a,b) (DWORD)(((a)&0xffff)|((b)<<16))
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define BASSVERSION 0x204 // API version
+#define BASSVERSIONTEXT "2.4"
+
+#ifndef BASSDEF
+#define BASSDEF(f) WINAPI f
+#else
+#define NOBASSOVERLOADS
+#endif
+
+typedef DWORD HMUSIC; // MOD music handle
+typedef DWORD HSAMPLE; // sample handle
+typedef DWORD HCHANNEL; // playing sample's channel handle
+typedef DWORD HSTREAM; // sample stream handle
+typedef DWORD HRECORD; // recording handle
+typedef DWORD HSYNC; // synchronizer handle
+typedef DWORD HDSP; // DSP handle
+typedef DWORD HFX; // DX8 effect handle
+typedef DWORD HPLUGIN; // Plugin handle
+
+// Error codes returned by BASS_ErrorGetCode
+#define BASS_OK 0 // all is OK
+#define BASS_ERROR_MEM 1 // memory error
+#define BASS_ERROR_FILEOPEN 2 // can't open the file
+#define BASS_ERROR_DRIVER 3 // can't find a free/valid driver
+#define BASS_ERROR_BUFLOST 4 // the sample buffer was lost
+#define BASS_ERROR_HANDLE 5 // invalid handle
+#define BASS_ERROR_FORMAT 6 // unsupported sample format
+#define BASS_ERROR_POSITION 7 // invalid position
+#define BASS_ERROR_INIT 8 // BASS_Init has not been successfully called
+#define BASS_ERROR_START 9 // BASS_Start has not been successfully called
+#define BASS_ERROR_SSL 10 // SSL/HTTPS support isn't available
+#define BASS_ERROR_ALREADY 14 // already initialized/paused/whatever
+#define BASS_ERROR_NOCHAN 18 // can't get a free channel
+#define BASS_ERROR_ILLTYPE 19 // an illegal type was specified
+#define BASS_ERROR_ILLPARAM 20 // an illegal parameter was specified
+#define BASS_ERROR_NO3D 21 // no 3D support
+#define BASS_ERROR_NOEAX 22 // no EAX support
+#define BASS_ERROR_DEVICE 23 // illegal device number
+#define BASS_ERROR_NOPLAY 24 // not playing
+#define BASS_ERROR_FREQ 25 // illegal sample rate
+#define BASS_ERROR_NOTFILE 27 // the stream is not a file stream
+#define BASS_ERROR_NOHW 29 // no hardware voices available
+#define BASS_ERROR_EMPTY 31 // the MOD music has no sequence data
+#define BASS_ERROR_NONET 32 // no internet connection could be opened
+#define BASS_ERROR_CREATE 33 // couldn't create the file
+#define BASS_ERROR_NOFX 34 // effects are not available
+#define BASS_ERROR_NOTAVAIL 37 // requested data/action is not available
+#define BASS_ERROR_DECODE 38 // the channel is/isn't a "decoding channel"
+#define BASS_ERROR_DX 39 // a sufficient DirectX version is not installed
+#define BASS_ERROR_TIMEOUT 40 // connection timedout
+#define BASS_ERROR_FILEFORM 41 // unsupported file format
+#define BASS_ERROR_SPEAKER 42 // unavailable speaker
+#define BASS_ERROR_VERSION 43 // invalid BASS version (used by add-ons)
+#define BASS_ERROR_CODEC 44 // codec is not available/supported
+#define BASS_ERROR_ENDED 45 // the channel/file has ended
+#define BASS_ERROR_BUSY 46 // the device is busy
+#define BASS_ERROR_UNKNOWN -1 // some other mystery problem
+
+// BASS_SetConfig options
+#define BASS_CONFIG_BUFFER 0
+#define BASS_CONFIG_UPDATEPERIOD 1
+#define BASS_CONFIG_GVOL_SAMPLE 4
+#define BASS_CONFIG_GVOL_STREAM 5
+#define BASS_CONFIG_GVOL_MUSIC 6
+#define BASS_CONFIG_CURVE_VOL 7
+#define BASS_CONFIG_CURVE_PAN 8
+#define BASS_CONFIG_FLOATDSP 9
+#define BASS_CONFIG_3DALGORITHM 10
+#define BASS_CONFIG_NET_TIMEOUT 11
+#define BASS_CONFIG_NET_BUFFER 12
+#define BASS_CONFIG_PAUSE_NOPLAY 13
+#define BASS_CONFIG_NET_PREBUF 15
+#define BASS_CONFIG_NET_PASSIVE 18
+#define BASS_CONFIG_REC_BUFFER 19
+#define BASS_CONFIG_NET_PLAYLIST 21
+#define BASS_CONFIG_MUSIC_VIRTUAL 22
+#define BASS_CONFIG_VERIFY 23
+#define BASS_CONFIG_UPDATETHREADS 24
+#define BASS_CONFIG_DEV_BUFFER 27
+#define BASS_CONFIG_VISTA_TRUEPOS 30
+#define BASS_CONFIG_IOS_MIXAUDIO 34
+#define BASS_CONFIG_DEV_DEFAULT 36
+#define BASS_CONFIG_NET_READTIMEOUT 37
+#define BASS_CONFIG_VISTA_SPEAKERS 38
+#define BASS_CONFIG_IOS_SPEAKER 39
+#define BASS_CONFIG_MF_DISABLE 40
+#define BASS_CONFIG_HANDLES 41
+#define BASS_CONFIG_UNICODE 42
+#define BASS_CONFIG_SRC 43
+#define BASS_CONFIG_SRC_SAMPLE 44
#define BASS_CONFIG_ASYNCFILE_BUFFER 45
-#define BASS_CONFIG_OGG_PRESCAN 47
-#define BASS_CONFIG_MF_VIDEO 48
-#define BASS_CONFIG_AIRPLAY 49
-#define BASS_CONFIG_DEV_NONSTOP 50
-#define BASS_CONFIG_IOS_NOCATEGORY 51
-#define BASS_CONFIG_VERIFY_NET 52
-#define BASS_CONFIG_DEV_PERIOD 53
-#define BASS_CONFIG_FLOAT 54
-#define BASS_CONFIG_NET_SEEK 56
-#define BASS_CONFIG_AM_DISABLE 58
-#define BASS_CONFIG_NET_PLAYLIST_DEPTH 59
-#define BASS_CONFIG_NET_PREBUF_WAIT 60
-
-// BASS_SetConfigPtr options
-#define BASS_CONFIG_NET_AGENT 16
-#define BASS_CONFIG_NET_PROXY 17
-#define BASS_CONFIG_IOS_NOTIFY 46
-
-// BASS_Init flags
-#define BASS_DEVICE_8BITS 1 // 8 bit
-#define BASS_DEVICE_MONO 2 // mono
-#define BASS_DEVICE_3D 4 // enable 3D functionality
-#define BASS_DEVICE_16BITS 8 // limit output to 16 bit
-#define BASS_DEVICE_LATENCY 0x100 // calculate device latency (BASS_INFO struct)
-#define BASS_DEVICE_CPSPEAKERS \
- 0x400 // detect speakers via Windows control panel
-#define BASS_DEVICE_SPEAKERS 0x800 // force enabling of speaker assignment
-#define BASS_DEVICE_NOSPEAKER 0x1000 // ignore speaker arrangement
-#define BASS_DEVICE_DMIX 0x2000 // use ALSA "dmix" plugin
-#define BASS_DEVICE_FREQ 0x4000 // set device sample rate
-#define BASS_DEVICE_STEREO 0x8000 // limit output to stereo
-#define BASS_DEVICE_HOG 0x10000 // hog/exclusive mode
-#define BASS_DEVICE_AUDIOTRACK 0x20000 // use AudioTrack output
-#define BASS_DEVICE_DSOUND 0x40000 // use DirectSound output
-
-// DirectSound interfaces (for use with BASS_GetDSoundObject)
-#define BASS_OBJECT_DS 1 // IDirectSound
-#define BASS_OBJECT_DS3DL 2 // IDirectSound3DListener
-
-// Device info structure
-typedef struct {
-#if defined(_WIN32_WCE) || \
- (WINAPI_FAMILY && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
- const wchar_t *name; // description
- const wchar_t *driver; // driver
-#else
- const char *name; // description
- const char *driver; // driver
-#endif
- DWORD flags;
-} BASS_DEVICEINFO;
-
-// BASS_DEVICEINFO flags
-#define BASS_DEVICE_ENABLED 1
-#define BASS_DEVICE_DEFAULT 2
-#define BASS_DEVICE_INIT 4
-#define BASS_DEVICE_LOOPBACK 8
-
-#define BASS_DEVICE_TYPE_MASK 0xff000000
-#define BASS_DEVICE_TYPE_NETWORK 0x01000000
-#define BASS_DEVICE_TYPE_SPEAKERS 0x02000000
-#define BASS_DEVICE_TYPE_LINE 0x03000000
-#define BASS_DEVICE_TYPE_HEADPHONES 0x04000000
-#define BASS_DEVICE_TYPE_MICROPHONE 0x05000000
-#define BASS_DEVICE_TYPE_HEADSET 0x06000000
-#define BASS_DEVICE_TYPE_HANDSET 0x07000000
-#define BASS_DEVICE_TYPE_DIGITAL 0x08000000
-#define BASS_DEVICE_TYPE_SPDIF 0x09000000
-#define BASS_DEVICE_TYPE_HDMI 0x0a000000
-#define BASS_DEVICE_TYPE_DISPLAYPORT 0x40000000
-
+#define BASS_CONFIG_OGG_PRESCAN 47
+#define BASS_CONFIG_MF_VIDEO 48
+#define BASS_CONFIG_AIRPLAY 49
+#define BASS_CONFIG_DEV_NONSTOP 50
+#define BASS_CONFIG_IOS_NOCATEGORY 51
+#define BASS_CONFIG_VERIFY_NET 52
+#define BASS_CONFIG_DEV_PERIOD 53
+#define BASS_CONFIG_FLOAT 54
+#define BASS_CONFIG_NET_SEEK 56
+#define BASS_CONFIG_AM_DISABLE 58
+#define BASS_CONFIG_NET_PLAYLIST_DEPTH 59
+#define BASS_CONFIG_NET_PREBUF_WAIT 60
+
+// BASS_SetConfigPtr options
+#define BASS_CONFIG_NET_AGENT 16
+#define BASS_CONFIG_NET_PROXY 17
+#define BASS_CONFIG_IOS_NOTIFY 46
+
+// BASS_Init flags
+#define BASS_DEVICE_8BITS 1 // 8 bit
+#define BASS_DEVICE_MONO 2 // mono
+#define BASS_DEVICE_3D 4 // enable 3D functionality
+#define BASS_DEVICE_16BITS 8 // limit output to 16 bit
+#define BASS_DEVICE_LATENCY 0x100 // calculate device latency (BASS_INFO struct)
+#define BASS_DEVICE_CPSPEAKERS 0x400 // detect speakers via Windows control panel
+#define BASS_DEVICE_SPEAKERS 0x800 // force enabling of speaker assignment
+#define BASS_DEVICE_NOSPEAKER 0x1000 // ignore speaker arrangement
+#define BASS_DEVICE_DMIX 0x2000 // use ALSA "dmix" plugin
+#define BASS_DEVICE_FREQ 0x4000 // set device sample rate
+#define BASS_DEVICE_STEREO 0x8000 // limit output to stereo
+#define BASS_DEVICE_HOG 0x10000 // hog/exclusive mode
+#define BASS_DEVICE_AUDIOTRACK 0x20000 // use AudioTrack output
+#define BASS_DEVICE_DSOUND 0x40000 // use DirectSound output
+
+// DirectSound interfaces (for use with BASS_GetDSoundObject)
+#define BASS_OBJECT_DS 1 // IDirectSound
+#define BASS_OBJECT_DS3DL 2 // IDirectSound3DListener
+
+// Device info structure
+typedef struct {
+#if defined(_WIN32_WCE) || (WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
+ const wchar_t *name; // description
+ const wchar_t *driver; // driver
+#else
+ const char *name; // description
+ const char *driver; // driver
+#endif
+ DWORD flags;
+} BASS_DEVICEINFO;
+
+// BASS_DEVICEINFO flags
+#define BASS_DEVICE_ENABLED 1
+#define BASS_DEVICE_DEFAULT 2
+#define BASS_DEVICE_INIT 4
+#define BASS_DEVICE_LOOPBACK 8
+
+#define BASS_DEVICE_TYPE_MASK 0xff000000
+#define BASS_DEVICE_TYPE_NETWORK 0x01000000
+#define BASS_DEVICE_TYPE_SPEAKERS 0x02000000
+#define BASS_DEVICE_TYPE_LINE 0x03000000
+#define BASS_DEVICE_TYPE_HEADPHONES 0x04000000
+#define BASS_DEVICE_TYPE_MICROPHONE 0x05000000
+#define BASS_DEVICE_TYPE_HEADSET 0x06000000
+#define BASS_DEVICE_TYPE_HANDSET 0x07000000
+#define BASS_DEVICE_TYPE_DIGITAL 0x08000000
+#define BASS_DEVICE_TYPE_SPDIF 0x09000000
+#define BASS_DEVICE_TYPE_HDMI 0x0a000000
+#define BASS_DEVICE_TYPE_DISPLAYPORT 0x40000000
+
// BASS_GetDeviceInfo flags
-#define BASS_DEVICES_AIRPLAY 0x1000000
+#define BASS_DEVICES_AIRPLAY 0x1000000
+typedef struct {
+ DWORD flags; // device capabilities (DSCAPS_xxx flags)
+ DWORD hwsize; // size of total device hardware memory
+ DWORD hwfree; // size of free device hardware memory
+ DWORD freesam; // number of free sample slots in the hardware
+ DWORD free3d; // number of free 3D sample slots in the hardware
+ DWORD minrate; // min sample rate supported by the hardware
+ DWORD maxrate; // max sample rate supported by the hardware
+ BOOL eax; // device supports EAX? (always FALSE if BASS_DEVICE_3D was not used)
+ DWORD minbuf; // recommended minimum buffer length in ms (requires BASS_DEVICE_LATENCY)
+ DWORD dsver; // DirectSound version
+ DWORD latency; // delay (in ms) before start of playback (requires BASS_DEVICE_LATENCY)
+ DWORD initflags; // BASS_Init "flags" parameter
+ DWORD speakers; // number of speakers available
+ DWORD freq; // current output rate
+} BASS_INFO;
+
+// BASS_INFO flags (from DSOUND.H)
+#define DSCAPS_CONTINUOUSRATE 0x00000010 // supports all sample rates between min/maxrate
+#define DSCAPS_EMULDRIVER 0x00000020 // device does NOT have hardware DirectSound support
+#define DSCAPS_CERTIFIED 0x00000040 // device driver has been certified by Microsoft
+#define DSCAPS_SECONDARYMONO 0x00000100 // mono
+#define DSCAPS_SECONDARYSTEREO 0x00000200 // stereo
+#define DSCAPS_SECONDARY8BIT 0x00000400 // 8 bit
+#define DSCAPS_SECONDARY16BIT 0x00000800 // 16 bit
+
+// Recording device info structure
+typedef struct {
+ DWORD flags; // device capabilities (DSCCAPS_xxx flags)
+ DWORD formats; // supported standard formats (WAVE_FORMAT_xxx flags)
+ DWORD inputs; // number of inputs
+ BOOL singlein; // TRUE = only 1 input can be set at a time
+ DWORD freq; // current input rate
+} BASS_RECORDINFO;
+
+// BASS_RECORDINFO flags (from DSOUND.H)
+#define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER // device does NOT have hardware DirectSound recording support
+#define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED // device driver has been certified by Microsoft
+
+// defines for formats field of BASS_RECORDINFO (from MMSYSTEM.H)
+#ifndef WAVE_FORMAT_1M08
+#define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
+#define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
+#define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
+#define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
+#define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
+#define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
+#define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
+#define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
+#define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
+#define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
+#define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
+#define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
+#endif
+
+// Sample info structure
+typedef struct {
+ DWORD freq; // default playback rate
+ float volume; // default volume (0-1)
+ float pan; // default pan (-1=left, 0=middle, 1=right)
+ DWORD flags; // BASS_SAMPLE_xxx flags
+ DWORD length; // length (in bytes)
+ DWORD max; // maximum simultaneous playbacks
+ DWORD origres; // original resolution
+ DWORD chans; // number of channels
+ DWORD mingap; // minimum gap (ms) between creating channels
+ DWORD mode3d; // BASS_3DMODE_xxx mode
+ float mindist; // minimum distance
+ float maxdist; // maximum distance
+ DWORD iangle; // angle of inside projection cone
+ DWORD oangle; // angle of outside projection cone
+ float outvol; // delta-volume outside the projection cone
+ DWORD vam; // voice allocation/management flags (BASS_VAM_xxx)
+ DWORD priority; // priority (0=lowest, 0xffffffff=highest)
+} BASS_SAMPLE;
+
+#define BASS_SAMPLE_8BITS 1 // 8 bit
+#define BASS_SAMPLE_FLOAT 256 // 32 bit floating-point
+#define BASS_SAMPLE_MONO 2 // mono
+#define BASS_SAMPLE_LOOP 4 // looped
+#define BASS_SAMPLE_3D 8 // 3D functionality
+#define BASS_SAMPLE_SOFTWARE 16 // not using hardware mixing
+#define BASS_SAMPLE_MUTEMAX 32 // mute at max distance (3D only)
+#define BASS_SAMPLE_VAM 64 // DX7 voice allocation & management
+#define BASS_SAMPLE_FX 128 // old implementation of DX8 effects
+#define BASS_SAMPLE_OVER_VOL 0x10000 // override lowest volume
+#define BASS_SAMPLE_OVER_POS 0x20000 // override longest playing
+#define BASS_SAMPLE_OVER_DIST 0x30000 // override furthest from listener (3D only)
+
+#define BASS_STREAM_PRESCAN 0x20000 // enable pin-point seeking/length (MP3/MP2/MP1)
+#define BASS_STREAM_AUTOFREE 0x40000 // automatically free the stream when it stop/ends
+#define BASS_STREAM_RESTRATE 0x80000 // restrict the download rate of internet file streams
+#define BASS_STREAM_BLOCK 0x100000 // download/play internet file stream in small blocks
+#define BASS_STREAM_DECODE 0x200000 // don't play the stream, only decode (BASS_ChannelGetData)
+#define BASS_STREAM_STATUS 0x800000 // give server status info (HTTP/ICY tags) in DOWNLOADPROC
+
+#define BASS_MP3_IGNOREDELAY 0x200 // ignore LAME/Xing/VBRI/iTunes delay & padding info
+#define BASS_MP3_SETPOS BASS_STREAM_PRESCAN
+
+#define BASS_MUSIC_FLOAT BASS_SAMPLE_FLOAT
+#define BASS_MUSIC_MONO BASS_SAMPLE_MONO
+#define BASS_MUSIC_LOOP BASS_SAMPLE_LOOP
+#define BASS_MUSIC_3D BASS_SAMPLE_3D
+#define BASS_MUSIC_FX BASS_SAMPLE_FX
+#define BASS_MUSIC_AUTOFREE BASS_STREAM_AUTOFREE
+#define BASS_MUSIC_DECODE BASS_STREAM_DECODE
+#define BASS_MUSIC_PRESCAN BASS_STREAM_PRESCAN // calculate playback length
+#define BASS_MUSIC_CALCLEN BASS_MUSIC_PRESCAN
+#define BASS_MUSIC_RAMP 0x200 // normal ramping
+#define BASS_MUSIC_RAMPS 0x400 // sensitive ramping
+#define BASS_MUSIC_SURROUND 0x800 // surround sound
+#define BASS_MUSIC_SURROUND2 0x1000 // surround sound (mode 2)
+#define BASS_MUSIC_FT2PAN 0x2000 // apply FastTracker 2 panning to XM files
+#define BASS_MUSIC_FT2MOD 0x2000 // play .MOD as FastTracker 2 does
+#define BASS_MUSIC_PT1MOD 0x4000 // play .MOD as ProTracker 1 does
+#define BASS_MUSIC_NONINTER 0x10000 // non-interpolated sample mixing
+#define BASS_MUSIC_SINCINTER 0x800000 // sinc interpolated sample mixing
+#define BASS_MUSIC_POSRESET 0x8000 // stop all notes when moving position
+#define BASS_MUSIC_POSRESETEX 0x400000 // stop all notes and reset bmp/etc when moving position
+#define BASS_MUSIC_STOPBACK 0x80000 // stop the music on a backwards jump effect
+#define BASS_MUSIC_NOSAMPLE 0x100000 // don't load the samples
+
+// Speaker assignment flags
+#define BASS_SPEAKER_FRONT 0x1000000 // front speakers
+#define BASS_SPEAKER_REAR 0x2000000 // rear/side speakers
+#define BASS_SPEAKER_CENLFE 0x3000000 // center & LFE speakers (5.1)
+#define BASS_SPEAKER_REAR2 0x4000000 // rear center speakers (7.1)
+#define BASS_SPEAKER_N(n) ((n)<<24) // n'th pair of speakers (max 15)
+#define BASS_SPEAKER_LEFT 0x10000000 // modifier: left
+#define BASS_SPEAKER_RIGHT 0x20000000 // modifier: right
+#define BASS_SPEAKER_FRONTLEFT BASS_SPEAKER_FRONT|BASS_SPEAKER_LEFT
+#define BASS_SPEAKER_FRONTRIGHT BASS_SPEAKER_FRONT|BASS_SPEAKER_RIGHT
+#define BASS_SPEAKER_REARLEFT BASS_SPEAKER_REAR|BASS_SPEAKER_LEFT
+#define BASS_SPEAKER_REARRIGHT BASS_SPEAKER_REAR|BASS_SPEAKER_RIGHT
+#define BASS_SPEAKER_CENTER BASS_SPEAKER_CENLFE|BASS_SPEAKER_LEFT
+#define BASS_SPEAKER_LFE BASS_SPEAKER_CENLFE|BASS_SPEAKER_RIGHT
+#define BASS_SPEAKER_REAR2LEFT BASS_SPEAKER_REAR2|BASS_SPEAKER_LEFT
+#define BASS_SPEAKER_REAR2RIGHT BASS_SPEAKER_REAR2|BASS_SPEAKER_RIGHT
+
+#define BASS_ASYNCFILE 0x40000000
+#define BASS_UNICODE 0x80000000
+
+#define BASS_RECORD_PAUSE 0x8000 // start recording paused
+#define BASS_RECORD_ECHOCANCEL 0x2000
+#define BASS_RECORD_AGC 0x4000
+
+// DX7 voice allocation & management flags
+#define BASS_VAM_HARDWARE 1
+#define BASS_VAM_SOFTWARE 2
+#define BASS_VAM_TERM_TIME 4
+#define BASS_VAM_TERM_DIST 8
+#define BASS_VAM_TERM_PRIO 16
+
+// Channel info structure
+typedef struct {
+ DWORD freq; // default playback rate
+ DWORD chans; // channels
+ DWORD flags; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags
+ DWORD ctype; // type of channel
+ DWORD origres; // original resolution
+ HPLUGIN plugin; // plugin
+ HSAMPLE sample; // sample
+ const char *filename; // filename
+} BASS_CHANNELINFO;
+
+#define BASS_ORIGRES_FLOAT 0x10000
+
+// BASS_CHANNELINFO types
+#define BASS_CTYPE_SAMPLE 1
+#define BASS_CTYPE_RECORD 2
+#define BASS_CTYPE_STREAM 0x10000
+#define BASS_CTYPE_STREAM_OGG 0x10002
+#define BASS_CTYPE_STREAM_MP1 0x10003
+#define BASS_CTYPE_STREAM_MP2 0x10004
+#define BASS_CTYPE_STREAM_MP3 0x10005
+#define BASS_CTYPE_STREAM_AIFF 0x10006
+#define BASS_CTYPE_STREAM_CA 0x10007
+#define BASS_CTYPE_STREAM_MF 0x10008
+#define BASS_CTYPE_STREAM_AM 0x10009
+#define BASS_CTYPE_STREAM_DUMMY 0x18000
+#define BASS_CTYPE_STREAM_DEVICE 0x18001
+#define BASS_CTYPE_STREAM_WAV 0x40000 // WAVE flag, LOWORD=codec
+#define BASS_CTYPE_STREAM_WAV_PCM 0x50001
+#define BASS_CTYPE_STREAM_WAV_FLOAT 0x50003
+#define BASS_CTYPE_MUSIC_MOD 0x20000
+#define BASS_CTYPE_MUSIC_MTM 0x20001
+#define BASS_CTYPE_MUSIC_S3M 0x20002
+#define BASS_CTYPE_MUSIC_XM 0x20003
+#define BASS_CTYPE_MUSIC_IT 0x20004
+#define BASS_CTYPE_MUSIC_MO3 0x00100 // MO3 flag
+
+typedef struct {
+ DWORD ctype; // channel type
+#if defined(_WIN32_WCE) || (WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
+ const wchar_t *name; // format description
+ const wchar_t *exts; // file extension filter (*.ext1;*.ext2;etc...)
+#else
+ const char *name; // format description
+ const char *exts; // file extension filter (*.ext1;*.ext2;etc...)
+#endif
+} BASS_PLUGINFORM;
+
+typedef struct {
+ DWORD version; // version (same form as BASS_GetVersion)
+ DWORD formatc; // number of formats
+ const BASS_PLUGINFORM *formats; // the array of formats
+} BASS_PLUGININFO;
+
+// 3D vector (for 3D positions/velocities/orientations)
+typedef struct BASS_3DVECTOR {
+#ifdef __cplusplus
+ BASS_3DVECTOR() {};
+ BASS_3DVECTOR(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {};
+#endif
+ float x; // +=right, -=left
+ float y; // +=up, -=down
+ float z; // +=front, -=behind
+} BASS_3DVECTOR;
+
+// 3D channel modes
+#define BASS_3DMODE_NORMAL 0 // normal 3D processing
+#define BASS_3DMODE_RELATIVE 1 // position is relative to the listener
+#define BASS_3DMODE_OFF 2 // no 3D processing
+
+// software 3D mixing algorithms (used with BASS_CONFIG_3DALGORITHM)
+#define BASS_3DALG_DEFAULT 0
+#define BASS_3DALG_OFF 1
+#define BASS_3DALG_FULL 2
+#define BASS_3DALG_LIGHT 3
+
+// EAX environments, use with BASS_SetEAXParameters
+enum
+{
+ EAX_ENVIRONMENT_GENERIC,
+ EAX_ENVIRONMENT_PADDEDCELL,
+ EAX_ENVIRONMENT_ROOM,
+ EAX_ENVIRONMENT_BATHROOM,
+ EAX_ENVIRONMENT_LIVINGROOM,
+ EAX_ENVIRONMENT_STONEROOM,
+ EAX_ENVIRONMENT_AUDITORIUM,
+ EAX_ENVIRONMENT_CONCERTHALL,
+ EAX_ENVIRONMENT_CAVE,
+ EAX_ENVIRONMENT_ARENA,
+ EAX_ENVIRONMENT_HANGAR,
+ EAX_ENVIRONMENT_CARPETEDHALLWAY,
+ EAX_ENVIRONMENT_HALLWAY,
+ EAX_ENVIRONMENT_STONECORRIDOR,
+ EAX_ENVIRONMENT_ALLEY,
+ EAX_ENVIRONMENT_FOREST,
+ EAX_ENVIRONMENT_CITY,
+ EAX_ENVIRONMENT_MOUNTAINS,
+ EAX_ENVIRONMENT_QUARRY,
+ EAX_ENVIRONMENT_PLAIN,
+ EAX_ENVIRONMENT_PARKINGLOT,
+ EAX_ENVIRONMENT_SEWERPIPE,
+ EAX_ENVIRONMENT_UNDERWATER,
+ EAX_ENVIRONMENT_DRUGGED,
+ EAX_ENVIRONMENT_DIZZY,
+ EAX_ENVIRONMENT_PSYCHOTIC,
+
+ EAX_ENVIRONMENT_COUNT // total number of environments
+};
+
+// EAX presets, usage: BASS_SetEAXParameters(EAX_PRESET_xxx)
+#define EAX_PRESET_GENERIC EAX_ENVIRONMENT_GENERIC,0.5F,1.493F,0.5F
+#define EAX_PRESET_PADDEDCELL EAX_ENVIRONMENT_PADDEDCELL,0.25F,0.1F,0.0F
+#define EAX_PRESET_ROOM EAX_ENVIRONMENT_ROOM,0.417F,0.4F,0.666F
+#define EAX_PRESET_BATHROOM EAX_ENVIRONMENT_BATHROOM,0.653F,1.499F,0.166F
+#define EAX_PRESET_LIVINGROOM EAX_ENVIRONMENT_LIVINGROOM,0.208F,0.478F,0.0F
+#define EAX_PRESET_STONEROOM EAX_ENVIRONMENT_STONEROOM,0.5F,2.309F,0.888F
+#define EAX_PRESET_AUDITORIUM EAX_ENVIRONMENT_AUDITORIUM,0.403F,4.279F,0.5F
+#define EAX_PRESET_CONCERTHALL EAX_ENVIRONMENT_CONCERTHALL,0.5F,3.961F,0.5F
+#define EAX_PRESET_CAVE EAX_ENVIRONMENT_CAVE,0.5F,2.886F,1.304F
+#define EAX_PRESET_ARENA EAX_ENVIRONMENT_ARENA,0.361F,7.284F,0.332F
+#define EAX_PRESET_HANGAR EAX_ENVIRONMENT_HANGAR,0.5F,10.0F,0.3F
+#define EAX_PRESET_CARPETEDHALLWAY EAX_ENVIRONMENT_CARPETEDHALLWAY,0.153F,0.259F,2.0F
+#define EAX_PRESET_HALLWAY EAX_ENVIRONMENT_HALLWAY,0.361F,1.493F,0.0F
+#define EAX_PRESET_STONECORRIDOR EAX_ENVIRONMENT_STONECORRIDOR,0.444F,2.697F,0.638F
+#define EAX_PRESET_ALLEY EAX_ENVIRONMENT_ALLEY,0.25F,1.752F,0.776F
+#define EAX_PRESET_FOREST EAX_ENVIRONMENT_FOREST,0.111F,3.145F,0.472F
+#define EAX_PRESET_CITY EAX_ENVIRONMENT_CITY,0.111F,2.767F,0.224F
+#define EAX_PRESET_MOUNTAINS EAX_ENVIRONMENT_MOUNTAINS,0.194F,7.841F,0.472F
+#define EAX_PRESET_QUARRY EAX_ENVIRONMENT_QUARRY,1.0F,1.499F,0.5F
+#define EAX_PRESET_PLAIN EAX_ENVIRONMENT_PLAIN,0.097F,2.767F,0.224F
+#define EAX_PRESET_PARKINGLOT EAX_ENVIRONMENT_PARKINGLOT,0.208F,1.652F,1.5F
+#define EAX_PRESET_SEWERPIPE EAX_ENVIRONMENT_SEWERPIPE,0.652F,2.886F,0.25F
+#define EAX_PRESET_UNDERWATER EAX_ENVIRONMENT_UNDERWATER,1.0F,1.499F,0.0F
+#define EAX_PRESET_DRUGGED EAX_ENVIRONMENT_DRUGGED,0.875F,8.392F,1.388F
+#define EAX_PRESET_DIZZY EAX_ENVIRONMENT_DIZZY,0.139F,17.234F,0.666F
+#define EAX_PRESET_PSYCHOTIC EAX_ENVIRONMENT_PSYCHOTIC,0.486F,7.563F,0.806F
+
+typedef DWORD (CALLBACK STREAMPROC)(HSTREAM handle, void *buffer, DWORD length, void *user);
+/* User stream callback function. NOTE: A stream function should obviously be as quick
+as possible, other streams (and MOD musics) can't be mixed until it's finished.
+handle : The stream that needs writing
+buffer : Buffer to write the samples in
+length : Number of bytes to write
+user : The 'user' parameter value given when calling BASS_StreamCreate
+RETURN : Number of bytes written. Set the BASS_STREAMPROC_END flag to end the stream. */
+
+#define BASS_STREAMPROC_END 0x80000000 // end of user stream flag
+
+// special STREAMPROCs
+#define STREAMPROC_DUMMY (STREAMPROC*)0 // "dummy" stream
+#define STREAMPROC_PUSH (STREAMPROC*)-1 // push stream
+#define STREAMPROC_DEVICE (STREAMPROC*)-2 // device mix stream
+
+// BASS_StreamCreateFileUser file systems
+#define STREAMFILE_NOBUFFER 0
+#define STREAMFILE_BUFFER 1
+#define STREAMFILE_BUFFERPUSH 2
+
+// User file stream callback functions
+typedef void (CALLBACK FILECLOSEPROC)(void *user);
+typedef QWORD (CALLBACK FILELENPROC)(void *user);
+typedef DWORD (CALLBACK FILEREADPROC)(void *buffer, DWORD length, void *user);
+typedef BOOL (CALLBACK FILESEEKPROC)(QWORD offset, void *user);
+
+typedef struct {
+ FILECLOSEPROC *close;
+ FILELENPROC *length;
+ FILEREADPROC *read;
+ FILESEEKPROC *seek;
+} BASS_FILEPROCS;
+
+// BASS_StreamPutFileData options
+#define BASS_FILEDATA_END 0 // end & close the file
+
+// BASS_StreamGetFilePosition modes
+#define BASS_FILEPOS_CURRENT 0
+#define BASS_FILEPOS_DECODE BASS_FILEPOS_CURRENT
+#define BASS_FILEPOS_DOWNLOAD 1
+#define BASS_FILEPOS_END 2
+#define BASS_FILEPOS_START 3
+#define BASS_FILEPOS_CONNECTED 4
+#define BASS_FILEPOS_BUFFER 5
+#define BASS_FILEPOS_SOCKET 6
+#define BASS_FILEPOS_ASYNCBUF 7
+#define BASS_FILEPOS_SIZE 8
+#define BASS_FILEPOS_BUFFERING 9
+
+typedef void (CALLBACK DOWNLOADPROC)(const void *buffer, DWORD length, void *user);
+/* Internet stream download callback function.
+buffer : Buffer containing the downloaded data... NULL=end of download
+length : Number of bytes in the buffer
+user : The 'user' parameter value given when calling BASS_StreamCreateURL */
+
+// BASS_ChannelSetSync types
+#define BASS_SYNC_POS 0
+#define BASS_SYNC_END 2
+#define BASS_SYNC_META 4
+#define BASS_SYNC_SLIDE 5
+#define BASS_SYNC_STALL 6
+#define BASS_SYNC_DOWNLOAD 7
+#define BASS_SYNC_FREE 8
+#define BASS_SYNC_SETPOS 11
+#define BASS_SYNC_MUSICPOS 10
+#define BASS_SYNC_MUSICINST 1
+#define BASS_SYNC_MUSICFX 3
+#define BASS_SYNC_OGG_CHANGE 12
+#define BASS_SYNC_MIXTIME 0x40000000 // flag: sync at mixtime, else at playtime
+#define BASS_SYNC_ONETIME 0x80000000 // flag: sync only once, else continuously
+
+typedef void (CALLBACK SYNCPROC)(HSYNC handle, DWORD channel, DWORD data, void *user);
+/* Sync callback function. NOTE: a sync callback function should be very
+quick as other syncs can't be processed until it has finished. If the sync
+is a "mixtime" sync, then other streams and MOD musics can't be mixed until
+it's finished either.
+handle : The sync that has occured
+channel: Channel that the sync occured in
+data : Additional data associated with the sync's occurance
+user : The 'user' parameter given when calling BASS_ChannelSetSync */
+
+typedef void (CALLBACK DSPPROC)(HDSP handle, DWORD channel, void *buffer, DWORD length, void *user);
+/* DSP callback function. NOTE: A DSP function should obviously be as quick as
+possible... other DSP functions, streams and MOD musics can not be processed
+until it's finished.
+handle : The DSP handle
+channel: Channel that the DSP is being applied to
+buffer : Buffer to apply the DSP to
+length : Number of bytes in the buffer
+user : The 'user' parameter given when calling BASS_ChannelSetDSP */
+
+typedef BOOL (CALLBACK RECORDPROC)(HRECORD handle, const void *buffer, DWORD length, void *user);
+/* Recording callback function.
+handle : The recording handle
+buffer : Buffer containing the recorded sample data
+length : Number of bytes
+user : The 'user' parameter value given when calling BASS_RecordStart
+RETURN : TRUE = continue recording, FALSE = stop */
+
+// BASS_ChannelIsActive return values
+#define BASS_ACTIVE_STOPPED 0
+#define BASS_ACTIVE_PLAYING 1
+#define BASS_ACTIVE_STALLED 2
+#define BASS_ACTIVE_PAUSED 3
+
+// Channel attributes
+#define BASS_ATTRIB_FREQ 1
+#define BASS_ATTRIB_VOL 2
+#define BASS_ATTRIB_PAN 3
+#define BASS_ATTRIB_EAXMIX 4
+#define BASS_ATTRIB_NOBUFFER 5
+#define BASS_ATTRIB_VBR 6
+#define BASS_ATTRIB_CPU 7
+#define BASS_ATTRIB_SRC 8
+#define BASS_ATTRIB_NET_RESUME 9
+#define BASS_ATTRIB_SCANINFO 10
+#define BASS_ATTRIB_NORAMP 11
+#define BASS_ATTRIB_BITRATE 12
+#define BASS_ATTRIB_BUFFER 13
+#define BASS_ATTRIB_MUSIC_AMPLIFY 0x100
+#define BASS_ATTRIB_MUSIC_PANSEP 0x101
+#define BASS_ATTRIB_MUSIC_PSCALER 0x102
+#define BASS_ATTRIB_MUSIC_BPM 0x103
+#define BASS_ATTRIB_MUSIC_SPEED 0x104
+#define BASS_ATTRIB_MUSIC_VOL_GLOBAL 0x105
+#define BASS_ATTRIB_MUSIC_ACTIVE 0x106
+#define BASS_ATTRIB_MUSIC_VOL_CHAN 0x200 // + channel #
+#define BASS_ATTRIB_MUSIC_VOL_INST 0x300 // + instrument #
+
+// BASS_ChannelSlideAttribute flags
+#define BASS_SLIDE_LOG 0x1000000
+
+// BASS_ChannelGetData flags
+#define BASS_DATA_AVAILABLE 0 // query how much data is buffered
+#define BASS_DATA_FIXED 0x20000000 // flag: return 8.24 fixed-point data
+#define BASS_DATA_FLOAT 0x40000000 // flag: return floating-point sample data
+#define BASS_DATA_FFT256 0x80000000 // 256 sample FFT
+#define BASS_DATA_FFT512 0x80000001 // 512 FFT
+#define BASS_DATA_FFT1024 0x80000002 // 1024 FFT
+#define BASS_DATA_FFT2048 0x80000003 // 2048 FFT
+#define BASS_DATA_FFT4096 0x80000004 // 4096 FFT
+#define BASS_DATA_FFT8192 0x80000005 // 8192 FFT
+#define BASS_DATA_FFT16384 0x80000006 // 16384 FFT
+#define BASS_DATA_FFT32768 0x80000007 // 32768 FFT
+#define BASS_DATA_FFT_INDIVIDUAL 0x10 // FFT flag: FFT for each channel, else all combined
+#define BASS_DATA_FFT_NOWINDOW 0x20 // FFT flag: no Hanning window
+#define BASS_DATA_FFT_REMOVEDC 0x40 // FFT flag: pre-remove DC bias
+#define BASS_DATA_FFT_COMPLEX 0x80 // FFT flag: return complex data
+
+// BASS_ChannelGetLevelEx flags
+#define BASS_LEVEL_MONO 1
+#define BASS_LEVEL_STEREO 2
+#define BASS_LEVEL_RMS 4
+#define BASS_LEVEL_VOLPAN 8
+
+// BASS_ChannelGetTags types : what's returned
+#define BASS_TAG_ID3 0 // ID3v1 tags : TAG_ID3 structure
+#define BASS_TAG_ID3V2 1 // ID3v2 tags : variable length block
+#define BASS_TAG_OGG 2 // OGG comments : series of null-terminated UTF-8 strings
+#define BASS_TAG_HTTP 3 // HTTP headers : series of null-terminated ANSI strings
+#define BASS_TAG_ICY 4 // ICY headers : series of null-terminated ANSI strings
+#define BASS_TAG_META 5 // ICY metadata : ANSI string
+#define BASS_TAG_APE 6 // APE tags : series of null-terminated UTF-8 strings
+#define BASS_TAG_MP4 7 // MP4/iTunes metadata : series of null-terminated UTF-8 strings
+#define BASS_TAG_WMA 8 // WMA tags : series of null-terminated UTF-8 strings
+#define BASS_TAG_VENDOR 9 // OGG encoder : UTF-8 string
+#define BASS_TAG_LYRICS3 10 // Lyric3v2 tag : ASCII string
+#define BASS_TAG_CA_CODEC 11 // CoreAudio codec info : TAG_CA_CODEC structure
+#define BASS_TAG_MF 13 // Media Foundation tags : series of null-terminated UTF-8 strings
+#define BASS_TAG_WAVEFORMAT 14 // WAVE format : WAVEFORMATEEX structure
+#define BASS_TAG_AM_MIME 15 // Android Media MIME type : ASCII string
+#define BASS_TAG_AM_NAME 16 // Android Media codec name : ASCII string
+#define BASS_TAG_RIFF_INFO 0x100 // RIFF "INFO" tags : series of null-terminated ANSI strings
+#define BASS_TAG_RIFF_BEXT 0x101 // RIFF/BWF "bext" tags : TAG_BEXT structure
+#define BASS_TAG_RIFF_CART 0x102 // RIFF/BWF "cart" tags : TAG_CART structure
+#define BASS_TAG_RIFF_DISP 0x103 // RIFF "DISP" text tag : ANSI string
+#define BASS_TAG_RIFF_CUE 0x104 // RIFF "cue " chunk : TAG_CUE structure
+#define BASS_TAG_RIFF_SMPL 0x105 // RIFF "smpl" chunk : TAG_SMPL structure
+#define BASS_TAG_APE_BINARY 0x1000 // + index #, binary APE tag : TAG_APE_BINARY structure
+#define BASS_TAG_MUSIC_NAME 0x10000 // MOD music name : ANSI string
+#define BASS_TAG_MUSIC_MESSAGE 0x10001 // MOD message : ANSI string
+#define BASS_TAG_MUSIC_ORDERS 0x10002 // MOD order list : BYTE array of pattern numbers
+#define BASS_TAG_MUSIC_AUTH 0x10003 // MOD author : UTF-8 string
+#define BASS_TAG_MUSIC_INST 0x10100 // + instrument #, MOD instrument name : ANSI string
+#define BASS_TAG_MUSIC_SAMPLE 0x10300 // + sample #, MOD sample name : ANSI string
+
+// ID3v1 tag structure
+typedef struct {
+ char id[3];
+ char title[30];
+ char artist[30];
+ char album[30];
+ char year[4];
+ char comment[30];
+ BYTE genre;
+} TAG_ID3;
+
+// Binary APE tag structure
typedef struct {
- DWORD flags; // device capabilities (DSCAPS_xxx flags)
- DWORD hwsize; // size of total device hardware memory
- DWORD hwfree; // size of free device hardware memory
- DWORD freesam; // number of free sample slots in the hardware
- DWORD free3d; // number of free 3D sample slots in the hardware
- DWORD minrate; // min sample rate supported by the hardware
- DWORD maxrate; // max sample rate supported by the hardware
- BOOL
- eax; // device supports EAX? (always FALSE if BASS_DEVICE_3D was not used)
- DWORD minbuf; // recommended minimum buffer length in ms (requires
- // BASS_DEVICE_LATENCY)
- DWORD dsver; // DirectSound version
- DWORD latency; // delay (in ms) before start of playback (requires
- // BASS_DEVICE_LATENCY)
- DWORD initflags; // BASS_Init "flags" parameter
- DWORD speakers; // number of speakers available
- DWORD freq; // current output rate
-} BASS_INFO;
-
-// BASS_INFO flags (from DSOUND.H)
-#define DSCAPS_CONTINUOUSRATE \
- 0x00000010 // supports all sample rates between min/maxrate
-#define DSCAPS_EMULDRIVER \
- 0x00000020 // device does NOT have hardware DirectSound support
-#define DSCAPS_CERTIFIED \
- 0x00000040 // device driver has been certified by Microsoft
-#define DSCAPS_SECONDARYMONO 0x00000100 // mono
-#define DSCAPS_SECONDARYSTEREO 0x00000200 // stereo
-#define DSCAPS_SECONDARY8BIT 0x00000400 // 8 bit
-#define DSCAPS_SECONDARY16BIT 0x00000800 // 16 bit
-
-// Recording device info structure
-typedef struct {
- DWORD flags; // device capabilities (DSCCAPS_xxx flags)
- DWORD formats; // supported standard formats (WAVE_FORMAT_xxx flags)
- DWORD inputs; // number of inputs
- BOOL singlein; // TRUE = only 1 input can be set at a time
- DWORD freq; // current input rate
-} BASS_RECORDINFO;
-
-// BASS_RECORDINFO flags (from DSOUND.H)
-#define DSCCAPS_EMULDRIVER \
- DSCAPS_EMULDRIVER // device does NOT have hardware DirectSound recording
- // support
-#define DSCCAPS_CERTIFIED \
- DSCAPS_CERTIFIED // device driver has been certified by Microsoft
-
-// defines for formats field of BASS_RECORDINFO (from MMSYSTEM.H)
-#ifndef WAVE_FORMAT_1M08
-#define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
-#define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
-#define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
-#define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
-#define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
-#define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
-#define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
-#define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
-#define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
-#define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
-#define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
-#define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
-#endif
-
-// Sample info structure
-typedef struct {
- DWORD freq; // default playback rate
- float volume; // default volume (0-1)
- float pan; // default pan (-1=left, 0=middle, 1=right)
- DWORD flags; // BASS_SAMPLE_xxx flags
- DWORD length; // length (in bytes)
- DWORD max; // maximum simultaneous playbacks
- DWORD origres; // original resolution
- DWORD chans; // number of channels
- DWORD mingap; // minimum gap (ms) between creating channels
- DWORD mode3d; // BASS_3DMODE_xxx mode
- float mindist; // minimum distance
- float maxdist; // maximum distance
- DWORD iangle; // angle of inside projection cone
- DWORD oangle; // angle of outside projection cone
- float outvol; // delta-volume outside the projection cone
- DWORD vam; // voice allocation/management flags (BASS_VAM_xxx)
- DWORD priority; // priority (0=lowest, 0xffffffff=highest)
-} BASS_SAMPLE;
-
-#define BASS_SAMPLE_8BITS 1 // 8 bit
-#define BASS_SAMPLE_FLOAT 256 // 32 bit floating-point
-#define BASS_SAMPLE_MONO 2 // mono
-#define BASS_SAMPLE_LOOP 4 // looped
-#define BASS_SAMPLE_3D 8 // 3D functionality
-#define BASS_SAMPLE_SOFTWARE 16 // not using hardware mixing
-#define BASS_SAMPLE_MUTEMAX 32 // mute at max distance (3D only)
-#define BASS_SAMPLE_VAM 64 // DX7 voice allocation & management
-#define BASS_SAMPLE_FX 128 // old implementation of DX8 effects
-#define BASS_SAMPLE_OVER_VOL 0x10000 // override lowest volume
-#define BASS_SAMPLE_OVER_POS 0x20000 // override longest playing
-#define BASS_SAMPLE_OVER_DIST \
- 0x30000 // override furthest from listener (3D only)
-
-#define BASS_STREAM_PRESCAN \
- 0x20000 // enable pin-point seeking/length (MP3/MP2/MP1)
-#define BASS_STREAM_AUTOFREE \
- 0x40000 // automatically free the stream when it stop/ends
-#define BASS_STREAM_RESTRATE \
- 0x80000 // restrict the download rate of internet file streams
-#define BASS_STREAM_BLOCK \
- 0x100000 // download/play internet file stream in small blocks
-#define BASS_STREAM_DECODE \
- 0x200000 // don't play the stream, only decode (BASS_ChannelGetData)
-#define BASS_STREAM_STATUS \
- 0x800000 // give server status info (HTTP/ICY tags) in DOWNLOADPROC
-
-#define BASS_MP3_IGNOREDELAY \
- 0x200 // ignore LAME/Xing/VBRI/iTunes delay & padding info
-#define BASS_MP3_SETPOS BASS_STREAM_PRESCAN
-
-#define BASS_MUSIC_FLOAT BASS_SAMPLE_FLOAT
-#define BASS_MUSIC_MONO BASS_SAMPLE_MONO
-#define BASS_MUSIC_LOOP BASS_SAMPLE_LOOP
-#define BASS_MUSIC_3D BASS_SAMPLE_3D
-#define BASS_MUSIC_FX BASS_SAMPLE_FX
-#define BASS_MUSIC_AUTOFREE BASS_STREAM_AUTOFREE
-#define BASS_MUSIC_DECODE BASS_STREAM_DECODE
-#define BASS_MUSIC_PRESCAN BASS_STREAM_PRESCAN // calculate playback length
-#define BASS_MUSIC_CALCLEN BASS_MUSIC_PRESCAN
-#define BASS_MUSIC_RAMP 0x200 // normal ramping
-#define BASS_MUSIC_RAMPS 0x400 // sensitive ramping
-#define BASS_MUSIC_SURROUND 0x800 // surround sound
-#define BASS_MUSIC_SURROUND2 0x1000 // surround sound (mode 2)
-#define BASS_MUSIC_FT2PAN 0x2000 // apply FastTracker 2 panning to XM files
-#define BASS_MUSIC_FT2MOD 0x2000 // play .MOD as FastTracker 2 does
-#define BASS_MUSIC_PT1MOD 0x4000 // play .MOD as ProTracker 1 does
-#define BASS_MUSIC_NONINTER 0x10000 // non-interpolated sample mixing
-#define BASS_MUSIC_SINCINTER 0x800000 // sinc interpolated sample mixing
-#define BASS_MUSIC_POSRESET 0x8000 // stop all notes when moving position
-#define BASS_MUSIC_POSRESETEX \
- 0x400000 // stop all notes and reset bmp/etc when moving position
-#define BASS_MUSIC_STOPBACK 0x80000 // stop the music on a backwards jump effect
-#define BASS_MUSIC_NOSAMPLE 0x100000 // don't load the samples
-
-// Speaker assignment flags
-#define BASS_SPEAKER_FRONT 0x1000000 // front speakers
-#define BASS_SPEAKER_REAR 0x2000000 // rear/side speakers
-#define BASS_SPEAKER_CENLFE 0x3000000 // center & LFE speakers (5.1)
-#define BASS_SPEAKER_REAR2 0x4000000 // rear center speakers (7.1)
-#define BASS_SPEAKER_N(n) ((n) << 24) // n'th pair of speakers (max 15)
-#define BASS_SPEAKER_LEFT 0x10000000 // modifier: left
-#define BASS_SPEAKER_RIGHT 0x20000000 // modifier: right
-#define BASS_SPEAKER_FRONTLEFT BASS_SPEAKER_FRONT | BASS_SPEAKER_LEFT
-#define BASS_SPEAKER_FRONTRIGHT BASS_SPEAKER_FRONT | BASS_SPEAKER_RIGHT
-#define BASS_SPEAKER_REARLEFT BASS_SPEAKER_REAR | BASS_SPEAKER_LEFT
-#define BASS_SPEAKER_REARRIGHT BASS_SPEAKER_REAR | BASS_SPEAKER_RIGHT
-#define BASS_SPEAKER_CENTER BASS_SPEAKER_CENLFE | BASS_SPEAKER_LEFT
-#define BASS_SPEAKER_LFE BASS_SPEAKER_CENLFE | BASS_SPEAKER_RIGHT
-#define BASS_SPEAKER_REAR2LEFT BASS_SPEAKER_REAR2 | BASS_SPEAKER_LEFT
-#define BASS_SPEAKER_REAR2RIGHT BASS_SPEAKER_REAR2 | BASS_SPEAKER_RIGHT
-
-#define BASS_ASYNCFILE 0x40000000
-#define BASS_UNICODE 0x80000000
-
-#define BASS_RECORD_PAUSE 0x8000 // start recording paused
-#define BASS_RECORD_ECHOCANCEL 0x2000
-#define BASS_RECORD_AGC 0x4000
-
-// DX7 voice allocation & management flags
-#define BASS_VAM_HARDWARE 1
-#define BASS_VAM_SOFTWARE 2
-#define BASS_VAM_TERM_TIME 4
-#define BASS_VAM_TERM_DIST 8
-#define BASS_VAM_TERM_PRIO 16
-
-// Channel info structure
-typedef struct {
- DWORD freq; // default playback rate
- DWORD chans; // channels
- DWORD flags; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags
- DWORD ctype; // type of channel
- DWORD origres; // original resolution
- HPLUGIN plugin; // plugin
- HSAMPLE sample; // sample
- const char *filename; // filename
-} BASS_CHANNELINFO;
-
-#define BASS_ORIGRES_FLOAT 0x10000
-
-// BASS_CHANNELINFO types
-#define BASS_CTYPE_SAMPLE 1
-#define BASS_CTYPE_RECORD 2
-#define BASS_CTYPE_STREAM 0x10000
-#define BASS_CTYPE_STREAM_OGG 0x10002
-#define BASS_CTYPE_STREAM_MP1 0x10003
-#define BASS_CTYPE_STREAM_MP2 0x10004
-#define BASS_CTYPE_STREAM_MP3 0x10005
-#define BASS_CTYPE_STREAM_AIFF 0x10006
-#define BASS_CTYPE_STREAM_CA 0x10007
-#define BASS_CTYPE_STREAM_MF 0x10008
-#define BASS_CTYPE_STREAM_AM 0x10009
-#define BASS_CTYPE_STREAM_DUMMY 0x18000
-#define BASS_CTYPE_STREAM_DEVICE 0x18001
-#define BASS_CTYPE_STREAM_WAV 0x40000 // WAVE flag, LOWORD=codec
-#define BASS_CTYPE_STREAM_WAV_PCM 0x50001
-#define BASS_CTYPE_STREAM_WAV_FLOAT 0x50003
-#define BASS_CTYPE_MUSIC_MOD 0x20000
-#define BASS_CTYPE_MUSIC_MTM 0x20001
-#define BASS_CTYPE_MUSIC_S3M 0x20002
-#define BASS_CTYPE_MUSIC_XM 0x20003
-#define BASS_CTYPE_MUSIC_IT 0x20004
-#define BASS_CTYPE_MUSIC_MO3 0x00100 // MO3 flag
-
-typedef struct {
- DWORD ctype; // channel type
-#if defined(_WIN32_WCE) || \
- (WINAPI_FAMILY && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
- const wchar_t *name; // format description
- const wchar_t *exts; // file extension filter (*.ext1;*.ext2;etc...)
-#else
- const char *name; // format description
- const char *exts; // file extension filter (*.ext1;*.ext2;etc...)
-#endif
-} BASS_PLUGINFORM;
-
-typedef struct {
- DWORD version; // version (same form as BASS_GetVersion)
- DWORD formatc; // number of formats
- const BASS_PLUGINFORM *formats; // the array of formats
-} BASS_PLUGININFO;
-
-// 3D vector (for 3D positions/velocities/orientations)
-typedef struct BASS_3DVECTOR {
-#ifdef __cplusplus
- BASS_3DVECTOR(){};
- BASS_3DVECTOR(float _x, float _y, float _z) : x(_x), y(_y), z(_z){};
-#endif
- float x; // +=right, -=left
- float y; // +=up, -=down
- float z; // +=front, -=behind
-} BASS_3DVECTOR;
-
-// 3D channel modes
-#define BASS_3DMODE_NORMAL 0 // normal 3D processing
-#define BASS_3DMODE_RELATIVE 1 // position is relative to the listener
-#define BASS_3DMODE_OFF 2 // no 3D processing
-
-// software 3D mixing algorithms (used with BASS_CONFIG_3DALGORITHM)
-#define BASS_3DALG_DEFAULT 0
-#define BASS_3DALG_OFF 1
-#define BASS_3DALG_FULL 2
-#define BASS_3DALG_LIGHT 3
-
-// EAX environments, use with BASS_SetEAXParameters
-enum {
- EAX_ENVIRONMENT_GENERIC,
- EAX_ENVIRONMENT_PADDEDCELL,
- EAX_ENVIRONMENT_ROOM,
- EAX_ENVIRONMENT_BATHROOM,
- EAX_ENVIRONMENT_LIVINGROOM,
- EAX_ENVIRONMENT_STONEROOM,
- EAX_ENVIRONMENT_AUDITORIUM,
- EAX_ENVIRONMENT_CONCERTHALL,
- EAX_ENVIRONMENT_CAVE,
- EAX_ENVIRONMENT_ARENA,
- EAX_ENVIRONMENT_HANGAR,
- EAX_ENVIRONMENT_CARPETEDHALLWAY,
- EAX_ENVIRONMENT_HALLWAY,
- EAX_ENVIRONMENT_STONECORRIDOR,
- EAX_ENVIRONMENT_ALLEY,
- EAX_ENVIRONMENT_FOREST,
- EAX_ENVIRONMENT_CITY,
- EAX_ENVIRONMENT_MOUNTAINS,
- EAX_ENVIRONMENT_QUARRY,
- EAX_ENVIRONMENT_PLAIN,
- EAX_ENVIRONMENT_PARKINGLOT,
- EAX_ENVIRONMENT_SEWERPIPE,
- EAX_ENVIRONMENT_UNDERWATER,
- EAX_ENVIRONMENT_DRUGGED,
- EAX_ENVIRONMENT_DIZZY,
- EAX_ENVIRONMENT_PSYCHOTIC,
-
- EAX_ENVIRONMENT_COUNT // total number of environments
-};
-
-// EAX presets, usage: BASS_SetEAXParameters(EAX_PRESET_xxx)
-#define EAX_PRESET_GENERIC EAX_ENVIRONMENT_GENERIC, 0.5F, 1.493F, 0.5F
-#define EAX_PRESET_PADDEDCELL EAX_ENVIRONMENT_PADDEDCELL, 0.25F, 0.1F, 0.0F
-#define EAX_PRESET_ROOM EAX_ENVIRONMENT_ROOM, 0.417F, 0.4F, 0.666F
-#define EAX_PRESET_BATHROOM EAX_ENVIRONMENT_BATHROOM, 0.653F, 1.499F, 0.166F
-#define EAX_PRESET_LIVINGROOM EAX_ENVIRONMENT_LIVINGROOM, 0.208F, 0.478F, 0.0F
-#define EAX_PRESET_STONEROOM EAX_ENVIRONMENT_STONEROOM, 0.5F, 2.309F, 0.888F
-#define EAX_PRESET_AUDITORIUM EAX_ENVIRONMENT_AUDITORIUM, 0.403F, 4.279F, 0.5F
-#define EAX_PRESET_CONCERTHALL EAX_ENVIRONMENT_CONCERTHALL, 0.5F, 3.961F, 0.5F
-#define EAX_PRESET_CAVE EAX_ENVIRONMENT_CAVE, 0.5F, 2.886F, 1.304F
-#define EAX_PRESET_ARENA EAX_ENVIRONMENT_ARENA, 0.361F, 7.284F, 0.332F
-#define EAX_PRESET_HANGAR EAX_ENVIRONMENT_HANGAR, 0.5F, 10.0F, 0.3F
-#define EAX_PRESET_CARPETEDHALLWAY \
- EAX_ENVIRONMENT_CARPETEDHALLWAY, 0.153F, 0.259F, 2.0F
-#define EAX_PRESET_HALLWAY EAX_ENVIRONMENT_HALLWAY, 0.361F, 1.493F, 0.0F
-#define EAX_PRESET_STONECORRIDOR \
- EAX_ENVIRONMENT_STONECORRIDOR, 0.444F, 2.697F, 0.638F
-#define EAX_PRESET_ALLEY EAX_ENVIRONMENT_ALLEY, 0.25F, 1.752F, 0.776F
-#define EAX_PRESET_FOREST EAX_ENVIRONMENT_FOREST, 0.111F, 3.145F, 0.472F
-#define EAX_PRESET_CITY EAX_ENVIRONMENT_CITY, 0.111F, 2.767F, 0.224F
-#define EAX_PRESET_MOUNTAINS EAX_ENVIRONMENT_MOUNTAINS, 0.194F, 7.841F, 0.472F
-#define EAX_PRESET_QUARRY EAX_ENVIRONMENT_QUARRY, 1.0F, 1.499F, 0.5F
-#define EAX_PRESET_PLAIN EAX_ENVIRONMENT_PLAIN, 0.097F, 2.767F, 0.224F
-#define EAX_PRESET_PARKINGLOT EAX_ENVIRONMENT_PARKINGLOT, 0.208F, 1.652F, 1.5F
-#define EAX_PRESET_SEWERPIPE EAX_ENVIRONMENT_SEWERPIPE, 0.652F, 2.886F, 0.25F
-#define EAX_PRESET_UNDERWATER EAX_ENVIRONMENT_UNDERWATER, 1.0F, 1.499F, 0.0F
-#define EAX_PRESET_DRUGGED EAX_ENVIRONMENT_DRUGGED, 0.875F, 8.392F, 1.388F
-#define EAX_PRESET_DIZZY EAX_ENVIRONMENT_DIZZY, 0.139F, 17.234F, 0.666F
-#define EAX_PRESET_PSYCHOTIC EAX_ENVIRONMENT_PSYCHOTIC, 0.486F, 7.563F, 0.806F
-
-typedef DWORD(CALLBACK STREAMPROC)(HSTREAM handle, void *buffer, DWORD length,
- void *user);
-/* User stream callback function. NOTE: A stream function should obviously be as
-quick as possible, other streams (and MOD musics) can't be mixed until it's
-finished. handle : The stream that needs writing buffer : Buffer to write the
-samples in length : Number of bytes to write user : The 'user' parameter value
-given when calling BASS_StreamCreate RETURN : Number of bytes written. Set the
-BASS_STREAMPROC_END flag to end the stream. */
-
-#define BASS_STREAMPROC_END 0x80000000 // end of user stream flag
-
-// special STREAMPROCs
-#define STREAMPROC_DUMMY (STREAMPROC *)0 // "dummy" stream
-#define STREAMPROC_PUSH (STREAMPROC *)-1 // push stream
-#define STREAMPROC_DEVICE (STREAMPROC *)-2 // device mix stream
-
-// BASS_StreamCreateFileUser file systems
-#define STREAMFILE_NOBUFFER 0
-#define STREAMFILE_BUFFER 1
-#define STREAMFILE_BUFFERPUSH 2
-
-// User file stream callback functions
-typedef void(CALLBACK FILECLOSEPROC)(void *user);
-typedef QWORD(CALLBACK FILELENPROC)(void *user);
-typedef DWORD(CALLBACK FILEREADPROC)(void *buffer, DWORD length, void *user);
-typedef BOOL(CALLBACK FILESEEKPROC)(QWORD offset, void *user);
-
-typedef struct {
- FILECLOSEPROC *close;
- FILELENPROC *length;
- FILEREADPROC *read;
- FILESEEKPROC *seek;
-} BASS_FILEPROCS;
-
-// BASS_StreamPutFileData options
-#define BASS_FILEDATA_END 0 // end & close the file
-
-// BASS_StreamGetFilePosition modes
-#define BASS_FILEPOS_CURRENT 0
-#define BASS_FILEPOS_DECODE BASS_FILEPOS_CURRENT
-#define BASS_FILEPOS_DOWNLOAD 1
-#define BASS_FILEPOS_END 2
-#define BASS_FILEPOS_START 3
-#define BASS_FILEPOS_CONNECTED 4
-#define BASS_FILEPOS_BUFFER 5
-#define BASS_FILEPOS_SOCKET 6
-#define BASS_FILEPOS_ASYNCBUF 7
-#define BASS_FILEPOS_SIZE 8
-#define BASS_FILEPOS_BUFFERING 9
-
-typedef void(CALLBACK DOWNLOADPROC)(const void *buffer, DWORD length,
- void *user);
-/* Internet stream download callback function.
-buffer : Buffer containing the downloaded data... NULL=end of download
-length : Number of bytes in the buffer
-user : The 'user' parameter value given when calling BASS_StreamCreateURL */
-
-// BASS_ChannelSetSync types
-#define BASS_SYNC_POS 0
-#define BASS_SYNC_END 2
-#define BASS_SYNC_META 4
-#define BASS_SYNC_SLIDE 5
-#define BASS_SYNC_STALL 6
-#define BASS_SYNC_DOWNLOAD 7
-#define BASS_SYNC_FREE 8
-#define BASS_SYNC_SETPOS 11
-#define BASS_SYNC_MUSICPOS 10
-#define BASS_SYNC_MUSICINST 1
-#define BASS_SYNC_MUSICFX 3
-#define BASS_SYNC_OGG_CHANGE 12
-#define BASS_SYNC_MIXTIME 0x40000000 // flag: sync at mixtime, else at playtime
-#define BASS_SYNC_ONETIME 0x80000000 // flag: sync only once, else continuously
-
-typedef void(CALLBACK SYNCPROC)(HSYNC handle, DWORD channel, DWORD data,
- void *user);
-/* Sync callback function. NOTE: a sync callback function should be very
-quick as other syncs can't be processed until it has finished. If the sync
-is a "mixtime" sync, then other streams and MOD musics can't be mixed until
-it's finished either.
-handle : The sync that has occured
-channel: Channel that the sync occured in
-data : Additional data associated with the sync's occurance
-user : The 'user' parameter given when calling BASS_ChannelSetSync */
-
-typedef void(CALLBACK DSPPROC)(HDSP handle, DWORD channel, void *buffer,
- DWORD length, void *user);
-/* DSP callback function. NOTE: A DSP function should obviously be as quick as
-possible... other DSP functions, streams and MOD musics can not be processed
-until it's finished.
-handle : The DSP handle
-channel: Channel that the DSP is being applied to
-buffer : Buffer to apply the DSP to
-length : Number of bytes in the buffer
-user : The 'user' parameter given when calling BASS_ChannelSetDSP */
-
-typedef BOOL(CALLBACK RECORDPROC)(HRECORD handle, const void *buffer,
- DWORD length, void *user);
-/* Recording callback function.
-handle : The recording handle
-buffer : Buffer containing the recorded sample data
-length : Number of bytes
-user : The 'user' parameter value given when calling BASS_RecordStart
-RETURN : TRUE = continue recording, FALSE = stop */
-
-// BASS_ChannelIsActive return values
-#define BASS_ACTIVE_STOPPED 0
-#define BASS_ACTIVE_PLAYING 1
-#define BASS_ACTIVE_STALLED 2
-#define BASS_ACTIVE_PAUSED 3
-
-// Channel attributes
-#define BASS_ATTRIB_FREQ 1
-#define BASS_ATTRIB_VOL 2
-#define BASS_ATTRIB_PAN 3
-#define BASS_ATTRIB_EAXMIX 4
-#define BASS_ATTRIB_NOBUFFER 5
-#define BASS_ATTRIB_VBR 6
-#define BASS_ATTRIB_CPU 7
-#define BASS_ATTRIB_SRC 8
-#define BASS_ATTRIB_NET_RESUME 9
-#define BASS_ATTRIB_SCANINFO 10
-#define BASS_ATTRIB_NORAMP 11
-#define BASS_ATTRIB_BITRATE 12
-#define BASS_ATTRIB_BUFFER 13
-#define BASS_ATTRIB_MUSIC_AMPLIFY 0x100
-#define BASS_ATTRIB_MUSIC_PANSEP 0x101
-#define BASS_ATTRIB_MUSIC_PSCALER 0x102
-#define BASS_ATTRIB_MUSIC_BPM 0x103
-#define BASS_ATTRIB_MUSIC_SPEED 0x104
-#define BASS_ATTRIB_MUSIC_VOL_GLOBAL 0x105
-#define BASS_ATTRIB_MUSIC_ACTIVE 0x106
-#define BASS_ATTRIB_MUSIC_VOL_CHAN 0x200 // + channel #
-#define BASS_ATTRIB_MUSIC_VOL_INST 0x300 // + instrument #
-
-// BASS_ChannelSlideAttribute flags
-#define BASS_SLIDE_LOG 0x1000000
-
-// BASS_ChannelGetData flags
-#define BASS_DATA_AVAILABLE 0 // query how much data is buffered
-#define BASS_DATA_FIXED 0x20000000 // flag: return 8.24 fixed-point data
-#define BASS_DATA_FLOAT 0x40000000 // flag: return floating-point sample data
-#define BASS_DATA_FFT256 0x80000000 // 256 sample FFT
-#define BASS_DATA_FFT512 0x80000001 // 512 FFT
-#define BASS_DATA_FFT1024 0x80000002 // 1024 FFT
-#define BASS_DATA_FFT2048 0x80000003 // 2048 FFT
-#define BASS_DATA_FFT4096 0x80000004 // 4096 FFT
-#define BASS_DATA_FFT8192 0x80000005 // 8192 FFT
-#define BASS_DATA_FFT16384 0x80000006 // 16384 FFT
-#define BASS_DATA_FFT32768 0x80000007 // 32768 FFT
-#define BASS_DATA_FFT_INDIVIDUAL \
- 0x10 // FFT flag: FFT for each channel, else all combined
-#define BASS_DATA_FFT_NOWINDOW 0x20 // FFT flag: no Hanning window
-#define BASS_DATA_FFT_REMOVEDC 0x40 // FFT flag: pre-remove DC bias
-#define BASS_DATA_FFT_COMPLEX 0x80 // FFT flag: return complex data
-
-// BASS_ChannelGetLevelEx flags
-#define BASS_LEVEL_MONO 1
-#define BASS_LEVEL_STEREO 2
-#define BASS_LEVEL_RMS 4
-#define BASS_LEVEL_VOLPAN 8
-
-// BASS_ChannelGetTags types : what's returned
-#define BASS_TAG_ID3 0 // ID3v1 tags : TAG_ID3 structure
-#define BASS_TAG_ID3V2 1 // ID3v2 tags : variable length block
-#define BASS_TAG_OGG 2 // OGG comments : series of null-terminated UTF-8 strings
-#define BASS_TAG_HTTP 3 // HTTP headers : series of null-terminated ANSI strings
-#define BASS_TAG_ICY 4 // ICY headers : series of null-terminated ANSI strings
-#define BASS_TAG_META 5 // ICY metadata : ANSI string
-#define BASS_TAG_APE 6 // APE tags : series of null-terminated UTF-8 strings
-#define BASS_TAG_MP4 \
- 7 // MP4/iTunes metadata : series of null-terminated UTF-8 strings
-#define BASS_TAG_WMA 8 // WMA tags : series of null-terminated UTF-8 strings
-#define BASS_TAG_VENDOR 9 // OGG encoder : UTF-8 string
-#define BASS_TAG_LYRICS3 10 // Lyric3v2 tag : ASCII string
-#define BASS_TAG_CA_CODEC 11 // CoreAudio codec info : TAG_CA_CODEC structure
-#define BASS_TAG_MF \
- 13 // Media Foundation tags : series of null-terminated UTF-8 strings
-#define BASS_TAG_WAVEFORMAT 14 // WAVE format : WAVEFORMATEEX structure
-#define BASS_TAG_AM_MIME 15 // Android Media MIME type : ASCII string
-#define BASS_TAG_AM_NAME 16 // Android Media codec name : ASCII string
-#define BASS_TAG_RIFF_INFO \
- 0x100 // RIFF "INFO" tags : series of null-terminated ANSI strings
-#define BASS_TAG_RIFF_BEXT 0x101 // RIFF/BWF "bext" tags : TAG_BEXT structure
-#define BASS_TAG_RIFF_CART 0x102 // RIFF/BWF "cart" tags : TAG_CART structure
-#define BASS_TAG_RIFF_DISP 0x103 // RIFF "DISP" text tag : ANSI string
-#define BASS_TAG_RIFF_CUE 0x104 // RIFF "cue " chunk : TAG_CUE structure
-#define BASS_TAG_RIFF_SMPL 0x105 // RIFF "smpl" chunk : TAG_SMPL structure
-#define BASS_TAG_APE_BINARY \
- 0x1000 // + index #, binary APE tag : TAG_APE_BINARY structure
-#define BASS_TAG_MUSIC_NAME 0x10000 // MOD music name : ANSI string
-#define BASS_TAG_MUSIC_MESSAGE 0x10001 // MOD message : ANSI string
-#define BASS_TAG_MUSIC_ORDERS \
- 0x10002 // MOD order list : BYTE array of pattern numbers
-#define BASS_TAG_MUSIC_AUTH 0x10003 // MOD author : UTF-8 string
-#define BASS_TAG_MUSIC_INST \
- 0x10100 // + instrument #, MOD instrument name : ANSI string
-#define BASS_TAG_MUSIC_SAMPLE \
- 0x10300 // + sample #, MOD sample name : ANSI string
-
-// ID3v1 tag structure
-typedef struct {
- char id[3];
- char title[30];
- char artist[30];
- char album[30];
- char year[4];
- char comment[30];
- BYTE genre;
-} TAG_ID3;
-
-// Binary APE tag structure
-typedef struct {
- const char *key;
- const void *data;
- DWORD length;
+ const char *key;
+ const void *data;
+ DWORD length;
} TAG_APE_BINARY;
// BWF "bext" tag structure
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable : 4200)
-#endif
-#pragma pack(push, 1)
-typedef struct {
- char Description[256]; // description
- char Originator[32]; // name of the originator
- char OriginatorReference[32]; // reference of the originator
- char OriginationDate[10]; // date of creation (yyyy-mm-dd)
- char OriginationTime[8]; // time of creation (hh-mm-ss)
- QWORD TimeReference; // first sample count since midnight (little-endian)
- WORD Version; // BWF version (little-endian)
- BYTE UMID[64]; // SMPTE UMID
- BYTE Reserved[190];
-#if defined(__GNUC__) && __GNUC__ < 3
- char CodingHistory[0]; // history
-#elif 1 // change to 0 if compiler fails the following line
- char CodingHistory[]; // history
-#else
- char CodingHistory[1]; // history
-#endif
-} TAG_BEXT;
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4200)
+#endif
+#pragma pack(push,1)
+typedef struct {
+ char Description[256]; // description
+ char Originator[32]; // name of the originator
+ char OriginatorReference[32]; // reference of the originator
+ char OriginationDate[10]; // date of creation (yyyy-mm-dd)
+ char OriginationTime[8]; // time of creation (hh-mm-ss)
+ QWORD TimeReference; // first sample count since midnight (little-endian)
+ WORD Version; // BWF version (little-endian)
+ BYTE UMID[64]; // SMPTE UMID
+ BYTE Reserved[190];
+#if defined(__GNUC__) && __GNUC__<3
+ char CodingHistory[0]; // history
+#elif 1 // change to 0 if compiler fails the following line
+ char CodingHistory[]; // history
+#else
+ char CodingHistory[1]; // history
+#endif
+} TAG_BEXT;
#pragma pack(pop)
// BWF "cart" tag structures
-typedef struct {
- DWORD dwUsage; // FOURCC timer usage ID
- DWORD dwValue; // timer value in samples from head
+typedef struct
+{
+ DWORD dwUsage; // FOURCC timer usage ID
+ DWORD dwValue; // timer value in samples from head
} TAG_CART_TIMER;
-typedef struct {
- char Version[4]; // version of the data structure
- char Title[64]; // title of cart audio sequence
- char Artist[64]; // artist or creator name
- char CutID[64]; // cut number identification
- char ClientID[64]; // client identification
- char Category[64]; // category ID, PSA, NEWS, etc
- char Classification[64]; // classification or auxiliary key
- char OutCue[64]; // out cue text
- char StartDate[10]; // yyyy-mm-dd
- char StartTime[8]; // hh:mm:ss
- char EndDate[10]; // yyyy-mm-dd
- char EndTime[8]; // hh:mm:ss
- char ProducerAppID[64]; // name of vendor or application
- char ProducerAppVersion[64]; // version of producer application
- char UserDef[64]; // user defined text
- DWORD dwLevelReference; // sample value for 0 dB reference
- TAG_CART_TIMER PostTimer[8]; // 8 time markers after head
- char Reserved[276];
- char URL[1024]; // uniform resource locator
-#if defined(__GNUC__) && __GNUC__ < 3
- char TagText[0]; // free form text for scripts or tags
-#elif 1 // change to 0 if compiler fails the following line
- char TagText[]; // free form text for scripts or tags
+typedef struct
+{
+ char Version[4]; // version of the data structure
+ char Title[64]; // title of cart audio sequence
+ char Artist[64]; // artist or creator name
+ char CutID[64]; // cut number identification
+ char ClientID[64]; // client identification
+ char Category[64]; // category ID, PSA, NEWS, etc
+ char Classification[64]; // classification or auxiliary key
+ char OutCue[64]; // out cue text
+ char StartDate[10]; // yyyy-mm-dd
+ char StartTime[8]; // hh:mm:ss
+ char EndDate[10]; // yyyy-mm-dd
+ char EndTime[8]; // hh:mm:ss
+ char ProducerAppID[64]; // name of vendor or application
+ char ProducerAppVersion[64]; // version of producer application
+ char UserDef[64]; // user defined text
+ DWORD dwLevelReference; // sample value for 0 dB reference
+ TAG_CART_TIMER PostTimer[8]; // 8 time markers after head
+ char Reserved[276];
+ char URL[1024]; // uniform resource locator
+#if defined(__GNUC__) && __GNUC__<3
+ char TagText[0]; // free form text for scripts or tags
+#elif 1 // change to 0 if compiler fails the following line
+ char TagText[]; // free form text for scripts or tags
#else
- char TagText[1]; // free form text for scripts or tags
+ char TagText[1]; // free form text for scripts or tags
#endif
} TAG_CART;
// RIFF "cue " tag structures
-typedef struct {
- DWORD dwName;
- DWORD dwPosition;
- DWORD fccChunk;
- DWORD dwChunkStart;
- DWORD dwBlockStart;
- DWORD dwSampleOffset;
+typedef struct
+{
+ DWORD dwName;
+ DWORD dwPosition;
+ DWORD fccChunk;
+ DWORD dwChunkStart;
+ DWORD dwBlockStart;
+ DWORD dwSampleOffset;
} TAG_CUE_POINT;
-typedef struct {
- DWORD dwCuePoints;
-#if defined(__GNUC__) && __GNUC__ < 3
- TAG_CUE_POINT CuePoints[0];
+typedef struct
+{
+ DWORD dwCuePoints;
+#if defined(__GNUC__) && __GNUC__<3
+ TAG_CUE_POINT CuePoints[0];
#elif 1 // change to 0 if compiler fails the following line
- TAG_CUE_POINT CuePoints[];
+ TAG_CUE_POINT CuePoints[];
#else
- TAG_CUE_POINT CuePoints[1];
+ TAG_CUE_POINT CuePoints[1];
#endif
} TAG_CUE;
// RIFF "smpl" tag structures
-typedef struct {
- DWORD dwIdentifier;
- DWORD dwType;
- DWORD dwStart;
- DWORD dwEnd;
- DWORD dwFraction;
- DWORD dwPlayCount;
+typedef struct
+{
+ DWORD dwIdentifier;
+ DWORD dwType;
+ DWORD dwStart;
+ DWORD dwEnd;
+ DWORD dwFraction;
+ DWORD dwPlayCount;
} TAG_SMPL_LOOP;
-typedef struct {
- DWORD dwManufacturer;
- DWORD dwProduct;
- DWORD dwSamplePeriod;
- DWORD dwMIDIUnityNote;
- DWORD dwMIDIPitchFraction;
- DWORD dwSMPTEFormat;
- DWORD dwSMPTEOffset;
- DWORD cSampleLoops;
- DWORD cbSamplerData;
-#if defined(__GNUC__) && __GNUC__ < 3
- TAG_SMPL_LOOP SampleLoops[0];
+typedef struct
+{
+ DWORD dwManufacturer;
+ DWORD dwProduct;
+ DWORD dwSamplePeriod;
+ DWORD dwMIDIUnityNote;
+ DWORD dwMIDIPitchFraction;
+ DWORD dwSMPTEFormat;
+ DWORD dwSMPTEOffset;
+ DWORD cSampleLoops;
+ DWORD cbSamplerData;
+#if defined(__GNUC__) && __GNUC__<3
+ TAG_SMPL_LOOP SampleLoops[0];
#elif 1 // change to 0 if compiler fails the following line
- TAG_SMPL_LOOP SampleLoops[];
+ TAG_SMPL_LOOP SampleLoops[];
#else
- TAG_SMPL_LOOP SampleLoops[1];
+ TAG_SMPL_LOOP SampleLoops[1];
#endif
} TAG_SMPL;
#ifdef _MSC_VER
#pragma warning(pop)
#endif
-// CoreAudio codec info structure
-typedef struct {
- DWORD ftype; // file format
- DWORD atype; // audio format
- const char *name; // description
-} TAG_CA_CODEC;
-
+// CoreAudio codec info structure
+typedef struct {
+ DWORD ftype; // file format
+ DWORD atype; // audio format
+ const char *name; // description
+} TAG_CA_CODEC;
+
#ifndef _WAVEFORMATEX_
#define _WAVEFORMATEX_
-#pragma pack(push, 1)
-typedef struct tWAVEFORMATEX {
- WORD wFormatTag;
- WORD nChannels;
- DWORD nSamplesPerSec;
- DWORD nAvgBytesPerSec;
- WORD nBlockAlign;
- WORD wBitsPerSample;
- WORD cbSize;
+#pragma pack(push,1)
+typedef struct tWAVEFORMATEX
+{
+ WORD wFormatTag;
+ WORD nChannels;
+ DWORD nSamplesPerSec;
+ DWORD nAvgBytesPerSec;
+ WORD nBlockAlign;
+ WORD wBitsPerSample;
+ WORD cbSize;
} WAVEFORMATEX, *PWAVEFORMATEX, *LPWAVEFORMATEX;
typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
#pragma pack(pop)
#endif
-// BASS_ChannelGetLength/GetPosition/SetPosition modes
-#define BASS_POS_BYTE 0 // byte position
-#define BASS_POS_MUSIC_ORDER 1 // order.row position, MAKELONG(order,row)
-#define BASS_POS_OGG 3 // OGG bitstream number
-#define BASS_POS_RESET 0x2000000 // flag: reset user file buffers
-#define BASS_POS_RELATIVE \
- 0x4000000 // flag: seek relative to the current position
-#define BASS_POS_INEXACT 0x8000000 // flag: allow seeking to inexact position
-#define BASS_POS_DECODE \
- 0x10000000 // flag: get the decoding (not playing) position
-#define BASS_POS_DECODETO \
- 0x20000000 // flag: decode to the position instead of seeking
-#define BASS_POS_SCAN 0x40000000 // flag: scan to the position
+// BASS_ChannelGetLength/GetPosition/SetPosition modes
+#define BASS_POS_BYTE 0 // byte position
+#define BASS_POS_MUSIC_ORDER 1 // order.row position, MAKELONG(order,row)
+#define BASS_POS_OGG 3 // OGG bitstream number
+#define BASS_POS_RESET 0x2000000 // flag: reset user file buffers
+#define BASS_POS_RELATIVE 0x4000000 // flag: seek relative to the current position
+#define BASS_POS_INEXACT 0x8000000 // flag: allow seeking to inexact position
+#define BASS_POS_DECODE 0x10000000 // flag: get the decoding (not playing) position
+#define BASS_POS_DECODETO 0x20000000 // flag: decode to the position instead of seeking
+#define BASS_POS_SCAN 0x40000000 // flag: scan to the position
+
+// BASS_ChannelSetDevice/GetDevice option
+#define BASS_NODEVICE 0x20000
+
+// BASS_RecordSetInput flags
+#define BASS_INPUT_OFF 0x10000
+#define BASS_INPUT_ON 0x20000
+
+#define BASS_INPUT_TYPE_MASK 0xff000000
+#define BASS_INPUT_TYPE_UNDEF 0x00000000
+#define BASS_INPUT_TYPE_DIGITAL 0x01000000
+#define BASS_INPUT_TYPE_LINE 0x02000000
+#define BASS_INPUT_TYPE_MIC 0x03000000
+#define BASS_INPUT_TYPE_SYNTH 0x04000000
+#define BASS_INPUT_TYPE_CD 0x05000000
+#define BASS_INPUT_TYPE_PHONE 0x06000000
+#define BASS_INPUT_TYPE_SPEAKER 0x07000000
+#define BASS_INPUT_TYPE_WAVE 0x08000000
+#define BASS_INPUT_TYPE_AUX 0x09000000
+#define BASS_INPUT_TYPE_ANALOG 0x0a000000
+
+// BASS_ChannelSetFX effect types
+#define BASS_FX_DX8_CHORUS 0
+#define BASS_FX_DX8_COMPRESSOR 1
+#define BASS_FX_DX8_DISTORTION 2
+#define BASS_FX_DX8_ECHO 3
+#define BASS_FX_DX8_FLANGER 4
+#define BASS_FX_DX8_GARGLE 5
+#define BASS_FX_DX8_I3DL2REVERB 6
+#define BASS_FX_DX8_PARAMEQ 7
+#define BASS_FX_DX8_REVERB 8
+#define BASS_FX_VOLUME 9
+
+typedef struct {
+ float fWetDryMix;
+ float fDepth;
+ float fFeedback;
+ float fFrequency;
+ DWORD lWaveform; // 0=triangle, 1=sine
+ float fDelay;
+ DWORD lPhase; // BASS_DX8_PHASE_xxx
+} BASS_DX8_CHORUS;
+
+typedef struct {
+ float fGain;
+ float fAttack;
+ float fRelease;
+ float fThreshold;
+ float fRatio;
+ float fPredelay;
+} BASS_DX8_COMPRESSOR;
+
+typedef struct {
+ float fGain;
+ float fEdge;
+ float fPostEQCenterFrequency;
+ float fPostEQBandwidth;
+ float fPreLowpassCutoff;
+} BASS_DX8_DISTORTION;
+
+typedef struct {
+ float fWetDryMix;
+ float fFeedback;
+ float fLeftDelay;
+ float fRightDelay;
+ BOOL lPanDelay;
+} BASS_DX8_ECHO;
+
+typedef struct {
+ float fWetDryMix;
+ float fDepth;
+ float fFeedback;
+ float fFrequency;
+ DWORD lWaveform; // 0=triangle, 1=sine
+ float fDelay;
+ DWORD lPhase; // BASS_DX8_PHASE_xxx
+} BASS_DX8_FLANGER;
+
+typedef struct {
+ DWORD dwRateHz; // Rate of modulation in hz
+ DWORD dwWaveShape; // 0=triangle, 1=square
+} BASS_DX8_GARGLE;
+
+typedef struct {
+ int lRoom; // [-10000, 0] default: -1000 mB
+ int lRoomHF; // [-10000, 0] default: 0 mB
+ float flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
+ float flDecayTime; // [0.1, 20.0] default: 1.49s
+ float flDecayHFRatio; // [0.1, 2.0] default: 0.83
+ int lReflections; // [-10000, 1000] default: -2602 mB
+ float flReflectionsDelay; // [0.0, 0.3] default: 0.007 s
+ int lReverb; // [-10000, 2000] default: 200 mB
+ float flReverbDelay; // [0.0, 0.1] default: 0.011 s
+ float flDiffusion; // [0.0, 100.0] default: 100.0 %
+ float flDensity; // [0.0, 100.0] default: 100.0 %
+ float flHFReference; // [20.0, 20000.0] default: 5000.0 Hz
+} BASS_DX8_I3DL2REVERB;
+
+typedef struct {
+ float fCenter;
+ float fBandwidth;
+ float fGain;
+} BASS_DX8_PARAMEQ;
+
+typedef struct {
+ float fInGain; // [-96.0,0.0] default: 0.0 dB
+ float fReverbMix; // [-96.0,0.0] default: 0.0 db
+ float fReverbTime; // [0.001,3000.0] default: 1000.0 ms
+ float fHighFreqRTRatio; // [0.001,0.999] default: 0.001
+} BASS_DX8_REVERB;
+
+#define BASS_DX8_PHASE_NEG_180 0
+#define BASS_DX8_PHASE_NEG_90 1
+#define BASS_DX8_PHASE_ZERO 2
+#define BASS_DX8_PHASE_90 3
+#define BASS_DX8_PHASE_180 4
-// BASS_ChannelSetDevice/GetDevice option
-#define BASS_NODEVICE 0x20000
+typedef struct {
+ float fTarget;
+ float fCurrent;
+ float fTime;
+ DWORD lCurve;
+} BASS_FX_VOLUME_PARAM;
-// BASS_RecordSetInput flags
-#define BASS_INPUT_OFF 0x10000
-#define BASS_INPUT_ON 0x20000
-
-#define BASS_INPUT_TYPE_MASK 0xff000000
-#define BASS_INPUT_TYPE_UNDEF 0x00000000
-#define BASS_INPUT_TYPE_DIGITAL 0x01000000
-#define BASS_INPUT_TYPE_LINE 0x02000000
-#define BASS_INPUT_TYPE_MIC 0x03000000
-#define BASS_INPUT_TYPE_SYNTH 0x04000000
-#define BASS_INPUT_TYPE_CD 0x05000000
-#define BASS_INPUT_TYPE_PHONE 0x06000000
-#define BASS_INPUT_TYPE_SPEAKER 0x07000000
-#define BASS_INPUT_TYPE_WAVE 0x08000000
-#define BASS_INPUT_TYPE_AUX 0x09000000
-#define BASS_INPUT_TYPE_ANALOG 0x0a000000
-
-// BASS_ChannelSetFX effect types
-#define BASS_FX_DX8_CHORUS 0
-#define BASS_FX_DX8_COMPRESSOR 1
-#define BASS_FX_DX8_DISTORTION 2
-#define BASS_FX_DX8_ECHO 3
-#define BASS_FX_DX8_FLANGER 4
-#define BASS_FX_DX8_GARGLE 5
-#define BASS_FX_DX8_I3DL2REVERB 6
-#define BASS_FX_DX8_PARAMEQ 7
-#define BASS_FX_DX8_REVERB 8
-#define BASS_FX_VOLUME 9
-
-typedef struct {
- float fWetDryMix;
- float fDepth;
- float fFeedback;
- float fFrequency;
- DWORD lWaveform; // 0=triangle, 1=sine
- float fDelay;
- DWORD lPhase; // BASS_DX8_PHASE_xxx
-} BASS_DX8_CHORUS;
-
-typedef struct {
- float fGain;
- float fAttack;
- float fRelease;
- float fThreshold;
- float fRatio;
- float fPredelay;
-} BASS_DX8_COMPRESSOR;
-
-typedef struct {
- float fGain;
- float fEdge;
- float fPostEQCenterFrequency;
- float fPostEQBandwidth;
- float fPreLowpassCutoff;
-} BASS_DX8_DISTORTION;
-
-typedef struct {
- float fWetDryMix;
- float fFeedback;
- float fLeftDelay;
- float fRightDelay;
- BOOL lPanDelay;
-} BASS_DX8_ECHO;
-
-typedef struct {
- float fWetDryMix;
- float fDepth;
- float fFeedback;
- float fFrequency;
- DWORD lWaveform; // 0=triangle, 1=sine
- float fDelay;
- DWORD lPhase; // BASS_DX8_PHASE_xxx
-} BASS_DX8_FLANGER;
-
-typedef struct {
- DWORD dwRateHz; // Rate of modulation in hz
- DWORD dwWaveShape; // 0=triangle, 1=square
-} BASS_DX8_GARGLE;
-
-typedef struct {
- int lRoom; // [-10000, 0] default: -1000 mB
- int lRoomHF; // [-10000, 0] default: 0 mB
- float flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
- float flDecayTime; // [0.1, 20.0] default: 1.49s
- float flDecayHFRatio; // [0.1, 2.0] default: 0.83
- int lReflections; // [-10000, 1000] default: -2602 mB
- float flReflectionsDelay; // [0.0, 0.3] default: 0.007 s
- int lReverb; // [-10000, 2000] default: 200 mB
- float flReverbDelay; // [0.0, 0.1] default: 0.011 s
- float flDiffusion; // [0.0, 100.0] default: 100.0 %
- float flDensity; // [0.0, 100.0] default: 100.0 %
- float flHFReference; // [20.0, 20000.0] default: 5000.0 Hz
-} BASS_DX8_I3DL2REVERB;
-
-typedef struct {
- float fCenter;
- float fBandwidth;
- float fGain;
-} BASS_DX8_PARAMEQ;
-
-typedef struct {
- float fInGain; // [-96.0,0.0] default: 0.0 dB
- float fReverbMix; // [-96.0,0.0] default: 0.0 db
- float fReverbTime; // [0.001,3000.0] default: 1000.0 ms
- float fHighFreqRTRatio; // [0.001,0.999] default: 0.001
-} BASS_DX8_REVERB;
-
-#define BASS_DX8_PHASE_NEG_180 0
-#define BASS_DX8_PHASE_NEG_90 1
-#define BASS_DX8_PHASE_ZERO 2
-#define BASS_DX8_PHASE_90 3
-#define BASS_DX8_PHASE_180 4
-
-typedef struct {
- float fTarget;
- float fCurrent;
- float fTime;
- DWORD lCurve;
-} BASS_FX_VOLUME_PARAM;
-
-typedef void(CALLBACK IOSNOTIFYPROC)(DWORD status);
+typedef void (CALLBACK IOSNOTIFYPROC)(DWORD status);
/* iOS notification callback function.
status : The notification (BASS_IOSNOTIFY_xxx) */
-#define BASS_IOSNOTIFY_INTERRUPT 1 // interruption started
-#define BASS_IOSNOTIFY_INTERRUPT_END 2 // interruption ended
+#define BASS_IOSNOTIFY_INTERRUPT 1 // interruption started
+#define BASS_IOSNOTIFY_INTERRUPT_END 2 // interruption ended
+
+BOOL BASSDEF(BASS_SetConfig)(DWORD option, DWORD value);
+DWORD BASSDEF(BASS_GetConfig)(DWORD option);
+BOOL BASSDEF(BASS_SetConfigPtr)(DWORD option, const void *value);
+void *BASSDEF(BASS_GetConfigPtr)(DWORD option);
+DWORD BASSDEF(BASS_GetVersion)();
+int BASSDEF(BASS_ErrorGetCode)();
+BOOL BASSDEF(BASS_GetDeviceInfo)(DWORD device, BASS_DEVICEINFO *info);
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !(WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
+BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, HWND win, const GUID *dsguid);
+#else
+BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, void *win, void *dsguid);
+#endif
+BOOL BASSDEF(BASS_SetDevice)(DWORD device);
+DWORD BASSDEF(BASS_GetDevice)();
+BOOL BASSDEF(BASS_Free)();
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !(WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
+void *BASSDEF(BASS_GetDSoundObject)(DWORD object);
+#endif
+BOOL BASSDEF(BASS_GetInfo)(BASS_INFO *info);
+BOOL BASSDEF(BASS_Update)(DWORD length);
+float BASSDEF(BASS_GetCPU)();
+BOOL BASSDEF(BASS_Start)();
+BOOL BASSDEF(BASS_Stop)();
+BOOL BASSDEF(BASS_Pause)();
+BOOL BASSDEF(BASS_SetVolume)(float volume);
+float BASSDEF(BASS_GetVolume)();
+
+HPLUGIN BASSDEF(BASS_PluginLoad)(const char *file, DWORD flags);
+BOOL BASSDEF(BASS_PluginFree)(HPLUGIN handle);
+const BASS_PLUGININFO *BASSDEF(BASS_PluginGetInfo)(HPLUGIN handle);
+
+BOOL BASSDEF(BASS_Set3DFactors)(float distf, float rollf, float doppf);
+BOOL BASSDEF(BASS_Get3DFactors)(float *distf, float *rollf, float *doppf);
+BOOL BASSDEF(BASS_Set3DPosition)(const BASS_3DVECTOR *pos, const BASS_3DVECTOR *vel, const BASS_3DVECTOR *front, const BASS_3DVECTOR *top);
+BOOL BASSDEF(BASS_Get3DPosition)(BASS_3DVECTOR *pos, BASS_3DVECTOR *vel, BASS_3DVECTOR *front, BASS_3DVECTOR *top);
+void BASSDEF(BASS_Apply3D)();
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !(WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
+BOOL BASSDEF(BASS_SetEAXParameters)(int env, float vol, float decay, float damp);
+BOOL BASSDEF(BASS_GetEAXParameters)(DWORD *env, float *vol, float *decay, float *damp);
+#endif
+
+HMUSIC BASSDEF(BASS_MusicLoad)(BOOL mem, const void *file, QWORD offset, DWORD length, DWORD flags, DWORD freq);
+BOOL BASSDEF(BASS_MusicFree)(HMUSIC handle);
+
+HSAMPLE BASSDEF(BASS_SampleLoad)(BOOL mem, const void *file, QWORD offset, DWORD length, DWORD max, DWORD flags);
+HSAMPLE BASSDEF(BASS_SampleCreate)(DWORD length, DWORD freq, DWORD chans, DWORD max, DWORD flags);
+BOOL BASSDEF(BASS_SampleFree)(HSAMPLE handle);
+BOOL BASSDEF(BASS_SampleSetData)(HSAMPLE handle, const void *buffer);
+BOOL BASSDEF(BASS_SampleGetData)(HSAMPLE handle, void *buffer);
+BOOL BASSDEF(BASS_SampleGetInfo)(HSAMPLE handle, BASS_SAMPLE *info);
+BOOL BASSDEF(BASS_SampleSetInfo)(HSAMPLE handle, const BASS_SAMPLE *info);
+HCHANNEL BASSDEF(BASS_SampleGetChannel)(HSAMPLE handle, BOOL onlynew);
+DWORD BASSDEF(BASS_SampleGetChannels)(HSAMPLE handle, HCHANNEL *channels);
+BOOL BASSDEF(BASS_SampleStop)(HSAMPLE handle);
+
+HSTREAM BASSDEF(BASS_StreamCreate)(DWORD freq, DWORD chans, DWORD flags, STREAMPROC *proc, void *user);
+HSTREAM BASSDEF(BASS_StreamCreateFile)(BOOL mem, const void *file, QWORD offset, QWORD length, DWORD flags);
+HSTREAM BASSDEF(BASS_StreamCreateURL)(const char *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user);
+HSTREAM BASSDEF(BASS_StreamCreateFileUser)(DWORD system, DWORD flags, const BASS_FILEPROCS *proc, void *user);
+BOOL BASSDEF(BASS_StreamFree)(HSTREAM handle);
+QWORD BASSDEF(BASS_StreamGetFilePosition)(HSTREAM handle, DWORD mode);
+DWORD BASSDEF(BASS_StreamPutData)(HSTREAM handle, const void *buffer, DWORD length);
+DWORD BASSDEF(BASS_StreamPutFileData)(HSTREAM handle, const void *buffer, DWORD length);
+
+BOOL BASSDEF(BASS_RecordGetDeviceInfo)(DWORD device, BASS_DEVICEINFO *info);
+BOOL BASSDEF(BASS_RecordInit)(int device);
+BOOL BASSDEF(BASS_RecordSetDevice)(DWORD device);
+DWORD BASSDEF(BASS_RecordGetDevice)();
+BOOL BASSDEF(BASS_RecordFree)();
+BOOL BASSDEF(BASS_RecordGetInfo)(BASS_RECORDINFO *info);
+const char *BASSDEF(BASS_RecordGetInputName)(int input);
+BOOL BASSDEF(BASS_RecordSetInput)(int input, DWORD flags, float volume);
+DWORD BASSDEF(BASS_RecordGetInput)(int input, float *volume);
+HRECORD BASSDEF(BASS_RecordStart)(DWORD freq, DWORD chans, DWORD flags, RECORDPROC *proc, void *user);
+
+double BASSDEF(BASS_ChannelBytes2Seconds)(DWORD handle, QWORD pos);
+QWORD BASSDEF(BASS_ChannelSeconds2Bytes)(DWORD handle, double pos);
+DWORD BASSDEF(BASS_ChannelGetDevice)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelSetDevice)(DWORD handle, DWORD device);
+DWORD BASSDEF(BASS_ChannelIsActive)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelGetInfo)(DWORD handle, BASS_CHANNELINFO *info);
+const char *BASSDEF(BASS_ChannelGetTags)(DWORD handle, DWORD tags);
+DWORD BASSDEF(BASS_ChannelFlags)(DWORD handle, DWORD flags, DWORD mask);
+BOOL BASSDEF(BASS_ChannelUpdate)(DWORD handle, DWORD length);
+BOOL BASSDEF(BASS_ChannelLock)(DWORD handle, BOOL lock);
+BOOL BASSDEF(BASS_ChannelPlay)(DWORD handle, BOOL restart);
+BOOL BASSDEF(BASS_ChannelStop)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelPause)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelSetAttribute)(DWORD handle, DWORD attrib, float value);
+BOOL BASSDEF(BASS_ChannelGetAttribute)(DWORD handle, DWORD attrib, float *value);
+BOOL BASSDEF(BASS_ChannelSlideAttribute)(DWORD handle, DWORD attrib, float value, DWORD time);
+BOOL BASSDEF(BASS_ChannelIsSliding)(DWORD handle, DWORD attrib);
+BOOL BASSDEF(BASS_ChannelSetAttributeEx)(DWORD handle, DWORD attrib, void *value, DWORD size);
+DWORD BASSDEF(BASS_ChannelGetAttributeEx)(DWORD handle, DWORD attrib, void *value, DWORD size);
+BOOL BASSDEF(BASS_ChannelSet3DAttributes)(DWORD handle, int mode, float min, float max, int iangle, int oangle, float outvol);
+BOOL BASSDEF(BASS_ChannelGet3DAttributes)(DWORD handle, DWORD *mode, float *min, float *max, DWORD *iangle, DWORD *oangle, float *outvol);
+BOOL BASSDEF(BASS_ChannelSet3DPosition)(DWORD handle, const BASS_3DVECTOR *pos, const BASS_3DVECTOR *orient, const BASS_3DVECTOR *vel);
+BOOL BASSDEF(BASS_ChannelGet3DPosition)(DWORD handle, BASS_3DVECTOR *pos, BASS_3DVECTOR *orient, BASS_3DVECTOR *vel);
+QWORD BASSDEF(BASS_ChannelGetLength)(DWORD handle, DWORD mode);
+BOOL BASSDEF(BASS_ChannelSetPosition)(DWORD handle, QWORD pos, DWORD mode);
+QWORD BASSDEF(BASS_ChannelGetPosition)(DWORD handle, DWORD mode);
+DWORD BASSDEF(BASS_ChannelGetLevel)(DWORD handle);
+BOOL BASSDEF(BASS_ChannelGetLevelEx)(DWORD handle, float *levels, float length, DWORD flags);
+DWORD BASSDEF(BASS_ChannelGetData)(DWORD handle, void *buffer, DWORD length);
+HSYNC BASSDEF(BASS_ChannelSetSync)(DWORD handle, DWORD type, QWORD param, SYNCPROC *proc, void *user);
+BOOL BASSDEF(BASS_ChannelRemoveSync)(DWORD handle, HSYNC sync);
+HDSP BASSDEF(BASS_ChannelSetDSP)(DWORD handle, DSPPROC *proc, void *user, int priority);
+BOOL BASSDEF(BASS_ChannelRemoveDSP)(DWORD handle, HDSP dsp);
+BOOL BASSDEF(BASS_ChannelSetLink)(DWORD handle, DWORD chan);
+BOOL BASSDEF(BASS_ChannelRemoveLink)(DWORD handle, DWORD chan);
+HFX BASSDEF(BASS_ChannelSetFX)(DWORD handle, DWORD type, int priority);
+BOOL BASSDEF(BASS_ChannelRemoveFX)(DWORD handle, HFX fx);
+
+BOOL BASSDEF(BASS_FXSetParameters)(HFX handle, const void *params);
+BOOL BASSDEF(BASS_FXGetParameters)(HFX handle, void *params);
+BOOL BASSDEF(BASS_FXReset)(HFX handle);
+BOOL BASSDEF(BASS_FXSetPriority)(HFX handle, int priority);
-BOOL BASSDEF(BASS_SetConfig)(DWORD option, DWORD value);
-DWORD BASSDEF(BASS_GetConfig)(DWORD option);
-BOOL BASSDEF(BASS_SetConfigPtr)(DWORD option, const void *value);
-void *BASSDEF(BASS_GetConfigPtr)(DWORD option);
-DWORD BASSDEF(BASS_GetVersion)();
-int BASSDEF(BASS_ErrorGetCode)();
-BOOL BASSDEF(BASS_GetDeviceInfo)(DWORD device, BASS_DEVICEINFO *info);
-#if defined(_WIN32) && !defined(_WIN32_WCE) && \
- !(WINAPI_FAMILY && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
-BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, HWND win,
- const GUID *dsguid);
-#else
-BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, void *win,
- void *dsguid);
-#endif
-BOOL BASSDEF(BASS_SetDevice)(DWORD device);
-DWORD BASSDEF(BASS_GetDevice)();
-BOOL BASSDEF(BASS_Free)();
-#if defined(_WIN32) && !defined(_WIN32_WCE) && \
- !(WINAPI_FAMILY && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
-void *BASSDEF(BASS_GetDSoundObject)(DWORD object);
-#endif
-BOOL BASSDEF(BASS_GetInfo)(BASS_INFO *info);
-BOOL BASSDEF(BASS_Update)(DWORD length);
-float BASSDEF(BASS_GetCPU)();
-BOOL BASSDEF(BASS_Start)();
-BOOL BASSDEF(BASS_Stop)();
-BOOL BASSDEF(BASS_Pause)();
-BOOL BASSDEF(BASS_SetVolume)(float volume);
-float BASSDEF(BASS_GetVolume)();
-
-HPLUGIN BASSDEF(BASS_PluginLoad)(const char *file, DWORD flags);
-BOOL BASSDEF(BASS_PluginFree)(HPLUGIN handle);
-const BASS_PLUGININFO *BASSDEF(BASS_PluginGetInfo)(HPLUGIN handle);
-
-BOOL BASSDEF(BASS_Set3DFactors)(float distf, float rollf, float doppf);
-BOOL BASSDEF(BASS_Get3DFactors)(float *distf, float *rollf, float *doppf);
-BOOL BASSDEF(BASS_Set3DPosition)(const BASS_3DVECTOR *pos,
- const BASS_3DVECTOR *vel,
- const BASS_3DVECTOR *front,
- const BASS_3DVECTOR *top);
-BOOL BASSDEF(BASS_Get3DPosition)(BASS_3DVECTOR *pos, BASS_3DVECTOR *vel,
- BASS_3DVECTOR *front, BASS_3DVECTOR *top);
-void BASSDEF(BASS_Apply3D)();
-#if defined(_WIN32) && !defined(_WIN32_WCE) && \
- !(WINAPI_FAMILY && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
-BOOL BASSDEF(BASS_SetEAXParameters)(int env, float vol, float decay,
- float damp);
-BOOL BASSDEF(BASS_GetEAXParameters)(DWORD *env, float *vol, float *decay,
- float *damp);
-#endif
-
-HMUSIC BASSDEF(BASS_MusicLoad)(BOOL mem, const void *file, QWORD offset,
- DWORD length, DWORD flags, DWORD freq);
-BOOL BASSDEF(BASS_MusicFree)(HMUSIC handle);
-
-HSAMPLE BASSDEF(BASS_SampleLoad)(BOOL mem, const void *file, QWORD offset,
- DWORD length, DWORD max, DWORD flags);
-HSAMPLE BASSDEF(BASS_SampleCreate)(DWORD length, DWORD freq, DWORD chans,
- DWORD max, DWORD flags);
-BOOL BASSDEF(BASS_SampleFree)(HSAMPLE handle);
-BOOL BASSDEF(BASS_SampleSetData)(HSAMPLE handle, const void *buffer);
-BOOL BASSDEF(BASS_SampleGetData)(HSAMPLE handle, void *buffer);
-BOOL BASSDEF(BASS_SampleGetInfo)(HSAMPLE handle, BASS_SAMPLE *info);
-BOOL BASSDEF(BASS_SampleSetInfo)(HSAMPLE handle, const BASS_SAMPLE *info);
-HCHANNEL BASSDEF(BASS_SampleGetChannel)(HSAMPLE handle, BOOL onlynew);
-DWORD BASSDEF(BASS_SampleGetChannels)(HSAMPLE handle, HCHANNEL *channels);
-BOOL BASSDEF(BASS_SampleStop)(HSAMPLE handle);
-
-HSTREAM BASSDEF(BASS_StreamCreate)(DWORD freq, DWORD chans, DWORD flags,
- STREAMPROC *proc, void *user);
-HSTREAM BASSDEF(BASS_StreamCreateFile)(BOOL mem, const void *file, QWORD offset,
- QWORD length, DWORD flags);
-HSTREAM BASSDEF(BASS_StreamCreateURL)(const char *url, DWORD offset,
- DWORD flags, DOWNLOADPROC *proc,
- void *user);
-HSTREAM BASSDEF(BASS_StreamCreateFileUser)(DWORD system, DWORD flags,
- const BASS_FILEPROCS *proc,
- void *user);
-BOOL BASSDEF(BASS_StreamFree)(HSTREAM handle);
-QWORD BASSDEF(BASS_StreamGetFilePosition)(HSTREAM handle, DWORD mode);
-DWORD BASSDEF(BASS_StreamPutData)(HSTREAM handle, const void *buffer,
- DWORD length);
-DWORD BASSDEF(BASS_StreamPutFileData)(HSTREAM handle, const void *buffer,
- DWORD length);
-
-BOOL BASSDEF(BASS_RecordGetDeviceInfo)(DWORD device, BASS_DEVICEINFO *info);
-BOOL BASSDEF(BASS_RecordInit)(int device);
-BOOL BASSDEF(BASS_RecordSetDevice)(DWORD device);
-DWORD BASSDEF(BASS_RecordGetDevice)();
-BOOL BASSDEF(BASS_RecordFree)();
-BOOL BASSDEF(BASS_RecordGetInfo)(BASS_RECORDINFO *info);
-const char *BASSDEF(BASS_RecordGetInputName)(int input);
-BOOL BASSDEF(BASS_RecordSetInput)(int input, DWORD flags, float volume);
-DWORD BASSDEF(BASS_RecordGetInput)(int input, float *volume);
-HRECORD BASSDEF(BASS_RecordStart)(DWORD freq, DWORD chans, DWORD flags,
- RECORDPROC *proc, void *user);
-
-double BASSDEF(BASS_ChannelBytes2Seconds)(DWORD handle, QWORD pos);
-QWORD BASSDEF(BASS_ChannelSeconds2Bytes)(DWORD handle, double pos);
-DWORD BASSDEF(BASS_ChannelGetDevice)(DWORD handle);
-BOOL BASSDEF(BASS_ChannelSetDevice)(DWORD handle, DWORD device);
-DWORD BASSDEF(BASS_ChannelIsActive)(DWORD handle);
-BOOL BASSDEF(BASS_ChannelGetInfo)(DWORD handle, BASS_CHANNELINFO *info);
-const char *BASSDEF(BASS_ChannelGetTags)(DWORD handle, DWORD tags);
-DWORD BASSDEF(BASS_ChannelFlags)(DWORD handle, DWORD flags, DWORD mask);
-BOOL BASSDEF(BASS_ChannelUpdate)(DWORD handle, DWORD length);
-BOOL BASSDEF(BASS_ChannelLock)(DWORD handle, BOOL lock);
-BOOL BASSDEF(BASS_ChannelPlay)(DWORD handle, BOOL restart);
-BOOL BASSDEF(BASS_ChannelStop)(DWORD handle);
-BOOL BASSDEF(BASS_ChannelPause)(DWORD handle);
-BOOL BASSDEF(BASS_ChannelSetAttribute)(DWORD handle, DWORD attrib, float value);
-BOOL BASSDEF(BASS_ChannelGetAttribute)(DWORD handle, DWORD attrib,
- float *value);
-BOOL BASSDEF(BASS_ChannelSlideAttribute)(DWORD handle, DWORD attrib,
- float value, DWORD time);
-BOOL BASSDEF(BASS_ChannelIsSliding)(DWORD handle, DWORD attrib);
-BOOL BASSDEF(BASS_ChannelSetAttributeEx)(DWORD handle, DWORD attrib,
- void *value, DWORD size);
-DWORD BASSDEF(BASS_ChannelGetAttributeEx)(DWORD handle, DWORD attrib,
- void *value, DWORD size);
-BOOL BASSDEF(BASS_ChannelSet3DAttributes)(DWORD handle, int mode, float min,
- float max, int iangle, int oangle,
- float outvol);
-BOOL BASSDEF(BASS_ChannelGet3DAttributes)(DWORD handle, DWORD *mode, float *min,
- float *max, DWORD *iangle,
- DWORD *oangle, float *outvol);
-BOOL BASSDEF(BASS_ChannelSet3DPosition)(DWORD handle, const BASS_3DVECTOR *pos,
- const BASS_3DVECTOR *orient,
- const BASS_3DVECTOR *vel);
-BOOL BASSDEF(BASS_ChannelGet3DPosition)(DWORD handle, BASS_3DVECTOR *pos,
- BASS_3DVECTOR *orient,
- BASS_3DVECTOR *vel);
-QWORD BASSDEF(BASS_ChannelGetLength)(DWORD handle, DWORD mode);
-BOOL BASSDEF(BASS_ChannelSetPosition)(DWORD handle, QWORD pos, DWORD mode);
-QWORD BASSDEF(BASS_ChannelGetPosition)(DWORD handle, DWORD mode);
-DWORD BASSDEF(BASS_ChannelGetLevel)(DWORD handle);
-BOOL BASSDEF(BASS_ChannelGetLevelEx)(DWORD handle, float *levels, float length,
- DWORD flags);
-DWORD BASSDEF(BASS_ChannelGetData)(DWORD handle, void *buffer, DWORD length);
-HSYNC BASSDEF(BASS_ChannelSetSync)(DWORD handle, DWORD type, QWORD param,
- SYNCPROC *proc, void *user);
-BOOL BASSDEF(BASS_ChannelRemoveSync)(DWORD handle, HSYNC sync);
-HDSP BASSDEF(BASS_ChannelSetDSP)(DWORD handle, DSPPROC *proc, void *user,
- int priority);
-BOOL BASSDEF(BASS_ChannelRemoveDSP)(DWORD handle, HDSP dsp);
-BOOL BASSDEF(BASS_ChannelSetLink)(DWORD handle, DWORD chan);
-BOOL BASSDEF(BASS_ChannelRemoveLink)(DWORD handle, DWORD chan);
-HFX BASSDEF(BASS_ChannelSetFX)(DWORD handle, DWORD type, int priority);
-BOOL BASSDEF(BASS_ChannelRemoveFX)(DWORD handle, HFX fx);
-
-BOOL BASSDEF(BASS_FXSetParameters)(HFX handle, const void *params);
-BOOL BASSDEF(BASS_FXGetParameters)(HFX handle, void *params);
-BOOL BASSDEF(BASS_FXReset)(HFX handle);
-BOOL BASSDEF(BASS_FXSetPriority)(HFX handle, int priority);
-
-#ifdef __cplusplus
-}
+#ifdef __cplusplus
+}
#if defined(_WIN32) && !defined(NOBASSOVERLOADS)
static inline HPLUGIN BASS_PluginLoad(const WCHAR *file, DWORD flags)
{
- return BASS_PluginLoad((const char *)file, flags | BASS_UNICODE);
+ return BASS_PluginLoad((const char*)file, flags|BASS_UNICODE);
}
-static inline HMUSIC BASS_MusicLoad(BOOL mem, const WCHAR *file, QWORD offset,
- DWORD length, DWORD flags, DWORD freq)
+static inline HMUSIC BASS_MusicLoad(BOOL mem, const WCHAR *file, QWORD offset, DWORD length, DWORD flags, DWORD freq)
{
- return BASS_MusicLoad(mem, (const void *)file, offset, length,
- flags | BASS_UNICODE, freq);
+ return BASS_MusicLoad(mem, (const void*)file, offset, length, flags|BASS_UNICODE, freq);
}
-static inline HSAMPLE BASS_SampleLoad(BOOL mem, const WCHAR *file, QWORD offset,
- DWORD length, DWORD max, DWORD flags)
+static inline HSAMPLE BASS_SampleLoad(BOOL mem, const WCHAR *file, QWORD offset, DWORD length, DWORD max, DWORD flags)
{
- return BASS_SampleLoad(mem, (const void *)file, offset, length, max,
- flags | BASS_UNICODE);
+ return BASS_SampleLoad(mem, (const void*)file, offset, length, max, flags|BASS_UNICODE);
}
-static inline HSTREAM BASS_StreamCreateFile(BOOL mem, const WCHAR *file,
- QWORD offset, QWORD length,
- DWORD flags)
+static inline HSTREAM BASS_StreamCreateFile(BOOL mem, const WCHAR *file, QWORD offset, QWORD length, DWORD flags)
{
- return BASS_StreamCreateFile(mem, (const void *)file, offset, length,
- flags | BASS_UNICODE);
+ return BASS_StreamCreateFile(mem, (const void*)file, offset, length, flags|BASS_UNICODE);
}
-static inline HSTREAM BASS_StreamCreateURL(const WCHAR *url, DWORD offset,
- DWORD flags, DOWNLOADPROC *proc,
- void *user)
+static inline HSTREAM BASS_StreamCreateURL(const WCHAR *url, DWORD offset, DWORD flags, DOWNLOADPROC *proc, void *user)
{
- return BASS_StreamCreateURL((const char *)url, offset, flags | BASS_UNICODE,
- proc, user);
+ return BASS_StreamCreateURL((const char*)url, offset, flags|BASS_UNICODE, proc, user);
}
static inline BOOL BASS_SetConfigPtr(DWORD option, const WCHAR *value)
{
- return BASS_SetConfigPtr(option | BASS_UNICODE, (const void *)value);
+ return BASS_SetConfigPtr(option|BASS_UNICODE, (const void*)value);
}
#endif
-#endif
-
-#endif
+#endif
+
+#endif
diff --git a/include/chatlogpiece.h b/include/chatlogpiece.h
index 0232666..34c5926 100644
--- a/include/chatlogpiece.h
+++ b/include/chatlogpiece.h
@@ -1,23 +1,22 @@
#ifndef CHATLOGPIECE_H
#define CHATLOGPIECE_H
-#include
#include
+#include
-class chatlogpiece {
+class chatlogpiece
+{
public:
chatlogpiece();
- chatlogpiece(QString p_name, QString p_showname, QString p_message,
- bool p_song, int color);
- chatlogpiece(QString p_name, QString p_showname, QString p_message,
- bool p_song, int color, QDateTime p_datetime);
+ chatlogpiece(QString p_name, QString p_showname, QString p_message, bool p_song);
+ chatlogpiece(QString p_name, QString p_showname, QString p_message, bool p_song, QDateTime p_datetime);
+
QString get_name();
QString get_showname();
QString get_message();
bool get_is_song();
QDateTime get_datetime();
QString get_datetime_as_string();
- int get_chat_color();
QString get_full();
@@ -27,7 +26,6 @@ private:
QString message;
QDateTime datetime;
bool is_song;
- int color;
};
#endif // CHATLOGPIECE_H
diff --git a/include/courtroom.h b/include/courtroom.h
index 396c4d7..99a090b 100644
--- a/include/courtroom.h
+++ b/include/courtroom.h
@@ -1,739 +1,668 @@
-#ifndef COURTROOM_H
-#define COURTROOM_H
-
-#include "aoapplication.h"
-#include "aoblipplayer.h"
-#include "aobutton.h"
-#include "aocharbutton.h"
-#include "aocharmovie.h"
-#include "aoemotebutton.h"
-#include "aoevidencebutton.h"
-#include "aoevidencedisplay.h"
-#include "aoimage.h"
-#include "aolineedit.h"
-#include "aomovie.h"
-#include "aomusicplayer.h"
-#include "aooptionsdialog.h"
-#include "aopacket.h"
-#include "aoscene.h"
-#include "aosfxplayer.h"
-#include "aotextarea.h"
-#include "aotextedit.h"
-#include "chatlogpiece.h"
-#include "datatypes.h"
-#include "debug_functions.h"
-#include "file_functions.h"
-#include "hardware_functions.h"
-#include "lobby.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-class AOApplication;
-class AOCharMovie;
-class Courtroom : public QMainWindow {
- Q_OBJECT
-public:
- explicit Courtroom(AOApplication *p_ao_app);
-
- void append_char(char_type p_char) { char_list.append(p_char); }
- void append_evidence(evi_type p_evi) { evidence_list.append(p_evi); }
- void append_music(QString f_music) { music_list.append(f_music); }
- void append_area(QString f_area) { area_list.append(f_area); }
- void clear_music() { music_list.clear(); }
- void clear_areas() { area_list.clear(); }
- void handle_failed_login();
- QString threading_sfx = "";
- QString threading_shake = "";
- QString threading_flash = "";
- QString threading_prefix = "";
- // cid and this may differ in cases of ini-editing
- QString current_char = "";
- int current_emote = 0;
- AOApplication *ao_app;
- // abstract widget to hold char buttons
- QWidget *ui_char_buttons;
- QVector char_list;
- QVector evidence_list;
- QVector music_list;
- QVector area_list;
- QSignalMapper *char_button_mapper;
- QVector ui_char_button_list;
- QVector ui_char_button_list_filtered;
- QLineEdit *ui_char_search;
- QCheckBox *ui_char_passworded;
- QCheckBox *ui_char_taken;
- void mt_pre_framegetter(int frameNumber);
- void mt_framegetter(int frameNumber);
- void reset_music_list() { music_list.clear(); }
-
- void arup_append(int players, QString status, QString cm, QString locked)
- {
- arup_players.append(players);
- arup_statuses.append(status);
- arup_cms.append(cm);
- arup_locks.append(locked);
- }
-
- void arup_modify(int type, int place, QString value)
- {
- if (type == 0) {
- if (arup_players.size() > place)
- arup_players[place] = value.toInt();
- }
- else if (type == 1) {
- if (arup_statuses.size() > place)
- arup_statuses[place] = value;
- }
- else if (type == 2) {
- if (arup_cms.size() > place)
- arup_cms[place] = value;
- }
- else if (type == 3) {
- if (arup_locks.size() > place)
- arup_locks[place] = value;
- }
- list_areas();
- }
-
- void character_loading_finished();
-
- // sets position of widgets based on theme ini files
- void set_widgets();
- // sets font size based on theme ini files
- void set_font(QWidget *widget, QString p_identifier);
- // helper function that calls above function on the relevant widgets
- void set_fonts();
-
- void set_window_title(QString p_title);
- QPoint get_theme_pos(QString p_identifier);
-
- // reads theme inis and sets size and pos based on the identifier
- void set_size_and_pos(QWidget *p_widget, QString p_identifier);
- // sets status as taken on character with cid n_char and places proper shading
- // on charselect
- void set_taken(int n_char, bool p_taken);
-
- // sets the current background to argument. also does some checks to see if
- // it's a legacy bg
- void set_background(QString p_background);
-
- // sets the evidence list member variable to argument
- void set_evidence_list(QVector &p_evi_list);
-
- // called when a DONE#% from the server was received
- void done_received();
-
- // sets the local mute list based on characters available on the server
- void set_mute_list();
-
- // Sets the local pair list based on the characters available on the server.
- void set_pair_list();
-
- // sets desk and bg based on pos in chatmessage
- void set_scene();
-
- // sets text color based on text color in chatmessage
- void set_text_color();
-
- // And gets the colour, too!
- QColor get_text_color(QString color);
-
- // takes in serverD-formatted IP list as prints a converted version to server
- // OOC admittedly poorly named
- void set_ip_list(QString p_list);
-
- // disables chat if current cid matches second argument
- // enables if p_muted is false
- void set_mute(bool p_muted, int p_cid);
-
- // send a message that the player is banned and quits the server
- void set_ban(int p_cid);
-
- // cid = character id, returns the cid of the currently selected character
- int get_cid() { return m_cid; }
- QString get_current_char() { return current_char; }
- QString get_current_background() { return current_background; }
-
- // set the character using an ID
- void set_character(int char_id);
-
- // properly sets up some varibles: resets user state
- void enter_courtroom(int p_cid);
-
- // helper function that populates ui_music_list with the contents of
- // music_list
- void list_music();
- void list_areas();
-
- // these are for OOC chat
- void append_ms_chatmessage(QString f_name, QString f_message);
- void append_server_chatmessage(QString p_name, QString p_message,
- QString p_colour);
-
- // check whether or not current theme has images for buttons with fallback
- // text
- void detect_fallback_text();
-
- // these functions handle chatmessages sequentially.
- // The process itself is very convoluted and merits separate documentation
- // But the general idea is objection animation->pre animation->talking->idle
- void handle_chatmessage(QStringList *p_contents);
- void handle_chatmessage_2();
- void handle_chatmessage_3();
-
- // This function filters out the common CC inline text trickery, for appending
- // to the IC chatlog.
- QString filter_ic_text(QString p_text, bool skip_filter, int chat_color);
-
- // adds text to the IC chatlog. p_name first as bold then p_text then a newlin
- // this function keeps the chatlog scrolled to the top unless there's text
- // selected
- // or the user isn't already scrolled to the top
- void append_ic_text(QString p_text, QString p_name = "",
- bool is_songchange = false, bool force_filter = false,
- bool skip_filter = false, int chat_color = 0);
-
- // prints who played the song to IC chat and plays said song(if found on local
- // filesystem) takes in a list where the first element is the song name and
- // the second is the char id of who played it
- void handle_song(QStringList *p_contents);
-
- void play_preanim(bool noninterrupting);
-
- // plays the witness testimony or cross examination animation based on
- // argument
- void handle_wtce(QString p_wtce, int variant);
-
- // sets the hp bar of defense(p_bar 1) or pro(p_bar 2)
- // state is an number between 0 and 10 inclusive
- void set_hp_bar(int p_bar, int p_state);
-
- // Toggles the judge buttons, whether they should appear or not.
- void toggle_judge_buttons(bool is_on);
- void doScreenShake();
- void doRealization();
-
- void announce_case(QString title, bool def, bool pro, bool jud, bool jur,
- bool steno, bool wit);
-
- void check_connection_received();
-
- void refresh_iclog(bool skiplast);
-
- ~Courtroom();
-
-private:
- int m_courtroom_width = 714;
- int m_courtroom_height = 668;
-
- int m_viewport_x = 0;
- int m_viewport_y = 0;
-
- int m_viewport_width = 256;
- int m_viewport_height = 192;
-
- bool first_message_sent = false;
- int maximumMessages = 0;
- QPropertyAnimation *screenshake_animation;
- QPropertyAnimation *chatbox_screenshake_animation;
- QParallelAnimationGroup *screenshake_group;
- QMovie *frame_emote_checker;
- // This is for inline message-colouring.
-
- enum INLINE_COLOURS { INLINE_BLUE, INLINE_GREEN, INLINE_ORANGE, INLINE_GREY };
-
- // A stack of inline colours.
- std::stack inline_colour_stack;
-
- bool next_character_is_not_special = false; // If true, write the
- // next character as it is.
-
- bool message_is_centered = false;
-
- int current_display_speed = 3;
- int message_display_speed_slow[7] = {30, 40, 50, 60, 75, 100, 120};
- int message_display_speed[7] = {10, 20, 30, 40, 50, 60, 75};
-
- // This is for checking if the character should start talking again
- // when an inline blue text ends.
- bool entire_message_is_blue = false;
-
- // And this is the inline 'talking checker'. Counts how 'deep' we are
- // in inline blues.
- int inline_blue_depth = 0;
-
- // The character ID of the character this user wants to appear alongside with.
- int other_charid = -1;
-
- // The offset this user has given if they want to appear alongside someone.
- int offset_with_pair = 0;
-
- QVector arup_players;
- QVector arup_statuses;
- QVector arup_cms;
- QVector arup_locks;
-
- QVector ic_chatlog_history;
-
- // These map music row items and area row items to their actual IDs.
- QVector music_row_to_number;
- QVector area_row_to_number;
-
- // triggers ping_server() every 60 seconds
- QTimer *keepalive_timer;
-
- // determines how fast messages tick onto screen
- QTimer *chat_tick_timer;
- // int chat_tick_interval = 60;
- // which tick position(character in chat message) we are at
- int tick_pos = 0;
- // used to determine how often blips sound
- int blip_pos = 0;
- int blip_rate = 1;
- int rainbow_counter = 0;
- bool rainbow_appended = false;
- bool blank_blip = false;
-
- // The cursor to write with in mirror mode
- QTextCursor *mirror_cursor;
- // Used for getting the current maximum blocks allowed in the IC chatlog.
- int log_maximum_blocks = 0;
-
- // True, if the log should go downwards.
- bool log_goes_downwards = false;
-
- // delay before chat messages starts ticking
- QTimer *text_delay_timer;
-
- // delay before sfx plays
- QTimer *sfx_delay_timer;
-
- // keeps track of how long realization is visible(it's just a white square and
- // should be visible less than a second)
- QTimer *realization_timer;
-
- // every time point in char.inis times this equals the final time
- const int time_mod = 40;
-
- // the amount of time non-animated objection/hold it/takethat images stay
- // onscreen for in ms
- const int shout_stay_time = 724;
-
- // the amount of time non-animated guilty/not guilty images stay onscreen for
- // in ms
- const int verdict_stay_time = 3000;
-
- // the amount of time non-animated witness testimony/cross-examination images
- // stay onscreen for in ms
- const int wtce_stay_time = 1500;
-
- static const int chatmessage_size = 28;
- QString m_chatmessage[chatmessage_size];
- bool chatmessage_is_empty = false;
-
- QString previous_ic_message = "";
-
- // char id, muted or not
- QMap mute_map;
-
- // QVector muted_cids;
-
- bool is_muted = false;
-
- // state of animation, 0 = objecting, 1 = preanim, 2 = talking, 3 = idle, 4 =
- // noniterrupting preanim
- int anim_state = 3;
-
- // state of text ticking, 0 = not yet ticking, 1 = ticking in progress, 2 =
- // ticking done
- int text_state = 2;
-
- // characters we consider punctuation
- const QString punctuation_chars = ".,?!:;";
-
- // amount by which we multiply the delay when we parse punctuation chars
- int punctuation_modifier = 0;
- bool slower_blips = false;
- // character id, which index of the char_list the player is
- int m_cid = -1;
- // cid and this may differ in cases of ini-editing
-
- QString char_name = "";
-
- int objection_state = 0;
- bool keep_custom_objection = false;
- QString objection_custom = "";
- int realization_state = 0;
- int screenshake_state = 0;
- int text_color = 0;
- bool is_presenting_evidence = false;
-
- int defense_bar_state = 0;
- int prosecution_bar_state = 0;
-
- int current_char_page = 0;
- int char_columns = 10;
- int char_rows = 9;
- int max_chars_on_page = 90;
-
- const int button_width = 60;
- const int button_height = 60;
-
- int current_emote_page = 0;
- int emote_columns = 5;
- int emote_rows = 2;
- int max_emotes_on_page = 10;
-
- QVector local_evidence_list;
-
- int current_evidence_page = 0;
- int current_evidence = 0;
- int evidence_columns = 6;
- int evidence_rows = 3;
- int max_evidence_on_page = 18;
-
- // is set to true if the bg folder contains defensedesk.png,
- // prosecutiondesk.png and stand.png
- bool is_ao2_bg = false;
-
- // whether or not to use text for buttons instead of images, true is text
- bool change_char_fallback = true;
- bool reload_theme_fallback = true;
- bool settings_fallback = true;
- bool call_mod_fallback = true;
- bool casing_fallback = true;
- bool amswap_fallback = true;
- bool ooc_toggle_fallback = true;
-
- // whether the ooc chat is server or master chat, true is server
- bool server_ooc = true;
-
- // Is AFK enabled
- bool isafk = false;
- QString current_background = "default";
-
- AOMusicPlayer *music_player;
- AOSfxPlayer *sfx_player;
- AOSfxPlayer *misc_sfx_player;
- AOSfxPlayer *frame_emote_sfx_player;
- AOSfxPlayer *pair_frame_emote_sfx_player;
- AOSfxPlayer *objection_player;
- AOBlipPlayer *blip_player;
-
- AOSfxPlayer *modcall_player;
-
- AOImage *ui_background;
-
- QWidget *ui_viewport;
- AOScene *ui_vp_background;
- AOMovie *ui_vp_speedlines;
- AOCharMovie *ui_vp_player_char;
- AOCharMovie *ui_vp_sideplayer_char;
- AOScene *ui_vp_desk;
- AOScene *ui_vp_legacy_desk;
- AOEvidenceDisplay *ui_vp_evidence_display;
- AOImage *ui_vp_chatbox;
- QLabel *ui_vp_showname;
- QTextEdit *ui_vp_message;
- AOMovie *ui_vp_realization;
- AOMovie *ui_vp_testimony;
- AOMovie *ui_vp_wtce;
- AOMovie *ui_vp_objection;
- void realization_done();
-
- bool colorf_iclog = false;
- bool mirror_iclog = false;
- bool colorf_limit = false;
-
- bool keep_evidence_display = false;
-
- QTextEdit *ui_ic_chatlog;
-
- AOTextArea *ui_ms_chatlog;
- AOTextArea *ui_server_chatlog;
-
- QListWidget *ui_mute_list;
- QListWidget *ui_area_list;
- QTreeWidget *ui_music_list;
-
- AOButton *ui_pair_button;
- QListWidget *ui_pair_list;
- QSpinBox *ui_pair_offset_spinbox;
-
- QLineEdit *ui_ic_chat_message;
- QLineEdit *ui_ic_chat_name;
-
- QLineEdit *ui_ooc_chat_message;
- QLineEdit *ui_ooc_chat_name;
-
- // QLineEdit *ui_area_password;
- QLineEdit *ui_music_search;
- QString music_search_par = "";
- QString area_search_par = "";
-
- QWidget *ui_emotes;
- QVector ui_emote_list;
- AOButton *ui_emote_left;
- AOButton *ui_emote_right;
-
- QComboBox *ui_emote_dropdown;
- QComboBox *ui_pos_dropdown;
-
- AOImage *ui_defense_bar;
- AOImage *ui_prosecution_bar;
-
- QLabel *ui_music_label;
- QLabel *ui_sfx_label;
- QLabel *ui_blip_label;
-
- AOButton *ui_hold_it;
- AOButton *ui_objection;
- AOButton *ui_take_that;
-
- AOButton *ui_ooc_toggle;
-
- AOButton *ui_witness_testimony;
- AOButton *ui_cross_examination;
- AOButton *ui_guilty;
- AOButton *ui_not_guilty;
-
- AOButton *ui_change_character;
- AOButton *ui_reload_theme;
- AOButton *ui_call_mod;
- AOButton *ui_settings;
- AOButton *ui_announce_casing;
- AOButton *ui_switch_area_music;
-
- QCheckBox *ui_pre;
- QCheckBox *ui_flip;
- QCheckBox *ui_guard;
- QCheckBox *ui_casing;
-
- QCheckBox *ui_pre_non_interrupt;
- QCheckBox *ui_showname_enable;
-
- AOButton *ui_custom_objection;
- AOButton *ui_realization;
- AOButton *ui_screenshake;
- AOButton *ui_mute;
-
- QMenu *custom_obj_menu;
-
- AOButton *ui_defense_plus;
- AOButton *ui_defense_minus;
-
- AOButton *ui_prosecution_plus;
- AOButton *ui_prosecution_minus;
-
- QComboBox *ui_text_color;
-
- QSlider *ui_music_slider;
- QSlider *ui_sfx_slider;
- QSlider *ui_blip_slider;
-
- AOImage *ui_muted;
-
- QSpinBox *ui_log_limit_spinbox;
- QLabel *ui_log_limit_label;
-
- AOButton *ui_evidence_button;
- AOImage *ui_evidence;
- AOLineEdit *ui_evidence_name;
- QWidget *ui_evidence_buttons;
- QVector ui_evidence_list;
- AOButton *ui_evidence_left;
- AOButton *ui_evidence_right;
- AOButton *ui_evidence_present;
- AOImage *ui_evidence_overlay;
- AOButton *ui_evidence_delete;
- AOLineEdit *ui_evidence_image_name;
- AOButton *ui_evidence_image_button;
- AOButton *ui_evidence_x;
- AOTextEdit *ui_evidence_description;
-
- AOImage *ui_char_select_background;
-
- AOImage *ui_selector;
-
- AOButton *ui_back_to_lobby;
-
- QLineEdit *ui_char_password;
-
- AOButton *ui_char_select_left;
- AOButton *ui_char_select_right;
-
- AOButton *ui_spectator;
-
- void construct_char_select();
- void set_char_select();
- void set_char_select_page();
- void put_button_in_place(int starting, int chars_on_this_page);
- void filter_character_list();
-
- void construct_emotes();
- void set_emote_page();
- void set_emote_dropdown();
-
- void construct_evidence();
- void set_evidence_page();
-
-public slots:
- void objection_done();
- void preanim_done();
-
- void mod_called(QString p_ip);
-
- void case_called(QString msg, bool def, bool pro, bool jud, bool jur,
- bool steno, bool witness);
-
-private slots:
- void start_chat_ticking();
- void play_sfx();
-
- void chat_tick();
-
- void on_mute_list_clicked(QModelIndex p_index);
- void on_pair_list_clicked(QModelIndex p_index);
-
- void on_chat_return_pressed();
-
- void on_ooc_return_pressed();
-
- void on_music_search_keypr();
- void on_music_search_edited(QString p_text);
- void on_music_list_double_clicked(QTreeWidgetItem *p_item, int column);
- void on_area_list_double_clicked(QModelIndex p_model);
-
- void select_emote(int p_id);
-
- void on_emote_clicked(int p_id);
-
- void on_emote_left_clicked();
- void on_emote_right_clicked();
-
- void on_emote_dropdown_changed(int p_index);
- void on_pos_dropdown_changed(int p_index);
-
- void on_evidence_name_edited();
- void on_evidence_image_name_edited();
- void on_evidence_image_button_clicked();
- void on_evidence_clicked(int p_id);
- void on_evidence_double_clicked(int p_id);
-
- void on_evidence_hover(int p_id, bool p_state);
-
- void on_evidence_left_clicked();
- void on_evidence_right_clicked();
- void on_evidence_present_clicked();
-
- void on_hold_it_clicked();
- void on_objection_clicked();
- void on_take_that_clicked();
- void on_custom_objection_clicked();
- void ShowContextMenu(const QPoint &pos);
-
- void on_realization_clicked();
- void on_screenshake_clicked();
-
- void on_mute_clicked();
- void on_pair_clicked();
-
- void on_defense_minus_clicked();
- void on_defense_plus_clicked();
- void on_prosecution_minus_clicked();
- void on_prosecution_plus_clicked();
-
- void on_text_color_changed(int p_color);
-
- void on_music_slider_moved(int p_value);
- void on_sfx_slider_moved(int p_value);
- void on_blip_slider_moved(int p_value);
-
- void on_log_limit_changed(int value);
- void on_pair_offset_changed(int value);
-
- void on_ooc_toggle_clicked();
-
- void on_witness_testimony_clicked();
- void on_cross_examination_clicked();
- void on_not_guilty_clicked();
- void on_guilty_clicked();
-
- void on_change_character_clicked();
- void on_reload_theme_clicked();
- void on_call_mod_clicked();
- void on_settings_clicked();
- void on_announce_casing_clicked();
-
- void on_pre_clicked();
- void on_flip_clicked();
- void on_guard_clicked();
-
- void on_showname_enable_clicked();
-
- void on_evidence_button_clicked();
-
- void on_evidence_delete_clicked();
- void on_evidence_x_clicked();
-
- void on_back_to_lobby_clicked();
-
- void on_char_select_left_clicked();
- void on_char_select_right_clicked();
- void on_char_search_changed();
- void on_char_taken_clicked();
- void on_char_passworded_clicked();
-
- void on_spectator_clicked();
-
- void char_clicked(int n_char);
-
- void on_switch_area_music_clicked();
-
- void on_casing_clicked();
-
- void ping_server();
-
-#ifdef BASSAUDIO
- void load_bass_opus_plugin();
-#endif
-};
-
-#endif // COURTROOM_H
+#ifndef COURTROOM_H
+#define COURTROOM_H
+
+#include "aoimage.h"
+#include "aobutton.h"
+#include "aocharbutton.h"
+#include "aoemotebutton.h"
+#include "aopacket.h"
+#include "aoscene.h"
+#include "aomovie.h"
+#include "aocharmovie.h"
+#include "aomusicplayer.h"
+#include "aosfxplayer.h"
+#include "aoblipplayer.h"
+#include "aoevidencebutton.h"
+#include "aotextarea.h"
+#include "aolineedit.h"
+#include "aotextedit.h"
+#include "aoevidencedisplay.h"
+#include "datatypes.h"
+#include "aoapplication.h"
+#include "lobby.h"
+#include "hardware_functions.h"
+#include "file_functions.h"
+#include "datatypes.h"
+#include "debug_functions.h"
+#include "chatlogpiece.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+class AOApplication;
+
+class Courtroom : public QMainWindow
+{
+ Q_OBJECT
+public:
+ explicit Courtroom(AOApplication *p_ao_app);
+
+ void append_char(char_type p_char){char_list.append(p_char);}
+ void append_evidence(evi_type p_evi){evidence_list.append(p_evi);}
+ void append_music(QString f_music){music_list.append(f_music);}
+ void append_area(QString f_area){area_list.append(f_area);}
+
+ void fix_last_area()
+ {
+ if (area_list.size() > 0)
+ {
+ QString malplaced = area_list.last();
+ area_list.removeLast();
+ append_music(malplaced);
+ }
+ }
+
+ void arup_append(int players, QString status, QString cm, QString locked)
+ {
+ arup_players.append(players);
+ arup_statuses.append(status);
+ arup_cms.append(cm);
+ arup_locks.append(locked);
+ }
+
+ void arup_modify(int type, int place, QString value)
+ {
+ if (type == 0)
+ {
+ if (arup_players.size() > place)
+ arup_players[place] = value.toInt();
+ }
+ else if (type == 1)
+ {
+ if (arup_statuses.size() > place)
+ arup_statuses[place] = value;
+ }
+ else if (type == 2)
+ {
+ if (arup_cms.size() > place)
+ arup_cms[place] = value;
+ }
+ else if (type == 3)
+ {
+ if (arup_locks.size() > place)
+ arup_locks[place] = value;
+ }
+ list_areas();
+ }
+
+ void character_loading_finished();
+
+ //sets position of widgets based on theme ini files
+ void set_widgets();
+ //sets font size based on theme ini files
+ void set_font(QWidget *widget, QString p_identifier);
+ //helper function that calls above function on the relevant widgets
+ void set_fonts();
+
+ void set_window_title(QString p_title);
+
+ //reads theme inis and sets size and pos based on the identifier
+ void set_size_and_pos(QWidget *p_widget, QString p_identifier);
+
+ //sets status as taken on character with cid n_char and places proper shading on charselect
+ void set_taken(int n_char, bool p_taken);
+
+ //sets the current background to argument. also does some checks to see if it's a legacy bg
+ void set_background(QString p_background);
+
+ //sets the evidence list member variable to argument
+ void set_evidence_list(QVector &p_evi_list);
+
+ //called when a DONE#% from the server was received
+ void done_received();
+
+ //sets the local mute list based on characters available on the server
+ void set_mute_list();
+
+ // Sets the local pair list based on the characters available on the server.
+ void set_pair_list();
+
+ //sets desk and bg based on pos in chatmessage
+ void set_scene();
+
+ //sets text color based on text color in chatmessage
+ void set_text_color();
+
+ // And gets the colour, too!
+ QColor get_text_color(QString color);
+
+ //takes in serverD-formatted IP list as prints a converted version to server OOC
+ //admittedly poorly named
+ void set_ip_list(QString p_list);
+
+ //disables chat if current cid matches second argument
+ //enables if p_muted is false
+ void set_mute(bool p_muted, int p_cid);
+
+ //send a message that the player is banned and quits the server
+ void set_ban(int p_cid);
+
+ //cid = character id, returns the cid of the currently selected character
+ int get_cid() {return m_cid;}
+ QString get_current_char() {return current_char;}
+ QString get_current_background() {return current_background;}
+
+ //properly sets up some varibles: resets user state
+ void enter_courtroom(int p_cid);
+
+ //helper function that populates ui_music_list with the contents of music_list
+ void list_music();
+ void list_areas();
+
+ //these are for OOC chat
+ void append_ms_chatmessage(QString f_name, QString f_message);
+ void append_server_chatmessage(QString p_name, QString p_message, QString p_colour);
+
+ //these functions handle chatmessages sequentially.
+ //The process itself is very convoluted and merits separate documentation
+ //But the general idea is objection animation->pre animation->talking->idle
+ void handle_chatmessage(QStringList *p_contents);
+ void handle_chatmessage_2();
+ void handle_chatmessage_3();
+
+ //This function filters out the common CC inline text trickery, for appending to
+ //the IC chatlog.
+ QString filter_ic_text(QString p_text);
+
+ //adds text to the IC chatlog. p_name first as bold then p_text then a newlin
+ //this function keeps the chatlog scrolled to the top unless there's text selected
+ // or the user isn't already scrolled to the top
+ void append_ic_text(QString p_text, QString p_name = "", bool is_songchange = false);
+
+ //prints who played the song to IC chat and plays said song(if found on local filesystem)
+ //takes in a list where the first element is the song name and the second is the char id of who played it
+ void handle_song(QStringList *p_contents);
+
+ void play_preanim(bool noninterrupting);
+
+ //plays the witness testimony or cross examination animation based on argument
+ void handle_wtce(QString p_wtce, int variant);
+
+ //sets the hp bar of defense(p_bar 1) or pro(p_bar 2)
+ //state is an number between 0 and 10 inclusive
+ void set_hp_bar(int p_bar, int p_state);
+
+ //Toggles the judge buttons, whether they should appear or not.
+ void toggle_judge_buttons(bool is_on);
+
+ void announce_case(QString title, bool def, bool pro, bool jud, bool jur, bool steno);
+
+ void check_connection_received();
+
+ ~Courtroom();
+
+private:
+ AOApplication *ao_app;
+
+ int m_courtroom_width = 714;
+ int m_courtroom_height = 668;
+
+ int m_viewport_x = 0;
+ int m_viewport_y = 0;
+
+ int m_viewport_width = 256;
+ int m_viewport_height = 192;
+
+ bool first_message_sent = false;
+ int maximumMessages = 0;
+
+ // This is for inline message-colouring.
+
+ enum INLINE_COLOURS {
+ INLINE_BLUE,
+ INLINE_GREEN,
+ INLINE_ORANGE,
+ INLINE_GREY
+ };
+
+ // A stack of inline colours.
+ std::stack inline_colour_stack;
+
+ bool next_character_is_not_special = false; // If true, write the
+ // next character as it is.
+
+ bool message_is_centered = false;
+
+ int current_display_speed = 3;
+ int message_display_speed[7] = {30, 40, 50, 60, 75, 100, 120};
+
+ // This is for checking if the character should start talking again
+ // when an inline blue text ends.
+ bool entire_message_is_blue = false;
+
+ // And this is the inline 'talking checker'. Counts how 'deep' we are
+ // in inline blues.
+ int inline_blue_depth = 0;
+
+ // The character ID of the character this user wants to appear alongside with.
+ int other_charid = -1;
+
+ // The offset this user has given if they want to appear alongside someone.
+ int offset_with_pair = 0;
+
+ QVector char_list;
+ QVector evidence_list;
+ QVector music_list;
+ QVector area_list;
+
+ QVector arup_players;
+ QVector arup_statuses;
+ QVector arup_cms;
+ QVector arup_locks;
+
+ QVector ic_chatlog_history;
+
+ // These map music row items and area row items to their actual IDs.
+ QVector