1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-05-09 14:24:48 -04:00

Compare commits

..

No commits in common. "9db6589717f2cc6a95078fac1753c98c93a841c1" and "739692d970476607f177ef77e2a3a0f1f7f6ce18" have entirely different histories.

19 changed files with 537 additions and 388 deletions

476
LICENSE
View file

@ -1,201 +1,373 @@
The Artistic License 2.0 Mozilla Public License Version 2.0
==================================
Copyright (c) 2000-2006, The Perl Foundation. 1. Definitions
--------------
Everyone is permitted to copy and distribute verbatim copies 1.1. "Contributor"
of this license document, but changing it is not allowed. means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
Preamble 1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
This license establishes the terms under which a given free software 1.3. "Contribution"
Package may be copied, modified, distributed, and/or redistributed. means Covered Software of a particular Contributor.
The intent is that the Copyright Holder maintains some artistic
control over the development of that Package while still keeping the
Package available as open source and free software.
You are always permitted to make arrangements wholly outside of this 1.4. "Covered Software"
license directly with the Copyright Holder of a given Package. If the means Source Code Form to which the initial Contributor has attached
terms of this license do not permit the full use that you propose to the notice in Exhibit A, the Executable Form of such Source Code
make of the Package, you should contact the Copyright Holder and seek Form, and Modifications of such Source Code Form, in each case
a different licensing arrangement. including portions thereof.
Definitions 1.5. "Incompatible With Secondary Licenses"
means
"Copyright Holder" means the individual(s) or organization(s) (a) that the initial Contributor has attached the notice described
named in the copyright notice for the entire Package. in Exhibit B to the Covered Software; or
"Contributor" means any party that has contributed code or other (b) that the Covered Software was made available under the terms of
material to the Package, in accordance with the Copyright Holder's version 1.1 or earlier of the License, but not also under the
procedures. terms of a Secondary License.
"You" and "your" means any person who would like to copy, 1.6. "Executable Form"
distribute, or modify the Package. means any form of the work other than Source Code Form.
"Package" means the collection of files distributed by the 1.7. "Larger Work"
Copyright Holder, and derivatives of that collection and/or of means a work that combines Covered Software with other material, in
those files. A given Package may consist of either the Standard a separate file or files, that is not Covered Software.
Version, or a Modified Version.
"Distribute" means providing a copy of the Package or making it 1.8. "License"
accessible to anyone else, or in the case of a company or means this document.
organization, to others outside of your company or organization.
"Distributor Fee" means any fee that you charge for Distributing 1.9. "Licensable"
this Package or providing support for this Package to another means having the right to grant, to the maximum extent possible,
party. It does not mean licensing fees. whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
"Standard Version" refers to the Package if it has not been 1.10. "Modifications"
modified, or has been modified only in ways explicitly requested means any of the following:
by the Copyright Holder.
"Modified Version" means the Package, if it has been changed, and (a) any file in Source Code Form that results from an addition to,
such changes were not explicitly requested by the Copyright deletion from, or modification of the contents of Covered
Holder. Software; or
"Original License" means this Artistic License as Distributed with (b) any new file in Source Code Form that contains any Covered
the Standard Version of the Package, in its current version or as Software.
it may be modified by The Perl Foundation in the future.
"Source" form means the source code, documentation source, and 1.11. "Patent Claims" of a Contributor
configuration files for the Package. means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
"Compiled" form means the compiled bytecode, object code, binary, 1.12. "Secondary License"
or any other form resulting from mechanical transformation or means either the GNU General Public License, Version 2.0, the GNU
translation of the Source form. Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
Permission for Use and Modification Without Distribution 1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
(1) You are permitted to use the Standard Version and create and use 2. License Grants and Conditions
Modified Versions for any purpose without restriction, provided that --------------------------------
you do not Distribute the Modified Version.
2.1. Grants
Permissions for Redistribution of the Standard Version Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(2) You may Distribute verbatim copies of the Source form of the (a) under intellectual property rights (other than patent or trademark)
Standard Version of this Package in any medium without restriction, Licensable by such Contributor to use, reproduce, make available,
either gratis or for a Distributor Fee, provided that you duplicate modify, display, perform, distribute, and otherwise exploit its
all of the original copyright notices and associated disclaimers. At Contributions, either on an unmodified basis, with Modifications, or
your discretion, such verbatim copies may or may not include a as part of a Larger Work; and
Compiled form of the Package.
(3) You may apply any bug fixes, portability changes, and other (b) under Patent Claims of such Contributor to make, use, sell, offer
modifications made available from the Copyright Holder. The resulting for sale, have made, import, and otherwise transfer either its
Package will still be considered the Standard Version, and as such Contributions or its Contributor Version.
will be subject to the Original License.
2.2. Effective Date
Distribution of Modified Versions of the Package as Source The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
(4) You may Distribute your Modified Version as Source (either gratis 2.3. Limitations on Grant Scope
or for a Distributor Fee, and with or without a Compiled form of the
Modified Version) provided that you clearly document how it differs
from the Standard Version, including, but not limited to, documenting
any non-standard features, executables, or modules, and provided that
you do at least ONE of the following:
(a) make the Modified Version available to the Copyright Holder The licenses granted in this Section 2 are the only rights granted under
of the Standard Version, under the Original License, so that the this License. No additional rights or licenses will be implied from the
Copyright Holder may include your modifications in the Standard distribution or licensing of Covered Software under this License.
Version. Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(b) ensure that installation of your Modified Version does not (a) for any code that a Contributor has removed from Covered Software;
prevent the user installing or running the Standard Version. In or
addition, the Modified Version must bear a name that is different
from the name of the Standard Version.
(c) allow anyone who receives a copy of the Modified Version to (b) for infringements caused by: (i) Your and any other third party's
make the Source form of the Modified Version available to others modifications of Covered Software, or (ii) the combination of its
under Contributions with other software (except as part of its Contributor
Version); or
(i) the Original License or
(ii) a license that permits the licensee to freely copy, (c) under Patent Claims infringed by Covered Software in the absence of
modify and redistribute the Modified Version using the same its Contributions.
licensing terms that apply to the copy that the licensee
received, and requires that the Source form of the Modified
Version, and of any works derived from it, be made freely
available in that license fees are prohibited but Distributor
Fees are allowed.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
Distribution of Compiled Forms of the Standard Version 2.4. Subsequent Licenses
or Modified Versions without the Source
(5) You may Distribute Compiled forms of the Standard Version without No Contributor makes additional grants as a result of Your choice to
the Source, provided that you include complete instructions on how to distribute the Covered Software under a subsequent version of this
get the Source of the Standard Version. Such instructions must be License (see Section 10.2) or under the terms of a Secondary License (if
valid at the time of your distribution. If these instructions, at any permitted under the terms of Section 3.3).
time while you are carrying out such distribution, become invalid, you
must provide new instructions on demand or cease further distribution.
If you provide valid instructions or cease distribution within thirty
days after you become aware that the instructions are invalid, then
you do not forfeit any of your rights under this license.
(6) You may Distribute a Modified Version in Compiled form without 2.5. Representation
the Source, provided that you comply with Section 4 with respect to
the Source of the Modified Version.
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
Aggregating or Linking the Package 2.6. Fair Use
(7) You may aggregate the Package (either the Standard Version or This License is not intended to limit any rights You have under
Modified Version) with other packages and Distribute the resulting applicable copyright doctrines of fair use, fair dealing, or other
aggregation provided that you do not charge a licensing fee for the equivalents.
Package. Distributor Fees are permitted, and licensing fees for other
components in the aggregation are permitted. The terms of this license
apply to the use and Distribution of the Standard or Modified Versions
as included in the aggregation.
(8) You are permitted to link Modified and Standard Versions with 2.7. Conditions
other works, to embed the Package in a larger work of your own, or to
build stand-alone binary or bytecode versions of applications that
include the Package, and Distribute the result without restriction,
provided the result does not expose a direct interface to the Package.
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
Items That are Not Considered Part of a Modified Version 3. Responsibilities
-------------------
(9) Works (including, but not limited to, modules and scripts) that 3.1. Distribution of Source Form
merely extend or make use of the Package, do not, by themselves, cause
the Package to be a Modified Version. In addition, such works are not
considered parts of the Package itself, and are not subject to the
terms of this license.
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
General Provisions 3.2. Distribution of Executable Form
(10) Any use, modification, and distribution of the Standard or If You distribute Covered Software in Executable Form then:
Modified Versions is governed by this Artistic License. By using,
modifying or distributing the Package, you accept this license. Do not
use, modify, or distribute the Package, if you do not accept this
license.
(11) If your Modified Version has been derived from a Modified (a) such Covered Software must also be made available in Source Code
Version made by someone other than you, you are nevertheless required Form, as described in Section 3.1, and You must inform recipients of
to ensure that your Modified Version complies with the requirements of the Executable Form how they can obtain a copy of such Source Code
this license. Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(12) This license does not grant you the right to use any trademark, (b) You may distribute such Executable Form under the terms of this
service mark, tradename, or logo of the Copyright Holder. License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
(13) This license includes the non-exclusive, worldwide, 3.3. Distribution of a Larger Work
free-of-charge patent license to make, have made, use, offer to sell,
sell, import and otherwise transfer the Package with respect to any
patent claims licensable by the Copyright Holder that are necessarily
infringed by the Package. If you institute patent litigation
(including a cross-claim or counterclaim) against any party alleging
that the Package constitutes direct or contributory patent
infringement, then this Artistic License to you shall terminate on the
date that such litigation is filed.
(14) Disclaimer of Warranty: You may create and distribute a Larger Work under terms of Your choice,
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS provided that You also comply with the requirements of this License for
IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED the Covered Software. If the Larger Work is a combination of Covered
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR Software with a work governed by one or more Secondary Licenses, and the
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL Covered Software is not Incompatible With Secondary Licenses, this
LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL License permits You to additionally distribute such Covered Software
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL under the terms of such Secondary License(s), so that the recipient of
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF the Larger Work may, at their option, further distribute the Covered
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View file

