유저정보 - 거상 갤러리

[0812] AGF 스크립트 최종 수정

ㅇㅇ 비회원 146.70 한 달 전 조회 1887

사용툴 : quickbms [최신버전 사용 권장]

사용방법 : 스크립트 복사해서 .txt나 .bms 로 저장후 quickbms를 통한 스킨 제작 방법 검색해서 사용.

 

이미지추출 : 

quickbms 실행 - 스크립트 선택 - agf파일 선택 - 출력 경로 선택

이미지결합 : 

quickbms 실행 - 스크립트 선택 - txt파일 선택 - 출력 경로 선택

투명도 변경 : 이미지 추출/결합 없이 투명도만 원하는 투명도로 수정 0% ~ 200% 까지 가능. 

quickbms 실행 - 스크립트 선택(2번째줄 투명도 원하는 퍼센트로 변경 후 저장후 선택) - agf 파일 선택 - 출력경로 선택 - 출력파일 끝 “_” 제거 후 거상 폴더에 덮어쓰기

 

1.2 버전 및 전체크기 버전 작동 확인. [전체크기 버전으로 제작된 스킨카페 스킨 일부 작동 확인됨]

전체크기 버전으로 사용하다 추후에 파일변조 뜰 경우 1.2버전으로 사용 시도 하면 될 것 같음.

거상을 즐겨하지 않기 때문에 본 스크립트가 최종버전이고 추가적인 스크립트 변경은 없을 예정. 

 

08.12 수정사항

V1.2 : 일부 이미지 좌표값이 시작점에서 너무 멀어서 흰배경으로 나오던 점 수정됨.

FULL FRAME V1.0 전체크기 추출 및 결합 스크립트 추가 

[ 기존 스킨들 이미지 크기가 바뀌지 않았으면 결합 가능. ]

 

 

-추출스크립트-

//AGFTOTGA 1.2 (거리니닷컴 익명/2021/08/12) Base Script : SPR32TOTGA 2.3 (루란제르/2018/08/29)

IDString "\x23\x00\x00\x00"

log MEMORY_FILE1 0 0 //TGA file
log MEMORY_FILE2 0 0 //Info Text File
log MEMORY_FILE3 0 0 //Unziped Memory
log MEMORY_FILE4 0 0 //Temporary Frame File

get FNAME basename
get FSIZE asize
get EXTNAME extension

goto 0x04
get FRAME_MAX_WIDTH long
get FRAME_MAX_HEIGHT long
get FRAME_COUNT long

for i = 1 <= FRAME_COUNT
   set FRAME_INFO_OFFSET i
   math FRAME_INFO_OFFSET * 8
   math FRAME_INFO_OFFSET + 0x968
   goto FRAME_INFO_OFFSET
   get FRAME_POS_X short
   get FRAME_POS_Y short
   get FRAME_WIDTH short
   get FRAME_HEIGHT short
   putarray 1 i FRAME_POS_X
   putarray 2 i FRAME_POS_Y
   putarray 3 i FRAME_WIDTH
   putarray 4 i FRAME_HEIGHT
next i

set FRAME_MAX_WIDTH_ORIG FRAME_MAX_WIDTH
set FRAME_MAX_HEIGHT_ORIG FRAME_MAX_HEIGHT
for i = 1 <= FRAME_COUNT
   getarray FRAME_POS_X 1 i
   getarray FRAME_POS_Y 2 i
   getarray FRAME_WIDTH 3 i
   getarray FRAME_HEIGHT 4 i
   xmath CALC_WIDTH "FRAME_POS_X + FRAME_WIDTH"
   xmath CALC_HEIGHT "FRAME_POS_Y + FRAME_HEIGHT"
   if (CALC_WIDTH > FRAME_MAX_WIDTH)
       set FRAME_MAX_WIDTH CALC_WIDTH
   endif
   if (CALC_HEIGHT > FRAME_MAX_HEIGHT)
       set FRAME_MAX_HEIGHT CALC_HEIGHT
   endif
next i

xmath FRAME_START_X "FRAME_MAX_WIDTH - FRAME_MAX_WIDTH_ORIG"
xmath FRAME_START_Y "FRAME_MAX_HEIGHT - FRAME_MAX_HEIGHT_ORIG"

print "FRAME_START_X : %FRAME_START_X%"
print "FRAME_START_Y : %FRAME_START_Y%"
print "FRAME_MAX_WIDTH : %FRAME_MAX_WIDTH%"
print "FRAME_MAX_HEIGHT : %FRAME_MAX_HEIGHT%"

//writing info text

putdstring "HQTEAM_AGF_TGA_INFO" 19 MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "STRIPE_NAME|" 12 MEMORY_FILE2
set FNAMELEN strlen FNAME
putdstring FNAME FNAMELEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "EXTENSION|" 10 MEMORY_FILE2
set EXTLEN strlen EXTNAME
putdstring EXTNAME EXTLEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "TOTAL_FRAME_NUMBER|" 19 MEMORY_FILE2
set COUNTLEN strlen FRAME_COUNT
putdstring FRAME_COUNT COUNTLEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "START_X|" 8 MEMORY_FILE2
set FRAME_START_X_LEN strlen FRAME_START_X
putdstring FRAME_START_X FRAME_START_X_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "MAXWIDTH|" 9 MEMORY_FILE2
set MAX_WIDTH_LEN strlen FRAME_MAX_WIDTH
putdstring FRAME_MAX_WIDTH MAX_WIDTH_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "START_Y|" 8 MEMORY_FILE2
set FRAME_START_Y_LEN strlen FRAME_START_Y
putdstring FRAME_START_Y FRAME_START_Y_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "MAXHEIGHT|" 10 MEMORY_FILE2
set MAX_HEIGHT_LEN strlen FRAME_MAX_HEIGHT
putdstring FRAME_MAX_HEIGHT MAX_HEIGHT_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

goto 0x4C0
for i = 1 <= FRAME_COUNT
   get FRAME_OFFSET long
   putarray 0 i FRAME_OFFSET
next i

set UNZIPED_SIZE_ADDR FRAME_COUNT
math UNZIPED_SIZE_ADDR * 8
math UNZIPED_SIZE_ADDR + 0x970
goto UNZIPED_SIZE_ADDR
get UNZIPED_SIZE long

xmath FULL_FRAME_SIZE_ADDR "UNZIPED_SIZE_ADDR + 16"
goto FULL_FRAME_SIZE_ADDR
get FULL_FRAME_WIDTH long
get FULL_FRAME_HEIGHT long

putdstring "FULLWIDTH|" 10 MEMORY_FILE2
set FULL_FRAME_WIDTH_LEN strlen FULL_FRAME_WIDTH
putdstring FULL_FRAME_WIDTH FULL_FRAME_WIDTH_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "FULLHEIGHT|" 11 MEMORY_FILE2
set FULL_FRAME_HEIGHT_LEN strlen FULL_FRAME_HEIGHT
putdstring FULL_FRAME_HEIGHT FULL_FRAME_HEIGHT_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "FRAME_BITMAP_LIST:" 18 MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

//end info

//start extract

set ZIP_SIZE_ADDR FRAME_COUNT
math ZIP_SIZE_ADDR * 8
math ZIP_SIZE_ADDR + 0x99C
goto ZIP_SIZE_ADDR
get ZIP_SIZE long

set ZIP_OFFSET ZIP_SIZE_ADDR
math ZIP_OFFSET + 4

comtype zlib
clog MEMORY_FILE3 ZIP_OFFSET ZIP_SIZE UNZIPED_SIZE

goto 0 MEMORY_FILE3

for i = 1 <= FRAME_COUNT
   print "---------------------Frame No. %i% of %FRAME_COUNT%---------------------"

   getarray FRAME_POS_X 1 i
   getarray FRAME_POS_Y 2 i
   getarray FRAME_WIDTH 3 i
   getarray FRAME_HEIGHT 4 i
   
   put 0x00 byte MEMORY_FILE1 //identsize;
   put 0x00 byte MEMORY_FILE1 //colurmaptype;
   put 0x02 byte MEMORY_FILE1 // imagetype;
   put 0x0000 short MEMORY_FILE1 // colourmapstart;
   put 0x0000 short MEMORY_FILE1 // colourmaplength;
   put 0x00 byte MEMORY_FILE1 // colourmapbits;
   put 0x0000 short MEMORY_FILE1 // xstart;
   put 0x0000 short MEMORY_FILE1 // ystart
   put FRAME_MAX_WIDTH_ORIG short MEMORY_FILE1 
   put FRAME_MAX_HEIGHT_ORIG short MEMORY_FILE1 
   put 0x20 byte MEMORY_FILE1 // bits per pixel
   put 0x28 byte MEMORY_FILE1 // image descriptor (101000)

   getarray CURRENTFRAMEOFFSET 0 i
   print "Frame Offset %CURRENTFRAMEOFFSET%"

   If i != FRAME_COUNT
       set next_i i
       math next_i + 1
       getarray CURRENTFRAMESIZE 0 next_i
       getarray CURRENTFRAMESIZE_BEFORE 0 i
       math CURRENTFRAMESIZE - CURRENTFRAMESIZE_BEFORE
       math CURRENTFRAMESIZE / 4
       print "Frame Size %CURRENTFRAMESIZE%"
   Else
       get CURRENTFRAMESIZE asize MEMORY_FILE3
       print "FileSize %CURRENTFRAMESIZE%"
       getarray CURRENTFRAMESIZE_BEFORE 0 i
       math CURRENTFRAMESIZE - CURRENTFRAMESIZE_BEFORE
       math CURRENTFRAMESIZE / 4
       print "Frame Size %CURRENTFRAMESIZE%"
   Endif

   set GOFURTHER CURRENTFRAMEOFFSET
   goto GOFURTHER MEMORY_FILE3
   print "Starting transferring pixels..."
   for j = 0 < CURRENTFRAMESIZE
       set GOFURTHER CURRENTFRAMEOFFSET
       xmath GOFURTHER "GOFURTHER + (j * 4)"
       goto GOFURTHER MEMORY_FILE3

       get ALPHA byte MEMORY_FILE3
       get RED byte MEMORY_FILE3
       get GREEN byte MEMORY_FILE3
       get BLUE byte MEMORY_FILE3
       if ALPHA == 0x00 && GREEN == 0x00 && BLUE == 0x00
           for k = 0 < RED
               put 0x00 byte MEMORY_FILE4
               put 0xFF byte MEMORY_FILE4
               put 0xFF byte MEMORY_FILE4
               put 0xFF byte MEMORY_FILE4
           next k
       else
           put ALPHA byte MEMORY_FILE4
           put RED byte MEMORY_FILE4
           put GREEN byte MEMORY_FILE4
           put BLUE byte MEMORY_FILE4
       endif 
   next j

   xmath CUR_FRAME_WIDTH_MAX "FRAME_WIDTH + FRAME_POS_X"
   xmath CUR_FRAME_HEIGHT_MAX "FRAME_HEIGHT + FRAME_POS_Y"

   for j = FRAME_START_Y < FRAME_MAX_HEIGHT
       for k = FRAME_START_X < FRAME_MAX_WIDTH
           if j < FRAME_POS_Y
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0x00 byte MEMORY_FILE1
           elif k < FRAME_POS_X
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0x00 byte MEMORY_FILE1
           elif CUR_FRAME_HEIGHT_MAX <= j
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0x00 byte MEMORY_FILE1
           elif CUR_FRAME_WIDTH_MAX <= k
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0x00 byte MEMORY_FILE1
           else
               xmath CUR_POS "FRAME_WIDTH * (j - FRAME_POS_Y) * 4 + (k - FRAME_POS_X) * 4"
               goto CUR_POS MEMORY_FILE4
               get ALPHA byte MEMORY_FILE4
               get RED byte MEMORY_FILE4
               get GREEN byte MEMORY_FILE4
               get BLUE byte MEMORY_FILE4

               put BLUE byte MEMORY_FILE1
               put GREEN byte MEMORY_FILE1
               put RED byte MEMORY_FILE1
               put ALPHA byte MEMORY_FILE1
           endif
       next k
   next j

   string TGA_FILE_NAME = FNAME
   string TGA_FILE_NAME += "_"
   string TGA_FILE_NAME += i
   string TGA_FILE_NAME += ".tga"
   get TGA_SIZE asize MEMORY_FILE1
   log TGA_FILE_NAME 0 TGA_SIZE MEMORY_FILE1
   log MEMORY_FILE1 0 0
   log MEMORY_FILE4 0 0
   
   set TGA_NAME_LEN strlen TGA_FILE_NAME
   putdstring TGA_FILE_NAME TGA_NAME_LEN MEMORY_FILE2
   put 0x0A0D short MEMORY_FILE2

   print "transferring done."
   
next i

putdstring "END_OF_LIST|" 12 MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2
get INFOSIZE asize MEMORY_FILE2
string INFOFILENAME = FNAME
string INFOFILENAME += ".txt"
log INFOFILENAME 0 INFOSIZE MEMORY_FILE2

print "EXPORTING COMPLETED."

 

-결합스크립트

//TGATOAGF 1.2 (거리니닷컴 익명/2021/08/12) Base Script : TGATOSPR32  2.5 (루란제르/2018/08/31)

IDString "\x48\x51\x54\x45\x41\x4D\x5F\x41\x47\x46\x5F\x54\x47\x41\x5F\x49\x4E\x46\x4F\x0D\x0A"
log MEMORY_FILE1 0 0 //temporary frame file
log MEMORY_FILE2 0 0 //agf file
log MEMORY_FILE3 0 0 //unzip frame file

findloc CURRENTOFFSET string "STRIPE_NAME|"
getdstring sdummy 12 //skips unnecessary characters
getct AGFNAME string 0x0d   // getting the name of sprite group.
get bdummy byte //skips an unnecessary byte, namely 0x0a

findloc CURRENTOFFSET string "EXTENSION|"
getdstring sdummy 10
getct AGFEXTENSION string 0x0d #getting the  original extention; .agf

findloc CURRENTOFFSET string "TOTAL_FRAME_NUMBER|"
getdstring sdummy 20
getct TGACOUNT string 0x0D  #getting the number of sprite group.

findloc CURRENTOFFSET string "START_X|"
getdstring sdummy 9
getct AGFSTARTX string 0x0D  #getting the start x pos

findloc CURRENTOFFSET string "MAXWIDTH|"
getdstring sdummy 10
getct AGFMWIDTH string 0x0D  #getting the width\
xmath AGFWIDTH "AGFMWIDTH - AGFSTARTX"

findloc CURRENTOFFSET string "START_Y|"
getdstring sdummy 9
getct AGFSTARTY string 0x0D  #getting the start y pos

findloc CURRENTOFFSET string "MAXHEIGHT|"
getdstring sdummy 11
getct AGFMHEIGHT string 0x0D  #getting the height
xmath AGFHEIGHT "AGFMHEIGHT - AGFSTARTY"

findloc CURRENTOFFSET string "FULLWIDTH|"
getdstring sdummy 11
getct AGFFWIDTH string 0x0D  #getting the height

findloc CURRENTOFFSET string "FULLHEIGHT|"
getdstring sdummy 12
getct AGFFHEIGHT string 0x0D  #getting the height

findloc CURRENTOFFSET string "FRAME_BITMAP_LIST:"
getdstring sdummy 21

print "name: %AGFNAME%, extension: %AGFEXTENSION%, count: %TGACOUNT%, agfwidth: %AGFWIDTH%, agfheight: %AGFHEIGHT%"

// writing header and info into the agf
put 0x23 long MEMORY_FILE2
put AGFWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2
put TGACOUNT long MEMORY_FILE2
xmath PACCOUNT "2448 + (TGACOUNT * 8)"
for PAC = 0 < PACCOUNT
   put 0x00 byte MEMORY_FILE2
next PAC
set AGF_ACCUMULATEDSIZE 0

for i = 0 < TGACOUNT
   //tga validity check
   getct TGATARGETNAME string 0x0d //get the file name of a frame tga
   get sdummy 1
   savepos TGANAMEPOS
   Open FDSE TGATARGETNAME 1
  
   get TGAMAGIC short 1
   if TGAMAGIC <> 0
       print "This TGA is somewhat complicated than expected! Process terminated...(0)"
       cleanexit
   endif
  
   get TGAMODE byte 1
   if TGAMODE <> 0x02
       print "This TGA is not in Uncompressed RGB MODE! Process terminated...(1)"
       cleanexit
   endif
  
   get TGAEXTRAINFO long 1
   if TGAEXTRAINFO <> 0x00
       print "This TGA is somewhat complicated than expected! Process terminated...(2)"
       cleanexit
   endif
   get TGAEXTRAINFO long 1
   if TGAEXTRAINFO <> 0x00
       print "This TGA is somewhat complicated than expected! Process terminated...(3)"
       cleanexit
   endif
   get TGAEXTRAINFO byte 1
   if TGAEXTRAINFO <> 0x00
       print "This TGA is somewhat complicated than expected! Process terminated...(4)"
       cleanexit
   endif
  
   get TGAWIDTH short 1
   if TGAWIDTH <> AGFWIDTH
       print "%TGAWIDTH% %AGFWIDTH%"
       print "Error: The width of TGA doesn't match that of the info file! Process terminated...(5)"
       cleanexit
   endif
   get TGAHEIGHT short 1
   if TGAHEIGHT <> AGFHEIGHT
       print "%TGAHEIGHT% %AGFHEIGHT%"
       print "Error: The height of TGA doesn't match that of the info file! Process terminated...(6)"
       cleanexit
   endif

   get TGAPIXELDEPTH byte 1
   if TGAPIXELDEPTH <> 0x20
       print "This TGA is not written in 32bit! Process terminated...(7)"
       cleanexit
   endif
  
   get TGADESCRIPTOR byte 1 //this can be bigger or smaller than 0x20
  
   savepos TGA_BEENREADHERE 1
  
   //rearranging the tga pixel to the agf's order
   set TGA_GOAHEAD 0
   for j = 1 <= TGAHEIGHT
       if TGADESCRIPTOR >= 0x20
           xmath TGA_GOAHEAD "((TGAWIDTH * 4) * (j - 1)) + TGA_BEENREADHERE"
       else
           xmath TGA_GOAHEAD "(((TGAWIDTH * TGAHEIGHT) * 4) - ((TGAWIDTH * 4) * j)) + TGA_BEENREADHERE"
       endif
       goto TGA_GOAHEAD 1
       for k = 0 < TGAWIDTH
           get BLUE byte 1
           get GREEN byte 1
           get RED byte 1
           get ALPHA byte 1
           put ALPHA byte MEMORY_FILE1
           put RED byte MEMORY_FILE1
           put GREEN byte MEMORY_FILE1
           put BLUE byte MEMORY_FILE1
       next k
   next j

   //compression procedure
   goto 0 MEMORY_FILE1
   set AGF_TOTALCOMPRESSEDSIZE 0
   set WAITHERE 0
   for j = 0 < TGAHEIGHT
       set TGA_MATCHEDPIXELCOUNT 0
       for k = 0 < TGAWIDTH
           goto WAITHERE MEMORY_FILE1
           get ALPHA byte MEMORY_FILE1
           get RED byte MEMORY_FILE1
           get GREEN byte MEMORY_FILE1
           get BLUE byte MEMORY_FILE1
           savepos WAITHERE MEMORY_FILE1
           set Luranzer k
           math Luranzer += 1
           if Luranzer != TGAWIDTH
               get ALPHA2 byte MEMORY_FILE1
               get RED2 byte MEMORY_FILE1
               get GREEN2 byte MEMORY_FILE1
               get BLUE2 byte MEMORY_FILE1 
               if ALPHA2 == 0x00 && TGA_MATCHEDPIXELCOUNT < 255
                   if k == 0
                       math TGA_MATCHEDPIXELCOUNT += 2
                   else
                       if TGA_MATCHEDPIXELCOUNT < 1
                           if ALPHA == 0x00
                               put 0 byte MEMORY_FILE3
                               put 1 byte MEMORY_FILE3
                               put 0 byte MEMORY_FILE3
                               put 0 byte MEMORY_FILE3
                               math AGF_TOTALCOMPRESSEDSIZE += 1
                               math TGA_MATCHEDPIXELCOUNT += 1
                           else
                               put ALPHA byte MEMORY_FILE3
                               put RED byte MEMORY_FILE3
                               put GREEN byte MEMORY_FILE3
                               put BLUE byte MEMORY_FILE3
                               math AGF_TOTALCOMPRESSEDSIZE += 1
                               math TGA_MATCHEDPIXELCOUNT += 1
                           endif
                       else
                           math TGA_MATCHEDPIXELCOUNT += 1
                       endif
                   endif
               else
                   if TGA_MATCHEDPIXELCOUNT > 0
                       put 0 byte MEMORY_FILE3
                       put TGA_MATCHEDPIXELCOUNT byte MEMORY_FILE3
                       put 0 byte MEMORY_FILE3
                       put 0 byte MEMORY_FILE3
                       math AGF_TOTALCOMPRESSEDSIZE += 1
                       set TGA_MATCHEDPIXELCOUNT 0
                   else
                       if ALPHA == 0x00
                           put ALPHA byte MEMORY_FILE3
                           put 1 byte MEMORY_FILE3
                           put 0 byte MEMORY_FILE3
                           put 0 byte MEMORY_FILE3
                           math AGF_TOTALCOMPRESSEDSIZE += 1
                           set TGA_MATCHEDPIXELCOUNT 0
                       else
                           put ALPHA byte MEMORY_FILE3
                           put RED byte MEMORY_FILE3
                           put GREEN byte MEMORY_FILE3
                           put BLUE byte MEMORY_FILE3
                           math AGF_TOTALCOMPRESSEDSIZE += 1
                           set TGA_MATCHEDPIXELCOUNT 0
                       endif
                   endif
               endif
           else
               if TGA_MATCHEDPIXELCOUNT > 0
                   put 0 byte MEMORY_FILE3
                   put TGA_MATCHEDPIXELCOUNT byte MEMORY_FILE3
                   put 0 byte MEMORY_FILE3
                   put 0 byte MEMORY_FILE3
                   math AGF_TOTALCOMPRESSEDSIZE += 1
               else
                   if ALPHA == 0x00
                       put ALPHA byte MEMORY_FILE3
                       put 1 byte MEMORY_FILE3
                       put 0 byte MEMORY_FILE3
                       put 0 byte MEMORY_FILE3
                       math AGF_TOTALCOMPRESSEDSIZE += 1
                   else
                       put ALPHA byte MEMORY_FILE3
                       put RED byte MEMORY_FILE3
                       put GREEN byte MEMORY_FILE3
                       put BLUE byte MEMORY_FILE3
                       math AGF_TOTALCOMPRESSEDSIZE += 1
                   endif
               endif
           endif
       next k
   next j
   log MEMORY_FILE1 0 0 
  
   xmath AGF_GOAHEAD "1220 + (i * 4)"
   goto AGF_GOAHEAD MEMORY_FILE2
   get AGF_FRAMEOFFSET asize MEMORY_FILE3
   put AGF_FRAMEOFFSET long MEMORY_FILE2

   xmath AGF_GOAHEAD "2416 + (i * 8)"
   goto AGF_GOAHEAD MEMORY_FILE2
   put AGFSTARTX short MEMORY_FILE2
   put AGFSTARTY short MEMORY_FILE2
   put AGFWIDTH short MEMORY_FILE2
   put AGFHEIGHT short MEMORY_FILE2
next i

get UNZIPSIZE asize MEMORY_FILE3

xmath AGF_GOAHEAD "2416 + TGACOUNT * 8"
goto AGF_GOAHEAD MEMORY_FILE2
put UNZIPSIZE long MEMORY_FILE2

xmath UNKWIDTH "AGFWIDTH * TGACOUNT"
put UNKWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2
put 0x00000000 long MEMORY_FILE2

xmath UNKMFWIDTH "AGFFWIDTH * TGACOUNT"
put AGFFWIDTH long MEMORY_FILE2
put AGFFHEIGHT long MEMORY_FILE2
put UNKMFWIDTH long MEMORY_FILE2
put AGFFHEIGHT long MEMORY_FILE2

log MEMORY_FILE1 0 0
comtype zlib_compress
clog MEMORY_FILE1 0 UNZIPSIZE UNZIPSIZE MEMORY_FILE3

get POS_END asize MEMORY_FILE2
math POS_END - 4
goto POS_END MEMORY_FILE2
get ZIPSIZE asize MEMORY_FILE1
put ZIPSIZE long MEMORY_FILE2

goto 0 MEMORY_FILE1
for i = 0 < ZIPSIZE
   get ZIPBYTE byte MEMORY_FILE1
   put ZIPBYTE byte MEMORY_FILE2
next i

string OUTPUTNAME == AGFNAME
string OUTPUTNAME += "."
string OUTPUTNAME += AGFEXTENSION 
get AGFRESULTSIZE asize MEMORY_FILE2
log OUTPUTNAME 0 AGFRESULTSIZE MEMORY_FILE2

 

-투명도 조절-

//AGF 투명도 설정 1.2(거린이닷컴 익명/2021/08/12)
set INVISIBILITY_RATE_PERCENT 1 //투명도. 0%~200%까지 숫자로 입력. 높을수록 불투명해짐 100이 원본투명도. 더 불투명하게 하려면 100보다 큰숫자. 투명하게 하려면 100보다 낮은숫자.

if INVISIBILITY_RATE_PERCENT > 200
   print "INVISIBILITY_RATE_PERCENT IS 200 OVER. UNDER 200 ENTER."
endif

log MEMORY_FILE1 0 0 //TGA file
log MEMORY_FILE2 0 0 //Invisiblity TGA
log MEMORY_FILE3 0 0 //Unziped Memory
log MEMORY_FILE4 0 0 //Temporary Frame File

get FNAME basename
get EXTNAME extension

goto 0x0C
get FRAME_COUNT long

set UNZIPED_SIZE_ADDR FRAME_COUNT
math UNZIPED_SIZE_ADDR * 8
math UNZIPED_SIZE_ADDR + 0x970
goto UNZIPED_SIZE_ADDR
get UNZIPED_SIZE long

set ZIP_SIZE_ADDR FRAME_COUNT
math ZIP_SIZE_ADDR * 8
math ZIP_SIZE_ADDR + 0x99C
goto ZIP_SIZE_ADDR
get ZIP_SIZE long

