2026-02-02 12:24:50 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
|
|
|
|
|
|
namespace wowee {
|
|
|
|
|
namespace core {
|
|
|
|
|
|
|
|
|
|
struct WindowConfig {
|
2026-02-02 23:22:58 -08:00
|
|
|
std::string title = "Wowee Native";
|
2026-02-02 12:24:50 -08:00
|
|
|
int width = 1920;
|
|
|
|
|
int height = 1080;
|
|
|
|
|
bool fullscreen = false;
|
|
|
|
|
bool vsync = true;
|
|
|
|
|
bool resizable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class Window {
|
|
|
|
|
public:
|
|
|
|
|
explicit Window(const WindowConfig& config);
|
|
|
|
|
~Window();
|
|
|
|
|
|
|
|
|
|
Window(const Window&) = delete;
|
|
|
|
|
Window& operator=(const Window&) = delete;
|
|
|
|
|
|
|
|
|
|
bool initialize();
|
|
|
|
|
void shutdown();
|
|
|
|
|
|
|
|
|
|
void swapBuffers();
|
|
|
|
|
void pollEvents();
|
|
|
|
|
|
|
|
|
|
bool shouldClose() const { return shouldCloseFlag; }
|
|
|
|
|
void setShouldClose(bool value) { shouldCloseFlag = value; }
|
|
|
|
|
|
|
|
|
|
int getWidth() const { return width; }
|
|
|
|
|
int getHeight() const { return height; }
|
Add gameplay systems: combat, spells, groups, loot, vendors, and UI
Implement ~70 new protocol opcodes across 5 phases while maintaining
full 3.3.5a private server compatibility:
- Phase 1: Server-aware targeting (CMSG_SET_SELECTION), player/creature
name queries, CMSG_SET_ACTIVE_MOVER after login
- Phase 2: Auto-attack, melee/spell damage parsing, health/mana/power
tracking from UPDATE_OBJECT fields, floating combat text
- Phase 3: Spell casting, action bar (12 slots, keys 1-=), cast bar,
cooldown tracking, aura/buff system with cancellation
- Phase 4: Group invite/accept/decline/leave, party frames UI,
/invite chat command
- Phase 5: Loot window, NPC gossip dialog, vendor buy/sell interface
Also: disable debug HUD/panels by default, gate 3D rendering to
IN_GAME state only, fix window resize not updating UI positions.
2026-02-04 10:30:52 -08:00
|
|
|
void setSize(int w, int h) { width = w; height = h; }
|
2026-02-02 12:24:50 -08:00
|
|
|
float getAspectRatio() const { return static_cast<float>(width) / height; }
|
|
|
|
|
|
|
|
|
|
SDL_Window* getSDLWindow() const { return window; }
|
|
|
|
|
SDL_GLContext getGLContext() const { return glContext; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
WindowConfig config;
|
|
|
|
|
SDL_Window* window = nullptr;
|
|
|
|
|
SDL_GLContext glContext = nullptr;
|
|
|
|
|
|
|
|
|
|
int width;
|
|
|
|
|
int height;
|
|
|
|
|
bool shouldCloseFlag = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace core
|
|
|
|
|
} // namespace wowee
|