]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/images/tga/tga.factor
Fix comments to be ! not #!.
[factor.git] / extra / images / tga / tga.factor
index c64f4907d89e5db8c36c034b029172313a4cf069..d0b4177d2389b14c0c3ff6b98850be8f1dc5dc3d 100644 (file)
@@ -169,7 +169,7 @@ ERROR: bad-tga-unsupported ;
     ] map >hashtable ; inline
 
 :: read-tga ( -- image )
-    #! Read header
+    ! Read header
     read-id-length                                       :> id-length
     read-color-map-type                                  :> map-type
     read-image-type                                      :> image-type
@@ -187,13 +187,13 @@ ERROR: bad-tga-unsupported ;
     image-width image-height pixel-depth read-image-data :> image-data
 
     [
-        #! Read optional footer
+        ! Read optional footer
         26 seek-end seek-input
         read-extension-area-offset      :> extension-offset
         read-developer-directory-offset :> directory-offset
         read-signature
 
-        #! Read optional extension section
+        ! Read optional extension section
         extension-offset 0 =
         [
             extension-offset seek-absolute seek-input
@@ -228,7 +228,7 @@ ERROR: bad-tga-unsupported ;
             scan-line-offset seek-absolute seek-input
             image-height read-scan-line-table :> scan-offsets
 
-            #! Read optional developer section
+            ! Read optional developer section
             directory-offset 0 =
             [ f ]
             [
@@ -238,14 +238,14 @@ ERROR: bad-tga-unsupported ;
         ] unless
     ] ignore-errors
 
-    #! Only 24-bit uncompressed BGR and 32-bit uncompressed BGRA are supported.
-    #! Other formats would need to be converted to work within the image class.
+    ! Only 24-bit uncompressed BGR and 32-bit uncompressed BGRA are supported.
+    ! Other formats would need to be converted to work within the image class.
     map-type 0 = [ bad-tga-unsupported ] unless
     image-type 2 = [ bad-tga-unsupported ] unless
     pixel-depth { 24 32 } member? [ bad-tga-unsupported ] unless
     pixel-order { 0 2 } member? [ bad-tga-unsupported ] unless
 
-    #! Create image instance
+    ! Create image instance
     image new
     alpha-bits 0 = [ BGR ] [ BGRA ] if >>component-order
     { image-width image-height }       >>dim
@@ -262,11 +262,11 @@ M: tga-image image>stream
         component-order>> { BGRA BGRA } member? [ bad-tga-unsupported ] unless
     ] keep
 
-    B{ 0 }         write #! id-length
-    B{ 0 }         write #! map-type
-    B{ 2 }         write #! image-type
-    B{ 0 0 0 0 0 } write #! color map first, length, entry size
-    B{ 0 0 0 0 }   write #! x-origin, y-origin
+    B{ 0 }         write ! id-length
+    B{ 0 }         write ! map-type
+    B{ 2 }         write ! image-type
+    B{ 0 0 0 0 0 } write ! color map first, length, entry size
+    B{ 0 0 0 0 }   write ! x-origin, y-origin
     {
         [ dim>> first 2 >le write ]
         [ dim>> second 2 >le write ]