File indexing completed on 2022-09-27 13:19:27

0001 /*
0002     SPDX-FileCopyrightText: 1998-2001 Andreas Zehender <az@azweb.de>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef __SP_STRUCTS_H
0008 #define __SP_STRUCTS_H
0009 
0010 #include <KLocalizedString>
0011 #include <KLazyLocalizedString>
0012 struct SConfig
0013 {
0014    double gamespeed,gravity,acc,energyNeed,sunEnergy,rotationSpeed,
0015       mineActivateTime,mineFuel,shotSpeed,shotEnergyNeed,mineEnergyNeed,
0016       rotationEnergyNeed,startPosX,startPosY,startVelX,startVelY,
0017       bulletLifeTime,mineReloadTime,bulletReloadTime;
0018    unsigned bulletDamage,shipDamage,mineDamage,maxBullets,maxMines;
0019    double powerupLifeTime, powerupRefreshTime;
0020    double powerupEnergyAmount;
0021    unsigned powerupShieldAmount;
0022 };
0023 
0024 bool operator!=(const SConfig &s1, const SConfig &s2);
0025 
0026 #define predefinedConfigNum 4
0027 const SConfig predefinedConfig[]={{1.0, 2200.0, 0.2, 1.0, 9000.0, 1.0,
0028                                    15.0, 65.0, 3.0, 10.0, 5.0,
0029                                    0.2, -130.0, -100.0, 3.0, -1.7,
0030                                    500.0,10.0,10.0,
0031                                    20, 50, 30, 5, 3,
0032                                    400.0, 800.0, 50, 30},
0033                                   {1.0, 2200.0, 0.2, 1.0, 9000.0, 1.0,
0034                                    15.0, 40.0, 5.0, 20.0, 10.0,
0035                                    0.2, -50.0, -150.0, 3.5, 0.9,
0036                                    500.0,10.0,10.0,
0037                                    20, 50, 30, 6, 2,
0038                                    400.0, 800.0, 50, 30},
0039                                   {1.3, 2200.0, 0.2, 1.0, 13000.0, 1.0,
0040                                    15.0, 50.0, 4.0, 10.0, 10.0,
0041                                    0.2, -50.0, -150.0, 3.2, -0.9,
0042                                    400.0,10.0,10.0,
0043                                    20, 50, 30, 7, 5,
0044                                    400.0, 800.0, 50, 30},
0045                                   {1.0, 2200.0, 0.2, 1.0, 9000.0, 1.0,
0046                                    15.0, 40.0, 5.0, 60.0, 50.0,
0047                                    0.4, -50.0, -170.0, 3.0, -0.5,
0048                                    500.0,10.0,10.0,
0049                                    20, 50, 30, 5, 3,
0050                                    400.0, 800.0, 50, 30}};
0051 const KLazyLocalizedString predefinedConfigName[predefinedConfigNum] =
0052 {kli18n("Default"),kli18n("Bullet"),kli18n("Chaos"),kli18n("Lack of Energy")};
0053 
0054 // This is because on Solaris, sun is defined (it's the vendor)
0055 #ifdef sun
0056 #undef sun
0057 #endif
0058 
0059 struct AiSprite
0060 {
0061    double x,y,dx,dy;
0062    bool sun, border;
0063 };
0064 
0065 #endif