-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCanvas.cs
More file actions
622 lines (526 loc) · 18.1 KB
/
Copy pathCanvas.cs
File metadata and controls
622 lines (526 loc) · 18.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using System.DirectoryServices.ActiveDirectory;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TrackBar;
using FFRMapEditorMono.MysticQuest;
using FFRMapEditorMono.FFR;
using System.Windows.Forms;
using Microsoft.VisualBasic.Devices;
namespace FFRMapEditorMono
{
public enum PositionIndicatorMode
{
None,
Cursor,
Corner,
}
public class Canvas
{
protected GraphicsDevice graphicsDevice;
protected SpriteBatch spriteBatch;
protected MouseState mouse;
protected KeyboardState keyboard;
protected FileManager fileManager;
protected TaskManager taskManager;
public Texture2D TileSet { get; set; }
protected RenderTarget2D mapTexture;
protected byte[] mapCanvas { get => targetMaps[owMapCurrentTarget]; }
protected Vector2 viewOffset;
protected SpriteFont font;
public float Zoom { get; set; }
public int GridSize { get; set; }
protected int MapSizeX;
protected int MapSizeY;
protected PositionIndicatorMode positionMode;
protected int owMapCurrentTarget;
protected int owMapBackSteps;
protected int owMapForwardSteps;
protected int owMapUndoDepth;
protected bool currentlyDrawing;
protected bool currentlySelecting;
protected List<byte[]> targetMaps;
protected byte[,] pasteBin;
protected Selector selector;
protected Point currentTileCoordinates => new Point((int)(mouse.Position.X - viewOffset.X) / (int)(16 * Zoom), (int)(mouse.Position.Y - viewOffset.Y) / (int)(16 * Zoom));
protected Point previousTileCoordinates;
public bool UnsavedChanges { get; set; }
public Canvas(Dictionary<string, Texture2D> _textures, SpriteFont _font, GraphicsDevice _graphicsDevice, SpriteBatch _spriteBatch, FileManager _fileManager, TaskManager _taskmanager, MouseState _mouse, KeyboardState _keyboard)
{
BaseInitialization(_textures, _font, _graphicsDevice, _spriteBatch, _fileManager, _taskmanager, _mouse, _keyboard);
}
public void BaseInitialization(Dictionary<string, Texture2D> _textures, SpriteFont _font, GraphicsDevice _graphicsDevice, SpriteBatch _spriteBatch, FileManager _fileManager, TaskManager _taskmanager, MouseState _mouse, KeyboardState _keyboard)
{
// Globals
graphicsDevice = _graphicsDevice;
spriteBatch = _spriteBatch;
fileManager = _fileManager;
taskManager = _taskmanager;
mouse = _mouse;
keyboard = _keyboard;
font = _font;
// Parameters
owMapCurrentTarget = 0;
owMapBackSteps = 0;
owMapForwardSteps = 0;
GridSize = 32;
MapSizeX = 256;
MapSizeY = 256;
currentlyDrawing = false;
currentlySelecting = false;
viewOffset = new(0, 0);
Zoom = 1.0f;
positionMode = PositionIndicatorMode.None;
previousTileCoordinates = new Point(currentTileCoordinates.X, currentTileCoordinates.Y);
UnsavedChanges = false;
// Initialize
selector = new Selector();
owMapUndoDepth = _fileManager.Settings.GetUndoDepth();
targetMaps = Enumerable.Range(0, owMapUndoDepth + 1).Select(i => new byte[MapSizeX * MapSizeY]).ToList();
mapTexture = new(graphicsDevice, 4096, 4096, true, SurfaceFormat.Color, DepthFormat.Depth24, 0, RenderTargetUsage.PreserveContents);
}
protected void CreateBackup()
{
int nextTarget = owMapCurrentTarget < owMapUndoDepth ? owMapCurrentTarget + 1 : 0;
if (owMapBackSteps < owMapUndoDepth)
{
owMapBackSteps++;
}
owMapForwardSteps = 0;
targetMaps[owMapCurrentTarget].CopyTo(targetMaps[nextTarget], 0);
owMapCurrentTarget = nextTarget;
}
public virtual void Undo()
{
if (owMapBackSteps == 0)
{
return;
}
int previousTarget = owMapCurrentTarget > 0 ? owMapCurrentTarget - 1 : owMapUndoDepth;
owMapBackSteps--;
if (owMapForwardSteps < owMapUndoDepth)
{
owMapForwardSteps++;
}
owMapCurrentTarget = previousTarget;
DrawMap();
}
public virtual void UpdateTileCoordinates(TaskManager tasks)
{
if (currentTileCoordinates != previousTileCoordinates)
{
previousTileCoordinates = new(currentTileCoordinates.X, currentTileCoordinates.Y);
tasks.Add(new EditorTask(EditorTasks.InfoBoxUpdateCoordinates, currentTileCoordinates.Y * 256 + currentTileCoordinates.X));
}
}
public virtual void Copy(CurrentTool tool)
{
if (!taskManager.Pop(EditorTasks.Copy) || (tool.Tool != ToolAction.Selector))
{
return;
}
var selection = selector.GetRectangle();
pasteBin = new byte[selection.Height, selection.Width];
for (int y = 0; y < selection.Height; y++)
{
for (int x = 0; x < selection.Width; x++)
{
pasteBin[y, x] = (byte)(mapCanvas[x + selection.Left + ((y + selection.Top) * MapSizeX)] & 0x7F);
}
}
}
public virtual void Paste(CurrentTool tool)
{
if (tool.Tool != ToolAction.Selector)
{
return;
}
var selection = selector.GetRectangle();
pasteBin = new byte[selection.Width, selection.Height];
for (int y = 0; y < selection.Height; y++)
{
for (int x = 0; x < selection.Width; x++)
{
pasteBin[x, y] = mapCanvas[x + selection.Left + ((y + selection.Top) * selection.Width)];
}
}
}
public void Paste(Point windowSize, CurrentTool tool)
{
if (!mouse.LeftDown && !mouse.LeftClick || tool.Tool != ToolAction.Paster)
{
return;
}
if (mouse.Position.X < 0 || mouse.Position.Y < 0 || mouse.Position.X > windowSize.X || mouse.Position.Y > windowSize.Y)
{
return;
}
int middlex = (int)(mouse.Position.X - viewOffset.X) / (int)(16 * Zoom);
int middley = (int)(mouse.Position.Y - viewOffset.Y) / (int)(16 * Zoom);
if (middlex >= MapSizeX || middley >= MapSizeY || middlex < 0 || middley < 0)
{
return;
}
if (currentlyDrawing == false)
{
CreateBackup();
currentlyDrawing = true;
}
int sizex = pasteBin.GetLength(1);
int sizey = pasteBin.GetLength(0);
int minsizex = sizex / 2;
int minsizey = sizey / 2;
graphicsDevice.SetRenderTarget(mapTexture);
spriteBatch.Begin(samplerState: SamplerState.PointClamp);
for (int y = 0; y < sizey; y++)
{
for (int x = 0; x < sizex; x++)
{
int targetx = middlex + x - minsizex;
int targety = middley + y - minsizey;
if (targetx >= 0 && targetx < MapSizeX && targety >= 0 && targety < MapSizeY)
{
mapCanvas[targety * MapSizeX + targetx] = AdjustPutTile(pasteBin[y, x]);
spriteBatch.Draw(TileSet, new Vector2(targetx * 16, targety * 16), GetTileRectangle(pasteBin[y, x]), Color.White, 0.0f, new Vector2(0.0f, 0.0f), 1.0f, SpriteEffects.None, 0.0f);
}
}
}
spriteBatch.End();
graphicsDevice.SetRenderTarget(null);
taskManager.Add(EditorTasks.RestoreTool);
UnsavedChanges = true;
}
public virtual void Redo()
{
if (owMapForwardSteps == 0)
{
return;
}
owMapForwardSteps--;
if (owMapBackSteps < owMapUndoDepth)
{
owMapBackSteps++;
}
int nextTarget = owMapCurrentTarget < owMapUndoDepth ? owMapCurrentTarget + 1 : 0;
owMapCurrentTarget = nextTarget;
DrawMap();
}
public virtual void LoadData() { }
public virtual void ProcessTasks()
{
EditorTask task;
if (taskManager.Pop(EditorTasks.OverworldLoadMap, out task))
{
LoadData();
taskManager.Add(EditorTasks.ReloadPicker);
taskManager.Add(EditorTasks.ReloadTileViewer);
}
if (taskManager .Pop(EditorTasks.OverworldBlueMap, out task))
{
BlueMap();
}
if (taskManager.Pop(EditorTasks.Undo, out task))
{
Undo();
}
if (taskManager.Pop(EditorTasks.Redo, out task))
{
Redo();
}
if (taskManager.Pop(EditorTasks.UpdateGridsize, out task))
{
GridSize *= 2;
if (GridSize >= MapSizeX || GridSize >= MapSizeY)
{
GridSize = 8;
}
}
if (taskManager.Pop(EditorTasks.TogglePositionIndicator, out task))
{
positionMode++;
if (positionMode > PositionIndicatorMode.Corner)
{
positionMode = PositionIndicatorMode.None;
}
}
}
public byte[] GetOwBytes()
{
return mapCanvas;
}
public Vector2 GetViewOffset()
{
return viewOffset;
}
public void UpdateView(Vector2 offset, Point windowSize)
{
Vector2 maparea = new Vector2(MapSizeX * 16 * Zoom - windowSize.X, MapSizeY * 16 * Zoom - windowSize.Y);
Vector2 max = new Vector2(-Math.Max(maparea.X + (MapSizeX / 2), 0), -Math.Max(maparea.Y + (MapSizeY / 2), 0));
viewOffset = new(Math.Max(max.X, Math.Min(Math.Max((MapSizeX / 2), -(maparea.X)), viewOffset.X - (offset.X))), Math.Max(max.Y, Math.Min(Math.Max((MapSizeY / 2), -(maparea.Y)), viewOffset.Y - (offset.Y))));
}
public void JumpToLocationView(Vector2 offset, Point windowSize)
{
int targetx = ((int)(offset.X - viewOffset.X) / (int)(16 * Zoom));
int targety = ((int)(offset.Y - viewOffset.Y) / (int)(16 * Zoom));
viewOffset = new(-(targetx * (int)(16 * Zoom) - windowSize.X / 2), -(targety * (int)(16 * Zoom) - windowSize.Y / 2));
}
public void UpdateZoom(Point windowSize)
{
if (mouse.ScrollUp && Zoom < 4.0f)
{
Zoom = Math.Min(4.0f, Zoom * 2);
viewOffset = new(viewOffset.X * 2 - mouse.Position.X, viewOffset.Y * 2 - mouse.Position.Y);
}
else if (mouse.ScrollDown && Zoom > 0.25f)
{
Zoom = Math.Max(0.25f, Zoom / 2);
viewOffset = new(viewOffset.X * 0.5f + (windowSize.X * 0.25f), viewOffset.Y * 0.5f + (windowSize.Y * 0.25f));
UpdateView(new Vector2(0, 0), windowSize);
}
}
public virtual void DrawMap() { }
public virtual void BlueMap() { }
public virtual JsonMap ExportJsonMap()
{
return new JsonMap();
}
public virtual OwMapExchangeData ExportMapExchange()
{
return new OwMapExchangeData();
}
public virtual void Selector(Point windowSize, CurrentTool tool)
{
if (tool.Tool != ToolAction.Selector)
{
selector.Enable = false;
return;
}
selector.Enable = true;
/*
if ((!mouse.LeftDown && !mouse.LeftClick))
{
return;
}*/
int targetx = ((int)(mouse.Position.X - viewOffset.X) / (int)(16 * Zoom));
int targety = ((int)(mouse.Position.Y - viewOffset.Y) / (int)(16 * Zoom));
if (currentlySelecting)
{
targetx = Math.Max(Math.Min(targetx, MapSizeX), 0);
targety = Math.Max(Math.Min(targety, MapSizeY), 0);
selector.FinalPosition = new Vector2(targetx, targety);
}
if (!mouse.LeftDown)
{
currentlySelecting = false;
}
if (mouse.Position.X < 0 || mouse.Position.Y < 0 || mouse.Position.X > windowSize.X || mouse.Position.Y > windowSize.Y)
{
return;
}
if (mouse.LeftClick && !currentlySelecting)
{
currentlySelecting = true;
targetx = Math.Max(Math.Min(targetx, MapSizeX), 0);
targety = Math.Max(Math.Min(targety, MapSizeY), 0);
selector.InitialPosition = new Vector2(targetx, targety);
selector.FinalPosition = new Vector2(targetx, targety);
}
}
public virtual void UpdateTile(Point windowSize, CurrentTool tool)
{
if ((!mouse.LeftDown && !mouse.LeftClick) || ((tool.Tool != ToolAction.Pencil && tool.Tool != ToolAction.Brush)))
{
if (!mouse.LeftDown && currentlyDrawing && (tool.Tool == ToolAction.Pencil || tool.Tool == ToolAction.Brush))
{
currentlyDrawing = false;
}
return;
}
if (mouse.Position.X < 0 || mouse.Position.Y < 0 || mouse.Position.X > windowSize.X || mouse.Position.Y > windowSize.Y)
{
return;
}
int middlex = ((int)(mouse.Position.X - viewOffset.X) / (int)(16 * Zoom));
int middley = ((int)(mouse.Position.Y - viewOffset.Y) / (int)(16 * Zoom));
if (middlex >= MapSizeX || middley >= MapSizeY || middlex < 0 || middley < 0)
{
return;
}
if (currentlyDrawing == false)
{
CreateBackup();
currentlyDrawing = true;
}
int minsize = 0;
int maxsize = 0;
int brushsize = (tool.Tool == ToolAction.Brush) ? tool.BrushSize : 1;
if (tool.Tool == ToolAction.Brush)
{
minsize = -(tool.BrushSize / 2);
maxsize = (tool.BrushSize / 2);
}
graphicsDevice.SetRenderTarget(mapTexture);
spriteBatch.Begin(samplerState: SamplerState.PointClamp);
for (int y = minsize; y <= maxsize; y++)
{
for (int x = minsize; x <= maxsize; x++)
{
int targetx = middlex + x;
int targety = middley + y;
if (targetx >= 0 && targetx < MapSizeX && targety >= 0 && targety < MapSizeY)
{
mapCanvas[targety * MapSizeX + targetx] = AdjustPutTile(tool.Tile);
spriteBatch.Draw(TileSet, new Vector2(targetx * 16, targety * 16), GetTileRectangle(tool.Tile), Color.White, 0.0f, new Vector2(0.0f, 0.0f), 1.0f, SpriteEffects.None, 0.0f);
}
}
}
spriteBatch.End();
graphicsDevice.SetRenderTarget(null);
UnsavedChanges = true;
}
protected virtual byte AdjustPutTile(byte tile)
{
return tile;
}
protected virtual byte AdjustGetTile(byte tile)
{
return tile;
}
public List<EditorTask> GetTile()
{
int targetx = ((int)(mouse.Position.X - viewOffset.X) / (int)(16 * Zoom));
int targety = ((int)(mouse.Position.Y - viewOffset.Y) / (int)(16 * Zoom));
if (targetx >= MapSizeX || targety >= MapSizeY || targetx < 0 || targety < 0)
{
return new();
}
int tilevalue = AdjustGetTile(mapCanvas[targety * MapSizeX + targetx]);
List<EditorTask> mouseTasks = new();
if (mouse.RightClick)
{
mouseTasks.Add(new EditorTask(EditorTasks.TilesPickerUpdate, tilevalue));
mouseTasks.Add(new EditorTask(EditorTasks.TilesUpdate, tilevalue));
}
if (currentTileCoordinates != previousTileCoordinates)
{
previousTileCoordinates = new(currentTileCoordinates.X, currentTileCoordinates.Y);
mouseTasks.Add(new EditorTask(EditorTasks.InfoBoxUpdateCoordinates, currentTileCoordinates.Y * 256 + currentTileCoordinates.X));
}
return mouseTasks;
}
protected Rectangle GetTileRectangle(byte tile)
{
int tilex = tile % 0x10;
int tiley = tile / 0x10;
return new Rectangle(tilex * 16, tiley * 16, 16, 16);
}
public void Draw(WindowsManager manager, CurrentTool tool, Point windowSize)
{
spriteBatch.Begin(samplerState: SamplerState.PointClamp);
DrawMapLayer(manager, tool, windowSize);
DrawOverlayLayer(manager, tool, windowSize);
DrawCursorLayer(manager, tool, windowSize);
spriteBatch.End();
}
public virtual void DrawMapLayer(WindowsManager manager, CurrentTool tool, Point windowSize)
{
spriteBatch.Draw(mapTexture, viewOffset, new Rectangle(0, 0, mapTexture.Width, mapTexture.Height), Color.White, 0.0f, new Vector2(0.0f, 0.0f), Zoom, SpriteEffects.None, 0.0f);
if (manager.ShowGridlines || manager.ShowDomainOverlay)
{
DrawGrid(manager.ShowDomainOverlay);
}
}
public virtual void DrawOverlayLayer(WindowsManager manager, CurrentTool tool, Point windowSize)
{
DrawSelection(selector.ShowSelection);
}
public virtual void DrawCursorLayer(WindowsManager manager, CurrentTool tool, Point windowSize)
{
DrawBrush(tool);
DrawPasteBin(tool);
}
public void DrawSelection(bool enabled)
{
if (!enabled)
{
return;
}
Rectangle maparea = selector.GetRectangle();
Rectangle drawarea = new Rectangle(0, 0, (int)(maparea.Width * 16), (int)(maparea.Height * 16));
if (maparea.Height <= 1 && maparea.Width <= 1 && !currentlySelecting)
{
return;
}
// Draw Background
Texture2D background = new Texture2D(spriteBatch.GraphicsDevice, 1, 1);
background.SetData(new[] { Color.DarkSlateGray });
spriteBatch.Draw(background, new Vector2(viewOffset.X + (maparea.Left * 16) * Zoom, viewOffset.Y + (maparea.Top * 16) * Zoom), drawarea, new Color(255, 255, 255, 205), 0.0f, new Vector2(0.0f, 0.0f), Zoom, SpriteEffects.None, 0.0f);
}
public void DrawGrid(bool showdomains)
{
int gridsize = showdomains ? 32 : GridSize;
Texture2D line = new Texture2D(spriteBatch.GraphicsDevice, 1, 1);
line.SetData(new[] { Color.Red });
int liney = MapSizeY / gridsize;
int linex = MapSizeX / gridsize;
for (int y = 0; y < liney; y++)
{
for (int x = 0; x < linex; x++)
{
spriteBatch.Draw(line, new Vector2(viewOffset.X + (x * gridsize * 16) * Zoom, viewOffset.Y + (y * gridsize * 16) * Zoom), new Rectangle(0, 0, (int)(gridsize * 16 * Zoom), 2), Color.White);
spriteBatch.Draw(line, new Vector2(viewOffset.X + (x * gridsize * 16) * Zoom, viewOffset.Y + (y * gridsize * 16) * Zoom), new Rectangle(0, 0, 2, (int)(gridsize * 16 * Zoom)), Color.White);
}
}
spriteBatch.Draw(line, new Vector2(viewOffset.X + ((linex * gridsize * 16) * Zoom - 2), viewOffset.Y), new Rectangle(0, 0, 2, (int)(MapSizeY * 16 * Zoom)), Color.White);
spriteBatch.Draw(line, new Vector2(viewOffset.X, viewOffset.Y + ((liney * gridsize * 16) * Zoom - 2)), new Rectangle(0, 0, (int)(MapSizeX * 16 * Zoom), 2), Color.White);
}
public void DrawBrush(CurrentTool tool)
{
if (tool.Tool != ToolAction.Brush && tool.Tool != ToolAction.Pencil)
{
return;
}
int minsize = 0;
int maxsize = 0;
if (tool.Tool == ToolAction.Brush)
{
minsize = -(tool.BrushSize / 2);
maxsize = (tool.BrushSize / 2);
}
int middlex = ((int)(mouse.Position.X - viewOffset.X) / (int)(16 * Zoom));
int middley = ((int)(mouse.Position.Y - viewOffset.Y) / (int)(16 * Zoom));
for (int y = minsize; y <= maxsize; y++)
{
for (int x = minsize; x <= maxsize; x++)
{
spriteBatch.Draw(TileSet, new Vector2(viewOffset.X + (middlex + x) * 16 * Zoom, viewOffset.Y + (middley + y) * 16 * Zoom), GetTileRectangle(tool.Tile), Color.White, 0.0f, new Vector2(0.0f, 0.0f), Zoom, SpriteEffects.None, 0.0f);
}
}
}
public void DrawPasteBin(CurrentTool tool)
{
if (tool.Tool != ToolAction.Paster)
{
return;
}
int sizex = pasteBin.GetLength(1);
int sizey = pasteBin.GetLength(0);
int minsizex = sizex / 2;
int minsizey = sizey / 2;
int middlex = (int)(mouse.Position.X - viewOffset.X) / (int)(16 * Zoom);
int middley = (int)(mouse.Position.Y - viewOffset.Y) / (int)(16 * Zoom);
for (int y = 0; y < sizey; y++)
{
for (int x = 0; x < sizex; x++)
{
spriteBatch.Draw(TileSet, new Vector2(viewOffset.X + (middlex + x - minsizex) * 16 * Zoom, viewOffset.Y + (middley + y - minsizey) * 16 * Zoom), GetTileRectangle(pasteBin[y, x]), Color.White, 0.0f, new Vector2(0.0f, 0.0f), Zoom, SpriteEffects.None, 0.0f);
}
}
}
}
}