Skip to content

Commit

Permalink
Adjust move time, Delphi README
Browse files Browse the repository at this point in the history
  • Loading branch information
JulStrat committed Nov 22, 2020
1 parent 64be3b7 commit a2c2b89
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ The original program was written for the Turbo Pascal compiler and the DOS opera

The program has been retouched by Roland Chastain, to be compilable with the Free Pascal compiler, and executable on Linux and on Windows.

Delphi [SDL_bgi](http://libxbgi.sourceforge.net) port created by I. Kakoulidis.
Delphi Windows port created by I. Kakoulidis.

<img src="https://github.com/JulStrat/nero5/blob/main/delphi/NERO5.PNG">
26 changes: 13 additions & 13 deletions delphi/NERO5.PAS
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ begin
ch := readkey;
*)

(* DELPHI TO DO
(* DELPHI TO DO - Load / Save game
if (ch in ['l', 'L']) then
begin
empty_movelist;
Expand Down Expand Up @@ -2182,7 +2182,7 @@ begin
Close(posf);
end;
*)
(* KEY_F4 *)
(* KEY_F4 - Sound On/Off *)
if (ch = KEY_F4) then
begin
soundon := (not soundon);
Expand All @@ -2193,7 +2193,7 @@ begin
nosound;
end;
end;
(* KEY_F5 *)
(* KEY_F5 - View score *)
if (ch = KEY_F5) then
begin
viewscores := (not viewscores);
Expand All @@ -2203,13 +2203,13 @@ begin
setcolor(black);
outtextxy(5, 300, lstr);
end;
(* KEY_F3 *)
(* KEY_F3 - Turn board *)
if (ch = KEY_F3) then
turn_board;
(* KEY_F7 *)
(* KEY_F7 - Square colors *)
if (ch = KEY_F7) then
setsqc;
(* KEY_F8 *)
(* KEY_F8 - Two player analysis *)
if (ch = KEY_F8) then
begin
viewscores := True;
Expand Down Expand Up @@ -2244,10 +2244,10 @@ begin
writeln(gamef, ' ');
end;

(* KEY_F6 *)
(* KEY_F6 - Setup board *)
if (ch = KEY_F6) then
set_initial_pos(True);
(* KEY_F2 *)
(* KEY_F2 - Make move *)
if (ch = KEY_F2) then
begin
playeriswhite := (not playeriswhite);
Expand Down Expand Up @@ -2289,13 +2289,13 @@ begin
nosound;
end;
end;
(* TO DO
if (ch = '+') then

if (ch = KEY_KP_PLUS) then
add_movetime;
if (ch = '-') then
if (ch = KEY_KP_MINUS) then
subtract_time;
*)
(* 59 F1, 27 ESC *)

(* F1 - New game, 27 - ESC *)
until (ch = KEY_F1) or (ch = KEY_ESC)
until (ch = KEY_ESC);
writeln(gamef, ' ');
Expand Down
Binary file modified delphi/NERO5.exe
Binary file not shown.
14 changes: 14 additions & 0 deletions delphi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# NERO 5 Delphi Windows port

## Requirements

[SDL_bgi](http://libxbgi.sourceforge.net) v2.4.1, [SDL2](https://www.libsdl.org/) Windows dynamic libraries.

## Build

`dcc64 -B -NSSystem NERO5.PAS`

## TO DO

1. Load/Save game.
2. Setup board (Key - F6).
6 changes: 6 additions & 0 deletions delphi/ubgi.pas
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ interface
SDLK_INSERT = $40000049;
SDLK_DELETE = $7F;

SDLK_KP_MINUS = 1073741910;
SDLK_KP_PLUS = 1073741911;

SDLK_F1 = $4000003A;
SDLK_F2 = $4000003B;
SDLK_F3 = $4000003C;
Expand Down Expand Up @@ -133,6 +136,9 @@ interface
KEY_END = SDLK_END;
KEY_INSERT = SDLK_INSERT;
KEY_DELETE = SDLK_DELETE;

KEY_KP_MINUS = SDLK_KP_MINUS;
KEY_KP_PLUS = SDLK_KP_PLUS;

KEY_F1 = SDLK_F1;
KEY_F2 = SDLK_F2;
Expand Down

0 comments on commit a2c2b89

Please sign in to comment.