@Don_Adan, post #296
Spliter move.l AllocMemPtr,A0 move.l AllocMemSize,D7 move.l A0,BufferPtr move.l D7,BufferSize NextFile move.l BufferPtr,A0 move.l BufferSize,D7 moveq #16,D2 cmp.l D2,D7 ble.b UpdateBuff tst.b (A0) beq.w Quit cmp.b #"-",2(A0) bne.w Quit cmp.b #"l",3(A0) bne.w Quit cmp.b #"h",4(A0) bne.w Quit cmp.b #"0",5(A0) bne.w Quit moveq #2,D2 add.b (A0),D2 move.l A0,A2 add.l D2,A2 ; pointer to file data, if no subdirectory move.b 10(A0),D1 lsl.w #8, D1 move.b 9(A0),D1 swap D1 move.b 8(A0),D1 lsl.w #8, D1 move.b 7(A0),D1 ; skip size add.l D1,D2 sub.l D2,D7 bpl.b InBuffy add.l D2,D7 UpdateBuff move.l AllocMemPtr,A1 move.l A1,BufferPtr CopyRest move.b (A0)+,(A1)+ subq.l #1,D7 bne.b CopyRest move.l A1,A0 jsr UpdateBuffer ; read next part of file from new file offset to A0 and set new D7 move.l D7,BufferSize bra.b NextFile InBuffy add.l D2,BufferPtr sub.l D2,BufferSize move.b 14(A0),D0 lsl.w #8, D0 move.b 13(A0),D0 swap D0 move.b 12(A0),D0 lsl.w #8, D0 move.b 11(A0),D0 ; file size to save move.b 21(A0),D2 ; length of file name lea 22(A0),A0 ; pointer to file name move.l PathEndPtr,A1 sub.l D0,D1 beq.b CopyName add.l A2,D1 cmp.b #2,(A2)+ bne.b Quit CopyPath move.b (A2)+,(A1)+ cmp.b #-1,(A2) bne.b CopyPath move.b #"/",(A1)+ ; insert slash move.l D1,A2 CopyName move.b (A0)+,(A1)+ subq.b #1,D2 bne.b CopyName clr.b (A1) ; end of path move.l A2,A0 ; pointer to memory ; D0 - size of memory to save jsr SaveFile bra.w NextFile Quit rts AllocMemPtr dc.l 0 AllocMemSize ; must be greater than the biggest splited file dc.l 0 BufferPtr dc.l 0 BufferSize dc.l 0 PathEndPtr ; slash or colon dc.l 0
@tukinem, post #332
@Don_Adan, post #333
@tukinem, post #334
@Don_Adan, post #320
No problem.
I hereby grant you permission to include xfdmaster.library in the game
installer with one condition: You do not need to distribute the whole
package es requested in the documentation, but either in the game or the
game documentation must be stated, that the library is used and where to
find the full software (either Aminet link or my webpage, whatever you
like better.
Sincerely
@tukinem, post #338
@tukinem, post #347
@Don_Adan, post #350
@Don_Adan, post #353
@Don_Adan, post #353
@tukinem, post #349
Wstawienie całego tekstu w jeden łańcuch porażka :) No i nie mogę powstawiać znaków końca lini, chyba że da się?Z koniecznością wstawiania całego tekstu w jeden łańcuch można sobie poradzić używając cat. Znak końca linii oczywiście, że można wstawić: \n. Oto ilustracja obu zagadnień:
@tukinem, post #355
@Krashan, post #357