?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. ;image loaded in load_buf1 and load_buf2;
  2. load_gfx_pre_sub:
  3.         push hl
  4.  
  5.         call load_gfx_sub
  6.  
  7.  
  8.         ld a,(language)
  9.         ld hl,loc_modes
  10.         call sel_word
  11.         call copystr_hlde ;+lang    ( gfx/ddp/eng/ )
  12.         pop hl
  13.         push hl
  14.         call copystr_hlde ;+picture name
  15.  
  16.         ld hl,gfx_ext
  17.         call copystr_hlde ;+extension
  18.         xor a
  19.         ld (de),a         ;+string terminator
  20.  
  21.         ld de,buf
  22.         call openstream_file
  23.         or a
  24.         jr z,load_gfx_to_load_buf_found  ;found localized image
  25.  
  26.         call load_gfx_sub
  27.  
  28.         pop hl
  29.         push hl
  30.         call copystr_hlde  ;+name
  31.  
  32.         ld hl,gfx_ext
  33.         call copystr_hlde  ;+ext
  34.         xor a
  35.         ld (de),a          ;+terminator
  36.  
  37.         ld de,buf
  38.         call openstream_file
  39.         or a
  40.         jp nz,fileopenerror  
  41.  
  42. load_gfx_to_load_buf_found:        
  43.         pop hl
  44.         ret
  45. load_gfx_to_load_buf_nopal:
  46.         call load_gfx_pre_sub
  47.  
  48.         call store8000c000
  49.  
  50.         ld a,(load_buf1)
  51.         SETPG8000
  52.  
  53.         ld a,(load_buf2)
  54.         SETPGC000
  55.  
  56.  
  57.          ld hl,0x8000
  58.          ld de,0x8000
  59.          call readstream_file
  60.          or a
  61.         jp nz,filereaderror
  62.  
  63.         call closestream_file
  64.  
  65.         jp restore8000c000
  66. load_gfx_to_load_buf:
  67.         call load_gfx_pre_sub
  68.  
  69.         call store8000c000
  70.  
  71.         ld a,(load_buf1)
  72.         SETPG8000
  73.  
  74.         ld a,(load_buf2)
  75.         SETPGC000
  76.  
  77.  
  78.          ld hl,0x8000
  79.          ld de,0x8000
  80.          call readstream_file
  81.          or a
  82.         jp nz,filereaderror
  83.  
  84.  
  85.         ld de,pal;curpal
  86.         ld hl,32
  87.         call readstream_file
  88.         or a
  89.        jp nz,filereaderror
  90.  
  91.         call closestream_file
  92.  
  93.         jp restore8000c000
  94.  
  95. load_gfx_sub:
  96.         ld de,buf
  97.         ld hl,gfx_path1  
  98.         call copystr_hlde ;gfx/
  99.  
  100.         ld a,(gfx_mode)
  101.         ld hl,gfx_modes
  102.         call sel_word
  103.         jp copystr_hlde ;gfx/ddp/
  104. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  105. ;image loaded in mem_buf1 and mem_buf2;
  106. load_gfx_to_mem_buf:
  107.         call load_gfx_pre_sub
  108.  
  109.         call store8000c000
  110.  
  111.         ld a,(mem_buf1)
  112.         SETPG8000
  113.  
  114.         ld a,(mem_buf2)
  115.         SETPGC000
  116.  
  117.  
  118.          ld hl,0x8000
  119.          ld de,0x8000
  120.          call readstream_file
  121.          or a
  122.         jp nz,filereaderror
  123.  
  124.  
  125.         ld de,mempal;curpal
  126.         ld hl,32
  127.         call readstream_file
  128.         or a
  129.        jp nz,filereaderror
  130.  
  131.         call closestream_file
  132.  
  133.         jp restore8000c000
  134. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  135. ;image loaded in mem_buf1 and mem_buf2;
  136. load_gfx_to_scr_buf:
  137.         call load_gfx_pre_sub
  138.  
  139.         call store8000c000
  140.  
  141.         ld a,(scr_buf1)
  142.         SETPG8000
  143.  
  144.         ld a,(scr_buf2)
  145.         SETPGC000
  146.  
  147.  
  148.          ld hl,0x8000
  149.          ld de,0x8000
  150.          call readstream_file
  151.          or a
  152.         jp nz,filereaderror
  153.  
  154.         call closestream_file
  155.  
  156.         jp restore8000c000
  157. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  158. load_ovl_to_script_buf:
  159.         push hl
  160.         call load_ovl_to_script_buf_sub
  161.  
  162.         ld a,(language)
  163.         ld hl,loc_modes
  164.         call sel_word
  165.         call copystr_hlde ;+lang    ( ovl/eng/ )
  166.  
  167.         pop hl
  168.         push hl
  169.         call copystr_hlde ;+name
  170.  
  171.         xor a
  172.         ld (de),a
  173.  
  174.         ld de,buf
  175.         call openstream_file
  176.         or a
  177.         jr z,load_ovl_to_script_buf_found  ;found localized ovl
  178.  
  179.         call load_ovl_to_script_buf_sub
  180.  
  181.         pop hl
  182.         push hl
  183.         call copystr_hlde
  184.         xor a
  185.         ld (de),a        
  186.  
  187.         ld de,buf
  188.         call openstream_file
  189.         or a
  190.         jp nz,fileopenerror
  191. load_ovl_to_script_buf_found:
  192.         pop hl
  193.  
  194.         ld a,(script_buf1)
  195.         SETPG4000
  196.         ld a,(script_buf2)
  197.         SETPG8000        
  198.  
  199.         ld hl,0x8000
  200.         ld de,0x4000
  201.         call readstream_file
  202.         or a
  203.         jp nz,filereaderror
  204.  
  205.         jp closestream_file
  206.  
  207.  
  208. load_ovl_to_script_buf_sub:
  209.         ld de,buf
  210.         ld hl,ovl_path1  
  211.         jp copystr_hlde ;ovl/
  212. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;        
  213. _load_cdata:        
  214.                 ld de,gallery_file
  215.                 call openstream_file
  216.                 or a
  217.                 jp nz,fileopenerror
  218.  
  219.                 ld hl,100 ;len
  220.                 ld de,CDATA ;addr
  221.                 call readstream_file
  222.                 or a
  223.                 jp nz,filereaderror
  224.  
  225.                 jp closestream_file
  226. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  227. _save_cdata:        
  228.                 ld de,gallery_file
  229.                 call openstream_file
  230.                 or a
  231.                 jp nz,fileopenerror
  232.  
  233.                 ld hl,100 ;len
  234.                 ld de,CDATA ;addr
  235.                 call savestream_file
  236.                 or a
  237.                 jp nz,filewriteerror
  238.  
  239.                 jp closestream_file
  240. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  241. savestream_file
  242. ;de=buf
  243. ;hl=size
  244.         ld a,(filehandle)
  245.         ld b,a
  246.         OS_WRITEHANDLE
  247. ;hl=actual size
  248.         ret
  249. ;============================================
  250. load_big_img_dark:
  251.         call load_gfx_to_load_buf
  252.  
  253.         ld hl,pal
  254.         ld de,temppal
  255.         ld bc,32
  256.         ldir
  257.  
  258.         ld hl,blackpal
  259.         ld de,pal
  260.         ld bc,32
  261.         ldir
  262.  
  263.         call _immed_big
  264.  
  265.         ld de,pal
  266.         ld hl,temppal
  267.         ld bc,32
  268.         ldir        
  269.  
  270.         ld a,1
  271.         ld (setpalflag),a
  272.         ret