set ZIP_OFFSET ZIP_SIZE_ADDR
math ZIP_OFFSET + 4

comtype zlib
clog  MEMORY_FILE3 ZIP_OFFSET ZIP_SIZE UNZIPED_SIZE

get ALL_FRAME asize MEMORY_FILE3
math ALL_FRAME / 4

goto 0
for i = 0 < ZIP_SIZE_ADDR
  get ORIG_BYTE byte
  put ORIG_BYTE byte MEMORY_FILE2
next i

print "start invisibility"
for i = 0 < ALL_FRAME
  xmath GOFURTHER "i * 4"
  goto GOFURTHER MEMORY_FILE3

  get ALPHA byte MEMORY_FILE3
  get RED byte MEMORY_FILE3
  get GREEN byte MEMORY_FILE3
  get BLUE byte MEMORY_FILE3
  if ALPHA == 0x00 && GREEN == 0x00 && BLUE == 0x00
      put ALPHA byte MEMORY_FILE4
      put RED byte MEMORY_FILE4
      put GREEN byte MEMORY_FILE4
      put BLUE byte MEMORY_FILE4
  else
      xmath FIXED_ALPHA "ALPHA * INVISIBILITY_RATE_PERCENT / 100"

      if FIXED_ALPHA == 0

          set FIXED_ALPHA 1

      endif
      put FIXED_ALPHA byte MEMORY_FILE4
      put RED byte MEMORY_FILE4
      put GREEN byte MEMORY_FILE4
      put BLUE byte MEMORY_FILE4
  endif
next i

log MEMORY_FILE3 0 0

comtype zlib_compress
clog  MEMORY_FILE3 0 UNZIPED_SIZE UNZIPED_SIZE MEMORY_FILE4

get NEW_ZIP_SIZE asize MEMORY_FILE3
put NEW_ZIP_SIZE long MEMORY_FILE2

goto 0 MEMORY_FILE3

for i = 0 < NEW_ZIP_SIZE
  get ZIP_BYTE byte MEMORY_FILE3
  put ZIP_BYTE byte MEMORY_FILE2
next i

get INVISIBLE_FILE_SIZE asize MEMORY_FILE2
string INVISIBLE_FILE_NAME = FNAME
string INVISIBLE_FILE_NAME += "_."
string INVISIBLE_FILE_NAME += EXTNAME
log INVISIBLE_FILE_NAME 0 INVISIBLE_FILE_SIZE MEMORY_FILE2

print "COMPLETED."

 

 

-전체크기 추출-

//AGFTOTGA FULL FRAME 1.0 (거리니닷컴 익명/2021/08/12) Base Script : SPR32TOTGA 2.3 (루란제르/2018/08/29)

IDString "\x23\x00\x00\x00"

log MEMORY_FILE1 0 0 //TGA file
log MEMORY_FILE2 0 0 //Info Text File
log MEMORY_FILE3 0 0 //Unziped Memory
log MEMORY_FILE4 0 0 //Temporary Frame File

get FNAME basename
get FSIZE asize
get EXTNAME extension

goto 0x0C
get FRAME_COUNT long

for i = 1 <= FRAME_COUNT
   set FRAME_INFO_OFFSET i
   math FRAME_INFO_OFFSET * 8
   math FRAME_INFO_OFFSET + 0x968
   goto FRAME_INFO_OFFSET
   get FRAME_POS_X short
   get FRAME_POS_Y short
   get FRAME_WIDTH short
   get FRAME_HEIGHT short
   putarray 1 i FRAME_POS_X
   putarray 2 i FRAME_POS_Y
   putarray 3 i FRAME_WIDTH
   putarray 4 i FRAME_HEIGHT
next i

//writing info text

putdstring "HQTEAM_AGF_TGA_INFO" 19 MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "STRIPE_NAME|" 12 MEMORY_FILE2
set FNAMELEN strlen FNAME
putdstring FNAME FNAMELEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "EXTENSION|" 10 MEMORY_FILE2
set EXTLEN strlen EXTNAME
putdstring EXTNAME EXTLEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "TOTAL_FRAME_NUMBER|" 19 MEMORY_FILE2
set COUNTLEN strlen FRAME_COUNT
putdstring FRAME_COUNT COUNTLEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

goto 0x4C0
for i = 1 <= FRAME_COUNT
   get FRAME_OFFSET long
   putarray 0 i FRAME_OFFSET
next i

set UNZIPED_SIZE_ADDR FRAME_COUNT
math UNZIPED_SIZE_ADDR * 8
math UNZIPED_SIZE_ADDR + 0x970
goto UNZIPED_SIZE_ADDR
get UNZIPED_SIZE long

xmath FULL_FRAME_SIZE_ADDR "UNZIPED_SIZE_ADDR + 16"
goto FULL_FRAME_SIZE_ADDR
get FRAME_MAX_WIDTH long
get FRAME_MAX_HEIGHT long

putdstring "MAXWIDTH|" 9 MEMORY_FILE2
set MAX_WIDTH_LEN strlen FRAME_MAX_WIDTH
putdstring FRAME_MAX_WIDTH MAX_WIDTH_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "MAXHEIGHT|" 10 MEMORY_FILE2
set MAX_HEIGHT_LEN strlen FRAME_MAX_HEIGHT
putdstring FRAME_MAX_HEIGHT MAX_HEIGHT_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

putdstring "FRAME_BITMAP_LIST:" 18 MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2

//end info

//start extract

set ZIP_SIZE_ADDR FRAME_COUNT
math ZIP_SIZE_ADDR * 8
math ZIP_SIZE_ADDR + 0x99C
goto ZIP_SIZE_ADDR
get ZIP_SIZE long

set ZIP_OFFSET ZIP_SIZE_ADDR
math ZIP_OFFSET + 4

comtype zlib
clog MEMORY_FILE3 ZIP_OFFSET ZIP_SIZE UNZIPED_SIZE

goto 0 MEMORY_FILE3

for i = 1 <= FRAME_COUNT
   print "---------------------Frame No. %i% of %FRAME_COUNT%---------------------"

   getarray FRAME_POS_X 1 i
   getarray FRAME_POS_Y 2 i
   getarray FRAME_WIDTH 3 i
   getarray FRAME_HEIGHT 4 i
   
   put 0x00 byte MEMORY_FILE1 //identsize;
   put 0x00 byte MEMORY_FILE1 //colurmaptype;
   put 0x02 byte MEMORY_FILE1 // imagetype;
   put 0x0000 short MEMORY_FILE1 // colourmapstart;
   put 0x0000 short MEMORY_FILE1 // colourmaplength;
   put 0x00 byte MEMORY_FILE1 // colourmapbits;
   put 0x0000 short MEMORY_FILE1 // xstart;
   put 0x0000 short MEMORY_FILE1 // ystart
   put FRAME_MAX_WIDTH short MEMORY_FILE1 
   put FRAME_MAX_HEIGHT short MEMORY_FILE1 
   put 0x20 byte MEMORY_FILE1 // bits per pixel
   put 0x28 byte MEMORY_FILE1 // image descriptor (101000)

   getarray CURRENTFRAMEOFFSET 0 i
   print "Frame Offset %CURRENTFRAMEOFFSET%"

   If i != FRAME_COUNT
       set next_i i
       math next_i + 1
       getarray CURRENTFRAMESIZE 0 next_i
       getarray CURRENTFRAMESIZE_BEFORE 0 i
       math CURRENTFRAMESIZE - CURRENTFRAMESIZE_BEFORE
       math CURRENTFRAMESIZE / 4
       print "Frame Size %CURRENTFRAMESIZE%"
   Else
       get CURRENTFRAMESIZE asize MEMORY_FILE3
       print "FileSize %CURRENTFRAMESIZE%"
       getarray CURRENTFRAMESIZE_BEFORE 0 i
       math CURRENTFRAMESIZE - CURRENTFRAMESIZE_BEFORE
       math CURRENTFRAMESIZE / 4
       print "Frame Size %CURRENTFRAMESIZE%"
   Endif

   set GOFURTHER CURRENTFRAMEOFFSET
   goto GOFURTHER MEMORY_FILE3
   print "Starting transferring pixels..."
   for j = 0 < CURRENTFRAMESIZE
       set GOFURTHER CURRENTFRAMEOFFSET
       xmath GOFURTHER "GOFURTHER + (j * 4)"
       goto GOFURTHER MEMORY_FILE3

       get ALPHA byte MEMORY_FILE3
       get RED byte MEMORY_FILE3
       get GREEN byte MEMORY_FILE3
       get BLUE byte MEMORY_FILE3
       if ALPHA == 0x00 && GREEN == 0x00 && BLUE == 0x00
           for k = 0 < RED
               put 0x00 byte MEMORY_FILE4
               put 0xFF byte MEMORY_FILE4
               put 0xFF byte MEMORY_FILE4
               put 0xFF byte MEMORY_FILE4
           next k
       else
           put ALPHA byte MEMORY_FILE4
           put RED byte MEMORY_FILE4
           put GREEN byte MEMORY_FILE4
           put BLUE byte MEMORY_FILE4
       endif 
   next j

   xmath CUR_FRAME_WIDTH_MAX "FRAME_WIDTH + FRAME_POS_X"
   xmath CUR_FRAME_HEIGHT_MAX "FRAME_HEIGHT + FRAME_POS_Y"

   for j = 0 < FRAME_MAX_HEIGHT
       for k = 0 < FRAME_MAX_WIDTH
           if j < FRAME_POS_Y
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0x00 byte MEMORY_FILE1
           elif k < FRAME_POS_X
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0x00 byte MEMORY_FILE1
           elif CUR_FRAME_HEIGHT_MAX <= j
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0x00 byte MEMORY_FILE1
           elif CUR_FRAME_WIDTH_MAX <= k
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0xFF byte MEMORY_FILE1
               put 0x00 byte MEMORY_FILE1
           else
               xmath CUR_POS "FRAME_WIDTH * (j - FRAME_POS_Y) * 4 + (k - FRAME_POS_X) * 4"
               goto CUR_POS MEMORY_FILE4
               get ALPHA byte MEMORY_FILE4
               get RED byte MEMORY_FILE4
               get GREEN byte MEMORY_FILE4
               get BLUE byte MEMORY_FILE4

               put BLUE byte MEMORY_FILE1
               put GREEN byte MEMORY_FILE1
               put RED byte MEMORY_FILE1
               put ALPHA byte MEMORY_FILE1
           endif
       next k
   next j

   string TGA_FILE_NAME = FNAME
   string TGA_FILE_NAME += "_"
   string TGA_FILE_NAME += i
   string TGA_FILE_NAME += ".tga"
   get TGA_SIZE asize MEMORY_FILE1
   log TGA_FILE_NAME 0 TGA_SIZE MEMORY_FILE1
   log MEMORY_FILE1 0 0
   log MEMORY_FILE4 0 0
   
   set TGA_NAME_LEN strlen TGA_FILE_NAME
   putdstring TGA_FILE_NAME TGA_NAME_LEN MEMORY_FILE2
   put 0x0A0D short MEMORY_FILE2

   print "transferring done."
   
next i

putdstring "END_OF_LIST|" 12 MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2
get INFOSIZE asize MEMORY_FILE2
string INFOFILENAME = FNAME
string INFOFILENAME += ".txt"
log INFOFILENAME 0 INFOSIZE MEMORY_FILE2

print "EXPORTING COMPLETED."

 

-전체크기 결합-

//TGATOAGF FULL FRAME 1.0 (거리니닷컴 익명/2021/08/12) Base Script : TGATOSPR32  2.5 (루란제르/2018/08/31)

IDString "\x48\x51\x54\x45\x41\x4D\x5F\x41\x47\x46\x5F\x54\x47\x41\x5F\x49\x4E\x46\x4F\x0D\x0A"
log MEMORY_FILE1 0 0 //temporary frame file
log MEMORY_FILE2 0 0 //agf file
log MEMORY_FILE3 0 0 //unzip frame file

findloc CURRENTOFFSET string "STRIPE_NAME|"
getdstring sdummy 12 //skips unnecessary characters
getct AGFNAME string 0x0d   // getting the name of sprite group.
get bdummy byte //skips an unnecessary byte, namely 0x0a

findloc CURRENTOFFSET string "EXTENSION|"
getdstring sdummy 10
getct AGFEXTENSION string 0x0d #getting the  original extention; .agf

findloc CURRENTOFFSET string "TOTAL_FRAME_NUMBER|"
getdstring sdummy 20
getct TGACOUNT string 0x0D  #getting the number of sprite group.

findloc CURRENTOFFSET string "MAXWIDTH|"
getdstring sdummy 10
getct AGFWIDTH string 0x0D  #getting the width\

findloc CURRENTOFFSET string "MAXHEIGHT|"
getdstring sdummy 11
getct AGFHEIGHT string 0x0D  #getting the height

findloc CURRENTOFFSET string "FRAME_BITMAP_LIST:"
getdstring sdummy 21

print "name: %AGFNAME%, extension: %AGFEXTENSION%, count: %TGACOUNT%, agfwidth: %AGFWIDTH%, agfheight: %AGFHEIGHT%"

