?login_element?

Subversion Repositories NedoOS

Rev

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

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