Commit Graph

277 Commits

Author SHA1 Message Date
Crystalwarrior
433b7f3315 Deprecate tick_ms and use actual milliseconds rather than arbitrary 60ms ticks for char.ini [Time]
Fix an extremely weird case where CharLayer::Play() was not called even on the CharLayer class (I don't understand why inheritance was straight up just ignored)
Fix using preanims with static images just breaking everything
Deprecate weird insanity [Time] with the % sign BS (What was this for again? Literally no one used this nor was aware of it)
Fix text_stay_time timer firing even if we're immediate
Just in case, stop the text delay timer when start_chat_ticking is called
2021-04-24 01:44:52 +03:00
Crystalwarrior
9fbe899c0e
Automatically fix desynced demo files with issues pre-#496 PR (#532)
* Implement a demo auto-fixing solution. If the client detects a pre-2.9.1 demo file, it will prompt the user if they wish to correct it, since otherwise the demo will be desynched from reality.
The aforementioned issue was fixed in https://github.com/AttorneyOnline/AO2-Client/pull/496 however 2.9.0 still has incorrect demo recording.
Fix potential memory leak by not flushing and closing the demo file after opening it for reading.

* backup broken demo file before fixing it

* comments ahoy

Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu>
2021-04-23 01:55:04 -05:00
Crystalwarrior
fb4a5e0656
Fix log_chatmessage referring to the global m_chatmessage instead of the local variables that should be sent to it at the point of the func being called. (#530) 2021-04-21 02:54:08 +03:00
oldmud0
d0ef4831de
Merge pull request #504 from AttorneyOnline/fix/css-lag
Fix character select screen lag/performance overhead
2021-04-20 00:20:54 -05:00
in1tiate
e517a365d5
don't set a mask on elements affected by offsets (#524) 2021-04-20 03:27:25 +03:00
oldmud0
6ec4e032e0
Version bump aoapplication.h 2021-03-24 18:52:11 -05:00
Crystalwarrior
48093c3f2b Remove useless code for extra ui_selector that is not used 2021-03-24 23:05:46 +03:00
Crystalwarrior
37de947a3d Mark ui_selector, ui_passworded, ui_taken for evidence and character select as static-only due to massice performance overhead for no substantial benefit 2021-03-24 23:05:09 +03:00
Crystalwarrior
702b275898 Fix chat messages being lost to the Ether if instant objection was used, or you switched an area during queue being parsed. (Your IC logs will be caught up to speed instead) 2021-03-22 02:10:06 +03:00
Crystalwarrior
510c0f4b17
Add timer packets to demo playback (#494)
When the demo skips by some number of seconds, the timer will also skip forward by that duration.

Co-authored-by: in1tiate <32779090+in1tiate@users.noreply.github.com>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-03-20 21:12:44 -05:00
Crystalwarrior
e3ba27c47e
Deprecate demo playback /min_wait (#498) 2021-03-20 13:41:35 -05:00
in1tiate
e4483719d4
Deprecate hardcoded string-based authentication, add AUTH packet (#489)
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-03-15 17:56:42 -05:00
oldmud0
2cbb5c95ef
Fix timer using 32-bit ints instead of 64-bit ints (#487) 2021-03-07 00:01:54 +03:00
Crystalwarrior
5ac95ada56 Make "stop music on objection" work in tandem with the server by calling "music_stop()" instead of only working on the client-side 2021-02-24 16:02:07 +03:00
Crystalwarrior
679dcca079 Remove hardcoded stylesheets from lobby
Stop doing the "tagget stylesheets" monstrosity
2021-02-21 16:18:45 +03:00
Crystalwarrior
37011fc22d Remove background-color stylesheet from the set_qfont (allowing stylesheets to properly initialize custom backgrounds for labels w/ transparent ones)
rename "set_dropdown_ to "set_stylesheet" cuz that's what it is
2021-02-21 15:50:34 +03:00
Crystalwarrior
aa790dbc4b Overhaul pos dropdown and pos remove system to work well with custom pos, char pos etc.
Remove accidental duplicate code
Fix some genius using & instead of && (SMH)
Block pos_dropdown signals better
2021-02-19 11:20:38 +03:00
Crystalwarrior
7246965e00 Adopt better method for setting custom pos using the pos dropdown
Make it actually work properly
2021-02-17 15:47:54 +03:00
Crystalwarrior
f881df2415 Make the server list display all pretty and nice
Resize the 0thcolumn to smallest possible size so it's not intrusive
Remove text eliding so numbers don't get ...'s
2021-02-17 15:29:18 +03:00
Crystalwarrior
b5f581eb5b Revert bad "fix" of the sound names for WTCE courtroom_sounds.ini
Make pos dropdown ui editable for a custom pos
Keep track of the custom pos index
On switching from the custom pos, remove the entry at that index
Fix regression causing the "sort by name" lobby server list header disappearing
Expose column 0 for the # in the lobby server list header
("too ugly" just use lobby_stylesheets.css and pretty it up)
2021-02-17 15:15:40 +03:00
Crystalwarrior
63128fea13 Stop supporting the DRO way (we will make a .bat file or utility that does it for you automatically instead!)
Add an option to enable/disable stickers
Make stickers actually respect the custom chatbox setting properly
2021-02-16 11:20:54 +03:00
Crystalwarrior
5063880530 Patch a segfault by play_frame_effect being wacky
Split behavior for courtroom resizing into its own function
Use that function to optimize character changing screen
Fix reload theme breaking the background positioning
Fix changing character breaking the background positioning
Fix excessive set_widgets() calls that caused unnecessary lag
Fix unnecessary set_size_and_pos calls that didn't need to be there
Only call size_and_pos on the chatbox in the initialize_chatbox func
Remove checks for a boolean that will always be true
Simplify two functions that copy-paste code called set_size_and_pos into a single one
Fix "disable custom chat" setting not being used when setting chat sizes and pos
2021-02-16 11:04:07 +03:00
in1tiate
97cb8cf192 fix bg not resizing on reload theme 2021-02-14 19:21:49 -06:00
in1tiate
36a1e26069 fix borked chatbox themes 2021-02-13 07:48:42 -06:00
Crystalwarrior
fe00c6b7de
Animated Themes. Subthemes. Custom default_theme. Overhaul asset paths. Fix a ton of asset resolution bugs. (#466)
* Remove get_static_image_suffix (webp, gif etc. can be non-animated)
Replace QList<QString> with QStringList

* forgot to remove static image from aoimage

* Simplify get_theme_path, get_custom_theme_path and get_default_theme_path all into a single get_theme_path func
Add a default_theme variable which defines the currently recognized default theme
Add a new "get_asset_path" that will be used to simplify asset resolution considerably

* Simplify AOImage set_image function to use get_asset_path
Begin working on the subtheme system

* Add p_default_theme for get_asset_path
Implement get_asset_path for AOButton

* Condense aolayer path lookups into the get_asset_path function

* Get rid of get_font_name due to underuse (and it just does the same thing as get_design_element anyway)
Get rid of get_char_shouts (use chat= instead)
Use get_subtheme() instead of subtheme (because get_subtheme() can perform overrides based on the user's settings)
Make get_color() use get_asset_path()
Make get_design_element() use get_asset_path()

* Adapt a whole bunch of text_file_functions to the get_asset_path method, fixing an enormous amount of invalid path resolutions
Unfortunately I have to keep backwards compatibility for the backwards ass config.ini method for the chat markup (new way is chat_config.ini)
Get rid of get_theme_effects and implement the stacking behavior into get_effects instead

* Program doesn't run, color lists stop generating for some reason
Also implement safety checks for the asset path generator

* Fix a really tricky issue that popped up regarding char_color_rgb_list not being generated, causing segfaults

* Address the sfx player path resolution being really, really stupid and resolve major inconsistencies (such as the bug where objection sfx wouldn't be playing despite the default theme or default misc folder having them)

* Fix sfx path resolution being funky (apparently D:/Qt/Projects/AO2-Client/bin/base/themes/default//objection.wav is a valid qt5 path...)

* Implement:
get_asset_paths - Return an untested list of universal paths from the provided args
get_asset_path - Loop through the list of provided asset paths and return the first valid file
get_image_path - Loop through the list of provided asset paths, apply get_image_suffix and return the first valid image file
get_sfx_path - Loop through the list of provided asset paths, apply get_sfx_suffix and return the first valid sound file
get_asset - return an asset (must contain file extension) from the get_asset_path() applied on the get_asset_paths()
get_image - return an image with get_image_suffix() applied on the get_image_path() for the get_asset_paths()
get_sfx - return a sfx from provided args with the uniquely constructed asset path list for sounds

Rename old get_sfx to get_court_sfx for better clarity of its function
This replaces previous asset stuff I implemented, as I think this is a better solution lol

* Add a new get_config_value that obtains a value from the config that matches identifier
Adjust all calls to get_asset() to actually look for a config identifier value instead, so even if a config.ini is found if it doesn't contain the identifier we want we keep looking

* Fix effects.ini sounds not working
Remove debug text

* Make it so even if you miss the required asset, and don't have a missingno, the viewport still doesn't freeze up due to waiting on Objections etc. due to signals.

* Implement default_theme option for courtroom_design.ini, allowing you to make themes that inherit from other themes that are not default.

* move sounds folder lower in sfx pathlist

* fix realization sfx not being fetched from config

* Make aosfxplayer actually use get_sfx I made
Move sounds folder path check last in get_sfx

* I thought this would fix QSettings::value: Empty key passed but I guess not, that annoying error will keep pestering us :(((

* Remove silly .png exception for SplashLayer
Fix static image Objections freezing the viewport due to done(); signal that never arrives

* Make WTCE cooler by including a stop method for witness testimony indicator, and add support for custom WTCE

* Reduce code duplication for get_sfx

* Fix the program hanging/entering an infinite loop/segfaults/a number of nasty issues due to done(); signal being sent as soon as playback begins if the image is invalid.
This is done by removing the file_exists check, and letting the rest of the functionality handle this case - the system is robust enough and treats an invalid image as a static image.

* Fix segfaults with AOLayers by sanity checking using max_frames
Fix "Pixmap is null" console spam

* You'll hate me for this.
Make it possible to have fully animated AOButton and AOImage

* Add a settings option to toggle animated themes on or off

* Add a setting for animated theme elements
Add a "static image" toggle for get_image_suffix

* Fix custom chat and generally the chat boxes not having consistent behaivor with subthemes
Add a settings option for subthemes
Have AOImage keep track of its last valid path

* Add SubTheme (ST) packet. Pass subtheme as arg0, and "1" if you want the client's theme to be reloaded.
ST packet sets ao_app->subtheme no matter what. It will not reload theme unless the user has their subtheme set to "server".
Fix showname widths by rearranging font metrics to do its calculations *after* the showname font is set, and not before (making it lag behind the correct display size by 1 msg)

Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu>
2021-02-13 11:52:12 +03:00
Crystalwarrior
b78479f4cc
Update the Settings screen - reload theme, restore defaults (#463)
* Add a Reload Theme button to the settings screen (works with both lobby and courtroom)

* Move all value updates on elements to "update_values" func in the settings screen
Add a "restore to defaults" option that allows you to restore all the configuration to its default values.
Set up a .temp settings file that allows you to undo the effects of restoring default options.

* wtf why didn't this error
2021-02-11 19:53:47 +03:00
in1tiate
e6ced65922
Fix expanded_desk_mods (2-5) being nonfunctional (#451)
Also fix backgrounds appearing off to the left if they are less wide than the viewport.
i am in agony

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-02-09 14:57:29 -06:00
oldmud0
6e4b621992
Merge pull request #455 from AttorneyOnline/fix/speedmax
Make instant text instant again
2021-02-08 18:42:30 -06:00
Crystalwarrior
2135d84ff9 make instant text instant again 2021-02-09 03:24:04 +03:00
Crystalwarrior
aea0e2ef80 Fix backwards compatibility with the stopmusic
Hide ~stop.mp3 and the stop category
Add an option to make it so when you double-click a category, it expands/collapses it without sending the stop-music command
Make right click stop music backwards compatible
2021-02-09 03:00:51 +03:00
oldmud0
097220f11a
Merge pull request #368 from skyedeving/add-tests
Add a CMakeLists, tests, and pipeline to automatically test with Github actions
2021-01-29 12:17:54 -06:00
in1tiate
5cafb011f5
Fix music_display not stretching properly, reconsolidate ForegroundLayer into InterjectionLayer, rename InterjectionLayer to SplashLayer (#436)
* more intelligent separation

* separation 2 electric boogaloo

* rename InterjectionLayer to SplashLayer

* remove redundant layer type

* comments and cleanup

* fix incorrect use of continuous

* remove nonfunctional check

* fix additive not coloring correctly

Co-authored-by: Crystalwarrior <varsash@gmail.com>
2021-01-29 20:41:53 +03:00
in1tiate
639d4738db
Improvements to the way the position dropdown is handled (#428)
* it works

* woops

* oops 2 electric boogaloo

* fix "SP" packet not working properly
2021-01-28 22:38:15 +01:00
Skye Deving
2d33a52c82 Update the cmakelists to newest 2021-01-28 11:05:42 -06:00
Skye Deving
640f12b3c7 Use target_sources 2021-01-28 11:05:42 -06:00
oldmud0
580313cbcd
Merge pull request #429 from AttorneyOnline/fix/continuous-bg
Fix continuous playback being nonfunctional on non-CharLayer elements, and allow users to toggle the feature
2021-01-27 18:10:52 -06:00
Crystalwarrior
d1e7b2920b Refactor "text scrawl" to "text crawl" (sounds more simple to understand than scrawl tbh) 2021-01-27 20:05:06 +03:00
Crystalwarrior
423fe3d3fe Add the setting for the text scrawl 2021-01-27 19:18:43 +03:00
Crystalwarrior
b040449f7f Redesign the text display speed delay to be more modular by introducing a "base display speed" variable 2021-01-27 18:20:56 +03:00
Skye Deving
5d9309b1b3
Handle packet decoding separately for SC packet (#433)
Should fix special (escaped) characters not being parsed correctly in character list.
2021-01-24 18:26:39 -06:00
in1tiate
9624af5412 fix continuous and make it configurable 2021-01-23 12:53:47 -06:00
in1tiate
c13e6b7ab0
Allow effects to decide whether they go over or under the chatbox (#424)
Also re-adds pair ordering following viewport refactor.
2021-01-22 22:43:01 -06:00
oldmud0
0bb8574d79
Merge pull request #420 from AttorneyOnline/version-bump
Version bump
2021-01-19 10:15:54 -06:00
Crystalwarrior
1b016ddf91 Merge branch 'master' into feature/timerclock
# Conflicts:
#	include/courtroom.h
2021-01-19 16:04:58 +03:00
Crystalwarrior
0926f3c158
Implement sticker logic with animated image support (#414)
* Implement sticker logic with animated image support (will probably be remade in a much better way for AOLayers)

* port to aolayer

Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu>
2021-01-19 16:02:28 +03:00
in1tiate
894b2b2a0e
Consolidate AOScene, AOMovie, and AOCharMovie into one class, add support for (c) animations, implement emote continuity, add scaling overrides to all layer types, allow for stretch-to-fill images, allow for additional effect configuration (#302)
* 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>
2021-01-19 14:32:11 +03:00
in1tiate
21b4aa5072
unused macro and update QTime to QElapsedTimer (#417) 2021-01-19 14:30:56 +03:00
in1tiate
d41ec17fe7
Add a new "char_list" QTreeWidget that allows for categorizing characters (#399)
* 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>
2021-01-18 23:10:45 +03:00
oldmud0
2f3ca8613d
Merge pull request #400 from AttorneyOnline/bugfix/blanklogs
Fix blankposts not showing up in logs
2021-01-18 12:35:19 -06:00
Crystalwarrior
7877739146 Simplify the logic behind last message = blankpost detection
I need to stop overcomplicating things.
2021-01-18 18:54:11 +03:00