Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
f37132a4
Commit
f37132a4
authored
16 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Use cterm_write() for attribute and position changes as well... this ensures
that capture and scrollback always works correctly.
parent
aee5eabc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syncterm/ooii.c
+277
-230
277 additions, 230 deletions
src/syncterm/ooii.c
with
277 additions
and
230 deletions
src/syncterm/ooii.c
+
277
−
230
View file @
f37132a4
...
...
@@ -148,12 +148,70 @@ static char armors[13][20]=
"PolyCarbon"
};
// 12
static
void
term_gotoxy
(
int
x
,
int
y
)
{
char
ansistr
[
32
];
sprintf
(
ansistr
,
"\e[%d;%dH"
,
y
,
x
);
cterm_write
(
ansistr
,
strlen
(
ansistr
),
NULL
,
0
,
NULL
);
}
static
void
term_clearscreen
(
void
)
{
cterm_write
(
"\e[0m\e[2J\e[H"
,
7
,
NULL
,
0
,
NULL
);
}
const
int
term_colours
[
8
]
=
{
0
,
4
,
2
,
6
,
1
,
5
,
3
,
7
};
static
void
term_setattr
(
int
attr
)
{
char
str
[
16
];
int
fg
,
ofg
;
int
bg
,
obg
;
int
bl
,
obl
;
int
br
,
obr
;
int
oa
;
str
[
0
]
=
0
;
if
(
cterm
.
attr
==
attr
)
return
;
bl
=
attr
&
0x80
;
bg
=
(
attr
>>
4
)
&
0x7
;
fg
=
attr
&
0x07
;
br
=
attr
&
0x08
;
oa
=
cterm
.
attr
;
obl
=
oa
&
0x80
;
obg
=
(
oa
>>
4
)
&
0x7
;
ofg
=
oa
&
0x07
;
obr
=
oa
&
0x08
;
strcpy
(
str
,
"
\033
["
);
if
(
obl
!=
bl
)
{
if
(
!
bl
)
strcat
(
str
,
"25;"
);
else
strcat
(
str
,
"5;"
);
}
if
(
br
!=
obr
)
{
if
(
br
)
strcat
(
str
,
"1;"
);
else
strcat
(
str
,
"22;"
);
}
if
(
fg
!=
ofg
)
sprintf
(
str
+
strlen
(
str
),
"3%d;"
,
term_colours
[
fg
]);
if
(
bg
!=
obg
)
sprintf
(
str
+
strlen
(
str
),
"4%d;"
,
term_colours
[
bg
]);
str
[
strlen
(
str
)
-
1
]
=
'm'
;
cterm_write
(
str
,
strlen
(
str
),
NULL
,
0
,
NULL
);
}
static
void
readInPix
(
char
codeCh
)
{
int
fptr
;
cterm_clearscreen
(
0
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
1
;
term_clearscreen
();
term_gotoxy
(
1
,
1
);
switch
((
char
)
codeCh
)
{
// complex pictures
case
'A'
:
...
...
@@ -217,19 +275,19 @@ static int readInText(char *codeStr) {
switch
((
char
)
codeStr
[
0
])
{
case
'1'
:
c
term
.
attr
=
BROWN
;
term
_set
attr
(
BROWN
)
;
cterm_write
(
"You mosey on over to the bar and take a seat on a scuffed barstool. The
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"slighty deformed keeper grunts,
\"
Woth ja leeke?
\"
A galacticom on the top
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"shelf behind him translates his jumble into
\"
What would you like?
\"
You
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"start to wonder what ever happened to the old standard human language.
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"
\"
Give me the House Special,
\"
you smirk.
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
GREEN
;
term
_set
attr
(
GREEN
)
;
cterm_write
(
"The bartender stares at you with one eye and then drools in agreement. He
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"vanishes from behind the bar and pops back up a few seconds later. He
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"slides you the mysterious drink as he begins to chuckle. White smoke
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"slithers from the bubbling green slime over onto the bar counter.
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"
\"
What do I owe you?
\"
you inquire to the barman. He promptly responds
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"with that same smirk on his face,
\"
Youkla telph me.
\"\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
break
;
...
...
@@ -289,11 +347,11 @@ static int readSmallMenu(char *codeStr) {
switch
((
char
)
codeStr
[
0
])
{
case
'a'
:
c
term
.
attr
=
LIGHTGREEN
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Supply Room
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
GREEN
;
term
_set
attr
(
GREEN
)
;
cterm_write
(
"~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[A] Armor
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[E] Equipment
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[P] Power Supply/Ammo
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -302,16 +360,16 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"-[I] Supply Inventory
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[C] Check
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Back to HQ
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Supply Room> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'b'
:
c
term
.
attr
=
WHITE
;
term
_set
attr
(
WHITE
)
;
cterm_write
(
"Recruit Chambers
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
RED
;
term
_set
attr
(
RED
)
;
cterm_write
(
"~~~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[A] Adjust Specs
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[C] Check Status
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[M] Morgue Listing
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -320,16 +378,16 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"-[U] Use Equipment
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[V] View Recruit
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Exit to Barracks
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Chambers> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'c'
:
c
term
.
attr
=
LIGHTMAGENTA
;
term
_set
attr
(
LIGHTMAGENTA
)
;
cterm_write
(
"Adjust Specifications:
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
MAGENTA
;
term
_set
attr
(
MAGENTA
)
;
cterm_write
(
"~~~~~~~~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"-[A] Ansi Color On/Off
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[C] Combat Action/Stat-Random
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[D] Disable/Enable Ansiterm
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -340,18 +398,18 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"-[S] Scanner Scroll/Stationary
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[T] Terminate Yourself
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Exit
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Specs> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'd'
:
codeStr
++
;
c
term
.
attr
=
LIGHTMAGENTA
;
term
_set
attr
(
LIGHTMAGENTA
)
;
cterm_write
(
"Storage Bank:
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
MAGENTA
;
term
_set
attr
(
MAGENTA
)
;
cterm_write
(
"~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
WHITE
)
;
cterm_write
(
"Crystals in Savings : "
,
-
1
,
NULL
,
0
,
NULL
);
getBlock
(
&
codeStr
,
menuBlock
);
...
...
@@ -364,7 +422,7 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[D] Deposit
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[W] Withdraw
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -380,29 +438,29 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"-[*] Exit to Chambers
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
getBlock
(
&
codeStr
,
menuBlock
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
WHITE
)
;
cterm_write
(
"You have "
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" crystals onhand.
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Bank> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'e'
:
codeStr
++
;
c
term
.
attr
=
YELLOW
;
term
_set
attr
(
YELLOW
)
;
cterm_write
(
"You are now in the Games Room, a delightful place to leisurely relax from
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"the everyday hack n' slash. A small bar is located on the south wall.
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
WHITE
)
;
getBlock
(
&
codeStr
,
menuBlock
);
cterm_write
(
"Games Left :[ "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"-[A] Arm Wrestling
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[B] Barl's Bar
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -412,16 +470,16 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"-[S] SharpShooter
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Exit to Barracks
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Games Room> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'f'
:
codeStr
++
;
c
term
.
attr
=
WHITE
;
cterm_write
(
"Sentry Post
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
RED
;
cterm_write
(
"~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
WHITE
)
;
cterm_write
(
"Sentry Post
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
RED
)
;
cterm_write
(
"~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
getBlock
(
&
codeStr
,
menuBlock
);
yy
=
atoi
(
menuBlock
);
...
...
@@ -436,36 +494,36 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"-[C] Check Your Status
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Exit to Barracks
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Sentry Post> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'g'
:
codeStr
++
;
c
term
.
attr
=
WHITE
;
cterm_write
(
"Electronic-Mail
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGRAY
;
cterm_write
(
"~~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
cterm_write
(
"Electronic-Mail
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTGRAY
)
;
cterm_write
(
"~~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
getBlock
(
&
codeStr
,
menuBlock
);
if
(
menuBlock
[
0
]
>
48
)
{
c
term
.
attr
=
YELLOW
;
term
_set
attr
(
YELLOW
)
;
cterm_write
(
"-[M] Mass Mail to Squadron
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
}
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[R] Read E-Mail
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[S] Send E-Mail
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Back to Comm. Post
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<E-Mail> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'h'
:
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"
\r\n
Help Information:
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
cterm_write
(
"~~~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
CYAN
)
;
cterm_write
(
"~~~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
cterm_write
(
"-[1] Scenario
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[2] Character
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[3] Complex
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -479,26 +537,26 @@ static int readSmallMenu(char *codeStr) {
case
'i'
:
codeStr
++
;
c
term
.
attr
=
LIGHTCYAN
;
cterm_write
(
"Medical Center
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
cterm_write
(
"~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"Medical Center
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
CYAN
)
;
cterm_write
(
"~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Radiation :[ "
,
-
1
,
NULL
,
0
,
NULL
);
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
if
(
zz
<
44
)
c
term
.
attr
=
WHITE
;
term
_set
attr
(
WHITE
)
;
else
c
term
.
attr
=
LIGHTRED
;
term
_set
attr
(
LIGHTRED
)
;
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"%
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Hit Points :[ "
,
-
1
,
NULL
,
0
,
NULL
);
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
if
(
zz
>
5
)
c
term
.
attr
=
WHITE
;
term
_set
attr
(
WHITE
)
;
else
c
term
.
attr
=
LIGHTRED
;
term
_set
attr
(
LIGHTRED
)
;
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
getBlock
(
&
codeStr
,
menuBlock
);
...
...
@@ -506,28 +564,28 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
")
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Infectious :[ "
,
-
1
,
NULL
,
0
,
NULL
);
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
WHITE
)
;
cterm_write
(
diseases
[
zz
],
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
term
_set
attr
(
CYAN
)
;
cterm_write
(
"-[M] Medical Treatment
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[R] Radiation Treatment
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[N] Neutralize Disease
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[V] Vaccinate Disease
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Back to HQ
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Medical Center> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'j'
:
c
term
.
attr
=
LIGHTMAGENTA
;
term
_set
attr
(
LIGHTMAGENTA
)
;
cterm_write
(
"Records Room
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
MAGENTA
;
cterm_write
(
"~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
term
_set
attr
(
MAGENTA
)
;
cterm_write
(
"~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"-[A] Total Ability
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[B] Bravery
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[C] Combat Accuracy
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -539,15 +597,15 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"-[W] Wealth
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[H] Hall of Fame
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Back to HQ
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Records> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'k'
:
codeStr
++
;
c
term
.
attr
=
LIGHTGREEN
;
cterm_write
(
"Supply Armor
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
GREEN
;
cterm_write
(
"~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Supply Armor
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
GREEN
)
;
cterm_write
(
"~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
...
...
@@ -557,11 +615,11 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" Hits
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[B] Buy Armor
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[S] Sell Armor
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Back to Supply Room
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Supply Armor> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
...
...
@@ -569,9 +627,9 @@ static int readSmallMenu(char *codeStr) {
codeStr
++
;
getBlock
(
&
codeStr
,
menuBlock
);
c
term
.
attr
=
LIGHTBLUE
;
cterm_write
(
"Armor Types Hits Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
cterm_write
(
"~~~~~~~~~~~ ~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"Armor Types Hits Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
CYAN
)
;
cterm_write
(
"~~~~~~~~~~~ ~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
for
(
zz
=
1
;
zz
<
5
;
zz
++
)
{
sprintf
(
buf
,
"-[%d] - %s"
,
zz
,
armors
[
zz
]);
...
...
@@ -611,15 +669,15 @@ static int readSmallMenu(char *codeStr) {
case
'm'
:
codeStr
++
;
if
(
codeStr
[
0
]
==
'1'
)
{
c
term
.
attr
=
LIGHTGREEN
;
cterm_write
(
"Supply Equipment
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
GREEN
;
cterm_write
(
"~~~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Supply Equipment
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
GREEN
)
;
cterm_write
(
"~~~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
}
else
{
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"
\r\n
-[B] Buy Equipment
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[S] Sell Equipment
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Back to Supply Room
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Supply Equip> "
,
-
1
,
NULL
,
0
,
NULL
);
}
break
;
...
...
@@ -627,9 +685,9 @@ static int readSmallMenu(char *codeStr) {
case
'n'
:
codeStr
++
;
getBlock
(
&
codeStr
,
menuBlock
);
c
term
.
attr
=
LIGHTBLUE
;
cterm_write
(
"Equipment Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
cterm_write
(
"~~~~~~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"Equipment Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
CYAN
)
;
cterm_write
(
"~~~~~~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
for
(
zz
=
1
;
zz
<
13
;
zz
++
)
{
if
(
zz
<=
9
)
...
...
@@ -657,16 +715,16 @@ static int readSmallMenu(char *codeStr) {
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
c
term
.
attr
=
LIGHTGREEN
;
cterm_write
(
"Supply Suits
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
GREEN
;
cterm_write
(
"~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
cterm_write
(
"Suit : "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Supply Suits
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
GREEN
)
;
cterm_write
(
"~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
cterm_write
(
"Suit : "
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
suits
[
zz
],
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"
\r\n\r\n
-[B] Buy a Suit
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[S] Sell a Suit
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Back to Supply Room
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Supply Suits> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
...
...
@@ -674,9 +732,9 @@ static int readSmallMenu(char *codeStr) {
codeStr
++
;
getBlock
(
&
codeStr
,
menuBlock
);
c
term
.
attr
=
LIGHTBLUE
;
cterm_write
(
"Suits/Outfits Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
cterm_write
(
"~~~~~~~~~~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"Suits/Outfits Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
CYAN
)
;
cterm_write
(
"~~~~~~~~~~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
for
(
zz
=
1
;
zz
<
3
;
zz
++
)
{
sprintf
(
buf
,
"-[%d] - %s"
,
zz
,
suits
[
zz
]);
...
...
@@ -695,8 +753,8 @@ static int readSmallMenu(char *codeStr) {
case
'q'
:
codeStr
++
;
c
term
.
attr
=
LIGHTGREEN
;
cterm_write
(
"Supply Weapons
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
GREEN
;
cterm_write
(
"~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Supply Weapons
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
GREEN
)
;
cterm_write
(
"~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
for
(
yy
=
1
;
yy
<
3
;
yy
++
)
{
getBlock
(
&
codeStr
,
menuBlock
);
...
...
@@ -709,20 +767,20 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" Rds
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
}
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"
\r\n
-[B] Buy Weapon
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[S] Sell Weapon
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Back to Supply Room
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Supply Weapons> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'r'
:
codeStr
++
;
getBlock
(
&
codeStr
,
menuBlock
);
c
term
.
attr
=
LIGHTBLUE
;
cterm_write
(
"Hand-to-Hand Weapons Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
cterm_write
(
"~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"Hand-to-Hand Weapons Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
CYAN
)
;
cterm_write
(
"~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
for
(
zz
=
1
;
zz
<
7
;
zz
++
)
{
sprintf
(
buf
,
"-[%d] - %s"
,
zz
,
weapons
[
zz
]);
...
...
@@ -738,9 +796,9 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
buf
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
}
c
term
.
attr
=
LIGHTBLUE
;
cterm_write
(
"
\r\n
Long-Range Weapons Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
cterm_write
(
"~~~~~~~~~~~~~~~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"
\r\n
Long-Range Weapons Crystals
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
CYAN
)
;
cterm_write
(
"~~~~~~~~~~~~~~~~~~ ~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
for
(
zz
=
7
;
zz
<
13
;
zz
++
)
{
if
(
zz
<
10
)
...
...
@@ -765,8 +823,8 @@ static int readSmallMenu(char *codeStr) {
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
c
term
.
attr
=
LIGHTGREEN
;
cterm_write
(
"Squadrons Menu
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
GREEN
;
cterm_write
(
"~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Squadrons Menu
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
GREEN
)
;
cterm_write
(
"~~~~~~~~~~~~~~
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[S] Show Squadrons/Leaders
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -787,35 +845,35 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"
\r\n
-[*] Return to HQ
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
cterm_write
(
"-<Squadrons> "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Squadrons> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
't'
:
codeStr
++
;
getBlock
(
&
codeStr
,
menuBlock
);
c
term
.
attr
=
WHITE
;
cterm_write
(
"Sighting : "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTMAGENTA
;
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
WHITE
)
;
cterm_write
(
"Sighting : "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTMAGENTA
)
;
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"
\r\n\r\n
-[L] "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
term
_set
attr
(
CYAN
)
;
cterm_write
(
"Long-Range Combat
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
cterm_write
(
"-[H] "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[H] "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
CYAN
)
;
cterm_write
(
"Hand-to-Hand Combat
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
if
(
!
zz
)
{
c
term
.
attr
=
LIGHTCYAN
;
cterm_write
(
"-[R] "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
cterm_write
(
"Run like hell!
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[R] "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
CYAN
)
;
cterm_write
(
"Run like hell!
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
}
c
term
.
attr
=
LIGHTCYAN
;
cterm_write
(
"
\r\n
-[C] "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
MAGENTA
;
cterm_write
(
"Check Status
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
cterm_write
(
"-[V] "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
MAGENTA
;
cterm_write
(
"View Opponent
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
cterm_write
(
"-[M] "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGRAY
;
cterm_write
(
"Toggle Combat Modes
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
cterm_write
(
"-<Combat> "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"
\r\n
-[C] "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
MAGENTA
)
;
cterm_write
(
"Check Status
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[V] "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
MAGENTA
)
;
cterm_write
(
"View Opponent
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"-[M] "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTGRAY
)
;
cterm_write
(
"Toggle Combat Modes
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Combat> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
...
...
@@ -823,14 +881,14 @@ static int readSmallMenu(char *codeStr) {
getBlock
(
&
codeStr
,
menuBlock
);
strcpy
(
tempBlock
,
menuBlock
);
c
term
.
attr
=
WHITE
;
cterm_write
(
"Camp :[ "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
cterm_write
(
" ]:
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
RED
;
term
_set
attr
(
WHITE
)
;
cterm_write
(
"Camp :[ "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
cterm_write
(
" ]:
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
RED
)
;
for
(
zz
=
0
;
zz
<
(
10
+
strlen
(
menuBlock
));
zz
++
)
cterm_write
(
"~"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
term
_set
attr
(
CYAN
)
;
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
if
(
zz
>
0
)
...
...
@@ -853,12 +911,12 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"-[D] Drop your items
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[P] Pick up items
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Leave campsite
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
cterm_write
(
"-<Camp> "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Camp> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'v'
:
codeStr
++
;
c
term
.
attr
=
LIGHTGREEN
;
cterm_write
(
"Hit Points :[ "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Hit Points :[ "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
getBlock
(
&
codeStr
,
menuBlock
);
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -866,7 +924,7 @@ static int readSmallMenu(char *codeStr) {
sprintf
(
buf
,
"(%s)
\r\n
"
,
menuBlock
);
cterm_write
(
buf
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
cterm_write
(
"Applications :[ "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Applications :[ "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
getBlock
(
&
codeStr
,
menuBlock
);
sprintf
(
buf
,
"%s current, "
,
menuBlock
);
cterm_write
(
buf
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -874,11 +932,11 @@ static int readSmallMenu(char *codeStr) {
sprintf
(
buf
,
"%s total
\r\n
"
,
menuBlock
);
cterm_write
(
buf
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTGREEN
;
cterm_write
(
"Radiation :[ "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
LIGHTGREEN
)
;
cterm_write
(
"Radiation :[ "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
getBlock
(
&
codeStr
,
menuBlock
);
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"%
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
cterm_write
(
"Also, you are "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
WHITE
)
;
cterm_write
(
"Also, you are "
,
-
1
,
NULL
,
0
,
NULL
);
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
switch
(
zz
)
{
...
...
@@ -895,14 +953,14 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"extremely hungry!
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
4
:
c
term
.
attr
=
LIGHTRED
;
term
_set
attr
(
LIGHTRED
)
;
cterm_write
(
"DYING "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
WHITE
;
term
_set
attr
(
WHITE
)
;
cterm_write
(
"of hunger!!
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
break
;
}
c
term
.
attr
=
YELLOW
;
term
_set
attr
(
YELLOW
)
;
cterm_write
(
"
\r\n
-[Q] Quick Heal
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[U] Use an Application
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -912,7 +970,7 @@ static int readSmallMenu(char *codeStr) {
cterm_write
(
"-[R] Use Rations
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"-[*] Exit
\r\n\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTBLUE
;
term
_set
attr
(
LIGHTBLUE
)
;
cterm_write
(
"-<Medpacks> "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
}
...
...
@@ -922,11 +980,10 @@ static int readSmallMenu(char *codeStr) {
}
static
void
checkStamp
(
int
xx
,
int
yy
,
char
stampStr
[
20
])
{
// used w/ incomingCheck
cterm
.
xpos
=
xx
+
1
;
cterm
.
ypos
=
yy
+
1
;
cterm
.
attr
=
LIGHTCYAN
;
term_gotoxy
(
xx
+
1
,
yy
+
1
);
term_setattr
(
LIGHTCYAN
);
cterm_write
(
stampStr
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
term
_set
attr
(
CYAN
)
;
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
return
;
}
...
...
@@ -937,26 +994,23 @@ static int incomingCheckStatus(char *codeStr) {
char
menuBlock
[
255
];
char
*
origCodeStr
=
codeStr
;
cterm_clearscreen
(
0
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
1
;
term_clearscreen
();
term_gotoxy
(
1
,
1
);
codeStr
++
;
getBlock
(
&
codeStr
,
menuBlock
);
who
=
atoi
(
menuBlock
);
c
term
.
attr
=
who
;
term
_set
attr
(
who
)
;
cterm_write
(
"
\r\n
Ŀ
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
LIGHTCYAN
;
term
_set
attr
(
LIGHTCYAN
)
;
cterm_write
(
"Recruit "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
CYAN
;
term
_set
attr
(
CYAN
)
;
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
cterm
.
attr
=
who
;
cterm
.
xpos
=
34
;
cterm
.
ypos
=
3
;
term_setattr
(
who
);
term_gotoxy
(
34
,
3
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
4
;
term_gotoxy
(
1
,
4
);
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
checkStamp
(
0
,
4
,
"Location "
);
...
...
@@ -969,8 +1023,7 @@ static int incomingCheckStatus(char *codeStr) {
checkStamp
(
27
,
6
,
"Hit Pts "
);
checkStamp
(
54
,
6
,
"Bravery "
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
8
;
term_gotoxy
(
1
,
8
);
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
checkStamp
(
0
,
8
,
"Crystals "
);
...
...
@@ -980,37 +1033,32 @@ static int incomingCheckStatus(char *codeStr) {
checkStamp
(
27
,
9
,
"Level "
);
checkStamp
(
54
,
9
,
"Hunger Level "
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
11
;
cterm
.
attr
=
who
;
term_gotoxy
(
1
,
11
);
term_setattr
(
who
);
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
checkStamp
(
0
,
11
,
"Weapon "
);
checkStamp
(
0
,
12
,
"Weapon "
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
14
;
cterm
.
attr
=
who
;
term_gotoxy
(
1
,
14
);
term_setattr
(
who
);
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
checkStamp
(
0
,
14
,
"Armor "
);
checkStamp
(
0
,
15
,
"Outfit "
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
17
;
cterm
.
attr
=
who
;
term_gotoxy
(
1
,
17
);
term_setattr
(
who
);
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
for
(
zz
=
1
;
zz
<
4
;
zz
++
)
checkStamp
(
0
,
16
+
zz
,
"Equipment "
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
21
;
cterm
.
attr
=
who
;
term_gotoxy
(
1
,
21
);
term_setattr
(
who
);
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
23
;
term_gotoxy
(
1
,
23
);
return
(
codeStr
-
origCodeStr
);;
}
...
...
@@ -1136,30 +1184,30 @@ char * scanChar(unsigned char s, int where, int miniTrik) {
static
void
setScanCol
(
char
s
)
{
switch
((
char
)
s
)
{
case
'*'
:
c
term
.
attr
=
4
+
128
;
break
;
case
'G'
:
c
term
.
attr
=
1
;
break
;
case
'w'
:
c
term
.
attr
=
2
;
break
;
case
'"'
:
case
''
:
c
term
.
attr
=
3
;
break
;
case
'U'
:
case
'%'
:
c
term
.
attr
=
4
;
break
;
case
'*'
:
term
_set
attr
(
4
+
128
)
;
break
;
case
'G'
:
term
_set
attr
(
1
)
;
break
;
case
'w'
:
term
_set
attr
(
2
)
;
break
;
case
'"'
:
case
''
:
term
_set
attr
(
3
)
;
break
;
case
'U'
:
case
'%'
:
term
_set
attr
(
4
)
;
break
;
case
'^'
:
case
'i'
:
case
''
:
case
''
:
c
term
.
attr
=
6
;
break
;
case
''
:
case
''
:
term
_set
attr
(
6
)
;
break
;
case
'O'
:
case
''
:
case
'Q'
:
c
term
.
attr
=
7
;
break
;
case
''
:
case
' '
:
c
term
.
attr
=
8
;
break
;
case
''
:
c
term
.
attr
=
9
;
break
;
case
'-'
:
case
''
:
c
term
.
attr
=
10
;
break
;
case
'O'
:
case
''
:
case
'Q'
:
term
_set
attr
(
7
)
;
break
;
case
''
:
case
' '
:
term
_set
attr
(
8
)
;
break
;
case
''
:
term
_set
attr
(
9
)
;
break
;
case
'-'
:
case
''
:
term
_set
attr
(
10
)
;
break
;
case
'?'
:
case
'@'
:
case
'/'
:
case
''
:
case
'Y'
:
case
''
:
c
term
.
attr
=
12
;
break
;
case
''
:
case
'Y'
:
case
''
:
term
_set
attr
(
12
)
;
break
;
case
'#'
:
case
'c'
:
case
''
:
c
term
.
attr
=
13
;
break
;
case
'#'
:
case
'c'
:
case
''
:
term
_set
attr
(
13
)
;
break
;
case
'.'
:
case
'['
:
case
''
:
case
''
:
case
'!'
:
case
''
:
case
''
:
c
term
.
attr
=
14
;
break
;
case
''
:
term
_set
attr
(
14
)
;
break
;
case
'I'
:
case
''
:
case
''
:
c
term
.
attr
=
15
;
break
;
case
'I'
:
case
''
:
case
''
:
term
_set
attr
(
15
)
;
break
;
}
...
...
@@ -1182,33 +1230,31 @@ static int incomingMapScanner(char *codeStr)
switch
((
char
)
codeStr
[
0
])
{
case
'F'
:
cterm_clearscreen
(
0
);
cterm
.
xpos
=
1
;
cterm
.
ypos
=
1
;
cterm
.
attr
=
1
;
term_clearscreen
();
term_gotoxy
(
1
,
1
);
term_setattr
(
1
);
cterm_write
(
"
\r\n
Ŀ
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
13
;
cterm_write
(
"Infrared"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
"ķ"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
13
;
cterm_write
(
" Compass Sector Monitor System Monitor "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
1
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
" ~~~~~~~ ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
1
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
" [ ] [ ] "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
13
;
cterm_write
(
"Items Hit Points"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
" [: "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
1
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
" [ ] "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
13
;
cterm_write
(
"Campers Radiation "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
"[: "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
1
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
13
;
cterm_write
(
"scan"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
"Ľ "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
13
;
cterm_write
(
"Time : "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
"[ ] "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
13
;
cterm_write
(
"Bases Condition "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
5
;
cterm_write
(
"[: "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
attr
=
1
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
13
)
;
cterm_write
(
"Infrared"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
"ķ"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
13
)
;
cterm_write
(
" Compass Sector Monitor System Monitor "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
1
)
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
" ~~~~~~~ ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
1
)
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
" [ ] [ ] "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
13
)
;
cterm_write
(
"Items Hit Points"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
" [: "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
1
)
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
" [ ] "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
13
)
;
cterm_write
(
"Campers Radiation "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
"[: "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
1
)
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
13
)
;
cterm_write
(
"scan"
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
"Ľ "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
13
)
;
cterm_write
(
"Time : "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
"[ ] "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
13
)
;
cterm_write
(
"Bases Condition "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
5
)
;
cterm_write
(
"[: "
,
-
1
,
NULL
,
0
,
NULL
);
term
_set
attr
(
1
)
;
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
'T'
:
cterm
.
xpos
=
1
;
cterm
.
ypos
=
9
;
cterm
.
attr
=
1
;
case
'T'
:
term_gotoxy
(
1
,
9
);
term_setattr
(
1
);
cterm_write
(
"Ŀ
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
cterm_write
(
"
\r\n
"
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -1239,15 +1285,15 @@ static int incomingMapScanner(char *codeStr)
for
(
zz
=
0
;
zz
<
9
;
zz
++
)
{
switch
(
zz
)
{
case
0
:
c
term
.
xpos
=
5
;
cterm
.
ypos
=
4
;
break
;
case
1
:
c
term
.
xpos
=
8
;
cterm
.
ypos
=
4
;
break
;
case
2
:
c
term
.
xpos
=
11
;
cterm
.
ypos
=
4
;
break
;
case
3
:
c
term
.
xpos
=
5
;
cterm
.
ypos
=
5
;
break
;
case
4
:
c
term
.
xpos
=
8
;
cterm
.
ypos
=
5
;
break
;
case
5
:
c
term
.
xpos
=
11
;
cterm
.
ypos
=
5
;
break
;
case
6
:
c
term
.
xpos
=
5
;
cterm
.
ypos
=
6
;
break
;
case
7
:
c
term
.
xpos
=
8
;
cterm
.
ypos
=
6
;
break
;
case
8
:
c
term
.
xpos
=
11
;
cterm
.
ypos
=
6
;
break
;
case
0
:
term
_gotoxy
(
5
,
4
)
;
break
;
case
1
:
term
_gotoxy
(
8
,
4
)
;
break
;
case
2
:
term
_gotoxy
(
11
,
4
)
;
break
;
case
3
:
term
_gotoxy
(
5
,
5
)
;
break
;
case
4
:
term
_gotoxy
(
8
,
5
)
;
break
;
case
5
:
term
_gotoxy
(
11
,
5
)
;
break
;
case
6
:
term
_gotoxy
(
5
,
6
)
;
break
;
case
7
:
term
_gotoxy
(
8
,
6
)
;
break
;
case
8
:
term
_gotoxy
(
11
,
6
)
;
break
;
}
strcpy
(
scan
,
scanChar
(
scanVals
[
zz
],
where
,
miniTrik
));
...
...
@@ -1256,7 +1302,7 @@ static int incomingMapScanner(char *codeStr)
/* TODO: timer/tblock were not declared... */
time_t
timer
=
time
(
NULL
);
struct
tm
*
tblock
=
localtime
(
&
timer
);
c
term
.
attr
=
stormColors
[
tblock
->
tm_wday
];
term
_set
attr
(
stormColors
[
tblock
->
tm_wday
]
)
;
}
else
setScanCol
(
scan
[
0
]);
...
...
@@ -1269,7 +1315,7 @@ static int incomingMapScanner(char *codeStr)
cterm_write
(
scan
,
-
1
,
NULL
,
0
,
NULL
);
}
c
term
.
xpos
=
1
;
cterm
.
ypos
=
14
;
term
_gotoxy
(
1
,
14
)
;
break
;
case
'O'
:
...
...
@@ -1279,8 +1325,8 @@ static int incomingMapScanner(char *codeStr)
switch
(
zz
)
{
case
1
:
c
term
.
xpos
=
20
;
cterm
.
ypos
=
5
;
c
term
.
attr
=
14
;
term
_gotoxy
(
20
,
5
)
;
term
_set
attr
(
14
)
;
getBlock
(
&
codeStr
,
menuBlock
);
strcat
(
menuBlock
,
","
);
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -1299,15 +1345,16 @@ static int incomingMapScanner(char *codeStr)
break
;
case
4
:
c
term
.
xpos
=
26
;
cterm
.
ypos
=
7
;
c
term
.
attr
=
15
;
term
_gotoxy
(
26
,
7
)
;
term
_set
attr
(
15
)
;
getBlock
(
&
codeStr
,
menuBlock
);
strcat
(
menuBlock
,
" "
);
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
5
:
cterm
.
xpos
=
66
;
cterm
.
ypos
=
5
;
cterm
.
attr
=
14
;
case
5
:
term_gotoxy
(
66
,
5
);
term_setattr
(
14
);
getBlock
(
&
codeStr
,
menuBlock
);
strcat
(
menuBlock
,
" "
);
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
...
...
@@ -1321,20 +1368,20 @@ static int incomingMapScanner(char *codeStr)
break
;
case
7
:
c
term
.
xpos
=
66
;
cterm
.
ypos
=
6
;
term
_gotoxy
(
66
,
6
)
;
getBlock
(
&
codeStr
,
menuBlock
);
yy
=
atoi
(
menuBlock
);
if
(
yy
>=
40
)
c
term
.
attr
=
12
;
term
_set
attr
(
12
)
;
else
c
term
.
attr
=
14
;
term
_set
attr
(
14
)
;
strcat
(
menuBlock
,
"% "
);
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
8
:
c
term
.
xpos
=
66
;
cterm
.
ypos
=
7
;
c
term
.
attr
=
14
;
term
_gotoxy
(
66
,
7
)
;
term
_set
attr
(
14
)
;
getBlock
(
&
codeStr
,
menuBlock
);
yy
=
atoi
(
menuBlock
);
...
...
@@ -1342,9 +1389,9 @@ static int incomingMapScanner(char *codeStr)
case
0
:
cterm_write
(
"Not Hungry"
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
1
:
cterm_write
(
"Bit Hungry"
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
2
:
cterm_write
(
"Hungry "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
3
:
c
term
.
attr
=
12
;
case
3
:
term
_set
attr
(
12
)
;
cterm_write
(
"HUNGRY! "
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
4
:
c
term
.
attr
=
12
+
128
;
case
4
:
term
_set
attr
(
12
+
128
)
;
cterm_write
(
"STARVING!!"
,
-
1
,
NULL
,
0
,
NULL
);
break
;
}
break
;
...
...
@@ -1354,13 +1401,13 @@ static int incomingMapScanner(char *codeStr)
codeStr
++
;
if
(
codeStr
[
0
]
==
'I'
)
{
codeStr
++
;
c
term
.
xpos
=
34
;
cterm
.
ypos
=
5
;
term
_gotoxy
(
34
,
5
)
;
if
(
codeStr
[
0
]
==
'0'
)
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
else
{
c
term
.
attr
=
12
;
term
_set
attr
(
12
)
;
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
}
...
...
@@ -1370,13 +1417,13 @@ static int incomingMapScanner(char *codeStr)
if
(
codeStr
[
0
]
==
'C'
)
{
codeStr
++
;
c
term
.
xpos
=
34
;
cterm
.
ypos
=
6
;
term
_gotoxy
(
34
,
6
)
;
if
(
codeStr
[
0
]
==
'0'
)
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
else
{
c
term
.
attr
=
12
;
term
_set
attr
(
12
)
;
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
}
...
...
@@ -1386,13 +1433,13 @@ static int incomingMapScanner(char *codeStr)
if
(
codeStr
[
0
]
==
'B'
)
{
codeStr
++
;
c
term
.
xpos
=
34
;
cterm
.
ypos
=
7
;
term
_gotoxy
(
34
,
7
)
;
if
(
codeStr
[
0
]
==
'0'
)
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
else
{
c
term
.
attr
=
12
;
term
_set
attr
(
12
)
;
cterm_write
(
""
,
-
1
,
NULL
,
0
,
NULL
);
codeStr
++
;
...
...
@@ -1400,10 +1447,10 @@ static int incomingMapScanner(char *codeStr)
getBlock
(
&
codeStr
,
menuBlock
);
yy
=
atoi
(
menuBlock
);
c
term
.
xpos
=
1
;
cterm
.
ypos
=
yy
+
1
;
term
_gotoxy
(
1
,
yy
+
1
)
;
getBlock
(
&
codeStr
,
menuBlock
);
c
term
.
attr
=
14
;
term
_set
attr
(
14
)
;
strcat
(
menuBlock
,
" is stationed nearby."
);
cterm_write
(
menuBlock
,
-
1
,
NULL
,
0
,
NULL
);
}
...
...
@@ -1415,32 +1462,32 @@ static int incomingMapScanner(char *codeStr)
codeStr
++
;
getBlock
(
&
codeStr
,
menuBlock
);
zz
=
atoi
(
menuBlock
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
10
;
term
_gotoxy
(
3
,
10
)
;
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
11
;
term
_gotoxy
(
3
,
11
)
;
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
10
;
term
_gotoxy
(
3
,
10
)
;
c
term
.
attr
=
11
;
term
_set
attr
(
11
)
;
switch
(
zz
)
{
case
2
:
cterm_write
(
"Crumbling walls of ancient cities scatter the plains, and smoke lazily"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
11
;
term
_gotoxy
(
3
,
11
)
;
cterm_write
(
"rises from the destructed relics of the past."
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
3
:
cterm_write
(
"Coldness creeps upon you like death in this vast range of empty desert."
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
11
;
term
_gotoxy
(
3
,
11
)
;
cterm_write
(
"Harsh winds rip sand against your body like tiny shards of glass."
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
4
:
cterm_write
(
"The black muck from the swamp slithers between your toes as you make your"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
11
;
term
_gotoxy
(
3
,
11
)
;
cterm_write
(
"way through the bubbling slime."
,
-
1
,
NULL
,
0
,
NULL
);
break
;
case
5
:
cterm_write
(
"High upon the scorched mountains, small blackening caves can be seen."
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
11
;
term
_gotoxy
(
3
,
11
)
;
cterm_write
(
"Possibly lurking within, horrible creatures wait for your trespassing."
,
-
1
,
NULL
,
0
,
NULL
);
break
;
...
...
@@ -1453,7 +1500,7 @@ static int incomingMapScanner(char *codeStr)
break
;
case
9
:
cterm_write
(
"From the pre-war years, an Airforce Base lies half buried from nuclear"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
11
;
term
_gotoxy
(
3
,
11
)
;
cterm_write
(
"ash and metallic scraps."
,
-
1
,
NULL
,
0
,
NULL
);
break
;
...
...
@@ -1461,7 +1508,7 @@ static int incomingMapScanner(char *codeStr)
break
;
case
11
:
cterm_write
(
"In an effortless HeXonium attempt to clean the wastelands, radiation dumps"
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
11
;
term
_gotoxy
(
3
,
11
)
;
cterm_write
(
"lay wretched with oozing radioactive substances forming."
,
-
1
,
NULL
,
0
,
NULL
);
break
;
...
...
@@ -1480,12 +1527,12 @@ static int incomingMapScanner(char *codeStr)
break
;
case
'P'
:
codeStr
++
;
c
term
.
xpos
=
3
;
cterm
.
ypos
=
10
;
term
_gotoxy
(
3
,
10
)
;
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
11
;
term
_gotoxy
(
3
,
11
)
;
cterm_write
(
" "
,
-
1
,
NULL
,
0
,
NULL
);
c
term
.
xpos
=
3
;
cterm
.
ypos
=
10
;
c
term
.
attr
=
11
;
term
_gotoxy
(
3
,
10
)
;
term
_set
attr
(
11
)
;
cterm_write
(
"20 foot pit!"
,
-
1
,
NULL
,
0
,
NULL
);
break
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment