Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1.  
  2. format coff
  3. use32                                   ; Tell compiler to use 32 bit instructions
  4.  
  5. section '.init' code                    ; Keep this line before includes or GCC messes up call addresses
  6.  
  7. include '../../../programs/proc32.inc'
  8. include '../../../programs/macros.inc'
  9. purge section,mov,add,sub
  10.        
  11. include '../../../programs/dll.inc'
  12.        
  13. public init_libimg as '_init_libimg_asm'
  14. ;;; Returns 0 on success. -1 on failure.
  15.  
  16. proc init_libimg
  17.        
  18.         mcall 68,11
  19.        
  20.         stdcall dll.Load, @IMPORT
  21.         test    eax, eax
  22.         jnz     error
  23.        
  24.         mov eax, 0
  25.         ret
  26.        
  27. error: 
  28.         mov eax, -1
  29.         ret
  30. endp   
  31.  
  32. @IMPORT:
  33. library lib_libimg,     'libimg.obj'
  34.  
  35. import lib_libimg, \
  36.         libimg_init, 'lib_init' , \
  37.         img_is_img, 'img_is_img' , \
  38.         img_info, 'img_info' , \
  39.         img_from_file, 'img_from_file', \
  40.         img_to_file, 'img_to_file', \
  41.         img_from_rgb, 'img_from_rgb', \
  42.         img_to_rgb, 'img_to_rgb', \
  43.         img_to_rgb2, 'img_to_rgb2', \
  44.         img_decode, 'img_decode', \
  45.         img_encode, 'img_encode', \
  46.         img_create, 'img_create', \
  47.         img_destroy, 'img_destroy', \
  48.         img_destroy_layer, 'img_destroy_layer', \
  49.         img_count, 'img_count', \
  50.         img_lock_bits, 'img_lock_bits', \
  51.         img_unlock_bits, 'img_unlock_bits', \
  52.         img_flip, 'img_flip', \
  53.         img_flip_layer, 'img_flip_layer', \
  54.         img_rotate, 'img_rotate', \
  55.         img_rotate_layer, 'img_rotate_layer', \
  56.         img_draw, 'img_draw'
  57.        
  58. public libimg_init as  '_libimg_init'
  59. ;       public img_is_img as  '_img_is_img'
  60. ;public img_info as  '_img_info'
  61. ;public img_from_file as  '_img_from_file'
  62. ;public img_to_file as  '_img_to_file'
  63. ;public img_from_rgb as  '_img_from_rgb'
  64. public img_to_rgb as  '_img_to_rgb'
  65. public img_to_rgb2 as  '_img_to_rgb2'
  66. public img_decode as  '_img_decode'
  67. public img_encode as  '_img_encode'
  68. public img_create as  '_img_create'
  69. public img_destroy as  '_img_destroy'
  70. public img_destroy_layer as  '_img_destroy_layer'
  71. public img_count as  '_img_count'
  72. ;public img_lock_bits as  '_img_lock_bits'
  73. ;public img_unlock_bits as  '_img_unlock_bits'
  74. public img_flip as  '_img_flip'
  75. public img_flip_layer as  '_img_flip_layer'
  76. public img_rotate as  '_img_rotate'
  77. public img_rotate_layer as  '_img_rotate_layer'
  78. public img_draw as  '_img_draw'
  79.