From 96a20838f38a0c4021b21f4835627c8c8bb4827f Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Tue, 27 Feb 2024 21:23:24 +0100 Subject: [PATCH] Updated copyright notices for the new Flash AS 3.0 code --- neo/swf/SWF.h | 1 + neo/swf/SWF_Abc.cpp | 23 +++++++++++++++++++++-- neo/swf/SWF_Abc.h | 27 +++++++++++++++++++++++++++ neo/swf/SWF_Bitstream.cpp | 1 + neo/swf/SWF_Bitstream.h | 1 + neo/swf/SWF_Dictionary.cpp | 1 + neo/swf/SWF_Enums.h | 1 + neo/swf/SWF_EventDispatcher.cpp | 23 +++++++++++++++++++++-- neo/swf/SWF_EventDispatcher.h | 2 +- neo/swf/SWF_Events.cpp | 5 +---- neo/swf/SWF_Interpreter.cpp | 27 +++++++++++++++++++++++++++ neo/swf/SWF_Load.cpp | 1 + neo/swf/SWF_PlaceObject.cpp | 7 +++++++ neo/swf/SWF_ScriptFunction.h | 1 + neo/swf/SWF_ScriptVar.cpp | 1 + neo/swf/SWF_ScriptVar.h | 1 + neo/swf/SWF_ShapeParser.cpp | 4 +++- neo/swf/SWF_ShapeParser.h | 3 ++- neo/swf/SWF_SpriteInstance.cpp | 6 ++++-- neo/swf/SWF_SpriteInstance.h | 1 + neo/swf/SWF_TextInstance.cpp | 4 +++- neo/swf/SWF_TextInstance.h | 1 + neo/swf/SWF_Types.h | 4 ++++ 23 files changed, 132 insertions(+), 14 deletions(-) diff --git a/neo/swf/SWF.h b/neo/swf/SWF.h index 9a56a11caa..1396ffaae4 100644 --- a/neo/swf/SWF.h +++ b/neo/swf/SWF.h @@ -4,6 +4,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. Copyright (C) 2013 Robert Beckebans +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_Abc.cpp b/neo/swf/SWF_Abc.cpp index 48649bbe27..d0d97fdf1b 100644 --- a/neo/swf/SWF_Abc.cpp +++ b/neo/swf/SWF_Abc.cpp @@ -1,8 +1,27 @@ - /* =========================================================================== -Copyright (C) 2022 HvanGinneken +Doom 3 BFG Edition GPL Source Code +Copyright (C) 2023 Harrie van Ginneken + +This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). + +Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Doom 3 BFG Edition Source Code. If not, see . + +In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. =========================================================================== */ diff --git a/neo/swf/SWF_Abc.h b/neo/swf/SWF_Abc.h index c94dda07e6..e12e2a8cd6 100644 --- a/neo/swf/SWF_Abc.h +++ b/neo/swf/SWF_Abc.h @@ -1,3 +1,30 @@ +/* +=========================================================================== + +Doom 3 BFG Edition GPL Source Code +Copyright (C) 2023 Harrie van Ginneken + +This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). + +Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Doom 3 BFG Edition Source Code. If not, see . + +In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ #pragma once #include "SWF_Enums.h" diff --git a/neo/swf/SWF_Bitstream.cpp b/neo/swf/SWF_Bitstream.cpp index b3b2f32906..73efb0f0ab 100644 --- a/neo/swf/SWF_Bitstream.cpp +++ b/neo/swf/SWF_Bitstream.cpp @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_Bitstream.h b/neo/swf/SWF_Bitstream.h index b823c748c8..920e245bff 100644 --- a/neo/swf/SWF_Bitstream.h +++ b/neo/swf/SWF_Bitstream.h @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_Dictionary.cpp b/neo/swf/SWF_Dictionary.cpp index 724d1717e3..f5b4415996 100644 --- a/neo/swf/SWF_Dictionary.cpp +++ b/neo/swf/SWF_Dictionary.cpp @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_Enums.h b/neo/swf/SWF_Enums.h index 15d45db42d..3b964da5b0 100644 --- a/neo/swf/SWF_Enums.h +++ b/neo/swf/SWF_Enums.h @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_EventDispatcher.cpp b/neo/swf/SWF_EventDispatcher.cpp index e5c6aa9933..aa7d1c1486 100644 --- a/neo/swf/SWF_EventDispatcher.cpp +++ b/neo/swf/SWF_EventDispatcher.cpp @@ -1,8 +1,27 @@ - /* =========================================================================== -Copyright (C) 2022 HvanGinneken +Doom 3 BFG Edition GPL Source Code +Copyright (C) 2023 Harrie van Ginneken + +This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). + +Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Doom 3 BFG Edition Source Code. If not, see . + +In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. =========================================================================== */ diff --git a/neo/swf/SWF_EventDispatcher.h b/neo/swf/SWF_EventDispatcher.h index 674cee117e..992b6f68d1 100644 --- a/neo/swf/SWF_EventDispatcher.h +++ b/neo/swf/SWF_EventDispatcher.h @@ -2,7 +2,7 @@ =========================================================================== Doom 3 BFG Edition GPL Source Code -Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_Events.cpp b/neo/swf/SWF_Events.cpp index 187e008101..1f568f5ee9 100644 --- a/neo/swf/SWF_Events.cpp +++ b/neo/swf/SWF_Events.cpp @@ -4,6 +4,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. Copyright (C) 2016-2017 Dustin Land +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). @@ -161,10 +162,6 @@ idSWFScriptObject* idSWF::HitTest( idSWFSpriteInstance* spriteInstance, const sw else if( entry->type == SWF_DICT_MORPH ) { // FIXME: this should be roughly the same as SWF_DICT_SHAPE - - //} else if( entry->type == SWF_DICT_TEXT ) - //{ - // FIXME: this should be roughly the same as SWF_DICT_SHAPE } else if( entry->type == SWF_DICT_EDITTEXT || entry->type == SWF_DICT_TEXT ) { diff --git a/neo/swf/SWF_Interpreter.cpp b/neo/swf/SWF_Interpreter.cpp index 9e6f8fe159..aa7d155a29 100644 --- a/neo/swf/SWF_Interpreter.cpp +++ b/neo/swf/SWF_Interpreter.cpp @@ -1,3 +1,30 @@ +/* +=========================================================================== + +Doom 3 BFG Edition GPL Source Code +Copyright (C) 2023 Harrie van Ginneken + +This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). + +Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Doom 3 BFG Edition Source Code. If not, see . + +In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ #include "precompiled.h" #pragma hdrstop diff --git a/neo/swf/SWF_Load.cpp b/neo/swf/SWF_Load.cpp index 2407f81c26..52f491f57e 100644 --- a/neo/swf/SWF_Load.cpp +++ b/neo/swf/SWF_Load.cpp @@ -4,6 +4,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. Copyright (C) 2013-2015 Robert Beckebans +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_PlaceObject.cpp b/neo/swf/SWF_PlaceObject.cpp index 9d56eca963..ede8ce5f96 100644 --- a/neo/swf/SWF_PlaceObject.cpp +++ b/neo/swf/SWF_PlaceObject.cpp @@ -147,6 +147,13 @@ void idSWFSpriteInstance::PlaceObject3( idSWFBitStream& bitstream ) uint64 flags2 = bitstream.ReadU8(); uint16 depth = bitstream.ReadU16(); + /* RB: TODO REVIEW - it has been removed compared to BFG edition + if( ( flags2 & PlaceFlagHasClassName ) != 0 || ( ( ( flags2 & PlaceFlagHasImage ) != 0 ) && ( ( flags1 & PlaceFlagHasCharacter ) != 0 ) ) ) + { + bitstream.ReadString(); // ignored + } + */ + int characterID = -1; if( ( flags1 & PlaceFlagHasCharacter ) != 0 ) { diff --git a/neo/swf/SWF_ScriptFunction.h b/neo/swf/SWF_ScriptFunction.h index 6ae57e3a85..d3b6c87a30 100644 --- a/neo/swf/SWF_ScriptFunction.h +++ b/neo/swf/SWF_ScriptFunction.h @@ -4,6 +4,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. Copyright (C) 2015 Robert Beckebans +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_ScriptVar.cpp b/neo/swf/SWF_ScriptVar.cpp index 13a4cffa10..652e7e54c2 100644 --- a/neo/swf/SWF_ScriptVar.cpp +++ b/neo/swf/SWF_ScriptVar.cpp @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_ScriptVar.h b/neo/swf/SWF_ScriptVar.h index f578fdbbf2..0fe1f9b654 100644 --- a/neo/swf/SWF_ScriptVar.h +++ b/neo/swf/SWF_ScriptVar.h @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_ShapeParser.cpp b/neo/swf/SWF_ShapeParser.cpp index 96f1177c71..e896d99f0b 100644 --- a/neo/swf/SWF_ShapeParser.cpp +++ b/neo/swf/SWF_ShapeParser.cpp @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). @@ -31,9 +32,9 @@ If you have questions concerning this license or the applicable additional terms #pragma warning( disable: 4189 ) // local variable is initialized but not referenced +// HarrievG begin void idSWFShapeParser::MakeCap( idSWFShapeParser::swfSPDrawLine_t& spld, idSWFShapeDrawLine& ld, swfSPMorphEdge_t& edge, bool end ) { - //figure out what the orientation of the cap is. idVec2 up = ( verts[edge.start.v0] - verts[edge.start.v1] ); @@ -246,6 +247,7 @@ void idSWFShapeParser::Parse( idSWFBitStream& bitstream, idSWFShape& shape, int } } } +// HarrievG end /* ======================== diff --git a/neo/swf/SWF_ShapeParser.h b/neo/swf/SWF_ShapeParser.h index 8f7eb01e4d..1146881620 100644 --- a/neo/swf/SWF_ShapeParser.h +++ b/neo/swf/SWF_ShapeParser.h @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). @@ -89,7 +90,7 @@ class idSWFShapeParser void TriangulateSoup( idSWFFontGlyph& shape ); int FindEarVert( const swfSPLineLoop_t& loop ); void AddUniqueVert( idSWFShapeDrawFill& drawFill, const idVec2& start, const idVec2& end ); - void MakeCap( swfSPDrawLine_t& spld, idSWFShapeDrawLine& ld , swfSPMorphEdge_t& edge, bool end ); + void MakeCap( swfSPDrawLine_t& spld, idSWFShapeDrawLine& ld , swfSPMorphEdge_t& edge, bool end ); // HarrievG }; #endif // !__SWF_SHAPEPARSER_H__ diff --git a/neo/swf/SWF_SpriteInstance.cpp b/neo/swf/SWF_SpriteInstance.cpp index 30eaf3074f..58c1021c7b 100644 --- a/neo/swf/SWF_SpriteInstance.cpp +++ b/neo/swf/SWF_SpriteInstance.cpp @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). @@ -133,11 +134,11 @@ void idSWFSpriteInstance::FreeDisplayList() { for( int i = 0; i < displayList.Num(); i++ ) { - if( displayList[i].spriteInstance ) { sprite->swf->spriteInstanceAllocator.Free( displayList[i].spriteInstance ); } + if( displayList[i].textInstance ) { sprite->swf->textInstanceAllocator.Free( displayList[i].textInstance ); @@ -1670,7 +1671,8 @@ SWF_SPRITE_NATIVE_VAR_DEFINE_GET( _name ) SWF_SPRITE_PTHIS_GET( "_name" ); return pThis->name.c_str(); } -//Im not sure how much of the 'legacy' underscore prefixed functions need to be changed for as3.0. + +// HarrievG: I'm not sure how much of the 'legacy' underscore prefixed functions need to be changed for as3.0. //if more is needed, we should change the macro to work for both legacy AS and 3.0 SWF_SPRITE_NATIVE_VAR_DEFINE_GET( name ) { diff --git a/neo/swf/SWF_SpriteInstance.h b/neo/swf/SWF_SpriteInstance.h index e14b60924e..123c04d614 100644 --- a/neo/swf/SWF_SpriteInstance.h +++ b/neo/swf/SWF_SpriteInstance.h @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_TextInstance.cpp b/neo/swf/SWF_TextInstance.cpp index 836d2f46de..f8379458a3 100644 --- a/neo/swf/SWF_TextInstance.cpp +++ b/neo/swf/SWF_TextInstance.cpp @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). @@ -68,6 +69,7 @@ idSWFTextInstance::~idSWFTextInstance() subtitleTimingInfo.Clear(); } +// HarrievG begin void idSWFTextInstance::Init( idSWFText* _text, idSWF* _swf ) { editText = nullptr; @@ -139,8 +141,8 @@ void idSWFTextInstance::Init( idSWFText* _text, idSWF* _swf ) scriptObject.SetPrototype( &textInstanceScriptObjectPrototype ); scriptObject.SetText( this ); scriptObject.SetNoAutoDelete( true ); - } +// HarrievG end /* ======================== diff --git a/neo/swf/SWF_TextInstance.h b/neo/swf/SWF_TextInstance.h index d2660e97fd..5257431fe9 100644 --- a/neo/swf/SWF_TextInstance.h +++ b/neo/swf/SWF_TextInstance.h @@ -3,6 +3,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). diff --git a/neo/swf/SWF_Types.h b/neo/swf/SWF_Types.h index c291cab3e1..0485f165e1 100644 --- a/neo/swf/SWF_Types.h +++ b/neo/swf/SWF_Types.h @@ -4,6 +4,7 @@ Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. Copyright (C) 2013-2015 Robert Beckebans +Copyright (C) 2023 Harrie van Ginneken This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). @@ -162,9 +163,12 @@ struct swfLineStyle_t uint16 endWidth; swfColorRGBA_t startColor; swfColorRGBA_t endColor; + + // HarrievG begin uint8 startCapStyle; uint8 endCapStyle; enum capStyle { round = 0, none, square }; + // HarrievG end }; struct swfGradientRecord_t {