Format with clang.
This commit is contained in:
parent
5e82c957cd
commit
118b99ccf6
|
@ -0,0 +1,230 @@
|
||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
# BasedOnStyle: Google
|
||||||
|
AccessModifierOffset: -1
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
AlignArrayOfStructures: None
|
||||||
|
AlignConsecutiveMacros: Consecutive
|
||||||
|
AlignConsecutiveAssignments: None
|
||||||
|
AlignConsecutiveBitFields: None
|
||||||
|
AlignConsecutiveDeclarations: Consecutive
|
||||||
|
AlignEscapedNewlines: Left
|
||||||
|
AlignOperands: Align
|
||||||
|
AlignTrailingComments: true
|
||||||
|
AllowAllArgumentsOnNextLine: true
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: true
|
||||||
|
AllowShortEnumsOnASingleLine: true
|
||||||
|
AllowShortBlocksOnASingleLine: Never
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: None
|
||||||
|
AllowShortLambdasOnASingleLine: All
|
||||||
|
AllowShortIfStatementsOnASingleLine: WithoutElse
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: true
|
||||||
|
AlwaysBreakTemplateDeclarations: Yes
|
||||||
|
AttributeMacros:
|
||||||
|
- __capability
|
||||||
|
BinPackArguments: true
|
||||||
|
BinPackParameters: true
|
||||||
|
BraceWrapping:
|
||||||
|
AfterCaseLabel: false
|
||||||
|
AfterClass: false
|
||||||
|
AfterControlStatement: Never
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: false
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: false
|
||||||
|
AfterUnion: false
|
||||||
|
AfterExternBlock: false
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
BeforeLambdaBody: false
|
||||||
|
BeforeWhile: false
|
||||||
|
IndentBraces: false
|
||||||
|
SplitEmptyFunction: true
|
||||||
|
SplitEmptyRecord: true
|
||||||
|
SplitEmptyNamespace: true
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeConceptDeclarations: true
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
BreakBeforeInheritanceComma: false
|
||||||
|
BreakInheritanceList: BeforeColon
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializersBeforeComma: false
|
||||||
|
BreakConstructorInitializers: BeforeColon
|
||||||
|
BreakAfterJavaFieldAnnotations: false
|
||||||
|
BreakStringLiterals: true
|
||||||
|
ColumnLimit: 1024
|
||||||
|
CommentPragmas: '^ IWYU pragma:'
|
||||||
|
QualifierAlignment: Leave
|
||||||
|
CompactNamespaces: false
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
DeriveLineEnding: true
|
||||||
|
DerivePointerAlignment: true
|
||||||
|
DisableFormat: false
|
||||||
|
EmptyLineAfterAccessModifier: Never
|
||||||
|
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||||
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
PackConstructorInitializers: NextLine
|
||||||
|
BasedOnStyle: ''
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||||
|
AllowAllConstructorInitializersOnNextLine: true
|
||||||
|
FixNamespaceComments: true
|
||||||
|
ForEachMacros:
|
||||||
|
- foreach
|
||||||
|
- Q_FOREACH
|
||||||
|
- BOOST_FOREACH
|
||||||
|
IfMacros:
|
||||||
|
- KJ_IF_MAYBE
|
||||||
|
IncludeBlocks: Regroup
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '^<ext/.*\.h>'
|
||||||
|
Priority: 2
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
- Regex: '^<.*\.h>'
|
||||||
|
Priority: 1
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
- Regex: '^<.*'
|
||||||
|
Priority: 2
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
- Regex: '.*common.h'
|
||||||
|
Priority: 2
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
- Regex: '.*'
|
||||||
|
Priority: 3
|
||||||
|
SortPriority: 0
|
||||||
|
CaseSensitive: false
|
||||||
|
IncludeIsMainRegex: 'common.h'
|
||||||
|
IncludeIsMainSourceRegex: 'common.h'
|
||||||
|
IndentAccessModifiers: false
|
||||||
|
IndentCaseLabels: true
|
||||||
|
IndentCaseBlocks: false
|
||||||
|
IndentGotoLabels: true
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentExternBlock: AfterExternBlock
|
||||||
|
IndentRequires: false
|
||||||
|
IndentWidth: 4
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
InsertTrailingCommas: None
|
||||||
|
JavaScriptQuotes: Leave
|
||||||
|
JavaScriptWrapImports: true
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
|
LambdaBodyIndentation: Signature
|
||||||
|
MacroBlockBegin: ''
|
||||||
|
MacroBlockEnd: ''
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: None
|
||||||
|
ObjCBinPackProtocolList: Never
|
||||||
|
ObjCBlockIndentWidth: 2
|
||||||
|
ObjCBreakBeforeNestedBlockParam: true
|
||||||
|
ObjCSpaceAfterProperty: false
|
||||||
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
PenaltyBreakAssignment: 2
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 1
|
||||||
|
PenaltyBreakComment: 300
|
||||||
|
PenaltyBreakFirstLessLess: 120
|
||||||
|
PenaltyBreakOpenParenthesis: 0
|
||||||
|
PenaltyBreakString: 1000
|
||||||
|
PenaltyBreakTemplateDeclaration: 10
|
||||||
|
PenaltyExcessCharacter: 1000000
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 200
|
||||||
|
PenaltyIndentedWhitespace: 0
|
||||||
|
PointerAlignment: Left
|
||||||
|
PPIndentWidth: -1
|
||||||
|
RawStringFormats:
|
||||||
|
- Language: Cpp
|
||||||
|
Delimiters:
|
||||||
|
- cc
|
||||||
|
- CC
|
||||||
|
- cpp
|
||||||
|
- Cpp
|
||||||
|
- CPP
|
||||||
|
- 'c++'
|
||||||
|
- 'C++'
|
||||||
|
CanonicalDelimiter: ''
|
||||||
|
BasedOnStyle: google
|
||||||
|
- Language: TextProto
|
||||||
|
Delimiters:
|
||||||
|
- pb
|
||||||
|
- PB
|
||||||
|
- proto
|
||||||
|
- PROTO
|
||||||
|
EnclosingFunctions:
|
||||||
|
- EqualsProto
|
||||||
|
- EquivToProto
|
||||||
|
- PARSE_PARTIAL_TEXT_PROTO
|
||||||
|
- PARSE_TEST_PROTO
|
||||||
|
- PARSE_TEXT_PROTO
|
||||||
|
- ParseTextOrDie
|
||||||
|
- ParseTextProtoOrDie
|
||||||
|
- ParseTestProto
|
||||||
|
- ParsePartialTestProto
|
||||||
|
CanonicalDelimiter: pb
|
||||||
|
BasedOnStyle: google
|
||||||
|
ReferenceAlignment: Pointer
|
||||||
|
ReflowComments: true
|
||||||
|
RemoveBracesLLVM: false
|
||||||
|
SeparateDefinitionBlocks: Leave
|
||||||
|
ShortNamespaceLines: 1
|
||||||
|
SortIncludes: CaseInsensitive
|
||||||
|
SortJavaStaticImport: Before
|
||||||
|
SortUsingDeclarations: true
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
|
SpaceAfterLogicalNot: false
|
||||||
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCaseColon: false
|
||||||
|
SpaceBeforeCpp11BracedList: false
|
||||||
|
SpaceBeforeCtorInitializerColon: true
|
||||||
|
SpaceBeforeInheritanceColon: true
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceBeforeParensOptions:
|
||||||
|
AfterControlStatements: true
|
||||||
|
AfterForeachMacros: true
|
||||||
|
AfterFunctionDefinitionName: false
|
||||||
|
AfterFunctionDeclarationName: false
|
||||||
|
AfterIfMacros: true
|
||||||
|
AfterOverloadedOperator: false
|
||||||
|
BeforeNonEmptyParentheses: false
|
||||||
|
SpaceAroundPointerQualifiers: Default
|
||||||
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
|
SpaceInEmptyBlock: false
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 2
|
||||||
|
SpacesInAngles: Never
|
||||||
|
SpacesInConditionalStatement: false
|
||||||
|
SpacesInContainerLiterals: true
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInLineCommentPrefix:
|
||||||
|
Minimum: 1
|
||||||
|
Maximum: -1
|
||||||
|
SpacesInParentheses: false
|
||||||
|
SpacesInSquareBrackets: false
|
||||||
|
SpaceBeforeSquareBrackets: false
|
||||||
|
BitFieldColonSpacing: Both
|
||||||
|
Standard: Auto
|
||||||
|
StatementAttributeLikeMacros:
|
||||||
|
- Q_EMIT
|
||||||
|
StatementMacros:
|
||||||
|
- Q_UNUSED
|
||||||
|
- QT_REQUIRE_VERSION
|
||||||
|
TabWidth: 4
|
||||||
|
UseCRLF: false
|
||||||
|
UseTab: Always
|
||||||
|
WhitespaceSensitiveMacros:
|
||||||
|
- STRINGIZE
|
||||||
|
- PP_STRINGIZE
|
||||||
|
- BOOST_PP_STRINGIZE
|
||||||
|
- NS_SWIFT_NAME
|
||||||
|
- CF_SWIFT_NAME
|
||||||
|
...
|
||||||
|
|
|
@ -19,14 +19,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "ai.h"
|
|
||||||
#include "../battle/mine.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../battle/fighters.h"
|
|
||||||
#include "../battle/quadtree.h"
|
|
||||||
#include "../battle/bullets.h"
|
#include "../battle/bullets.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
#include "../battle/hud.h"
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/mine.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
#include "../battle/script.h"
|
#include "../battle/script.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "ai.h"
|
||||||
|
|
||||||
#define AI_EVADE 0
|
#define AI_EVADE 0
|
||||||
#define AI_FALLBACK 1
|
#define AI_FALLBACK 1
|
||||||
|
|
|
@ -19,38 +19,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "battle.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../game/credits.h"
|
|
||||||
#include "../battle/locations.h"
|
|
||||||
#include "../system/widgets.h"
|
|
||||||
#include "../galaxy/mission.h"
|
|
||||||
#include "../battle/bullets.h"
|
#include "../battle/bullets.h"
|
||||||
#include "../galaxy/galacticMap.h"
|
|
||||||
#include "../battle/effects.h"
|
|
||||||
#include "../system/draw.h"
|
|
||||||
#include "../battle/starfield.h"
|
|
||||||
#include "../battle/player.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../battle/messageBox.h"
|
|
||||||
#include "../battle/spawners.h"
|
|
||||||
#include "../battle/waypoints.h"
|
|
||||||
#include "../battle/radar.h"
|
|
||||||
#include "../battle/objectives.h"
|
|
||||||
#include "../battle/script.h"
|
|
||||||
#include "../battle/quadtree.h"
|
|
||||||
#include "../challenges/challenges.h"
|
|
||||||
#include "../challenges/challengeHome.h"
|
|
||||||
#include "../system/modalDialog.h"
|
|
||||||
#include "../game/options.h"
|
|
||||||
#include "../battle/hud.h"
|
|
||||||
#include "../battle/missionInfo.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../system/input.h"
|
|
||||||
#include "../game/stats.h"
|
|
||||||
#include "../battle/debris.h"
|
#include "../battle/debris.h"
|
||||||
#include "../game/trophies.h"
|
#include "../battle/effects.h"
|
||||||
#include "../battle/entities.h"
|
#include "../battle/entities.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/locations.h"
|
||||||
|
#include "../battle/messageBox.h"
|
||||||
|
#include "../battle/missionInfo.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/player.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/radar.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../battle/spawners.h"
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../battle/waypoints.h"
|
||||||
|
#include "../challenges/challengeHome.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../galaxy/galacticMap.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/credits.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
#include "../system/modalDialog.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "battle.h"
|
||||||
|
|
||||||
#define SHOW_BATTLE 0
|
#define SHOW_BATTLE 0
|
||||||
#define SHOW_MENU 1
|
#define SHOW_MENU 1
|
||||||
|
|
|
@ -19,18 +19,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "bullets.h"
|
|
||||||
#include "../json/cJSON.h"
|
#include "../battle/effects.h"
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../battle/fighters.h"
|
#include "../battle/fighters.h"
|
||||||
#include "../battle/quadtree.h"
|
#include "../battle/quadtree.h"
|
||||||
#include "../game/trophies.h"
|
#include "../game/trophies.h"
|
||||||
#include "../battle/effects.h"
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
#include "../system/io.h"
|
#include "../system/io.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
#include "../system/sound.h"
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "bullets.h"
|
||||||
|
|
||||||
#define INITIAL_BULLET_DRAW_CAPACITY 32
|
#define INITIAL_BULLET_DRAW_CAPACITY 32
|
||||||
#define MISSILE_LIFE (FPS * 30)
|
#define MISSILE_LIFE (FPS * 30)
|
||||||
|
|
|
@ -19,22 +19,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "capitalShips.h"
|
|
||||||
|
#include "../battle/ai.h"
|
||||||
|
#include "../battle/debris.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../battle/messageBox.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/io.h"
|
||||||
#include "../system/lookup.h"
|
#include "../system/lookup.h"
|
||||||
#include "../system/sound.h"
|
#include "../system/sound.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
#include "../battle/ai.h"
|
#include "capitalShips.h"
|
||||||
#include "../battle/fighters.h"
|
|
||||||
#include "../battle/quadtree.h"
|
|
||||||
#include "../battle/debris.h"
|
|
||||||
#include "../battle/messageBox.h"
|
|
||||||
#include "../battle/script.h"
|
|
||||||
#include "../battle/effects.h"
|
|
||||||
#include "../battle/objectives.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../system/io.h"
|
|
||||||
#include "../battle/entities.h"
|
|
||||||
|
|
||||||
#define TURN_SPEED 0.1
|
#define TURN_SPEED 0.1
|
||||||
#define TURN_THRESHOLD 2
|
#define TURN_THRESHOLD 2
|
||||||
|
|
|
@ -19,12 +19,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "debris.h"
|
|
||||||
|
#include "../battle/effects.h"
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
#include "../system/atlas.h"
|
#include "../system/atlas.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
#include "../battle/effects.h"
|
#include "debris.h"
|
||||||
|
|
||||||
#define INITIAL_DEBRIS_DRAW_CAPACITY 32
|
#define INITIAL_DEBRIS_DRAW_CAPACITY 32
|
||||||
#define MAX_DEBRIS_TEXTURES 6
|
#define MAX_DEBRIS_TEXTURES 6
|
||||||
|
|
|
@ -19,10 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "effects.h"
|
|
||||||
#include "../system/atlas.h"
|
#include "../system/atlas.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
|
#include "effects.h"
|
||||||
|
|
||||||
#define INITIAL_EFFECT_DRAW_CAPACITY 128
|
#define INITIAL_EFFECT_DRAW_CAPACITY 128
|
||||||
|
|
||||||
|
|
|
@ -19,16 +19,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "entities.h"
|
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../battle/capitalShips.h"
|
#include "../battle/capitalShips.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
#include "../battle/fighters.h"
|
#include "../battle/fighters.h"
|
||||||
#include "../battle/quadtree.h"
|
#include "../battle/quadtree.h"
|
||||||
#include "../battle/rope.h"
|
#include "../battle/rope.h"
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../game/trophies.h"
|
#include "../game/trophies.h"
|
||||||
#include "../battle/effects.h"
|
#include "../system/atlas.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "entities.h"
|
||||||
|
|
||||||
#define DISABLED_GLOW_MAX 255
|
#define DISABLED_GLOW_MAX 255
|
||||||
#define DISABLED_GLOW_MIN 128
|
#define DISABLED_GLOW_MIN 128
|
||||||
|
@ -413,7 +414,9 @@ void drawEntities(void)
|
||||||
candidates = getAllEntsWithin(battle.camera.x, battle.camera.y, app.winWidth, app.winHeight, NULL);
|
candidates = getAllEntsWithin(battle.camera.x, battle.camera.y, app.winWidth, app.winHeight, NULL);
|
||||||
|
|
||||||
/* counting entities to draw */
|
/* counting entities to draw */
|
||||||
for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i]) {};
|
for (i = 0, e = candidates[i]; e != NULL; e = candidates[++i])
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
qsort(candidates, i, sizeof(Entity *), drawComparator);
|
qsort(candidates, i, sizeof(Entity *), drawComparator);
|
||||||
|
|
||||||
|
|
|
@ -19,24 +19,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "fighters.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../battle/ai.h"
|
#include "../battle/ai.h"
|
||||||
#include "../battle/quadtree.h"
|
|
||||||
#include "../battle/debris.h"
|
#include "../battle/debris.h"
|
||||||
#include "../battle/rope.h"
|
|
||||||
#include "../galaxy/mission.h"
|
|
||||||
#include "../battle/hud.h"
|
|
||||||
#include "../battle/objectives.h"
|
|
||||||
#include "../battle/script.h"
|
|
||||||
#include "../battle/effects.h"
|
#include "../battle/effects.h"
|
||||||
#include "../battle/items.h"
|
|
||||||
#include "../system/io.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../battle/entities.h"
|
#include "../battle/entities.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/items.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/rope.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "fighters.h"
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -19,14 +19,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "hud.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../battle/player.h"
|
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../battle/radar.h"
|
|
||||||
#include "../system/draw.h"
|
|
||||||
#include "../battle/jumpgate.h"
|
#include "../battle/jumpgate.h"
|
||||||
|
#include "../battle/player.h"
|
||||||
|
#include "../battle/radar.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "hud.h"
|
||||||
|
|
||||||
#define MAX_HUD_MESSAGES 6
|
#define MAX_HUD_MESSAGES 6
|
||||||
|
|
||||||
|
|
|
@ -19,17 +19,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "items.h"
|
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/io.h"
|
||||||
#include "../system/lookup.h"
|
#include "../system/lookup.h"
|
||||||
#include "../system/sound.h"
|
#include "../system/sound.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
#include "../battle/quadtree.h"
|
#include "items.h"
|
||||||
#include "../battle/hud.h"
|
|
||||||
#include "../battle/objectives.h"
|
|
||||||
#include "../system/io.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../battle/entities.h"
|
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -19,17 +19,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "jumpgate.h"
|
|
||||||
#include "../system/draw.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../battle/quadtree.h"
|
|
||||||
#include "../battle/debris.h"
|
#include "../battle/debris.h"
|
||||||
#include "../battle/objectives.h"
|
|
||||||
#include "../battle/script.h"
|
|
||||||
#include "../battle/effects.h"
|
#include "../battle/effects.h"
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../battle/entities.h"
|
#include "../battle/entities.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "jumpgate.h"
|
||||||
|
|
||||||
#define ESCAPE_DISTANCE 256
|
#define ESCAPE_DISTANCE 256
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "locations.h"
|
|
||||||
|
#include "../battle/script.h"
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
#include "../battle/script.h"
|
#include "locations.h"
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Entity *player;
|
extern Entity *player;
|
||||||
|
|
|
@ -19,9 +19,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "messageBox.h"
|
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../system/sound.h"
|
#include "../system/sound.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "messageBox.h"
|
||||||
|
|
||||||
#define MSG_BOX_TEXT_WIDTH 600
|
#define MSG_BOX_TEXT_WIDTH 600
|
||||||
|
|
||||||
|
|
|
@ -19,17 +19,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "mine.h"
|
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
#include "../system/sound.h"
|
#include "../system/sound.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
#include "../battle/fighters.h"
|
#include "mine.h"
|
||||||
#include "../battle/quadtree.h"
|
|
||||||
#include "../game/trophies.h"
|
|
||||||
#include "../battle/objectives.h"
|
|
||||||
#include "../battle/script.h"
|
|
||||||
#include "../battle/effects.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../battle/entities.h"
|
|
||||||
|
|
||||||
#define DAMAGE_RANGE 250
|
#define DAMAGE_RANGE 250
|
||||||
#define SYSTEM_POWER 50
|
#define SYSTEM_POWER 50
|
||||||
|
|
|
@ -19,13 +19,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "missionInfo.h"
|
|
||||||
#include "../system/draw.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../challenges/challenges.h"
|
#include "../challenges/challenges.h"
|
||||||
#include "../system/widgets.h"
|
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../system/atlas.h"
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "missionInfo.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
|
@ -19,14 +19,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "objectives.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../galaxy/mission.h"
|
|
||||||
#include "../battle/hud.h"
|
#include "../battle/hud.h"
|
||||||
#include "../battle/script.h"
|
#include "../battle/script.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "objectives.h"
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -19,19 +19,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "player.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../system/controls.h"
|
|
||||||
#include "../battle/fighters.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../galaxy/mission.h"
|
|
||||||
#include "../game/trophies.h"
|
|
||||||
#include "../battle/hud.h"
|
|
||||||
#include "../battle/objectives.h"
|
|
||||||
#include "../battle/bullets.h"
|
#include "../battle/bullets.h"
|
||||||
#include "../battle/effects.h"
|
#include "../battle/effects.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/controls.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "player.h"
|
||||||
|
|
||||||
#define MAX_SELECTABLE_PLAYERS 8
|
#define MAX_SELECTABLE_PLAYERS 8
|
||||||
#define MAX_SELECTABLE_TARGETS 8
|
#define MAX_SELECTABLE_TARGETS 8
|
||||||
|
@ -536,8 +537,7 @@ static void selectNewPlayer(int dir)
|
||||||
selectedPlayerIndex = mod(selectedPlayerIndex, MAX_SELECTABLE_PLAYERS);
|
selectedPlayerIndex = mod(selectedPlayerIndex, MAX_SELECTABLE_PLAYERS);
|
||||||
|
|
||||||
player = availablePlayerUnits[selectedPlayerIndex];
|
player = availablePlayerUnits[selectedPlayerIndex];
|
||||||
}
|
} while (player == NULL);
|
||||||
while (player == NULL);
|
|
||||||
|
|
||||||
battle.camera.x = player->x - (app.winWidth / 2);
|
battle.camera.x = player->x - (app.winWidth / 2);
|
||||||
battle.camera.y = player->y - (app.winHeight / 2);
|
battle.camera.y = player->y - (app.winHeight / 2);
|
||||||
|
@ -596,8 +596,7 @@ static void switchGuns(void)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
i = (i + 1) % BT_MAX;
|
i = (i + 1) % BT_MAX;
|
||||||
}
|
} while (!availableGuns[i]);
|
||||||
while (!availableGuns[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->selectedGunType != i)
|
if (player->selectedGunType != i)
|
||||||
|
|
|
@ -19,8 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "quadtree.h"
|
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
|
#include "quadtree.h"
|
||||||
|
|
||||||
#define QT_INITIAL_CAPACITY 8
|
#define QT_INITIAL_CAPACITY 8
|
||||||
#define QT_MAX_DEPTH 5
|
#define QT_MAX_DEPTH 5
|
||||||
|
|
|
@ -19,11 +19,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "radar.h"
|
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../system/atlas.h"
|
#include "../system/atlas.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
|
#include "../system/text.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
|
#include "radar.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
|
@ -19,12 +19,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "rope.h"
|
|
||||||
#include "../battle/hud.h"
|
#include "../battle/hud.h"
|
||||||
#include "../battle/quadtree.h"
|
#include "../battle/quadtree.h"
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../battle/script.h"
|
#include "../battle/script.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "rope.h"
|
||||||
|
|
||||||
#define ROPE_DISTANCE 128
|
#define ROPE_DISTANCE 128
|
||||||
|
|
||||||
|
|
|
@ -19,18 +19,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "script.h"
|
|
||||||
#include "../json/cJSON.h"
|
#include "../battle/entities.h"
|
||||||
#include "../battle/locations.h"
|
|
||||||
#include "../battle/fighters.h"
|
#include "../battle/fighters.h"
|
||||||
#include "../galaxy/mission.h"
|
|
||||||
#include "../battle/hud.h"
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/jumpgate.h"
|
||||||
|
#include "../battle/locations.h"
|
||||||
|
#include "../battle/messageBox.h"
|
||||||
#include "../battle/objectives.h"
|
#include "../battle/objectives.h"
|
||||||
#include "../battle/spawners.h"
|
#include "../battle/spawners.h"
|
||||||
#include "../battle/waypoints.h"
|
#include "../battle/waypoints.h"
|
||||||
#include "../battle/messageBox.h"
|
#include "../galaxy/mission.h"
|
||||||
#include "../battle/entities.h"
|
#include "../json/cJSON.h"
|
||||||
#include "../battle/jumpgate.h"
|
#include "script.h"
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -19,11 +19,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "spawners.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../battle/fighters.h"
|
#include "../battle/fighters.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
#include "../system/lookup.h"
|
#include "../system/lookup.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
|
#include "spawners.h"
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Entity *player;
|
extern Entity *player;
|
||||||
|
|
|
@ -19,8 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "starfield.h"
|
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
|
#include "starfield.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
|
|
||||||
|
|
|
@ -19,14 +19,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "waypoints.h"
|
|
||||||
#include "../system/util.h"
|
#include "../battle/entities.h"
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../battle/hud.h"
|
#include "../battle/hud.h"
|
||||||
#include "../battle/objectives.h"
|
#include "../battle/objectives.h"
|
||||||
#include "../battle/script.h"
|
#include "../battle/script.h"
|
||||||
#include "../system/atlas.h"
|
#include "../system/atlas.h"
|
||||||
#include "../battle/entities.h"
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "waypoints.h"
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -19,26 +19,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "challengeHome.h"
|
|
||||||
#include "../battle/starfield.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../system/input.h"
|
|
||||||
#include "../game/title.h"
|
|
||||||
#include "../game/stats.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../system/widgets.h"
|
|
||||||
#include "../galaxy/mission.h"
|
|
||||||
#include "../game/trophies.h"
|
|
||||||
#include "../game/options.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../game/fighterDatabase.h"
|
|
||||||
#include "../system/transition.h"
|
|
||||||
#include "../challenges/challenges.h"
|
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../system/draw.h"
|
|
||||||
#include "../battle/battle.h"
|
#include "../battle/battle.h"
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/fighterDatabase.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../game/title.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/input.h"
|
||||||
#include "../system/resources.h"
|
#include "../system/resources.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/text.h"
|
||||||
#include "../system/textures.h"
|
#include "../system/textures.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "challengeHome.h"
|
||||||
|
|
||||||
#define CHALLENGES_PER_PAGE 14
|
#define CHALLENGES_PER_PAGE 14
|
||||||
#define SHOW_CHALLENGES 0
|
#define SHOW_CHALLENGES 0
|
||||||
|
|
|
@ -19,16 +19,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "challenges.h"
|
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/io.h"
|
||||||
#include "../system/lookup.h"
|
#include "../system/lookup.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
#include "../battle/fighters.h"
|
|
||||||
#include "../system/widgets.h"
|
#include "../system/widgets.h"
|
||||||
#include "../galaxy/mission.h"
|
#include "challenges.h"
|
||||||
#include "../game/trophies.h"
|
|
||||||
#include "../game/stats.h"
|
|
||||||
#include "../system/io.h"
|
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
|
|
12
src/common.h
12
src/common.h
|
@ -18,15 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdlib.h"
|
|
||||||
#include "stdio.h"
|
|
||||||
#include "string.h"
|
|
||||||
#include "math.h"
|
|
||||||
#include "ctype.h"
|
#include "ctype.h"
|
||||||
|
|
||||||
#include "SDL2/SDL.h"
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
#include "math.h"
|
||||||
|
#include "SDL2/SDL.h"
|
||||||
|
#include "stdio.h"
|
||||||
|
#include "stdlib.h"
|
||||||
|
#include "string.h"
|
||||||
#include "structs.h"
|
#include "structs.h"
|
||||||
|
|
||||||
extern char *getTranslatedString(char *string);
|
extern char *getTranslatedString(char *string);
|
||||||
|
|
|
@ -52,7 +52,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||||
#define CAROLINE(a, b) MIN(a, b)
|
#define CAROLINE(a, b) MIN(a, b)
|
||||||
#define STRNCPY(dest, src, n) strncpy(dest, src, n); dest[n - 1] = '\0'
|
#define STRNCPY(dest, src, n) \
|
||||||
|
strncpy(dest, src, n); \
|
||||||
|
dest[n - 1] = '\0'
|
||||||
#define TO_RAIDANS(angleDegrees) (angleDegrees * PI / 180.0)
|
#define TO_RAIDANS(angleDegrees) (angleDegrees * PI / 180.0)
|
||||||
#define TO_DEGREES(angleRadians) (angleRadians * 180.0 / PI)
|
#define TO_DEGREES(angleRadians) (angleRadians * 180.0 / PI)
|
||||||
|
|
||||||
|
|
|
@ -19,26 +19,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "galacticMap.h"
|
|
||||||
#include "../battle/starfield.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../system/input.h"
|
|
||||||
#include "../game/title.h"
|
|
||||||
#include "../game/stats.h"
|
|
||||||
#include "../system/widgets.h"
|
|
||||||
#include "../galaxy/mission.h"
|
|
||||||
#include "../game/trophies.h"
|
|
||||||
#include "../system/modalDialog.h"
|
|
||||||
#include "../game/options.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../game/fighterDatabase.h"
|
|
||||||
#include "../system/transition.h"
|
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../galaxy/starSystems.h"
|
|
||||||
#include "../system/draw.h"
|
|
||||||
#include "../battle/battle.h"
|
#include "../battle/battle.h"
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../galaxy/starSystems.h"
|
||||||
|
#include "../game/fighterDatabase.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../game/title.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
#include "../system/modalDialog.h"
|
||||||
#include "../system/sound.h"
|
#include "../system/sound.h"
|
||||||
|
#include "../system/text.h"
|
||||||
#include "../system/textures.h"
|
#include "../system/textures.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "galacticMap.h"
|
||||||
|
|
||||||
#define MAX_LISTED_MISSIONS 9
|
#define MAX_LISTED_MISSIONS 9
|
||||||
#define SHOW_FIGHTER_DB 6
|
#define SHOW_FIGHTER_DB 6
|
||||||
|
|
|
@ -18,35 +18,37 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
#include "mission.h"
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../battle/locations.h"
|
#include "../common.h"
|
||||||
#include "../system/widgets.h"
|
|
||||||
#include "../system/io.h"
|
|
||||||
#include "../galaxy/starSystems.h"
|
|
||||||
#include "../battle/jumpgate.h"
|
|
||||||
#include "../battle/missionInfo.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../battle/player.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../system/transition.h"
|
|
||||||
#include "../battle/objectives.h"
|
|
||||||
#include "../battle/script.h"
|
|
||||||
#include "../battle/waypoints.h"
|
|
||||||
#include "../battle/spawners.h"
|
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../battle/mine.h"
|
|
||||||
#include "../challenges/challenges.h"
|
|
||||||
#include "../battle/fighters.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../system/resources.h"
|
|
||||||
#include "../battle/capitalShips.h"
|
#include "../battle/capitalShips.h"
|
||||||
#include "../game/trophies.h"
|
|
||||||
#include "../system/textures.h"
|
|
||||||
#include "../battle/items.h"
|
|
||||||
#include "../battle/entities.h"
|
#include "../battle/entities.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../battle/items.h"
|
||||||
|
#include "../battle/jumpgate.h"
|
||||||
|
#include "../battle/locations.h"
|
||||||
|
#include "../battle/mine.h"
|
||||||
|
#include "../battle/missionInfo.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/player.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../battle/spawners.h"
|
||||||
|
#include "../battle/waypoints.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../galaxy/starSystems.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/resources.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "mission.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
@ -522,10 +524,6 @@ int isMissionAvailable(Mission *mission, Mission *prev)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return mission->completed || (
|
return mission->completed || (game.completedMissions >= mission->requires && game.stats[STAT_OPTIONAL_COMPLETED] >= mission->requiresOptional && game.completedMissions < mission->expires) || dev.debug;
|
||||||
game.completedMissions >= mission->requires &&
|
|
||||||
game.stats[STAT_OPTIONAL_COMPLETED] >= mission->requiresOptional &&
|
|
||||||
game.completedMissions < mission->expires
|
|
||||||
) || dev.debug;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,12 +19,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "starSystems.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../galaxy/mission.h"
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/io.h"
|
||||||
#include "../system/lookup.h"
|
#include "../system/lookup.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
#include "../system/io.h"
|
#include "starSystems.h"
|
||||||
|
|
||||||
extern Game game;
|
extern Game game;
|
||||||
|
|
||||||
|
|
|
@ -19,16 +19,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "credits.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../system/draw.h"
|
|
||||||
#include "../game/title.h"
|
#include "../game/title.h"
|
||||||
#include "../system/sound.h"
|
#include "../json/cJSON.h"
|
||||||
#include "../system/transition.h"
|
|
||||||
#include "../system/textures.h"
|
|
||||||
#include "../system/io.h"
|
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../system/atlas.h"
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "credits.h"
|
||||||
|
|
||||||
#define CREDIT_LINE_LIMIT (UI_WIDTH - 300)
|
#define CREDIT_LINE_LIMIT (UI_WIDTH - 300)
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "fighterDatabase.h"
|
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../battle/fighters.h"
|
#include "../battle/fighters.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
#include "../system/widgets.h"
|
#include "../system/text.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "fighterDatabase.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
|
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
|
|
||||||
extern Game game;
|
extern Game game;
|
||||||
|
|
|
@ -19,15 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "load.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../challenges/challenges.h"
|
|
||||||
#include "../battle/fighters.h"
|
#include "../battle/fighters.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
#include "../galaxy/mission.h"
|
#include "../galaxy/mission.h"
|
||||||
#include "../game/trophies.h"
|
|
||||||
#include "../system/io.h"
|
|
||||||
#include "../galaxy/starSystems.h"
|
#include "../galaxy/starSystems.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "load.h"
|
||||||
|
|
||||||
extern Game game;
|
extern Game game;
|
||||||
|
|
||||||
|
|
|
@ -18,15 +18,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
#include "options.h"
|
|
||||||
#include <SDL2/SDL_mixer.h>
|
#include <SDL2/SDL_mixer.h>
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
|
|
||||||
#include "../battle/starfield.h"
|
#include "../battle/starfield.h"
|
||||||
#include "../system/controls.h"
|
#include "../system/controls.h"
|
||||||
#include "../system/widgets.h"
|
#include "../system/draw.h"
|
||||||
#include "../system/init.h"
|
#include "../system/init.h"
|
||||||
#include "../system/text.h"
|
#include "../system/text.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/widgets.h"
|
||||||
|
#include "options.h"
|
||||||
|
|
||||||
#define SHOW_CONTROLS 1
|
#define SHOW_CONTROLS 1
|
||||||
#define SHOW_MAIN 0
|
#define SHOW_MAIN 0
|
||||||
|
|
|
@ -19,10 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "save.h"
|
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../system/io.h"
|
#include "../system/io.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "save.h"
|
||||||
|
|
||||||
extern Game game;
|
extern Game game;
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "stats.h"
|
|
||||||
#include "../system/text.h"
|
#include "../system/text.h"
|
||||||
#include "../system/widgets.h"
|
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "stats.h"
|
||||||
|
|
||||||
#define STATS_PER_PAGE 9
|
#define STATS_PER_PAGE 9
|
||||||
|
|
||||||
|
|
|
@ -19,26 +19,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "title.h"
|
|
||||||
#include "../galaxy/mission.h"
|
|
||||||
#include "../system/transition.h"
|
|
||||||
#include "../battle/starfield.h"
|
|
||||||
#include "../game/credits.h"
|
|
||||||
#include "../system/input.h"
|
|
||||||
#include "../game/stats.h"
|
|
||||||
#include "../system/widgets.h"
|
|
||||||
#include "../challenges/challengeHome.h"
|
|
||||||
#include "../battle/battle.h"
|
#include "../battle/battle.h"
|
||||||
#include "../galaxy/galacticMap.h"
|
|
||||||
#include "../game/options.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../game/fighterDatabase.h"
|
|
||||||
#include "../game/trophies.h"
|
|
||||||
#include "../battle/effects.h"
|
#include "../battle/effects.h"
|
||||||
#include "../system/text.h"
|
#include "../battle/starfield.h"
|
||||||
|
#include "../challenges/challengeHome.h"
|
||||||
|
#include "../galaxy/galacticMap.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/credits.h"
|
||||||
|
#include "../game/fighterDatabase.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
|
#include "../system/input.h"
|
||||||
#include "../system/sound.h"
|
#include "../system/sound.h"
|
||||||
|
#include "../system/text.h"
|
||||||
#include "../system/textures.h"
|
#include "../system/textures.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "title.h"
|
||||||
|
|
||||||
#define NUM_FIGHTERS 12
|
#define NUM_FIGHTERS 12
|
||||||
#define SHOW_FIGHTER_DB 4
|
#define SHOW_FIGHTER_DB 4
|
||||||
|
|
|
@ -18,19 +18,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
#include "trophies.h"
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
|
|
||||||
|
#include "../battle/entities.h"
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
#include "../system/lookup.h"
|
#include "../system/atlas.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/text.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
#include "../system/widgets.h"
|
#include "../system/widgets.h"
|
||||||
#include "../system/io.h"
|
#include "trophies.h"
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../battle/entities.h"
|
|
||||||
|
|
||||||
#define TROPHIES_PER_PAGE 4
|
#define TROPHIES_PER_PAGE 4
|
||||||
|
|
||||||
|
|
675
src/json/cJSON.c
675
src/json/cJSON.c
File diff suppressed because it is too large
Load Diff
|
@ -41,7 +41,8 @@ extern "C"
|
||||||
#define cJSON_StringIsConst 512
|
#define cJSON_StringIsConst 512
|
||||||
|
|
||||||
/* The cJSON structure: */
|
/* The cJSON structure: */
|
||||||
typedef struct cJSON {
|
typedef struct cJSON
|
||||||
|
{
|
||||||
struct cJSON *next, *prev; /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
|
struct cJSON *next, *prev; /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
|
||||||
struct cJSON *child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
|
struct cJSON *child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
|
||||||
|
|
||||||
|
@ -54,7 +55,8 @@ typedef struct cJSON {
|
||||||
char *string; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
|
char *string; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
|
||||||
} cJSON;
|
} cJSON;
|
||||||
|
|
||||||
typedef struct cJSON_Hooks {
|
typedef struct cJSON_Hooks
|
||||||
|
{
|
||||||
void *(*malloc_fn)(size_t sz);
|
void *(*malloc_fn)(size_t sz);
|
||||||
void (*free_fn)(void *ptr);
|
void (*free_fn)(void *ptr);
|
||||||
} cJSON_Hooks;
|
} cJSON_Hooks;
|
||||||
|
|
26
src/main.c
26
src/main.c
|
@ -18,24 +18,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "main.h"
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "game/load.h"
|
|
||||||
#include "system/lookup.h"
|
#include "common.h"
|
||||||
#include "system/draw.h"
|
|
||||||
#include "game/credits.h"
|
#include "game/credits.h"
|
||||||
#include "system/input.h"
|
#include "game/load.h"
|
||||||
#include "system/controls.h"
|
#include "game/save.h"
|
||||||
#include "game/title.h"
|
#include "game/title.h"
|
||||||
#include "game/trophies.h"
|
#include "game/trophies.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "plat/win32/win32Init.h"
|
||||||
|
#include "system/controls.h"
|
||||||
|
#include "system/dev.h"
|
||||||
|
#include "system/draw.h"
|
||||||
|
#include "system/init.h"
|
||||||
|
#include "system/input.h"
|
||||||
|
#include "system/io.h"
|
||||||
|
#include "system/lookup.h"
|
||||||
#include "system/modalDialog.h"
|
#include "system/modalDialog.h"
|
||||||
#include "test/testMission.h"
|
#include "test/testMission.h"
|
||||||
#include "game/save.h"
|
|
||||||
#include "system/io.h"
|
|
||||||
#include "system/dev.h"
|
|
||||||
#include "system/init.h"
|
|
||||||
#include "plat/win32/win32Init.h"
|
|
||||||
|
|
||||||
App app;
|
App app;
|
||||||
Battle battle;
|
Battle battle;
|
||||||
|
|
|
@ -18,12 +18,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../common.h"
|
|
||||||
#include "unixInit.h"
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "../../common.h"
|
||||||
|
|
||||||
|
#include "unixInit.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
|
|
|
@ -18,11 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../common.h"
|
#include <errno.h>
|
||||||
#include "win32Init.h"
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
|
||||||
|
#include "../../common.h"
|
||||||
|
|
||||||
|
#include "win32Init.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
|
|
120
src/structs.h
120
src/structs.h
|
@ -44,7 +44,8 @@ typedef struct Credit Credit;
|
||||||
typedef struct AtlasImage AtlasImage;
|
typedef struct AtlasImage AtlasImage;
|
||||||
typedef struct Font Font;
|
typedef struct Font Font;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
int debug;
|
int debug;
|
||||||
int takeScreenshots;
|
int takeScreenshots;
|
||||||
char *screenshotFolder;
|
char *screenshotFolder;
|
||||||
|
@ -57,12 +58,14 @@ typedef struct {
|
||||||
int fps;
|
int fps;
|
||||||
} Dev;
|
} Dev;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
} PointF;
|
} PointF;
|
||||||
|
|
||||||
struct Texture {
|
struct Texture
|
||||||
|
{
|
||||||
char name[MAX_DESCRIPTION_LENGTH];
|
char name[MAX_DESCRIPTION_LENGTH];
|
||||||
long hash;
|
long hash;
|
||||||
long ttl;
|
long ttl;
|
||||||
|
@ -70,14 +73,16 @@ struct Texture {
|
||||||
Texture *next;
|
Texture *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AtlasImage {
|
struct AtlasImage
|
||||||
|
{
|
||||||
char filename[MAX_FILENAME_LENGTH];
|
char filename[MAX_FILENAME_LENGTH];
|
||||||
SDL_Rect rect;
|
SDL_Rect rect;
|
||||||
SDL_Texture *texture;
|
SDL_Texture *texture;
|
||||||
AtlasImage *next;
|
AtlasImage *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
void (*logic)(void);
|
void (*logic)(void);
|
||||||
void (*draw)(void);
|
void (*draw)(void);
|
||||||
void (*handleClick)(int x, int y, int btn);
|
void (*handleClick)(int x, int y, int btn);
|
||||||
|
@ -85,18 +90,21 @@ typedef struct {
|
||||||
void (*handleMouseUp)(int x, int y, int btn);
|
void (*handleMouseUp)(int x, int y, int btn);
|
||||||
} Delegate;
|
} Delegate;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
int type;
|
int type;
|
||||||
char message[MAX_DESCRIPTION_LENGTH];
|
char message[MAX_DESCRIPTION_LENGTH];
|
||||||
} ModalDialog;
|
} ModalDialog;
|
||||||
|
|
||||||
struct Lookup {
|
struct Lookup
|
||||||
|
{
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
long value;
|
long value;
|
||||||
Lookup *next;
|
Lookup *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Weapon {
|
struct Weapon
|
||||||
|
{
|
||||||
int type;
|
int type;
|
||||||
int ammo;
|
int ammo;
|
||||||
int maxAmmo;
|
int maxAmmo;
|
||||||
|
@ -104,7 +112,8 @@ struct Weapon {
|
||||||
int y;
|
int y;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Entity {
|
struct Entity
|
||||||
|
{
|
||||||
int type;
|
int type;
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
char defName[MAX_NAME_LENGTH];
|
char defName[MAX_NAME_LENGTH];
|
||||||
|
@ -166,7 +175,8 @@ struct Entity {
|
||||||
Entity *next;
|
Entity *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Bullet {
|
struct Bullet
|
||||||
|
{
|
||||||
int type;
|
int type;
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
|
@ -185,7 +195,8 @@ struct Bullet {
|
||||||
Bullet *next;
|
Bullet *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Debris {
|
struct Debris
|
||||||
|
{
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
float dx;
|
float dx;
|
||||||
|
@ -197,13 +208,15 @@ struct Debris {
|
||||||
Debris *next;
|
Debris *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
float speed;
|
float speed;
|
||||||
} Star;
|
} Star;
|
||||||
|
|
||||||
struct Pulse {
|
struct Pulse
|
||||||
|
{
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
float size;
|
float size;
|
||||||
|
@ -212,7 +225,8 @@ struct Pulse {
|
||||||
Pulse *next;
|
Pulse *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Effect {
|
struct Effect
|
||||||
|
{
|
||||||
int type;
|
int type;
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
|
@ -229,7 +243,8 @@ struct Effect {
|
||||||
Effect *next;
|
Effect *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Location {
|
struct Location
|
||||||
|
{
|
||||||
int active;
|
int active;
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
int x;
|
int x;
|
||||||
|
@ -238,7 +253,8 @@ struct Location {
|
||||||
Location *next;
|
Location *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Objective {
|
struct Objective
|
||||||
|
{
|
||||||
int active;
|
int active;
|
||||||
char id[MAX_DESCRIPTION_LENGTH];
|
char id[MAX_DESCRIPTION_LENGTH];
|
||||||
char description[MAX_DESCRIPTION_LENGTH];
|
char description[MAX_DESCRIPTION_LENGTH];
|
||||||
|
@ -253,14 +269,16 @@ struct Objective {
|
||||||
Objective *next;
|
Objective *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Challenge {
|
struct Challenge
|
||||||
|
{
|
||||||
int type;
|
int type;
|
||||||
int value;
|
int value;
|
||||||
int passed;
|
int passed;
|
||||||
Challenge *next;
|
Challenge *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
int isChallenge;
|
int isChallenge;
|
||||||
int timeLimit;
|
int timeLimit;
|
||||||
int killLimit;
|
int killLimit;
|
||||||
|
@ -283,7 +301,8 @@ typedef struct {
|
||||||
Challenge *challenges[MAX_CHALLENGES];
|
Challenge *challenges[MAX_CHALLENGES];
|
||||||
} ChallengeData;
|
} ChallengeData;
|
||||||
|
|
||||||
struct Mission {
|
struct Mission
|
||||||
|
{
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
char description[MAX_DESCRIPTION_LENGTH];
|
char description[MAX_DESCRIPTION_LENGTH];
|
||||||
char filename[MAX_DESCRIPTION_LENGTH];
|
char filename[MAX_DESCRIPTION_LENGTH];
|
||||||
|
@ -304,7 +323,8 @@ struct Mission {
|
||||||
Mission *next;
|
Mission *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct StarSystem {
|
struct StarSystem
|
||||||
|
{
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
char description[MAX_DESCRIPTION_LENGTH];
|
char description[MAX_DESCRIPTION_LENGTH];
|
||||||
int side;
|
int side;
|
||||||
|
@ -320,7 +340,8 @@ struct StarSystem {
|
||||||
StarSystem *next;
|
StarSystem *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Quadtree {
|
struct Quadtree
|
||||||
|
{
|
||||||
int depth;
|
int depth;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
Entity **ents;
|
Entity **ents;
|
||||||
|
@ -330,7 +351,8 @@ struct Quadtree {
|
||||||
Quadtree *node[4];
|
Quadtree *node[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Spawner {
|
struct Spawner
|
||||||
|
{
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
char **types;
|
char **types;
|
||||||
int numTypes;
|
int numTypes;
|
||||||
|
@ -346,7 +368,8 @@ struct Spawner {
|
||||||
Spawner *next;
|
Spawner *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
SDL_Point camera;
|
SDL_Point camera;
|
||||||
int numAllies;
|
int numAllies;
|
||||||
int numEnemies;
|
int numEnemies;
|
||||||
|
@ -397,14 +420,16 @@ typedef struct {
|
||||||
Quadtree quadtree;
|
Quadtree quadtree;
|
||||||
} Battle;
|
} Battle;
|
||||||
|
|
||||||
struct ScriptRunner {
|
struct ScriptRunner
|
||||||
|
{
|
||||||
struct cJSON *line;
|
struct cJSON *line;
|
||||||
long delay;
|
long delay;
|
||||||
int waitForMessageBox;
|
int waitForMessageBox;
|
||||||
ScriptRunner *next;
|
ScriptRunner *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Trophy {
|
struct Trophy
|
||||||
|
{
|
||||||
char id[MAX_NAME_LENGTH];
|
char id[MAX_NAME_LENGTH];
|
||||||
char title[MAX_DESCRIPTION_LENGTH];
|
char title[MAX_DESCRIPTION_LENGTH];
|
||||||
char description[MAX_DESCRIPTION_LENGTH];
|
char description[MAX_DESCRIPTION_LENGTH];
|
||||||
|
@ -419,20 +444,23 @@ struct Trophy {
|
||||||
Trophy *next;
|
Trophy *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
int friendlyFire;
|
int friendlyFire;
|
||||||
int autoSwitchPlayerTarget;
|
int autoSwitchPlayerTarget;
|
||||||
int missileReTarget;
|
int missileReTarget;
|
||||||
int healthBars;
|
int healthBars;
|
||||||
} Gameplay;
|
} Gameplay;
|
||||||
|
|
||||||
struct Tuple {
|
struct Tuple
|
||||||
|
{
|
||||||
char key[MAX_NAME_LENGTH];
|
char key[MAX_NAME_LENGTH];
|
||||||
int value;
|
int value;
|
||||||
Tuple *next;
|
Tuple *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
StarSystem starSystemHead;
|
StarSystem starSystemHead;
|
||||||
Mission challengeMissionHead;
|
Mission challengeMissionHead;
|
||||||
Mission *currentMission;
|
Mission *currentMission;
|
||||||
|
@ -447,7 +475,8 @@ typedef struct {
|
||||||
Tuple fighterStatHead;
|
Tuple fighterStatHead;
|
||||||
} Game;
|
} Game;
|
||||||
|
|
||||||
struct Widget {
|
struct Widget
|
||||||
|
{
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
char group[MAX_NAME_LENGTH];
|
char group[MAX_NAME_LENGTH];
|
||||||
int type;
|
int type;
|
||||||
|
@ -466,14 +495,16 @@ struct Widget {
|
||||||
Widget *next;
|
Widget *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HudMessage {
|
struct HudMessage
|
||||||
|
{
|
||||||
char message[MAX_DESCRIPTION_LENGTH];
|
char message[MAX_DESCRIPTION_LENGTH];
|
||||||
SDL_Color color;
|
SDL_Color color;
|
||||||
int life;
|
int life;
|
||||||
HudMessage *next;
|
HudMessage *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MessageBox {
|
struct MessageBox
|
||||||
|
{
|
||||||
char title[MAX_NAME_LENGTH];
|
char title[MAX_NAME_LENGTH];
|
||||||
char body[MAX_DESCRIPTION_LENGTH];
|
char body[MAX_DESCRIPTION_LENGTH];
|
||||||
int time;
|
int time;
|
||||||
|
@ -482,7 +513,8 @@ struct MessageBox {
|
||||||
MessageBox *next;
|
MessageBox *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
int w;
|
int w;
|
||||||
|
@ -492,7 +524,8 @@ typedef struct {
|
||||||
int button[MAX_MOUSE_BUTTONS];
|
int button[MAX_MOUSE_BUTTONS];
|
||||||
} Mouse;
|
} Mouse;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
char saveDir[MAX_FILENAME_LENGTH];
|
char saveDir[MAX_FILENAME_LENGTH];
|
||||||
int saveGame;
|
int saveGame;
|
||||||
int winWidth;
|
int winWidth;
|
||||||
|
@ -522,7 +555,8 @@ typedef struct {
|
||||||
int textWidth;
|
int textWidth;
|
||||||
} App;
|
} App;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
SDL_Color red;
|
SDL_Color red;
|
||||||
SDL_Color orange;
|
SDL_Color orange;
|
||||||
SDL_Color yellow;
|
SDL_Color yellow;
|
||||||
|
@ -536,7 +570,8 @@ typedef struct {
|
||||||
SDL_Color darkGrey;
|
SDL_Color darkGrey;
|
||||||
} Colors;
|
} Colors;
|
||||||
|
|
||||||
struct Credit {
|
struct Credit
|
||||||
|
{
|
||||||
char *text;
|
char *text;
|
||||||
float y;
|
float y;
|
||||||
int size;
|
int size;
|
||||||
|
@ -544,28 +579,33 @@ struct Credit {
|
||||||
Credit *next;
|
Credit *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Font {
|
struct Font
|
||||||
|
{
|
||||||
char name[MAX_NAME_LENGTH];
|
char name[MAX_NAME_LENGTH];
|
||||||
SDL_Texture *texture;
|
SDL_Texture *texture;
|
||||||
SDL_Rect glyphs[MAX_GLYPHS];
|
SDL_Rect glyphs[MAX_GLYPHS];
|
||||||
Font *next;
|
Font *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Bucket {
|
struct Bucket
|
||||||
|
{
|
||||||
char *key, *value;
|
char *key, *value;
|
||||||
Bucket *next;
|
Bucket *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
Bucket **bucket;
|
Bucket **bucket;
|
||||||
int *bucketCount;
|
int *bucketCount;
|
||||||
} HashTable;
|
} HashTable;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
int32_t magicNumber, version, stringCount;
|
int32_t magicNumber, version, stringCount;
|
||||||
int32_t originalOffset, translationOffset;
|
int32_t originalOffset, translationOffset;
|
||||||
} MOHeader;
|
} MOHeader;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
int32_t length, offset;
|
int32_t length, offset;
|
||||||
} MOEntry;
|
} MOEntry;
|
||||||
|
|
|
@ -19,11 +19,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "atlas.h"
|
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
#include "../system/io.h"
|
#include "../system/io.h"
|
||||||
#include "../system/textures.h"
|
#include "../system/textures.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
|
#include "atlas.h"
|
||||||
|
|
||||||
static void loadAtlasData(void);
|
static void loadAtlasData(void);
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "controls.h"
|
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../system/widgets.h"
|
|
||||||
#include "../system/io.h"
|
#include "../system/io.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "controls.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -19,8 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "dev.h"
|
|
||||||
#include "../galaxy/mission.h"
|
#include "../galaxy/mission.h"
|
||||||
|
#include "dev.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
|
@ -19,10 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "draw.h"
|
|
||||||
|
#include "../system/input.h"
|
||||||
#include "../system/text.h"
|
#include "../system/text.h"
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
#include "../system/input.h"
|
#include "draw.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
@ -172,14 +173,22 @@ void drawCircle(int cx, int cy, int radius, int r, int g, int b, int a)
|
||||||
|
|
||||||
while (x >= y)
|
while (x >= y)
|
||||||
{
|
{
|
||||||
p[0].x = x + cx; p[0].y = y + cy;
|
p[0].x = x + cx;
|
||||||
p[1].x = y + cx; p[1].y = x + cy;
|
p[0].y = y + cy;
|
||||||
p[2].x = -x + cx; p[2].y = y + cy;
|
p[1].x = y + cx;
|
||||||
p[3].x = -y + cx; p[3].y = x + cy;
|
p[1].y = x + cy;
|
||||||
p[4].x = -x + cx; p[4].y = -y + cy;
|
p[2].x = -x + cx;
|
||||||
p[5].x = -y + cx; p[5].y = -x + cy;
|
p[2].y = y + cy;
|
||||||
p[6].x = x + cx; p[6].y = -y + cy;
|
p[3].x = -y + cx;
|
||||||
p[7].x = y + cx; p[7].y = -x + cy;
|
p[3].y = x + cy;
|
||||||
|
p[4].x = -x + cx;
|
||||||
|
p[4].y = -y + cy;
|
||||||
|
p[5].x = -y + cx;
|
||||||
|
p[5].y = -x + cy;
|
||||||
|
p[6].x = x + cx;
|
||||||
|
p[6].y = -y + cy;
|
||||||
|
p[7].x = y + cx;
|
||||||
|
p[7].y = -x + cy;
|
||||||
SDL_RenderDrawPoints(app.renderer, p, 8);
|
SDL_RenderDrawPoints(app.renderer, p, 8);
|
||||||
|
|
||||||
y++;
|
y++;
|
||||||
|
|
|
@ -18,8 +18,8 @@ Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
#include "../system/io.h"
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,43 +18,45 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include <locale.h>
|
||||||
#include "init.h"
|
|
||||||
#include <SDL2/SDL_image.h>
|
#include <SDL2/SDL_image.h>
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include <SDL2/SDL_mixer.h>
|
#include <SDL2/SDL_mixer.h>
|
||||||
#include <SDL2/SDL_ttf.h>
|
#include <SDL2/SDL_ttf.h>
|
||||||
#include "../game/credits.h"
|
|
||||||
#include "../system/widgets.h"
|
#include "../common.h"
|
||||||
#include "../battle/bullets.h"
|
|
||||||
#include "../system/modalDialog.h"
|
|
||||||
#include "../system/io.h"
|
|
||||||
#include "../galaxy/starSystems.h"
|
|
||||||
#include "../system/draw.h"
|
|
||||||
#include "../battle/starfield.h"
|
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../challenges/challenges.h"
|
|
||||||
#include "../system/controls.h"
|
|
||||||
#include "../battle/fighters.h"
|
|
||||||
#include "../game/game.h"
|
|
||||||
#include "../battle/battle.h"
|
#include "../battle/battle.h"
|
||||||
#include "../game/options.h"
|
#include "../battle/bullets.h"
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../system/i18n.h"
|
|
||||||
#include "../system/atlas.h"
|
|
||||||
#include "../system/resources.h"
|
|
||||||
#include "../battle/capitalShips.h"
|
#include "../battle/capitalShips.h"
|
||||||
#include "../system/input.h"
|
#include "../battle/fighters.h"
|
||||||
#include "../game/stats.h"
|
|
||||||
#include "../galaxy/galacticMap.h"
|
|
||||||
#include "../game/trophies.h"
|
|
||||||
#include "../game/fighterDatabase.h"
|
|
||||||
#include "../system/textures.h"
|
|
||||||
#include "../battle/items.h"
|
#include "../battle/items.h"
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../galaxy/galacticMap.h"
|
||||||
|
#include "../galaxy/starSystems.h"
|
||||||
|
#include "../game/credits.h"
|
||||||
|
#include "../game/fighterDatabase.h"
|
||||||
|
#include "../game/game.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
#include "../plat/win32/win32Init.h"
|
#include "../plat/win32/win32Init.h"
|
||||||
#include "locale.h"
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/controls.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/i18n.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/modalDialog.h"
|
||||||
|
#include "../system/resources.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "init.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
|
|
||||||
|
@ -162,27 +164,7 @@ void initSDL(int argc, char *argv[])
|
||||||
void initGameSystem(void)
|
void initGameSystem(void)
|
||||||
{
|
{
|
||||||
int i, numInitFuns;
|
int i, numInitFuns;
|
||||||
void (*initFuncs[]) (void) = {
|
void (*initFuncs[])(void) = {initGraphics, initFonts, initResources, initSounds, initWidgets, initGame, loadFighterDefs, loadCapitalShipDefs, loadItemDefs, initBulletDefs, initStarSystems, initChallenges, initStats, initModalDialog, initStars, initControls, initTrophies, initFighterDatabase, updateCustomResolutionOption};
|
||||||
initGraphics,
|
|
||||||
initFonts,
|
|
||||||
initResources,
|
|
||||||
initSounds,
|
|
||||||
initWidgets,
|
|
||||||
initGame,
|
|
||||||
loadFighterDefs,
|
|
||||||
loadCapitalShipDefs,
|
|
||||||
loadItemDefs,
|
|
||||||
initBulletDefs,
|
|
||||||
initStarSystems,
|
|
||||||
initChallenges,
|
|
||||||
initStats,
|
|
||||||
initModalDialog,
|
|
||||||
initStars,
|
|
||||||
initControls,
|
|
||||||
initTrophies,
|
|
||||||
initFighterDatabase,
|
|
||||||
updateCustomResolutionOption
|
|
||||||
};
|
|
||||||
|
|
||||||
initAtlas();
|
initAtlas();
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "input.h"
|
|
||||||
#include "../system/atlas.h"
|
#include "../system/atlas.h"
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
#include "../system/sound.h"
|
#include "../system/sound.h"
|
||||||
|
#include "input.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include <dirent.h>
|
||||||
#include "io.h"
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "dirent.h"
|
|
||||||
|
#include "../common.h"
|
||||||
|
|
||||||
#include "../system/util.h"
|
#include "../system/util.h"
|
||||||
|
#include "io.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
#include "lookup.h"
|
|
||||||
#include <SDL2/SDL_image.h>
|
#include <SDL2/SDL_image.h>
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
|
|
||||||
|
#include "lookup.h"
|
||||||
|
|
||||||
static Lookup head;
|
static Lookup head;
|
||||||
static Lookup *tail;
|
static Lookup *tail;
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "modalDialog.h"
|
|
||||||
|
#include "../system/input.h"
|
||||||
#include "../system/text.h"
|
#include "../system/text.h"
|
||||||
#include "../system/widgets.h"
|
#include "../system/widgets.h"
|
||||||
#include "../system/input.h"
|
#include "modalDialog.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -19,9 +19,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "resources.h"
|
|
||||||
#include "../system/atlas.h"
|
#include "../system/atlas.h"
|
||||||
#include "../system/io.h"
|
#include "../system/io.h"
|
||||||
|
#include "resources.h"
|
||||||
|
|
||||||
char **backgrounds;
|
char **backgrounds;
|
||||||
char **planets;
|
char **planets;
|
||||||
|
|
|
@ -18,11 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
#include "sound.h"
|
|
||||||
#include <SDL2/SDL_mixer.h>
|
#include <SDL2/SDL_mixer.h>
|
||||||
#include "../system/util.h"
|
|
||||||
|
#include "../common.h"
|
||||||
|
|
||||||
#include "../system/io.h"
|
#include "../system/io.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "sound.h"
|
||||||
|
|
||||||
#define MAX_BATTLE_SOUND_DISTANCE 1500
|
#define MAX_BATTLE_SOUND_DISTANCE 1500
|
||||||
#define MIN_BATTLE_SOUND_DISTANCE 100
|
#define MIN_BATTLE_SOUND_DISTANCE 100
|
||||||
|
|
|
@ -18,11 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
#include "text.h"
|
|
||||||
#include <SDL2/SDL_ttf.h>
|
#include <SDL2/SDL_ttf.h>
|
||||||
#include "../system/textures.h"
|
|
||||||
|
#include "../common.h"
|
||||||
|
|
||||||
#include "../system/io.h"
|
#include "../system/io.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
#include "text.h"
|
||||||
|
|
||||||
#define FONT_SIZE 32
|
#define FONT_SIZE 32
|
||||||
#define FONT_TEXTURE_SIZE 512
|
#define FONT_TEXTURE_SIZE 512
|
||||||
|
|
|
@ -18,10 +18,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
#include "textures.h"
|
|
||||||
#include <SDL2/SDL_image.h>
|
#include <SDL2/SDL_image.h>
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
|
|
||||||
#include "../system/io.h"
|
#include "../system/io.h"
|
||||||
|
#include "textures.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "transition.h"
|
|
||||||
#include "../system/draw.h"
|
#include "../system/draw.h"
|
||||||
#include "../system/input.h"
|
#include "../system/input.h"
|
||||||
|
#include "transition.h"
|
||||||
|
|
||||||
static long transitionStartTime;
|
static long transitionStartTime;
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
|
|
||||||
#include "../json/cJSON.h"
|
#include "../json/cJSON.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
float mod(float n, float x)
|
float mod(float n, float x)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,19 +18,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
#include "widgets.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include <SDL2/SDL_image.h>
|
#include <SDL2/SDL_image.h>
|
||||||
#include "../system/lookup.h"
|
|
||||||
#include "../system/draw.h"
|
#include "../common.h"
|
||||||
#include "../system/util.h"
|
|
||||||
#include "../system/input.h"
|
#include "../json/cJSON.h"
|
||||||
#include "../system/controls.h"
|
|
||||||
#include "../system/sound.h"
|
|
||||||
#include "../system/io.h"
|
|
||||||
#include "../system/text.h"
|
|
||||||
#include "../system/atlas.h"
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/controls.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "widgets.h"
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -19,10 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "testMission.h"
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
#include "../galaxy/mission.h"
|
|
||||||
#include "../battle/battle.h"
|
#include "../battle/battle.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "testMission.h"
|
||||||
|
|
||||||
extern Game game;
|
extern Game game;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue