]> git.localhorst.tv Git - l2e.git/commitdiff
Merge branch 'loader'
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 3 Sep 2012 19:58:28 +0000 (21:58 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 3 Sep 2012 19:58:28 +0000 (21:58 +0200)
This introduces the capability of loading l2 formatted source files.
The syntax for those is described here:
http://luke.redirectme.net/redmine/projects/l2e/wiki/LoaderSource

Please note that this method of loading data is very inefficient, but
convenient. Efficiency issues will be adressed by a binary file format
which mentioned source files can be compiled to.

Also, some representations have been adapted to a more link-friendly
structure and most of the configuration code in main has been moved to
their respective l2s files residing in /test-data/ .

18 files changed:
Debug/src/app/subdir.mk
Debug/src/battle/states/subdir.mk
Debug/src/battle/subdir.mk
Debug/src/common/subdir.mk
Debug/src/graphics/subdir.mk
Debug/src/sdl/subdir.mk
Debug/src/subdir.mk
Release/src/app/subdir.mk
Release/src/battle/states/subdir.mk
Release/src/battle/subdir.mk
Release/src/common/subdir.mk
Release/src/graphics/subdir.mk
Release/src/sdl/subdir.mk
Release/src/subdir.mk
src/battle/Monster.cpp
src/battle/Stats.cpp
src/battle/states/SelectIkari.cpp
test-data/attack-sword.png

index ae7ec036b008c71e19612c3e03aa003d4ed9601a..645d8eda5d62884af8b66cca8386a4b13019570b 100644 (file)
@@ -20,7 +20,7 @@ CPP_DEPS += \
 src/app/%.o: ../src/app/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index 9b3a19672d3f46ad3ea6567e4335bb4fbea89474..d817c33582710e992a94e1cbc13d4502e4232764 100644 (file)
@@ -41,7 +41,7 @@ CPP_DEPS += \
 src/battle/states/%.o: ../src/battle/states/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index c31d03d23e1c6fd9ee8acded4e8c62d4152777f0..703adbfd609f2d2f9f0b395956b307ddeb7e5f68 100644 (file)
@@ -50,7 +50,7 @@ CPP_DEPS += \
 src/battle/%.o: ../src/battle/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index 23c1e4d3cbe799db88512cf96f57fbb4b7b8727f..f25318031141ec5a305c938084eca78bb2a5a5d7 100644 (file)
@@ -26,7 +26,7 @@ CPP_DEPS += \
 src/common/%.o: ../src/common/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index fbd823017cbf889a42b22c24e96658eacea82c70..53d19d54d82b9c236ea12d9edb7bd24b86689c1a 100644 (file)
@@ -26,7 +26,7 @@ CPP_DEPS += \
 src/graphics/%.o: ../src/graphics/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index b800be3840a024a5b6c15b7bf66d89f0e3e3dd97..4a12c4d34911a6c7b2fa5c9d45beb9df5a813e0e 100644 (file)
@@ -23,7 +23,7 @@ CPP_DEPS += \
 src/sdl/%.o: ../src/sdl/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index b8432d7a8d630876b48aa2ae99616f5de673b4ac..773b36cdfcce48c63e75a13057cdca8763f559b8 100644 (file)
@@ -17,7 +17,7 @@ CPP_DEPS += \
 src/%.o: ../src/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O0 -g3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index e0bc8c4457527cddfb6a0995e74d6e0d60d4c562..764eb6fe55121e3bdc5cee8149fb28321d42010c 100644 (file)
@@ -20,7 +20,7 @@ CPP_DEPS += \
 src/app/%.o: ../src/app/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index 0a764ce8246d577a92ce317be65de81e38c0977c..dab568f71855a7dac626b93d4da2d048bbbbf481 100644 (file)
@@ -41,7 +41,7 @@ CPP_DEPS += \
 src/battle/states/%.o: ../src/battle/states/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index dc5e485185d2636fb27368c3e20a1a1b52fb8d99..70d865dcb7e4e46339460740d91f419c380076eb 100644 (file)
@@ -50,7 +50,7 @@ CPP_DEPS += \
 src/battle/%.o: ../src/battle/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index 0f0f34de65b8952dd7ca53567671e4337f6f0e78..c471112a89764a0633a49af0e134a92a1f8b64a8 100644 (file)
@@ -26,7 +26,7 @@ CPP_DEPS += \
 src/common/%.o: ../src/common/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index 2611758fe32f93d82ed7227f6ecfc45ba1fd0b8f..fa52cf2ca812b2cb13de42159e04298d216591bb 100644 (file)
@@ -26,7 +26,7 @@ CPP_DEPS += \
 src/graphics/%.o: ../src/graphics/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index 3bef090e820eab2623f2df5c3df37661e80760cc..ec2df9c51db9f4195f72d0c342976e4cecc8aa6e 100644 (file)
@@ -23,7 +23,7 @@ CPP_DEPS += \
 src/sdl/%.o: ../src/sdl/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index e2d08a05f0855664cb9acd9cc25a45ab9c102c7b..30ec7e992cc7a8517b89a15a4407f3a4602f80ba 100644 (file)
@@ -17,7 +17,7 @@ CPP_DEPS += \
 src/%.o: ../src/%.cpp
        @echo 'Building file: $<'
        @echo 'Invoking: GCC C++ Compiler'
-       g++ -I/usr/include/SDL -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+       g++ -I/usr/include/SDL -O3 -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
        @echo 'Finished building: $<'
        @echo ' '
 
index ec179e488d3b5b0e19212204f0fff08a2585d9a1..f0b9f3782f0587c1d289d671b669c73c970427b7 100644 (file)
@@ -16,6 +16,10 @@ Monster::Monster()
 , attackScript(0)
 , defenseScript(0)
 
+, meleeAnimation(0)
+, attackAnimation(0)
+, spellAnimation(0)
+
 , maxHealth(0)
 , health(0)
 , maxMana(0)
index ba15898f037bd8fe63ff0654dc04aed7a4ec94f2..c35a14ad339e54c34490e2771a94c451df4d7082 100644 (file)
@@ -15,8 +15,8 @@ Stats::Stats()
 , strength(0)
 , agility(0)
 , intelligence(0)
-, gut(0)
-, magicResistance(0) {
+, magicResistance(0)
+, gut(0) {
 
 }
 
@@ -26,8 +26,8 @@ Stats::Stats(Uint16 attack, Uint16 defense, Uint16 strength, Uint16 agility, Uin
 , strength(strength)
 , agility(agility)
 , intelligence(intelligence)
-, gut(gut)
-, magicResistance(magicResistance) {
+, magicResistance(magicResistance)
+, gut(gut) {
 
 }
 
index d1506fa23ee2f41fa6d03d7afa04af7e54b0c8ef..22853ce725c36d76fb09f0ef8e153efc3fc9c5d0 100644 (file)
@@ -118,7 +118,7 @@ void SelectIkari::RenderHeadline(SDL_Surface *screen, const Vector<int> &offset)
        Vector<int> position(
                        2 * res.selectFrame->BorderWidth() + res.normalFont->CharWidth(),
                        2 * res.selectFrame->BorderHeight());
-       res.normalFont->DrawString(res.itemMenuHeadline, screen, position + offset);
+       res.normalFont->DrawString(res.ikariMenuHeadline, screen, position + offset);
 }
 
 void SelectIkari::RenderMenu(SDL_Surface *screen, const Vector<int> &offset) {
index 82fe9461f44c087fa71e1d3e2e8687ee6e182116..555604eeef73dc2d470f79e97a608b6d1a617632 100644 (file)
Binary files a/test-data/attack-sword.png and b/test-data/attack-sword.png differ