diff options
author | Juan Linietsky <red@kyoko> | 2015-05-01 23:20:41 -0300 |
---|---|---|
committer | Juan Linietsky <red@kyoko> | 2015-05-01 23:20:41 -0300 |
commit | dda60296d81edaabfdb56f47a2c949b5dad283fb (patch) | |
tree | b41e31cc4620689a1e91adf852d0926fc600607a /drivers | |
parent | fb8b740fcb50dc38526b458af096b72d1303d3e5 (diff) | |
parent | 61e90385f6cbeebb8d3d03c33078802c2fa11eda (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'drivers')
97 files changed, 204 insertions, 266 deletions
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp index 9d9a856376..4bc35f86ee 100644 --- a/drivers/alsa/audio_driver_alsa.cpp +++ b/drivers/alsa/audio_driver_alsa.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/alsa/audio_driver_alsa.h b/drivers/alsa/audio_driver_alsa.h index 86cdde6215..10f9298859 100644 --- a/drivers/alsa/audio_driver_alsa.h +++ b/drivers/alsa/audio_driver_alsa.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_config.h b/drivers/chibi/cp_config.h index 070c74d130..9cd754ed47 100644 --- a/drivers/chibi/cp_config.h +++ b/drivers/chibi/cp_config.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_envelope.cpp b/drivers/chibi/cp_envelope.cpp index 8eb3bd5ba0..6ed42a1167 100644 --- a/drivers/chibi/cp_envelope.cpp +++ b/drivers/chibi/cp_envelope.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_envelope.h b/drivers/chibi/cp_envelope.h index 67df8384c2..e01605ada3 100644 --- a/drivers/chibi/cp_envelope.h +++ b/drivers/chibi/cp_envelope.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_file_access_wrapper.cpp b/drivers/chibi/cp_file_access_wrapper.cpp index 66212b2b23..d7c6c6d0b6 100644 --- a/drivers/chibi/cp_file_access_wrapper.cpp +++ b/drivers/chibi/cp_file_access_wrapper.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_file_access_wrapper.h b/drivers/chibi/cp_file_access_wrapper.h index 57f3d53e75..c54ce5868d 100644 --- a/drivers/chibi/cp_file_access_wrapper.h +++ b/drivers/chibi/cp_file_access_wrapper.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_instrument.cpp b/drivers/chibi/cp_instrument.cpp index 9a96da2481..2e5af70565 100644 --- a/drivers/chibi/cp_instrument.cpp +++ b/drivers/chibi/cp_instrument.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_instrument.h b/drivers/chibi/cp_instrument.h index 863b31c80a..8b434402c5 100644 --- a/drivers/chibi/cp_instrument.h +++ b/drivers/chibi/cp_instrument.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader.h b/drivers/chibi/cp_loader.h index 243b8145ae..7763c395b9 100644 --- a/drivers/chibi/cp_loader.h +++ b/drivers/chibi/cp_loader.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_it.cpp b/drivers/chibi/cp_loader_it.cpp index dae6b26d97..74dd228437 100644 --- a/drivers/chibi/cp_loader_it.cpp +++ b/drivers/chibi/cp_loader_it.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_it.h b/drivers/chibi/cp_loader_it.h index 6a192386e2..6ba605bf04 100644 --- a/drivers/chibi/cp_loader_it.h +++ b/drivers/chibi/cp_loader_it.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_it_info.cpp b/drivers/chibi/cp_loader_it_info.cpp index fc230a3342..0cfd73f1e3 100644 --- a/drivers/chibi/cp_loader_it_info.cpp +++ b/drivers/chibi/cp_loader_it_info.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_it_instruments.cpp b/drivers/chibi/cp_loader_it_instruments.cpp index f315b9b5c8..6293be162c 100644 --- a/drivers/chibi/cp_loader_it_instruments.cpp +++ b/drivers/chibi/cp_loader_it_instruments.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_it_patterns.cpp b/drivers/chibi/cp_loader_it_patterns.cpp index 30d87dbebf..c79dffc180 100644 --- a/drivers/chibi/cp_loader_it_patterns.cpp +++ b/drivers/chibi/cp_loader_it_patterns.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_it_samples.cpp b/drivers/chibi/cp_loader_it_samples.cpp index 040f9d4dd7..24d3a12781 100644 --- a/drivers/chibi/cp_loader_it_samples.cpp +++ b/drivers/chibi/cp_loader_it_samples.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_mod.cpp b/drivers/chibi/cp_loader_mod.cpp index 1ea3a93e9c..98174ff9b1 100644 --- a/drivers/chibi/cp_loader_mod.cpp +++ b/drivers/chibi/cp_loader_mod.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_mod.h b/drivers/chibi/cp_loader_mod.h index cf16635ef0..77245349b7 100644 --- a/drivers/chibi/cp_loader_mod.h +++ b/drivers/chibi/cp_loader_mod.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_s3m.cpp b/drivers/chibi/cp_loader_s3m.cpp index 8b9871463f..c21f7bdd38 100644 --- a/drivers/chibi/cp_loader_s3m.cpp +++ b/drivers/chibi/cp_loader_s3m.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_s3m.h b/drivers/chibi/cp_loader_s3m.h index 9fccef0886..6fe9f0ca44 100644 --- a/drivers/chibi/cp_loader_s3m.h +++ b/drivers/chibi/cp_loader_s3m.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_xm.cpp b/drivers/chibi/cp_loader_xm.cpp index 228567afd6..8bde6b673e 100644 --- a/drivers/chibi/cp_loader_xm.cpp +++ b/drivers/chibi/cp_loader_xm.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_loader_xm.h b/drivers/chibi/cp_loader_xm.h index 230dff6be7..0a2465475f 100644 --- a/drivers/chibi/cp_loader_xm.h +++ b/drivers/chibi/cp_loader_xm.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_mixer.h b/drivers/chibi/cp_mixer.h index 28fc11459c..bac2087edf 100644 --- a/drivers/chibi/cp_mixer.h +++ b/drivers/chibi/cp_mixer.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_note.h b/drivers/chibi/cp_note.h index 17de7e72ee..5d2c01844a 100644 --- a/drivers/chibi/cp_note.h +++ b/drivers/chibi/cp_note.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_order.h b/drivers/chibi/cp_order.h index ca3684d154..a20e202bde 100644 --- a/drivers/chibi/cp_order.h +++ b/drivers/chibi/cp_order.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_pattern.cpp b/drivers/chibi/cp_pattern.cpp index b880071cca..cc65833d68 100644 --- a/drivers/chibi/cp_pattern.cpp +++ b/drivers/chibi/cp_pattern.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_pattern.h b/drivers/chibi/cp_pattern.h index b8d1e0a18d..22611eabab 100644 --- a/drivers/chibi/cp_pattern.h +++ b/drivers/chibi/cp_pattern.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data.cpp b/drivers/chibi/cp_player_data.cpp index 99bc4fddd2..76d8f280d2 100644 --- a/drivers/chibi/cp_player_data.cpp +++ b/drivers/chibi/cp_player_data.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data.h b/drivers/chibi/cp_player_data.h index d62cef17a1..36a27942cb 100644 --- a/drivers/chibi/cp_player_data.h +++ b/drivers/chibi/cp_player_data.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data_control.cpp b/drivers/chibi/cp_player_data_control.cpp index 96ffae667b..4d30c1a703 100644 --- a/drivers/chibi/cp_player_data_control.cpp +++ b/drivers/chibi/cp_player_data_control.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data_effects.cpp b/drivers/chibi/cp_player_data_effects.cpp index e116b3b473..eb62b8d962 100644 --- a/drivers/chibi/cp_player_data_effects.cpp +++ b/drivers/chibi/cp_player_data_effects.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data_envelopes.cpp b/drivers/chibi/cp_player_data_envelopes.cpp index 12456ab082..94378b8bf4 100644 --- a/drivers/chibi/cp_player_data_envelopes.cpp +++ b/drivers/chibi/cp_player_data_envelopes.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data_events.cpp b/drivers/chibi/cp_player_data_events.cpp index 32335040bc..7a7cfdf5bb 100644 --- a/drivers/chibi/cp_player_data_events.cpp +++ b/drivers/chibi/cp_player_data_events.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data_filter.cpp b/drivers/chibi/cp_player_data_filter.cpp index 75e8bc961a..fd87e4ae7a 100644 --- a/drivers/chibi/cp_player_data_filter.cpp +++ b/drivers/chibi/cp_player_data_filter.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data_nna.cpp b/drivers/chibi/cp_player_data_nna.cpp index f87045c309..3960234f5e 100644 --- a/drivers/chibi/cp_player_data_nna.cpp +++ b/drivers/chibi/cp_player_data_nna.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data_notes.cpp b/drivers/chibi/cp_player_data_notes.cpp index d61ac0e30f..ea3ba42e86 100644 --- a/drivers/chibi/cp_player_data_notes.cpp +++ b/drivers/chibi/cp_player_data_notes.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data_reserved.cpp b/drivers/chibi/cp_player_data_reserved.cpp index 43e913a54e..8d9439158b 100644 --- a/drivers/chibi/cp_player_data_reserved.cpp +++ b/drivers/chibi/cp_player_data_reserved.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_player_data_utils.cpp b/drivers/chibi/cp_player_data_utils.cpp index 543d525f3f..5294fc8139 100644 --- a/drivers/chibi/cp_player_data_utils.cpp +++ b/drivers/chibi/cp_player_data_utils.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_sample.cpp b/drivers/chibi/cp_sample.cpp index 667d045d7c..bff24d4c4c 100644 --- a/drivers/chibi/cp_sample.cpp +++ b/drivers/chibi/cp_sample.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_sample.h b/drivers/chibi/cp_sample.h index 2017ab0659..71b57aaa81 100644 --- a/drivers/chibi/cp_sample.h +++ b/drivers/chibi/cp_sample.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_sample_defs.h b/drivers/chibi/cp_sample_defs.h index c17b6fac51..32817efc7d 100644 --- a/drivers/chibi/cp_sample_defs.h +++ b/drivers/chibi/cp_sample_defs.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_sample_manager.cpp b/drivers/chibi/cp_sample_manager.cpp index 0a18d7b0ab..601db07acf 100644 --- a/drivers/chibi/cp_sample_manager.cpp +++ b/drivers/chibi/cp_sample_manager.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_sample_manager.h b/drivers/chibi/cp_sample_manager.h index 35ecb59c7a..2891034482 100644 --- a/drivers/chibi/cp_sample_manager.h +++ b/drivers/chibi/cp_sample_manager.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_song.cpp b/drivers/chibi/cp_song.cpp index 3751d76c25..956e2ee6d4 100644 --- a/drivers/chibi/cp_song.cpp +++ b/drivers/chibi/cp_song.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_song.h b/drivers/chibi/cp_song.h index fb6e7f7f29..6c35b43c76 100644 --- a/drivers/chibi/cp_song.h +++ b/drivers/chibi/cp_song.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_tables.cpp b/drivers/chibi/cp_tables.cpp index f30aeca543..9f1ae30c9a 100644 --- a/drivers/chibi/cp_tables.cpp +++ b/drivers/chibi/cp_tables.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/cp_tables.h b/drivers/chibi/cp_tables.h index 4f4a8c07bd..6c3c9271b0 100644 --- a/drivers/chibi/cp_tables.h +++ b/drivers/chibi/cp_tables.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/event_stream_chibi.cpp b/drivers/chibi/event_stream_chibi.cpp index 2deb83e2bc..e87e0a9aaa 100644 --- a/drivers/chibi/event_stream_chibi.cpp +++ b/drivers/chibi/event_stream_chibi.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/chibi/event_stream_chibi.h b/drivers/chibi/event_stream_chibi.h index 3f322f7a65..7b2ee4b471 100644 --- a/drivers/chibi/event_stream_chibi.h +++ b/drivers/chibi/event_stream_chibi.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/gl_context/context_gl.h b/drivers/gl_context/context_gl.h index 392f8341ae..6b06ccdc37 100644 --- a/drivers/gl_context/context_gl.h +++ b/drivers/gl_context/context_gl.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 0359f5f5a0..4acac957c8 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -1263,7 +1263,6 @@ void RasterizerGLES2::texture_set_flags(RID p_texture,uint32_t p_flags) { p_flags&=VS::TEXTURE_FLAG_FILTER;//can change only filter } - glActiveTexture(GL_TEXTURE0); glBindTexture(texture->target, texture->tex_id); uint32_t cube = texture->flags & VS::TEXTURE_FLAG_CUBEMAP; @@ -1613,7 +1612,8 @@ Variant RasterizerGLES2::shader_get_default_param(RID p_shader, const StringName RID RasterizerGLES2::material_create() { - return material_owner.make_rid( memnew( Material ) ); + RID material = material_owner.make_rid( memnew( Material ) ); + return material; } void RasterizerGLES2::material_set_shader(RID p_material, RID p_shader) { @@ -4608,6 +4608,10 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const { if (fragment_flags.uses_normal) { enablers.push_back("#define NORMAL_USED\n"); } + if (fragment_flags.uses_normalmap) { + enablers.push_back("#define USE_NORMALMAP\n"); + } + if (light_flags.uses_light) { enablers.push_back("#define USE_LIGHT_SHADER_CODE\n"); } @@ -9375,7 +9379,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const _canvas_item_setup_shader_uniforms(material,shader_cache); } - bool unshaded = material && material->shading_mode==VS::CANVAS_ITEM_SHADING_UNSHADED; + bool unshaded = (material && material->shading_mode==VS::CANVAS_ITEM_SHADING_UNSHADED) || ci->blend_mode!=VS::MATERIAL_BLEND_MODE_MIX; if (unshaded) { canvas_shader.set_uniform(CanvasShaderGLES2::MODULATE,Color(1,1,1,1)); @@ -9447,6 +9451,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const while(light) { + if (ci->light_mask&light->item_mask && p_z>=light->z_min && p_z<=light->z_max && ci->global_rect_cache.intersects_transformed(light->xform_cache,light->rect_cache)) { //intersects this light @@ -9484,6 +9489,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const } + bool has_shadow = light->shadow_buffer.is_valid() && ci->light_mask&light->item_shadow_mask; canvas_shader.set_conditional(CanvasShaderGLES2::USE_SHADOWS,has_shadow); @@ -10815,7 +10821,10 @@ void RasterizerGLES2::init() { void RasterizerGLES2::finish() { + free(default_material); + free(shadow_material); free(canvas_shadow_blur); + free( overdraw_material ); } int RasterizerGLES2::get_render_info(VS::RenderInfo p_info) { diff --git a/drivers/gles2/rasterizer_gles2.h b/drivers/gles2/rasterizer_gles2.h index a694571452..1821b1a750 100644 --- a/drivers/gles2/rasterizer_gles2.h +++ b/drivers/gles2/rasterizer_gles2.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/gles2/rasterizer_instance_gles2.cpp b/drivers/gles2/rasterizer_instance_gles2.cpp index eec9431f36..a8d478c6e0 100644 --- a/drivers/gles2/rasterizer_instance_gles2.cpp +++ b/drivers/gles2/rasterizer_instance_gles2.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/gles2/rasterizer_instance_gles2.h b/drivers/gles2/rasterizer_instance_gles2.h index 97dcb7bc73..f5ac5f1fe2 100644 --- a/drivers/gles2/rasterizer_instance_gles2.h +++ b/drivers/gles2/rasterizer_instance_gles2.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index 69bd269948..10da30acca 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -243,6 +243,10 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a if (vnode->name==vname_normal) { uses_normal=true; } + if (vnode->name==vname_normalmap || vnode->name==vname_normalmap_depth) { + uses_normalmap=true; + uses_normal=true; + } if (vnode->name==vname_screen_uv) { uses_screen_uv=true; @@ -810,6 +814,8 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() { mode_replace_table[4]["POSITION"]="gl_Position"; mode_replace_table[4]["NORMAL"]="normal"; + mode_replace_table[4]["NORMALMAP"]="normal_map"; + mode_replace_table[4]["NORMALMAP_DEPTH"]="normal_depth"; mode_replace_table[4]["UV"]="uv_interp"; mode_replace_table[4]["SRC_COLOR"]="color_interp"; mode_replace_table[4]["COLOR"]="color"; @@ -861,6 +867,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() { vname_light="LIGHT"; vname_time="TIME"; vname_normalmap="NORMALMAP"; + vname_normalmap_depth="NORMALMAP_DEPTH"; vname_normal="NORMAL"; vname_texpixel_size="TEXTURE_PIXEL_SIZE"; vname_world_vec="WORLD_VERTEX"; diff --git a/drivers/gles2/shader_compiler_gles2.h b/drivers/gles2/shader_compiler_gles2.h index 87016fd968..6dfc213994 100644 --- a/drivers/gles2/shader_compiler_gles2.h +++ b/drivers/gles2/shader_compiler_gles2.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -72,6 +72,7 @@ private: StringName vname_light; StringName vname_time; StringName vname_normalmap; + StringName vname_normalmap_depth; StringName vname_normal; StringName vname_texpixel_size; StringName vname_world_vec; diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp index 6a4596cb1e..e94930fffb 100644 --- a/drivers/gles2/shader_gles2.cpp +++ b/drivers/gles2/shader_gles2.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/gles2/shader_gles2.h b/drivers/gles2/shader_gles2.h index 9cd6142eb0..4604fd5501 100644 --- a/drivers/gles2/shader_gles2.h +++ b/drivers/gles2/shader_gles2.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index c4f0847870..669ae44621 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -207,7 +207,17 @@ void main() { { +#if defined(USE_NORMALMAP) + vec3 normal_map=vec3(0.0,0.0,1.0); + float normal_depth=1.0; +#endif + FRAGMENT_SHADER_CODE + +#if defined(USE_NORMALMAP) + normal = mix(vec3(0.0,0.0,1.0), normal_map * vec3(2.0,-2.0,1.0) - vec3( 1.0, -1.0, 0.0 ), normal_depth ); +#endif + } #ifdef DEBUG_ENCODED_32 highp float enc32 = dot( color,highp vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) ); @@ -296,7 +306,7 @@ LIGHT_SHADER_CODE } - highp vec4 s = shadow_matrix * highp vec4(point,0.0,1.0); + highp vec4 s = shadow_matrix * vec4(point,0.0,1.0); s.xyz/=s.w; su=s.x*0.5+0.5; sz=s.z*0.5+0.5; diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index 6fc20f36f7..2e1488ff9d 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/png/image_loader_png.h b/drivers/png/image_loader_png.h index 77f575339c..7acfd041ee 100644 --- a/drivers/png/image_loader_png.h +++ b/drivers/png/image_loader_png.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp index 462051b21e..8524aa2121 100644 --- a/drivers/png/resource_saver_png.cpp +++ b/drivers/png/resource_saver_png.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/theoraplayer/video_stream_theoraplayer.cpp b/drivers/theoraplayer/video_stream_theoraplayer.cpp index 9f4a44ae9d..ecafda9d84 100644 --- a/drivers/theoraplayer/video_stream_theoraplayer.cpp +++ b/drivers/theoraplayer/video_stream_theoraplayer.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 5f51865432..0c0867e030 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -87,7 +87,7 @@ bool DirAccessUnix::dir_exists(String p_dir) { if (p_dir.is_rel_path()) - p_dir=current_dir+"/"+p_dir; + p_dir=get_current_dir().plus_file(p_dir); else p_dir=fix_path(p_dir); @@ -278,9 +278,16 @@ String DirAccessUnix::get_current_dir() { Error DirAccessUnix::rename(String p_path,String p_new_path) { - p_path=fix_path(p_path); - p_new_path=fix_path(p_new_path); - + if (p_path.is_rel_path()) + p_path=get_current_dir().plus_file(p_path); + else + p_path=fix_path(p_path); + + if (p_new_path.is_rel_path()) + p_new_path=get_current_dir().plus_file(p_new_path); + else + p_new_path=fix_path(p_new_path); + return ::rename(p_path.utf8().get_data(),p_new_path.utf8().get_data())==0?OK:FAILED; } Error DirAccessUnix::remove(String p_path) { diff --git a/drivers/unix/dir_access_unix.h b/drivers/unix/dir_access_unix.h index f6089ccfe1..3091e01511 100644 --- a/drivers/unix/dir_access_unix.h +++ b/drivers/unix/dir_access_unix.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 2f91eee90e..76042089ff 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h index 0dedfce6ac..5b0f0e7cb7 100644 --- a/drivers/unix/file_access_unix.h +++ b/drivers/unix/file_access_unix.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index ad0d4e00ea..989aba52bb 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/ip_unix.h b/drivers/unix/ip_unix.h index 2fd5cf964b..5798ac8137 100644 --- a/drivers/unix/ip_unix.h +++ b/drivers/unix/ip_unix.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/memory_pool_static_malloc.cpp b/drivers/unix/memory_pool_static_malloc.cpp index 4711f4f090..e0bab27a63 100644 --- a/drivers/unix/memory_pool_static_malloc.cpp +++ b/drivers/unix/memory_pool_static_malloc.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -153,7 +153,7 @@ void* MemoryPoolStaticMalloc::_realloc(void *p_memory,size_t p_bytes) { return alloc( p_bytes ); } - if (p_bytes<=0) { + if (p_bytes==0) { this->free(p_memory); ERR_FAIL_COND_V( p_bytes < 0 , NULL ); diff --git a/drivers/unix/memory_pool_static_malloc.h b/drivers/unix/memory_pool_static_malloc.h index 626fec826e..a96259556d 100644 --- a/drivers/unix/memory_pool_static_malloc.h +++ b/drivers/unix/memory_pool_static_malloc.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/mutex_posix.cpp b/drivers/unix/mutex_posix.cpp index 166dfa4b19..73563ea538 100644 --- a/drivers/unix/mutex_posix.cpp +++ b/drivers/unix/mutex_posix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/mutex_posix.h b/drivers/unix/mutex_posix.h index 3496473688..9b50d7963e 100644 --- a/drivers/unix/mutex_posix.h +++ b/drivers/unix/mutex_posix.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index d51a7c74e8..d558aadc8e 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 1dcf0bd2fd..65df113956 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/semaphore_posix.cpp b/drivers/unix/semaphore_posix.cpp index 6f1b8931f9..fba4cd3641 100644 --- a/drivers/unix/semaphore_posix.cpp +++ b/drivers/unix/semaphore_posix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/semaphore_posix.h b/drivers/unix/semaphore_posix.h index de563c28c4..6f938455b3 100644 --- a/drivers/unix/semaphore_posix.h +++ b/drivers/unix/semaphore_posix.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/stream_peer_tcp_posix.cpp b/drivers/unix/stream_peer_tcp_posix.cpp index 8d937d9ca8..2301d8b6c4 100644 --- a/drivers/unix/stream_peer_tcp_posix.cpp +++ b/drivers/unix/stream_peer_tcp_posix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/stream_peer_tcp_posix.h b/drivers/unix/stream_peer_tcp_posix.h index 1259b46ff2..9b1716ac42 100644 --- a/drivers/unix/stream_peer_tcp_posix.h +++ b/drivers/unix/stream_peer_tcp_posix.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/tcp_server_posix.cpp b/drivers/unix/tcp_server_posix.cpp index dfcf479fc0..4f9ee62cde 100644 --- a/drivers/unix/tcp_server_posix.cpp +++ b/drivers/unix/tcp_server_posix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/tcp_server_posix.h b/drivers/unix/tcp_server_posix.h index 053aba0d10..17a9fd1d98 100644 --- a/drivers/unix/tcp_server_posix.h +++ b/drivers/unix/tcp_server_posix.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp index e5d6a02579..03963a9756 100644 --- a/drivers/unix/thread_posix.cpp +++ b/drivers/unix/thread_posix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/unix/thread_posix.h b/drivers/unix/thread_posix.h index a088f1d5de..4f76f3d7b3 100644 --- a/drivers/unix/thread_posix.h +++ b/drivers/unix/thread_posix.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/vorbis/audio_stream_ogg_vorbis.cpp b/drivers/vorbis/audio_stream_ogg_vorbis.cpp index 996f75d165..ed292621e9 100644 --- a/drivers/vorbis/audio_stream_ogg_vorbis.cpp +++ b/drivers/vorbis/audio_stream_ogg_vorbis.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/vorbis/audio_stream_ogg_vorbis.h b/drivers/vorbis/audio_stream_ogg_vorbis.h index dd84fd1601..8a35fc09cb 100644 --- a/drivers/vorbis/audio_stream_ogg_vorbis.h +++ b/drivers/vorbis/audio_stream_ogg_vorbis.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index 4c265a1ab2..a8fed91d94 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -70,21 +70,11 @@ bool DirAccessWindows::list_dir_begin() { _cisdir=false; _cishidden=false; - if (unicode) { - list_dir_end(); - p->h = FindFirstFileExW((current_dir+"\\*").c_str(), FindExInfoStandard, &p->fu, FindExSearchNameMatch, NULL, 0); + list_dir_end(); + p->h = FindFirstFileExW((current_dir+"\\*").c_str(), FindExInfoStandard, &p->fu, FindExSearchNameMatch, NULL, 0); - return (p->h==INVALID_HANDLE_VALUE); - } else { - - list_dir_end(); - p->h = FindFirstFileExA((current_dir+"\\*").ascii().get_data(), FindExInfoStandard, &p->fu, FindExSearchNameMatch, NULL, 0); - - return (p->h==INVALID_HANDLE_VALUE); - - } + return (p->h==INVALID_HANDLE_VALUE); - return false; } @@ -93,38 +83,20 @@ String DirAccessWindows::get_next() { if (p->h==INVALID_HANDLE_VALUE) return ""; - if (unicode) { - _cisdir=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - _cishidden=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN); + _cisdir=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); + _cishidden=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN); - String name=p->fu.cFileName; - - if (FindNextFileW(p->h, &p->fu) == 0) { - - FindClose(p->h); - p->h=INVALID_HANDLE_VALUE; - } - - return name; - } else { + String name=p->fu.cFileName; -#ifndef WINRT_ENABLED - _cisdir=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - _cishidden=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN); + if (FindNextFileW(p->h, &p->fu) == 0) { - String name=p->f.cFileName; - - if (FindNextFileA(p->h, &p->f) == 0) { + FindClose(p->h); + p->h=INVALID_HANDLE_VALUE; + } - FindClose(p->h); - p->h=INVALID_HANDLE_VALUE; - } + return name; - return name; -#endif - return ""; - } } bool DirAccessWindows::current_is_dir() const { @@ -174,63 +146,37 @@ Error DirAccessWindows::change_dir(String p_dir) { p_dir=fix_path(p_dir); - if (unicode) { - wchar_t real_current_dir_name[2048]; - GetCurrentDirectoryW(2048,real_current_dir_name); - String prev_dir=real_current_dir_name; + wchar_t real_current_dir_name[2048]; + GetCurrentDirectoryW(2048,real_current_dir_name); + String prev_dir=real_current_dir_name; - SetCurrentDirectoryW(current_dir.c_str()); - bool worked=(SetCurrentDirectoryW(p_dir.c_str())!=0); + SetCurrentDirectoryW(current_dir.c_str()); + bool worked=(SetCurrentDirectoryW(p_dir.c_str())!=0); - String base = _get_root_path(); - if (base!="") { + String base = _get_root_path(); + if (base!="") { - GetCurrentDirectoryW(2048,real_current_dir_name); - String new_dir; - new_dir = String(real_current_dir_name).replace("\\","/"); - if (!new_dir.begins_with(base)) { - worked=false; - } + GetCurrentDirectoryW(2048,real_current_dir_name); + String new_dir; + new_dir = String(real_current_dir_name).replace("\\","/"); + if (!new_dir.begins_with(base)) { + worked=false; } + } - if (worked) { - - GetCurrentDirectoryW(2048,real_current_dir_name); - current_dir=real_current_dir_name; // TODO, utf8 parser - current_dir=current_dir.replace("\\","/"); - - } //else { - - SetCurrentDirectoryW(prev_dir.c_str()); - //} - - return worked?OK:ERR_INVALID_PARAMETER; - } else { - - char real_current_dir_name[2048]; - GetCurrentDirectoryA(2048,real_current_dir_name); - String prev_dir=real_current_dir_name; - - SetCurrentDirectoryA(current_dir.ascii().get_data()); - bool worked=(SetCurrentDirectory(p_dir.ascii().get_data())!=0); - - if (worked) { - - GetCurrentDirectoryA(2048,real_current_dir_name); - current_dir=real_current_dir_name; // TODO, utf8 parser - current_dir=current_dir.replace("\\","/"); - - }// else { + if (worked) { - SetCurrentDirectoryA(prev_dir.ascii().get_data()); - //} + GetCurrentDirectoryW(2048,real_current_dir_name); + current_dir=real_current_dir_name; // TODO, utf8 parser + current_dir=current_dir.replace("\\","/"); - return worked?OK:ERR_INVALID_PARAMETER; + } //else { - } + SetCurrentDirectoryW(prev_dir.c_str()); + //} - return OK; + return worked?OK:ERR_INVALID_PARAMETER; #endif } @@ -244,36 +190,22 @@ Error DirAccessWindows::make_dir(String p_dir) { #else - p_dir=fix_path(p_dir); + //p_dir=fix_path(p_dir); p_dir.replace("/","\\"); bool success; int err; - if (unicode) { - wchar_t real_current_dir_name[2048]; - GetCurrentDirectoryW(2048,real_current_dir_name); - - SetCurrentDirectoryW(current_dir.c_str()); - - success=CreateDirectoryW(p_dir.c_str(), NULL); - err = GetLastError(); - - SetCurrentDirectoryW(real_current_dir_name); - - } else { - - char real_current_dir_name[2048]; - GetCurrentDirectoryA(2048,real_current_dir_name); + wchar_t real_current_dir_name[2048]; + GetCurrentDirectoryW(2048,real_current_dir_name); - SetCurrentDirectoryA(current_dir.ascii().get_data()); + SetCurrentDirectoryW(current_dir.c_str()); - success=CreateDirectoryA(p_dir.ascii().get_data(), NULL); - err = GetLastError(); + success=CreateDirectoryW(p_dir.c_str(), NULL); + err = GetLastError(); - SetCurrentDirectoryA(real_current_dir_name); - } + SetCurrentDirectoryW(real_current_dir_name); if (success) { return OK; @@ -313,7 +245,7 @@ bool DirAccessWindows::file_exists(String p_file) { GLOBAL_LOCK_FUNCTION if (!p_file.is_abs_path()) - p_file=get_current_dir()+"/"+p_file; + p_file=get_current_dir().plus_file(p_file); p_file=fix_path(p_file); @@ -321,73 +253,52 @@ bool DirAccessWindows::file_exists(String p_file) { WIN32_FILE_ATTRIBUTE_DATA fileInfo; - if (unicode) { - - DWORD fileAttr; - - fileAttr = GetFileAttributesExW(p_file.c_str(), GetFileExInfoStandard, &fileInfo); - if (0 == fileAttr) - return false; - - return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY); - - } else { - DWORD fileAttr; - - fileAttr = GetFileAttributesExA(p_file.ascii().get_data(), GetFileExInfoStandard, &fileInfo); - if (0 == fileAttr) - return false; + DWORD fileAttr; - return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY); + fileAttr = GetFileAttributesExW(p_file.c_str(), GetFileExInfoStandard, &fileInfo); + if (0 == fileAttr) + return false; - } + return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY); - return false; } bool DirAccessWindows::dir_exists(String p_dir) { GLOBAL_LOCK_FUNCTION - if (!p_dir.is_abs_path()) - p_dir=get_current_dir()+"/"+p_dir; - - p_dir=fix_path(p_dir); + if (p_dir.is_rel_path()) + p_dir=get_current_dir().plus_file(p_dir); + else + p_dir=fix_path(p_dir); p_dir.replace("/","\\"); WIN32_FILE_ATTRIBUTE_DATA fileInfo; - if (unicode) { - - DWORD fileAttr; - fileAttr = GetFileAttributesExW(p_dir.c_str(), GetFileExInfoStandard, &fileInfo); - if (0 == fileAttr) - return false; + DWORD fileAttr; - return (fileAttr&FILE_ATTRIBUTE_DIRECTORY); + fileAttr = GetFileAttributesExW(p_dir.c_str(), GetFileExInfoStandard, &fileInfo); + if (0 == fileAttr) + return false; - } else { -#ifndef WINRT_ENABLED - DWORD fileAttr; - - fileAttr = GetFileAttributesExA(p_dir.ascii().get_data(), GetFileExInfoStandard, &fileInfo); - if (0 == fileAttr) - return false; - - return (fileAttr&FILE_ATTRIBUTE_DIRECTORY); + return (fileAttr&FILE_ATTRIBUTE_DIRECTORY); -#endif - } - return false; } Error DirAccessWindows::rename(String p_path,String p_new_path) { - p_path=fix_path(p_path); - p_new_path=fix_path(p_new_path); - + if (p_path.is_rel_path()) + p_path=get_current_dir().plus_file(p_path); + else + p_path=fix_path(p_path); + + if (p_new_path.is_rel_path()) + p_new_path=get_current_dir().plus_file(p_new_path); + else + p_new_path=fix_path(p_new_path); + if (file_exists(p_new_path)) { if (remove(p_new_path) != OK) { return FAILED; @@ -471,13 +382,6 @@ DirAccessWindows::DirAccessWindows() { } } - unicode=true; - - - /* We are running Windows 95/98/ME, so no unicode allowed */ - if ( SetCurrentDirectoryW ( L"." ) == FALSE && GetLastError () == ERROR_CALL_NOT_IMPLEMENTED ) - unicode=false; - change_dir("."); #endif } diff --git a/drivers/windows/dir_access_windows.h b/drivers/windows/dir_access_windows.h index 4a668a7364..384bc8327d 100644 --- a/drivers/windows/dir_access_windows.h +++ b/drivers/windows/dir_access_windows.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -56,7 +56,7 @@ class DirAccessWindows : public DirAccess { String current_dir; - bool unicode; + bool _cisdir; bool _cishidden; diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index 19a62967ea..90903f2cbd 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/file_access_windows.h b/drivers/windows/file_access_windows.h index 8f16d66fe1..a2598bfeec 100644 --- a/drivers/windows/file_access_windows.h +++ b/drivers/windows/file_access_windows.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/mutex_windows.cpp b/drivers/windows/mutex_windows.cpp index 3b2004285a..09f8590510 100644 --- a/drivers/windows/mutex_windows.cpp +++ b/drivers/windows/mutex_windows.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/mutex_windows.h b/drivers/windows/mutex_windows.h index 9a3875f053..9447f17a1c 100644 --- a/drivers/windows/mutex_windows.h +++ b/drivers/windows/mutex_windows.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/semaphore_windows.cpp b/drivers/windows/semaphore_windows.cpp index bfd53f9837..50cdf7cce5 100644 --- a/drivers/windows/semaphore_windows.cpp +++ b/drivers/windows/semaphore_windows.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/semaphore_windows.h b/drivers/windows/semaphore_windows.h index f87b868a68..43f6c0b560 100644 --- a/drivers/windows/semaphore_windows.h +++ b/drivers/windows/semaphore_windows.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/shell_windows.cpp b/drivers/windows/shell_windows.cpp index 3994252c48..670f4e483d 100644 --- a/drivers/windows/shell_windows.cpp +++ b/drivers/windows/shell_windows.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/shell_windows.h b/drivers/windows/shell_windows.h index 8bbf51514c..98eae81175 100644 --- a/drivers/windows/shell_windows.h +++ b/drivers/windows/shell_windows.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/thread_windows.cpp b/drivers/windows/thread_windows.cpp index 40efa5acd5..6a9e97ba01 100644 --- a/drivers/windows/thread_windows.cpp +++ b/drivers/windows/thread_windows.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/drivers/windows/thread_windows.h b/drivers/windows/thread_windows.h index d15e77d065..3c8f92ce57 100644 --- a/drivers/windows/thread_windows.h +++ b/drivers/windows/thread_windows.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ |