player.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. /* =============================================================================
  2. * PROGRAM: ularn
  3. * FILENAME: player.h
  4. *
  5. * DESCRIPTION:
  6. * This module contains functions to maintain information about the player
  7. * and to process the effects of various actions.
  8. *
  9. * =============================================================================
  10. * EXPORTED VARIABLES
  11. *
  12. * char_class : The name of the player's selected class
  13. * class_num : The number to identify the character class
  14. * ramboflag : Is the character rambo?
  15. * sex : Character's gender
  16. * wizard : The wizard flag
  17. * cheat : Has the player cheated
  18. * char_picked : The character class letter picked
  19. * playerx : The player's current x coordiante
  20. * playery : The player's current y coordinate
  21. * lastpx : The player's previous x coordinate
  22. * lastpy : The player's previous y coordiante
  23. * initialtime : The time play started
  24. * gtime : The clock for the game
  25. * outstanding_taxes : The taxes owed from the score file
  26. * c : The character attributes array
  27. * cbak : The last displayed attributes array
  28. * iven : The inventory items
  29. * ivenarg : The inventory item args
  30. * class : The character class (level) strings
  31. * skill : Experience required for each level
  32. * potionknown : Array indicating potions discovered
  33. * spelknow : Array indicating spells learnt by the player
  34. * hitflag : Hit flags for player, used for move processing
  35. * hit2flag :
  36. * hit3flag :
  37. *
  38. * =============================================================================
  39. * EXPORTED FUNCTIONS
  40. *
  41. * identify_class : Identify the class from the class name
  42. * makeplayer : Make a new player
  43. * moveplayer : Move the player
  44. * player_has_item : Check if the player has a particular item
  45. * raiselevel : Raise experience level
  46. * loselevel : Lose an experience level
  47. * raiseexperience : Increase experience
  48. * loseexperience : Decrease experience
  49. * losehp : Lose hitpoints
  50. * losemhp : Lower max hitpoints
  51. * raisehp : Raise hitpoints
  52. * raisemhp : Increase max hitpoints
  53. * raisespells : Raise spell points
  54. * raisemspells : Raise max spell points
  55. * losespells : Lose spell points
  56. * losemspells : Decrease max spell points
  57. * positionplayer : Position the player on a level
  58. * recalc : Recalculate AC and WC
  59. * take : Take an item
  60. * drop_object : Drop an object
  61. * adjustivenarg : Adjust the ivenarg for an item the player is carrying
  62. * enchantarmour : Enchant armour being worn
  63. * enchweapon : Enchant item being wielded
  64. * pocketfull : Check if pockets are full
  65. * nearbymonst : Check if the player is near a monster
  66. * stealsomething : Steal an item from the player
  67. * emptyhanded : Check if the player is empty handed
  68. * creategem : Creat a gem by the player
  69. * adjustcvalues : Adjust attributes when dropping/losing an item
  70. * packweight : Get the weight of the player's inventory
  71. * adjust_ability : Adjust an ability score
  72. * regen : Regen player for passing of a turn
  73. * removecurse : Remove curses inflicted upon player
  74. * adjusttime : Adjust time base effects for the passage of time
  75. * write_player : Write the player data to the save file
  76. * read_player : Read the player data from the save file
  77. *
  78. * =============================================================================
  79. */
  80. #ifndef __PLAYER_H
  81. #define __PLAYER_H
  82. #include "potion.h"
  83. #include "scroll.h"
  84. #include "spell.h"
  85. #include "scores.h"
  86. #define INNATE_TELEPORT_LEVEL 10
  87. /*************** Defines for the character attibute array c[] ******/
  88. typedef enum
  89. {
  90. /* Player ability scores */
  91. STRENGTH,
  92. INTELLIGENCE,
  93. WISDOM,
  94. CONSTITUTION,
  95. DEXTERITY,
  96. CHARISMA,
  97. /* Hitpoints */
  98. HPMAX,
  99. HP,
  100. GOLD,
  101. EXPERIENCE,
  102. LEVEL,
  103. REGEN,
  104. WCLASS,
  105. AC,
  106. BANKACCOUNT,
  107. SPELLMAX,
  108. SPELLS,
  109. ENERGY,
  110. ECOUNTER,
  111. MOREDEFENSES,
  112. WEAR,
  113. PROTECTIONTIME,
  114. WIELD,
  115. AMULET,
  116. REGENCOUNTER,
  117. MOREDAM,
  118. DEXCOUNT,
  119. STRCOUNT,
  120. BLINDCOUNT,
  121. CAVELEVEL,
  122. CONFUSE,
  123. ALTPRO,
  124. HERO,
  125. CHARMCOUNT,
  126. INVISIBILITY,
  127. CANCELLATION,
  128. HASTESELF,
  129. EYEOFLARN,
  130. AGGRAVATE,
  131. GLOBE,
  132. TELEFLAG,
  133. SLAYING,
  134. NEGATESPIRIT,
  135. SCAREMONST,
  136. AWARENESS,
  137. HOLDMONST,
  138. TIMESTOP,
  139. HASTEMONST,
  140. CUBEofUNDEAD,
  141. GIANTSTR,
  142. FIRERESISTANCE,
  143. BESSMANN,
  144. NOTHEFT,
  145. HARDGAME,
  146. BYTESIN,
  147. UNUSED_55,
  148. UNUSED_56,
  149. UNUSED_57,
  150. UNISED_58,
  151. VORPAL,
  152. LANCEDEATH,
  153. SPIRITPRO,
  154. UNDEADPRO,
  155. SHIELD,
  156. STEALTH,
  157. /* Curses */
  158. ITCHING,
  159. LAUGHING,
  160. DRAINSTRENGTH,
  161. CLUMSINESS,
  162. INFEEBLEMENT,
  163. HALFDAM,
  164. /* More player flags */
  165. SEEINVISIBLE,
  166. FILLROOM,
  167. SPHCAST,
  168. WTW,
  169. STREXTRA,
  170. TMP, /* Temporary work area for total str */
  171. LIFEPROT, /* Number of life protections read */
  172. /* Item creation flags for unique items */
  173. ORB, /* Created orb of expanded awareness */
  174. ELVUP, /* Created elevator up */
  175. ELVDOWN, /* Created elevator down */
  176. HAND, /* Created hand of fear */
  177. CUBEUNDEAD, /* Created cube of undead control */
  178. DRAGSLAY, /* Created orb of dragon slaying */
  179. NEGATE, /* Created scarab of negate spirit */
  180. URN, /* Created golden urn */
  181. LAMP, /* Created brass lamp */
  182. TALISMAN, /* Created talisman of the sphere */
  183. WAND, /* Created wand of wonder */
  184. STAFF, /* Created staff of power */
  185. DEVICE, /* Created device of theft prevention*/
  186. SLASH, /* Created sword of slashing */
  187. ELVEN, /* Created elven chain */
  188. VORP, /* Created vorpal sword */
  189. SLAY, /* Created slayer */
  190. PAD, /* Created Dealer McDope's */
  191. LIFE_PRESERVER, /* Created amulet of life preservation */
  192. /* Misc */
  193. COKED, /* Flag indicating player is coked */
  194. TMP2, /* Storage for original int before Bessmann's hammer */
  195. UNUSED_98,
  196. UNUSED_99,
  197. ATTRIBUTE_COUNT
  198. } AttributeType;
  199. #define ABILITY_FIRST STRENGTH
  200. #define ABILITY_LAST CHARISMA
  201. #define ABILITY_COUNT (ABILITY_LAST - ABILITY_FIRST + 1)
  202. #define IVENSIZE 26 /* max size of inventory */
  203. /*
  204. * Exported variables
  205. */
  206. extern char char_class[20]; /* character class */
  207. extern int class_num; /* Number to identify the character class */
  208. extern char ramboflag;
  209. extern char sex; /* default is man, 0=woman */
  210. extern char wizard; /* the wizard mode flag */
  211. extern char cheat; /* 1 if the player has fudged save file */
  212. extern char char_picked; /* the character chosen */
  213. extern int playerx, playery; /* the room on the present level of the player*/
  214. extern int lastpx, lastpy; /* 0 --- MAXX-1 or 0 --- MAXY-1 */
  215. extern time_t initialtime; /* time playing began */
  216. extern long gtime; /* the clock for the game */
  217. extern long outstanding_taxes; /* present tax bill from score file */
  218. extern long c[ATTRIBUTE_COUNT]; /* Character description array */
  219. extern long cbak[ATTRIBUTE_COUNT]; /* Backup array for detecting changes */
  220. extern char iven[IVENSIZE]; /* inventory for player */
  221. extern short ivenarg[IVENSIZE]; /* inventory args for player */
  222. extern char *class[];
  223. extern long skill[];
  224. /*
  225. * Array of which potions are known to the player.
  226. * 0 = unknown
  227. * 1 = known
  228. */
  229. extern int potionknown[MAXPOTION];
  230. /*
  231. * Array of which scrolls are known to the player.
  232. * 0 = unknown
  233. * 1 = known
  234. */
  235. extern int scrollknown[MAXSCROLL];
  236. /*
  237. * Array of which spells are known to the player.
  238. * 0 = unknown
  239. * 1 = known
  240. */
  241. extern int spelknow[SPELL_COUNT];
  242. extern char hitflag;
  243. extern char hit2flag;
  244. extern char hit3flag;
  245. /* =============================================================================
  246. * FUNCTION: identify_class
  247. *
  248. * DESCRIPTION:
  249. * Identify the class selection character ('a' .. 'h') from the class anme
  250. * string.
  251. *
  252. * PARAMETERS:
  253. *
  254. * class_str : The class name to be identified
  255. *
  256. * RETURN VALUE:
  257. *
  258. * The class selection character.
  259. */
  260. char identify_class(char *class_str);
  261. /* =============================================================================
  262. * FUNCTION: makeplayer
  263. *
  264. * DESCRIPTION:
  265. * Function to create the player and the players attributes.
  266. * This is called at the beginning of a game and at no other time
  267. *
  268. * PARAMETERS:
  269. *
  270. * None.
  271. *
  272. * RETURN VALUE:
  273. *
  274. * None.
  275. */
  276. void makeplayer (void);
  277. /* =============================================================================
  278. * FUNCTION: moveplayer
  279. *
  280. * DESCRIPTION:
  281. * Function to move the player from one room to another.
  282. *
  283. * nomove is set to 1 to stop the next move (inadvertent monsters hitting
  284. * players when walking into walls) if player walks off screen or into wall
  285. *
  286. * PARAMETERS:
  287. *
  288. * dir : The direction to move in diroff array format
  289. *
  290. * RETURN VALUE:
  291. *
  292. * 0 if can't move in that direction or hit a monster or on an object
  293. * 1 otherwise
  294. */
  295. int moveplayer(int dir);
  296. /* =============================================================================
  297. * FUNCTION: player_has_item
  298. *
  299. * DESCRIPTION:
  300. * Check if the player is currently carrying Item.
  301. *
  302. * PARAMETERS:
  303. *
  304. * RETURN VALUE:
  305. *
  306. * 1 if the player has the item, 0 otherwise.
  307. */
  308. int player_has_item(int Item);
  309. /* =============================================================================
  310. * FUNCTION: raiselevel
  311. *
  312. * DESCRIPTION:
  313. * Function to raise the player one level.
  314. * Uses the skill[] array to find level boundarys
  315. * Uses c[EXPERIENCE], c[LEVEL]
  316. *
  317. * PARAMETERS:
  318. *
  319. * None.
  320. *
  321. * RETURN VALUE:
  322. *
  323. * None.
  324. */
  325. void raiselevel(void);
  326. /* =============================================================================
  327. * FUNCTION: loselevel
  328. *
  329. * DESCRIPTION:
  330. * Function to lower the players character level by one
  331. *
  332. * PARAMETERS:
  333. *
  334. * None.
  335. *
  336. * RETURN VALUE:
  337. *
  338. * None.
  339. */
  340. void loselevel(void);
  341. /* =============================================================================
  342. * FUNCTION: raiseexperience
  343. *
  344. * DESCRIPTION:
  345. * Function to increase experience points
  346. *
  347. * PARAMETERS:
  348. *
  349. * x : The amount of experience earned.
  350. *
  351. * RETURN VALUE:
  352. *
  353. * None.
  354. */
  355. void raiseexperience (long x);
  356. /* =============================================================================
  357. * FUNCTION: loseexperience
  358. *
  359. * DESCRIPTION:
  360. * Function to lose experience points
  361. *
  362. * PARAMETERS:
  363. *
  364. * x : The amount of experience lost
  365. *
  366. * RETURN VALUE:
  367. *
  368. * None.
  369. */
  370. void loseexperience (long x);
  371. /* =============================================================================
  372. * FUNCTION: losehp
  373. *
  374. * DESCRIPTION:
  375. * Function to remove hit points from the player
  376. * warning -- will kill player if hp goes to zero
  377. *
  378. * PARAMETERS:
  379. *
  380. * Reason : The reason for the HP loss.
  381. *
  382. * x : The number of hitpoints to lose.
  383. *
  384. * RETURN VALUE:
  385. *
  386. * None.
  387. */
  388. void losehp (DiedReasonType Reason, int x);
  389. /* =============================================================================
  390. * FUNCTION: losemhp
  391. *
  392. * DESCRIPTION:
  393. * Reduce max hitpoints (won't kill player)
  394. *
  395. * PARAMETERS:
  396. *
  397. * x : The number of max HP to lose.
  398. *
  399. * RETURN VALUE:
  400. *
  401. * None.
  402. */
  403. void losemhp (int x);
  404. /* =============================================================================
  405. * FUNCTION: raisehp
  406. *
  407. * DESCRIPTION:
  408. * Function to gain hitpoints.
  409. * This will never make HP exceed Max HP.
  410. *
  411. * PARAMETERS:
  412. *
  413. * x : The number of HP to gain.
  414. *
  415. * RETURN VALUE:
  416. *
  417. * None.
  418. */
  419. void raisehp (int x);
  420. /* =============================================================================
  421. * FUNCTION: raisemhp
  422. *
  423. * DESCRIPTION:
  424. * Function to increase Max HP.
  425. *
  426. * PARAMETERS:
  427. *
  428. * x : The amount to increaese Max HP.
  429. *
  430. * RETURN VALUE:
  431. *
  432. * None.
  433. */
  434. void raisemhp (int x);
  435. /* =============================================================================
  436. * FUNCTION: raisespells
  437. *
  438. * DESCRIPTION:
  439. * Function to gain spell points.
  440. * The will never incerase spell points beyon Max spell points.
  441. *
  442. * PARAMETERS:
  443. *
  444. * x : The number of spell points to gain.
  445. *
  446. * RETURN VALUE:
  447. *
  448. * None.
  449. */
  450. void raisespells (int x);
  451. /* =============================================================================
  452. * FUNCTION: raisemspells
  453. *
  454. * DESCRIPTION:
  455. * Function to increase max spell points.
  456. *
  457. * PARAMETERS:
  458. *
  459. * x : The amount to increase max spell points.
  460. *
  461. * RETURN VALUE:
  462. *
  463. * None.
  464. */
  465. void raisemspells (int x);
  466. /* =============================================================================
  467. * FUNCTION: losespells
  468. *
  469. * DESCRIPTION:
  470. * Function to decrease the number of spell points.
  471. *
  472. * PARAMETERS:
  473. *
  474. * x : The number of spell points to lose.
  475. *
  476. * RETURN VALUE:
  477. *
  478. * None.
  479. */
  480. void losespells (int x);
  481. /* =============================================================================
  482. * FUNCTION: losemspells
  483. *
  484. * DESCRIPTION:
  485. * Function to decrease the maximum number of spell points.
  486. *
  487. * PARAMETERS:
  488. *
  489. * x : The amount to reduce the max spell points.
  490. *
  491. * RETURN VALUE:
  492. *
  493. * None.
  494. */
  495. void losemspells (int x);
  496. /* =============================================================================
  497. * FUNCTION: positionplayer
  498. *
  499. * DESCRIPTION:
  500. * Function to be sure player is not in a wall.
  501. *
  502. * PARAMETERS:
  503. *
  504. * None.
  505. *
  506. * RETURN VALUE:
  507. *
  508. * None.
  509. */
  510. void positionplayer (void);
  511. /* =============================================================================
  512. * FUNCTION: recalc
  513. *
  514. * DESCRIPTION:
  515. * Function to recalculate the armor class and wield class of the player.
  516. * Also sets the LANCEDEATH attribute according to the currently wielded
  517. * item.
  518. *
  519. * PARAMETERS:
  520. *
  521. * None.
  522. *
  523. * RETURN VALUE:
  524. *
  525. * None.
  526. */
  527. void recalc (void);
  528. /* =============================================================================
  529. * FUNCTION: take
  530. *
  531. * DESCRIPTION:
  532. * Function to put something in the players inventory
  533. *
  534. * PARAMETERS:
  535. *
  536. * itm : The item to put iin theplayer's inventory.
  537. *
  538. * arg : THe item's arg.
  539. *
  540. * RETURN VALUE:
  541. *
  542. * 0 if success, 1 if a failure
  543. */
  544. int take (int itm, int arg);
  545. /* =============================================================================
  546. * FUNCTION: drop_object
  547. *
  548. * DESCRIPTION:
  549. * Function to drop an object
  550. *
  551. * PARAMETERS:
  552. *
  553. * k : The index into iven list for the object to drop
  554. *
  555. * RETURN VALUE:
  556. *
  557. * 1 if something there already else 0
  558. */
  559. int drop_object (int k);
  560. /* =============================================================================
  561. * FUNCTION: adjustivenarg
  562. *
  563. * DESCRIPTION:
  564. * Function to adjust the inventory argument by the amount spicified, updating
  565. * characters attributes as required.
  566. *
  567. * PARAMETERS:
  568. *
  569. * Idx : The item index of the item being adjusted
  570. *
  571. * Amount : The amount to change the attruibute
  572. *
  573. * RETURN VALUE:
  574. *
  575. * None.
  576. */
  577. void adjustivenarg(int Idx, int Amount);
  578. /* =============================================================================
  579. * FUNCTION: enchantarmor
  580. *
  581. * DESCRIPTION:
  582. * Function to enchant armor player is currently wearing.
  583. *
  584. * PARAMETERS:
  585. *
  586. * how : The cause of the enchantment (altar or scroll)
  587. *
  588. * RETURN VALUE:
  589. *
  590. * None.
  591. */
  592. void enchantarmor (int how);
  593. /* =============================================================================
  594. * FUNCTION: enchweapon
  595. *
  596. * DESCRIPTION:
  597. * Function to enchant a weapon presently being wielded
  598. *
  599. * PARAMETERS:
  600. *
  601. * how : The cause of the enchantment (altar or scroll)
  602. * RETURN VALUE:
  603. *
  604. * None.
  605. */
  606. void enchweapon (int how);
  607. /* =============================================================================
  608. * FUNCTION: pocketfull
  609. *
  610. * DESCRIPTION:
  611. * Function to tell if player can carry one more thing
  612. *
  613. * PARAMETERS:
  614. *
  615. * None.
  616. *
  617. * RETURN VALUE:
  618. *
  619. * 1 if pockets are full, else 0
  620. */
  621. int pocketfull (void);
  622. /* =============================================================================
  623. * FUNCTION: nearbymonst
  624. *
  625. * DESCRIPTION:
  626. * Function to check if there is a monster next to the player.
  627. *
  628. * PARAMETERS:
  629. *
  630. * None.
  631. *
  632. * RETURN VALUE:
  633. *
  634. * 1 if a monster is next to the player else returns 0
  635. */
  636. int nearbymonst (void);
  637. /* =============================================================================
  638. * FUNCTION: stealsomething
  639. *
  640. * DESCRIPTION:
  641. * Function to steal an item from the players pockets
  642. *
  643. * PARAMETERS:
  644. *
  645. * x : The x coordinate of the monster stealing the item
  646. *
  647. * y : The y coordinate of the monster stealing the item
  648. *
  649. * RETURN VALUE:
  650. *
  651. * 1 if steals something else returns 0
  652. */
  653. int stealsomething (int x, int y);
  654. /* =============================================================================
  655. * FUNCTION: emptyhanded
  656. *
  657. * DESCRIPTION:
  658. * Function to check if the player is carrying nothing.
  659. *
  660. * PARAMETERS:
  661. *
  662. * None.
  663. *
  664. * RETURN VALUE:
  665. *
  666. * 1 if player carrys nothing else return 0
  667. */
  668. int emptyhanded (void);
  669. /* =============================================================================
  670. * FUNCTION: creategem
  671. *
  672. * DESCRIPTION:
  673. * Function to create a gem on a square near the player
  674. *
  675. * PARAMETERS:
  676. *
  677. * None.
  678. *
  679. * RETURN VALUE:
  680. *
  681. * None.
  682. */
  683. void creategem (void);
  684. /* =============================================================================
  685. * FUNCTION: adjustcvalues
  686. *
  687. * DESCRIPTION:
  688. * Function to change character attributes as needed when dropping an object
  689. * that affects these attributes.
  690. *
  691. * PARAMETERS:
  692. *
  693. * itm : The item being dropped
  694. *
  695. * arg : The item arg.
  696. *
  697. * RETURN VALUE:
  698. *
  699. * None.
  700. */
  701. void adjustcvalues (int itm, int arg);
  702. /* =============================================================================
  703. * FUNCTION: packweight
  704. *
  705. * DESCRIPTION:
  706. * Function to calculate the pack weight of the player
  707. *
  708. * PARAMETERS:
  709. *
  710. * None.
  711. *
  712. * RETURN VALUE:
  713. *
  714. * the number of pounds the player is carrying
  715. */
  716. int packweight (void);
  717. /* =============================================================================
  718. * FUNCTION: adjust_ability
  719. *
  720. * DESCRIPTION:
  721. * Adjust an ability socre of the player, sticky ending to 3 if the adjustment
  722. * would reduce the score below 3.
  723. *
  724. * PARAMETERS:
  725. *
  726. * ability : The ability to adjust.
  727. *
  728. * amount : The amount to change the abiity
  729. *
  730. * RETURN VALUE:
  731. *
  732. * None.
  733. */
  734. void adjust_ability(AttributeType ability, int amount);
  735. /* =============================================================================
  736. * FUNCTION: regen
  737. *
  738. * DESCRIPTION:
  739. * Function to regenerate player HP and spells, and to process time base
  740. * effects.
  741. *
  742. * PARAMETERS:
  743. *
  744. * None.
  745. *
  746. * RETURN VALUE:
  747. *
  748. * None.
  749. */
  750. void regen(void);
  751. /* =============================================================================
  752. * FUNCTION: removecurse
  753. *
  754. * DESCRIPTION:
  755. * Cure the player of curses.
  756. *
  757. * PARAMETERS:
  758. *
  759. * None.
  760. *
  761. * RETURN VALUE:
  762. *
  763. * None.
  764. */
  765. void removecurse (void);
  766. /* =============================================================================
  767. * FUNCTION: adjusttime
  768. *
  769. * DESCRIPTION:
  770. * Function to adjust time when time warping and taking courses in school
  771. *
  772. * PARAMETERS:
  773. *
  774. * tim : The amount of time adjustment.
  775. *
  776. * RETURN VALUE:
  777. *
  778. * None.
  779. */
  780. void adjusttime(long tim);
  781. /* =============================================================================
  782. * FUNCTION: write_player
  783. *
  784. * DESCRIPTION:
  785. * Function to write the player data to a file
  786. *
  787. * PARAMETERS:
  788. *
  789. * fp : A pointer to the save file being written.
  790. *
  791. * RETURN VALUE:
  792. *
  793. * None.
  794. */
  795. void write_player(FILE *fp);
  796. /* =============================================================================
  797. * FUNCTION: read_player
  798. *
  799. * DESCRIPTION:
  800. * Function to read the player data from a file
  801. *
  802. * PARAMETERS:
  803. *
  804. * fp : A pointer to the save file being read.
  805. *
  806. * RETURN VALUE:
  807. *
  808. * None.
  809. */
  810. void read_player(FILE *fp);
  811. #endif