File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ Font::Font(const u8 *nftr, u32 nftrSize) {
2424 // Load character glyphs
2525 tileAmount = (chunkSize - 0x10 ) / tileSize;
2626 ptr += 4 ;
27- fontTiles = new u8 [tileSize * tileAmount];
28- tonccpy (fontTiles, ptr, tileSize * tileAmount);
27+ fontTiles = (u8 *)ptr;
2928
3029 // Load character widths
3130 ptr = nftr + 0x24 ;
@@ -34,8 +33,7 @@ Font::Font(const u8 *nftr, u32 nftrSize) {
3433 ptr = nftr + locHDWC - 4 ;
3534 tonccpy (&chunkSize, ptr, 4 );
3635 ptr += 4 + 8 ;
37- fontWidths = new u8 [3 * tileAmount];
38- tonccpy (fontWidths, ptr, 3 * tileAmount);
36+ fontWidths = (u8 *)ptr;
3937
4038 // Load character maps
4139 fontMap = new u16 [tileAmount];
@@ -96,10 +94,6 @@ Font::Font(const u8 *nftr, u32 nftrSize) {
9694}
9795
9896Font::~Font (void ) {
99- if (fontTiles)
100- delete[] fontTiles;
101- if (fontWidths)
102- delete[] fontWidths;
10397 if (fontMap)
10498 delete[] fontMap;
10599}
You can’t perform that action at this time.
0 commit comments