File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,34 @@ Import BRL.PNGLoader
14
14
Global appVersion:String = " 1.1"
15
15
Global appVersionDate:String = " 20 Sep 2019"
16
16
17
+ Rem
18
+ ------- INDEXING ------------------------------------------------------------------------------------------------------
19
+ EndRem
20
+
21
+ Type TBitmapIndex
22
+ Const GFX_PAL:Byte =0
23
+
24
+ 'Color Value Bytes
25
+ Global palR:Byte [256 ]
26
+ Global palG:Byte [256 ]
27
+ Global palB:Byte [256 ]
28
+
29
+ 'Load color table file
30
+ Function FLoadPalette (paletteFile:String )
31
+ Local index:Int
32
+ If FileSize(paletteFile) = 768
33
+ Local paletteStream:TStream = ReadFile(paletteFile)
34
+ For index = 0 To 255
35
+ palR[ index] = ReadByte(paletteStream)
36
+ palG[ index] = ReadByte(paletteStream)
37
+ palB[ index] = ReadByte(paletteStream)
38
+ Next
39
+ CloseStream paletteStream
40
+ EndIf
41
+ EndFunction
42
+
43
+ EndType
44
+
17
45
Rem
18
46
------- FILE IO -------------------------------------------------------------------------------------------------------
19
47
EndRem
@@ -398,6 +426,7 @@ Type TAppGUI
398
426
If Not mainToEdit And importedFile <> Null Then
399
427
FAppEditor()
400
428
TAppOutput.FOutputBoot()
429
+ TBitmapIndex.FLoadPalette(" assets/palette.act" )
401
430
mainToEdit = True
402
431
EndIf
403
432
EndFunction
@@ -410,6 +439,7 @@ EndRem
410
439
New TAppGUI
411
440
New TAppOutput
412
441
New TAppFileIO
442
+ New TBitmapIndex
413
443
TAppGUI.FAppMain()
414
444
415
445
Rem
You can’t perform that action at this time.
0 commit comments