int _gui_scale = MIN_INTERFACE_SCALE; ///< GUI scale, 100 is 100%.
int _gui_scale_cfg; ///< GUI scale in config.
/**
* The rect for repaint.
*
* This rectangle defines the area which should be repaint by the video driver.
*
* @ingroup dirty
*/
static Rect _invalid_rect;
static const byte *_colour_remap_ptr;
static byte _string_colourremap[3]; ///< Recoloursprite for stringdrawing. The grf loader ensures that #ST_FONT sprites only use colours 0 to 2.
static byte _string_colourremap[3]; ///< Recoloursprite for stringdrawing. The grf loader ensures that #SpriteType::Font sprites only use colours 0 to 2.
static const uint DIRTY_BLOCK_HEIGHT = 8;
static const uint DIRTY_BLOCK_WIDTH = 64;
static uint _dirty_bytes_per_line = 0;
static byte *_dirty_blocks = nullptr;
extern uint _dirty_block_colour;
void GfxScroll(int left, int top, int width, int height, int xo, int yo)
/* Awarded non-town subsidy or invalid source/destination, invalidate */
src/script/api/ai/ai_controller.hpp.sq
➞
Show inline comments
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* Class that handles all subsidy related functions.
* @api ai game
*/
class ScriptSubsidy : public ScriptObject {
public:
/**
* Enumeration for source and destination of a subsidy.
* @note The list of values may grow in future.
*/
enum SubsidyParticipantType {
/* Values are important, as they represent the internal state of the game.
* It is originally named SourceType. ST_HEADQUARTERS is intentionally
* It is originally named SourceType. SourceType::Headquarters is intentionally
* left out, as it cannot be used for Subsidies. */
SPT_INDUSTRY = 0, ///< Subsidy participant is an industry
SPT_TOWN = 1, ///< Subsidy participant is a town
SPT_INVALID = 0xFF, ///< Invalid/unknown participant type
};
/**
* Check whether this is a valid SubsidyID.
* @param subsidy_id The SubsidyID to check.
* @return True if and only if this subsidy is still valid.
*/
static bool IsValidSubsidy(SubsidyID subsidy_id);
src/script/squirrel.hpp
➞
Show inline comments
@@ -4,27 +4,27 @@
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file squirrel.hpp defines the Squirrel class */
#ifndef SQUIRREL_HPP
#define SQUIRREL_HPP
#include <squirrel.h>
/** The type of script we're working with, i.e. for who is it? */
if (sprite == PALETTE_TO_DARK_BLUE) usererror("Uhm, would you be so kind not to load a NewGRF that makes the 'PALETTE_TO_DARK_BLUE' sprite a non-remap sprite?");
/* Nested widget tree creation is done in two steps to ensure that this->GetWidget<NWidgetCore>(WID_SV_ACCEPTS_RATINGS) exists in UpdateWidgetSize(). */