SuperTuxKart 1.5 upstream source (from official release tarball)
This commit is contained in:
commit
2957e51aaa
8551 files changed
+1801800
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Advertising Screen Object for SuperTuxKart
|
||||
Upstream-Contact: Jean-Manual "samuncle" Clémençon <sam.un@protonmail.com>
|
||||
Source: https://supertuxkart.net
|
||||
License: CC-BY-SA 4.0
|
||||
|
||||
Files: *
|
||||
Copyright: Copyright 2016 Jean-Manuel "samuncle" Clémençon
|
||||
License: CC-BY-SA 4.0
|
||||
|
||||
Files: scripting.as
|
||||
Copyright:
|
||||
Copyright 2016, 2017 Jean-Manuel Clémençon
|
||||
Copyright 2016 Marianne "Auria" Gagnon <auria.mg@gmail.com>
|
||||
License: CC-BY-SA 4.0
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- Generated with script from SVN rev 17016 -->
|
||||
<scene>
|
||||
<object id="adscreen_caldeira" type="animation" xyz="0.00 0.00 0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" interaction="ghost" model="adscreen_caldeira.spm" skeletal-animation="false">
|
||||
<animated-texture name="stkflag_lasDunasArena_a.png" dx="0.050" />
|
||||
</object>
|
||||
<object id="adscreen_caldeira_back" type="animation" xyz="0.00 0.00 0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" interaction="ghost" model="adscreen_caldeira_back.spm" skeletal-animation="false">
|
||||
<animated-texture name="stk_generic_sunsetPattern_a.png" dx="-0.050" dy="0.0800" />
|
||||
</object>
|
||||
<object id="adscreen_follow_us" type="animation" xyz="0.00 0.00 0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" interaction="ghost" model="adscreen_follow_us.spm" skeletal-animation="false">
|
||||
<animated-texture name="stkflag_lasDunasArena_a.png" dx="0.050" />
|
||||
</object>
|
||||
<object id="adscreen_follow_us_back" type="animation" xyz="0.00 0.00 0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" interaction="ghost" model="adscreen_follow_us_back.spm" skeletal-animation="false">
|
||||
<animated-texture name="stk_generic_racingPattern_a.png" dx="0.050" dy="0.0800" />
|
||||
</object>
|
||||
<object id="adscreen_oceanic" type="animation" xyz="0.00 0.00 0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" interaction="ghost" model="adscreen_oceanic.spm" skeletal-animation="false">
|
||||
<animated-texture name="stkflag_lasDunasArena_a.png" dx="0.050" />
|
||||
</object>
|
||||
<object id="adscreen_oceanic_back" type="animation" xyz="0.00 0.00 0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" interaction="ghost" model="adscreen_oceanic_back.spm" skeletal-animation="false">
|
||||
<animated-texture name="stk_generic_cloudsPattern_a.png" dx="-0.050" dy="0.0800" />
|
||||
</object>
|
||||
<object id="gfx_advertisingScreenArena_a_main" type="animation" xyz="0.00 0.00 0.00" hpr="0.0 -0.0 0.0" scale="1.00 1.00 1.00" interaction="ghost" model="gfx_advertisingScreenArena_a_main.spm" skeletal-animation="false">
|
||||
</object>
|
||||
</scene>
|
||||
@@ -0,0 +1,105 @@
|
||||
namespace gfx_advertisingScreenArena_a
|
||||
{
|
||||
|
||||
void onStart(const string instID)
|
||||
{
|
||||
//Utils::logInfo ("hi");
|
||||
|
||||
ArenaScreenTimeout@ timeout = ArenaScreenTimeout(0);
|
||||
Utils::TimeoutCallback@ timerDelegate = Utils::TimeoutCallback(timeout.onTimerComplete);
|
||||
Utils::setTimeoutDelegate(timerDelegate, 7.0);
|
||||
|
||||
ArenaResetDisplay("gfx_advertisingScreenArena_a_main_proxy");
|
||||
ArenaResetDisplayText("gfx_advertisingScreenArena_a_main_proxy");
|
||||
ArenaEnableAd("gfx_advertisingScreenArena_a_main_proxy", 0);
|
||||
//Track::TrackObject@ part = Track::getTrackObject("gfx_advertisingScreenArena_a_main_proxy", "adscreen_follow_us_back");
|
||||
//part.setEnabled(false);
|
||||
}
|
||||
|
||||
void ArenaResetDisplay(string instID) {
|
||||
|
||||
Track::getTrackObject(instID, "adscreen_follow_us_back").setEnabled(false);
|
||||
Track::getTrackObject(instID, "adscreen_caldeira_back").setEnabled(false);
|
||||
Track::getTrackObject(instID, "adscreen_oceanic_back").setEnabled(false);
|
||||
}
|
||||
|
||||
void ArenaResetDisplayText(string instID) {
|
||||
Track::getTrackObject(instID, "adscreen_follow_us").setEnabled(false);
|
||||
Track::getTrackObject(instID, "adscreen_caldeira").setEnabled(false);
|
||||
Track::getTrackObject(instID, "adscreen_oceanic").setEnabled(false);
|
||||
}
|
||||
|
||||
void ArenaEnableAd(string instID, int adID)
|
||||
{
|
||||
ArenaResetDisplay(instID);
|
||||
ArenaResetDisplayText(instID);
|
||||
|
||||
if (adID == 0)
|
||||
{
|
||||
Track::getTrackObject(instID, "adscreen_follow_us_back").setEnabled(true);
|
||||
Track::getTrackObject(instID, "adscreen_follow_us").setEnabled(true);
|
||||
}
|
||||
|
||||
if (adID == 1)
|
||||
{
|
||||
Track::getTrackObject(instID, "adscreen_caldeira_back").setEnabled(true);
|
||||
Track::getTrackObject(instID, "adscreen_caldeira").setEnabled(true);
|
||||
}
|
||||
|
||||
if (adID == 2)
|
||||
{
|
||||
Track::getTrackObject(instID, "adscreen_oceanic_back").setEnabled(true);
|
||||
Track::getTrackObject(instID, "adscreen_oceanic").setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
class ArenaTextTimeout
|
||||
{
|
||||
|
||||
string instID;
|
||||
|
||||
void onTimerComplete2()
|
||||
{
|
||||
//Utils::logInfo("text disabled");
|
||||
ArenaResetDisplayText("gfx_advertisingScreenArena_a_main_proxy");
|
||||
}
|
||||
}
|
||||
|
||||
class ArenaScreenTimeout
|
||||
{
|
||||
string instID;
|
||||
int counter;
|
||||
|
||||
ArenaScreenTimeout(int initCounting)
|
||||
{
|
||||
this.counter = initCounting;
|
||||
this.instID = "gfx_advertisingScreenArena_a_main_proxy";
|
||||
}
|
||||
|
||||
void onTimerComplete()
|
||||
{
|
||||
this.counter++;
|
||||
|
||||
|
||||
if(this.counter > 2)
|
||||
{
|
||||
//Utils::logInfo("o:o");
|
||||
this.counter = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Utils::logInfo("ahaha");
|
||||
}
|
||||
|
||||
ArenaEnableAd(instID, this.counter);
|
||||
|
||||
ArenaScreenTimeout@ timeout = ArenaScreenTimeout(this.counter);
|
||||
Utils::TimeoutCallback@ timerDelegate = Utils::TimeoutCallback(timeout.onTimerComplete);
|
||||
Utils::setTimeoutDelegate(timerDelegate, 7.0);
|
||||
|
||||
ArenaTextTimeout@ timeout2 = ArenaTextTimeout();
|
||||
Utils::TimeoutCallback@ timerDelegate2 = Utils::TimeoutCallback(timeout2.onTimerComplete2);
|
||||
Utils::setTimeoutDelegate(timerDelegate2, 6.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user