Starting to move data loader to its own package

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-14 19:34:39 +01:00
parent 052b5afd2e
commit f225ca728e
21 changed files with 146 additions and 39 deletions

View File

@@ -1,12 +1,12 @@
import 'dart:math' as math;
import 'package:wolf_dart/classes/matrix.dart';
import 'package:wolf_3d_data/wolf_3d_data.dart';
import 'package:wolf_dart/features/entities/map_objects.dart';
class Pushwall {
int x;
int y;
int mapId; // The wall texture ID
int mapId;
int dirX = 0;
int dirY = 0;
double offset = 0.0;
@@ -19,7 +19,7 @@ class PushwallManager {
final Map<String, Pushwall> pushwalls = {};
Pushwall? activePushwall;
void initPushwalls(Matrix<int> wallGrid, Matrix<int> objectGrid) {
void initPushwalls(Sprite wallGrid, Sprite objectGrid) {
pushwalls.clear();
activePushwall = null;
@@ -32,7 +32,7 @@ class PushwallManager {
}
}
void update(Duration elapsed, Matrix<int> wallGrid) {
void update(Duration elapsed, Sprite wallGrid) {
if (activePushwall == null) return;
final pw = activePushwall!;
@@ -85,7 +85,7 @@ class PushwallManager {
double playerX,
double playerY,
double playerAngle,
Matrix<int> wallGrid,
Sprite wallGrid,
) {
// Only one pushwall can move at a time in the original engine!
if (activePushwall != null) return;