// writing header and info into the agf
put 0x23 long MEMORY_FILE2
put AGFWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2
put TGACOUNT long MEMORY_FILE2
xmath PACCOUNT "2448 + (TGACOUNT * 8)"
for PAC = 0 < PACCOUNT
   put 0x00 byte MEMORY_FILE2
next PAC
set AGF_ACCUMULATEDSIZE 0

for i = 0 < TGACOUNT
   //tga validity check
   getct TGATARGETNAME string 0x0d //get the file name of a frame tga
   get sdummy 1
   savepos TGANAMEPOS
   Open FDSE TGATARGETNAME 1
  
   get TGAMAGIC short 1
   if TGAMAGIC <> 0
       print "This TGA is somewhat complicated than expected! Process terminated...(0)"
       cleanexit
   endif
  
   get TGAMODE byte 1
   if TGAMODE <> 0x02
       print "This TGA is not in Uncompressed RGB MODE! Process terminated...(1)"
       cleanexit
   endif
  
   get TGAEXTRAINFO long 1
   if TGAEXTRAINFO <> 0x00
       print "This TGA is somewhat complicated than expected! Process terminated...(2)"
       cleanexit
   endif
   get TGAEXTRAINFO long 1
   if TGAEXTRAINFO <> 0x00
       print "This TGA is somewhat complicated than expected! Process terminated...(3)"
       cleanexit
   endif
   get TGAEXTRAINFO byte 1
   if TGAEXTRAINFO <> 0x00
       print "This TGA is somewhat complicated than expected! Process terminated...(4)"
       cleanexit
   endif
  
   get TGAWIDTH short 1
   if TGAWIDTH <> AGFWIDTH
       print "%TGAWIDTH% %AGFWIDTH%"
       print "Error: The width of TGA doesn't match that of the info file! Process terminated...(5)"
       cleanexit
   endif
   get TGAHEIGHT short 1
   if TGAHEIGHT <> AGFHEIGHT
       print "%TGAHEIGHT% %AGFHEIGHT%"
       print "Error: The height of TGA doesn't match that of the info file! Process terminated...(6)"
       cleanexit
   endif

   get TGAPIXELDEPTH byte 1
   if TGAPIXELDEPTH <> 0x20
       print "This TGA is not written in 32bit! Process terminated...(7)"
       cleanexit
   endif
  
   get TGADESCRIPTOR byte 1 //this can be bigger or smaller than 0x20
  
   savepos TGA_BEENREADHERE 1
  
   //rearranging the tga pixel to the agf's order
   set TGA_GOAHEAD 0
   for j = 1 <= TGAHEIGHT
       if TGADESCRIPTOR >= 0x20
           xmath TGA_GOAHEAD "((TGAWIDTH * 4) * (j - 1)) + TGA_BEENREADHERE"
       else
           xmath TGA_GOAHEAD "(((TGAWIDTH * TGAHEIGHT) * 4) - ((TGAWIDTH * 4) * j)) + TGA_BEENREADHERE"
       endif
       goto TGA_GOAHEAD 1
       for k = 0 < TGAWIDTH
           get BLUE byte 1
           get GREEN byte 1
           get RED byte 1
           get ALPHA byte 1
           put ALPHA byte MEMORY_FILE1
           put RED byte MEMORY_FILE1
           put GREEN byte MEMORY_FILE1
           put BLUE byte MEMORY_FILE1
       next k
   next j

   //compression procedure
   goto 0 MEMORY_FILE1
   set AGF_TOTALCOMPRESSEDSIZE 0
   set WAITHERE 0
   for j = 0 < TGAHEIGHT
       set TGA_MATCHEDPIXELCOUNT 0
       for k = 0 < TGAWIDTH
           goto WAITHERE MEMORY_FILE1
           get ALPHA byte MEMORY_FILE1
           get RED byte MEMORY_FILE1
           get GREEN byte MEMORY_FILE1
           get BLUE byte MEMORY_FILE1
           savepos WAITHERE MEMORY_FILE1
           set Luranzer k
           math Luranzer += 1
           if Luranzer != TGAWIDTH
               get ALPHA2 byte MEMORY_FILE1
               get RED2 byte MEMORY_FILE1
               get GREEN2 byte MEMORY_FILE1
               get BLUE2 byte MEMORY_FILE1 
               if ALPHA2 == 0x00 && TGA_MATCHEDPIXELCOUNT < 255
                   if k == 0
                       math TGA_MATCHEDPIXELCOUNT += 2
                   else
                       if TGA_MATCHEDPIXELCOUNT < 1
                           if ALPHA == 0x00
                               put 0 byte MEMORY_FILE3
                               put 1 byte MEMORY_FILE3
                               put 0 byte MEMORY_FILE3
                               put 0 byte MEMORY_FILE3
                               math AGF_TOTALCOMPRESSEDSIZE += 1
                               math TGA_MATCHEDPIXELCOUNT += 1
                           else
                               put ALPHA byte MEMORY_FILE3
                               put RED byte MEMORY_FILE3
                               put GREEN byte MEMORY_FILE3
                               put BLUE byte MEMORY_FILE3
                               math AGF_TOTALCOMPRESSEDSIZE += 1
                               math TGA_MATCHEDPIXELCOUNT += 1
                           endif
                       else
                           math TGA_MATCHEDPIXELCOUNT += 1
                       endif
                   endif
               else
                   if TGA_MATCHEDPIXELCOUNT > 0
                       put 0 byte MEMORY_FILE3
                       put TGA_MATCHEDPIXELCOUNT byte MEMORY_FILE3
                       put 0 byte MEMORY_FILE3
                       put 0 byte MEMORY_FILE3
                       math AGF_TOTALCOMPRESSEDSIZE += 1
                       set TGA_MATCHEDPIXELCOUNT 0
                   else
                       if ALPHA == 0x00
                           put ALPHA byte MEMORY_FILE3
                           put 1 byte MEMORY_FILE3
                           put 0 byte MEMORY_FILE3
                           put 0 byte MEMORY_FILE3
                           math AGF_TOTALCOMPRESSEDSIZE += 1
                           set TGA_MATCHEDPIXELCOUNT 0
                       else
                           put ALPHA byte MEMORY_FILE3
                           put RED byte MEMORY_FILE3
                           put GREEN byte MEMORY_FILE3
                           put BLUE byte MEMORY_FILE3
                           math AGF_TOTALCOMPRESSEDSIZE += 1
                           set TGA_MATCHEDPIXELCOUNT 0
                       endif
                   endif
               endif
           else
               if TGA_MATCHEDPIXELCOUNT > 0
                   put 0 byte MEMORY_FILE3
                   put TGA_MATCHEDPIXELCOUNT byte MEMORY_FILE3
                   put 0 byte MEMORY_FILE3
                   put 0 byte MEMORY_FILE3
                   math AGF_TOTALCOMPRESSEDSIZE += 1
               else
                   if ALPHA == 0x00
                       put ALPHA byte MEMORY_FILE3
                       put 1 byte MEMORY_FILE3
                       put 0 byte MEMORY_FILE3
                       put 0 byte MEMORY_FILE3
                       math AGF_TOTALCOMPRESSEDSIZE += 1
                   else
                       put ALPHA byte MEMORY_FILE3
                       put RED byte MEMORY_FILE3
                       put GREEN byte MEMORY_FILE3
                       put BLUE byte MEMORY_FILE3
                       math AGF_TOTALCOMPRESSEDSIZE += 1
                   endif
               endif
           endif
       next k
   next j
   log MEMORY_FILE1 0 0 
  
   xmath AGF_GOAHEAD "1220 + (i * 4)"
   goto AGF_GOAHEAD MEMORY_FILE2
   get AGF_FRAMEOFFSET asize MEMORY_FILE3
   put AGF_FRAMEOFFSET long MEMORY_FILE2

   xmath AGF_GOAHEAD "2416 + (i * 8)"
   goto AGF_GOAHEAD MEMORY_FILE2
   put 0x0000 short MEMORY_FILE2
   put 0x0000 short MEMORY_FILE2
   put AGFWIDTH short MEMORY_FILE2
   put AGFHEIGHT short MEMORY_FILE2
