From 573b71566bb4625bd39b7aeb683c10e4b46d60ea Mon Sep 17 00:00:00 2001 From: Pecusx Date: Thu, 26 Oct 2023 10:07:39 +0200 Subject: [PATCH] Some procedures descriptions. --- Atari/textproc.asm | 26 ++++++++++++++++++-------- C64/textproc.asm | 29 ++++++++++++++++++----------- game.asm | 12 +++++++++++- 3 files changed, 47 insertions(+), 20 deletions(-) diff --git a/Atari/textproc.asm b/Atari/textproc.asm index 49e96f4..6b79b24 100644 --- a/Atari/textproc.asm +++ b/Atari/textproc.asm @@ -12,9 +12,16 @@ ;-------------------------------------------------- ; start-up screen - options, etc. ; this function returns: -; - number of players (NumberOfPlayers) -; - money each player has on the beginning of the game (moneyL i moneyH) -; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight +; - 9 values in 'OptionTable' denoting options selected in menu. +; According to contents of this table, corresponding variables are then set. +; Setting of these variables is handled by procedure 'SetVariablesFromOptions'. +; This function also returns additional options by setting variables: +; - 'RandomMountains' - mountains type change after each (0 - round only, >0 - each turn) +; - 'WindChangeInRound' - wind change after each turn (0 - round only, >0 - each turn) +; - 'GradientNr' +; - 'BlackHole' - 0 - standard, >0 - fast +; - 'FastSoilDown' - 0 - no, >0 - yes +; ----------------------------------------------------- ; we only need to clear last 60 lines (faster) ldy #<(display+40*140) @@ -1071,13 +1078,16 @@ loop sta (temp2),y .endp ; ----------------------------------------------------- .proc EnterPlayerName -; in: TankNr -; Out: TanksNames, SkillTable - ; this little thing is for choosing Player's skill (if computer) ; and entering his name -; If no name entered, there should be name "1st Tank", etc. -; Default tanks names are in table TanksNamesDefault +; If no name entered, there should be default. +; Default tank names are taken from difficulty level names on the screen. +; +; in: TankNr +; this function returns: +; - 'skilltable' (in array) for this tank +; - 'TankShape' (in array) for this tank +; - 'TanksNames' (in array) for this tank ; ----------------------------------------------------- jsr PMoutofScreen diff --git a/C64/textproc.asm b/C64/textproc.asm index aacde71..7621f96 100644 --- a/C64/textproc.asm +++ b/C64/textproc.asm @@ -20,10 +20,16 @@ NamesOfLevels ;-------------------------------------------------- ; start-up screen - options, etc. ; this function returns: -; - number of players (NumberOfPlayers) -; - money each player has on the beginning of the game (moneyL i moneyH) -; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight - +; - 9 values in 'OptionTable' denoting options selected in menu. +; According to contents of this table, corresponding variables are then set. +; Setting of these variables is handled by procedure 'SetVariablesFromOptions'. +; This function also returns additional options by setting variables: +; - 'RandomMountains' - mountains type change after each (0 - round only, >0 - each turn) +; - 'WindChangeInRound' - wind change after each turn (0 - round only, >0 - each turn) +; - 'GradientNr' +; - 'BlackHole' - 0 - standard, >0 - fast +; - 'FastSoilDown' - 0 - no, >0 - yes +; ----------------------------------------------------- ldx #$08 @ lda Autoplay_OptionsTable,x @@ -142,16 +148,17 @@ GoToActivation .endp ; ----------------------------------------------------- .proc EnterPlayerName -; in: TankNr -; Out: TanksNames, SkillTable - ; this little thing is for choosing Player's skill (if computer) ; and entering his name -; If no name entered, there should be name "1st Tank", etc. -; Default tanks names are in table TanksNamesDefault -; ----------------------------------------------------- - +; If no name entered, there should be default. +; Default tank names are taken from difficulty level names on the screen. ; +; in: TankNr +; this function returns: +; - 'skilltable' (in array) for this tank +; - 'TankShape' (in array) for this tank +; - 'TanksNames' (in array) for this tank +; ----------------------------------------------------- EndOfNick ; storing name of the player and its level diff --git a/game.asm b/game.asm index ef0f858..44e7153 100644 --- a/game.asm +++ b/game.asm @@ -1194,8 +1194,18 @@ SetRandomWalls rts .endp ; -------------------------------------- -; Sets the appropriate variables based on the options table +; Sets the appropriate variables based on the 'OptionsTable' ; +; this function returns: +; - 'NumberOfPlayers' +; - 'moneyL' and 'moneyH' (in arrays) for each player +; - 'gravity' +; - 'MaxWind' +; - 'RoundsInTheGame' +; - 'flyDelay' +; - 'seppukuVal' +; - 'mountainDeltaL' and 'mountainDeltaH' + .proc SetVariablesFromOptions ;first option ldy OptionsTable