Skip to content

Commit

Permalink
[ref] 'ekg::core' to 'ekg::p_core' as following the coding guide-style
Browse files Browse the repository at this point in the history
  • Loading branch information
MrsRina committed Feb 15, 2025
1 parent 3fc834d commit eacc4a0
Show file tree
Hide file tree
Showing 42 changed files with 380 additions and 1,168 deletions.
17 changes: 0 additions & 17 deletions include/ekg/animation/animation.hpp

This file was deleted.

3 changes: 2 additions & 1 deletion include/ekg/core/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "ekg/math/geometry.hpp"

namespace ekg {
extern
}

#endif
#endif
136 changes: 0 additions & 136 deletions include/ekg/core/oldruntime.hpp

This file was deleted.

10 changes: 9 additions & 1 deletion include/ekg/core/runtime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ namespace ekg {
void render();
void poll_events();
};

struct runtime_property_t {
public:
std::string font_path {};
std::string font_path_emoji {};
ekg::gpu::api *p_gpu_api {};
ekg::os::platform *p_os_platform {};
};
}

#endif
#endif
6 changes: 3 additions & 3 deletions include/ekg/draw/draw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* SOFTWARE.
*/

#ifndef EKG_DRAW_H
#define EKG_DRAW_H
#ifndef EKG_DRAW_HPP
#define EKG_DRAW_HPP

#include <vector>
#include <iostream>
Expand Down Expand Up @@ -83,4 +83,4 @@ namespace ekg::draw {
void disable_high_priority();
}

#endif
#endif
14 changes: 5 additions & 9 deletions include/ekg/draw/font_renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* SOFTWARE.
*/

#ifndef EKG_DRAW_FONT_RENDERER_H
#define EKG_DRAW_FONT_RENDERER_H
#ifndef EKG_DRAW_FONT_RENDERER_HPP
#define EKG_DRAW_FONT_RENDERER_HPP

#include <unordered_map>

Expand Down Expand Up @@ -64,12 +64,6 @@ if (!char_data.was_sampled) { \
#define ekg_generate_factor_hash(axis, c32, char_data_x) static_cast<int32_t>(axis + c32 + char_data_x * 100)

namespace ekg::draw {
enum font_face_type {
text,
emojis,
kanjis
};

class font_renderer {
public:
static FT_Library ft_library;
Expand Down Expand Up @@ -160,6 +154,8 @@ namespace ekg::draw {
**/
void flush();
};


}

#endif
#endif
15 changes: 3 additions & 12 deletions include/ekg/ekg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* SOFTWARE.
*/

#ifndef EKG_H
#define EKG_H
#ifndef EKG_HPP
#define EKG_HPP

#pragma STDC FENV_ACCESS ON

Expand Down Expand Up @@ -57,19 +57,10 @@ namespace ekg {
/**
* The runtime core of ekg.
*/
extern ekg::runtime *core;
extern bool running;
extern ekg::runtime *p_core;

/** The setup and handling functions of ekg **/

struct runtime_property {
public:
const char *p_font_path {""};
const char *p_font_path_emoji {""};
ekg::gpu::api *p_gpu_api {};
ekg::os::platform *p_os_platform {};
};

/**
* The initialization of EKG,
* initialize `ekg::runtime_property` correct before calling this.
Expand Down
6 changes: 3 additions & 3 deletions include/ekg/gpu/allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* SOFTWARE.
*/

#ifndef EKG_GPU_ALLOCATOR_H
#define EKG_GPU_ALLOCATOR_H
#ifndef EKG_GPU_ALLOCATOR_HPP
#define EKG_GPU_ALLOCATOR_HPP

#include <array>
#include <vector>
Expand Down Expand Up @@ -152,4 +152,4 @@ namespace ekg::gpu {
};
}

#endif
#endif
6 changes: 3 additions & 3 deletions include/ekg/gpu/api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* SOFTWARE.
*/

#ifndef EKG_GPU_BASE_IMPL_H
#define EKG_GPU_BASE_IMPL_H
#ifndef EKG_GPU_BASE_IMPL_HPP
#define EKG_GPU_BASE_IMPL_HPP

#include <iostream>
#include <cstdint>
Expand Down Expand Up @@ -94,4 +94,4 @@ namespace ekg::gpu {
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion include/ekg/gpu/opengl_pipeline_template.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ namespace ekg::gpu {
);
}

#endif
#endif
Loading

0 comments on commit eacc4a0

Please sign in to comment.