diff --git a/src/drivers/win/taseditor.cpp b/src/drivers/win/taseditor.cpp index 1c9ae927..36ff63fb 100644 --- a/src/drivers/win/taseditor.cpp +++ b/src/drivers/win/taseditor.cpp @@ -1,18 +1,22 @@ -// --------------------------------------------------------------------------------- -// Main TAS Editor file -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Main TAS Editor file +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Main - Logical center of the program [Singleton] + * the point of launching TAS Editor from emulator * the point of quitting from TAS Editor * regularly (at the end of every frame) updates all modules that need regular update * implements operations of the "File" menu: creating New project, opening a file, saving, compact saving, import, export * stores Autofire Patterns data and their loading/generating code * stores resources: patterns filename, id of buttonpresses in patterns -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include #include "taseditor/taseditor_project.h" diff --git a/src/drivers/win/taseditor/bookmark.cpp b/src/drivers/win/taseditor/bookmark.cpp index a59b80fd..7a3a21e6 100644 --- a/src/drivers/win/taseditor/bookmark.cpp +++ b/src/drivers/win/taseditor/bookmark.cpp @@ -1,15 +1,19 @@ -// --------------------------------------------------------------------------------- -// Implementation file of Bookmark class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of Bookmark class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Bookmark - Single Bookmark data + * stores all info of one specific Bookmark-Branch: movie snapshot, a savestate of 1 frame, a screenshot of the frame, an info about relations of this Branch, a state of flashing for this Bookmark's row * saves and loads the data from a project file. On error: sends warning to caller * implements procedure of "Bookmark set": creating movie snapshot, setting key frame on current Playback position, copying savestate from Greenzone, making and compressing screenshot, launching flashing animation * launches respective flashings for "Bookmark jump" and "Branch deploy" -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" #include "zlib.h" diff --git a/src/drivers/win/taseditor/bookmarks.cpp b/src/drivers/win/taseditor/bookmarks.cpp index ce5de955..209f58f2 100644 --- a/src/drivers/win/taseditor/bookmarks.cpp +++ b/src/drivers/win/taseditor/bookmarks.cpp @@ -1,10 +1,15 @@ -// --------------------------------------------------------------------------------- -// Implementation file of Bookmarks class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of Bookmarks class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Bookmarks/Branches - Manager of Bookmarks [Singleton] + * stores 10 Bookmarks, info about their relations and the position of current Branch * also stores the time of the last modification (see fireball) and the time of the root of Branches Tree (see cloudlet) * implements all operations with Bookmarks: initialization, setting Bookmarks, jumping to Bookmarks, loading Branches @@ -15,8 +20,7 @@ Bookmarks/Branches - Manager of Bookmarks * regularly updates flashings in Bookmarks List and animations in Branches Tree * on demand: updates colors of rows in Bookmarks List, reflecting conditions of respective Piano Roll rows * stores resources: save id, ids of commands, captions for panel, gradients for flashings, coordinates for building Branches Tree, animation timings, id of default slot -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" #include "utils/xstring.h" diff --git a/src/drivers/win/taseditor/greenzone.cpp b/src/drivers/win/taseditor/greenzone.cpp index 53890e13..19c5fa51 100644 --- a/src/drivers/win/taseditor/greenzone.cpp +++ b/src/drivers/win/taseditor/greenzone.cpp @@ -1,10 +1,15 @@ -// --------------------------------------------------------------------------------- -// Implementation file of Greenzone class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of Greenzone class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Greenzone - Access zone [Singleton] + * stores array of savestates, used for faster movie navigation by Playback cursor * also stores the frame-by-frame log of lag appearance * saves and loads the data from a project file. On error: truncates Greenzone to last successfully read savestate @@ -12,8 +17,7 @@ Greenzone - Access zone * regularly runs gradual cleaning of the savestates array (for memory saving), deleting oldest savestates * on demand: (when movie input was changed) truncates the size of Greenzone, óäàëÿÿ ñýéâû, deleting savestates that became irrelevant because of new input. After truncating it may also move Playback cursor (which must always reside within Greenzone) and may launch Playback seeking * stores resources: save id, properties of gradual cleaning, timing of cleaning -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" #include "state.h" diff --git a/src/drivers/win/taseditor/history.cpp b/src/drivers/win/taseditor/history.cpp index d02759be..11c20b4d 100644 --- a/src/drivers/win/taseditor/history.cpp +++ b/src/drivers/win/taseditor/history.cpp @@ -1,10 +1,15 @@ -// --------------------------------------------------------------------------------- -// Implementation file of History class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of History class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ History - History of movie modifications [Singleton] + * stores array of snapshots and pointer to current (last) snapshot * saves and loads the data from a project file. On error: clears the array and starts new history by making snapshot of current movie data * on demand: checks the difference between the last snapshot and current movie, and makes a decision to create new point of rollback. In special cases it can create a point of rollback without checking the difference, assuming that caller already checked it @@ -13,8 +18,7 @@ History - History of movie modifications * regularly updates the state of "undo pointer" * implements the working of History List: creating, redrawing, clicks, auto-scrolling * stores resources: save id, ids and names of all possible types of modification, timings of "undo pointer" -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" diff --git a/src/drivers/win/taseditor/markers.cpp b/src/drivers/win/taseditor/markers.cpp index ece83aba..1da2a267 100644 --- a/src/drivers/win/taseditor/markers.cpp +++ b/src/drivers/win/taseditor/markers.cpp @@ -1,14 +1,18 @@ -// --------------------------------------------------------------------------------- -// Implementation file of Markers class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of Markers class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Markers - Snapshot of Markers state + * stores the data about Markers state: array of distributing Markers among movie frames, and array of Notes * saves and loads the data from a project file. On error: sends warning to caller * stores resources: max length of a Note -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "../common.h" #include "markers.h" diff --git a/src/drivers/win/taseditor/markers_manager.cpp b/src/drivers/win/taseditor/markers_manager.cpp index a3ffd0d5..69e6ebdf 100644 --- a/src/drivers/win/taseditor/markers_manager.cpp +++ b/src/drivers/win/taseditor/markers_manager.cpp @@ -1,10 +1,15 @@ -// --------------------------------------------------------------------------------- -// Implementation file of Markers_manager class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of Markers_manager class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Markers_manager - Manager of Markers [Singleton] + * stores one snapshot of Markers, representing current state of Markers in the project * saves and loads the data from a project file. On error: clears the data * regularly ensures that the size of current Markers array is not less than the number of frames in current input @@ -14,8 +19,7 @@ Markers_manager - Manager of Markers * also here's the code of editing Marker Notes * also here's the code of Find Note dialog * stores resources: save id, properties of searching for similar Notes -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" #include // for StrStrI diff --git a/src/drivers/win/taseditor/piano_roll.cpp b/src/drivers/win/taseditor/piano_roll.cpp index 44525bdf..af3c14c5 100644 --- a/src/drivers/win/taseditor/piano_roll.cpp +++ b/src/drivers/win/taseditor/piano_roll.cpp @@ -1,10 +1,15 @@ -// --------------------------------------------------------------------------------- -// Implementation file of PIANO_ROLL class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of PIANO_ROLL class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Piano Roll - Piano Roll interface [Singleton] + * implements the working of Piano Roll List: creating, redrawing, scrolling, clicks * on demand: scrolls visible area of the List to any given item: to Playback Cursor, to Selection Cursor, to "undo pointer", to a Marker * saves and loads current position of vertical scrolling from a project file. On error: scrolls the List to the beginning @@ -14,8 +19,7 @@ Piano Roll - Piano Roll interface * implements the working of mouse wheel: List scrolling, Playback cursor movement, Selection cursor movement * implements context menu on Right-click * stores resources: save id, ids of columns, widths of columns, tables of colors, gradient of Hot Changes, gradient of Header flashings, timings of flashes, all fonts used in TAS Editor, images -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" #include "utils/xstring.h" diff --git a/src/drivers/win/taseditor/playback.cpp b/src/drivers/win/taseditor/playback.cpp index 18ce82e9..dd3dfd97 100644 --- a/src/drivers/win/taseditor/playback.cpp +++ b/src/drivers/win/taseditor/playback.cpp @@ -1,10 +1,15 @@ -// --------------------------------------------------------------------------------- -// Implementation file of Playback class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of Playback class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Playback - Player of emulation states [Singleton] + * implements the working of movie player: show any frame (jump), run/cancel seekng. pause, rewinding * regularly tracks and controls emulation process, prompts redrawing of Piano Roll List rows, finishes seeking when reaching target frame, animates target frame, makes Piano Roll follow Playback cursor, detects if Playback cursor moved to another Marker and updates Note in the upper text field * implements the working of upper buttons << and >> (jumping on Markers) @@ -13,8 +18,7 @@ Playback - Player of emulation states * implements the working of progressbar: init, reset, set value, click (cancel seeking) * also here's the code of upper text field (for editing Marker Notes) * stores resources: upper text field prefix, timings of target frame animation, response times of GUI buttons, progressbar scale -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" diff --git a/src/drivers/win/taseditor/popup_display.cpp b/src/drivers/win/taseditor/popup_display.cpp index 4e6feb9c..5fd04165 100644 --- a/src/drivers/win/taseditor/popup_display.cpp +++ b/src/drivers/win/taseditor/popup_display.cpp @@ -1,16 +1,20 @@ -// --------------------------------------------------------------------------------- -// Implementation file of POPUP_DISPLAY class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of POPUP_DISPLAY class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Popup display - Manager of popup windows [Singleton] + * implements all operations with popup windows: initialization, redrawing, centering, screenshot decompression and conversion * regularly inspects changes of Bookmarks Manager and shows/updates/hides popup windows * on demend: updates contents of popup windows * stores resources: coordinates and appearance of popup windows, timings of fade in/out -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" #include "zlib.h" diff --git a/src/drivers/win/taseditor/recorder.cpp b/src/drivers/win/taseditor/recorder.cpp index da43d37e..d00eff29 100644 --- a/src/drivers/win/taseditor/recorder.cpp +++ b/src/drivers/win/taseditor/recorder.cpp @@ -1,16 +1,20 @@ -// --------------------------------------------------------------------------------- -// Implementation file of RECORDER class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of RECORDER class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Recorder - Tool for input recording [Singleton] + * at the moment of recording movie input (at the beginning of a frame) by emulator's call the Recorder intercepts input data and applies its filters (multitracking/etc), then reflects input changes into History and Greenzone * regularly tracks virtual joypad buttonpresses and provides data for Piano Roll List Header lights. Also reacts on external changes of Recording status, and updates GUI (Recorder panel and Bookmarks/Branches caption) * implements input editing in Read-only mode (ColumnSet by pressing buttons on virtual joypad) * stores resources: ids and names of multitracking modes, suffixes for TAS Editor window caption -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" diff --git a/src/drivers/win/taseditor/selection.cpp b/src/drivers/win/taseditor/selection.cpp index 93d04711..e066e72b 100644 --- a/src/drivers/win/taseditor/selection.cpp +++ b/src/drivers/win/taseditor/selection.cpp @@ -1,10 +1,15 @@ -// --------------------------------------------------------------------------------- -// Implementation file of SELECTION class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of SELECTION class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Selection - Manager of selections [Singleton] + * contains definition of the type "Set of selected frames" * stores array of Sets of selected frames (History of selections) * saves and loads the data from a project file. On error: clears the array and starts new history by making empty selection @@ -15,8 +20,7 @@ Selection - Manager of selections * implements the working of lower buttons << and >> (jumping on Markers) * also here's the code of lower text field (for editing Marker Notes) * stores resource: save id, lower text field prefix -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" diff --git a/src/drivers/win/taseditor/snapshot.cpp b/src/drivers/win/taseditor/snapshot.cpp index dbf10ed5..0dfcb741 100644 --- a/src/drivers/win/taseditor/snapshot.cpp +++ b/src/drivers/win/taseditor/snapshot.cpp @@ -1,9 +1,14 @@ -// --------------------------------------------------------------------------------- -// Implementation file of Snapshot class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of Snapshot class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Snapshot - Snapshot of all edited data + * stores the data of specific snapshot of the movie: size, input data (commands and joysticks), Markers at the moment of creating the snapshot, keyframe, type and description of the snapshot (including the time of creation) * also stores info about sequential recording of input * optionally can store map of Hot Changes @@ -14,8 +19,7 @@ Snapshot - Snapshot of all edited data * implements searching of first mismatch comparing two snapshots ot comparing snapshot to a movie * provides interface for reading certain data: reading input of any certain frame, reading value at any point of Hot Changes map * implements all operations with Hot Changes maps: copying (full/partial), updating/fading, setting new hot places by comparing input of two snapshots -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" #include "zlib.h" diff --git a/src/drivers/win/taseditor/splicer.cpp b/src/drivers/win/taseditor/splicer.cpp index 80c93d6a..efbe1ea4 100644 --- a/src/drivers/win/taseditor/splicer.cpp +++ b/src/drivers/win/taseditor/splicer.cpp @@ -1,17 +1,21 @@ -// --------------------------------------------------------------------------------- -// Implementation file of SPLICER class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of SPLICER class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Splicer - Tool for montage [Singleton] + * implements operations of mass-changing input: copy/paste, cloning, clearing region, insertion and deletion of frames, truncating * stores data about the selection used in last "Copy to Clipboard" operation * regularly checks the state of current selection and displays info on GUI, also displays info about input in Clipboard * when launching TAS Editor, it checks Clipboard contents * stores resources: mnemonics of buttons, texts for selection/clipboard info on GUI -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include #include "taseditor_project.h" diff --git a/src/drivers/win/taseditor/taseditor_config.cpp b/src/drivers/win/taseditor/taseditor_config.cpp index 383e1a8c..3c191e72 100644 --- a/src/drivers/win/taseditor/taseditor_config.cpp +++ b/src/drivers/win/taseditor/taseditor_config.cpp @@ -1,16 +1,20 @@ -// --------------------------------------------------------------------------------- -// Implementation file of TASEDITOR_CONFIG class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of TASEDITOR_CONFIG class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Config - Current settings [Singleton] + * stores current state of all TAS Editor settings * all TAS Editor modules can get or set any data within Config * when launching FCEUX, the emulator writes data from fceux.cfg file to the Config, when exiting it reads the data back to fceux.cfg * stores resources: default values of all settings, min/max values of settings -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "../common.h" #include "taseditor_config.h" diff --git a/src/drivers/win/taseditor/taseditor_lua.cpp b/src/drivers/win/taseditor/taseditor_lua.cpp index e0206e4f..1021949f 100644 --- a/src/drivers/win/taseditor/taseditor_lua.cpp +++ b/src/drivers/win/taseditor/taseditor_lua.cpp @@ -1,16 +1,20 @@ -// --------------------------------------------------------------------------------- -// Implementation file of TASEDITOR_LUA class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of TASEDITOR_LUA class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Lua - Manager of Lua features [Singleton] + * implements logic of all functions of "taseditor" Lua library * stores the list of pending input changes * on demend: (from FCEUX Lua engine) updates GUI items on "Lua" panel of TAS Editor window * stores resources: ids of joypads for input changes, max length of a name for applychanges() -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" diff --git a/src/drivers/win/taseditor/taseditor_project.cpp b/src/drivers/win/taseditor/taseditor_project.cpp index fa422939..a18b3607 100644 --- a/src/drivers/win/taseditor/taseditor_project.cpp +++ b/src/drivers/win/taseditor/taseditor_project.cpp @@ -1,16 +1,20 @@ -// --------------------------------------------------------------------------------- -// Implementation file of TASEDITOR_PROJECT class -// (C) 2011-2012 AnS -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of TASEDITOR_PROJECT class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Project - Header of working project [Singleton] + * stores the info about current project filename and about having unsaved changes * implements saving and loading project files from filesystem * implements autosave function * stores resources: autosave period scale, default filename -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" #include "utils/xstring.h" @@ -41,6 +45,7 @@ TASEDITOR_PROJECT::TASEDITOR_PROJECT() void TASEDITOR_PROJECT::init() { + // default filename for a new project is blank projectFile = ""; projectName = ""; fm2FileName = ""; diff --git a/src/drivers/win/taseditor/taseditor_window.cpp b/src/drivers/win/taseditor/taseditor_window.cpp index 773fa1bc..9b08577f 100644 --- a/src/drivers/win/taseditor/taseditor_window.cpp +++ b/src/drivers/win/taseditor/taseditor_window.cpp @@ -1,9 +1,15 @@ -// --------------------------------------------------------------------------------- -// Implementation file of TASEDITOR_WINDOW class -// --------------------------------------------------------------------------------- -/* +/* --------------------------------------------------------------------------------- +Implementation file of TASEDITOR_WINDOW class +Copyright (c) 2011-2012 AnS + +(The MIT License) +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------------ Window - User Interface [Singleton] + * implements all operations with TAS Editor window: creating, redrawing, resizing, moving, tooltips, clicks * processes OS messages and sends signals from user to TAS Editor modules (also implements some minor commands on-site, like Greenzone capacity dialog and such) * switches off/on emulator's keyboard input when the window loses/gains focus @@ -11,8 +17,7 @@ Window - User Interface * updates all checkboxes and menu items when some settings change * stores info about 10 last projects (File->Recent) and updates it when saving/loading files * stores resources: window caption, help filename, size and other properties of all GUI items -*/ -// --------------------------------------------------------------------------------- +------------------------------------------------------------------------------------ */ #include "taseditor_project.h" #include "../main.h"