chiark / gitweb /
Proper Subversion configuration. master
authormdw <mdw>
Mon, 27 Sep 2004 08:17:49 +0000 (08:17 +0000)
committermdw <mdw>
Mon, 27 Sep 2004 08:17:49 +0000 (08:17 +0000)
alg_main.c
elite.h
missions.c
readme.txt
space.c
swat.c
threed.c

index 7eccdf50dd978223a9902a0a6089e28955015f0c..996dcd45d9c4b98016ea7591c4db1a2854c65881 100644 (file)
@@ -63,7 +63,9 @@ int rolling;
 int climbing;
 int game_paused;
 int have_joystick;
+#ifdef HACKING
 int identify;
+#endif
 int scanner_zoom = 1;
 int remap_keys;
 
@@ -966,8 +968,10 @@ void handle_flight_keys (void)
        if (kbd_n_pressed)
                n_pressed();
 
+#ifdef HACKING
        if (kbd_i_pressed == 1)
          identify = !identify;
+#endif
        if (kbd_zoom_pressed == 1)
          scanner_zoom ^= 3;
  
@@ -1200,7 +1204,9 @@ void run_first_intro_screen (void)
        snd_play_midi (SND_ELITE_THEME, TRUE);
 
        initialise_intro1();
+#ifdef HACKING
        identify = 0;