next i

get UNZIPSIZE asize MEMORY_FILE3

xmath AGF_GOAHEAD "2416 + TGACOUNT * 8"
goto AGF_GOAHEAD MEMORY_FILE2
put UNZIPSIZE long MEMORY_FILE2

xmath UNKWIDTH "AGFWIDTH * TGACOUNT"
put UNKWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2
put 0x00000000 long MEMORY_FILE2

put AGFWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2
put UNKWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2

log MEMORY_FILE1 0 0
comtype zlib_compress
clog MEMORY_FILE1 0 UNZIPSIZE UNZIPSIZE MEMORY_FILE3

get POS_END asize MEMORY_FILE2
math POS_END - 4
goto POS_END MEMORY_FILE2
get ZIPSIZE asize MEMORY_FILE1
put ZIPSIZE long MEMORY_FILE2

goto 0 MEMORY_FILE1
for i = 0 < ZIPSIZE
   get ZIPBYTE byte MEMORY_FILE1
   put ZIPBYTE byte MEMORY_FILE2
next i

string OUTPUTNAME == AGFNAME
string OUTPUTNAME += "."
string OUTPUTNAME += AGFEXTENSION 
get AGFRESULTSIZE asize MEMORY_FILE2
log OUTPUTNAME 0 AGFRESULTSIZE MEMORY_FILE2

댓글 13
  • 방장 한 달 전

    구뜨

  • 천조대어신 한 달 전

    상기 스크립트로 2번 작업해야하는게 맞죠? 추출한번 투명도조절한번

  • 천조대어신 한 달 전

    아 걍 별도인건가요??

  • 강긴리 한 달 전

    투명도 조절이 어떤 수치를 입력해도 투명하게 되는것 같은데 확인해주실수 있나요?ㅠㅠ

    • 천조대어신 한 달 전

      if FIXED_ALPHA == 0 set FIXED_ALPHA 1 <-- 여기 1을 수정해야함 원하는값으로

  • 삭제된 댓글

  • 천조대어신 한 달 전

    근데 노부츠나 습격은 흰배경이 생겨버리네요 딴것들은 잘되는데

    • ㅁㅁ 비회원 220.124 한 달 전

      소스가 잘못짜져 있는 것 같네요 xmath FIXED_ALPHA "ALPHA * RATE / 100" 부분에서 RATE를 INVISIBILITY_RATE_PERCENT로 해야되는 것 같아요. FIXED_ALPHA 1은 그대로 두시고 그러면 되는 것 같습니다.

  • ㅁㅁ 비회원 220.124 한 달 전

    수정할때는 INVISIBILITY_RATE_PERCENT 1 부분을 원하는 퍼센트에 맞게 바꾸시구요

    • ㅇㅇ 비회원 182.212 한 달 전

      ㄹㅇ 말하는대로하니 깔끔하게 잘나옵니다 감사합니다

  • 스알못 비회원 110.92 한 달 전

    혹시.. 결합 스크립트도 짜주실수있나요 ㅠㅠ

    • 강긴리 한 달 전

      이전글에 있음

  • ㅇㅇ 비회원 182.212 한 달 전

    그저 빛 감사합니다.

  • ss 비회원 58.79 22일 전

    크기조절은 어떻해 하나요?

영웅서기
603
4일 전
거붕
704
4일 전
영웅서기
690
8일 전
거붕
1004
11일 전
영웅서기
1247
14일 전
영웅서기
881
15일 전
거붕
995
18일 전
거붕
787
20일 전
거붕
1160
25일 전
거붕
1273
한 달 전
거붕
990
한 달 전
ㅇㅇ
146.70
1888
한 달 전
ㅇㅇ
146.70
1409
한 달 전
거붕
1132
한 달 전
거붕
758
한 달 전
갓패치
116.46
1612
한 달 전
거붕
1314
2달 전
거붕
1011
2달 전
거붕
1583
2달 전
거붕
1244
2달 전
거붕
1864
2달 전
거붕
1695
2달 전
거붕
2084
2달 전
거붕
1835
2달 전
거붕
2440
2달 전
거붕
2003
2달 전
거붕
2453
3달 전
거붕
2215
3달 전
거붕
5436
3달 전
거붕
2354
3달 전
영웅서기
4일 전 조회 603
거붕
4일 전 조회 704
영웅서기
8일 전 조회 690
거붕
11일 전 조회 1004
영웅서기
14일 전 조회 1247
영웅서기
15일 전 조회 881
거붕
18일 전 조회 995
거붕
20일 전 조회 787
거붕
25일 전 조회 1160
거붕
한 달 전 조회 1273
거붕
한 달 전 조회 990
ㅇㅇ
비회원 146.70 한 달 전 조회 1888
ㅇㅇ
비회원 146.70 한 달 전 조회 1409
거붕
한 달 전 조회 1132
거붕
한 달 전 조회 758
갓패치
비회원 116.46 한 달 전 조회 1612
거붕
2달 전 조회 1314
거붕
2달 전 조회 1011
거붕
2달 전 조회 1583
거붕
2달 전 조회 1244
거붕
2달 전 조회 1864
거붕
2달 전 조회 1695
거붕
2달 전 조회 2084
거붕
2달 전 조회 1835
거붕
2달 전 조회 2440
거붕
2달 전 조회 2003
거붕
3달 전 조회 2453
거붕
3달 전 조회 2215
거붕
3달 전 조회 5436
거붕
3달 전 조회 2354