@ -5,16 +5,14 @@
![](screenshot.gif) ![](screenshot.gif)
Tony's Dress Up is a re-imagining of my first (and only) Flash game series, ZC's Dress Up , developed back in 2007. Both this and the originals are heavily inspired by The Sims 2: Body Shop in their own unique ways. Tony's Dress Up is a re-imagining of my first Flash game, ZC's Dress Up, developed back in 2007. I've included the Flash copies in the ``/archive`` directory. They can be played using [Ruffle](https://ruffle.rs/)'s demo page.
I've included the original Flash releases in the ``/archive`` directory. They can be played using [Ruffle](https://ruffle.rs/)'s demo page.
## Getting Started ## Getting Started
### Prerequisites ### Prerequisites
- Godot Engine 3.2 LTS or later - Godot Engine 3.2
## Authors ## Authors
@ -26,7 +24,7 @@ I've included the original Flash releases in the ``/archive`` directory. They ca
## License ## License
The source and assets are licensed under the Artistic-2.0 License and CC-BY, respectfully - see the [LICENSE](LICENSE) and [ASSET-LICENSE](ASSET-LICENSE) for more details. The source and assets are licensed under the MPL 2.0 License and CC-BY, respectfully - see the [LICENSE](LICENSE) and [ASSET-LICENSE](ASSET-LICENSE) for more details.
The Flash games included are closed source, but considered abandonware. Feel free to share them on archives. The Flash games included are closed source, but considered abandonware. Feel free to share them on archives.

