Remove testbattle - superseded by the JSON-driven battle cutscene
testBattleStart() was never actually called anywhere (its only trace was a stray unused include in uimainmenu.c) - battletest.jsonc's START_BATTLE/REGULAR_BATTLE flow replaces it. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -10,6 +10,3 @@ target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
|||||||
battlefighter.c
|
battlefighter.c
|
||||||
party.c
|
party.c
|
||||||
)
|
)
|
||||||
|
|
||||||
# Subdirs
|
|
||||||
add_subdirectory(testbattle)
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
# Copyright (c) 2026 Dominic Masters
|
|
||||||
#
|
|
||||||
# This software is released under the MIT License.
|
|
||||||
# https://opensource.org/licenses/MIT
|
|
||||||
|
|
||||||
# Sources
|
|
||||||
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
|
||||||
PUBLIC
|
|
||||||
testbattle.c
|
|
||||||
)
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2026 Dominic Masters
|
|
||||||
*
|
|
||||||
* This software is released under the MIT License.
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "testbattle.h"
|
|
||||||
#include "rpg/battle/battle.h"
|
|
||||||
#include "scene/scene.h"
|
|
||||||
|
|
||||||
void testBattleStart(void) {
|
|
||||||
battleInit();
|
|
||||||
|
|
||||||
const battlefighterstats_t allyOneStats =
|
|
||||||
{ .attack = 10, .defense = 5, .magic = 0, .speed = 10, .luck = 0 };
|
|
||||||
const battlefighterstats_t allyTwoStats =
|
|
||||||
{ .attack = 8, .defense = 4, .magic = 0, .speed = 8, .luck = 0 };
|
|
||||||
const battlefighterstats_t enemyOneStats =
|
|
||||||
{ .attack = 6, .defense = 3, .magic = 0, .speed = 6, .luck = 0 };
|
|
||||||
const battlefighterstats_t enemyTwoStats =
|
|
||||||
{ .attack = 7, .defense = 3, .magic = 0, .speed = 5, .luck = 0 };
|
|
||||||
|
|
||||||
battleAddFighter(
|
|
||||||
BATTLE_FIGHTER_TEAM_ALLY, BATTLE_FIGHTER_CONTROLLER_PLAYER,
|
|
||||||
allyOneStats, 30, 10
|
|
||||||
);
|
|
||||||
battleAddFighter(
|
|
||||||
BATTLE_FIGHTER_TEAM_ALLY, BATTLE_FIGHTER_CONTROLLER_PLAYER,
|
|
||||||
allyTwoStats, 25, 10
|
|
||||||
);
|
|
||||||
battleAddFighter(
|
|
||||||
BATTLE_FIGHTER_TEAM_ENEMY, BATTLE_FIGHTER_CONTROLLER_AI,
|
|
||||||
enemyOneStats, 20, 5
|
|
||||||
);
|
|
||||||
battleAddFighter(
|
|
||||||
BATTLE_FIGHTER_TEAM_ENEMY, BATTLE_FIGHTER_CONTROLLER_AI,
|
|
||||||
enemyTwoStats, 20, 5
|
|
||||||
);
|
|
||||||
|
|
||||||
battleStart(BATTLE_ENCOUNTER_REGULAR, true);
|
|
||||||
sceneSet(SCENE_TYPE_BATTLE);
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2026 Dominic Masters
|
|
||||||
*
|
|
||||||
* This software is released under the MIT License.
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include "error/error.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TEMPORARY test hook: sets up a hardcoded mock battle and switches to the
|
|
||||||
* battle scene, so the battle scene (camera/fighters/HUD) can be seen and
|
|
||||||
* played without a real encounter trigger yet.
|
|
||||||
*/
|
|
||||||
void testBattleStart(void);
|
|
||||||
@@ -31,9 +31,8 @@ void saveSlotNewGame(saveslot_t *slot) {
|
|||||||
sizeof(slot->cachedData.mapName)
|
sizeof(slot->cachedData.mapName)
|
||||||
);
|
);
|
||||||
|
|
||||||
// TEMPORARY: placeholder starting party, same stats shape as
|
// TEMPORARY: placeholder starting party stats - replace once there's a
|
||||||
// rpg/battle/testbattle/testbattle.c's mock allies - replace once
|
// real starting-party/character-creation flow.
|
||||||
// there's a real starting-party/character-creation flow.
|
|
||||||
const battlefighterstats_t startingStats =
|
const battlefighterstats_t startingStats =
|
||||||
{ .attack = 10, .defense = 5, .magic = 0, .speed = 10, .luck = 0 };
|
{ .attack = 10, .defense = 5, .magic = 0, .speed = 10, .luck = 0 };
|
||||||
partyAddMember(&slot->party, startingStats, 30, 10);
|
partyAddMember(&slot->party, startingStats, 30, 10);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "uimainmenu.h"
|
#include "uimainmenu.h"
|
||||||
#include "ui/widget/uiframe.h"
|
#include "ui/widget/uiframe.h"
|
||||||
#include "rpg/battle/testbattle/testbattle.h"
|
|
||||||
#include "util/memory.h"
|
#include "util/memory.h"
|
||||||
#include "display/spritebatch/spritebatch.h"
|
#include "display/spritebatch/spritebatch.h"
|
||||||
#include "display/screen/screen.h"
|
#include "display/screen/screen.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user