?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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  156. ;image loaded in mem_buf3 and mem_buf4;
  157. load_gfx_to_mem2_buf:
  158.         call load_gfx_pre_sub
  159.  
  160.         call store8000c000
  161.  
  162.         ld a,(mem_buf3)
  163.         SETPG8000
  164.  
  165.         ld a,(mem_buf4)
  166.         SETPGC000        
  167.         jr load_gfx_to_mem_buf_core
  168. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  169. ;image loaded in mem_buf1 and mem_buf2;
  170. load_gfx_to_mem_buf:
  171.         call load_gfx_pre_sub
  172.  
  173.         call store8000c000
  174.  
  175.         ld a,(mem_buf1)
  176.         SETPG8000
  177.  
  178.         ld a,(mem_buf2)
  179.         SETPGC000
  180. load_gfx_to_mem_buf_core:
  181.  
  182.          ld hl,0x8000
  183.          ld de,0x8000
  184.          call readstream_file
  185.          or a
  186.         jp nz,filereaderror
  187.  
  188.  
  189.         ld de,mempal;curpal
  190.         ld hl,32
  191.         call readstream_file
  192.         or a
  193.        jp nz,filereaderror
  194.  
  195.         call closestream_file
  196.  
  197.         jp restore8000c000
  198. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  199. ;image loaded in mem_buf1 and mem_buf2;
  200. load_gfx_to_scr_buf:
  201.         call load_gfx_pre_sub
  202.  
  203.         call store8000c000
  204.  
  205.         ld a,(scr_buf1)
  206.         SETPG8000
  207.  
  208.         ld a,(scr_buf2)
  209.         SETPGC000
  210.  
  211.  
  212.          ld hl,0x8000
  213.          ld de,0x8000
  214.          call readstream_file
  215.          or a
  216.         jp nz,filereaderror
  217.  
  218.         call closestream_file
  219.  
  220.         jp restore8000c000
  221. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  222. load_ovl_to_script_buf:
  223.         push hl
  224.         call load_ovl_to_script_buf_sub
  225.  
  226.         ld a,(language)
  227.         ld hl,loc_modes
  228.         call sel_word
  229.         call copystr_hlde ;+lang    ( ovl/eng/ )
  230.  
  231.         pop hl
  232.         push hl
  233.         call copystr_hlde ;+name
  234.  
  235.         xor a
  236.         ld (de),a
  237.  
  238.         ld de,buf
  239.         call openstream_file
  240.         or a
  241.         jr z,load_ovl_to_script_buf_found  ;found localized ovl
  242.  
  243.         call load_ovl_to_script_buf_sub
  244.  
  245.         pop hl
  246.         push hl
  247.         call copystr_hlde
  248.         xor a
  249.         ld (de),a        
  250.  
  251.         ld de,buf
  252.         call openstream_file
  253.         or a
  254.         jp nz,fileopenerror
  255. load_ovl_to_script_buf_found:
  256.         pop hl
  257.  
  258.         ld a,(script_buf1)
  259.         SETPG4000
  260.         ld a,(script_buf2)
  261.         SETPG8000        
  262.  
  263.         ld hl,0x8000
  264.         ld de,0x4000
  265.         call readstream_file
  266.         or a
  267.         jp nz,filereaderror
  268.  
  269.         jp closestream_file
  270.  
  271.  
  272. load_ovl_to_script_buf_sub:
  273.         ld de,buf
  274.         ld hl,ovl_path1  
  275.         jp copystr_hlde ;ovl/
  276.  
  277. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  278. savestream_file
  279. ;de=buf
  280. ;hl=size
  281.         ld a,(filehandle)
  282.         ld b,a
  283.         OS_WRITEHANDLE
  284. ;hl=actual size
  285.         ret
  286. ;============================================
  287. showpalz:
  288.         ld a,1
  289.         ld (setpalflag),a
  290.         ret
  291.  
  292. load_big_img_dark:
  293.         ld hl,showpalz
  294.         push hl
  295.  
  296. load_big_img_dark2:
  297.         call load_gfx_to_load_buf
  298.  
  299.         ld hl,pal
  300.         ld de,temppal
  301.         ld bc,32
  302.         ldir
  303.  
  304.         ld hl,niggapal
  305.         ld de,pal
  306.         ld bc,32
  307.         ldir
  308.  
  309.         call _immed_big
  310.  
  311.         ld de,pal
  312.         ld hl,temppal
  313.         ld bc,32
  314.         ldir    
  315.         ret
  316.