Explorar o código

Remove reference to material

Daniele Bartolini %!s(int64=11) %!d(string=hai) anos
pai
achega
324f694952
Modificáronse 2 ficheiros con 1 adicións e 40 borrados
  1. 0 2
      engine/resource/font_resource.cpp
  2. 1 38
      engine/resource/font_resource.h

+ 0 - 2
engine/resource/font_resource.cpp

@@ -73,7 +73,6 @@ void compile(Filesystem& fs, const char* resource_path, File* out_file)
 
 	JSONElement root = json.root();
 
-	JSONElement mat = root.key("material");
 	JSONElement count = root.key("count");
 	JSONElement size = root.key("size");
 	JSONElement font_size = root.key("font_size");
@@ -88,7 +87,6 @@ void compile(Filesystem& fs, const char* resource_path, File* out_file)
 		array::push_back(m_glyphs, data);
 	}
 
-	h.material = mat.to_resource_id("material");
 	h.num_glyphs = array::size(m_glyphs);
 	h.texture_size = size.to_int();
 	h.font_size = font_size.to_int();

+ 1 - 38
engine/resource/font_resource.h

@@ -37,42 +37,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-// Glyph metrics:
-// --------------
-//
-//                   x_min|<-------- width -------->|x_max
-//                        |                         |
-//              |   	  +-------------------------+--------------- y_max
-//              |         |    ggggggggg   ggggg    |     ^        ^
-//              |         |   g:::::::::ggg::::g    |     |        |
-//              |         |  g:::::::::::::::::g    |     |        |
-//              |         | g::::::ggggg::::::gg    |     |        |
-//              |         | g:::::g     g:::::g     |     |        |
-//    x_offset -|-------->| g:::::g     g:::::g     |  y_offset    |
-//              |         | g:::::g     g:::::g     |     |        |
-//              |         | g::::::g    g:::::g     |     |        |
-//              |         | g:::::::ggggg:::::g     |     |        |
-//              |         |  g::::::::::::::::g     |     |      height
-//              |         |   gg::::::::::::::g     |     |        |
-//  baseline ---*---------|---- gggggggg::::::g-----*--------      |
-//            / |         |             g:::::g     |              |
-//     origin   |         | gggggg      g:::::g     |              |
-//              |         | g:::::gg   gg:::::g     |              |
-//              |         |  g::::::ggg:::::::g     |              |
-//              |         |   gg:::::::::::::g      |              |
-//              |         |     ggg::::::ggg        |              |
-//              |         |         gggggg          |              v
-//              |         +-------------------------+--------------- y_min
-//              |                                   |
-//              |------------- x_advance ---------->|
-
-
 //-----------------------------------------------------------------------------
 struct FontHeader
 {
-	ResourceId material;
 	uint32_t num_glyphs;
-	uint32_t texture_size;			// Font texture size -- pow of 2
+	uint32_t texture_size; // Font texture size -- pow of 2
 	uint32_t font_size;
 };
 
@@ -124,12 +93,6 @@ public:
 		allocator.deallocate(resource);
 	}
 
-	//-----------------------------------------------------------------------------
-	ResourceId material() const
-	{
-		return ((FontHeader*) this)->material;
-	}
-
 	//-----------------------------------------------------------------------------
 	uint32_t num_glyphs() const
 	{