View file

@ -39,9 +39,14 @@ window/size/width=800
window/size/height=500 window/size/height=500
window/size/resizable=false window/size/resizable=false
window/energy_saving/keep_screen_on=false window/energy_saving/keep_screen_on=false
mouse_cursor/custom_image="res://sprites/clothes/cursor.png"
window/stretch/mode="2d" window/stretch/mode="2d"
window/stretch/aspect="keep" window/stretch/aspect="keep"
[gui]
theme/custom_font="res://fonts/kenny_pixel_25.tres"
[importer_defaults] [importer_defaults]
texture={ texture={

View file

@ -28,9 +28,114 @@
[ext_resource path="res://sprites/clothes/blank_top.png" type="Texture" id=26] [ext_resource path="res://sprites/clothes/blank_top.png" type="Texture" id=26]
[ext_resource path="res://sprites/character/character_base_head.svg" type="Texture" id=27] [ext_resource path="res://sprites/character/character_base_head.svg" type="Texture" id=27]
[ext_resource path="res://sprites/character/mouth/mouth11.png" type="Texture" id=28] [ext_resource path="res://sprites/character/mouth/mouth11.png" type="Texture" id=28]
[ext_resource path="res://scripts/character_base.gd" type="Script" id=29]
[sub_resource type="SpriteFrames" id=1] [sub_resource type="GDScript" id=1]
script/source = "# Anthony Wilcox licenses this file to you under the MPL license.
# See the LICENSE file in the project root for more information.
extends Node2D
const _TDU_VERSION = \"0.2\"
const _SAVE_FILE = \"user://character.tdu\"
onready var character = preload(\"res://resources/character.tres\")
onready var blank_accessory = preload(\"res://sprites/clothes/blank_top.png\")
onready var base_top = preload(\"res://sprites/character/character_base_top.svg\")
onready var base_bottom = preload(\"res://sprites/character/character_base_legs.svg\")
onready var accessory = $body/accessory
#onready var underwear = $Undies
onready var bottom = $body/legs
onready var top = $body/top
onready var eyes = $body/head/eyes
onready var mouth = $body/head/mouth
func _process(delta):
if character.accessory != null:
accessory.texture = character.accessory
# if character.underwear != null:
# underwear.texture = character.underwear
if character.bottom != null:
bottom.texture = character.bottom
if character.top != null:
top.texture = character.top
func save_game():
var data_file = {
\"version\": _TDU_VERSION,
\"game_ver\": GameData.version,
\"accessory\": \"res://sprites/clothes/blank_top.png\",
\"top\": \"res://sprites/clothes/blank_top.png\",
\"bottom\": \"res://sprites/character/character_base_legs.svg\",
}
data_file[\"accessory\"] = accessory.texture.resource_path
data_file[\"top\"] = top.texture.resource_path
data_file[\"bottom\"] = bottom.texture.resource_path
var file = File.new()
if file.open(_SAVE_FILE, File.WRITE) != 0:
print(\"Error opening file\")
return
var json_file = to_json(data_file)
file.store_line(json_file)
print_debug(json_file)
file.close()
func load_game():
var file = File.new()
if not file.file_exists(_SAVE_FILE):
print(\"File not found!\")
return
if file.open(_SAVE_FILE, File.READ) != 0:
print(\"Error opening file\")
return
var data = parse_json(file.get_line())
var top_texture = ImageTexture.new()
var accessory_texture = ImageTexture.new()
var bottom_texture = ImageTexture.new()
var top_image = Image.new()
var accessory_image = Image.new()
var bottom_image = Image.new()
top_image.load(data[\"top\"])
top_texture.create_from_image(top_image)
top.texture = top_texture
bottom_image.load(data[\"bottom\"])
top_texture.create_from_image(top_image)
bottom.texture = top_texture
accessory_image.load(data[\"accessory\"])
accessory_texture.create_from_image(top_image)
accessory.texture = accessory_texture
file.close()
func _on_clearBtn_pressed():
$Click.play()
character.accessory = blank_accessory
character.bottom = base_bottom
character.top = base_top
func _on_SaveBtn_pressed():
$Click.play()
GameEvents.emit_signal(\"indicate\")
save_game()
func _on_LoadBtn_pressed():
$Click.play()
GameEvents.emit_signal(\"indicate\")
load_game()
"
[sub_resource type="SpriteFrames" id=2]
animations = [ { animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ) ], "frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ) ],
"loop": true, "loop": true,
@ -38,7 +143,7 @@ animations = [ {
"speed": 2.0 "speed": 2.0
} ] } ]
[sub_resource type="SpriteFrames" id=2] [sub_resource type="SpriteFrames" id=3]
animations = [ { animations = [ {
"frames": [ ExtResource( 6 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ) ], "frames": [ ExtResource( 6 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ) ],
"loop": true, "loop": true,
@ -46,7 +151,7 @@ animations = [ {
"speed": 2.0 "speed": 2.0
} ] } ]
[sub_resource type="SpriteFrames" id=3] [sub_resource type="SpriteFrames" id=4]
animations = [ { animations = [ {
"frames": [ ExtResource( 13 ), ExtResource( 14 ), ExtResource( 15 ), ExtResource( 16 ), ExtResource( 17 ), ExtResource( 18 ), ExtResource( 19 ), ExtResource( 20 ), ExtResource( 21 ), ExtResource( 22 ), ExtResource( 28 ), ExtResource( 23 ) ], "frames": [ ExtResource( 13 ), ExtResource( 14 ), ExtResource( 15 ), ExtResource( 16 ), ExtResource( 17 ), ExtResource( 18 ), ExtResource( 19 ), ExtResource( 20 ), ExtResource( 21 ), ExtResource( 22 ), ExtResource( 28 ), ExtResource( 23 ) ],
"loop": true, "loop": true,
@ -54,97 +159,55 @@ animations = [ {
"speed": 2.0 "speed": 2.0
} ] } ]
[node name="CharacterBase" type="Node2D"] [node name="characterBase" type="Node2D"]
position = Vector2( -19, -92 ) position = Vector2( -19, -92 )
script = ExtResource( 29 ) script = SubResource( 1 )
[node name="Click" type="AudioStreamPlayer" parent="."] [node name="Click" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 24 ) stream = ExtResource( 24 )
[node name="Shadow" type="Sprite" parent="."] [node name="shadow" type="Sprite" parent="."]
position = Vector2( 4.84271, 244.714 ) position = Vector2( 4.84271, 244.714 )
texture = ExtResource( 1 ) texture = ExtResource( 1 )
[node name="Body" type="Node2D" parent="."] [node name="body" type="Node2D" parent="."]
__meta__ = { __meta__ = {
"_edit_lock_": true "_edit_lock_": true
} }
[node name="Tail" type="AnimatedSprite" parent="Body"] [node name="tail" type="AnimatedSprite" parent="body"]
position = Vector2( -33.7592, 99.4079 ) position = Vector2( -33.7592, 99.4079 )
scale = Vector2( 0.927713, 1 ) scale = Vector2( 0.927713, 1 )
frames = SubResource( 1 ) frames = SubResource( 2 )
frame = 2
playing = true playing = true
[node name="Legs" type="Sprite" parent="Body"] [node name="legs" type="Sprite" parent="body"]
position = Vector2( 1.47027, 191.868 ) position = Vector2( 1.47027, 191.868 )
texture = ExtResource( 5 ) texture = ExtResource( 5 )
[node name="Top" type="Sprite" parent="Body"] [node name="top" type="Sprite" parent="body"]
position = Vector2( 7, 78 ) position = Vector2( 7, 78 )
texture = ExtResource( 25 ) texture = ExtResource( 25 )
[node name="Head" type="Sprite" parent="Body"] [node name="head" type="Sprite" parent="body"]
position = Vector2( 10.6805, -25.1047 ) position = Vector2( 10.6805, -25.1047 )
texture = ExtResource( 27 ) texture = ExtResource( 27 )
[node name="Eyes" type="AnimatedSprite" parent="Body/Head"] [node name="eyes" type="AnimatedSprite" parent="body/head"]
position = Vector2( 17.6857, 4.22147 ) position = Vector2( 17.6857, 4.22147 )
frames = SubResource( 2 ) frames = SubResource( 3 )
frame = 2 frame = 2
playing = true playing = true
[node name="Mouth" type="AnimatedSprite" parent="Body/Head"] [node name="mouth" type="AnimatedSprite" parent="body/head"]
position = Vector2( 38.1195, 8.68453 ) position = Vector2( 38.1195, 8.68453 )
frames = SubResource( 3 ) frames = SubResource( 4 )
frame = 10 frame = 5
playing = true playing = true
[node name="Accessory" type="Sprite" parent="Body"] [node name="accessory" type="Sprite" parent="body"]
position = Vector2( 9.54095, 73.0832 ) position = Vector2( 9.54095, 73.0832 )
texture = ExtResource( 26 ) texture = ExtResource( 26 )
__meta__ = { __meta__ = {
"_edit_lock_": true "_edit_lock_": true
} }
[node name="Controls" type="CanvasLayer" parent="."]
[node name="Container" type="Control" parent="Controls"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -19.0
margin_top = -92.0
margin_right = -19.0
margin_bottom = -92.0
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": true
}
[node name="ExportWin" type="FileDialog" parent="Controls/Container"]
anchor_left = 0.215
anchor_top = 0.21
anchor_right = 0.785
anchor_bottom = 0.79
window_title = "Export"
access = 1
current_dir = "user://Users/tonytins/Projects/tonysdressup"
current_path = "user://Users/tonytins/Projects/tonysdressup/"
__meta__ = {
"_edit_use_anchors_": true
}
[node name="ImportWin" type="FileDialog" parent="Controls/Container"]
anchor_left = 0.215
anchor_top = 0.21
anchor_right = 0.785
anchor_bottom = 0.79
window_title = "Open a File"
mode = 0
access = 1
current_dir = "user://Users/tonytins/Projects/tonysdressup"
current_path = "user://Users/tonytins/Projects/tonysdressup/"
__meta__ = {
"_edit_use_anchors_": true
}

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=2] [gd_scene load_steps=13 format=2]
[ext_resource path="res://scenes/character_base.tscn" type="PackedScene" id=1] [ext_resource path="res://scenes/character_base.tscn" type="PackedScene" id=1]
[ext_resource path="res://sprites/world/background.svg" type="Texture" id=2] [ext_resource path="res://sprites/world/background.svg" type="Texture" id=2]
@ -9,8 +9,6 @@
[ext_resource path="res://sprites/symbols/file-upload.svg" type="Texture" id=7] [ext_resource path="res://sprites/symbols/file-upload.svg" type="Texture" id=7]
[ext_resource path="res://scripts/ui.gd" type="Script" id=8] [ext_resource path="res://scripts/ui.gd" type="Script" id=8]
[ext_resource path="res://sprites/symbols/file-download.svg" type="Texture" id=9] [ext_resource path="res://sprites/symbols/file-download.svg" type="Texture" id=9]
[ext_resource path="res://sprites/symbols/file-upload-disabled.svg" type="Texture" id=10]
[ext_resource path="res://sprites/symbols/file-download-disabled.svg" type="Texture" id=11]
[ext_resource path="res://sprites/symbols/spinner.svg" type="Texture" id=12] [ext_resource path="res://sprites/symbols/spinner.svg" type="Texture" id=12]
[ext_resource path="res://scripts/spinner.gd" type="Script" id=13] [ext_resource path="res://scripts/spinner.gd" type="Script" id=13]
[ext_resource path="res://scripts/game.gd" type="Script" id=14] [ext_resource path="res://scripts/game.gd" type="Script" id=14]
@ -37,11 +35,11 @@ position = Vector2( 35.118, -14.56 )
texture = ExtResource( 6 ) texture = ExtResource( 6 )
[node name="characterBase" parent="." instance=ExtResource( 1 )] [node name="characterBase" parent="." instance=ExtResource( 1 )]
position = Vector2( 141.307, 225.012 ) position = Vector2( 133.807, 230.615 )
[node name="Controls" type="CanvasLayer" parent="."] [node name="Controls" type="CanvasLayer" parent="."]
[node name="Container" type="Control" parent="Controls"] [node name="DressUp" type="Control" parent="Controls"]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
script = ExtResource( 8 ) script = ExtResource( 8 )
@ -51,14 +49,14 @@ __meta__ = {
} }
version = "1.10" version = "1.10"
[node name="Wardrobe" parent="Controls/Container" instance=ExtResource( 4 )] [node name="wardrobe" parent="Controls/DressUp" instance=ExtResource( 4 )]
anchor_left = 0.33875 anchor_left = 0.33875
anchor_top = 0.054 anchor_top = 0.054
anchor_right = 1.05 anchor_right = 1.05
anchor_bottom = 0.9 anchor_bottom = 0.9
margin_right = 6.10352e-05 margin_right = 6.10352e-05
[node name="Spinner" type="TextureRect" parent="Controls/Container"] [node name="Spinner" type="TextureRect" parent="Controls/DressUp"]
visible = false visible = false
anchor_left = 0.945785 anchor_left = 0.945785
anchor_top = 0.153026 anchor_top = 0.153026
@ -70,10 +68,10 @@ __meta__ = {
"_edit_use_anchors_": true "_edit_use_anchors_": true
} }
[node name="Timer" type="Timer" parent="Controls/Container/Spinner"] [node name="Timer" type="Timer" parent="Controls/DressUp/Spinner"]
wait_time = 2.0 wait_time = 2.0
[node name="CenterBtns" type="CenterContainer" parent="Controls/Container"] [node name="CenterBtns" type="CenterContainer" parent="Controls/DressUp"]
anchor_left = 0.35875 anchor_left = 0.35875
anchor_top = 0.792 anchor_top = 0.792
anchor_right = 0.99625 anchor_right = 0.99625
@ -82,36 +80,37 @@ __meta__ = {
"_edit_use_anchors_": true "_edit_use_anchors_": true
} }
[node name="ButtonCtr" type="HBoxContainer" parent="Controls/Container/CenterBtns"] [node name="ButtonCtr" type="HBoxContainer" parent="Controls/DressUp/CenterBtns"]
margin_left = 197.0 margin_left = 179.0
margin_top = 7.0 margin_top = 4.0
margin_right = 312.0 margin_right = 330.0
margin_bottom = 39.0 margin_bottom = 42.0
custom_constants/separation = 20 custom_constants/separation = 20
[node name="ExportBtn" type="TextureButton" parent="Controls/Container/CenterBtns/ButtonCtr"] [node name="SaveBtn" type="Button" parent="Controls/DressUp/CenterBtns/ButtonCtr"]
margin_right = 25.0 margin_right = 37.0
margin_bottom = 32.0 margin_bottom = 38.0
hint_tooltip = "Export" hint_tooltip = "Save"
texture_normal = ExtResource( 7 ) icon = ExtResource( 7 )
texture_disabled = ExtResource( 10 ) flat = true
[node name="ImportBtn" type="TextureButton" parent="Controls/Container/CenterBtns/ButtonCtr"] [node name="LoadBtn" type="Button" parent="Controls/DressUp/CenterBtns/ButtonCtr"]
margin_left = 45.0 margin_left = 57.0
margin_right = 70.0 margin_right = 94.0
margin_bottom = 32.0 margin_bottom = 38.0
hint_tooltip = "Import" hint_tooltip = "Load"
texture_normal = ExtResource( 9 ) icon = ExtResource( 9 )
texture_disabled = ExtResource( 11 ) flat = true
[node name="ClearBtn" type="TextureButton" parent="Controls/Container/CenterBtns/ButtonCtr"] [node name="clearBtn" type="Button" parent="Controls/DressUp/CenterBtns/ButtonCtr"]
margin_left = 90.0 margin_left = 114.0
margin_right = 115.0 margin_right = 151.0
margin_bottom = 32.0 margin_bottom = 38.0
hint_tooltip = "Clear" hint_tooltip = "Clear"
texture_normal = ExtResource( 3 ) icon = ExtResource( 3 )
flat = true
[node name="versionLbl" type="Label" parent="Controls/Container"] [node name="versionLbl" type="Label" parent="Controls/DressUp"]
anchor_left = 0.88125 anchor_left = 0.88125
anchor_top = 0.944 anchor_top = 0.944
anchor_right = 0.9825 anchor_right = 0.9825
@ -123,7 +122,7 @@ __meta__ = {
"_edit_use_anchors_": true "_edit_use_anchors_": true
} }
[connection signal="timeout" from="Controls/Container/Spinner/Timer" to="Controls/Container/Spinner" method="_on_Timer_timeout"] [connection signal="timeout" from="Controls/DressUp/Spinner/Timer" to="Controls/DressUp/Spinner" method="_on_Timer_timeout"]
[connection signal="pressed" from="Controls/Container/CenterBtns/ButtonCtr/ExportBtn" to="characterBase" method="_on_SaveBtn_pressed"] [connection signal="pressed" from="Controls/DressUp/CenterBtns/ButtonCtr/SaveBtn" to="characterBase" method="_on_SaveBtn_pressed"]
[connection signal="pressed" from="Controls/Container/CenterBtns/ButtonCtr/ImportBtn" to="characterBase" method="_on_LoadBtn_pressed"] [connection signal="pressed" from="Controls/DressUp/CenterBtns/ButtonCtr/LoadBtn" to="characterBase" method="_on_LoadBtn_pressed"]
[connection signal="pressed" from="Controls/Container/CenterBtns/ButtonCtr/ClearBtn" to="characterBase" method="_on_clearBtn_pressed"] [connection signal="pressed" from="Controls/DressUp/CenterBtns/ButtonCtr/clearBtn" to="characterBase" method="_on_clearBtn_pressed"]

View file

@ -1,4 +1,4 @@
# This project is licensed under the Artistic-2.0 license. # This project is licensed under the MPL license.
# See the LICENSE file in the project root for more information. # See the LICENSE file in the project root for more information.
extends Resource extends Resource

View file

@ -0,0 +1,22 @@
# This project is licensed under the MPL license.
# See the LICENSE file in the project root for more information.
extends Node2D
onready var character = preload("res://resources/character.tres")
onready var accessory = $Accessory
onready var underwear = $Undies
onready var bottom = $Bottom
onready var top = $Top
func _process(delta):
if character.accessory != null:
accessory.texture = character.accessory
if character.underwear != null:
underwear.texture = character.underwear
if character.bottom != null:
bottom.texture = character.bottom
if character.top != null:
top.texture = character.top

View file

@ -1,5 +1,3 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends Node extends Node
var version = "0.0.0" var version = "0.0.0"

View file

@ -1,5 +1,3 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends Node extends Node
signal indicate signal indicate

View file

@ -1,110 +0,0 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends Node2D
const _TDU_VERSION = "0.2"
const _SAVE_FILE = "user://character.tdu"
onready var character = preload("res://resources/character.tres")
onready var blank_accessory = preload("res://sprites/clothes/blank_top.png")
onready var base_top = preload("res://sprites/character/character_base_top.svg")
onready var base_bottom = preload("res://sprites/character/character_base_legs.svg")
onready var export_win = $Controls/Container/ExportWin
onready var import_win = $Controls/Container/ImportWin
onready var unsupported_win = $Controls/Container/NotSupportedWin
onready var accessory = $Body/Accessory
#onready var underwear = $Undies
onready var bottom = $Body/Legs
onready var top = $Body/Top
# onready var eyes = $Body/Head/Eyes
# onready var mouth = $Body/Head/Mouth
func _process(delta):
if character.accessory != null:
accessory.texture = character.accessory
# if character.underwear != null:
# underwear.texture = character.underwear
if character.bottom != null:
bottom.texture = character.bottom
if character.top != null:
top.texture = character.top
func save_game():
var data_file = {
"version": _TDU_VERSION,
"game_ver": GameData.version,
"accessory": "res://sprites/clothes/blank_top.png",
"top": "res://sprites/clothes/blank_top.png",
"bottom": "res://sprites/character/character_base_legs.svg",
}
data_file["accessory"] = accessory.texture.resource_path
data_file["top"] = top.texture.resource_path
data_file["bottom"] = bottom.texture.resource_path
var file = File.new()
if file.open(_SAVE_FILE, File.WRITE) != 0:
print("Error opening file")
return
var json_file = to_json(data_file)
GameEvents.emit_signal("indicate")
file.store_line(json_file)
file.close()
func load_game():
var file = File.new()
if not file.file_exists(_SAVE_FILE):
print("File not found!")
return
if file.open(_SAVE_FILE, File.READ) != 0:
print("Error opening file")
return
var data = parse_json(file.get_as_text())
var top_texture = ImageTexture.new()
var accessory_texture = ImageTexture.new()
var bottom_texture = ImageTexture.new()
var top_image = Image.new()
var accessory_image = Image.new()
var bottom_image = Image.new()
GameEvents.emit_signal("indicate")
top_image.load(data["top"])
top_texture.create_from_image(top_image)
top.texture = top_texture
bottom_image.load(data["bottom"])
top_texture.create_from_image(top_image)
bottom.texture = top_texture
accessory_image.load(data["accessory"])
accessory_texture.create_from_image(top_image)
accessory.texture = accessory_texture
file.close()
func _on_clearBtn_pressed():
$Click.play()
character.accessory = blank_accessory
character.bottom = base_bottom
character.top = base_top
func _on_SaveBtn_pressed():
$Click.play()
save_game()
func _on_LoadBtn_pressed():
$Click.play()
load_game()

View file

@ -1,4 +1,4 @@
# This project is licensed under the Artistic-2.0 license. # This project is licensed under the MPL license.
# See the LICENSE file in the project root for more information. # See the LICENSE file in the project root for more information.
extends "res://scripts/clothing/clothing_base.gd" extends "res://scripts/clothing/clothing_base.gd"

View file

@ -1,4 +1,4 @@
# This project is licensed under the Artistic-2.0 license. # This project is licensed under the MPL license.
# See the LICENSE file in the project root for more information. # See the LICENSE file in the project root for more information.
extends "res://scripts/clothing/clothing_base.gd" extends "res://scripts/clothing/clothing_base.gd"

View file

@ -1,4 +1,4 @@
# This project is licensed under the Artistic-2.0 license. # This project is licensed under the MPL license.
# See the LICENSE file in the project root for more information. # See the LICENSE file in the project root for more information.
extends TextureButton extends TextureButton

View file

@ -1,4 +1,4 @@
# This project is licensed under the Artistic-2.0 license. # This project is licensed under the MPL license.
# See the LICENSE file in the project root for more information. # See the LICENSE file in the project root for more information.
extends "res://scripts/clothing/clothing_base.gd" extends "res://scripts/clothing/clothing_base.gd"

View file

@ -1,4 +1,4 @@
# This project is licensed under the Artistic-2.0 license. # This project is licensed under the MPL license.
# See the LICENSE file in the project root for more information. # See the LICENSE file in the project root for more information.
extends "res://scripts/clothing/clothing_base.gd" extends "res://scripts/clothing/clothing_base.gd"

View file

@ -1,3 +1,16 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends Node2D extends Node2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View file

@ -1,5 +1,3 @@
# This project is licensed under the Artistic-2.0 license.
# See the LICENSE file in the project root for more information.
extends TextureRect extends TextureRect
onready var timer = $Timer onready var timer = $Timer

View file

@ -1,4 +1,4 @@
# This project is licensed under the Artistic-2.0 license. # This project is licensed under the MPL license.
# See the LICENSE file in the project root for more information. # See the LICENSE file in the project root for more information.
extends Control extends Control
@ -9,14 +9,7 @@ onready var blank_accessory = preload("res://sprites/clothes/blank_top.png")
onready var base_top = preload("res://sprites/character/character_base_top.svg") onready var base_top = preload("res://sprites/character/character_base_top.svg")
onready var base_bottom = preload("res://sprites/character/character_base_legs.svg") onready var base_bottom = preload("res://sprites/character/character_base_legs.svg")
onready var export_btn = $CenterBtns/ButtonCtr/ExportBtn
onready var import_btn = $CenterBtns/ButtonCtr/ImportBtn
func _ready(): func _ready():
var verLabel = $versionLbl var verLabel = $versionLbl
verLabel.text = "v" + version verLabel.text = "v" + version
GameData.version = version GameData.version = version
if OS.get_name() == "HTML5":
export_btn.disabled == true
import_btn.disabled == true

View file

@ -1,4 +1,4 @@
# This project is licensed under the Artistic-2.0 license. # This project is licensed under the MPL license.
# See the LICENSE file in the project root for more information. # See the LICENSE file in the project root for more information.
extends TabContainer extends TabContainer