+#endif
 
        for (;;)
        {
@@ -1233,8 +1239,10 @@ void run_second_intro_screen (void)
        current_screen = SCR_INTRO_TWO;
        
        snd_play_midi (SND_BLUE_DANUBE, TRUE);
-               
+
+#ifdef HACKING
        identify = 0;
+#endif
        initialise_intro2();
 
        flight_speed = 3;
@@ -1275,7 +1283,9 @@ void run_game_over_screen()
        flight_speed = 6;
        flight_roll = 0;
        flight_climb = 0;
+#ifdef HACKING
        identify = 0;
+#endif
        clear_universe();
 
        set_init_matrix (rotmat);
diff --git a/elite.h b/elite.h
index 07cdc61411fc9ae33cdbfb0602194d2bd0e5e803..e8febfc998aaf8ada730ed1e8e94694d1dd634a1 100644 (file)
--- a/elite.h
+++ b/elite.h
@@ -168,7 +168,9 @@ extern int mcount;
 extern int detonate_bomb;
 extern int witchspace;
 extern int auto_pilot;
+#ifdef HACKING
 extern int identify;
+#endif
 extern int remap_keys;
 extern int scanner_zoom;
 
index 073cd40b79613dcf43cf086626d90a0eb6c54641..e1fba9bf1de48d0504165917d4f079395ec7b4d5 100644 (file)
@@ -202,7 +202,9 @@ void constrictor_mission_brief (void)
        flight_roll = 0;
        flight_climb = 0;
        flight_speed = 0;
+#ifdef HACKING
        identify = 0;
+#endif
 
        do
        {
index 0a210957250c1c8d9f470e974e4605f281d3a4ae..e610500066caa44452097a34041dea599abea551 100644 (file)
-Elite - The New Kind   Release 1.0\r
---------------------   -----------\r
-\r
-Revision date: 22 July 2001\r
-\r
-This is release 1.0 of Elite - The New Kind.\r
-For changes since previous releases see below.\r
-\r
-newkindb.zip contains a compiled version of the code designed to run under MS Windows 95/98/NT using the Allegro graphics library and DirectX.\r
-\r
-newkind.zip contains source code for Elite - The New Kind.\r
-If you want to recompile the game then please note the following...\r
-a. The .wav and .dat files are not included in the source distribution to keep the size down, they can be found in newkindb.zip.\r
-b. You need the WIP version of Allegro to compile the code.\r
-\r
-The latest versions of the source and executable can always be found on the New Kind website...\r
-http://www.newkind.co.uk\r
-\r
-To run the supplied executable you will need DirectX installed.  Windows 98/ME/2000 and NT 4 (with latest service pack) come with this.\r
-If you are using Windows 95 and you haven't already installed DirectX you will need to do so.\r
-The DirectX runtime can be downloaded from the Microsoft website. (www.microsoft.com/directx).\r
-\r
-Two pieces of music are included in Elite - The New Kind.  The Elite Theme and The Blue Danube.\r
-The Elite Theme was composed by Aidan Bell and the Blue Danube was composed by Strauss.\r
-I spent a long time hunting for the best MIDI versions of these pieces I could find.\r
-To appreciate them properly you will need a decent Soft Synth Midi driver installed and set as you prefered Midi and Sound device.\r
-\r
-Keys you can use...\r
-Press Y or N on the intro screen.\r
-Press Space on the ship parade screen.\r
-\r
-F1  - Launch when docked, Front View when in flight.\r
-F2  - Rear View\r
-F3  - Left View\r
-F4  - Right View when in flight.\r
-       When docked, Buy Equipment for ship.\r
-      Use up and down arrow keys to select item, return/enter key to buy.\r
-F5  - Display Galactic Chart.\r
-F6  - Short Range Chart.\r
-F7  - Show information on selected planet.\r
-F8  - Buy and sell items on the stock market.\r
-      Use up and down arrow keys to select item, right arrow key to buy, left arrow key to sell.\r
-F9  - Commander information.\r
-F10 - Inventory.\r
-F11 - Options screen (Save Game, Load Game, Game Settings, Quit).\r
-      Use up and down arrows keys to select option, return/enter to select.\r
-\r
- A - Fire.\r
- S - Dive.\r
- X - Climb.\r
- < - Roll Left\r
- > - Roll Right\r
- / - Slow Down\r
-Space - Speed up.\r
-\r
- C  - Activate docking computer, if fitted.\r
- D  - De-activate docking computer if switched on.\r
- E  - Active ECM, if fitted.\r
- H  - Hyperspace.\r
- J  - Warp Jump.\r
- M  - Fire missile.\r
- T  - Target a missile.\r
- U  - Un-target missile.\r
-TAB - Detonate energy bomb, if fitted.\r
-CTRL+H - Galactic Hyperspace, if fitted.\r
-ESC - Launch escape capsule, if fitted.\r
- P  - Pause game.\r
- R  - Resume game when paused.\r
-\r
-On The Chart Screens\r
---------------------\r
-D - Select a planet and show distance to it.\r
-F - Find planet by name.\r
-O - Return cursor to current planet.\r
-Cursor Keys - Move cross hairs around.\r
-\r
-\r
-On The Game Settings Screen\r
----------------------------\r
-From the Options Screen (F11) you can enter the Game Settings Screen. From here you can change\r
-a number of settings that control how the game looks and plays.  Use the cursor keys to select an option\r
-and the Enter/Return key to change it. The options can be saved as default for future games by pressing Enter\r
-while on the Save Settings option (NB this is not necessary if you want to change the settings just for\r
-the current game).  Game settings are held in the newkind.cfg file which should be in the same directory\r
-as the newkind.exe file.\r
-\r
-\r
-\r
-Release 1.0 - Changes since Beta 3.0\r
-====================================\r
-\r
-- Rocks, alloys and boulders no longer stop you from engaging the jump drive.\r
-\r
-- Stopped tactics routine from being called while on the intro screens.\r
-\r
-- Ramming ships was causing little damage to player's ship.  Now fixed.\r
-\r
-- Switching views while in space now switches stars around.\r
-\r
-- Moved all Allegro specific graphic functions into alg_gfx.c\r
-\r
-- Moved keyboard handling routines into keyboard.c\r
-\r
-- Moved file handling routines out of alg_main.c into file.c\r
-\r
-- Added screen to allow player to set the game options from within the game.\r
-  This means the player no longer has to hack newkind.cfg directly.\r
-\r
-- Tidied graphics routines and removed all references to HDC.\r
-\r
-- Fixed movement of crosshairs on chart screens so that they are clipped properly.\r
-\r
-- Added explosion, cargo cannisters and alloys to the game over screen.\r
-\r
-- Added escape capsule sequence.\r
-\r
-- Added option for instant dock vs. auto-pilot docking.\r
-\r
-- Fixed bug that allowed an enemy craft to launch multiple escape capsules.\r
-\r
-- Fixed asteroids so that they move slower and don't try to evade attack.\r
-\r
-- Added rock hermits.\r
-\r
-- Tweaked the tactics routine again.\r
-\r
-- Added limited joystick support (digital only at the moment).\r
-\r
-- Added beep sound when missile target is locked.\r
-\r
-- Added low pitch beep sound when missile is unarmed.\r
-\r
-- Added Energy Low message when enegry levels reach critical.\r
-\r
-\r
-\r
-Beta 3.0 - Changes since Beta 2.1\r
-=================================\r
-\r
-- Fixed bug that allowed lasers to fire too rapidly.\r
-\r
-- The console was not being updated (i.e no of missiles) after a saved commander was loaded.  Now fixed.\r
-\r
-- Added planet auto-select on chart screens ala NES.\r
-\r
-- Asteroid mining implemented.\r
-\r
-- Exploding ships now release alloys.\r
-\r
-- Fixed bug that caused enemy ships to only fire when at close range.\r
-\r
-- Thargoids can now appear.\r
-\r
-- Witchspace ambush added.\r
-\r
-- Anacondas now release worms and sidewinders when attacked.\r
-\r
-- Attacked ships can now release escape capsules.\r
-\r
-- Objects other than cargo cannisters can now be scooped.\r
-\r
-- Corrected condition indicator code.  Was previously showing yellow even after danger had passed.\r
-\r
-- Added ability to pause game (P key pauses, R resumes).\r
-\r
-- The Cougar (a cloaked ship) can now appear.\r
-\r
-- The second mission is now playable.\r
-\r
-- Fixed bug that allowed enemy ships to fire from bizare angles.\r
-\r
-- Rewrote tactics routines. New code now based on NES Elite.\r
-\r
-- Docking computers now use full auto-pilot rather than just instant dock.\r
-\r
-- Space station now launches shuttles and transporters bound for the planet.\r
-\r
-\r
-\r
-Beta 2.1 - Changes since Beta 2.0\r
-=================================\r
-\r
-- Added code to set legal status to clean and fuel to maximum after using an escape capsule.\r
-\r
-- Fixed enemy missile targeting so that other ships don't blow themselves up.\r
-\r
-- Fixed speed of enemy ships which were moving too slowly in previous versions.\r
-\r
-- Added game speed control option to newkind.cfg.\r
-\r
-\r
-Beta 2.0 - Changes since Beta 1.1\r
-=================================\r
-\r
-- Fixed bug in enemy tactics which caused ships to run away.\r
-\r
-- Set the max speed of player's ship to 0.30LM.\r
-\r
-- Added code to display version number on options screen.\r
-\r
-- Corrected spelling of "Feudal".\r
-\r
-- Enabled docking computers (instant dock for the moment).\r
-\r
-- Added hyperspace sound.\r
-\r
-- Changed code to display number of credits instead of bounty.\r
-\r
-- Set hyperspace count down to 15.\r
-\r
-- Added Suns, cabin temperature and fuel scooping.\r
-\r
-- Added left and right views when in flight.\r
-\r
-- Enabled use of Energy Bomb, activated with TAB key.\r
-\r
-- Changed scanner slightly, added code to display objects in different colours.\r
-\r
-- Fixed warping of stars in rear view.\r
-\r
-- Enabled Escape Capsule, use ESC key to abandon ship.\r
-\r
-- Enabled Galactic Hyperspace.\r
-\r
-- Added use of 'O' key on chart screens.\r
-\r
-- Added ability to find planets by name.\r
-\r
-- Added Windows icon created by Marcus Buchanan.\r
-\r
-- Added code by Thomas Harte to anti-alias lines and improve hidden surface removal.\r
-\r
-- Added option to newkind.cfg to enable anti-alias code.\r
-\r
-- Added the first secret mission, hunt the Constrictor!\r
-\r
-- Fixed equipment buying so that refund is given on existing lasers.\r
-\r
-- Changed colour of fuel limit circle from white to green.\r
-\r
-- Put some colour on the Local Chart screen.\r
-\r
-- Changed look of ship lollipops on the scanner to look more like the original.\r
-\r
-- Changed incoming laser sounds, one for hitting shields and one for hitting the hull.\r
-\r
-- Fixed asteroids so that they travel in straight lines.\r
-\r
-- Changed creation of ships so that the appear at more random locations.\r
-\r
-- Removed the Constrictor and the Cougar from the ship parade intro.\r
-\r
-\r
-\r
-Beta 1.1 - Changes since Beta 1.0\r
-=================================\r
-\r
-- Fixed bug in load and save routine which caused the player to aways return to Lave.\r
-\r
-- Fixed bug in equipment buying screen.  Buying military lasers for the side or rear view\r
-  would cause mining lasers to be fitted instead.\r
-\r
-- Renamed files to be all lowercase.  This should ease ports to other OSes.\r
-\r
-- Removed #include of windows only allegro files from alg_main.c\r
-\r
-- Added #ifdef around use of GFX_DIRECTX in alg_main.c to allow compilation on non Windows OSes.\r
-\r
-\r
-\r
-Work in progress\r
-================\r
-\r
-The following features have not yet been implemented but are being currently worked on.\r
-\r
-- C64 Elite style scoring.\r
-\r
-- Trumbles (from C64/NES Elite).\r
-\r
-- View of docking bay after docking.\r
-\r
-- Loading of different consoles not yet fully implemented.\r
-\r
-- Enhance joystick support, i.e. use of more buttons and analogue control.\r
-\r
-\r
-Known Problems\r
-==============\r
-\r
-- Bits of hidden surfaces on ships sometimes show through.\r
-\r
-- Buying more than 255gs of Gold/Platinum doesn't work.\r
-  It didn't in the original Elite either.  Broken as designed.\r
-\r
-\r
-Have fun!\r
-\r
-Christian Pinder.\r
-<christian@newkind.co.uk>\r
-http://www.newkind.co.uk\r
+Elite - The New Kind   Release 1.0
+--------------------   -----------
+
+Revision date: 22 July 2001
+
+This is release 1.0 of Elite - The New Kind.
+For changes since previous releases see below.
+
+newkindb.zip contains a compiled version of the code designed to run under MS Windows 95/98/NT using the Allegro graphics library and DirectX.
+
+newkind.zip contains source code for Elite - The New Kind.
+If you want to recompile the game then please note the following...
+a. The .wav and .dat files are not included in the source distribution to keep the size down, they can be found in newkindb.zip.
+b. You need the WIP version of Allegro to compile the code.
+
+The latest versions of the source and executable can always be found on the New Kind website...
+http://www.newkind.co.uk
+
+To run the supplied executable you will need DirectX installed.  Windows 98/ME/2000 and NT 4 (with latest service pack) come with this.
+If you are using Windows 95 and you haven't already installed DirectX you will need to do so.
+The DirectX runtime can be downloaded from the Microsoft website. (www.microsoft.com/directx).
+
+Two pieces of music are included in Elite - The New Kind.  The Elite Theme and The Blue Danube.
+The Elite Theme was composed by Aidan Bell and the Blue Danube was composed by Strauss.
+I spent a long time hunting for the best MIDI versions of these pieces I could find.
+To appreciate them properly you will need a decent Soft Synth Midi driver installed and set as you prefered Midi and Sound device.
+
+Keys you can use...
+Press Y or N on the intro screen.
+Press Space on the ship parade screen.
+
+F1  - Launch when docked, Front View when in flight.
+F2  - Rear View
+F3  - Left View
+F4  - Right View when in flight.
+       When docked, Buy Equipment for ship.
+      Use up and down arrow keys to select item, return/enter key to buy.
+F5  - Display Galactic Chart.
+F6  - Short Range Chart.
+F7  - Show information on selected planet.
+F8  - Buy and sell items on the stock market.
+      Use up and down arrow keys to select item, right arrow key to buy, left arrow key to sell.
+F9  - Commander information.
+F10 - Inventory.
+F11 - Options screen (Save Game, Load Game, Game Settings, Quit).
+      Use up and down arrows keys to select option, return/enter to select.
+
+ A - Fire.
+ S - Dive.
+ X - Climb.
+ < - Roll Left
+ > - Roll Right
+ / - Slow Down
+Space - Speed up.
+
+ C  - Activate docking computer, if fitted.
+ D  - De-activate docking computer if switched on.
+ E  - Active ECM, if fitted.
+ H  - Hyperspace.
+ J  - Warp Jump.
+ M  - Fire missile.
+ T  - Target a missile.
+ U  - Un-target missile.
+TAB - Detonate energy bomb, if fitted.
+CTRL+H - Galactic Hyperspace, if fitted.
+ESC - Launch escape capsule, if fitted.
+ P  - Pause game.
+ R  - Resume game when paused.
+
+On The Chart Screens
+--------------------
+D - Select a planet and show distance to it.
+F - Find planet by name.
+O - Return cursor to current planet.
+Cursor Keys - Move cross hairs around.
+
+
+On The Game Settings Screen
+---------------------------
+From the Options Screen (F11) you can enter the Game Settings Screen. From here you can change
+a number of settings that control how the game looks and plays.  Use the cursor keys to select an option
+and the Enter/Return key to change it. The options can be saved as default for future games by pressing Enter
+while on the Save Settings option (NB this is not necessary if you want to change the settings just for
+the current game).  Game settings are held in the newkind.cfg file which should be in the same directory
+as the newkind.exe file.
+
+
+
+Release 1.0 - Changes since Beta 3.0
+====================================
+
+- Rocks, alloys and boulders no longer stop you from engaging the jump drive.
+
+- Stopped tactics routine from being called while on the intro screens.
+
+- Ramming ships was causing little damage to player's ship.  Now fixed.
+
+- Switching views while in space now switches stars around.
+
+- Moved all Allegro specific graphic functions into alg_gfx.c
+
+- Moved keyboard handling routines into keyboard.c
+
+- Moved file handling routines out of alg_main.c into file.c
+
+- Added screen to allow player to set the game options from within the game.
+  This means the player no longer has to hack newkind.cfg directly.
+
+- Tidied graphics routines and removed all references to HDC.
+
+- Fixed movement of crosshairs on chart screens so that they are clipped properly.
+
+- Added explosion, cargo cannisters and alloys to the game over screen.
+
+- Added escape capsule sequence.
+
+- Added option for instant dock vs. auto-pilot docking.
+
+- Fixed bug that allowed an enemy craft to launch multiple escape capsules.
+
+- Fixed asteroids so that they move slower and don't try to evade attack.
+
+- Added rock hermits.
+
+- Tweaked the tactics routine again.
+
+- Added limited joystick support (digital only at the moment).
+
+- Added beep sound when missile target is locked.
+
+- Added low pitch beep sound when missile is unarmed.
+
+- Added Energy Low message when enegry levels reach critical.
+
+
+
+Beta 3.0 - Changes since Beta 2.1
+=================================
+
+- Fixed bug that allowed lasers to fire too rapidly.
+
+- The console was not being updated (i.e no of missiles) after a saved commander was loaded.  Now fixed.
+
+- Added planet auto-select on chart screens ala NES.
+
+- Asteroid mining implemented.
+
+- Exploding ships now release alloys.
+
+- Fixed bug that caused enemy ships to only fire when at close range.
+
+- Thargoids can now appear.
+
+- Witchspace ambush added.
+
+- Anacondas now release worms and sidewinders when attacked.
+
+- Attacked ships can now release escape capsules.
+
+- Objects other than cargo cannisters can now be scooped.
+
+- Corrected condition indicator code.  Was previously showing yellow even after danger had passed.
+
+- Added ability to pause game (P key pauses, R resumes).
+
+- The Cougar (a cloaked ship) can now appear.
+
+- The second mission is now playable.
+
+- Fixed bug that allowed enemy ships to fire from bizare angles.
+
+- Rewrote tactics routines. New code now based on NES Elite.
+
+- Docking computers now use full auto-pilot rather than just instant dock.
+
+- Space station now launches shuttles and transporters bound for the planet.
+
+
+
+Beta 2.1 - Changes since Beta 2.0
+=================================
+
+- Added code to set legal status to clean and fuel to maximum after using an escape capsule.
+
+- Fixed enemy missile targeting so that other ships don't blow themselves up.
+
+- Fixed speed of enemy ships which were moving too slowly in previous versions.
+
+- Added game speed control option to newkind.cfg.
+
+
+Beta 2.0 - Changes since Beta 1.1
+=================================
+
+- Fixed bug in enemy tactics which caused ships to run away.
+
+- Set the max speed of player's ship to 0.30LM.
+
+- Added code to display version number on options screen.
+
+- Corrected spelling of "Feudal".
+
+- Enabled docking computers (instant dock for the moment).
+
+- Added hyperspace sound.
+
+- Changed code to display number of credits instead of bounty.
+
+- Set hyperspace count down to 15.
+
+- Added Suns, cabin temperature and fuel scooping.
+
+- Added left and right views when in flight.
+
+- Enabled use of Energy Bomb, activated with TAB key.
+
+- Changed scanner slightly, added code to display objects in different colours.
+
+- Fixed warping of stars in rear view.
+
+- Enabled Escape Capsule, use ESC key to abandon ship.
+
+- Enabled Galactic Hyperspace.
+
+- Added use of 'O' key on chart screens.
+
+- Added ability to find planets by name.
+
+- Added Windows icon created by Marcus Buchanan.
+
+- Added code by Thomas Harte to anti-alias lines and improve hidden surface removal.
+
+- Added option to newkind.cfg to enable anti-alias code.
+
+- Added the first secret mission, hunt the Constrictor!
+
+- Fixed equipment buying so that refund is given on existing lasers.
+
+- Changed colour of fuel limit circle from white to green.
+
+- Put some colour on the Local Chart screen.
+
+- Changed look of ship lollipops on the scanner to look more like the original.
+
+- Changed incoming laser sounds, one for hitting shields and one for hitting the hull.
+
+- Fixed asteroids so that they travel in straight lines.
+
+- Changed creation of ships so that the appear at more random locations.
+
+- Removed the Constrictor and the Cougar from the ship parade intro.
+
+
+
+Beta 1.1 - Changes since Beta 1.0
+=================================
+
+- Fixed bug in load and save routine which caused the player to aways return to Lave.
+
+- Fixed bug in equipment buying screen.  Buying military lasers for the side or rear view
+  would cause mining lasers to be fitted instead.
+
+- Renamed files to be all lowercase.  This should ease ports to other OSes.
+
+- Removed #include of windows only allegro files from alg_main.c
+
+- Added #ifdef around use of GFX_DIRECTX in alg_main.c to allow compilation on non Windows OSes.
+
+
+
+Work in progress
+================
+
+The following features have not yet been implemented but are being currently worked on.
+
+- C64 Elite style scoring.
+
+- Trumbles (from C64/NES Elite).
+
+- View of docking bay after docking.
+
+- Loading of different consoles not yet fully implemented.
+
+- Enhance joystick support, i.e. use of more buttons and analogue control.
+
+
+Known Problems
+==============
+
+- Bits of hidden surfaces on ships sometimes show through.
+
+- Buying more than 255gs of Gold/Platinum doesn't work.
+  It didn't in the original Elite either.  Broken as designed.
+
+
+Have fun!
+
+Christian Pinder.
+<christian@newkind.co.uk>
+http://www.newkind.co.uk
diff --git a/space.c b/space.c
index 11b16a8e9055c2bd8c993e10a84d650f11d6157d..740ad87ae5a0e460f15c3e025aaa51c3cff4bd43 100644 (file)
--- a/space.c
+++ b/space.c
@@ -1310,7 +1310,9 @@ void launch_player (void)
        generate_landscape(docked_planet.a * 251 + docked_planet.b);
        set_init_matrix (rotmat);
        add_new_ship (SHIP_PLANET, 0, 0, 65536, rotmat, 0, 0);
+#ifdef HACKING
        identify = 0;
+#endif
        scanner_zoom = 1;
 
        rotmat[2].x = -rotmat[2].x;
diff --git a/swat.c b/swat.c
index c44d939a8b080ddb4be695a8c68111073b7dc40e..104277ff927f5a1fea26bb98d27336e5d66195cc 100644 (file)
--- a/swat.c
+++ b/swat.c
@@ -18,6 +18,7 @@
  * Special Weapons And Tactics.
  */
 
+#include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
@@ -355,7 +356,8 @@ void explode_object (int un)
 void check_target (int un, struct univ_object *flip)
 {
        struct univ_object *univ;
-       
+       char buf[80];
+
        univ = &universe[un];
        
        if (in_target (univ->type, flip->location.x, flip->location.y, flip->location.z))
@@ -363,7 +365,9 @@ void check_target (int un, struct univ_object *flip)
                if ((missile_target == MISSILE_ARMED) && (univ->type >= 0))
                {
                        missile_target = un;
-                       info_message ("Target Locked");
+                       sprintf(buf, "Target Locked (%s)",
+                               ship_list[univ->type]->name);
+                       info_message (buf);
                        snd_play_sample (SND_BEEP);
                }
        
index 72a56cf0f46f994b4491d3328b8c646236a352a1..1d6e5c2b6f6e8ef0aad5e635ad9c7c028d2a54ea 100644 (file)
--- a/threed.c
+++ b/threed.c
@@ -38,6 +38,8 @@ static unsigned char landscape[LAND_X_MAX+1][LAND_Y_MAX+1];
 
 static struct point point_list[100];
 
+#ifdef HACKING
+
 static void identify_ship(struct univ_object *univ)
 {
   char buf[64];
@@ -45,18 +47,13 @@ static void identify_ship(struct univ_object *univ)
 
   lasv = ship_list[univ->type]->front_laser;
   if (!(univ->flags & FLG_TACTICAL)) {
-#ifdef HACKING
     unsigned flags = univ->flags;
     sprintf(buf, "%s %s%s%s%s", ship_list[univ->type]->name,
            (flags & FLG_ANGRY) ? "A" : "",
            (flags & FLG_TARGET) ? "T" : "",
            (flags & FLG_HOSTILE) ? "H" : "",
            (flags & FLG_POLICE) ? "P" : "");
-#else
-    sprintf(buf, "%s", ship_list[univ->type]->name);
-#endif
   } else {
-#ifdef HACKING
     unsigned flags = univ->flags;
     sprintf(buf, "%s (%d) %s%s%s%s", ship_list[univ->type]->name,
            univ->energy,
@@ -64,13 +61,12 @@ static void identify_ship(struct univ_object *univ)
            (flags & FLG_TARGET) ? "T" : "",
            (flags & FLG_HOSTILE) ? "H" : "",
            (flags & FLG_POLICE) ? "P" : "");
-#else
-    sprintf(buf, "%s (%d)", ship_list[univ->type]->name, univ->energy);
-#endif
   }
   gfx_display_text(point_list[lasv].x + 4, point_list[lasv].y + 4, buf);
 }
 
+#endif
+
 /*
  * The following routine is used to draw a wireframe represtation of a ship.
  *
@@ -187,8 +183,10 @@ void draw_wireframe_ship (struct univ_object *univ)
                                           univ->location.x > 0 ? 0 : 511, rand255() * 2);
        }
 
+#ifdef HACKING
        if (identify)
          identify_ship(univ);
+#endif
 }
 
 
@@ -380,8 +378,10 @@ void draw_solid_ship (struct univ_object *univ)
        }
 #endif
 
+#ifdef HACKING
        if (identify)
          identify_ship(univ);
+#endif
 }