aboutsummaryrefslogtreecommitdiff
path: root/bts.c
Commit message (Collapse)AuthorAgeFilesLines
* fix the menulist (make it play nice with periodic refreshing).rodri2024-11-161-1/+10
| | | | | | | | | | | | | before the addition of the timer for periodic matches updates the menulist was supposed to be refreshed manually by the user, and we didn't take into account the fact that every time you clear it and refill it loses its navigational parameters, i.e. which entry was selected and what's the offset if there are more entries than the visible window (Maxvisitems). so now we store those and reconfigure the menulist, adapting to its new state, so that the user experiences as little disruption as possible.
* bts: add a little vfx for the buttons. add playvfx helper function.rodri2024-11-151-20/+27
|
* bts: add a cover image.rodri2024-11-151-0/+4
|
* bts: add vfx. use stringn instead of string.rodri2024-11-151-10/+57
|
* bts: refactor processcmd().rodri2024-11-131-29/+76
|
* bts: moderate cleanup and restructuring.rodri2024-11-121-68/+56
|
* bts: proper board names when watching a match.rodri2024-11-111-2/+2
|
* bts: remove unnecessary anon struct.rodri2024-11-111-30/+27
| | | | | we no longer need to keep track of the game mode so a single var for state will do.
* bts: poll matches automatically.rodri2024-11-081-5/+25
| | | | | | before, it was necessary for the user to press w every time they wanted to get the most recent list of matches, which is dumb.
* bts: use buttons to select the game mode (removes -a option).rodri2024-11-071-20/+97
| | | | | now pressing q in a screen other than the main one (Waiting0) forces a reconnection, effectively resetting the game.
* copy the assets into /sys/games/lib.rodri2024-11-071-10/+16
|
* allow the user to disable sound. only spawn a new window when debugging.rodri2023-10-111-26/+44
|
* get rid of duplicate AudioSource init procedures.rodri2023-10-101-21/+21
| | | | also changed the name of some of the mixer functions.
* replace the andy layout algorithm for a better one.rodri2023-10-091-4/+3
|
* wrote a real layout algorithm for the andys.rodri2023-10-081-0/+2
|
* only send a shot if the target cell is clear/unknown.rodri2023-10-071-2/+4
|
* make cell2coords thread-safe.rodri2023-10-071-3/+5
|
* initial implementation of an AI.rodri2023-10-061-2/+7
| | | | | | added different modes for those who want to play with others and those who prefer to play against a bot (-a flag).
* add more sfx and do some of their orchestration.rodri2023-10-021-11/+46
|
* add a credits file, acknowledging people. add another sfx.rodri2023-10-011-1/+0
|
* add a mixer and some background sfx.rodri2023-10-011-10/+53
| | | | | | | | also postponed the connection establishment until the subsystem initialization is complete. there's no point in taking a seat you're going to leave milliseconds after a local resource failure.
* send the matches list upon first connection. changed the syntax a bit.rodri2023-09-291-7/+7
|
* added a border to the boards and corrected a bug when placing a ship.rodri2023-09-281-8/+11
| | | | | | | | | the bug allowed the player to move the ship when the cursor was outside the board in the negative side of its rframe. by using floor(2) instead of a cast to int the problem is over.
* got rid of static Image pointers in favor of a global color palette.rodri2023-09-281-59/+59
|
* give more feedback about the current state of play to the spectator.rodri2023-09-271-3/+8
|
* implemented spectator mode.rodri2023-09-271-15/+69
|
* initial work towards spectator mode.rodri2023-09-261-4/+26
|
* add parsecmd to the client. finish the menulist of matches.rodri2023-09-221-47/+89
| | | | | the menulist now supports scrolling. also changed some cursors and got to tidy up /^lmb\(.
* more work on the menulist of matches.rodri2023-09-201-81/+10
|
* initial work on a menu of matches.rodri2023-09-171-30/+107
| | | | | also made some corrections and changed the tokenize(2) fields identifiers from cmd[] to f[].
* don't send shots when the game is over. and freeze the cursor.rodri2023-09-151-2/+2
|
* fix mouse button handling.rodri2023-09-151-11/+11
|
* really allow any key to be pressed to continue.rodri2023-09-151-5/+7
|
* draw the game's title.rodri2023-09-151-0/+15
|
* fit client to the new architecture. clean things up, make them more consistent.rodri2023-09-151-59/+101
|
* don't rotate the ship when moving the mouse while pressing mmb.rodri2023-09-091-2/+6
|
* inline spawned threads to threadmain.Amavect2023-09-071-60/+42
| | | | | | | | Pointers to automatic variables become invalid when threadmain exits. Solution is to reuse threadmain. Use nbsend to avoid deadlock to the draw channel. Input struct is no longer needed, inline it.
* obtain each player's username and show it during battle.rodri2023-09-011-2/+21
|
* change mmb to rotate the ship without presenting a menu.rodri2023-09-011-43/+34
|
* correct patrolcursor not showing up after finishing a battle.rodri2023-08-311-3/+5
|
* show the board labels.rodri2023-08-311-0/+21
|
* improved playerq locking.rodri2023-08-311-6/+5
| | | | wrote a little how to play guide.
* forbid placing ships after being done with the layout.rodri2023-08-301-28/+44
| | | | | show the current ship and its length during placement. also made changes to some of the info banners.
* added new cursors and their switching.rodri2023-08-301-28/+71
|
* change the cursor based on game state (waiting and playing).rodri2023-08-301-9/+52
|
* implemented match conclusion logic and notification.rodri2023-08-291-7/+56
| | | | made the window un-resizable.
* reset the boards after each game.rodri2023-08-291-7/+34
| | | | | | only change turns if the shot was valid. show the opponent's hits on localboard. keep the orientation for consecutive ships while outlaying.
* removed unnecessary pointer.rodri2023-08-291-6/+4
|
* major development stride:rodri2023-08-291-66/+96
| | | | | | - implemented per-line msg framing - wrote most of the game logic - fixed an issue where the ship would go off-board when rotated
* show the current state and keep ships from overlapping.rodri2023-08-261-9/+38
|