mirror of
https://github.com/Relintai/texture_packer.git
synced 2024-11-12 10:15:16 +01:00
Clang format.
This commit is contained in:
parent
189810d164
commit
8d3b160f02
@ -59,9 +59,9 @@ void TextureLayerMerger::add_texture(Ref<Texture> p_texture, Color p_color, Vect
|
||||
entry.color = p_color;
|
||||
entry.position = p_position;
|
||||
|
||||
if (p_rect.size.x <= 0)
|
||||
if (p_rect.size.x <= 0)
|
||||
p_rect.size.x = p_texture->get_width();
|
||||
|
||||
|
||||
if (p_rect.size.y <= 0)
|
||||
p_rect.size.y = p_texture->get_height();
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#include "core/reference.h"
|
||||
|
||||
#include "core/image.h"
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/vector.h"
|
||||
#include "core/image.h"
|
||||
#include "scene/resources/texture.h"
|
||||
|
||||
class TextureLayerMerger : public Reference {
|
||||
@ -24,7 +24,7 @@ public:
|
||||
|
||||
Color get_base_color() const;
|
||||
void set_base_color(const Color p_color);
|
||||
|
||||
|
||||
Ref<Image> get_data() const;
|
||||
void set_data(const Ref<Image> &p_image);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "register_types.h"
|
||||
|
||||
#include "texture_packer.h"
|
||||
#include "texture_merger.h"
|
||||
#include "texture_packer.h"
|
||||
|
||||
#include "texture_resource/packer_image_resource.h"
|
||||
|
||||
@ -21,12 +21,10 @@ void register_texture_packer_types() {
|
||||
|
||||
ClassDB::register_class<TextureLayerMerger>();
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#ifdef TOOLS_ENABLED
|
||||
EditorPlugins::add_by_type<EditorPluginPackerImageResource>();
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_texture_packer_types() {
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_texture_packer_types() {
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ void TextureMerger::_notification(int p_what) {
|
||||
|
||||
if (!_dirty)
|
||||
return;
|
||||
|
||||
|
||||
_dirty = false;
|
||||
|
||||
merge();
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
#include "scene/main/node.h"
|
||||
|
||||
#include "core/vector.h"
|
||||
#include "core/engine.h"
|
||||
#include "core/vector.h"
|
||||
|
||||
#include "texture_packer.h"
|
||||
|
||||
|
@ -362,8 +362,6 @@ void TexturePacker::merge() {
|
||||
int row_width = (r->w - 2 * _margin);
|
||||
for (int x = 0; x < row_width; ++x) {
|
||||
|
||||
|
||||
|
||||
for (int sx = 0; sx < input_format_offset; ++sx) {
|
||||
data.set(start_indx + (x * 4) + sx, image_data[orig_img_indx + sx + (x * input_format_offset)]);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef TEXTURE_PACKER_H
|
||||
#define TEXTURE_PACKER_H
|
||||
|
||||
#include "core/reference.h"
|
||||
#include "core/image.h"
|
||||
#include "core/color.h"
|
||||
#include "core/image.h"
|
||||
#include "core/reference.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
#include "scene/resources/texture.h"
|
||||
@ -31,13 +31,13 @@ public:
|
||||
void set_margin(const int margin);
|
||||
|
||||
Ref<AtlasTexture> add_texture(Ref<Texture> texture);
|
||||
|
||||
|
||||
Ref<AtlasTexture> get_texture(Ref<Texture> texture);
|
||||
Ref<AtlasTexture> get_texture_index(int index);
|
||||
|
||||
|
||||
Ref<Texture> get_original_texture(int index);
|
||||
|
||||
bool contains_texture(Ref<Texture> texture);
|
||||
|
||||
bool contains_texture(Ref<Texture> texture);
|
||||
|
||||
bool unref_texture_index(int index);
|
||||
bool unref_texture(Ref<Texture> texture);
|
||||
|
@ -2,8 +2,8 @@
|
||||
#ifndef EDITOR_PLUGIN_PACKER_IMAGE_RESOURCE_H
|
||||
#define EDITOR_PLUGIN_PACKER_IMAGE_RESOURCE_H
|
||||
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
|
||||
#include "packer_image_resource_importer.h"
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
#ifndef EDITOR_IMPORT_COLLADA_MDR
|
||||
#define EDITOR_IMPORT_COLLADA_MDR
|
||||
|
||||
#include "editor/import/editor_import_plugin.h"
|
||||
#include "core/ustring.h"
|
||||
#include "core/io/resource_saver.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/import/editor_import_plugin.h"
|
||||
|
||||
#include "core/image.h"
|
||||
#include "core/io/image_loader.h"
|
||||
@ -35,7 +35,6 @@ public:
|
||||
~PackerImageResourceImporter();
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user