* Rewrite AOScene and remove the need for AOMovie and AOCharMovie by consolidation
* Rename AOScene to AOLayer, apply suggestions to improve functionality
* Implement suggested change to allocation
* Switch from pointer to field, fix ui_vp_player_char not resetting play_once
* Use the variable gif_name instead of the string "gif_name"
Oops.
* Total rewrite of AOLayer (again)
* Add support for (c) animations, do some housekeeping
* allow themes to override misc chatboxes
* add support for pulling InterfaceLayer elements from theme/misc
* mistakes were made
* move all frame fx functionality to CharLayer subclass
* virtual functions are cool mkay
* remove evidence of my incompetence
* allow themes to override font design inis under theme/misc
* Proper support for theme/misc chatbox, fixes
* Fix chatbox dimensions not updating and inline color causing missingnos
* rename chat markdown to chat markup
* add missing misc overrides
* quick hotfix for chatblank and misc overrides
* Fix oversight with backgrounds causing them to be culled
* Same as last commit but for FG layer
* amend comment to explain impossible shenanigans
* Adjust ForegroundLayer to take charname rather than miscname, allow for checking in char folder
* fix an incredibly embarrassing pathing bug
* add scaling overrides for all layer types, parent orphaned viewport elements to the viewport
* stupid fix because themes use "custom.png" as a button
* switch to .append()
* Revert "Merge branch 'aoscene_rewrite' of https://github.com/AttorneyOnline/AO2-Client into aoscene_rewrite"
This reverts commit bdeb1bff7639d522031aab3c133a83b0e2a291df, reversing
changes made to 125ee63b97a6f6c156e69525d88fddc625e7a978.
* switch to .append() (again)
* move function call to fix showname length calculation error
* fix nonlooping character animations being broken Again
* unparent elements from the viewport and do fancy masking arithmetic instead
* use override keyword
* move scaling override to char.ini, allow stretching, restructure effect property loading
* fix some redundancy
* unparent chat_arrow from chatbox to prevent accidental masking
* at no point do we want a frozen gif to display
* overhaul how wtce is handled
* oops
* also let sounds be pulled from theme miscs
* i should probably compile before i push
* actually make it work
* don't check a default bg
* readd 1x1 stretch thing
* actually the 1x1 thing was a bad idea
* Add missing parenthesis
* Use load_image instead of play
play is a nonexistent method now
* Remote shout_message and usages because it does nothing
* Remove multiple redefinitions
* Add in missing brackets and indent to fix build
I have know idea what this does but it brings fear
* fix build error
* fix chat arrow and remove duped code
* remove more duped code and fix misc themes
* only update chat_arrow when needed
* consolidate log_chatmessage and display_log_chatmessage
Co-authored-by: scatterflower <marisaposs@gameboyprinter.moe>
Co-authored-by: Skye Deving <76892045+skyedeving@users.noreply.github.com>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
* initial commit
* use a "category" value instead
* add filtering and taken indicator
* hide serverlist header
* set the items to disabled in place of the [X] text
Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
* initial commit with horrible code dupcliation haha lol
Set up elapsedtimer to generate wait# stuff between packets recorded
* implement groundwork for internal demo server
* add core playback functionality
* make it work kinda by including SC packet in demo
* Add a file dialog for loading a demo file instead of a hardcoded path
* Change /play to > in OOC to begin playback or skip to next element
Pop up file dialog box *before* establishing the connection, not after.
TODO:
* Fix having to load the same file *twice* to be able to connect to the demo server for some reason
* Fix the segfault caused by calling the playback() function when there's no remaining data, it's almost like demo_data.isEmpty() is ignored for whatever reason???
* Clear demo data when loading a demo file to prevent stacking demos
* Properly disconnect the client when sending the request for file browser fails to obtain a good demo file
* Fix append_to_file newlining even if file didn't exist prior to calling this function
* Add a very scuffed exception to not log or demo record anything that happens in the Demo playback local server
* Reduce invalid file spam by checking for non-logging server better
Use file_exists() to be more consistent in append_to_file
* Fix the client crashing when receiving loading packets etc. at runtime such as SC, SM, CI etc. (TODO: parity???)
Remove useless debug stuff
* Preserve newlines for demo packets such as "CT", "MS" etc.
* Implement /max_wait, /min_wait for adjusting the maximum and minimum wait in milliseconds between wait packets
Add /pause or | shorthand to pause playback
Re-add /play and keep > as a shorthand
Remove clientside restrictions from sending empty OOC messages and sending OOC messages without a name - these should be serverside.
* Empty music list
Default the character to Spectator char no matter the selection in CSS
* Allow -1 character ID or character ID that does not fit into the local Character Select Screen list to still be parsed corectly, using the character folder in the MS packet as reference.
Allow servers with no selectable characters to still be properly loaded
Bypass the Character Select Screen when joining a server with no character select screen and automatically become a spectator
* Properly handle demo files without SC packet to dictate which chars exist
Add a /load command letting you load a demo file without rejoining the demo server (the CS packet will not be properly handled but I cannot think of a single tangible problem this causes lol)
Make sure all DEMO CT messages are colored properly
* Fix logs bleeding into each other if you disabled logging or you joined a demo server after leaving another
* Prevent logging even if log_filename is defined because a user might disable auto logging when running the game
* Fix custom shownames not appearing in the IC logs
* Set up new logic for max_wait, meaning that dead air being skipped is prioritized with MS (IC chat) packets being used as the anchor.
* Better logic for min_wait to only affect important packets (IC Chat)
* Fix encoding not being performed on packets that are saved to the .demo file, resulting in characters having something like "#1" in their message breaking that specific message
* Fix a weird setup in courtroom.cpp that happened out of the merge and bugged the code
Fix aopacket being busted up as well
* add missing feature flags to the demoserver
* use random port
* move writing to the demo file to a function
* only listen on localhost
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
* remove copypasta
* add a help to the demo server
* fix empty demo disconnecting the server
* tell the user how to begin
Co-authored-by: scatterflower <marisaposs@gameboyprinter.moe>
Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
Co-authored-by: stonedDiscord <stoned@derpymail.org>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
* Begin trying to understand handle_chatmessage monstrosity
Rearrange some functionality to be more consistent with what the particular handle_chatmessage is *supposed* to be responsible for
Single responsibility principle doesn't apply not just to script files but even functions in this goddamned program apparently.
* Fix some oversights relating to "has presented evidence" logs
* Fix an edge case crash with negative evidence, idk why this didn't happen before.
* Completely refactor handle_chatmessage hell and split it up into single-responsibility-principle functions like a sane and organized coder would.
This will break any PRs that touch handle_chatmessage and will have to conform to the new standard, but it's very good in the long run.
Functions have also been meticulously commentated to make sure that everyone can understand at a glance what everything does.
This refactor is done to pave way for smooth viewport, making characters no longer randomly interrupt each other when speaking.
* Rename confusingly named "handle_chatbox" to "handle_ic_speaking"
Add a new function "handle_callwords"
* Parse blankposts in the packet unpacking phase
log_chatmessage is now an argument-based funciton instead of using m_chatmessage monstrosity
Commentate the heck out of log_chatmessage
Fix showname displaying logic being bonkers for log entries
Fix -1 char_id most likely crashing client, even tho they're supposed to be system messages
Fix [CHARID] being referenced instead of [OTHER_CHARID] in the pair display func
Fix chat message color being used for "has played a song" even though it shouldn't
* Move setting emote_mod from the objection thing to the packet unpacking thing
handle_emote_mod has become argumented
* Make display_pair_character take in only vars it needs
* Add functionality for message stacks (does not handle logging separately yet)
Currently segfaults at line 1823 if stacking behavior actually occurs. Plz help I'm poopie brain at this
* Make sense of pointers and dereference some pointers to prevent wacky errors
Replace _stack with _queue, and turn it into a QQueue
* Implement a minimum text delay queue timer so that each msg must stay on screen for a specified amount of time
Chat_arrow only shows up when the minimum text delay has expired
Check if target is muted in the enqueueing, as well as the validity of the character id, so we don't even bother adding it to the queue
Add a settings option to set text stay time (minimum amount of time to pass before displaying the next message).
TODO: Handle queued interjections in a cooler way
* Adjust default option for stay_time to be 200ms
Make the stay_time setting of 0 disable the queue system entirely
* Make interjections force-clear the message queue
Use interjections to instantly process those messages - objections are usually extremely important and must have everyone's immediate attention.
TODO: Add a settings option for interjection behavior
* Clear message queue when bg display packet is received
* Add an instant objection setting which, when enabled, will interrupt and skip the message queue on objections (effectively bypassing text_delay system)
* Stop using AOPacket for the queue and use QStringList instead (packet contents, we don't care for the header)
Implement objection threshold which works in a queue if instant objections are disabled (not exposed to the settings yet)
Modify packet contents directly instead of waiting for m_chatmessage shenanigans (we should deprecate this soon)
Rename isinstant_objection_enabled options check to be more consistent
* Make it so objections display as soon as the message is over if instant_objection is disabled
* Remove emote_mod = "1" thing that had no real purpose
Implement desynchronized logs settings option, which is false by default, meaning users' messages and display IC logs are going to be in sync.
Split up display and logging behavior, meaning IC logs will be saved with accurate timings on the .logs file, while display can be slower.
Remove dumb "System" showname thing cuz it was dumb
* Bring back minimum packet size safety check
* Make sure shouts are properly logged. I am very sorry for this horrible amount of code duplication though.
* fix compile errors
* fix html parsing error
* Rearrange the order of logging so IC messages go like this:
* shouts go first
* evidence goes second
* chat message goes last
* Fix No Interrupt coming back, go away you foolish beast
* fix borked options dialog
* Crank down "press enter delay" from 600ms to 200ms so it's not as harsh
Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
* initial commit
* The Quick-Fix is a secondary weapon for the Medic. It is a prototype Medi Gun with a group of three gauges on one side, a (cosmetic) ÜberCharge gauge on the other side, and what appears to be a blender for a body. The main gun is coupled with a medicinal reactor backpack with glowing portions that replaces Medic's default backpack.
* fixed settings dialog
* slightly less stupid custom objection default
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Display ping in the application window title.
keepalive timer now fires every second instead of every minute
Remove meme clock starting on set_widgets()
implement get_ping() on w_courtroom
* Allow changing audio device on the fly while in a server
* Use default audio device if device in config doesn't exist
* Automatically change audio device to default when current one is invalid
* Destroy Qt Multimedia support
It was decided that there was not enough attention being given to Qt
Multimedia support to justify its continued maintenance simply as a
libre alternative to BASS. While substantial changes to audio were being
made in 2.8, the Qt Multimedia support code fell behind in disrepair.
It's clear that there is no vested interest in implementing audio
features twice for the sake of licensing.
When it's time to switch to another audio library, it will be done
unilaterally.
* CI: Use BASS for Linux build
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
* Rewrite the IC Log code to drastically reduce code duplication and have both downward and upward mode in the same function
Regenerate the IC Log in set_widgets() function, making sure the maximum_blocks is accounted for and clearing the log to prepare for different log mode (upwards/downwards) if it's different from previous
Add placeholder text telling the user the direction in which the log will go
Remove useless first_message_sent global boolean, a remnant from a w e a k e r c o d e r m a n
* Add log_colors boolean to reduce color I/O happening in append_ic_text (optimization meme)
Clear the IC log when log_colors setting changes and reload theme is pressed
Fix https://github.com/AttorneyOnline/AO2-Client/issues/221
* Add configurable margin between IC log entries
Add configurable newline/singleline log mode
Options in settings for these
* Add optional timestamps
* Un-hardcode "played music" from the chatlogpiece and introduce the "action" argument so that "presented evidence" is fully supported now
Translate "has presented evidence"
Regenerate IC chatlog instead of clearing it, properly updating every element with the new configurations
* Go away *temp, code duplication making me shid and cry rn
Why is this not done in append_ic_text, or why isn't there a dedicated ic logging func aAAAaaaaAAAaa
Fix presenting evidence not being properly logged
Fix timestamp being UTC instead of local time (local time will not be as confusing)
* okok it was a joke a big ol bamboozle you got gnomed haha rick rolled beaned stickbugged
I did NOT copy paste code, no, I actually intended to fix copy pasted code all along. log_ic_text was always planned.
(Fix copypasted code for ic_chatlog_history and consolidate it into a single log_ic_text func)
* Add a new "Custom Chatboxes" settings option to enable/disable char.ini setting custom chat box designs per-character
* Fix chat_arrow being incorrectly updated between character messages if the custom chatbox modified the chat arrow positioning/size in any way
* brackets matter
Due to a countless number of changes made to the core that were not
fully understood, tested, or documented, it was decided to roll
everything back to the last known stable version (2.6.2).
Changes dropped include:
- Witness needed
- Shake
- Frame SFX
- Multiple custom objections
- Multithreaded thumbnail generation
- Looping
- Various translation additions
- "Mirror IC"
- Color in IC log
- An invocation of clang-format
Next time, work together and split your big fork into independently
testable feature branches.
{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Stroustrup, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All }
(this is the Visual Studio preset with only "BreakBeforeBraces" changed from Allman to Stroustrup)
Indentation fixed to 2 spaces per tab. Braces set to Stroustrup style.
Lines reflow at 80 characters. One-line method bodies are on the same
line as the signature. Space always after `//`. No indentation
on preprocessor macros. Includes are sorted lexicographically.
If you don't want to see this commit on blames, use the hidden
whitespace option on GitHub, or use `-w` in git-blame.
CR likely stands for "CentsRaidensnake." Like the Case Cafe mega-merge
before it, this was not a clean merge, and it had to be split up into
two parts: the actual changes, and the attempt it made to reformat the
entire code via clang-format.
This branch had a complicated set of changes that would be difficult to
describe in this commit message. It would be better described in a
proper changelog.
Add options for sticky sounds, sticky effects and sticky preanims
Optimize the search for areas and music (previously, area search also searched for music in the background, causing lag with huge music lists)
Make sfx player able to play sfx without the file extension provided
Allow blipsounds to seek in blips/ folder to allow better categorization, as well as direct sound references
add get_emote_blip for detecting the blipsound used by an emote. Currently unused.
Less strict/hardcoded custom objection detection system
Allow system (charid -1) messages, and don't do the same message detection on blankposting
Allow objection, hold it, take that and custom sound players to detect sounds that are not exclusively .wav
Create two new helper functions - get_chat_markdown and remake read_char_ini_tag to be read_ini_tags for more general purpose
Modify aolineedit to support preserving selection after unfocusing (building this for using dropdown list for setting colors), as well as remove the setReadOnly functionality and use it in signals instead
Overhaul the color system to get rid of inline colors, allow full customization of colors and usage of configuration files for every facet of how a color functions (should we be talking, should we remove that markdown char, etc.)
Complete overhaul of color markdowns system
TODO: Make this thing not lag to hell, fix chat messages hogging the IC as the animation never ends apparently
Overhaul inline colors system to properly support additive text and further expansion
Add two new colors - Gray and Blank, the latter being used for IC parsing.
Instead of adding text symbol by symbol, reveal more of the already-rendered text instead so that it properly anticipates words that need to be on the newline.
Changed the append_ic function slightly so it appends ": " to text only after it's no longer needed.
Made gray color less inconsistent with everything else
This will save to the character folder's iniswaps.ini. You can click on the dropdown and edit the text inside to add an iniswap, and press the [X] button that'll appear next to it to remove the ini swap.
Recode the enter_courtroom and add a new update_character feature - the two are now separate and responsible for different things. The courtroom will reload the whole theme and widgets while the character is only responsible for all ui elements related to the character. This drastically improves performance when switching characters using /switch or something
Add a set_char_ini helper function that allows you to modify the character variables. For now only used to set name= field when iniswapping
Remove some useless/unused ui elements
Implement stylesheet for courtrooms in a way that lets the end user modify a lot of its elements
Use get_image_suffix for evidence_appear images
Modify all set_image calls to utilize said suffix helper function
Dynamically change betweehn chatblank, chat, chatmed, chatbig based on the showname's length
Use char.ini showname if showname is set to whitespace (doesn't yet check if char.ini showname is also whitespace)
Scream at the coders that decided hard-coding fonts and colors was a good idea (gotta properly let the themes modify that later)
Fix a lot of ui elements not properly respecting the themes and their colors
add a set_qfont method for those situations that need it
Allow the theme to change sender colors for ooc and ms chatlogs
rename url parser variable to something more immediately apparent as to what it is for readability's sake
Fix server_address not being properly created in packet distribution
Create a log file when you join a server in the logs/<server name>/<logname>.log and update it every time there's a new chat entry
minor refactor of chatlogpiece
Fix moderation guard button not doing what it's supposed to (enable/disable modcalls)
Fix moderation guard button appearing with failed logins
Fix the option to toggle looping sfx not doing anything
Reorganize charmovie.h a bit and make some functions private
Add a new helper function "read_char_ini_tag" which returns a qstringlist of all key=value strings associated with the tag
Fix screenshake animation modifying the default positions of shook elements
Fix aomovie sometimes not playing the last frame and causing lagspikes due to the delay() method
Rewrite Goofball's doScreenshake() function to be much more modular and multi-purpose (also rename to do_screenshake() to match other functions)
Add networking needed to make screenshake work. Works with AOV version of tsuserver3 (button screenshake only so far).
Add get_theme_pos helper function, currently unused.
Rename kill_music_on_object to objection_stop_music for readability
Update blip rate (faster overall, more accurate to the trilogy) - based on AOV values
Update default blip rate to be "once every two symbols"
Reorganize the file_exists checks to be an array iterator instead for much less code duplication and easier ordering of priority
Reorganize desk and set_image loading on AOScene class, resolve issues with last_image setting to prevent animations from being restarted when characters talk on the same pos in succession
Apply get_image_suffix for seancestand and jurystand searches
TODO: At the moment, if you feed a .png shout, it will send the "Done" signal on the first frame (frame 0), not showing you the .png image at all. The shout code should be reorganized to allow static images to be displayed for exactly 720ms - the standard AA objection length. Usage of the timer similarly to the realizationflash.png might be possible.
Add get_image_suffix for all .gif's so that all animated pieces can be .webp or .apng instead
Expand on .webp .apng support and clean up the code somewhat