diff --git a/src/Formats.c b/src/Formats.c index 17164e9dd..d246a8c88 100644 --- a/src/Formats.c +++ b/src/Formats.c @@ -850,7 +850,7 @@ static ReturnCode Dat_ReadFieldData(struct Stream* stream, struct JFieldDesc* fi case JFIELD_OBJECT: { /* Luckily for us, we only have to account for blockMap object */ /* Other objects (e.g. player) are stored after the fields we actually care about, so ignore them */ - fieldName = String_FromRawArray(field->FieldName); + fieldName = String_FromRaw((char*)field->FieldName, JNAME_SIZE); if (!String_CaselessEqualsConst(&fieldName, "blockMap")) return 0; if ((res = stream->ReadU8(stream, &typeCode))) return res; @@ -920,7 +920,7 @@ ReturnCode Dat_Load(struct Stream* stream) { for (i = 0; i < obj.FieldsCount; i++) { field = &obj.Fields[i]; if ((res = Dat_ReadFieldData(&compStream, field))) return res; - fieldName = String_FromRawArray(field->FieldName); + fieldName = String_FromRaw((char*)field->FieldName, JNAME_SIZE); if (String_CaselessEqualsConst(&fieldName, "width")) { World.Width = Dat_I32(field); diff --git a/src/Graphics.c b/src/Graphics.c index 817b7fccb..b2266a5f7 100644 --- a/src/Graphics.c +++ b/src/Graphics.c @@ -886,7 +886,7 @@ ReturnCode Gfx_TakeScreenshot(struct Stream* output) { res = IDirect3DSurface9_LockRect(temp, &rect, NULL, D3DLOCK_READONLY | D3DLOCK_NO_DIRTY_UPDATE); if (res) goto finished; { - Bitmap_Init(bmp, desc.Width, desc.Height, rect.pBits); + Bitmap_Init(bmp, desc.Width, desc.Height, (uint8_t*)rect.pBits); res = Png_Encode(&bmp, output, NULL, false); if (res) { IDirect3DSurface9_UnlockRect(temp); goto finished; } } @@ -1090,7 +1090,7 @@ static void Gfx_DoMipmaps(int x, int y, Bitmap* bmp, bool partial) { if (width > 1) width /= 2; if (height > 1) height /= 2; - cur = Mem_Alloc(width * height, 4, "mipmaps"); + cur = (uint8_t*)Mem_Alloc(width * height, 4, "mipmaps"); Gfx_GenMipmaps(width, height, cur, prev); if (partial) { diff --git a/src/MapRenderer.c b/src/MapRenderer.c index b8cdbae9e..bdd95754d 100644 --- a/src/MapRenderer.c +++ b/src/MapRenderer.c @@ -321,7 +321,8 @@ static void MapRenderer_FreeChunks(void) { static void MapRenderer_AllocateParts(void) { uint32_t count = MapRenderer_ChunksCount * MapRenderer_1DUsedCount; - partsBuffer_Raw = Mem_AllocCleared(count * 2, sizeof(struct ChunkPartInfo), "chunk parts"); + partsBuffer_Raw = (struct ChunkPartInfo*)Mem_AllocCleared(count * 2, sizeof(struct ChunkPartInfo), "chunk parts"); + MapRenderer_PartsNormal = partsBuffer_Raw; MapRenderer_PartsTranslucent = partsBuffer_Raw + count; } diff --git a/src/PacketHandlers.c b/src/PacketHandlers.c index 2907eb90c..4882f40f9 100644 --- a/src/PacketHandlers.c +++ b/src/PacketHandlers.c @@ -470,7 +470,7 @@ static void Classic_LevelDataChunk(uint8_t* data) { #else if (cpe_extBlocks && value) { /* Only allocate map2 when needed */ - if (!map2_blocks) map2_blocks = Mem_Alloc(map_volume, 1, "map blocks upper"); + if (!map2_blocks) map2_blocks = (BlockRaw*)Mem_Alloc(map_volume, 1, "map blocks upper"); left = map_volume - map2_index; map2_stream.Read(&map2_stream, &map2_blocks[map2_index], left, &read); diff --git a/src/Resources.c b/src/Resources.c index 3bea01de6..0eeb06b21 100644 --- a/src/Resources.c +++ b/src/Resources.c @@ -324,7 +324,7 @@ static ReturnCode ZipPatcher_WritePng(struct Stream* s, struct ResourceTexture* *-------------------------------------------------------Texture patcher---------------------------------------------------* *#########################################################################################################################*/ #define ANIMS_TXT_CONTENTS \ -"# This file defines the animations used in a texture pack for ClassicalSharp and other supporting applications.\r\n" \ +"# This file defines the animations used in a texture pack for ClassiCube.\r\n" \ "# Each line is in the format : \r\n" \ "# - TileX and TileY are the coordinates of the tile in terrain.png that will be replaced by the animation frames.\r\n" \ "# Essentially, TileX and TileY are the remainder and quotient of an ID in F10 menu divided by 16\r\n" \ @@ -336,8 +336,8 @@ static ReturnCode ZipPatcher_WritePng(struct Stream* s, struct ResourceTexture* "# - Tick delay is the number of ticks a frame doesn't change. For instance, delay of 0\r\n" \ "# means that the tile would be replaced every tick, while delay of 2 means\r\n" \ "# 'replace with frame 1, don't change frame, don't change frame, replace with frame 2'.\r\n" \ -"# NOTE: If a file called 'uselavaanim' is in the texture pack, ClassicalSharp 0.99.2 onwards uses its built - in dynamic generation for the lava texture animation.\r\n" \ -"# NOTE : If a file called 'usewateranim' is in the texture pack, ClassicalSharp 0.99.5 onwards uses its built - in dynamic generation for the water texture animation.\r\n" \ +"# NOTE: If a file called 'uselavaanim' is in the texture pack, the game instead generates the lava texture animation.\r\n" \ +"# NOTE: If a file called 'usewateranim' is in the texture pack, the game instead generates the water texture animation.\r\n" \ "\r\n" \ "# fire\r\n" \ "6 2 0 0 16 32 0"