Mercurial > public > hwos_code
diff src/text_multilang.inc @ 604:ca4556fb60b9
bump to 2.99beta, work on 3.00 stable
author | heinrichsweikamp |
---|---|
date | Thu, 22 Nov 2018 19:47:26 +0100 |
parents | 11d4fc797f74 |
children | c40025d8e750 |
line wrap: on
line diff
--- a/src/text_multilang.inc Thu Oct 11 21:06:29 2018 +0200 +++ b/src/text_multilang.inc Thu Nov 22 19:47:26 2018 +0100 @@ -2,87 +2,86 @@ ; ; File text_multilang.inc ; -; Implementation text in various selectable languages. +; Implementation of texts in various selectable languages ; ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. ;============================================================================= ; HISTORY -; 2011-06-12 : [jDG] Creation... +; 2011-06-12 : [jDG] Creation ; ; Text definitions (text_french.asm example): -; TCODE tYes, "Oui" ; Yes -; TCODE tNo, "Non" ; No -; TCODE tLogbk, "Carnet de plongées" ; Logbook +; TCODE tYes, "Oui" ; Yes +; TCODE tNo, "Non" ; No +; TCODE tLogbk, "Carnet de plongées" ; Logbook ; ; Text direct usage: -; lfsr FSR1,tYes ; Load a 12bit text index -; call strcpy_text ; Copy to string buffer. -; PUTC '/' -; lfsr FSR1,tNo -; call strcat_text_print ; Append, and call word processor. +; lfsr FSR1,tYes ; load a 12 bit text index +; call strcpy_text ; copy to string buffer +; PUTC '/' ; place a single character into the text buffer +; lfsr FSR1,tNo +; call strcat_text_print ; append next text and call word processor to output all text to the screen ; ; RATIONALS: ; - The macro should define a label so that text files can be reordered -; to keep consistency while adding more option (and make translator life easier). +; to keep consistency while adding more options (and make translator life easier). ; ; - The text positions is keept in menu blocks for the menu processor. ; ; - library function take text number from the FSR1 register, because a -; lfsr instruction loads a 12bits constant at once. +; lfsr instruction loads a 12 bit constant at once. ; ;============================================================================= -; -; Pass 1: generate jump table, and define labels. -TCODE_1 macro label, text -tcode_idx set tcode_idx+1 - If LANG == 0 - global label +; Pass 1: generate a jump table and define labels +TCODE_1 macro label, text +tcode_idx set tcode_idx+1 + If LANG == 0 + global label label: - Endif - dw t#v(LANG)_#v(tcode_idx) - endm + Endif + dw t#v(LANG)_#v(tcode_idx) + endm ; -; Pass 2: generates string table. -TCODE_2 macro label, text -tcode_idx set tcode_idx+1 +; Pass 2: generates string table +TCODE_2 macro label, text +tcode_idx set tcode_idx+1 t#v(LANG)_#v(tcode_idx): - db text, 0 - endm + db text, 0 + endm ; ;============================================================================= -; strcpy_text : copy a multiling text into string buffer. +; strcpy_text : copy a multiling text into string buffer ; -; Input: FSR1 : text index -; Output: Buffer: filled with the text. -; FSR2: pointer to end of copied text (the null char). -; Trashed: WREG. - extern strcpy_text +; Input : FSR1 text index +; Output : Buffer filled with the text +; FSR2 pointer to end of copied text (the null char) +; Trashed: WREG + extern strcpy_text ;============================================================================= -; strcpy_text_print : Same as above, but calls word processor afterward. +; strcpy_text_print : same as above, but calls word processor afterward ; -; Input: FSR1 : text index -; Output: Buffer: filled with the text. -; FSR2: pointer to end of copied text (the null char). -; Trashed: WREG. - extern strcpy_text_print +; Input : FSR1 text index +; Output : Buffer filled with the text. +; FSR2 pointer to end of copied text (the null char) +; Trashed: WREG + extern strcpy_text_print ;============================================================================= -; strcat_text : Append a multiling text to FSR2 pointer. +; strcat_text : append a multiling text to FSR2 pointer ; -; Input: FSR1 : text index -; FSR2 : Current position (in Buffer) -; Output: FSR2: pointer to end of copied text (the null char). -; Trashed: WREG. - extern strcat_text +; Input : FSR1 text index +; FSR2 current position (in buffer) +; Output : FSR2 pointer to end of copied text (the null char) +; Trashed: WREG + extern strcat_text ;============================================================================= -; strcat_text_print : Same as above, but calls word processor afterward. +; strcat_text_print : aame as above, but calls word processor afterward ; -; Input: FSR1 : text index -; FSR2 : Current position (in Buffer) -; Output: FSR2: pointer to end of copied text (the null char). -; Trashed: WREG. - extern strcat_text_print +; Input : FSR1 text index +; FSR2 current position (in buffer) +; Output : FSR2 pointer to end of copied text (the null char) +; Trashed: WREG + extern strcat_text_print