Skip to content

Commit

Permalink
this is the beginning of the 24-bit madness
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshakami committed Jun 29, 2024
1 parent 9b63e2a commit b118a3c
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 40 deletions.
7 changes: 1 addition & 6 deletions plt0.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VisualStudioVersion = 17.1.32210.238
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plt0", "plt0\plt0.csproj", "{D51E5403-2EAE-43EF-8B0D-D8CECFCE9154}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{151781A7-7F22-4AED-B450-8C5D6EACC225}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "encode24", "encode24", "{151781A7-7F22-4AED-B450-8C5D6EACC225}"
ProjectSection(SolutionItems) = preProject
plt0\encode24\AI4.cs = plt0\encode24\AI4.cs
plt0\encode24\AI8.cs = plt0\encode24\AI8.cs
Expand All @@ -20,8 +20,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
plt0\encode24\RGBA32.cs = plt0\encode24\RGBA32.cs
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "encode24", "encode24", "{91A6E46D-932B-43BE-8898-F7A2CECF6944}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -42,9 +40,6 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{91A6E46D-932B-43BE-8898-F7A2CECF6944} = {151781A7-7F22-4AED-B450-8C5D6EACC225}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {665DC422-CF74-445C-B29B-D5160FD0376D}
EndGlobalSection
Expand Down
24 changes: 12 additions & 12 deletions plt0/code/Create_plt0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,61 +101,61 @@ public List<byte[]> Create_plt0(byte[] bmp_image)
switch (_plt0.palette_format_int32[3])
{
case 0: // AI8
Palette_AI8_class palette_ai8 = new Palette_AI8_class(_plt0);
Palette_AI8_class24 palette_ai8 = new Palette_AI8_class24(_plt0);
palette_ai8.Palette_AI8(index_list, Colour_Table, bmp_image, index);
break;
case 1: // RGB565
Palette_RGB565_class palette_rgb565 = new Palette_RGB565_class(_plt0);
Palette_RGB565_class24 palette_rgb565 = new Palette_RGB565_class24(_plt0);
palette_rgb565.Palette_RGB565(index_list, Colour_Table, bmp_image, index);
break;
case 2: // RGB5A3
Palette_RGB5A3_class palette_rgb5a3 = new Palette_RGB5A3_class(_plt0);
Palette_RGB5A3_class24 palette_rgb5a3 = new Palette_RGB5A3_class24(_plt0);
palette_rgb5a3.Palette_RGB5A3(index_list, Colour_Table, bmp_image, index);
break;
// end of case 2 palette RGB5A3
} // end of switch palette format
} // end of if (has palette)
else // image doesn't have a palette
{
switch (_plt0.texture_format_int32[3]) // splitted into different files in the encode folder, because I'm going to add so many algorithms for CMPR
switch (_plt0.texture_format_int32[3]) // splitted into different files in the encode24 folder, because I'm going to add so many algorithms for CMPR
{
case 0: // I4
I4_class i4_class = new I4_class(_plt0);
I4_class24 i4_class = new I4_class24(_plt0);
i4_class.I4(index_list, bmp_image, index);
break;

case 1: // I8
I8_class i8_class = new I8_class(_plt0);
I8_class24 i8_class = new I8_class24(_plt0);
i8_class.I8(index_list, bmp_image, index);
break;

case 2: // IA4
AI4_class ai4_class = new AI4_class(_plt0);
AI4_class24 ai4_class = new AI4_class24(_plt0);
ai4_class.AI4(index_list, bmp_image, index);
break;

case 3: // AI8
AI8_class ai8_class = new AI8_class(_plt0);
AI8_class24 ai8_class = new AI8_class24(_plt0);
ai8_class.AI8(index_list, bmp_image, index);
break;

case 4: // RGB565
RGB565_class rgb565_class = new RGB565_class(_plt0);
RGB565_class24 rgb565_class = new RGB565_class24(_plt0);
rgb565_class.RGB565(index_list, bmp_image, index);
break;

case 5: // RGB5A3
RGB5A3_class rgb5a3_class = new RGB5A3_class(_plt0);
RGB5A3_class24 rgb5a3_class = new RGB5A3_class24(_plt0);
rgb5a3_class.RGB5A3(index_list, bmp_image, index);
break;

case 6: // RGBA32
RGBA32_class rgba32_class = new RGBA32_class(_plt0);
RGBA32_class24 rgba32_class = new RGBA32_class24(_plt0);
rgba32_class.RGBA32(index_list, bmp_image, index);
break;

case 0xE: // CMPR
CMPR_class cmpr_class = new CMPR_class(_plt0);
CMPR_class24 cmpr_class = new CMPR_class24(_plt0);
cmpr_class.CMPR(index_list, bmp_image);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/AI4.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;

class AI4_class
class AI4_class24
{
Parse_args_class _plt0;
public AI4_class(Parse_args_class Parse_args_class)
public AI4_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/AI8.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;

class AI8_class
class AI8_class24
{
Parse_args_class _plt0;
public AI8_class(Parse_args_class Parse_args_class)
public AI8_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/CMPR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ 11 12 15 16
the reason for this choice is conveniency, considering that a bmp file starts by the last line
*/
class CMPR_class
class CMPR_class24
{
Parse_args_class _plt0;
public CMPR_class(Parse_args_class Parse_args_class)
public CMPR_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/I4.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;

class I4_class
class I4_class24
{
Parse_args_class _plt0;
public I4_class(Parse_args_class Parse_args_class)
public I4_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/I8.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;

class I8_class
class I8_class24
{
Parse_args_class _plt0;
public I8_class(Parse_args_class Parse_args_class)
public I8_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/Palette_AI8.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using System.Collections.Generic;
using System.Linq;

class Palette_AI8_class
class Palette_AI8_class24
{
Parse_args_class _plt0;
public Palette_AI8_class(Parse_args_class Parse_args_class)
public Palette_AI8_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/Palette_RGB565.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using System.Collections.Generic;
using System.Linq;

class Palette_RGB565_class
class Palette_RGB565_class24
{
Parse_args_class _plt0;
public Palette_RGB565_class(Parse_args_class Parse_args_class)
public Palette_RGB565_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/Palette_RGB5A3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using System.Collections.Generic;
using System.Linq;

class Palette_RGB5A3_class
class Palette_RGB5A3_class24
{
Parse_args_class _plt0;
public Palette_RGB5A3_class(Parse_args_class Parse_args_class)
public Palette_RGB5A3_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/RGB565.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;

class RGB565_class
class RGB565_class24
{
Parse_args_class _plt0;
public RGB565_class(Parse_args_class Parse_args_class)
public RGB565_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/RGB5A3.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;

class RGB5A3_class
class RGB5A3_class24
{
Parse_args_class _plt0;
public RGB5A3_class(Parse_args_class Parse_args_class)
public RGB5A3_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down
4 changes: 2 additions & 2 deletions plt0/encode24/RGBA32.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;

class RGBA32_class
class RGBA32_class24
{
Parse_args_class _plt0;
public RGBA32_class(Parse_args_class Parse_args_class)
public RGBA32_class24(Parse_args_class Parse_args_class)
{
_plt0 = Parse_args_class;
}
Expand Down

0 comments on commit b118a3c

Please sign in to comment.