本文整理汇总了C++中screen函数的典型用法代码示例。如果您正苦于以下问题:C++ screen函数的具体用法?C++ screen怎么用?C++ screen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了screen函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: screen
void CUIWindowItem::PositionSelf()
{
if( m_pWindow )
{
CEGUI::MouseCursor& cursor = CEGUI::MouseCursor::getSingleton();
CEGUI::Rect screen( CEGUI::System::getSingleton().getRenderer()->getRect());
CEGUI::Rect tipRect( m_pWindow->getUnclippedPixelRect());
const CEGUI::Image* mouseImage = cursor.getImage();
CEGUI::Point mousePos(cursor.getPosition());
CEGUI::Size mouseSz(0,0);
if (mouseImage)
{
mouseSz = mouseImage->getSize();
}
CEGUI::Point tmpPos(mousePos.d_x - tipRect.getWidth() - 5, mousePos.d_y - tipRect.getHeight() - 5);
tipRect.setPosition(tmpPos);
// if tooltip would be off the right of the screen,
// reposition to the other side of the mouse cursor.
if ( tipRect.d_right < 0 )
{
tmpPos.d_x = mousePos.d_x + mouseSz.d_width + 5;
}
// if tooltip would be off the bottom of the screen,
// reposition to the other side of the mouse cursor.
if ( tipRect.d_bottom < 0 )
{
tmpPos.d_y = mousePos.d_y + mouseSz.d_height + 5;
}
// set final position of tooltip window.
m_pWindow->setPosition( CEGUI::Absolute, tmpPos);
}
}
开发者ID:viticm,项目名称:pap_wclinet,代码行数:38,代码来源:UIWindowMng.cpp
示例2: Z80
void sys2900_state::sys2900(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(8'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &sys2900_state::mem_map);
m_maincpu->set_addrmap(AS_IO, &sys2900_state::io_map);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(50);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
screen.set_size(640, 480);
screen.set_visarea(0, 640-1, 0, 480-1);
screen.set_screen_update(FUNC(sys2900_state::screen_update_sys2900));
screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
Z80CTC(config, "ctc", 0);
Z80PIO(config, "pio", 0);
Z80SIO(config, "sio1", 0);
Z80SIO(config, "sio2", 0);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:23,代码来源:sys2900.cpp
示例3: agentWarnInvalidNumArgs
std::string
CommandEventHandler::info(std::vector<std::string>& args)
{
if (args.size() != 1)
return agentWarnInvalidNumArgs(1);
if (args[0].compare("id") == 0)
return id();
else if (args[0].compare("os") == 0)
return os();
else if (args[0].compare("systime") == 0)
return systime();
else if (args[0].compare("uptime") == 0)
return uptime();
else if (args[0].compare("uptimemillis") == 0)
return uptimemillis();
else if (args[0].compare("screen") == 0)
return screen();
else if (args[0].compare("memory") == 0)
return memory();
else if (args[0].compare("power") == 0)
return power();
return agentWarn("Invalid info subcommand.");
}
开发者ID:malini,项目名称:Negatus,代码行数:23,代码来源:CommandEventHandler.cpp
示例4: Z80
// TODO: Additional machine definition - Master Monty has a different memory layout
void monty_state::monty(machine_config &config)
{
// Basic machine hardware
Z80(config, m_maincpu, 3580000); // Ceramic resonator labeled 3.58MT
m_maincpu->set_addrmap(AS_PROGRAM, &monty_state::monty_mem);
m_maincpu->set_addrmap(AS_IO, &monty_state::monty_io);
m_maincpu->halt_cb().set(FUNC(monty_state::halt_changed));
// Video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
screen.set_refresh_hz(50);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // Not accurate
screen.set_size(50, 32); // Two SED1503s (42x16 pixels) control the top and bottom halves
screen.set_visarea(0, 50-1, 0, 32-1);
screen.set_screen_update(FUNC(monty_state::lcd_update));
/* sound hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
// LCD controller interfaces
SED1520(config, m_sed0).set_screen_update_cb(FUNC(monty_state::screen_update));
}
开发者ID:Octocontrabass,项目名称:mame,代码行数:24,代码来源:monty.cpp
示例5: MC6809E
void cswat_state::cswat(machine_config &config)
{
/* basic machine hardware */
MC6809E(config, m_maincpu, XTAL(18'432'000)/3/4); // HD68A09EP, 1.5MHz?
m_maincpu->set_addrmap(AS_PROGRAM, &cswat_state::cswat_map);
m_maincpu->set_vblank_int("screen", FUNC(cswat_state::irq0_line_assert));
m_maincpu->set_periodic_int(FUNC(cswat_state::nmi_handler), attotime::from_hz(300)); // ?
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
screen.set_size(36*8, 28*8);
screen.set_visarea_full();
screen.set_palette("palette");
screen.set_screen_update(FUNC(cswat_state::screen_update_cswat));
GFXDECODE(config, "gfxdecode", "palette", gfx_cswat);
PALETTE(config, "palette").set_entries(4*256);
/* sound hardware */
// TODO
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:23,代码来源:cswat.cpp
示例6: FUNC
ROM_END
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
void a2bus_videx160_device::device_add_mconfig(machine_config &config)
{
screen_device &screen(SCREEN(config, ULTRATERM_SCREEN_NAME, SCREEN_TYPE_RASTER));
screen.set_raw(CLOCK_LOW, 882, 0, 720, 370, 0, 350);
screen.set_screen_update(ULTRATERM_MC6845_NAME, FUNC(mc6845_device::screen_update));
MC6845(config, m_crtc, CLOCK_LOW/9);
m_crtc->set_screen(ULTRATERM_SCREEN_NAME);
m_crtc->set_show_border_area(false);
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(a2bus_videx160_device::crtc_update_row), this);
m_crtc->out_vsync_callback().set(FUNC(a2bus_videx160_device::vsync_changed));
}
开发者ID:MoochMcGee,项目名称:mame,代码行数:23,代码来源:a2ultraterm.cpp
示例7: sprintf
DIR *CommandMenu::screenopendir(char *m_commandDir,int *dirlen,int olddirlen)
{
char *p;
DIR *dir;
if(isRootDir)
{
for(p=m_commandDir;*p;p++); // search end of m_commandDir
sprintf(p,".%d",screen()); // append screen number
dir = opendir(m_commandDir);
if (dir == NULL) {
m_commandDir[olddirlen] = '\0'; // strip of screen number
*dirlen = olddirlen;
dir = opendir(m_commandDir);
}
}
else
{
*dirlen = olddirlen;
dir = opendir(m_commandDir);
}
return(dir);
}
开发者ID:bbidulock,项目名称:wmx,代码行数:23,代码来源:Menu.C
示例8: Z80
void microterm_state::mt5510(machine_config &config)
{
Z80(config, m_maincpu, 6_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, µterm_state::mt5510_mem_map);
m_maincpu->set_addrmap(AS_IO, µterm_state::mt5510_io_map);
scn2681_device &duart(SCN2681(config, "duart", 3.6864_MHz_XTAL));
duart.irq_cb().set_inputline(m_maincpu, 0);
duart.outport_cb().set("eeprom1", FUNC(eeprom_serial_93cxx_device::di_write)).bit(6);
duart.outport_cb().append("eeprom2", FUNC(eeprom_serial_93cxx_device::di_write)).bit(5);
duart.outport_cb().append("eeprom1", FUNC(eeprom_serial_93cxx_device::cs_write)).bit(4);
duart.outport_cb().append("eeprom2", FUNC(eeprom_serial_93cxx_device::cs_write)).bit(4);
duart.outport_cb().append("eeprom1", FUNC(eeprom_serial_93cxx_device::clk_write)).bit(3);
duart.outport_cb().append("eeprom2", FUNC(eeprom_serial_93cxx_device::clk_write)).bit(3);
EEPROM_93C46_16BIT(config, "eeprom1").do_callback().set("duart", FUNC(scn2681_device::ip6_w));
EEPROM_93C46_16BIT(config, "eeprom2").do_callback().set("duart", FUNC(scn2681_device::ip5_w));
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(45.8304_MHz_XTAL / 2, 1120, 0, 960, 341, 0, 300); // wild guess at resolution
screen.set_screen_update(FUNC(microterm_state::mt5510_update));
}
开发者ID:MASHinfo,项目名称:mame,代码行数:23,代码来源:microterm.cpp
示例9: main
/*===========================================================================*/
int main( int argc, char** argv )
{
kvs::glut::Application app( argc, argv );
/* Read volume data from the specified data file. If the data file is not
* specified, tornado volume data is created by using kvs::TornadoVolumeData class.
*/
kvs::StructuredVolumeObject* object = NULL;
if ( argc > 1 ) object = new kvs::StructuredVolumeImporter( std::string( argv[1] ) );
else object = new kvs::TornadoVolumeData( kvs::Vector3ui( 8, 8, 8 ) );
if ( !object )
{
kvsMessageError( "Cannot create a structured volume object." );
return false;
}
// Create a diamond glyph renderer.
kvs::DiamondGlyph* glyph = new kvs::DiamondGlyph();
if ( !glyph )
{
kvsMessageError( "Cannot creat an diamond glyph.");
return false;
}
// Set properties.
const kvs::TransferFunction transfer_function( 256 );
glyph->setTransferFunction( transfer_function );
kvs::glut::Screen screen( &app );
screen.registerObject( object, glyph );
screen.setGeometry( 0, 0, 512, 512 );
screen.setTitle( "kvs::DiamondGlyph" );
screen.show();
return app.run();
}
开发者ID:digirea,项目名称:KVS,代码行数:38,代码来源:main.cpp
示例10: main
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QSplashScreen screen(QPixmap(":/images/chargement.png"));
screen.show();
app.processEvents();
//Traduction des boutons
QString locale = QLocale::system().name().section('_', 0, 0);
QTranslator translator;
translator.load(QString("qt_") + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&translator);
//-----------------------------------------------------
// Vérification de l'existence d'une autre instance
//-----------------------------------------------------
app.setApplicationName("Dadaword");
QSharedMemory sharedMemory(app.applicationName());
// On vérifie à la création de cette zone mémoire si celle-ci existe
if(sharedMemory.create(sizeof(int))==false){
QMessageBox::warning(0, QObject::tr("Programme en cours d'exécution"), QObject::tr("Dadaword est déjà en cours d'exécution. Veuillez fermer l'instance ouverte avant de le lance à nouveau."));
//exit(EXIT_SUCCESS);
}
DadaWord instance;
//Création de l'interface utilisateur
instance.createUI();
//Affichage
instance.show();
screen.finish(&instance);
return app.exec();
}
开发者ID:chindit,项目名称:dadaword,代码行数:37,代码来源:main.cpp
示例11: M6502
void pokechmp_state::pokechmp(machine_config &config)
{
/* basic machine hardware */
M6502(config, m_maincpu, 4_MHz_XTAL/4);
m_maincpu->set_addrmap(AS_PROGRAM, &pokechmp_state::pokechmp_map);
M6502(config, m_audiocpu, 4_MHz_XTAL/4);
m_audiocpu->set_addrmap(AS_PROGRAM, &pokechmp_state::pokechmp_sound_map);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(32*8, 32*8);
screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
screen.set_screen_update(FUNC(pokechmp_state::screen_update_pokechmp));
screen.set_palette(m_palette);
screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
screen.screen_vblank().append(FUNC(pokechmp_state::sound_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_pokechmp);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x400);
/* sound hardware */
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, m_soundlatch);
YM2203(config, "ym1", XTAL(4'000'000)/4).add_route(ALL_OUTPUTS, "mono", 0.60);
YM3812(config, "ym2", XTAL(24'000'000)/16).add_route(ALL_OUTPUTS, "mono", 1.0);
okim6295_device &oki(OKIM6295(config, "oki", XTAL(24'000'000)/16, okim6295_device::PIN7_LOW));
oki.add_route(ALL_OUTPUTS, "mono", 0.50); /* sound fx */
oki.add_route(ALL_OUTPUTS, "mono", 0.50);
oki.set_addrmap(0, &pokechmp_state::pokechmp_oki_map);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:37,代码来源:pokechmp.cpp
示例12: screen
void Tooltip::positionSelf(void)
{
MouseCursor& cursor = MouseCursor::getSingleton();
Rect screen(Vector2(0, 0), System::getSingleton().getRenderer()->getDisplaySize());
Rect tipRect(getUnclippedOuterRect());
const Image* mouseImage = cursor.getImage();
Point mousePos(cursor.getPosition());
Size mouseSz(0,0);
if (mouseImage)
{
mouseSz = mouseImage->getSize();
}
Point tmpPos(mousePos.d_x + mouseSz.d_width, mousePos.d_y + mouseSz.d_height);
tipRect.setPosition(tmpPos);
// if tooltip would be off the right of the screen,
// reposition to the other side of the mouse cursor.
if (screen.d_right < tipRect.d_right)
{
tmpPos.d_x = mousePos.d_x - tipRect.getWidth() - 5;
}
// if tooltip would be off the bottom of the screen,
// reposition to the other side of the mouse cursor.
if (screen.d_bottom < tipRect.d_bottom)
{
tmpPos.d_y = mousePos.d_y - tipRect.getHeight() - 5;
}
// set final position of tooltip window.
setPosition(
UVector2(cegui_absdim(tmpPos.d_x),
cegui_absdim(tmpPos.d_y)));
}
开发者ID:Ocerus,项目名称:Ocerus,代码行数:37,代码来源:CEGUITooltip.cpp
示例13: Z80
void calorie_state::calorie(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, 4000000); /* 4 MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &calorie_state::calorie_map);
m_maincpu->set_addrmap(AS_OPCODES, &calorie_state::decrypted_opcodes_map);
m_maincpu->set_vblank_int("screen", FUNC(calorie_state::irq0_line_hold));
z80_device &audiocpu(Z80(config, "audiocpu", 3000000)); /* 3 MHz */
audiocpu.set_addrmap(AS_PROGRAM, &calorie_state::calorie_sound_map);
audiocpu.set_addrmap(AS_IO, &calorie_state::calorie_sound_io_map);
audiocpu.set_periodic_int(FUNC(calorie_state::irq0_line_hold), attotime::from_hz(64));
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(256, 256);
screen.set_visarea(0, 256-1, 16, 256-16-1);
screen.set_screen_update(FUNC(calorie_state::screen_update_calorie));
screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_calorie);
PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 0x100);
/* sound hardware */
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, m_soundlatch);
YM2149(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "mono", 0.8);
YM2149(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "mono", 0.8);
YM2149(config, "ay3", 1500000).add_route(ALL_OUTPUTS, "mono", 0.8);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:37,代码来源:calorie.cpp
示例14: D_INTERNAL
void ParameterWindow::_constrainToScreen() {
D_INTERNAL(("ParameterWindow::_constrainToScreen()\n"));
BScreen screen(this);
BRect screenRect = screen.Frame();
BRect windowRect = Frame();
// if the window is outside the screen rect
// move it to the default position
if (!screenRect.Intersects(windowRect)) {
windowRect.OffsetTo(screenRect.LeftTop());
MoveTo(windowRect.LeftTop());
windowRect = Frame();
}
// if the window is larger than the screen rect
// resize it to fit at each side
if (!screenRect.Contains(windowRect)) {
if (windowRect.left < screenRect.left) {
windowRect.left = screenRect.left + 5.0;
MoveTo(windowRect.LeftTop());
windowRect = Frame();
}
if (windowRect.top < screenRect.top) {
windowRect.top = screenRect.top + 5.0;
MoveTo(windowRect.LeftTop());
windowRect = Frame();
}
if (windowRect.right > screenRect.right) {
windowRect.right = screenRect.right - 5.0;
}
if (windowRect.bottom > screenRect.bottom) {
windowRect.bottom = screenRect.bottom - 5.0;
}
ResizeTo(windowRect.Width(), windowRect.Height());
}
}
开发者ID:nielx,项目名称:haiku-serviceskit,代码行数:37,代码来源:ParameterWindow.cpp
示例15: _SetRect
void
PreviewView::Update(const BRect* rect, BBitmap* bitmap)
{
if (Window() == NULL || Window()->IsHidden())
return;
if (rect != NULL)
_SetRect(*rect);
bigtime_t now = system_time();
if (bitmap == NULL) {
// Avoid updating preview too often
if (fTimeStamp + 50000 >= now)
return;
BScreen screen(Window());
screen.GetBitmap(&bitmap, false, &fCoordRect);
}
if (bitmap != NULL) {
BRect destRect;
BRect bitmapBounds = bitmap->Bounds();
BRect viewBounds = fBitmapView->Bounds();
if (BRectRatio(viewBounds) >= BRectRatio(bitmapBounds)) {
float overlap = BRectHorizontalOverlap(viewBounds, bitmapBounds);
destRect.Set(-overlap, 0, viewBounds.Width() + overlap,
viewBounds.Height());
} else {
float overlap = BRectVerticalOverlap(viewBounds, bitmapBounds);
destRect.Set(0, -overlap, viewBounds.Width(), viewBounds.Height() + overlap);
}
fTimeStamp = now;
fBitmapView->SetViewBitmap(bitmap,
bitmap->Bounds().OffsetToCopy(B_ORIGIN),
destRect,
B_FOLLOW_TOP|B_FOLLOW_LEFT, B_FILTER_BITMAP_BILINEAR);
Invalidate();
}
}
开发者ID:jackburton79,项目名称:bescreencapture,代码行数:37,代码来源:PreviewView.cpp
示例16: BRawContact
PersonWindow*
TPeopleApp::_NewWindow(const entry_ref* ref, BFile* file)
{
BRawContact* rawContact;
if (file == NULL)
rawContact = new BRawContact(B_CONTACT_FORMAT);
else
rawContact = new BRawContact(B_CONTACT_ANY, file);
BContact* contact = new BContact(rawContact);
if (contact->InitCheck() != B_OK) {
BAlert *alert = new BAlert("Alert",
B_TRANSLATE("Contact initialization failed!."),"OK");
alert->Go();
return NULL;
}
PersonWindow* window = new PersonWindow(fPosition,
B_TRANSLATE("New contact"), ref, file, contact);
window->Show();
window->Activate(true);
fWindowCount++;
// Offset the position for the next window which will be opened and
// reset it if it would open outside the screen bounds.
fPosition.OffsetBy(20, 20);
BScreen screen(window);
if (fPosition.bottom > screen.Frame().bottom)
fPosition.OffsetTo(fPosition.left, TITLE_BAR_HEIGHT);
if (fPosition.right > screen.Frame().right)
fPosition.OffsetTo(6, fPosition.top);
return window;
}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:37,代码来源:PeopleApp.cpp
示例17: M68000
void dim68k_state::dim68k(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(10'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &dim68k_state::dim68k_mem);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(50);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
screen.set_size(640, 480);
screen.set_visarea(0, 640-1, 0, 250-1);
PALETTE(config, m_palette, palette_device::MONOCHROME);
GFXDECODE(config, "gfxdecode", m_palette, gfx_dim68k);
/* sound hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
/* Devices */
UPD765A(config, "fdc", 8'000'000, true, true); // these options unknown
FLOPPY_CONNECTOR(config, "fdc:0", dim68k_floppies, "525hd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, "fdc:1", dim68k_floppies, "525hd", floppy_image_device::default_floppy_formats);
MC6845(config, m_crtc, 1790000);
m_crtc->set_screen("screen");
m_crtc->set_show_border_area(false);
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(dim68k_state::crtc_update_row), this);
generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
keyboard.set_keyboard_callback(FUNC(dim68k_state::kbd_put));
// software lists
SOFTWARE_LIST(config, "flop_list").set_original("dim68k");
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:37,代码来源:dim68k.cpp
示例18: screen
bool PointRenderer::Hits(const RenderState &inState)
{
UserPoint screen(inState.mClipRect.x, inState.mClipRect.y);
Extent2DF extent;
CachedExtentRenderer::GetExtent(inState.mTransform,extent);
if (!extent.Contains(screen))
return false;
UserPoint hit_test = inState.mTransform.mMatrix->ApplyInverse(screen);
if (inState.mTransform.mScale9->Active())
{
hit_test.x = inState.mTransform.mScale9->InvTransX(hit_test.x);
hit_test.y = inState.mTransform.mScale9->InvTransY(hit_test.y);
}
for(int i=0; i<mTransformed.size(); i++)
{
const UserPoint &point = mTransformed[i];
if ( fabs(point.x-screen.x) < 1 && fabs(point.y-screen.y) < 1 )
return true;
}
return false;
}
开发者ID:AdamHarte,项目名称:NME,代码行数:24,代码来源:PointRenderer.cpp
示例19: main
int main()
{
strstream str;
AFileIOStream screen(&cout), file(&str, &str);
MyObject obj0, obj1;
obj0.setCount(5);
obj0.setName("This is my name");
// obj0.debugDump(cerr, 0x0);
// obj1.debugDump(cerr, 0x0);
file << obj0;
file >> obj1;
if (obj0.compare(obj1))
{
cerr << "\r\nUnequal after serialization\r\n" << endl;
}
for (int iT = 0x0; iT < 512; ++iT)
{
obj1.setCount(iT);
file << obj1;
file >> obj0;
// obj0.debugDump(cerr, 0x0);
// obj1.debugDump(cerr, 0x0);
if (obj0.compare(obj1))
{
cerr << "\r\nComparisson failed\r\n" << endl;
}
}
return 0x0;
}
开发者ID:achacha,项目名称:AOS,代码行数:36,代码来源:tObjectSerialize.cpp
示例20: main
int main(void) {
//Initialisation
consoleDemoInit();
screen();
//Programme
while(1){
touchPosition touchXY;
touchRead(&touchXY);
if((touchXY.px==0x00)&&(touchXY.py==0x00)){
menu();
}
if((touchXY.px>0x50)&&(touchXY.py>0x24)&&(touchXY.px<0xA6)&&(touchXY.py<0x45)){
clear();
touch();
clear();
}
if((touchXY.px>0x50)&&(touchXY.py>0x5B)&&(touchXY.px<0xA6)&&(touchXY.py<0x7D)){
clear();
input();
clear();
}
}
return 0;
}
开发者ID:Allex0295,项目名称:ExposeConsole,代码行数:24,代码来源:MainConsole.cpp
注:本文中的screen函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论