mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
fix: jui compile due to include ordering
This commit is contained in:
parent
eacf5ccf30
commit
ee2f9961c5
|
|
@ -47,6 +47,7 @@
|
||||||
#include "minecraft/client/skins/DLCTexturePack.h"
|
#include "minecraft/client/skins/DLCTexturePack.h"
|
||||||
#include "minecraft/client/skins/TexturePack.h"
|
#include "minecraft/client/skins/TexturePack.h"
|
||||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||||
|
#include "minecraft/client/title/TitleScreen.h"
|
||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
|
|
||||||
class Tutorial;
|
class Tutorial;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#include "Gui.h"
|
#include "Gui.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "platform/PlatformTypes.h"
|
#include "platform/PlatformTypes.h"
|
||||||
#include "platform/sdl2/Input.h"
|
#include "platform/sdl2/Input.h"
|
||||||
|
|
@ -513,7 +514,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) {
|
||||||
int NUM_HEARTS_PER_ROW = 10; // 4jcraft: missing definition
|
int NUM_HEARTS_PER_ROW = 10; // 4jcraft: missing definition
|
||||||
int numHealthRows = Mth::ceil((maxHealth + totalAbsorption) /
|
int numHealthRows = Mth::ceil((maxHealth + totalAbsorption) /
|
||||||
2 / (float)NUM_HEARTS_PER_ROW);
|
2 / (float)NUM_HEARTS_PER_ROW);
|
||||||
int healthRowHeight = max(10 - (numHealthRows - 2), 3);
|
int healthRowHeight = std::max(10 - (numHealthRows - 2), 3);
|
||||||
yLine2 = yLine1 - (numHealthRows - 1) * healthRowHeight - 10;
|
yLine2 = yLine1 - (numHealthRows - 1) * healthRowHeight - 10;
|
||||||
double absorption = totalAbsorption;
|
double absorption = totalAbsorption;
|
||||||
|
|
||||||
|
|
@ -649,7 +650,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) {
|
||||||
int baseHealth = 0;
|
int baseHealth = 0;
|
||||||
|
|
||||||
while (hearts > 0) {
|
while (hearts > 0) {
|
||||||
int rowHearts = min(hearts, 10);
|
int rowHearts = std::min(hearts, 10);
|
||||||
hearts -= rowHearts;
|
hearts -= rowHearts;
|
||||||
|
|
||||||
for (int i = 0; i < rowHearts; i++) {
|
for (int i = 0; i < rowHearts; i++) {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#include "minecraft/client/renderer/entity/ItemRenderer.h"
|
#include "minecraft/client/renderer/entity/ItemRenderer.h"
|
||||||
#include "minecraft/locale/I18n.h"
|
#include "minecraft/locale/I18n.h"
|
||||||
#include "minecraft/stats/Achievement.h"
|
#include "minecraft/stats/Achievement.h"
|
||||||
|
#include "minecraft/client/Lighting.h"
|
||||||
|
|
||||||
AchievementPopup::AchievementPopup(Minecraft* mc) {
|
AchievementPopup::AchievementPopup(Minecraft* mc) {
|
||||||
// 4J - added initialisers
|
// 4J - added initialisers
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue